method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
@SuppressWarnings("unchecked")
public void testSessionWindowsWithContinuousEventTimeTrigger() throws Exception {
closeCalled.set(0);
final int sessionSize = 3;
TypeInformation<Tuple2<String, Integer>> inputType = TypeInfoParser.parse("Tuple2<String, Integer>");
ListStateDescriptor<Tuple2<String, I... | @SuppressWarnings(STR) void function() throws Exception { closeCalled.set(0); final int sessionSize = 3; TypeInformation<Tuple2<String, Integer>> inputType = TypeInfoParser.parse(STR); ListStateDescriptor<Tuple2<String, Integer>> stateDesc = new ListStateDescriptor<>(STR, inputType.createSerializer(new ExecutionConfig(... | /**
* This tests whether merging works correctly with the ContinuousEventTimeTrigger.
* @throws Exception
*/ | This tests whether merging works correctly with the ContinuousEventTimeTrigger | testSessionWindowsWithContinuousEventTimeTrigger | {
"repo_name": "hongyuhong/flink",
"path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperatorTest.java",
"license": "apache-2.0",
"size": 116111
} | [
"java.util.concurrent.ConcurrentLinkedQueue",
"org.apache.flink.api.common.ExecutionConfig",
"org.apache.flink.api.common.state.ListStateDescriptor",
"org.apache.flink.api.common.typeinfo.BasicTypeInfo",
"org.apache.flink.api.common.typeinfo.TypeInformation",
"org.apache.flink.api.java.tuple.Tuple2",
"o... | import java.util.concurrent.ConcurrentLinkedQueue; import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.state.ListStateDescriptor; import org.apache.flink.api.common.typeinfo.BasicTypeInfo; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.tu... | import java.util.concurrent.*; import org.apache.flink.api.common.*; import org.apache.flink.api.common.state.*; import org.apache.flink.api.common.typeinfo.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.api.java.typeutils.*; import org.apache.flink.streaming.api.watermark.*; import org.apache.fli... | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 240,411 |
public HttpRequest setContentType(ContentType contentType) {
this.contentType = contentType;
return this;
} | HttpRequest function(ContentType contentType) { this.contentType = contentType; return this; } | /**
* Set the content type for the payload to send with requests.
*
* @param contentType The content type for the data to send with the request.
* @return The current request instance.
*/ | Set the content type for the payload to send with requests | setContentType | {
"repo_name": "SelerityInc/CommonBase",
"path": "src/main/java/com/seleritycorp/common/base/http/client/HttpRequest.java",
"license": "apache-2.0",
"size": 7898
} | [
"org.apache.http.entity.ContentType"
] | import org.apache.http.entity.ContentType; | import org.apache.http.entity.*; | [
"org.apache.http"
] | org.apache.http; | 2,108,593 |
private static void clusterAndDisplayClusters(final Controller controller,
final Class<? extends IClusteringAlgorithm> clusteringAlgorithm)
{
final Map<String, Object> processingAttributes = Maps.newHashMap();
CommonAttributesDescriptor.attributeBuilder(processingAttributes)
... | static void function(final Controller controller, final Class<? extends IClusteringAlgorithm> clusteringAlgorithm) { final Map<String, Object> processingAttributes = Maps.newHashMap(); CommonAttributesDescriptor.attributeBuilder(processingAttributes) .documents(Lists.newArrayList(SampleDocumentData.DOCUMENTS_DATA_MININ... | /**
* Clusters results for query "data mining" and displays the clusters.
*/ | Clusters results for query "data mining" and displays the clusters | clusterAndDisplayClusters | {
"repo_name": "MjAbuz/carrot2",
"path": "applications/carrot2-examples/examples/org/carrot2/examples/clustering/UsingCustomLanguageModel.java",
"license": "bsd-3-clause",
"size": 6115
} | [
"java.util.Map",
"org.carrot2.core.Controller",
"org.carrot2.core.IClusteringAlgorithm",
"org.carrot2.core.ProcessingResult",
"org.carrot2.core.attribute.CommonAttributesDescriptor",
"org.carrot2.examples.ConsoleFormatter",
"org.carrot2.examples.SampleDocumentData",
"org.carrot2.shaded.guava.common.co... | import java.util.Map; import org.carrot2.core.Controller; import org.carrot2.core.IClusteringAlgorithm; import org.carrot2.core.ProcessingResult; import org.carrot2.core.attribute.CommonAttributesDescriptor; import org.carrot2.examples.ConsoleFormatter; import org.carrot2.examples.SampleDocumentData; import org.carrot2... | import java.util.*; import org.carrot2.core.*; import org.carrot2.core.attribute.*; import org.carrot2.examples.*; import org.carrot2.shaded.guava.common.collect.*; | [
"java.util",
"org.carrot2.core",
"org.carrot2.examples",
"org.carrot2.shaded"
] | java.util; org.carrot2.core; org.carrot2.examples; org.carrot2.shaded; | 2,855,222 |
public static MQVuserKeyingMaterial getInstance(
Object obj)
{
if (obj instanceof MQVuserKeyingMaterial)
{
return (MQVuserKeyingMaterial)obj;
}
else if (obj != null)
{
return new MQVuserKeyingMaterial(ASN1Sequence.getInstance(obj));
... | static MQVuserKeyingMaterial function( Object obj) { if (obj instanceof MQVuserKeyingMaterial) { return (MQVuserKeyingMaterial)obj; } else if (obj != null) { return new MQVuserKeyingMaterial(ASN1Sequence.getInstance(obj)); } return null; } | /**
* Return an MQVuserKeyingMaterial object from the given object.
* <p>
* Accepted inputs:
* <ul>
* <li> null → null
* <li> {@link MQVuserKeyingMaterial} object
* <li> {@link org.spongycastle.asn1.ASN1Sequence ASN1Sequence} with MQVuserKeyingMaterial inside it.
* </ul>
... | Return an MQVuserKeyingMaterial object from the given object. Accepted inputs: null → null <code>MQVuserKeyingMaterial</code> object <code>org.spongycastle.asn1.ASN1Sequence ASN1Sequence</code> with MQVuserKeyingMaterial inside it. | getInstance | {
"repo_name": "Skywalker-11/spongycastle",
"path": "core/src/main/java/org/spongycastle/asn1/cms/ecc/MQVuserKeyingMaterial.java",
"license": "mit",
"size": 3712
} | [
"org.spongycastle.asn1.ASN1Sequence"
] | import org.spongycastle.asn1.ASN1Sequence; | import org.spongycastle.asn1.*; | [
"org.spongycastle.asn1"
] | org.spongycastle.asn1; | 158,624 |
public void deactivated(SessionEvent sevt) {
// Clear the context information.
setCurrentLocation(null, false);
} // deactivated | void function(SessionEvent sevt) { setCurrentLocation(null, false); } | /**
* Called when the Session has deactivated. The debuggee VM is no
* longer connected to the Session.
*
* @param sevt session event.
*/ | Called when the Session has deactivated. The debuggee VM is no longer connected to the Session | deactivated | {
"repo_name": "mbertacca/JSwat2",
"path": "classes/com/bluemarsh/jswat/ContextManager.java",
"license": "gpl-2.0",
"size": 13174
} | [
"com.bluemarsh.jswat.event.SessionEvent"
] | import com.bluemarsh.jswat.event.SessionEvent; | import com.bluemarsh.jswat.event.*; | [
"com.bluemarsh.jswat"
] | com.bluemarsh.jswat; | 2,498,972 |
public void delete(JsonObject doc) {
delete(this.currentQuery.getDeleteQueryWhereEqual(), doc);
} | void function(JsonObject doc) { delete(this.currentQuery.getDeleteQueryWhereEqual(), doc); } | /**
* Deletes a single JsonObject
* @param doc - to be deleted
*/ | Deletes a single JsonObject | delete | {
"repo_name": "AGES-Initiatives/alwb-utils-gui",
"path": "alwb.utils/src/main/java/net/ages/alwb/utils/core/datastores/db/h2/manager/H2ConnectionManager.java",
"license": "epl-1.0",
"size": 13295
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,839,729 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
headerPanel = new javax.swing.JPanel();
scrollPane = new javax.swing.JScrollPane();
contentPanel = new javax.swing.JPanel();... | @SuppressWarnings(STR) void function() { headerPanel = new javax.swing.JPanel(); scrollPane = new javax.swing.JScrollPane(); contentPanel = new javax.swing.JPanel(); setLayout(new java.awt.BorderLayout()); headerPanel.setLayout(new java.awt.BorderLayout()); add(headerPanel, java.awt.BorderLayout.NORTH); contentPanel.se... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "Anisorf/ENCODE",
"path": "encode/src/org/wandora/application/gui/topicpanels/SketchGridPanel.java",
"license": "gpl-3.0",
"size": 8874
} | [
"java.awt.BorderLayout",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 128,557 |
public void generateMaze() {
if (randomSeed == 0) {
randomSeed = System.currentTimeMillis();
System.out.println("Maze.generateMaze - randomSeed: " + randomSeed);
}
final Random randomGenerator = new Random(randomSeed);
for (int curlyLineIndex = 0; curlyLine... | void function() { if (randomSeed == 0) { randomSeed = System.currentTimeMillis(); System.out.println(STR + randomSeed); } final Random randomGenerator = new Random(randomSeed); for (int curlyLineIndex = 0; curlyLineIndex < (mazeHeight * mazeWidth); curlyLineIndex++) { final Point startPointCurlyLine = getStartPointCurl... | /**
* Generate a random maze.
*/ | Generate a random maze | generateMaze | {
"repo_name": "FreekDB/MazeGenerator",
"path": "src/main/java/nl/xs4all/home/freekdb/maze/model/Maze.java",
"license": "apache-2.0",
"size": 16776
} | [
"java.awt.Point",
"java.util.Random"
] | import java.awt.Point; import java.util.Random; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,603,019 |
public static Expression sum (Expression[] rgExpressions, int nStart, int nEnd)
{
Expression exprSum = null;
for (int i = nStart; i <= nEnd; i++)
{
if (exprSum == null)
exprSum = rgExpressions[i].clone ();
else
exprSum = new BinaryExpression (exprSum, BinaryOperator.ADD, rgExpressions[i]... | static Expression function (Expression[] rgExpressions, int nStart, int nEnd) { Expression exprSum = null; for (int i = nStart; i <= nEnd; i++) { if (exprSum == null) exprSum = rgExpressions[i].clone (); else exprSum = new BinaryExpression (exprSum, BinaryOperator.ADD, rgExpressions[i].clone ()); } return exprSum == nu... | /**
* Calculates the sum of the expressions <code>rgExpressions</code>.
*
* @param rgExpressions
* The expressions to add
* @return The sum of all the expressions <code>rgExpressions</code>
*/ | Calculates the sum of the expressions <code>rgExpressions</code> | sum | {
"repo_name": "bcosenza/patus",
"path": "src/ch/unibas/cs/hpwc/patus/util/ExpressionUtil.java",
"license": "lgpl-2.1",
"size": 34121
} | [
"ch.unibas.cs.hpwc.patus.symbolic.Symbolic"
] | import ch.unibas.cs.hpwc.patus.symbolic.Symbolic; | import ch.unibas.cs.hpwc.patus.symbolic.*; | [
"ch.unibas.cs"
] | ch.unibas.cs; | 1,739,635 |
public void deleteComment(String commentId) {
try {
LOG.debug("Deleting comment(id={})", commentId);
if (commentId == null) {
throw new IllegalArgumentException("Parameter 'commentId' can not be null");
}
BoxComment comment = new BoxComment(box... | void function(String commentId) { try { LOG.debug(STR, commentId); if (commentId == null) { throw new IllegalArgumentException(STR); } BoxComment comment = new BoxComment(boxConnection, commentId); comment.delete(); } catch (BoxAPIException e) { throw new RuntimeException( String.format(STR, e.getResponseCode(), e.getR... | /**
* Delete comment.
*
* @param commentId
* - the id of comment to delete.
*/ | Delete comment | deleteComment | {
"repo_name": "kevinearls/camel",
"path": "components/camel-box/camel-box-api/src/main/java/org/apache/camel/component/box/api/BoxCommentsManager.java",
"license": "apache-2.0",
"size": 7179
} | [
"com.box.sdk.BoxAPIException",
"com.box.sdk.BoxComment"
] | import com.box.sdk.BoxAPIException; import com.box.sdk.BoxComment; | import com.box.sdk.*; | [
"com.box.sdk"
] | com.box.sdk; | 1,548,460 |
@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY )
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
@Basic( optional = true )
@JoinColumn(name = "enrollmentid", nullable = true )
public Enrollment getEnrollmentid() {
return this.en... | @ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY ) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE}) @Basic( optional = true ) @JoinColumn(name = STR, nullable = true ) Enrollment function() { return this.enrollmentid; } | /**
* Return the value associated with the column: enrollmentid.
* @return A Enrollment object (this.enrollmentid)
*/ | Return the value associated with the column: enrollmentid | getEnrollmentid | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "hmis-model-v2015/src/main/java/com/servinglynk/hmis/warehouse/model/v2015/Contact.java",
"license": "mpl-2.0",
"size": 10696
} | [
"javax.persistence.Basic",
"javax.persistence.CascadeType",
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne"
] | import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,892,223 |
String convert(N node, Map<N, Integer> mapNodeToId, N antecedent) throws ConllConverterException;
static final int ROOT_ID = 0;
static final char TAB = '\t';
static final String UNDERSCORE = "_";
static final String ROOT = "ROOT"; | String convert(N node, Map<N, Integer> mapNodeToId, N antecedent) throws ConllConverterException; static final int ROOT_ID = 0; static final char TAB = '\t'; static final String UNDERSCORE = "_"; static final String ROOT = "ROOT"; | /**
* Get a node, and a map from nodes to their respective CoNLL representation IDs, the antecedent, and return the line representing the
* node in CoNLL format.<br>
* <b>ASSUMPTION:</b> the map contains entries for the node and its antecedent
*
* @param node
* @param mapNodeToId
* @param antecedent
*... | Get a node, and a map from nodes to their respective CoNLL representation IDs, the antecedent, and return the line representing the node in CoNLL format | convert | {
"repo_name": "madhumita-git/Excitement-Open-Platform",
"path": "transformations/src/main/java/eu/excitementproject/eop/transformations/generic/truthteller/conll/TreeConllStringConverter.java",
"license": "gpl-3.0",
"size": 1249
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,705,202 |
public void unequipp(Equippable item) {
if (item == weaponMain) {
weaponMain = null;
}
if (item == weaponSec) {
weaponSec = null;
}
if (item == boots) {
boots = null;
}
if (item == gloves) {
gloves = null;
}
if (item == shield) {
shield = null;
}
... | void function(Equippable item) { if (item == weaponMain) { weaponMain = null; } if (item == weaponSec) { weaponSec = null; } if (item == boots) { boots = null; } if (item == gloves) { gloves = null; } if (item == shield) { shield = null; } if (item == chest) { chest = null; } if (item == ring) { ring = null; } if (item... | /**
* Removes specific item from equipment
*
* @param item Equipped character item
*/ | Removes specific item from equipment | unequipp | {
"repo_name": "Isangeles/Senlin",
"path": "src/main/java/pl/isangeles/senlin/core/Equipment.java",
"license": "gpl-2.0",
"size": 8585
} | [
"pl.isangeles.senlin.core.item.Equippable"
] | import pl.isangeles.senlin.core.item.Equippable; | import pl.isangeles.senlin.core.item.*; | [
"pl.isangeles.senlin"
] | pl.isangeles.senlin; | 2,547,759 |
public static <K, V> Map<K, V> mapOf(K key, V value, Object... keyValues) {
final Map<K, V> map = new LinkedHashMap<>(1 + keyValues.length);
map.put(key, value);
for (int i = 0; i < keyValues.length;) {
//noinspection unchecked
map.put((K) keyValues[i++], (V) keyValues[i++]);
}
return ... | static <K, V> Map<K, V> function(K key, V value, Object... keyValues) { final Map<K, V> map = new LinkedHashMap<>(1 + keyValues.length); map.put(key, value); for (int i = 0; i < keyValues.length;) { map.put((K) keyValues[i++], (V) keyValues[i++]); } return map; } | /**
* Returns a hashmap with given contents.
*
* <p>Use this method in initializers. Type parameters are inferred from
* context, and the contents are initialized declaratively. For example,
*
* <blockquote><code>Map<String, Integer> population =<br>
* Olap4jUtil.mapOf(<br>
* &... | Returns a hashmap with given contents. Use this method in initializers. Type parameters are inferred from context, and the contents are initialized declaratively. For example, <code>Map<String, Integer> population = Olap4jUtil.mapOf( "UK", 65000000, "USA... | mapOf | {
"repo_name": "julianhyde/calcite",
"path": "core/src/main/java/org/apache/calcite/util/Util.java",
"license": "apache-2.0",
"size": 86163
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,675,785 |
public static String makeTimeString(final Context context, long secs) {
long hours, mins;
hours = secs / 3600;
secs -= hours * 3600;
mins = secs / 60;
secs -= mins * 60;
final String durationFormat = context.getResources().getString(
hours == 0 ? R.s... | static String function(final Context context, long secs) { long hours, mins; hours = secs / 3600; secs -= hours * 3600; mins = secs / 60; secs -= mins * 60; final String durationFormat = context.getResources().getString( hours == 0 ? R.string.durationformatshort : R.string.durationformatlong); return String.format(dura... | /**
* * Used to create a formatted time string for the duration of tracks.
*
* @param context The {@link Context} to use.
* @param secs The track in seconds.
* @return Duration of a track that's properly formatted.
*/ | Used to create a formatted time string for the duration of tracks | makeTimeString | {
"repo_name": "JavierNicolas/JadaMusic",
"path": "app3/src/main/java/org/opensilk/music/ui3/common/UtilsCommon.java",
"license": "gpl-3.0",
"size": 6891
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 500,347 |
public Counter getReadTimeouts() {
return readTimeouts;
} | Counter function() { return readTimeouts; } | /**
* Returns the number of read requests that returned a timeout (independently
* of the final decision taken by the {@link com.datastax.driver.core.policies.RetryPolicy}).
*
* @return the number of read timeout.
*/ | Returns the number of read requests that returned a timeout (independently of the final decision taken by the <code>com.datastax.driver.core.policies.RetryPolicy</code>) | getReadTimeouts | {
"repo_name": "ruivieira/java-driver",
"path": "driver-core/src/main/java/com/datastax/driver/core/Metrics.java",
"license": "apache-2.0",
"size": 9577
} | [
"com.yammer.metrics.core.Counter"
] | import com.yammer.metrics.core.Counter; | import com.yammer.metrics.core.*; | [
"com.yammer.metrics"
] | com.yammer.metrics; | 1,190,287 |
T visitReferenceMap(@NotNull BigDataScriptParser.ReferenceMapContext ctx); | T visitReferenceMap(@NotNull BigDataScriptParser.ReferenceMapContext ctx); | /**
* Visit a parse tree produced by {@link BigDataScriptParser#referenceMap}.
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>BigDataScriptParser#referenceMap</code> | visitReferenceMap | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/antlr/BigDataScriptVisitor.java",
"license": "apache-2.0",
"size": 22181
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,315,917 |
@ApiModelProperty(value = "Describes the installation of a package on the linked resource.")
public PackageManagerInstallationDetails getInstallationDetails() {
return installationDetails;
} | @ApiModelProperty(value = STR) PackageManagerInstallationDetails function() { return installationDetails; } | /**
* Describes the installation of a package on the linked resource.
* @return installationDetails
**/ | Describes the installation of a package on the linked resource | getInstallationDetails | {
"repo_name": "grafeas/client-java",
"path": "src/main/java/io/grafeas/model/ApiOccurrence.java",
"license": "apache-2.0",
"size": 13708
} | [
"io.grafeas.model.PackageManagerInstallationDetails",
"io.swagger.annotations.ApiModelProperty"
] | import io.grafeas.model.PackageManagerInstallationDetails; import io.swagger.annotations.ApiModelProperty; | import io.grafeas.model.*; import io.swagger.annotations.*; | [
"io.grafeas.model",
"io.swagger.annotations"
] | io.grafeas.model; io.swagger.annotations; | 1,018,555 |
public static String getMethodParameterType(String methodName, int parameter) {
Dbc.require("A method must be specified", methodName != null && methodName.length() > 0);
Dbc.require("A method must have " + ParameterStart + " and " + ParameterEnd + " characters", methodName.contains(ParameterStart) && methodName.... | static String function(String methodName, int parameter) { Dbc.require(STR, methodName != null && methodName.length() > 0); Dbc.require(STR + ParameterStart + STR + ParameterEnd + STR, methodName.contains(ParameterStart) && methodName.contains(ParameterEnd)); Dbc.require(STR, parameter >= 0); String retValue = null; St... | /**
* Determine the parameter type for a given parameter index
*
* @param methodName
* @param parameter
* @return String parameter type
*/ | Determine the parameter type for a given parameter index | getMethodParameterType | {
"repo_name": "EPapadopoulou/PersoNIS",
"path": "api/android/external2/src/main/java/org/societies/android/api/utilities/ServiceMethodTranslator.java",
"license": "bsd-2-clause",
"size": 20272
} | [
"org.societies.utilities.DBC"
] | import org.societies.utilities.DBC; | import org.societies.utilities.*; | [
"org.societies.utilities"
] | org.societies.utilities; | 1,727,886 |
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
SerialUtils.writeStroke(this.groupStroke, stream);
SerialUtils.writePaint(this.groupPaint, stream);
}
| void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtils.writeStroke(this.groupStroke, stream); SerialUtils.writePaint(this.groupPaint, stream); } | /**
* Provides serialization support.
*
* @param stream the output stream.
*
* @throws IOException if there is an I/O error.
*/ | Provides serialization support | writeObject | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/chart/renderer/category/MinMaxCategoryRenderer.java",
"license": "lgpl-2.1",
"size": 20286
} | [
"java.io.IOException",
"java.io.ObjectOutputStream",
"org.jfree.chart.util.SerialUtils"
] | import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.chart.util.SerialUtils; | import java.io.*; import org.jfree.chart.util.*; | [
"java.io",
"org.jfree.chart"
] | java.io; org.jfree.chart; | 593,327 |
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
NavUtils.navigateUpFromSameTask(this);
return true;
}
return super.onOptionsItemSelected(item);
} | boolean function(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; } return super.onOptionsItemSelected(item); } | /**
* Implements a up button to navigate one level up in the
* app structure
*/ | Implements a up button to navigate one level up in the app structure | onOptionsItemSelected | {
"repo_name": "bradleyjsimons/CounterApp",
"path": "src/ca/ualberta/ca/simons_counter/CounterListActivity.java",
"license": "apache-2.0",
"size": 12125
} | [
"android.support.v4.app.NavUtils",
"android.view.MenuItem"
] | import android.support.v4.app.NavUtils; import android.view.MenuItem; | import android.support.v4.app.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 2,686,074 |
protected void copyPropertyChangeListenersFrom(String propertyName, AbstractDataObject that) {
if ((that == null) || (that == this)) return;
for (PropertyChangeListener pcl : that.getPropertyChangeSupport().getPropertyChangeListeners(propertyName)) {
addPropertyChangeListener(propertyNa... | void function(String propertyName, AbstractDataObject that) { if ((that == null) (that == this)) return; for (PropertyChangeListener pcl : that.getPropertyChangeSupport().getPropertyChangeListeners(propertyName)) { addPropertyChangeListener(propertyName, pcl); } } | /**
* Copies the property change listeners for the named property from the
* given data object, adding them all to this data object. This is a rather
* weird method, which was created when trying to support a rather weird
* feature of the old SPTargetList.
*/ | Copies the property change listeners for the named property from the given data object, adding them all to this data object. This is a rather weird method, which was created when trying to support a rather weird feature of the old SPTargetList | copyPropertyChangeListenersFrom | {
"repo_name": "spakzad/ocs",
"path": "bundle/edu.gemini.pot/src/main/java/edu/gemini/spModel/data/AbstractDataObject.java",
"license": "bsd-3-clause",
"size": 11313
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 770,182 |
public static CommandResult execCommand(String[] commands, boolean isRoot, boolean isNeedResultMsg) {
int result = -1;
if (commands == null || commands.length == 0) {
return new CommandResult(result, null, null);
}
Process process = null;
InputStream successResul... | static CommandResult function(String[] commands, boolean isRoot, boolean isNeedResultMsg) { int result = -1; if (commands == null commands.length == 0) { return new CommandResult(result, null, null); } Process process = null; InputStream successResult = null; InputStream errorResult = null; StringBuilder successMsg = n... | /**
* execute shell commands
*
* @param commands command array
* @param isRoot whether need to run with root
* @param isNeedResultMsg whether need result msg
* @return <ul>
* <li>if isNeedResultMsg is false, {@link CommandResult#successMsg} is null and
* {@link Co... | execute shell commands | execCommand | {
"repo_name": "wvqusrtg/Development-Java-Tools",
"path": "src/tools/ShellUtils.java",
"license": "apache-2.0",
"size": 7782
} | [
"java.io.DataOutputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,669,188 |
public void cleanUp() {
if (producers instanceof LRUCache) {
LRUCache<String, Producer> cache = (LRUCache<String, Producer>) producers;
cache.cleanUp();
}
} | void function() { if (producers instanceof LRUCache) { LRUCache<String, Producer> cache = (LRUCache<String, Producer>) producers; cache.cleanUp(); } } | /**
* Cleanup the cache (purging stale entries)
*/ | Cleanup the cache (purging stale entries) | cleanUp | {
"repo_name": "neoramon/camel",
"path": "camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java",
"license": "apache-2.0",
"size": 30925
} | [
"org.apache.camel.Producer",
"org.apache.camel.util.LRUCache"
] | import org.apache.camel.Producer; import org.apache.camel.util.LRUCache; | import org.apache.camel.*; import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,970,320 |
public void setTransacted(boolean transacted) {
if (transacted) {
setAcknowledgementMode(SessionAcknowledgementType.SESSION_TRANSACTED);
}
this.transacted = transacted;
} | void function(boolean transacted) { if (transacted) { setAcknowledgementMode(SessionAcknowledgementType.SESSION_TRANSACTED); } this.transacted = transacted; } | /**
* Enable/disable flag for transactions
*
* @param transacted true if transacted, otherwise false
*/ | Enable/disable flag for transactions | setTransacted | {
"repo_name": "logzio/camel",
"path": "components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsEndpoint.java",
"license": "apache-2.0",
"size": 15013
} | [
"org.apache.camel.component.sjms.jms.SessionAcknowledgementType"
] | import org.apache.camel.component.sjms.jms.SessionAcknowledgementType; | import org.apache.camel.component.sjms.jms.*; | [
"org.apache.camel"
] | org.apache.camel; | 613,478 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginHierarchicalNamespaceMigration(
String resourceGroupName, String accountName, String requestType, Context context) {
return beginHierarchicalNamespaceMigrationAsync(resourceGroupName, accou... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<Void>, Void> function( String resourceGroupName, String accountName, String requestType, Context context) { return beginHierarchicalNamespaceMigrationAsync(resourceGroupName, accountName, requestType, context) .getSyncPoller(); } | /**
* Live Migration of storage account to enable Hns.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case
* insensitive.
* @param accountName The name of the storage account within the specified resource group. Storage account names
... | Live Migration of storage account to enable Hns | beginHierarchicalNamespaceMigration | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java",
"license": "mit",
"size": 213141
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 2,333,724 |
public static HttpServer2.Builder httpServerTemplateForRM(Configuration conf,
final InetSocketAddress httpAddr, final InetSocketAddress httpsAddr,
String name) throws IOException {
HttpServer2.Builder builder = new HttpServer2.Builder().setName(name)
.setConf(conf).setSecurityEnabled(false);
... | static HttpServer2.Builder function(Configuration conf, final InetSocketAddress httpAddr, final InetSocketAddress httpsAddr, String name) throws IOException { HttpServer2.Builder builder = new HttpServer2.Builder().setName(name) .setConf(conf).setSecurityEnabled(false); if (httpAddr.getPort() == 0) { builder.setFindPor... | /**
* Return a HttpServer.Builder that the journalnode / namenode / secondary
* namenode can use to initialize their HTTP / HTTPS server.
*
* @param conf configuration object
* @param httpAddr HTTP address
* @param httpsAddr HTTPS address
* @param name Name of the server
* @throws IOException f... | Return a HttpServer.Builder that the journalnode / namenode / secondary namenode can use to initialize their HTTP / HTTPS server | httpServerTemplateForRM | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java",
"license": "apache-2.0",
"size": 57905
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.URI",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.http.HttpServer2",
"org.apache.hadoop.yarn.webapp.WebApps"
] | import java.io.IOException; import java.net.InetSocketAddress; import java.net.URI; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.http.HttpServer2; import org.apache.hadoop.yarn.webapp.WebApps; | import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.http.*; import org.apache.hadoop.yarn.webapp.*; | [
"java.io",
"java.net",
"org.apache.hadoop"
] | java.io; java.net; org.apache.hadoop; | 1,094,428 |
public FunctionType createFunctionTypeWithVarArgs(
JSType returnType, List<JSType> parameterTypes) {
return createFunctionType(
returnType, createParametersWithVarArgs(parameterTypes));
} | FunctionType function( JSType returnType, List<JSType> parameterTypes) { return createFunctionType( returnType, createParametersWithVarArgs(parameterTypes)); } | /**
* Creates a function type. The last parameter type of the function is
* considered a variable length argument.
*
* @param returnType the function's return type
* @param parameterTypes the parameters' types
*/ | Creates a function type. The last parameter type of the function is considered a variable length argument | createFunctionTypeWithVarArgs | {
"repo_name": "robbert/closure-compiler",
"path": "src/com/google/javascript/rhino/jstype/JSTypeRegistry.java",
"license": "apache-2.0",
"size": 68593
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 979,038 |
R processAudio(Asset asset, ResourceResolver resourceResolver, File tempFile, ExecutableLocator locator, File workingDir, A args)
throws AudioException;
} | R processAudio(Asset asset, ResourceResolver resourceResolver, File tempFile, ExecutableLocator locator, File workingDir, A args) throws AudioException; } | /**
* Process a file given an FFMpeg environment.
*
* @param asset an Asset
* @param resourceResolver a ResourceResolver
* @param tempFile the Asset's original rendition as a File
* @param locator the FFMpeg Executable Locator
* @param workingDir a working ... | Process a file given an FFMpeg environment | processAudio | {
"repo_name": "badvision/acs-aem-commons",
"path": "bundle/src/main/java/com/adobe/acs/commons/dam/audio/impl/AudioHelper.java",
"license": "apache-2.0",
"size": 2494
} | [
"com.day.cq.dam.api.Asset",
"com.day.cq.dam.handler.ffmpeg.ExecutableLocator",
"java.io.File",
"org.apache.sling.api.resource.ResourceResolver"
] | import com.day.cq.dam.api.Asset; import com.day.cq.dam.handler.ffmpeg.ExecutableLocator; import java.io.File; import org.apache.sling.api.resource.ResourceResolver; | import com.day.cq.dam.api.*; import com.day.cq.dam.handler.ffmpeg.*; import java.io.*; import org.apache.sling.api.resource.*; | [
"com.day.cq",
"java.io",
"org.apache.sling"
] | com.day.cq; java.io; org.apache.sling; | 1,508,630 |
public Set<String> getIdCandidates(RecognizedEntity recognizedEntity){
Set<String> candidates = new HashSet<String>();
IdentificationStatus identificationStatus = identificationStatusMap.get(recognizedEntity);
if(identificationStatus!=null){
candidates = identificationStatus.getIdCandidates();
}
return ... | Set<String> function(RecognizedEntity recognizedEntity){ Set<String> candidates = new HashSet<String>(); IdentificationStatus identificationStatus = identificationStatusMap.get(recognizedEntity); if(identificationStatus!=null){ candidates = identificationStatus.getIdCandidates(); } return candidates; } | /**
* Returns a set of candidate ids for a recognized entity.
* */ | Returns a set of candidate ids for a recognized entity | getIdCandidates | {
"repo_name": "miroculus/GNAT",
"path": "src/gnat/representation/Context.java",
"license": "bsd-2-clause",
"size": 30321
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,287,980 |
public int connect(JSONObject vnfmObj,String authModel) {
LOG.info("function=connect, msg=enter connect function.");
ConnectInfo info = new ConnectInfo(vnfmObj.getString("url"), vnfmObj.getString("userName"),
vnfmObj.getString("password"), authModel);
HttpMethod httpMethod =... | int function(JSONObject vnfmObj,String authModel) { LOG.info(STR); ConnectInfo info = new ConnectInfo(vnfmObj.getString("url"), vnfmObj.getString(STR), vnfmObj.getString(STR), authModel); HttpMethod httpMethod = null; int statusCode = Constant.INTERNAL_EXCEPTION; try { httpMethod = new HttpRequests.Builder(info.getAuth... | /**
* Make connection
* <br>
*
* @param vnfmObj
* @return
* @since NFVO 0.5
*/ | Make connection | connect | {
"repo_name": "open-o/nfvo",
"path": "drivers/vnfm/svnfm/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/openo/nfvo/vnfmadapter/service/csm/connect/ConnectMgrVnfm.java",
"license": "apache-2.0",
"size": 6075
} | [
"java.io.IOException",
"net.sf.json.JSONException",
"net.sf.json.JSONObject",
"org.apache.commons.httpclient.Header",
"org.apache.commons.httpclient.HttpMethod",
"org.apache.commons.httpclient.HttpStatus",
"org.openo.nfvo.vnfmadapter.common.VnfmException",
"org.openo.nfvo.vnfmadapter.service.constant.... | import java.io.IOException; import net.sf.json.JSONException; import net.sf.json.JSONObject; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.HttpStatus; import org.openo.nfvo.vnfmadapter.common.VnfmException; import org.openo.nfvo.vnfmad... | import java.io.*; import net.sf.json.*; import org.apache.commons.httpclient.*; import org.openo.nfvo.vnfmadapter.common.*; import org.openo.nfvo.vnfmadapter.service.constant.*; import org.openo.nfvo.vnfmadapter.service.csm.api.*; | [
"java.io",
"net.sf.json",
"org.apache.commons",
"org.openo.nfvo"
] | java.io; net.sf.json; org.apache.commons; org.openo.nfvo; | 2,050,590 |
public static <T> SimpleTemplate<T> template(Class<? extends T> cl, Template template, List<?> args) {
return simpleTemplate(cl, template, args);
} | static <T> SimpleTemplate<T> function(Class<? extends T> cl, Template template, List<?> args) { return simpleTemplate(cl, template, args); } | /**
* Create a new Template expression
*
* @param cl type of expression
* @param template template
* @param args template parameters
* @return template expression
*/ | Create a new Template expression | template | {
"repo_name": "johnktims/querydsl",
"path": "querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java",
"license": "apache-2.0",
"size": 74346
} | [
"com.querydsl.core.types.Template",
"java.util.List"
] | import com.querydsl.core.types.Template; import java.util.List; | import com.querydsl.core.types.*; import java.util.*; | [
"com.querydsl.core",
"java.util"
] | com.querydsl.core; java.util; | 164,301 |
public static void init(ServerConf serverConf) {
TransformFunctionFactory.init(
ArrayUtils.addAll(TransformUtils.getBuiltInTransform(), serverConf.getTransformFunctions()));
} | static void function(ServerConf serverConf) { TransformFunctionFactory.init( ArrayUtils.addAll(TransformUtils.getBuiltInTransform(), serverConf.getTransformFunctions())); } | /**
* This method initializes the transform factory containing built-in functions
* as well as functions specified in the server configuration.
*
* @param serverConf Server configuration
*/ | This method initializes the transform factory containing built-in functions as well as functions specified in the server configuration | init | {
"repo_name": "sajavadi/pinot",
"path": "pinot-server/src/main/java/com/linkedin/pinot/server/starter/ServerBuilder.java",
"license": "apache-2.0",
"size": 7171
} | [
"com.linkedin.pinot.core.operator.transform.TransformUtils",
"com.linkedin.pinot.core.operator.transform.function.TransformFunctionFactory",
"com.linkedin.pinot.server.conf.ServerConf",
"org.apache.commons.lang3.ArrayUtils"
] | import com.linkedin.pinot.core.operator.transform.TransformUtils; import com.linkedin.pinot.core.operator.transform.function.TransformFunctionFactory; import com.linkedin.pinot.server.conf.ServerConf; import org.apache.commons.lang3.ArrayUtils; | import com.linkedin.pinot.core.operator.transform.*; import com.linkedin.pinot.core.operator.transform.function.*; import com.linkedin.pinot.server.conf.*; import org.apache.commons.lang3.*; | [
"com.linkedin.pinot",
"org.apache.commons"
] | com.linkedin.pinot; org.apache.commons; | 1,150,927 |
@Override
public NugetPackage parse(InputStream stream) throws NuspecParseException {
try {
final DocumentBuilder db = XmlUtils.buildSecureDocumentBuilder();
final Document d = db.parse(stream);
final XPath xpath = XPathFactory.newInstance().newXPath();
f... | NugetPackage function(InputStream stream) throws NuspecParseException { try { final DocumentBuilder db = XmlUtils.buildSecureDocumentBuilder(); final Document d = db.parse(stream); final XPath xpath = XPathFactory.newInstance().newXPath(); final NugetPackage nuspec = new NugetPackage(); if (xpath.evaluate(STR, d, XPath... | /**
* Parse an input stream and return the resulting {@link NugetPackage}.
*
* @param stream the input stream to parse
* @return the populated bean
* @throws NuspecParseException when an exception occurs
*/ | Parse an input stream and return the resulting <code>NugetPackage</code> | parse | {
"repo_name": "jeremylong/DependencyCheck",
"path": "core/src/main/java/org/owasp/dependencycheck/data/nuget/XPathNuspecParser.java",
"license": "apache-2.0",
"size": 3725
} | [
"java.io.IOException",
"java.io.InputStream",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.ParserConfigurationException",
"javax.xml.xpath.XPath",
"javax.xml.xpath.XPathConstants",
"javax.xml.xpath.XPathExpressionException",
"javax.xml.xpath.XPathFactory",
"org.owasp.dependencycheck.utils... | import java.io.IOException; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.o... | import java.io.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.owasp.dependencycheck.utils.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.owasp.dependencycheck",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.owasp.dependencycheck; org.w3c.dom; org.xml.sax; | 86,023 |
@SuppressWarnings("deprecation")
public static Time valueOf(LocalTime time) {
return new Time(time.getHour(), time.getMinute(), time.getSecond());
} | @SuppressWarnings(STR) static Time function(LocalTime time) { return new Time(time.getHour(), time.getMinute(), time.getSecond()); } | /**
* Obtains an instance of {@code Time} from a {@link LocalTime} object
* with the same hour, minute and second time value as the given
* {@code LocalTime}.
*
* @param time a {@code LocalTime} to convert
* @return a {@code Time} object
* @exception NullPointerException if {@code tim... | Obtains an instance of Time from a <code>LocalTime</code> object with the same hour, minute and second time value as the given LocalTime | valueOf | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/java/sql/Time.java",
"license": "mit",
"size": 9428
} | [
"java.time.LocalTime"
] | import java.time.LocalTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,733,611 |
@Test
void wrapFileLinksExpandFile() throws IOException {
when(layoutFormatterPreferences.getFileLinkPreferences()).thenReturn(
new FileLinkPreferences(Collections.emptyList(), Collections.singletonList("src/test/resources/pdfs/")));
BibEntry entry = new BibEntry(StandardEntryTyp... | void wrapFileLinksExpandFile() throws IOException { when(layoutFormatterPreferences.getFileLinkPreferences()).thenReturn( new FileLinkPreferences(Collections.emptyList(), Collections.singletonList(STR))); BibEntry entry = new BibEntry(StandardEntryType.Article); entry.addFile(new LinkedFile(STR, STR, "PDF")); String la... | /**
* Test for http://discourse.jabref.org/t/the-wrapfilelinks-formatter/172 (the example in the help files)
*/ | Test for HREF (the example in the help files) | wrapFileLinksExpandFile | {
"repo_name": "zellerdev/jabref",
"path": "src/test/java/org/jabref/logic/layout/LayoutTest.java",
"license": "mit",
"size": 6438
} | [
"java.io.File",
"java.io.IOException",
"java.util.Collections",
"org.jabref.logic.layout.format.FileLinkPreferences",
"org.jabref.model.entry.BibEntry",
"org.jabref.model.entry.LinkedFile",
"org.jabref.model.entry.types.StandardEntryType",
"org.junit.jupiter.api.Assertions",
"org.mockito.Mockito"
] | import java.io.File; import java.io.IOException; import java.util.Collections; import org.jabref.logic.layout.format.FileLinkPreferences; import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.LinkedFile; import org.jabref.model.entry.types.StandardEntryType; import org.junit.jupiter.api.Assertions; impo... | import java.io.*; import java.util.*; import org.jabref.logic.layout.format.*; import org.jabref.model.entry.*; import org.jabref.model.entry.types.*; import org.junit.jupiter.api.*; import org.mockito.*; | [
"java.io",
"java.util",
"org.jabref.logic",
"org.jabref.model",
"org.junit.jupiter",
"org.mockito"
] | java.io; java.util; org.jabref.logic; org.jabref.model; org.junit.jupiter; org.mockito; | 2,828,979 |
public void setIntactOrganisms(String taxonIds) {
this.taxonIds = new HashSet<String>(Arrays.asList(StringUtil.split(taxonIds, " ")));
}
class PsiHandler extends DefaultHandler
{
private Map<String, ExperimentHolder> experimentIds
= new HashMap<String, ExperimentHolder>... | void function(String taxonIds) { this.taxonIds = new HashSet<String>(Arrays.asList(StringUtil.split(taxonIds, " "))); } class PsiHandler extends DefaultHandler { private Map<String, ExperimentHolder> experimentIds = new HashMap<String, ExperimentHolder>(); private InteractionHolder holder = null; private ExperimentHold... | /**
* Sets the list of taxonIds that should be imported if using split input files.
*
* @param taxonIds a space-separated list of taxonIds
*/ | Sets the list of taxonIds that should be imported if using split input files | setIntactOrganisms | {
"repo_name": "drhee/toxoMine",
"path": "bio/sources/psi/main/src/org/intermine/bio/dataconversion/PsiConverter.java",
"license": "lgpl-2.1",
"size": 47642
} | [
"java.util.Arrays",
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"java.util.Stack",
"org.intermine.util.StringUtil",
"org.intermine.xml.full.Item",
"org.xml.sax.helpers.DefaultHandler"
] | import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.Stack; import org.intermine.util.StringUtil; import org.intermine.xml.full.Item; import org.xml.sax.helpers.DefaultHandler; | import java.util.*; import org.intermine.util.*; import org.intermine.xml.full.*; import org.xml.sax.helpers.*; | [
"java.util",
"org.intermine.util",
"org.intermine.xml",
"org.xml.sax"
] | java.util; org.intermine.util; org.intermine.xml; org.xml.sax; | 277,752 |
@CanIgnoreReturnValue
public Builder<K, V> put(K key, V value) {
checkEntryNotNull(key, value);
builderMultimap.put(key, value);
return this;
} | Builder<K, V> function(K key, V value) { checkEntryNotNull(key, value); builderMultimap.put(key, value); return this; } | /**
* Adds a key-value mapping to the built multimap.
*/ | Adds a key-value mapping to the built multimap | put | {
"repo_name": "DavesMan/guava",
"path": "guava/src/com/google/common/collect/ImmutableMultimap.java",
"license": "apache-2.0",
"size": 22902
} | [
"com.google.common.collect.CollectPreconditions"
] | import com.google.common.collect.CollectPreconditions; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,668,799 |
public void addChild(XslNode node)
throws XslParseException
{
throw error(L.l("element <{0}> is not allowed in <{1}>.",
node.getTagName(), getTagName()));
} | void function(XslNode node) throws XslParseException { throw error(L.l(STR, node.getTagName(), getTagName())); } | /**
* Adds a child.
*/ | Adds a child | addChild | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/xsl/java/XslValueOf.java",
"license": "gpl-2.0",
"size": 3190
} | [
"com.caucho.xsl.XslParseException"
] | import com.caucho.xsl.XslParseException; | import com.caucho.xsl.*; | [
"com.caucho.xsl"
] | com.caucho.xsl; | 1,716,722 |
synchronized public void addDTM(DTM dtm, int id, int offset)
{
if(id>=IDENT_MAX_DTMS)
{
// TODO: %REVIEW% Not really the right error message.
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); //"No mo... | synchronized void function(DTM dtm, int id, int offset) { if(id>=IDENT_MAX_DTMS) { throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); } int oldlen=m_dtms.length; if(oldlen<=id) { int newlen=Math.min((id+256),IDENT_MAX_DTMS); DTM new_m_dtms[] = new DTM[newlen]; System.array... | /**
* Add a DTM to the DTM table.
*
* @param dtm Should be a valid reference to a DTM.
* @param id Integer DTM ID to be bound to this DTM.
* @param offset Integer addressing offset. The internal DTM Node ID is
* obtained by adding this offset to the node-number field of the
* public DTM Handle. For... | Add a DTM to the DTM table | addDTM | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java",
"license": "apache-2.0",
"size": 32131
} | [
"com.sun.org.apache.xml.internal.dtm.DTMException",
"com.sun.org.apache.xml.internal.res.XMLErrorResources",
"com.sun.org.apache.xml.internal.res.XMLMessages"
] | import com.sun.org.apache.xml.internal.dtm.DTMException; import com.sun.org.apache.xml.internal.res.XMLErrorResources; import com.sun.org.apache.xml.internal.res.XMLMessages; | import com.sun.org.apache.xml.internal.dtm.*; import com.sun.org.apache.xml.internal.res.*; | [
"com.sun.org"
] | com.sun.org; | 256,027 |
@Deprecated
public static InetSocketAddress createSocketAddr(String target
) throws IOException {
return NetUtils.createSocketAddr(target);
}
public DatanodeProtocol namenode = null;
public FSDatasetInterface data = null;
public DatanodeRegistration ... | static InetSocketAddress function(String target ) throws IOException { return NetUtils.createSocketAddr(target); } public DatanodeProtocol namenode = null; public FSDatasetInterface data = null; public DatanodeRegistration dnRegistration = null; volatile boolean shouldRun = true; private LinkedList<Block> receivedBlock... | /**
* Use {@link NetUtils#createSocketAddr(String)} instead.
*/ | Use <code>NetUtils#createSocketAddr(String)</code> instead | createSocketAddr | {
"repo_name": "zyguan/HDFS-503-on-0.20.2",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 59581
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.Map",
"java.util.Random",
"java.util.concurrent.atomic.AtomicInteger",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.server.datanode.metrics.DataNodeMetrics",
"org.apache... | import java.io.IOException; import java.net.InetSocketAddress; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.datanode.metrics.DataN... | import java.io.*; import java.net.*; import java.util.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.metrics.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.http.*; import org.apache.hadoop.ipc.*; import org.a... | [
"java.io",
"java.net",
"java.util",
"org.apache.hadoop"
] | java.io; java.net; java.util; org.apache.hadoop; | 2,799,634 |
public void drawOutline(Graphics2D g2, CategoryPlot plot,
Rectangle2D dataArea) {
float x0 = (float) dataArea.getX();
float x1 = x0 + (float) Math.abs(this.xOffset);
float x3 = (float) dataArea.getMaxX();
float x2 = x3 - (float) Math.abs(this.xOffset);
... | void function(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea) { float x0 = (float) dataArea.getX(); float x1 = x0 + (float) Math.abs(this.xOffset); float x3 = (float) dataArea.getMaxX(); float x2 = x3 - (float) Math.abs(this.xOffset); float y0 = (float) dataArea.getMaxY(); float y1 = y0 - (float) Math.abs(this.... | /**
* Draws the outline for the plot.
*
* @param g2 the graphics device.
* @param plot the plot.
* @param dataArea the area inside the axes.
*/ | Draws the outline for the plot | drawOutline | {
"repo_name": "opensim-org/opensim-gui",
"path": "Gui/opensim/jfreechart/src/org/jfree/chart/renderer/category/BarRenderer3D.java",
"license": "apache-2.0",
"size": 28796
} | [
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.Stroke",
"java.awt.geom.GeneralPath",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.plot.CategoryPlot"
] | import java.awt.Graphics2D; import java.awt.Paint; import java.awt.Stroke; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; import org.jfree.chart.plot.CategoryPlot; | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.plot.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 690,532 |
@Override
public boolean updateUserModel(String username, UserModel model) {
UserModel originalUser = null;
try {
read();
originalUser = users.remove(username.toLowerCase());
users.put(model.username.toLowerCase(), model);
// null check on "final" teams because JSON-sourced UserModel
// c... | boolean function(String username, UserModel model) { UserModel originalUser = null; try { read(); originalUser = users.remove(username.toLowerCase()); users.put(model.username.toLowerCase(), model); if (model.teams != null) { for (TeamModel team : model.teams) { TeamModel t = teams.get(team.name.toLowerCase()); if (t =... | /**
* Updates/writes and replaces a complete user object keyed by username.
* This method allows for renaming a user.
*
* @param username
* the old username
* @param model
* the user object to use for username
* @return true if update is successful
*/ | Updates/writes and replaces a complete user object keyed by username. This method allows for renaming a user | updateUserModel | {
"repo_name": "pdinc-oss/gitblit",
"path": "src/com/gitblit/ConfigUserService.java",
"license": "apache-2.0",
"size": 25525
} | [
"com.gitblit.models.TeamModel",
"com.gitblit.models.UserModel",
"java.text.MessageFormat"
] | import com.gitblit.models.TeamModel; import com.gitblit.models.UserModel; import java.text.MessageFormat; | import com.gitblit.models.*; import java.text.*; | [
"com.gitblit.models",
"java.text"
] | com.gitblit.models; java.text; | 1,675,326 |
@Deprecated
static public InputStream open(String fileName, ExecType execType, DataStorage storage) throws IOException {
fileName = checkDefaultPrefix(execType, fileName);
if (!fileName.startsWith(LOCAL_PREFIX)) {
ElementDescriptor elem = storage.asElement(fullPath(fileName, storage)... | static InputStream function(String fileName, ExecType execType, DataStorage storage) throws IOException { fileName = checkDefaultPrefix(execType, fileName); if (!fileName.startsWith(LOCAL_PREFIX)) { ElementDescriptor elem = storage.asElement(fullPath(fileName, storage)); return openDFSFile(elem); } else { fileName = fi... | /**
* This function returns an input stream to a local file system file or
* a file residing on Hadoop's DFS
* @param fileName The filename to open
* @param execType execType indicating whether executing in local mode or MapReduce mode (Hadoop)
* @param storage The DataStorage object used to op... | This function returns an input stream to a local file system file or a file residing on Hadoop's DFS | open | {
"repo_name": "simplegeo/hadoop-pig",
"path": "src/org/apache/pig/impl/io/FileLocalizer.java",
"license": "apache-2.0",
"size": 28028
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.pig.ExecType",
"org.apache.pig.backend.datastorage.DataStorage",
"org.apache.pig.backend.datastorage.ElementDescriptor"
] | import java.io.IOException; import java.io.InputStream; import org.apache.pig.ExecType; import org.apache.pig.backend.datastorage.DataStorage; import org.apache.pig.backend.datastorage.ElementDescriptor; | import java.io.*; import org.apache.pig.*; import org.apache.pig.backend.datastorage.*; | [
"java.io",
"org.apache.pig"
] | java.io; org.apache.pig; | 1,883,188 |
if (!mLockedBlockIds.containsKey(blockId)) {
StorageDir storageDir = mWorkerStorage.lockBlock(blockId, mUserId);
if (storageDir != null) {
Set<Integer> lockIdSet = new HashSet<Integer>();
lockIdSet.add(blockLockId);
mLockedBlockIds.put(blockId, lockIdSet);
mLockedBlockIdToSt... | if (!mLockedBlockIds.containsKey(blockId)) { StorageDir storageDir = mWorkerStorage.lockBlock(blockId, mUserId); if (storageDir != null) { Set<Integer> lockIdSet = new HashSet<Integer>(); lockIdSet.add(blockLockId); mLockedBlockIds.put(blockId, lockIdSet); mLockedBlockIdToStorageDir.put(blockId, storageDir); return sto... | /**
* Lock a block with specified lock id.
*
* @param blockId The id of the block.
* @param blockLockId The lock id of the block
* @return the StorageDir in which this block is locked.
*/ | Lock a block with specified lock id | lock | {
"repo_name": "carsonwang/tachyon",
"path": "core/src/main/java/tachyon/worker/BlocksLocker.java",
"license": "apache-2.0",
"size": 3547
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,465,160 |
final synchronized void _sendCommand(byte cmd) throws IOException
{
_output_.write(TelnetCommand.IAC);
_output_.write(cmd);
_output_.flush();
} | final synchronized void _sendCommand(byte cmd) throws IOException { _output_.write(TelnetCommand.IAC); _output_.write(cmd); _output_.flush(); } | /**
* Sends a command, automatically adds IAC prefix and flushes the output.
*
* @param cmd - command data to be sent
* @throws IOException - Exception in I/O.
* @since 3.0
*/ | Sends a command, automatically adds IAC prefix and flushes the output | _sendCommand | {
"repo_name": "grtlinux/KIEA_JAVA7",
"path": "KIEA_JAVA7/src/tain/kr/com/commons/net/v01/telnet/Telnet.java",
"license": "gpl-3.0",
"size": 33948
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,378,425 |
public static TableDataListOption startIndex(long index) {
checkArgument(index >= 0);
return new TableDataListOption(BigQueryRpc.Option.START_INDEX, index);
}
}
class JobListOption extends Option {
private static final long serialVersionUID = -8207122131226481423L;
private JobListO... | static TableDataListOption function(long index) { checkArgument(index >= 0); return new TableDataListOption(BigQueryRpc.Option.START_INDEX, index); } } class JobListOption extends Option { private static final long serialVersionUID = -8207122131226481423L; private JobListOption(BigQueryRpc.Option option, Object value) ... | /**
* Returns an option that sets the zero-based index of the row from which to start listing table
* data.
*/ | Returns an option that sets the zero-based index of the row from which to start listing table data | startIndex | {
"repo_name": "googleapis/java-bigquery",
"path": "google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java",
"license": "apache-2.0",
"size": 55895
} | [
"com.google.cloud.bigquery.spi.v2.BigQueryRpc",
"com.google.common.base.Preconditions"
] | import com.google.cloud.bigquery.spi.v2.BigQueryRpc; import com.google.common.base.Preconditions; | import com.google.cloud.bigquery.spi.v2.*; import com.google.common.base.*; | [
"com.google.cloud",
"com.google.common"
] | com.google.cloud; com.google.common; | 2,755,374 |
void quickRecycleScrapView(View view) {
final ViewHolder holder = getChildViewHolderInt(view);
holder.mScrapContainer = null;
holder.clearReturnedFromScrapFlag();
recycleViewHolderInternal(holder);
} | void quickRecycleScrapView(View view) { final ViewHolder holder = getChildViewHolderInt(view); holder.mScrapContainer = null; holder.clearReturnedFromScrapFlag(); recycleViewHolderInternal(holder); } | /**
* Used as a fast path for unscrapping and recycling a view during a bulk operation.
* The caller must call {@link #clearScrap()} when it's done to update the recycler's
* internal bookkeeping.
*/ | Used as a fast path for unscrapping and recycling a view during a bulk operation. The caller must call <code>#clearScrap()</code> when it's done to update the recycler's internal bookkeeping | quickRecycleScrapView | {
"repo_name": "devDavide/Decisiongram",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 438498
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 659,814 |
public void testNoSuchElementException() throws RepositoryException {
NodeIterator it = execute(testPath + "//*", Query.XPATH).getNodes();
while (it.hasNext()) {
it.nextNode();
}
try {
it.nextNode();
fail("nextNode() must throw a NoSuchElementExcep... | void function() throws RepositoryException { NodeIterator it = execute(testPath + STRnextNode() must throw a NoSuchElementException when no nodes are available"); } catch (NoSuchElementException e) { } } | /**
* Tests if a {@link java.util.NoSuchElementException} is thrown when {@link
* javax.jcr.NodeIterator#nextNode()} is called and there are no more nodes
* available.
*/ | Tests if a <code>java.util.NoSuchElementException</code> is thrown when <code>javax.jcr.NodeIterator#nextNode()</code> is called and there are no more nodes available | testNoSuchElementException | {
"repo_name": "jalkanen/Priha",
"path": "tests/tck/org/apache/jackrabbit/test/api/query/QueryResultNodeIteratorTest.java",
"license": "apache-2.0",
"size": 5574
} | [
"java.util.NoSuchElementException",
"javax.jcr.NodeIterator",
"javax.jcr.RepositoryException"
] | import java.util.NoSuchElementException; import javax.jcr.NodeIterator; import javax.jcr.RepositoryException; | import java.util.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 620,341 |
public void setMycoplasmaStatus(String
mycoplasmaStatus) {
this.mycoplasmaStatus = mycoplasmaStatus;
}
private Integer passageNumber;
@Column(name = "PASSAGENUMBER", length = EntityWithId.COLUMNLENGTH)
| void function(String mycoplasmaStatus) { this.mycoplasmaStatus = mycoplasmaStatus; } private Integer passageNumber; @Column(name = STR, length = EntityWithId.COLUMNLENGTH) | /**
* Sets the value of mycoplasmaStatus attribute.
* @param mycoplasmaStatus .
**/ | Sets the value of mycoplasmaStatus attribute | setMycoplasmaStatus | {
"repo_name": "NCIP/calims",
"path": "calims2-model/src/java/gov/nih/nci/calims2/domain/inventory/CellSpecimen.java",
"license": "bsd-3-clause",
"size": 8019
} | [
"gov.nih.nci.calims2.domain.interfaces.EntityWithId",
"javax.persistence.Column"
] | import gov.nih.nci.calims2.domain.interfaces.EntityWithId; import javax.persistence.Column; | import gov.nih.nci.calims2.domain.interfaces.*; import javax.persistence.*; | [
"gov.nih.nci",
"javax.persistence"
] | gov.nih.nci; javax.persistence; | 483,706 |
@Override
public void deleteWikiPage(WikiPageKey key) throws SynapseException {
ValidateArgument.required(key, "key");
String uri = createWikiURL(key);
deleteUri(getRepoEndpoint(), uri);
} | void function(WikiPageKey key) throws SynapseException { ValidateArgument.required(key, "key"); String uri = createWikiURL(key); deleteUri(getRepoEndpoint(), uri); } | /**
* Delete a WikiPage
*
* @param key
* @throws SynapseException
*/ | Delete a WikiPage | deleteWikiPage | {
"repo_name": "zimingd/Synapse-Repository-Services",
"path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java",
"license": "apache-2.0",
"size": 229293
} | [
"org.sagebionetworks.client.exceptions.SynapseException",
"org.sagebionetworks.repo.model.dao.WikiPageKey",
"org.sagebionetworks.util.ValidateArgument"
] | import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.dao.WikiPageKey; import org.sagebionetworks.util.ValidateArgument; | import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.dao.*; import org.sagebionetworks.util.*; | [
"org.sagebionetworks.client",
"org.sagebionetworks.repo",
"org.sagebionetworks.util"
] | org.sagebionetworks.client; org.sagebionetworks.repo; org.sagebionetworks.util; | 698,380 |
public SharesChangeLeaseHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
} | SharesChangeLeaseHeaders function(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; } | /**
* Set the dateProperty property: The Date property.
*
* @param dateProperty the dateProperty value to set.
* @return the SharesChangeLeaseHeaders object itself.
*/ | Set the dateProperty property: The Date property | setDateProperty | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-file-share/src/main/java/com/azure/storage/file/share/implementation/models/SharesChangeLeaseHeaders.java",
"license": "mit",
"size": 5783
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 2,187,221 |
private void recalculateChecksum(int errBlkIndex, long blockLength)
throws IOException {
LOG.debug("Recalculate checksum for the missing/failed block index {}",
errBlkIndex);
byte[] errIndices = new byte[1];
errIndices[0] = (byte) errBlkIndex;
StripedReconstructionInfo str... | void function(int errBlkIndex, long blockLength) throws IOException { LOG.debug(STR, errBlkIndex); byte[] errIndices = new byte[1]; errIndices[0] = (byte) errBlkIndex; StripedReconstructionInfo stripedReconInfo = new StripedReconstructionInfo( blockGroup, ecPolicy, blockIndices, datanodes, errIndices); final StripedBlo... | /**
* Reconstruct this data block and recalculate checksum.
*
* @param errBlkIndex
* error index to be reconstructed and recalculate checksum.
* @param blockLength
* number of bytes in the block to compute checksum.
* @throws IOException
*/ | Reconstruct this data block and recalculate checksum | recalculateChecksum | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockChecksumHelper.java",
"license": "gpl-3.0",
"size": 17655
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.datanode.erasurecode.StripedBlockChecksumReconstructor",
"org.apache.hadoop.hdfs.server.datanode.erasurecode.StripedReconstructionInfo",
"org.apache.hadoop.util.DataChecksum"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.datanode.erasurecode.StripedBlockChecksumReconstructor; import org.apache.hadoop.hdfs.server.datanode.erasurecode.StripedReconstructionInfo; import org.apache.hadoop.util.DataChecksum; | import java.io.*; import org.apache.hadoop.hdfs.server.datanode.erasurecode.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,217,648 |
public static <D extends Drawable> D mockDrawable(Class<D> drawableClassToMock) {
D drawable = mock(drawableClassToMock);
when(drawable.mutate()).thenReturn(drawable);
stubGetAndSetBounds(drawable);
stubGetAndSetCallback(drawable);
stubSetVisibilityCallback(drawable);
stubSetAlpha(drawable);
... | static <D extends Drawable> D function(Class<D> drawableClassToMock) { D drawable = mock(drawableClassToMock); when(drawable.mutate()).thenReturn(drawable); stubGetAndSetBounds(drawable); stubGetAndSetCallback(drawable); stubSetVisibilityCallback(drawable); stubSetAlpha(drawable); stubGetPaint(drawable); stubGetBitmap(... | /**
* Creates a mock Drawable with some methods stubbed.
*
* @return mock Drawable
*/ | Creates a mock Drawable with some methods stubbed | mockDrawable | {
"repo_name": "facebook/fresco",
"path": "drawee/src/test/java/com/facebook/drawee/drawable/DrawableTestUtils.java",
"license": "mit",
"size": 7914
} | [
"android.graphics.drawable.Drawable",
"org.mockito.Mockito"
] | import android.graphics.drawable.Drawable; import org.mockito.Mockito; | import android.graphics.drawable.*; import org.mockito.*; | [
"android.graphics",
"org.mockito"
] | android.graphics; org.mockito; | 2,745,655 |
private GenericDataRecord selectRecordRow(Connection con,
IdentifiedRecordTemplate template, String externalId, String language)
throws SQLException, FormException {
PreparedStatement select = null;
ResultSet rs = null;
try {
if (!I18NHelper.isI18nContentActivated || I18NHelper.isDefaul... | GenericDataRecord function(Connection con, IdentifiedRecordTemplate template, String externalId, String language) throws SQLException, FormException { PreparedStatement select = null; ResultSet rs = null; try { if (!I18NHelper.isI18nContentActivated I18NHelper.isDefaultLanguage(language)) { language = null; } if (langu... | /**
* Select the template header.
*/ | Select the template header | selectRecordRow | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/contribution/content/form/record/GenericRecordSetManager.java",
"license": "agpl-3.0",
"size": 41104
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.silverpeas.core.contribution.content.form.FormException",
"org.silverpeas.core.i18n.I18NHelper",
"org.silverpeas.core.persistence.jdbc.DBUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.silverpeas.core.contribution.content.form.FormException; import org.silverpeas.core.i18n.I18NHelper; import org.silverpeas.core.persistence.jdbc.DBUtil; | import java.sql.*; import org.silverpeas.core.contribution.content.form.*; import org.silverpeas.core.i18n.*; import org.silverpeas.core.persistence.jdbc.*; | [
"java.sql",
"org.silverpeas.core"
] | java.sql; org.silverpeas.core; | 1,137,923 |
public final Object getContent() throws IOException {
return openConnection().getContent();
} | final Object function() throws IOException { return openConnection().getContent(); } | /**
* Returns the content of the resource which is referred by this URL. By
* default this returns an {@code InputStream}, or null if the content type
* of the response is unknown.
*/ | Returns the content of the resource which is referred by this URL. By default this returns an InputStream, or null if the content type of the response is unknown | getContent | {
"repo_name": "xdajog/samsung_sources_i927",
"path": "libcore/luni/src/main/java/java/net/URL.java",
"license": "gpl-2.0",
"size": 24437
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,969,991 |
public static void f(String tag, String msg, Throwable throwable) {
if (sLevel > LEVEL_FATAL) {
return;
}
Log.wtf(tag, msg, throwable);
} | static void function(String tag, String msg, Throwable throwable) { if (sLevel > LEVEL_FATAL) { return; } Log.wtf(tag, msg, throwable); } | /**
* Send a FATAL ERROR log message
*
* @param tag
* @param msg
* @param throwable
*/ | Send a FATAL ERROR log message | f | {
"repo_name": "xu6148152/binea_project_for_android",
"path": "PullToRefresh/pulltorefreshlib/src/main/java/demo/binea/com/pulltorefreshlib/util/PtrCLog.java",
"license": "mit",
"size": 6150
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,586,102 |
public void jobQueueEvent(JobQueueEvent event);
| void function(JobQueueEvent event); | /**
* A job-queue event happened.
*
* @param event - details about the event.
*/ | A job-queue event happened | jobQueueEvent | {
"repo_name": "Paolo-Maffei/freebus-fts",
"path": "freebus-fts-service/src/main/java/org/freebus/fts/service/job/JobQueueListener.java",
"license": "gpl-3.0",
"size": 626
} | [
"org.freebus.fts.service.job.event.JobQueueEvent"
] | import org.freebus.fts.service.job.event.JobQueueEvent; | import org.freebus.fts.service.job.event.*; | [
"org.freebus.fts"
] | org.freebus.fts; | 447,901 |
@Test
public void testGetProperties_0args() throws Exception {
Reporter.println("getProperties");
Properties result = PropertiesLoader.getProperties();
} | void function() throws Exception { Reporter.println(STR); Properties result = PropertiesLoader.getProperties(); } | /**
* Test of getProperties method, of class PropertiesLoader.
*/ | Test of getProperties method, of class PropertiesLoader | testGetProperties_0args | {
"repo_name": "openphacts/Validator",
"path": "rdf-tools/test/uk/ac/manchester/cs/datadesc/validator/utils/PropertiesLoaderTest.java",
"license": "apache-2.0",
"size": 1280
} | [
"java.util.Properties",
"uk.ac.manchester.cs.datadesc.validator.rdftools.Reporter"
] | import java.util.Properties; import uk.ac.manchester.cs.datadesc.validator.rdftools.Reporter; | import java.util.*; import uk.ac.manchester.cs.datadesc.validator.rdftools.*; | [
"java.util",
"uk.ac.manchester"
] | java.util; uk.ac.manchester; | 2,497,695 |
public void ptrmapPut(int key, SqlJetPtrMapType eType, int parent) throws SqlJetException {
assert !ptrmapIsPage(pendingBytePage());
assert autoVacuumMode.isAutoVacuum();
SqlJetAssert.assertFalse(key == 0, SqlJetErrorCode.CORRUPT);
int iPtrmap = ptrmapPageNo(key);
... | void function(int key, SqlJetPtrMapType eType, int parent) throws SqlJetException { assert !ptrmapIsPage(pendingBytePage()); assert autoVacuumMode.isAutoVacuum(); SqlJetAssert.assertFalse(key == 0, SqlJetErrorCode.CORRUPT); int iPtrmap = ptrmapPageNo(key); ISqlJetPage pDbPage = pPager .getPage(iPtrmap); int offset = pt... | /**
* Write an entry into the pointer map.
*
* This routine updates the pointer map entry for page number 'key' so that
* it maps to type 'eType' and parent page number 'pgno'. An error code is
* returned if something goes wrong, otherwise SQLITE_OK.
*/ | Write an entry into the pointer map. This routine updates the pointer map entry for page number 'key' so that it maps to type 'eType' and parent page number 'pgno'. An error code is returned if something goes wrong, otherwise SQLITE_OK | ptrmapPut | {
"repo_name": "printingin3d/sqljet",
"path": "src/main/java/org/tmatesoft/sqljet/core/internal/btree/SqlJetBtreeShared.java",
"license": "gpl-3.0",
"size": 35801
} | [
"org.tmatesoft.sqljet.core.SqlJetErrorCode",
"org.tmatesoft.sqljet.core.SqlJetException",
"org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer",
"org.tmatesoft.sqljet.core.internal.ISqlJetPage",
"org.tmatesoft.sqljet.core.internal.SqlJetAssert"
] | import org.tmatesoft.sqljet.core.SqlJetErrorCode; import org.tmatesoft.sqljet.core.SqlJetException; import org.tmatesoft.sqljet.core.internal.ISqlJetMemoryPointer; import org.tmatesoft.sqljet.core.internal.ISqlJetPage; import org.tmatesoft.sqljet.core.internal.SqlJetAssert; | import org.tmatesoft.sqljet.core.*; import org.tmatesoft.sqljet.core.internal.*; | [
"org.tmatesoft.sqljet"
] | org.tmatesoft.sqljet; | 326,775 |
public static Expression compile(StatementContext context, FilterableStatement statement, ParseNode viewWhere, List<Expression> dynamicFilters, Set<SubqueryParseNode> subqueryNodes) throws SQLException {
ParseNode where = statement.getWhere();
if (subqueryNodes != null) { // if the subqueryNodes pas... | static Expression function(StatementContext context, FilterableStatement statement, ParseNode viewWhere, List<Expression> dynamicFilters, Set<SubqueryParseNode> subqueryNodes) throws SQLException { ParseNode where = statement.getWhere(); if (subqueryNodes != null) { SubqueryParseNodeVisitor subqueryVisitor = new Subque... | /**
* Optimize scan ranges by applying dynamically generated filter expressions.
* @param context the shared context during query compilation
* @param statement TODO
* @throws SQLException if mismatched types are found, bind value do not match binds,
* or invalid function arguments are encounte... | Optimize scan ranges by applying dynamically generated filter expressions | compile | {
"repo_name": "growingio/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/compile/WhereCompiler.java",
"license": "apache-2.0",
"size": 15317
} | [
"com.google.common.collect.Lists",
"com.google.common.collect.Sets",
"java.sql.SQLException",
"java.util.List",
"java.util.Set",
"org.apache.phoenix.exception.SQLExceptionCode",
"org.apache.phoenix.exception.SQLExceptionInfo",
"org.apache.phoenix.expression.AndExpression",
"org.apache.phoenix.expres... | import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.sql.SQLException; import java.util.List; import java.util.Set; import org.apache.phoenix.exception.SQLExceptionCode; import org.apache.phoenix.exception.SQLExceptionInfo; import org.apache.phoenix.expression.AndExpression; import... | import com.google.common.collect.*; import java.sql.*; import java.util.*; import org.apache.phoenix.exception.*; import org.apache.phoenix.expression.*; import org.apache.phoenix.parse.*; import org.apache.phoenix.schema.*; import org.apache.phoenix.schema.types.*; | [
"com.google.common",
"java.sql",
"java.util",
"org.apache.phoenix"
] | com.google.common; java.sql; java.util; org.apache.phoenix; | 110,303 |
protected boolean isPermissive(Object mappedValue) {
if(mappedValue != null) {
String[] values = (String[]) mappedValue;
return Arrays.binarySearch(values, PERMISSIVE) >= 0;
}
return false;
} | boolean function(Object mappedValue) { if(mappedValue != null) { String[] values = (String[]) mappedValue; return Arrays.binarySearch(values, PERMISSIVE) >= 0; } return false; } | /**
* Returns <code>true</code> if the mappedValue contains the {@link #PERMISSIVE} qualifier.
*
* @return <code>true</code> if this filter should be permissive
*/ | Returns <code>true</code> if the mappedValue contains the <code>#PERMISSIVE</code> qualifier | isPermissive | {
"repo_name": "apache/shiro",
"path": "web/src/main/java/org/apache/shiro/web/filter/authc/AuthenticatingFilter.java",
"license": "apache-2.0",
"size": 6767
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 457,783 |
@Override
public BigDecimal getBalance()
{
BigDecimal retValue = Env.ZERO;
return retValue;
} // getBalance | BigDecimal function() { BigDecimal retValue = Env.ZERO; return retValue; } | /**
* Get Balance
* @return Zero (always balanced)
*/ | Get Balance | getBalance | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.acct.base/src/main/java-legacy/org/compiere/acct/Doc_ProjectIssue.java",
"license": "gpl-2.0",
"size": 7707
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 2,327,398 |
// @RequiresPermission(value = Manifest.permission.BIND_ACCESSIBILITY_SERVICE)
public static PStreamProvider asUpdates() {
return new TextEntryProvider();
} | static PStreamProvider function() { return new TextEntryProvider(); } | /**
* Provide a live stream of TextEntry items.
* The provider will generate a TextEntry item once the user type some text.
*
* @return the provider function.
*/ | Provide a live stream of TextEntry items. The provider will generate a TextEntry item once the user type some text | asUpdates | {
"repo_name": "ylimit/PrivacyStreams",
"path": "privacystreams-android-sdk/src/main/java/io/github/privacystreams/accessibility/TextEntry.java",
"license": "apache-2.0",
"size": 1093
} | [
"io.github.privacystreams.core.PStreamProvider"
] | import io.github.privacystreams.core.PStreamProvider; | import io.github.privacystreams.core.*; | [
"io.github.privacystreams"
] | io.github.privacystreams; | 1,897,839 |
public void testGetHoldability() throws SQLException, Exception {
Connection conn = getConnection();
conn.setAutoCommit(false);
// test default holdability
Statement stmt = createStatement();
ResultSet rs = stmt.executeQuery("values(1)");
as... | void function() throws SQLException, Exception { Connection conn = getConnection(); conn.setAutoCommit(false); Statement stmt = createStatement(); ResultSet rs = stmt.executeQuery(STR); assertEquals(STR, ResultSet.HOLD_CURSORS_OVER_COMMIT, rs.getHoldability()); rs.close(); try { rs.getHoldability(); fail(STR); } catch ... | /**
* Tests that <code>ResultSet.getHoldability()</code> has the
* correct behaviour.
*
* @throws SQLException Thrown if some unexpected error happens
* @throws Exception Thrown if some unexpected error happens
*/ | Tests that <code>ResultSet.getHoldability()</code> has the correct behaviour | testGetHoldability | {
"repo_name": "splicemachine/spliceengine",
"path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbc4/ResultSetTest.java",
"license": "agpl-3.0",
"size": 73189
} | [
"java.sql.CallableStatement",
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.CallableStatement; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 252,723 |
@NotNull
@Guarded(NotNullGuard.class)
@Deprecated
default var getPairValue() {
return toVarMap().values().iterator().next();
} | @Guarded(NotNullGuard.class) default var getPairValue() { return toVarMap().values().iterator().next(); } | /**
* Gets pair value.
*
* @return the pair value
* @deprecated use $pairValue()
*/ | Gets pair value | getPairValue | {
"repo_name": "sillelien/dollar-core",
"path": "src/main/java/com/sillelien/dollar/api/TypeAware.java",
"license": "apache-2.0",
"size": 9120
} | [
"com.sillelien.dollar.api.guard.Guarded",
"com.sillelien.dollar.api.guard.NotNullGuard"
] | import com.sillelien.dollar.api.guard.Guarded; import com.sillelien.dollar.api.guard.NotNullGuard; | import com.sillelien.dollar.api.guard.*; | [
"com.sillelien.dollar"
] | com.sillelien.dollar; | 300,049 |
final String key = "name";
final JsonStructure json = Json.createObjectBuilder()
.add(key, "Jeffrey Lebowski")
.build();
MatcherAssert.assertThat(
Json.createReader(
new RsJson(json).body()
).readObject().getString(key),
Matcher... | final String key = "name"; final JsonStructure json = Json.createObjectBuilder() .add(key, STR) .build(); MatcherAssert.assertThat( Json.createReader( new RsJson(json).body() ).readObject().getString(key), Matchers.startsWith(STR) ); } | /**
* RsJSON can build JSON response.
* @throws IOException If some problem inside
*/ | RsJSON can build JSON response | buildsJsonResponse | {
"repo_name": "yegor256/takes",
"path": "src/test/java/org/takes/rs/RsJsonTest.java",
"license": "mit",
"size": 2668
} | [
"javax.json.Json",
"javax.json.JsonStructure",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import javax.json.Json; import javax.json.JsonStructure; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import javax.json.*; import org.hamcrest.*; | [
"javax.json",
"org.hamcrest"
] | javax.json; org.hamcrest; | 1,274,517 |
public Map<Long,QuorumPeer.QuorumServer> getVotingView() {
return getQuorumVerifier().getVotingMembers();
} | Map<Long,QuorumPeer.QuorumServer> function() { return getQuorumVerifier().getVotingMembers(); } | /**
* Observers are not contained in this view, only nodes with
* PeerType=PARTICIPANT.
*/ | Observers are not contained in this view, only nodes with PeerType=PARTICIPANT | getVotingView | {
"repo_name": "AkihiroSuda/zookeeper",
"path": "src/java/main/org/apache/zookeeper/server/quorum/QuorumPeer.java",
"license": "apache-2.0",
"size": 66802
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,868,493 |
public static CPreparedStatement prepareStatement (String sql, String trxName)
{
int concurrency = ResultSet.CONCUR_READ_ONLY;
String upper = sql.toUpperCase();
if (upper.startsWith("UPDATE ") || upper.startsWith("DELETE "))
concurrency = ResultSet.CONCUR_UPDATABLE;
return prepareStatement(sql, Res... | static CPreparedStatement function (String sql, String trxName) { int concurrency = ResultSet.CONCUR_READ_ONLY; String upper = sql.toUpperCase(); if (upper.startsWith(STR) upper.startsWith(STR)) concurrency = ResultSet.CONCUR_UPDATABLE; return prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, concurrency, trxName); } | /**
* Prepare Statement
* @param sql
* @param trxName transaction
* @return Prepared Statement
*/ | Prepare Statement | prepareStatement | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/util/DB.java",
"license": "gpl-2.0",
"size": 69445
} | [
"java.sql.ResultSet"
] | import java.sql.ResultSet; | import java.sql.*; | [
"java.sql"
] | java.sql; | 303,878 |
Coordinate transformCoordinate(Coordinate coordinate, String from, String to); | Coordinate transformCoordinate(Coordinate coordinate, String from, String to); | /**
* Transform the given coordinate from a certain rendering space to another.
*
* @param coordinate
* The coordinate to transform. The X and Y coordinates are expected to be expressed in the 'from'
* rendering space.
* @param from
* The rendering space as a String value ... | Transform the given coordinate from a certain rendering space to another | transformCoordinate | {
"repo_name": "geomajas/geomajas-project-javascript",
"path": "api/src/main/java/org/geomajas/javascript/api/client/map/JsViewPortTransformationService.java",
"license": "agpl-3.0",
"size": 2038
} | [
"org.geomajas.geometry.Coordinate"
] | import org.geomajas.geometry.Coordinate; | import org.geomajas.geometry.*; | [
"org.geomajas.geometry"
] | org.geomajas.geometry; | 2,653,160 |
protected String mapElement(ClassInfo ci) {
if (ci == null)
return null;
String s = null;
MapEntry me = options.elementMapEntry(ci.name(), ci.encodingRule("xsd"));
if (me == null) {
if (classHasObjectElement(ci)) {
s = elementName(ci, true);
} else {
MessageContext mc = result.addError(this, ... | String function(ClassInfo ci) { if (ci == null) return null; String s = null; MapEntry me = options.elementMapEntry(ci.name(), ci.encodingRule("xsd")); if (me == null) { if (classHasObjectElement(ci)) { s = elementName(ci, true); } else { MessageContext mc = result.addError(this, 119, ci.name()); if (mc != null) mc.add... | /**
* Map an element to a predefined representation in GML, ISO/TS 19139, etc.
*
* @param ci tbd
* @return tbd
*/ | Map an element to a predefined representation in GML, ISO/TS 19139, etc | mapElement | {
"repo_name": "ShapeChange/ShapeChange",
"path": "src/main/java/de/interactive_instruments/ShapeChange/Target/XmlSchema/XsdDocument.java",
"license": "gpl-3.0",
"size": 165716
} | [
"de.interactive_instruments.ShapeChange"
] | import de.interactive_instruments.ShapeChange; | import de.interactive_instruments.*; | [
"de.interactive_instruments"
] | de.interactive_instruments; | 179,126 |
public Maybe<ListContainersSegmentResponse> listContainersSegmentAsync(Context context, String prefix, String marker, Integer maxresults, ListContainersIncludeType include, Integer timeout, String requestId) {
return listContainersSegmentWithRestResponseAsync(context, prefix, marker, maxresults, include, ti... | Maybe<ListContainersSegmentResponse> function(Context context, String prefix, String marker, Integer maxresults, ListContainersIncludeType include, Integer timeout, String requestId) { return listContainersSegmentWithRestResponseAsync(context, prefix, marker, maxresults, include, timeout, requestId) .flatMapMaybe((Serv... | /**
* The List Containers Segment operation returns a list of the containers under the specified account.
*
* @param context The context to associate with this operation.
* @param prefix Filters the results to return only containers whose name begins with the specified prefix.
* @param marker A... | The List Containers Segment operation returns a list of the containers under the specified account | listContainersSegmentAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/GeneratedServices.java",
"license": "mit",
"size": 40188
} | [
"com.microsoft.azure.storage.blob.models.ListContainersIncludeType",
"com.microsoft.azure.storage.blob.models.ListContainersSegmentResponse",
"com.microsoft.azure.storage.blob.models.ServiceListContainersSegmentResponse",
"com.microsoft.rest.v2.Context",
"io.reactivex.Maybe"
] | import com.microsoft.azure.storage.blob.models.ListContainersIncludeType; import com.microsoft.azure.storage.blob.models.ListContainersSegmentResponse; import com.microsoft.azure.storage.blob.models.ServiceListContainersSegmentResponse; import com.microsoft.rest.v2.Context; import io.reactivex.Maybe; | import com.microsoft.azure.storage.blob.models.*; import com.microsoft.rest.v2.*; import io.reactivex.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"io.reactivex"
] | com.microsoft.azure; com.microsoft.rest; io.reactivex; | 1,732,973 |
private void procesaImagen(HashMap<String, String> parametros, BasicDBObject anterior) {
if (null == parametros.get("issueSateliteImg") || "".equals(parametros.get("issueSateliteImg").trim())) {
if (null != anterior && null != anterior.getString("issueSateliteImg")) {
System.out.... | void function(HashMap<String, String> parametros, BasicDBObject anterior) { if (null == parametros.get(STR) "".equals(parametros.get(STR).trim())) { if (null != anterior && null != anterior.getString(STR)) { System.out.println("Arreglando: issueSateliteImg=" + anterior.getString(STR)); parametros.put(STR, anterior.getS... | /**
* Updates uploaded images from the web form.
* @param parametros new advice properties
* @param anterior previous advice properties
*/ | Updates uploaded images from the web form | procesaImagen | {
"repo_name": "mxabierto/avisos",
"path": "src/main/java/mx/org/cedn/avisosconagua/engine/processors/Init.java",
"license": "mit",
"size": 10804
} | [
"com.mongodb.BasicDBObject",
"java.util.HashMap"
] | import com.mongodb.BasicDBObject; import java.util.HashMap; | import com.mongodb.*; import java.util.*; | [
"com.mongodb",
"java.util"
] | com.mongodb; java.util; | 2,661,489 |
public void unbindWireHelperService(final WireHelperService wireHelperService) {
if (this.wireHelperService == wireHelperService) {
this.wireHelperService = null;
}
} | void function(final WireHelperService wireHelperService) { if (this.wireHelperService == wireHelperService) { this.wireHelperService = null; } } | /**
* Unbinds the Wire Helper Service.
*
* @param wireHelperService
* the new Wire Helper Service
*/ | Unbinds the Wire Helper Service | unbindWireHelperService | {
"repo_name": "ctron/kura",
"path": "kura/org.eclipse.kura.wire.component.provider/src/main/java/org/eclipse/kura/internal/wire/asset/WireAsset.java",
"license": "epl-1.0",
"size": 15376
} | [
"org.eclipse.kura.wire.WireHelperService"
] | import org.eclipse.kura.wire.WireHelperService; | import org.eclipse.kura.wire.*; | [
"org.eclipse.kura"
] | org.eclipse.kura; | 2,167,169 |
public void incrementStatistic(Statistic statistic) {
incrementStatistic(statistic, 1);
} | void function(Statistic statistic) { incrementStatistic(statistic, 1); } | /**
* Increment a statistic by 1.
* This increments both the instrumentation and storage statistics.
* @param statistic The operation to increment
*/ | Increment a statistic by 1. This increments both the instrumentation and storage statistics | incrementStatistic | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/StoreContext.java",
"license": "apache-2.0",
"size": 10586
} | [
"org.apache.hadoop.fs.s3a.Statistic"
] | import org.apache.hadoop.fs.s3a.Statistic; | import org.apache.hadoop.fs.s3a.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,179,168 |
@Deprecated
public int scheduleAsyncDelayedTask(Plugin plugin, Runnable task); | int function(Plugin plugin, Runnable task); | /**
* <b>Asynchronous tasks should never access any API in Bukkit. Great care
* should be taken to assure the thread-safety of asynchronous tasks.</b>
* <p>
* Schedules a once off task to occur as soon as possible. This task will
* be executed by a thread managed by the scheduler.
*
*... | Asynchronous tasks should never access any API in Bukkit. Great care should be taken to assure the thread-safety of asynchronous tasks. Schedules a once off task to occur as soon as possible. This task will be executed by a thread managed by the scheduler | scheduleAsyncDelayedTask | {
"repo_name": "Sindresgaming/Spigot-API",
"path": "src/main/java/org/bukkit/scheduler/BukkitScheduler.java",
"license": "gpl-3.0",
"size": 10177
} | [
"org.bukkit.plugin.Plugin"
] | import org.bukkit.plugin.Plugin; | import org.bukkit.plugin.*; | [
"org.bukkit.plugin"
] | org.bukkit.plugin; | 832,860 |
public void logPurchase(BigDecimal purchaseAmount, Currency currency, Bundle parameters) {
appEventsLogger.logPurchase(purchaseAmount, currency, parameters);
} | void function(BigDecimal purchaseAmount, Currency currency, Bundle parameters) { appEventsLogger.logPurchase(purchaseAmount, currency, parameters); } | /**
* Deprecated. Please use {@link AppEventsLogger} instead.
*/ | Deprecated. Please use <code>AppEventsLogger</code> instead | logPurchase | {
"repo_name": "codenpk/yelo-android",
"path": "libraries/facebookSDK/src/main/java/com/facebook/InsightsLogger.java",
"license": "apache-2.0",
"size": 3259
} | [
"android.os.Bundle",
"java.math.BigDecimal",
"java.util.Currency"
] | import android.os.Bundle; import java.math.BigDecimal; import java.util.Currency; | import android.os.*; import java.math.*; import java.util.*; | [
"android.os",
"java.math",
"java.util"
] | android.os; java.math; java.util; | 1,034,324 |
private void replaceModuleName() throws CmsException, UnsupportedEncodingException {
CmsResourceFilter filter = CmsResourceFilter.ALL.addRequireFile().addExcludeState(CmsResource.STATE_DELETED).addRequireTimerange().addRequireVisible();
List<CmsResource> resources = getCms().readResources(
... | void function() throws CmsException, UnsupportedEncodingException { CmsResourceFilter filter = CmsResourceFilter.ALL.addRequireFile().addExcludeState(CmsResource.STATE_DELETED).addRequireTimerange().addRequireVisible(); List<CmsResource> resources = getCms().readResources( CmsWorkplace.VFS_PATH_MODULES + m_cloneInfo.ge... | /**
* Initializes a thread to find and replace all occurrence of the module's path.<p>
*
* @throws CmsException
* @throws UnsupportedEncodingException
*/ | Initializes a thread to find and replace all occurrence of the module's path | replaceModuleName | {
"repo_name": "it-tavis/opencms-core",
"path": "src-modules/org/opencms/workplace/tools/modules/CmsCloneModuleThread.java",
"license": "lgpl-2.1",
"size": 43310
} | [
"java.io.UnsupportedEncodingException",
"java.util.List",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"org.opencms.file.CmsFile",
"org.opencms.file.CmsResource",
"org.opencms.file.CmsResourceFilter",
"org.opencms.i18n.CmsLocaleManager",
"org.opencms.main.CmsException",
"org.opencms.workp... | import java.io.UnsupportedEncodingException; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.opencms.file.CmsFile; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.i18n.CmsLocaleManager; import org.opencms.main.CmsExcept... | import java.io.*; import java.util.*; import java.util.regex.*; import org.opencms.file.*; import org.opencms.i18n.*; import org.opencms.main.*; import org.opencms.workplace.*; | [
"java.io",
"java.util",
"org.opencms.file",
"org.opencms.i18n",
"org.opencms.main",
"org.opencms.workplace"
] | java.io; java.util; org.opencms.file; org.opencms.i18n; org.opencms.main; org.opencms.workplace; | 242,098 |
public static void closeStream(Closeable aStream) throws IOException {
aStream.close();
} | static void function(Closeable aStream) throws IOException { aStream.close(); } | /**
* Tries to close the specified stream.
*
* @param aStream
* an input or output stream
*
* @throws IOException
* is thrown if the specified stream couldn't be closed properly
*/ | Tries to close the specified stream | closeStream | {
"repo_name": "gammalgris/jmul",
"path": "Utilities/IO/src/jmul/io/StreamsHelper.java",
"license": "gpl-3.0",
"size": 3646
} | [
"java.io.Closeable",
"java.io.IOException"
] | import java.io.Closeable; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,640,642 |
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
SerialUtilities.writePaintType(this.fillPaintType, stream);
SerialUtilities.writePaintType(this.outlinePaintType, stream);
} | void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writePaintType(this.fillPaintType, stream); SerialUtilities.writePaintType(this.outlinePaintType, stream); } | /**
* Provides serialization support.
*
* @param stream the output stream.
*
* @throws IOException if there is an I/O error.
*/ | Provides serialization support | writeObject | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/chart/plot/dial/DialPointer.java",
"license": "lgpl-3.0",
"size": 20703
} | [
"java.io.IOException",
"java.io.ObjectOutputStream",
"org.afree.io.SerialUtilities"
] | import java.io.IOException; import java.io.ObjectOutputStream; import org.afree.io.SerialUtilities; | import java.io.*; import org.afree.io.*; | [
"java.io",
"org.afree.io"
] | java.io; org.afree.io; | 764,928 |
protected void loadChildren()
{
DynamicTreeNode newNode;
// Font font;
// int randomIndex;
NodeData dataParent = (NodeData)this.getUserObject();
FieldList fieldList = dataParent.makeRecord();
FieldTable fieldTable = fieldList.getT... | void function() { DynamicTreeNode newNode; NodeData dataParent = (NodeData)this.getUserObject(); FieldList fieldList = dataParent.makeRecord(); FieldTable fieldTable = fieldList.getTable(); m_fNameCount = 0; try { fieldTable.close(); while (fieldTable.next() != null) { String objID = fieldList.getField(0).toString(); S... | /**
* Messaged the first time getChildCount is messaged. Creates
* children with random names from names.
*/ | Messaged the first time getChildCount is messaged. Creates children with random names from names | loadChildren | {
"repo_name": "jbundle/jbundle",
"path": "thin/opt/location/src/main/java/org/jbundle/thin/opt/location/DynamicTreeNode.java",
"license": "gpl-3.0",
"size": 3254
} | [
"org.jbundle.thin.base.db.FieldList",
"org.jbundle.thin.base.db.FieldTable"
] | import org.jbundle.thin.base.db.FieldList; import org.jbundle.thin.base.db.FieldTable; | import org.jbundle.thin.base.db.*; | [
"org.jbundle.thin"
] | org.jbundle.thin; | 948,603 |
boolean canSpreadInto(Block block, Side side); | boolean canSpreadInto(Block block, Side side); | /**
* Checks if the value can propagate into a given block, through a specific side
*
* @param block The block to propagate into
* @param side The side to propagate via
* @return Whether the given block can be propagated
* into through side
*/ | Checks if the value can propagate into a given block, through a specific side | canSpreadInto | {
"repo_name": "Malanius/Terasology",
"path": "engine/src/main/java/org/terasology/world/propagation/PropagationRules.java",
"license": "apache-2.0",
"size": 3593
} | [
"org.terasology.math.Side",
"org.terasology.world.block.Block"
] | import org.terasology.math.Side; import org.terasology.world.block.Block; | import org.terasology.math.*; import org.terasology.world.block.*; | [
"org.terasology.math",
"org.terasology.world"
] | org.terasology.math; org.terasology.world; | 693,213 |
@Override
public int toBooleanMarshalCost() {
return Marshal.COST_FROM_NULL;
} | int function() { return Marshal.COST_FROM_NULL; } | /**
* Cost to convert to a boolean
*/ | Cost to convert to a boolean | toBooleanMarshalCost | {
"repo_name": "CleverCloud/Quercus",
"path": "quercus/src/main/java/com/caucho/quercus/env/NullValue.java",
"license": "gpl-2.0",
"size": 11788
} | [
"com.caucho.quercus.marshal.Marshal"
] | import com.caucho.quercus.marshal.Marshal; | import com.caucho.quercus.marshal.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,784,997 |
public void addAnnotation(XYAnnotation annotation) {
addAnnotation(annotation, true);
} | void function(XYAnnotation annotation) { addAnnotation(annotation, true); } | /**
* Adds an annotation to the plot and sends a {@link PlotChangeEvent} to
* all registered listeners.
*
* @param annotation the annotation (<code>null</code> not permitted).
*
* @see #getAnnotations()
* @see #removeAnnotation(XYAnnotation)
*/ | Adds an annotation to the plot and sends a <code>PlotChangeEvent</code> to all registered listeners | addAnnotation | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/plot/XYPlot.java",
"license": "mit",
"size": 199979
} | [
"org.jfree.chart.annotations.XYAnnotation"
] | import org.jfree.chart.annotations.XYAnnotation; | import org.jfree.chart.annotations.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,198,119 |
public void loadSettingsForDialog(final NodeSettingsRO settings) {
m_chartTitle = settings.getString(CHART_TITLE, DEF_CHART_TITLE);
allModelAreSelected = settings.getBoolean(modelSelection, allModelAreSelected);
secondaryModel = settings.getBoolean(secondarySelection, secondaryModel);
headLess = s... | void function(final NodeSettingsRO settings) { m_chartTitle = settings.getString(CHART_TITLE, DEF_CHART_TITLE); allModelAreSelected = settings.getBoolean(modelSelection, allModelAreSelected); secondaryModel = settings.getBoolean(secondarySelection, secondaryModel); headLess = settings.getBoolean(HEADLESS, headLess); m_... | /**
* Loads parameters in Dialog.
*
* @param settings To load from.
*/ | Loads parameters in Dialog | loadSettingsForDialog | {
"repo_name": "SiLeBAT/FSK-Lab",
"path": "de.bund.bfr.knime.pmm.nodes/src/de/bund/bfr/knime/pmm/js/modelplotter/modern/ModelPlotterViewConfig.java",
"license": "gpl-3.0",
"size": 7774
} | [
"org.knime.core.node.NodeSettingsRO"
] | import org.knime.core.node.NodeSettingsRO; | import org.knime.core.node.*; | [
"org.knime.core"
] | org.knime.core; | 746,777 |
public List<AssignmentVerificationReport> verifyRegionPlacement(boolean isDetailMode)
throws IOException {
System.out.println("Start to verify the region assignment and " +
"generate the verification report");
// Get the region assignment snapshot
SnapshotOfRegionAssignmentFromMeta snapshot ... | List<AssignmentVerificationReport> function(boolean isDetailMode) throws IOException { System.out.println(STR + STR); SnapshotOfRegionAssignmentFromMeta snapshot = this.getRegionAssignmentSnapshot(); Set<TableName> tables = snapshot.getTableSet(); Map<String, Map<String, Float>> regionLocalityMap = null; if (this.enfor... | /**
* Verify the region placement is consistent with the assignment plan
* @param isDetailMode
* @return reports
* @throws IOException
*/ | Verify the region placement is consistent with the assignment plan | verifyRegionPlacement | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlacementMaintainer.java",
"license": "apache-2.0",
"size": 48273
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.util.FSUtils"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.FSUtils; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,604,123 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<SensitivityLabelInner> listCurrentAsync(
String resourceGroupName, String workspaceName, String sqlPoolName, String filter) {
return new PagedFlux<>(
() -> listCurrentSinglePageAsync(resourceGroupName, workspaceName, s... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<SensitivityLabelInner> function( String resourceGroupName, String workspaceName, String sqlPoolName, String filter) { return new PagedFlux<>( () -> listCurrentSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName, filter), nextLink -> listCurrentNextSing... | /**
* Gets SQL pool sensitivity labels.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param filter An OData filter expression that filters elements in the c... | Gets SQL pool sensitivity labels | listCurrentAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java",
"license": "mit",
"size": 109648
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.synapse.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 582,600 |
ByteBuf nextInboundByteBuffer(); | ByteBuf nextInboundByteBuffer(); | /**
* Return the {@link ByteBuf} of the next {@link ChannelInboundByteHandler} in the pipeline.
*/ | Return the <code>ByteBuf</code> of the next <code>ChannelInboundByteHandler</code> in the pipeline | nextInboundByteBuffer | {
"repo_name": "menacher/netty",
"path": "transport/src/main/java/io/netty/channel/ChannelHandlerContext.java",
"license": "apache-2.0",
"size": 10055
} | [
"io.netty.buffer.ByteBuf"
] | import io.netty.buffer.ByteBuf; | import io.netty.buffer.*; | [
"io.netty.buffer"
] | io.netty.buffer; | 360,487 |
protected void activate(BundleContext bundleContext, Map<String, Object> properties) throws Exception {
ruleEngine.setCompositeModuleHandlerFactory(
new CompositeModuleHandlerFactory(bundleContext, moduleTypeRegistry, ruleEngine));
ruleEngine.setStatusInfoCallback(this);
modi... | void function(BundleContext bundleContext, Map<String, Object> properties) throws Exception { ruleEngine.setCompositeModuleHandlerFactory( new CompositeModuleHandlerFactory(bundleContext, moduleTypeRegistry, ruleEngine)); ruleEngine.setStatusInfoCallback(this); modified(properties); super.activate(bundleContext); } | /**
* Activates this component. Called from DS.
*
* @param componentContext this component context.
*/ | Activates this component. Called from DS | activate | {
"repo_name": "BenediktNiehues/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.core/src/main/java/org/eclipse/smarthome/automation/core/internal/RuleRegistryImpl.java",
"license": "epl-1.0",
"size": 23480
} | [
"java.util.Map",
"org.eclipse.smarthome.automation.core.internal.composite.CompositeModuleHandlerFactory",
"org.osgi.framework.BundleContext"
] | import java.util.Map; import org.eclipse.smarthome.automation.core.internal.composite.CompositeModuleHandlerFactory; import org.osgi.framework.BundleContext; | import java.util.*; import org.eclipse.smarthome.automation.core.internal.composite.*; import org.osgi.framework.*; | [
"java.util",
"org.eclipse.smarthome",
"org.osgi.framework"
] | java.util; org.eclipse.smarthome; org.osgi.framework; | 976,409 |
public void doAlias(AbstractCompiler compiler) {
if (isAliased) {
for (Map.Entry<Node, Node> entry : nodes.entrySet()) {
Node n = entry.getKey();
Node parent = entry.getValue();
aliasNode(n, parent);
compiler.reportCodeChange();
}
}
} | void function(AbstractCompiler compiler) { if (isAliased) { for (Map.Entry<Node, Node> entry : nodes.entrySet()) { Node n = entry.getKey(); Node parent = entry.getValue(); aliasNode(n, parent); compiler.reportCodeChange(); } } } | /**
* Update all of the nodes with a reference to the corresponding
* alias node.
*/ | Update all of the nodes with a reference to the corresponding alias node | doAlias | {
"repo_name": "robbert/closure-compiler",
"path": "src/com/google/javascript/jscomp/AliasKeywords.java",
"license": "apache-2.0",
"size": 15467
} | [
"com.google.javascript.rhino.Node",
"java.util.Map"
] | import com.google.javascript.rhino.Node; import java.util.Map; | import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 753,805 |
public boolean isContent(Item item);
public void delAllItems(boolean destroy);
public void eachItem(final EachApplicable<Item> applier);
| boolean isContent(Item item); public void delAllItems(boolean destroy); public void function(final EachApplicable<Item> applier); | /**
* Applies the given code to each item in this collection
* @param applier code to execute against each object
*/ | Applies the given code to each item in this collection | eachItem | {
"repo_name": "bozimmerman/CoffeeMud",
"path": "com/planet_ink/coffee_mud/core/interfaces/ItemCollection.java",
"license": "apache-2.0",
"size": 4462
} | [
"com.planet_ink.coffee_mud.Items"
] | import com.planet_ink.coffee_mud.Items; | import com.planet_ink.coffee_mud.*; | [
"com.planet_ink.coffee_mud"
] | com.planet_ink.coffee_mud; | 2,354,858 |
void setScaleType(ImageView.ScaleType scaleType); | void setScaleType(ImageView.ScaleType scaleType); | /**
* Controls how the image should be resized or moved to match the size of
* the ImageView. Any scaling or panning will happen within the confines of
* this {@link ImageView.ScaleType}.
*
* @param scaleType - The desired scaling mode.
*/ | Controls how the image should be resized or moved to match the size of the ImageView. Any scaling or panning will happen within the confines of this <code>ImageView.ScaleType</code> | setScaleType | {
"repo_name": "bangqu/eshow-android",
"path": "photoslib/src/main/java/com/bangqu/photos/widget/IPhotoView.java",
"license": "apache-2.0",
"size": 4000
} | [
"android.widget.ImageView"
] | import android.widget.ImageView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,377,627 |
void snapToTargetExistingView() {
if (mRecyclerView == null) {
return;
}
RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager();
if (layoutManager == null) {
return;
}
View snapView = findSnapView(layoutManager);
if... | void snapToTargetExistingView() { if (mRecyclerView == null) { return; } RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager(); if (layoutManager == null) { return; } View snapView = findSnapView(layoutManager); if (snapView == null) { return; } int[] snapDistance = calculateDistanceToFinalSnap(la... | /**
* Snaps to a target view which currently exists in the attached {@link RecyclerView}. This
* method is used to snap the view when the {@link RecyclerView} is first attached; when
* snapping was triggered by a scroll and when the fling is at its final stages.
*/ | Snaps to a target view which currently exists in the attached <code>RecyclerView</code>. This method is used to snap the view when the <code>RecyclerView</code> is first attached; when snapping was triggered by a scroll and when the fling is at its final stages | snapToTargetExistingView | {
"repo_name": "hanhailong/GridPagerSnapHelper",
"path": "gridpagersnaphelper/src/main/java/com/hhl/gridpagersnaphelper/SnapHelper.java",
"license": "apache-2.0",
"size": 10995
} | [
"android.support.v7.widget.RecyclerView",
"android.view.View"
] | import android.support.v7.widget.RecyclerView; import android.view.View; | import android.support.v7.widget.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 2,347,869 |
private static int[][][] compileMultiplicationIndirection(final int parameters, final int order,
final DSCompiler valueCompiler,
final DSCompiler derivativeCompiler,
... | static int[][][] function(final int parameters, final int order, final DSCompiler valueCompiler, final DSCompiler derivativeCompiler, final int[] lowerIndirection) { if ((parameters == 0) (order == 0)) { return new int[][][] { { { 1, 0, 0 } } }; } final int vSize = valueCompiler.multIndirection.length; final int dSize ... | /** Compile the multiplication indirection array.
* <p>
* This indirection array contains the indices of all pairs of elements
* involved when computing a multiplication. This allows a straightforward
* loop-based multiplication (see {@link #multiply(double[], int, double[], int, double[], int)}).
... | Compile the multiplication indirection array. This indirection array contains the indices of all pairs of elements involved when computing a multiplication. This allows a straightforward loop-based multiplication (see <code>#multiply(double[], int, double[], int, double[], int)</code>). | compileMultiplicationIndirection | {
"repo_name": "virtualdataset/metagen-java",
"path": "virtdata-lib-curves4/src/main/java/org/apache/commons/math4/analysis/differentiation/DSCompiler.java",
"license": "apache-2.0",
"size": 78787
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 566,832 |
public void delete(UserInfo userInfo, String id) throws DatastoreException, UnauthorizedException, NotFoundException;
| void function(UserInfo userInfo, String id) throws DatastoreException, UnauthorizedException, NotFoundException; | /**
* Delete an invitation
*
* @param userInfo
* @param id
* @throws DatastoreException
* @throws UnauthorizedException
* @throws NotFoundException
*/ | Delete an invitation | delete | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/team/MembershipInvitationManager.java",
"license": "apache-2.0",
"size": 5092
} | [
"org.sagebionetworks.repo.model.DatastoreException",
"org.sagebionetworks.repo.model.UnauthorizedException",
"org.sagebionetworks.repo.model.UserInfo",
"org.sagebionetworks.repo.web.NotFoundException"
] | import org.sagebionetworks.repo.model.DatastoreException; import org.sagebionetworks.repo.model.UnauthorizedException; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.web.NotFoundException; | import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.web.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 2,300,163 |
public VNode addNode(VNode node) throws VlException
{
return null;
} | VNode function(VNode node) throws VlException { return null; } | /**
* Adds (Sub) Cluster to the registry.
*/ | Adds (Sub) Cluster to the registry | addNode | {
"repo_name": "skoulouzis/vlet-1.5.0",
"path": "source/core/nl.uva.vlet.vrs.core/source/main/nl/uva/vlet/vrms/Cluster.java",
"license": "apache-2.0",
"size": 7102
} | [
"nl.uva.vlet.exception.VlException",
"nl.uva.vlet.vrs.VNode"
] | import nl.uva.vlet.exception.VlException; import nl.uva.vlet.vrs.VNode; | import nl.uva.vlet.exception.*; import nl.uva.vlet.vrs.*; | [
"nl.uva.vlet"
] | nl.uva.vlet; | 2,590,085 |
@POST
@Path("/saveCompanyBasicInfo")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Response saveCompanyBasicInfo(@Context HttpServletRequest request,
@Context final HttpServletResponse response,
@FormParam("user") final String u... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) Response function(@Context HttpServletRequest request, @Context final HttpServletResponse response, @FormParam("user") final String user, @FormParam(STR) final String password, @FormParam(STR) final String portalURL, @Form... | /**
* Updates some given basic information to the current company, this method will be call it from the CMS Config portlet
*
* @param request
* @param user
* @param password
* @param portalURL
* @param mx
* @param emailAddress
* @param backgroundColor this one is the Backgro... | Updates some given basic information to the current company, this method will be call it from the CMS Config portlet | saveCompanyBasicInfo | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotcms/rest/CMSConfigResource.java",
"license": "gpl-3.0",
"size": 25101
} | [
"com.dotcms.enterprise.LicenseUtil",
"com.dotcms.enterprise.license.LicenseLevel",
"com.dotcms.repackage.org.apache.commons.httpclient.HttpStatus",
"com.dotcms.rest.api.v1.system.ConfigurationHelper",
"com.dotmarketing.business.APILocator",
"com.dotmarketing.util.Logger",
"com.dotmarketing.util.PortletI... | import com.dotcms.enterprise.LicenseUtil; import com.dotcms.enterprise.license.LicenseLevel; import com.dotcms.repackage.org.apache.commons.httpclient.HttpStatus; import com.dotcms.rest.api.v1.system.ConfigurationHelper; import com.dotmarketing.business.APILocator; import com.dotmarketing.util.Logger; import com.dotmar... | import com.dotcms.enterprise.*; import com.dotcms.enterprise.license.*; import com.dotcms.repackage.org.apache.commons.httpclient.*; import com.dotcms.rest.api.v1.system.*; import com.dotmarketing.business.*; import com.dotmarketing.util.*; import com.dotmarketing.util.json.*; import com.liferay.portal.auth.*; import c... | [
"com.dotcms.enterprise",
"com.dotcms.repackage",
"com.dotcms.rest",
"com.dotmarketing.business",
"com.dotmarketing.util",
"com.liferay.portal",
"com.liferay.util",
"java.io",
"java.util",
"javax.servlet",
"javax.ws"
] | com.dotcms.enterprise; com.dotcms.repackage; com.dotcms.rest; com.dotmarketing.business; com.dotmarketing.util; com.liferay.portal; com.liferay.util; java.io; java.util; javax.servlet; javax.ws; | 2,746,152 |
private static ISms getISmsServiceOrThrow() {
ISms iccISms = getISmsService();
if (iccISms == null) {
throw new UnsupportedOperationException("Sms is not supported");
}
return iccISms;
} | static ISms function() { ISms iccISms = getISmsService(); if (iccISms == null) { throw new UnsupportedOperationException(STR); } return iccISms; } | /**
* Returns the ISms service, or throws an UnsupportedOperationException if
* the service does not exist.
*/ | Returns the ISms service, or throws an UnsupportedOperationException if the service does not exist | getISmsServiceOrThrow | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/telephony/SmsManager.java",
"license": "gpl-3.0",
"size": 69171
} | [
"com.android.internal.telephony.ISms"
] | import com.android.internal.telephony.ISms; | import com.android.internal.telephony.*; | [
"com.android.internal"
] | com.android.internal; | 561,527 |
@Test
public final void returnFalseInHasNextValueOnEmptyList() {
MatcherAssert.assertThat(
new VerboseIterable<String>(
Collections.<String>emptyList(),
"Non used Error Message"
).iterator().hasNext(),
Matchers.equalTo(false)
);... | final void function() { MatcherAssert.assertThat( new VerboseIterable<String>( Collections.<String>emptyList(), STR ).iterator().hasNext(), Matchers.equalTo(false) ); } | /**
* VerboseIterator returns false in has next value on empty list.
*/ | VerboseIterator returns false in has next value on empty list | returnFalseInHasNextValueOnEmptyList | {
"repo_name": "dalifreire/takes",
"path": "src/test/java/org/takes/misc/VerboseIteratorTest.java",
"license": "mit",
"size": 4137
} | [
"java.util.Collections",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import java.util.Collections; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import java.util.*; import org.hamcrest.*; | [
"java.util",
"org.hamcrest"
] | java.util; org.hamcrest; | 226,700 |
public String resolveThemeName(HttpServletRequest request)
{
String theme = request.getParameter(THEME_PARAMETER_NAME);
if (theme != null)
return theme;
return DEFAULT_THEME;
} | String function(HttpServletRequest request) { String theme = request.getParameter(THEME_PARAMETER_NAME); if (theme != null) return theme; return DEFAULT_THEME; } | /**
* Resolve the current theme name via the given request based on a 'theme=' parameter.
* Returns 'default' if not theme specified.
*
* @param request request to be used for resolution
* @return the current theme name
*/ | Resolve the current theme name via the given request based on a 'theme=' parameter. Returns 'default' if not theme specified | resolveThemeName | {
"repo_name": "0x006EA1E5/oo6",
"path": "src/main/java/org/otherobjects/cms/theme/OoThemeResolver.java",
"license": "gpl-3.0",
"size": 2386
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,855,565 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.