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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
EReference getCombustionTurbine_AirCompressor(); | EReference getCombustionTurbine_AirCompressor(); | /**
* Returns the meta object for the reference '{@link CIM.IEC61970.Generation.GenerationDynamics.CombustionTurbine#getAirCompressor <em>Air Compressor</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Air Compressor</em>'.
* @see CIM.IEC61970.Generati... | Returns the meta object for the reference '<code>CIM.IEC61970.Generation.GenerationDynamics.CombustionTurbine#getAirCompressor Air Compressor</code>'. | getCombustionTurbine_AirCompressor | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Generation/GenerationDynamics/GenerationDynamicsPackage.java",
"license": "mit",
"size": 239957
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,751,957 |
void setNode(Node selectedNode); | void setNode(Node selectedNode); | /**
* Sets the "selected" node in this class
*
* @param selectedNode node to use
*/ | Sets the "selected" node in this class | setNode | {
"repo_name": "dgrove727/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/DataContent.java",
"license": "apache-2.0",
"size": 1153
} | [
"org.openide.nodes.Node"
] | import org.openide.nodes.Node; | import org.openide.nodes.*; | [
"org.openide.nodes"
] | org.openide.nodes; | 2,658 |
public void visit(ImageNode node)
{
if (annotated) {
if (EditorUtil.isAnnotated(node.getHierarchyObject()))
foundNodes.add(node);
} else {
if (!EditorUtil.isAnnotated(node.getHierarchyObject()))
foundNodes.add(node);
}
}
public void visit(ImageSet node) {} | void function(ImageNode node) { if (annotated) { if (EditorUtil.isAnnotated(node.getHierarchyObject())) foundNodes.add(node); } else { if (!EditorUtil.isAnnotated(node.getHierarchyObject())) foundNodes.add(node); } } void function(ImageSet node) {} | /**
* Implemented as specified by {@link ImageDisplayVisitor}.
* @see ImageDisplayVisitor#visit(ImageNode)
*/ | Implemented as specified by <code>ImageDisplayVisitor</code> | visit | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/visitor/AnnotatedNodesVisitor.java",
"license": "gpl-2.0",
"size": 3473
} | [
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageSet",
"org.openmicroscopy.shoola.agents.util.EditorUtil"
] | import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageSet; import org.openmicroscopy.shoola.agents.util.EditorUtil; | import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.agents.util.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,613,056 |
@Test
public void whenSerialNumberSetInEnvironmentThenCorrectDeviceFound()
throws CmdLineException {
IDevice[] devices = new IDevice[] {
createRealDevice("1", IDevice.DeviceState.ONLINE),
createEmulator("2", IDevice.DeviceState.ONLINE),
createRealDevice("3", IDevice.DeviceState.ONL... | void function() throws CmdLineException { IDevice[] devices = new IDevice[] { createRealDevice("1", IDevice.DeviceState.ONLINE), createEmulator("2", IDevice.DeviceState.ONLINE), createRealDevice("3", IDevice.DeviceState.ONLINE), createEmulator("4", IDevice.DeviceState.ONLINE) }; for (int i = 0; i < devices.length; i++)... | /**
* Verify that filtering by environment variable works.
*/ | Verify that filtering by environment variable works | whenSerialNumberSetInEnvironmentThenCorrectDeviceFound | {
"repo_name": "bocon13/buck",
"path": "test/com/facebook/buck/android/AdbHelperTest.java",
"license": "apache-2.0",
"size": 19408
} | [
"com.android.ddmlib.IDevice",
"com.facebook.buck.step.AdbOptions",
"com.facebook.buck.step.TargetDeviceOptions",
"com.facebook.buck.step.TestExecutionContext",
"com.google.common.collect.ImmutableMap",
"java.util.List",
"org.junit.Assert",
"org.kohsuke.args4j.CmdLineException"
] | import com.android.ddmlib.IDevice; import com.facebook.buck.step.AdbOptions; import com.facebook.buck.step.TargetDeviceOptions; import com.facebook.buck.step.TestExecutionContext; import com.google.common.collect.ImmutableMap; import java.util.List; import org.junit.Assert; import org.kohsuke.args4j.CmdLineException; | import com.android.ddmlib.*; import com.facebook.buck.step.*; import com.google.common.collect.*; import java.util.*; import org.junit.*; import org.kohsuke.args4j.*; | [
"com.android.ddmlib",
"com.facebook.buck",
"com.google.common",
"java.util",
"org.junit",
"org.kohsuke.args4j"
] | com.android.ddmlib; com.facebook.buck; com.google.common; java.util; org.junit; org.kohsuke.args4j; | 763,075 |
public void setDefaultBranch(String value) throws IOException {
set().defaultBranch(value);
} | void function(String value) throws IOException { set().defaultBranch(value); } | /**
* Sets default branch.
*
* @param value
* the value
* @throws IOException
* the io exception
*/ | Sets default branch | setDefaultBranch | {
"repo_name": "kohsuke/github-api",
"path": "src/main/java/org/kohsuke/github/GHRepository.java",
"license": "mit",
"size": 103118
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,288,994 |
private void register( boolean register )
throws SQLException
{
Connection conn = getDefaultConnection();
Method[] methods = getClass().getDeclaredMethods();
int count = methods.length;
for ( int midx = 0; midx < count; midx++ )
{
... | void function( boolean register ) throws SQLException { Connection conn = getDefaultConnection(); Method[] methods = getClass().getDeclaredMethods(); int count = methods.length; for ( int midx = 0; midx < count; midx++ ) { Method method = methods[ midx ]; int modifiers = method.getModifiers(); if ( isSet( modifiers, Mo... | /**
* <p>
* Workhorse to register or unregister all public static methods as
* Derby routines.
* </p>
*/ | Workhorse to register or unregister all public static methods as Derby routines. | register | {
"repo_name": "trejkaz/derby",
"path": "java/tools/org/apache/derby/impl/tools/optional/DBMDWrapper.java",
"license": "apache-2.0",
"size": 38592
} | [
"java.lang.reflect.Method",
"java.lang.reflect.Modifier",
"java.sql.Connection",
"java.sql.SQLException"
] | import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.sql.Connection; import java.sql.SQLException; | import java.lang.reflect.*; import java.sql.*; | [
"java.lang",
"java.sql"
] | java.lang; java.sql; | 830,193 |
Map<String, String> map = new HashMap<>();
map.put("name", rainbowFish.getName());
map.put("age", String.format("%d", rainbowFish.getAge()));
map.put("lengthMeters", String.format("%d", rainbowFish.getLengthMeters()));
map.put("weightTons", String.format("%d", rainbowFish.getWeightTons()));
FileOutp... | Map<String, String> map = new HashMap<>(); map.put("name", rainbowFish.getName()); map.put("age", String.format("%d", rainbowFish.getAge())); map.put(STR, String.format("%d", rainbowFish.getLengthMeters())); map.put(STR, String.format("%d", rainbowFish.getWeightTons())); FileOutputStream fileOut = new FileOutputStream(... | /**
* Write V1 RainbowFish to file
*/ | Write V1 RainbowFish to file | writeV1 | {
"repo_name": "dlee0113/java-design-patterns",
"path": "tolerant-reader/src/main/java/com/iluwatar/tolerantreader/RainbowFishSerializer.java",
"license": "mit",
"size": 2708
} | [
"java.io.FileOutputStream",
"java.io.ObjectOutputStream",
"java.util.HashMap",
"java.util.Map"
] | import java.io.FileOutputStream; import java.io.ObjectOutputStream; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,343,934 |
protected void postProcessEntities( List<T> entityList, WebOptions options, Map<String, String> parameters )
{
} | void function( List<T> entityList, WebOptions options, Map<String, String> parameters ) { } | /**
* Override to process entities after it has been retrieved from
* storage and before it is returned to the view. Entities is null-safe.
*/ | Override to process entities after it has been retrieved from storage and before it is returned to the view. Entities is null-safe | postProcessEntities | {
"repo_name": "HRHR-project/palestine",
"path": "dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AbstractCrudController.java",
"license": "bsd-3-clause",
"size": 55571
} | [
"java.util.List",
"java.util.Map",
"org.hisp.dhis.webapi.webdomain.WebOptions"
] | import java.util.List; import java.util.Map; import org.hisp.dhis.webapi.webdomain.WebOptions; | import java.util.*; import org.hisp.dhis.webapi.webdomain.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 2,486,032 |
private V getDoneValue(Object obj) throws ExecutionException {
// While this seems like it might be too branch-y, simple benchmarking proves it to be
// unmeasurable (comparing done AbstractFutures with immediateFuture)
if (obj instanceof Cancellation) {
throw cancellationExceptionWithCause("Task wa... | V function(Object obj) throws ExecutionException { if (obj instanceof Cancellation) { throw cancellationExceptionWithCause(STR, ((Cancellation) obj).cause); } else if (obj instanceof Failure) { throw new ExecutionException(((Failure) obj).exception); } else if (obj == NULL) { return null; } else { @SuppressWarnings(STR... | /**
* Unboxes {@code obj}. Assumes that obj is not {@code null} or a {@link SetFuture}.
*/ | Unboxes obj. Assumes that obj is not null or a <code>SetFuture</code> | getDoneValue | {
"repo_name": "uschindler/guava",
"path": "guava/src/com/google/common/util/concurrent/AbstractFuture.java",
"license": "apache-2.0",
"size": 37678
} | [
"java.util.concurrent.ExecutionException"
] | import java.util.concurrent.ExecutionException; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 758,288 |
default Collection<Object> getAttributes(String userDistinguishedName, String attributeId) throws LdapException
{
return getAttributes(userDistinguishedName, Collections.singleton(attributeId)).get(attributeId);
} | default Collection<Object> getAttributes(String userDistinguishedName, String attributeId) throws LdapException { return getAttributes(userDistinguishedName, Collections.singleton(attributeId)).get(attributeId); } | /**
* Expected return types are String and byte[]
* @return return a collection of Object that correspond to the values stored for the specified attribute or an empty collection if no values for the specified attribute are present
*
* */ | Expected return types are String and byte[] | getAttributes | {
"repo_name": "tcat-tamu/auth",
"path": "bundles/edu.tamu.tcat.account.apacheds/src/edu/tamu/tcat/account/apacheds/LdapHelperReader.java",
"license": "apache-2.0",
"size": 6804
} | [
"java.util.Collection",
"java.util.Collections"
] | import java.util.Collection; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 791,993 |
private void updateStatisticsTable(String className, String testName, int status) {
TestStatistics stat = (TestStatistics) testsStatisticsHash.get(className + ";" + testName);
if (stat == null) {
stat = new TestStatistics();
stat.setClassName(className);
stat.setMethodName(testName);
}
switch (statu... | void function(String className, String testName, int status) { TestStatistics stat = (TestStatistics) testsStatisticsHash.get(className + ";" + testName); if (stat == null) { stat = new TestStatistics(); stat.setClassName(className); stat.setMethodName(testName); } switch (status) { case Reporter.FAIL: stat.addFailCoun... | /**
* Update statistics table
*
* @param className
* @param testName
* @param status PASS\FAIL\WARNING
*/ | Update statistics table | updateStatisticsTable | {
"repo_name": "Top-Q/jsystem",
"path": "jsystem-core-projects/jsystemCore/src/main/java/jsystem/extensions/report/html/summary/HtmlSummaryReporter.java",
"license": "apache-2.0",
"size": 9938
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,475,537 |
Collection<TextualAnnotationData> getTextualAnnotations()
{
StructuredDataResults data = parent.getStructuredData();
if (data == null) return null;
return data.getTextualAnnotations();
}
| Collection<TextualAnnotationData> getTextualAnnotations() { StructuredDataResults data = parent.getStructuredData(); if (data == null) return null; return data.getTextualAnnotations(); } | /**
* Returns the collection of textual annotations.
*
* @return See above.
*/ | Returns the collection of textual annotations | getTextualAnnotations | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorModel.java",
"license": "gpl-2.0",
"size": 125983
} | [
"java.util.Collection",
"org.openmicroscopy.shoola.env.data.util.StructuredDataResults"
] | import java.util.Collection; import org.openmicroscopy.shoola.env.data.util.StructuredDataResults; | import java.util.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 770,949 |
public void deleteIndexAsync(DeleteIndexRequest deleteIndexRequest, ActionListener<DeleteIndexResponse> listener, Header... headers) {
restHighLevelClient.performRequestAsyncAndParseEntity(deleteIndexRequest, Request::deleteIndex, DeleteIndexResponse::fromXContent,
listener, Collections.emptySet... | void function(DeleteIndexRequest deleteIndexRequest, ActionListener<DeleteIndexResponse> listener, Header... headers) { restHighLevelClient.performRequestAsyncAndParseEntity(deleteIndexRequest, Request::deleteIndex, DeleteIndexResponse::fromXContent, listener, Collections.emptySet(), headers); } | /**
* Asynchronously deletes an index using the Delete Index API
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html">
* Delete Index API on elastic.co</a>
*/ | Asynchronously deletes an index using the Delete Index API See Delete Index API on elastic.co | deleteIndexAsync | {
"repo_name": "maddin2016/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java",
"license": "apache-2.0",
"size": 2711
} | [
"java.util.Collections",
"org.apache.http.Header",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest",
"org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse"
] | import java.util.Collections; import org.apache.http.Header; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse; | import java.util.*; import org.apache.http.*; import org.elasticsearch.action.*; import org.elasticsearch.action.admin.indices.delete.*; | [
"java.util",
"org.apache.http",
"org.elasticsearch.action"
] | java.util; org.apache.http; org.elasticsearch.action; | 1,507,362 |
public AndBuilder<UpperBoundary> literal( Binary literal ) {
return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal)));
} | AndBuilder<UpperBoundary> function( Binary literal ) { return new AndBuilder<UpperBoundary>(new UpperBoundary(comparisonBuilder, new Literal(literal))); } | /**
* Define the lower boundary value of a range.
*
* @param literal the literal value;
* @return the constraint builder; never null
*/ | Define the lower boundary value of a range | literal | {
"repo_name": "vhalbert/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/query/QueryBuilder.java",
"license": "apache-2.0",
"size": 126740
} | [
"javax.jcr.Binary",
"org.modeshape.jcr.query.model.Literal"
] | import javax.jcr.Binary; import org.modeshape.jcr.query.model.Literal; | import javax.jcr.*; import org.modeshape.jcr.query.model.*; | [
"javax.jcr",
"org.modeshape.jcr"
] | javax.jcr; org.modeshape.jcr; | 1,939,225 |
public static boolean isIncomingCallIntent(Intent intent) {
if (intent == null) return false;
String callId = getCallId(intent);
String offerSd = getOfferSessionDescription(intent);
return ((callId != null) && (offerSd != null));
} | static boolean function(Intent intent) { if (intent == null) return false; String callId = getCallId(intent); String offerSd = getOfferSessionDescription(intent); return ((callId != null) && (offerSd != null)); } | /**
* Checks if the intent is an incoming call broadcast intent.
*
* @param intent the intent in question
* @return true if the intent is an incoming call broadcast intent
*/ | Checks if the intent is an incoming call broadcast intent | isIncomingCallIntent | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/opt/net/voip/src/java/android/net/sip/SipManager.java",
"license": "gpl-3.0",
"size": 25361
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,414,244 |
public LoadBalanceDefinition sticky(Expression correlationExpression) {
setLoadBalancerType(new LoadBalancerDefinition(new StickyLoadBalancer(correlationExpression)));
return this;
} | LoadBalanceDefinition function(Expression correlationExpression) { setLoadBalancerType(new LoadBalancerDefinition(new StickyLoadBalancer(correlationExpression))); return this; } | /**
* Uses sticky load balancer
*
* @param correlationExpression the expression for correlation
* @return the builder
*/ | Uses sticky load balancer | sticky | {
"repo_name": "logzio/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java",
"license": "apache-2.0",
"size": 13474
} | [
"org.apache.camel.Expression",
"org.apache.camel.processor.loadbalancer.StickyLoadBalancer"
] | import org.apache.camel.Expression; import org.apache.camel.processor.loadbalancer.StickyLoadBalancer; | import org.apache.camel.*; import org.apache.camel.processor.loadbalancer.*; | [
"org.apache.camel"
] | org.apache.camel; | 315,855 |
@SuppressWarnings("unchecked")
public Object getDefaultParameterValue(Class<? extends SemanticObject> semanticClass, ParameterId parameterId) {
SemanticObject semanticObject = classToInstance.get(semanticClass);
if (semanticObject != null) {
Variable variable = semanticObject.getPara... | @SuppressWarnings(STR) Object function(Class<? extends SemanticObject> semanticClass, ParameterId parameterId) { SemanticObject semanticObject = classToInstance.get(semanticClass); if (semanticObject != null) { Variable variable = semanticObject.getParameters().get(parameterId); if (variable != null && variable.getValu... | /**
* Gets a default parameter value. This returns a value iff the semantic class, or any superclass, defines the
* parameter and assigns a value to it in that definition.
*/ | Gets a default parameter value. This returns a value iff the semantic class, or any superclass, defines the parameter and assigns a value to it in that definition | getDefaultParameterValue | {
"repo_name": "TNOCS/idsa",
"path": "project/idsa/src/main/java/nl/tno/idsa/framework/semantics_base/SemanticLibrary.java",
"license": "mit",
"size": 14460
} | [
"java.util.Set",
"nl.tno.idsa.framework.semantics_base.objects.ParameterId",
"nl.tno.idsa.framework.semantics_base.objects.SemanticObject",
"nl.tno.idsa.framework.semantics_impl.variables.Variable"
] | import java.util.Set; import nl.tno.idsa.framework.semantics_base.objects.ParameterId; import nl.tno.idsa.framework.semantics_base.objects.SemanticObject; import nl.tno.idsa.framework.semantics_impl.variables.Variable; | import java.util.*; import nl.tno.idsa.framework.semantics_base.objects.*; import nl.tno.idsa.framework.semantics_impl.variables.*; | [
"java.util",
"nl.tno.idsa"
] | java.util; nl.tno.idsa; | 427,762 |
public void setPurpose(final InternationalString newValue) {
checkWritePermission();
purpose = newValue;
} | void function(final InternationalString newValue) { checkWritePermission(); purpose = newValue; } | /**
* Sets a summary of the intentions with which the resource(s) was developed.
*
* @param newValue the new summary of intention.
*/ | Sets a summary of the intentions with which the resource(s) was developed | setPurpose | {
"repo_name": "Geomatys/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/identification/AbstractIdentification.java",
"license": "apache-2.0",
"size": 30038
} | [
"org.opengis.util.InternationalString"
] | import org.opengis.util.InternationalString; | import org.opengis.util.*; | [
"org.opengis.util"
] | org.opengis.util; | 2,340,609 |
public Map<SqlNode, RexNode> getMapConvertedNonCorrSubqs() {
return mapConvertedNonCorrSubqs;
} | Map<SqlNode, RexNode> function() { return mapConvertedNonCorrSubqs; } | /** Returns the mapping of non-correlated sub-queries that have been converted
* to the constants that they evaluate to. */ | Returns the mapping of non-correlated sub-queries that have been converted | getMapConvertedNonCorrSubqs | {
"repo_name": "vlsi/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java",
"license": "apache-2.0",
"size": 215926
} | [
"java.util.Map",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.sql.SqlNode"
] | import java.util.Map; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.SqlNode; | import java.util.*; import org.apache.calcite.rex.*; import org.apache.calcite.sql.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 1,565,279 |
// TODO: Create "cache dictionary" to cache fresh words for frequently updated dictionaries,
// considering performance regression.
protected void addWord(final String word, final String shortcutTarget, final int frequency) {
if (shortcutTarget == null) {
mFusionDictionary.add(word, freq... | void function(final String word, final String shortcutTarget, final int frequency) { if (shortcutTarget == null) { mFusionDictionary.add(word, frequency, null); } else { final ArrayList<WeightedString> shortcutTargets = new ArrayList<WeightedString>(); shortcutTargets.add(new WeightedString(shortcutTarget, frequency));... | /**
* Adds a word unigram to the fusion dictionary. Call updateBinaryDictionary when all changes
* are done to update the binary dictionary.
*/ | Adds a word unigram to the fusion dictionary. Call updateBinaryDictionary when all changes are done to update the binary dictionary | addWord | {
"repo_name": "soeminnminn/MyanmarIME",
"path": "src/com/androidtweak/inputmethod/myanmar/ExpandableBinaryDictionary.java",
"license": "gpl-2.0",
"size": 19069
} | [
"com.androidtweak.inputmethod.myanmar.makedict.FusionDictionary",
"java.util.ArrayList"
] | import com.androidtweak.inputmethod.myanmar.makedict.FusionDictionary; import java.util.ArrayList; | import com.androidtweak.inputmethod.myanmar.makedict.*; import java.util.*; | [
"com.androidtweak.inputmethod",
"java.util"
] | com.androidtweak.inputmethod; java.util; | 1,091,160 |
public void test(TestHarness harness)
{
// create instance of a class Double
Object o = new Character('!');
// get a runtime class of an object "o"
Class c = o.getClass();
harness.check(c.getSimpleName(), "Character");
} | void function(TestHarness harness) { Object o = new Character('!'); Class c = o.getClass(); harness.check(c.getSimpleName(), STR); } | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/Character/classInfo/getSimpleName.java",
"license": "gpl-2.0",
"size": 1557
} | [
"gnu.testlet.TestHarness",
"java.lang.Character"
] | import gnu.testlet.TestHarness; import java.lang.Character; | import gnu.testlet.*; import java.lang.*; | [
"gnu.testlet",
"java.lang"
] | gnu.testlet; java.lang; | 2,631,066 |
public CountDownLatch updateReturnNoteAsync(com.mozu.api.contracts.commerceruntime.orders.OrderNote returnNote, String returnId, String noteId, AsyncCallback<com.mozu.api.contracts.commerceruntime.orders.OrderNote> callback) throws Exception
{
return updateReturnNoteAsync( returnNote, returnId, noteId, null,... | CountDownLatch function(com.mozu.api.contracts.commerceruntime.orders.OrderNote returnNote, String returnId, String noteId, AsyncCallback<com.mozu.api.contracts.commerceruntime.orders.OrderNote> callback) throws Exception { return updateReturnNoteAsync( returnNote, returnId, noteId, null, callback); } | /**
*
* <p><pre><code>
* OrderNote ordernote = new OrderNote();
* CountDownLatch latch = ordernote.updateReturnNote( returnNote, returnId, noteId, callback );
* latch.await() * </code></pre></p>
* @param noteId Unique identifier of a particular note to retrieve.
* @param returnId Unique identif... | <code><code> OrderNote ordernote = new OrderNote(); CountDownLatch latch = ordernote.updateReturnNote( returnNote, returnId, noteId, callback ); latch.await() * </code></code> | updateReturnNoteAsync | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/returns/OrderNoteResource.java",
"license": "mit",
"size": 16493
} | [
"com.mozu.api.AsyncCallback",
"java.util.concurrent.CountDownLatch"
] | import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch; | import com.mozu.api.*; import java.util.concurrent.*; | [
"com.mozu.api",
"java.util"
] | com.mozu.api; java.util; | 1,371,449 |
List<GriffonClass> getAllClasses(); | List<GriffonClass> getAllClasses(); | /**
* Finds all artifact classes.<p>
*/ | Finds all artifact classes | getAllClasses | {
"repo_name": "breskeby/griffon",
"path": "subprojects/rt/src/main/groovy/griffon/core/ArtifactManager.java",
"license": "apache-2.0",
"size": 3052
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,015,316 |
public void testSerializationMap() {
// Create LazyArrayList for DynaBeans
LazyDynaList target = new LazyDynaList(treeMapDynaClass);
LazyDynaMap bean = (LazyDynaMap)target.get(0);
// Set a Property
assertNull("pre-set check", bean.get(BASIC_PROP1));
bean.set(BASIC_P... | void function() { LazyDynaList target = new LazyDynaList(treeMapDynaClass); LazyDynaMap bean = (LazyDynaMap)target.get(0); assertNull(STR, bean.get(BASIC_PROP1)); bean.set(BASIC_PROP1, STR); assertEquals(STR, STR, bean.get(BASIC_PROP1)); final LazyDynaList result = (LazyDynaList)serializeDeserialize(target, "Map"); tar... | /**
* Test Map serialization.
*/ | Test Map serialization | testSerializationMap | {
"repo_name": "mohanaraosv/commons-beanutils",
"path": "src/test/java/org/apache/commons/beanutils/LazyDynaListTestCase.java",
"license": "apache-2.0",
"size": 21955
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,257,595 |
boolean connect(DBRProgressMonitor monitor, boolean initialize, boolean reflect) throws DBException; | boolean connect(DBRProgressMonitor monitor, boolean initialize, boolean reflect) throws DBException; | /**
* Connects to datasource.
* This is async method and returns immediately.
* Connection will be opened in separate job, so no progress monitor is required.
* @param monitor progress monitor
* @param initialize initialize datasource after connect (call DBPDataSource.initialize)
* @param ... | Connects to datasource. This is async method and returns immediately. Connection will be opened in separate job, so no progress monitor is required | connect | {
"repo_name": "ruspl-afed/dbeaver",
"path": "plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/DBPDataSourceContainer.java",
"license": "apache-2.0",
"size": 6215
} | [
"org.jkiss.dbeaver.DBException",
"org.jkiss.dbeaver.model.runtime.DBRProgressMonitor"
] | import org.jkiss.dbeaver.DBException; import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor; | import org.jkiss.dbeaver.*; import org.jkiss.dbeaver.model.runtime.*; | [
"org.jkiss.dbeaver"
] | org.jkiss.dbeaver; | 1,618,838 |
public static Cursor
convertCursor(Element e, BridgeContext ctx) {
return ctx.getCursorManager().convertCursor(e);
}
////////////////////////////////////////////////////////////////////////
// 'color-rendering', 'text-rendering', 'image-rendering',
// 'shape-rendering'
/////////... | static Cursor function(Element e, BridgeContext ctx) { return ctx.getCursorManager().convertCursor(e); } | /**
* Returns the Cursor corresponding to the input element's
* cursor property
*
* @param e the element
*/ | Returns the Cursor corresponding to the input element's cursor property | convertCursor | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/bridge/CSSUtilities.java",
"license": "apache-2.0",
"size": 35479
} | [
"java.awt.Cursor",
"org.w3c.dom.Element"
] | import java.awt.Cursor; import org.w3c.dom.Element; | import java.awt.*; import org.w3c.dom.*; | [
"java.awt",
"org.w3c.dom"
] | java.awt; org.w3c.dom; | 1,153,750 |
public static File getFile(Context context, Uri uri) {
if (uri != null) {
String path = getPath(context, uri);
if (path != null && isLocal(path)) {
return new File(path);
}
}
return null;
} | static File function(Context context, Uri uri) { if (uri != null) { String path = getPath(context, uri); if (path != null && isLocal(path)) { return new File(path); } } return null; } | /**
* Convert Uri into File, if possible.
*
* @return file A local file that the Uri was pointing to, or null if the
* Uri is unsupported or pointed to a remote resource.
* @see #getPath(android.content.Context, android.net.Uri)
* @author paulburke
*/ | Convert Uri into File, if possible | getFile | {
"repo_name": "liangie/chooserTest",
"path": "app/src/main/java/com/ipaulpro/afilechooser/utils/FileUtils.java",
"license": "apache-2.0",
"size": 17312
} | [
"android.content.Context",
"android.net.Uri",
"java.io.File"
] | import android.content.Context; import android.net.Uri; import java.io.File; | import android.content.*; import android.net.*; import java.io.*; | [
"android.content",
"android.net",
"java.io"
] | android.content; android.net; java.io; | 595,210 |
Source getCondition(); | Source getCondition(); | /**
* Returns the value of the '<em><b>Condition</b></em>' containment reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Condition</em>' containment reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of t... | Returns the value of the 'Condition' containment reference. If the meaning of the 'Condition' containment reference isn't clear, there really should be more of a description here... | getCondition | {
"repo_name": "Nasdanika/amur-it-js",
"path": "org.nasdanika.amur.it.js.foundation/src/org/nasdanika/amur/it/js/foundation/Transition.java",
"license": "epl-1.0",
"size": 6227
} | [
"org.nasdanika.amur.lang.Source"
] | import org.nasdanika.amur.lang.Source; | import org.nasdanika.amur.lang.*; | [
"org.nasdanika.amur"
] | org.nasdanika.amur; | 299,526 |
List<String> getDocumentListing() throws EXistException, PermissionDeniedException; | List<String> getDocumentListing() throws EXistException, PermissionDeniedException; | /**
* Get a list of all documents contained in the database.
*
* @return list of document paths
* @throws org.exist.EXistException
* @throws org.exist.security.PermissionDeniedException
*/ | Get a list of all documents contained in the database | getDocumentListing | {
"repo_name": "RemiKoutcherawy/exist",
"path": "exist-core/src/main/java/org/exist/xmlrpc/RpcAPI.java",
"license": "lgpl-2.1",
"size": 39647
} | [
"java.util.List",
"org.exist.EXistException",
"org.exist.security.PermissionDeniedException"
] | import java.util.List; import org.exist.EXistException; import org.exist.security.PermissionDeniedException; | import java.util.*; import org.exist.*; import org.exist.security.*; | [
"java.util",
"org.exist",
"org.exist.security"
] | java.util; org.exist; org.exist.security; | 1,627,050 |
public QName getName() {
return name;
} | QName function() { return name; } | /**
* Return the qualified name of the processor.
*
* @return the qualified name of the processor
*/ | Return the qualified name of the processor | getName | {
"repo_name": "wesley1001/orbeon-forms",
"path": "src/main/java/org/orbeon/oxf/pipeline/api/ProcessorDefinition.java",
"license": "lgpl-2.1",
"size": 3587
} | [
"org.dom4j.QName"
] | import org.dom4j.QName; | import org.dom4j.*; | [
"org.dom4j"
] | org.dom4j; | 1,294,015 |
protected void deleteShapefile(BreadSlice<?, File> slice) {
new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".shp").delete();
new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".shx").delete();
new File(slice.getWorkSurface(), slice.getId... | void function(BreadSlice<?, File> slice) { new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".shp").delete(); new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".shx").delete(); new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".dbf").delet... | /**
* Allow us to spy on when a shapefile has been requested to be deleted
*/ | Allow us to spy on when a shapefile has been requested to be deleted | deleteShapefile | {
"repo_name": "NERC-CEH/dynamo-mapping",
"path": "src/main/java/uk/ac/ceh/dynamo/bread/ShapefileGenerator.java",
"license": "gpl-2.0",
"size": 7511
} | [
"java.io.File",
"java.io.FilenameFilter"
] | import java.io.File; import java.io.FilenameFilter; | import java.io.*; | [
"java.io"
] | java.io; | 2,717,287 |
public interface FilteredAny2AnyChannel extends Any2AnyChannel
{
public ReadFiltered inFilter();
| interface FilteredAny2AnyChannel extends Any2AnyChannel { public ReadFiltered function(); | /**
* Returns an interface for configuring read filters on the channel.
*/ | Returns an interface for configuring read filters on the channel | inFilter | {
"repo_name": "codehaus/jcsp",
"path": "src/org/jcsp/util/filter/FilteredAny2AnyChannel.java",
"license": "lgpl-2.1",
"size": 2732
} | [
"org.jcsp.lang.Any2AnyChannel"
] | import org.jcsp.lang.Any2AnyChannel; | import org.jcsp.lang.*; | [
"org.jcsp.lang"
] | org.jcsp.lang; | 1,114,082 |
public static void writeFile(File outputFile, String text) throws Exception {
Writer writer;
try {
writer = new FileWriter(outputFile);
} catch (IOException e) {
throw new Exception("Couldn't create writer", e);
}
try {
writer.write(text);
writer.close();
} catch (IOException e) {
throw... | static void function(File outputFile, String text) throws Exception { Writer writer; try { writer = new FileWriter(outputFile); } catch (IOException e) { throw new Exception(STR, e); } try { writer.write(text); writer.close(); } catch (IOException e) { throw new Exception(STR + outputFile.getAbsolutePath(), e); } } | /**
* Writes the given text string into a file
*
* @param output File The file to write into
* @param text The text to write into the file
* @throws Exception
*/ | Writes the given text string into a file | writeFile | {
"repo_name": "aquast/SIP-Builder",
"path": "src/main/java/de/uzk/hki/da/sb/Utilities.java",
"license": "gpl-3.0",
"size": 7753
} | [
"java.io.File",
"java.io.FileWriter",
"java.io.IOException",
"java.io.Writer"
] | import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 610,730 |
IBox getBox(ItemStack stack); | IBox getBox(ItemStack stack); | /**
* This function can be used for SPOT and AREA types.
* @param stack
* @return The box representing the map location.
*/ | This function can be used for SPOT and AREA types | getBox | {
"repo_name": "hea3ven/BuildCraft",
"path": "api/buildcraft/api/items/IMapLocation.java",
"license": "lgpl-3.0",
"size": 1439
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 668,546 |
private void convertAndAnalyze(IntIntOpenHashMap grouped,
final WrappedBoolean stop,
final WrappedInteger progress) {
// Convert
int[][] temp = new int[grouped.size()][2];
int idx = 0;
final int[] values2 =... | void function(IntIntOpenHashMap grouped, final WrappedBoolean stop, final WrappedInteger progress) { int[][] temp = new int[grouped.size()][2]; int idx = 0; final int[] values2 = grouped.values; final int[] keys2 = grouped.keys; final boolean[] states2 = grouped.allocated; for (int i = 0; i < states2.length; i++) { if ... | /**
* Convert and analyze
*
* @param grouped
* @param stop
* @param progress
*/ | Convert and analyze | convertAndAnalyze | {
"repo_name": "fstahnke/arx",
"path": "src/main/org/deidentifier/arx/risk/RiskModelHistogram.java",
"license": "apache-2.0",
"size": 7297
} | [
"com.carrotsearch.hppc.IntIntOpenHashMap",
"org.deidentifier.arx.common.WrappedBoolean",
"org.deidentifier.arx.common.WrappedInteger",
"org.deidentifier.arx.exceptions.ComputationInterruptedException"
] | import com.carrotsearch.hppc.IntIntOpenHashMap; import org.deidentifier.arx.common.WrappedBoolean; import org.deidentifier.arx.common.WrappedInteger; import org.deidentifier.arx.exceptions.ComputationInterruptedException; | import com.carrotsearch.hppc.*; import org.deidentifier.arx.common.*; import org.deidentifier.arx.exceptions.*; | [
"com.carrotsearch.hppc",
"org.deidentifier.arx"
] | com.carrotsearch.hppc; org.deidentifier.arx; | 2,662,832 |
@Override
protected void handleActionRequestInternal(ActionRequest request, ActionResponse response)
throws Exception {
// Form submission or new form to show?
if (isFormSubmission(request)) {
// Fetch form object, bind, validate, process submission.
try {
Object command = getCommand(request);
... | void function(ActionRequest request, ActionResponse response) throws Exception { if (isFormSubmission(request)) { try { Object command = getCommand(request); if (logger.isDebugEnabled()) { logger.debug(STR + isRedirectAction() + ")"); } if (!isRedirectAction()) { setFormSubmit(response); } PortletRequestDataBinder bind... | /**
* Handles action phase of two cases: form submissions and showing a new form.
* Delegates the decision between the two to {@code isFormSubmission},
* always treating requests without existing form session attribute
* as new form when using session form mode.
* @see #isFormSubmission
* @see #processFormS... | Handles action phase of two cases: form submissions and showing a new form. Delegates the decision between the two to isFormSubmission, always treating requests without existing form session attribute as new form when using session form mode | handleActionRequestInternal | {
"repo_name": "kingtang/spring-learn",
"path": "spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java",
"license": "gpl-3.0",
"size": 42481
} | [
"javax.portlet.ActionRequest",
"javax.portlet.ActionResponse",
"org.springframework.validation.BindException",
"org.springframework.web.portlet.bind.PortletRequestDataBinder",
"org.springframework.web.portlet.handler.PortletSessionRequiredException"
] | import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import org.springframework.validation.BindException; import org.springframework.web.portlet.bind.PortletRequestDataBinder; import org.springframework.web.portlet.handler.PortletSessionRequiredException; | import javax.portlet.*; import org.springframework.validation.*; import org.springframework.web.portlet.bind.*; import org.springframework.web.portlet.handler.*; | [
"javax.portlet",
"org.springframework.validation",
"org.springframework.web"
] | javax.portlet; org.springframework.validation; org.springframework.web; | 901,546 |
public void
checkLoadExternalResource(ParsedURL resourceURL,
ParsedURL docURL) throws SecurityException {
userAgent.checkLoadExternalResource(resourceURL,
docURL);
} | void function(ParsedURL resourceURL, ParsedURL docURL) throws SecurityException { userAgent.checkLoadExternalResource(resourceURL, docURL); } | /**
* This method throws a SecurityException if the resource
* found at url and referenced from docURL
* should not be loaded.
*
* This is a convenience method to call checkLoadExternalResource
* on the ExternalResourceSecurity strategy returned by
* getExternalResourceSecurity.
... | This method throws a SecurityException if the resource found at url and referenced from docURL should not be loaded. This is a convenience method to call checkLoadExternalResource on the ExternalResourceSecurity strategy returned by getExternalResourceSecurity | checkLoadExternalResource | {
"repo_name": "apache/batik",
"path": "batik-bridge/src/main/java/org/apache/batik/bridge/BridgeContext.java",
"license": "apache-2.0",
"size": 69332
} | [
"org.apache.batik.util.ParsedURL"
] | import org.apache.batik.util.ParsedURL; | import org.apache.batik.util.*; | [
"org.apache.batik"
] | org.apache.batik; | 2,843,800 |
public ServiceFuture<List<NetworkWatcherInner>> listAsync(final ServiceCallback<List<NetworkWatcherInner>> serviceCallback) {
return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback);
} | ServiceFuture<List<NetworkWatcherInner>> function(final ServiceCallback<List<NetworkWatcherInner>> serviceCallback) { return ServiceFuture.fromResponse(listWithServiceResponseAsync(), serviceCallback); } | /**
* Gets all network watchers by subscription.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
*/ | Gets all network watchers by subscription | listAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/NetworkWatchersInner.java",
"license": "mit",
"size": 186527
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 624,868 |
@Test
public void testCreateGatewayReceiver_onMember() {
VM puneLocator = Host.getLocator();
int dsIdPort = puneLocator.invoke(this::getLocatorPort);
propsSetUp(dsIdPort);
vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort));
vm3.invoke(() -> createCache(dsIdPort));
vm4.invoke(() -> crea... | void function() { VM puneLocator = Host.getLocator(); int dsIdPort = puneLocator.invoke(this::getLocatorPort); propsSetUp(dsIdPort); vm2.invoke(() -> createFirstRemoteLocator(2, dsIdPort)); vm3.invoke(() -> createCache(dsIdPort)); vm4.invoke(() -> createCache(dsIdPort)); vm5.invoke(() -> createCache(dsIdPort)); final D... | /**
* GatewayReceiver with given attributes on the given member.
*/ | GatewayReceiver with given attributes on the given member | testCreateGatewayReceiver_onMember | {
"repo_name": "shankarh/geode",
"path": "geode-wan/src/test/java/org/apache/geode/internal/cache/wan/wancommand/CreateGatewayReceiverCommandDUnitTest.java",
"license": "apache-2.0",
"size": 24828
} | [
"java.util.List",
"org.apache.geode.distributed.DistributedMember",
"org.apache.geode.management.cli.Result",
"org.apache.geode.management.internal.cli.i18n.CliStrings",
"org.apache.geode.management.internal.cli.result.CommandResult",
"org.apache.geode.management.internal.cli.result.TabularResultData",
... | import java.util.List; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.management.cli.Result; import org.apache.geode.management.internal.cli.i18n.CliStrings; import org.apache.geode.management.internal.cli.result.CommandResult; import org.apache.geode.management.internal.cli.result.Tabul... | import java.util.*; import org.apache.geode.distributed.*; import org.apache.geode.management.cli.*; import org.apache.geode.management.internal.cli.i18n.*; import org.apache.geode.management.internal.cli.result.*; import org.apache.geode.test.dunit.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,066,051 |
public void setRouteAdvanceValue(YangEnumeration routeAdvanceValue)
throws JNCException {
setLeafValue(Epc.NAMESPACE,
"route-advance",
routeAdvanceValue,
childrenNames());
} | void function(YangEnumeration routeAdvanceValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, routeAdvanceValue, childrenNames()); } | /**
* Sets the value for child leaf "route-advance",
* using instance of generated typedef class.
* @param routeAdvanceValue The value to set.
* @param routeAdvanceValue used during instantiation.
*/ | Sets the value for child leaf "route-advance", using instance of generated typedef class | setRouteAdvanceValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/interface_/nas/MmeNasSgsnSm.java",
"license": "apache-2.0",
"size": 38827
} | [
"com.tailf.jnc.YangEnumeration"
] | import com.tailf.jnc.YangEnumeration; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 562,155 |
Set<OpenstackNode> nodes(NodeType type); | Set<OpenstackNode> nodes(NodeType type); | /**
* Returns all nodes with the specified type.
*
* @param type node type
* @return set of openstack nodes
*/ | Returns all nodes with the specified type | nodes | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "apps/openstacknode/api/src/main/java/org/onosproject/openstacknode/api/OpenstackNodeService.java",
"license": "apache-2.0",
"size": 2217
} | [
"java.util.Set",
"org.onosproject.openstacknode.api.OpenstackNode"
] | import java.util.Set; import org.onosproject.openstacknode.api.OpenstackNode; | import java.util.*; import org.onosproject.openstacknode.api.*; | [
"java.util",
"org.onosproject.openstacknode"
] | java.util; org.onosproject.openstacknode; | 1,016,683 |
void cleanup(CleanupRequest request, ActionListener <CleanupResponse> listener); | void cleanup(CleanupRequest request, ActionListener <CleanupResponse> listener); | /**
* Explicitly cleanup one or more indices (cleanup Cassandra keyspaces).
*
* @param request The cleanup request
* @param listener A listener to be notified with a result
* @see org.elasticsearch.client.Requests#cleanupRequest(String...)
*/ | Explicitly cleanup one or more indices (cleanup Cassandra keyspaces) | cleanup | {
"repo_name": "strapdata/elassandra-test",
"path": "core/src/main/java/org/elasticsearch/client/IndicesAdminClient.java",
"license": "apache-2.0",
"size": 34405
} | [
"org.elassandra.action.admin.indices.cleanup.CleanupRequest",
"org.elassandra.action.admin.indices.cleanup.CleanupResponse",
"org.elasticsearch.action.ActionListener"
] | import org.elassandra.action.admin.indices.cleanup.CleanupRequest; import org.elassandra.action.admin.indices.cleanup.CleanupResponse; import org.elasticsearch.action.ActionListener; | import org.elassandra.action.admin.indices.cleanup.*; import org.elasticsearch.action.*; | [
"org.elassandra.action",
"org.elasticsearch.action"
] | org.elassandra.action; org.elasticsearch.action; | 2,741,480 |
public static RuntimeCamelException wrapRuntimeCamelException(Throwable e) {
if (e instanceof RuntimeCamelException) {
// don't double wrap
return (RuntimeCamelException)e;
} else {
return new RuntimeCamelException(e);
}
} | static RuntimeCamelException function(Throwable e) { if (e instanceof RuntimeCamelException) { return (RuntimeCamelException)e; } else { return new RuntimeCamelException(e); } } | /**
* Wraps the caused exception in a {@link RuntimeCamelException} if its not
* already such an exception.
*
* @param e the caused exception
* @return the wrapper exception
*/ | Wraps the caused exception in a <code>RuntimeCamelException</code> if its not already such an exception | wrapRuntimeCamelException | {
"repo_name": "RohanHart/camel",
"path": "camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java",
"license": "apache-2.0",
"size": 73945
} | [
"org.apache.camel.RuntimeCamelException"
] | import org.apache.camel.RuntimeCamelException; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,675,501 |
public void setConfig(Config config) {
this.config = config;
} | void function(Config config) { this.config = config; } | /**
* set config
*
* @param config
* config
*/ | set config | setConfig | {
"repo_name": "AKSW/LIMES-dev",
"path": "limes-gui/src/main/java/org/aksw/limes/core/gui/model/ml/MachineLearningModel.java",
"license": "gpl-3.0",
"size": 4937
} | [
"org.aksw.limes.core.gui.model.Config"
] | import org.aksw.limes.core.gui.model.Config; | import org.aksw.limes.core.gui.model.*; | [
"org.aksw.limes"
] | org.aksw.limes; | 1,084,508 |
public static void updateSubtitle(SRTInfo info, SRT srt) {
info.add(srt);
} | static void function(SRTInfo info, SRT srt) { info.add(srt); } | /**
* Updates the subtitle from the SRTInfo object.
*
* @param info the SRTInfo object
* @param srt the SRT object
*/ | Updates the subtitle from the SRTInfo object | updateSubtitle | {
"repo_name": "fredyw/jsrt",
"path": "jsrt-api/src/main/java/org/fredy/jsrt/editor/SRTEditor.java",
"license": "mit",
"size": 9667
} | [
"org.fredy.jsrt.api.SRTInfo"
] | import org.fredy.jsrt.api.SRTInfo; | import org.fredy.jsrt.api.*; | [
"org.fredy.jsrt"
] | org.fredy.jsrt; | 109,583 |
public Select orderBy(Ordering... orderings) {
if (this.orderings != null)
throw new IllegalStateException("An ORDER BY clause has already been provided");
this.orderings = Arrays.asList(orderings);
for (int i = 0; i < orderings.length; i++)
checkForBindMarkers(order... | Select function(Ordering... orderings) { if (this.orderings != null) throw new IllegalStateException(STR); this.orderings = Arrays.asList(orderings); for (int i = 0; i < orderings.length; i++) checkForBindMarkers(orderings[i]); return this; } | /**
* Adds an ORDER BY clause to this statement.
*
* @param orderings the orderings to define for this query.
* @return this statement.
*
* @throws IllegalStateException if an ORDER BY clause has already been
* provided.
*/ | Adds an ORDER BY clause to this statement | orderBy | {
"repo_name": "adutra/java-driver",
"path": "driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java",
"license": "apache-2.0",
"size": 17479
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 695,433 |
public void fadeToScreen()
{
System.out.println("MainScreen fadeToScreen:");
// race condition!
this.logo.addAction(Actions.sequence(Actions.fadeOut(1.75f), Actions.run(this.onMenuFinish)));
if (this.menuMusic.getVolume() > 0)
{
this.menuMusic.setVolume(this.menuMusic.getVolume() - 0.01f);
}
this.m... | void function() { System.out.println(STR); this.logo.addAction(Actions.sequence(Actions.fadeOut(1.75f), Actions.run(this.onMenuFinish))); if (this.menuMusic.getVolume() > 0) { this.menuMusic.setVolume(this.menuMusic.getVolume() - 0.01f); } this.menuMusic.stop(); } | /**
* TODO Fix the screen fading IT DOES NOT WORK
*
* @param screen
*/ | TODO Fix the screen fading IT DOES NOT WORK | fadeToScreen | {
"repo_name": "xzela/jastroblast",
"path": "jastroblast-core/src/org/doublelong/jastroblast/screen/MainScreen.java",
"license": "mit",
"size": 3034
} | [
"com.badlogic.gdx.scenes.scene2d.actions.Actions"
] | import com.badlogic.gdx.scenes.scene2d.actions.Actions; | import com.badlogic.gdx.scenes.scene2d.actions.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 480,085 |
private Edge findOrCreateEdge(Node src, Node dest) {
Edge edge = null;
for (Enumeration<OPT_VisEdge> e = src.edges(); e.hasMoreElements();) {
Edge candidate = (Edge) e.nextElement();
if (candidate.toNode() == dest) {
edge = candidate;
break;
}
}
if (edge == null) {
... | Edge function(Node src, Node dest) { Edge edge = null; for (Enumeration<OPT_VisEdge> e = src.edges(); e.hasMoreElements();) { Edge candidate = (Edge) e.nextElement(); if (candidate.toNode() == dest) { edge = candidate; break; } } if (edge == null) { edge = new Edge(src, dest); addGraphEdge(edge); } return edge; } | /**
* find or create an edge in the graph
*/ | find or create an edge in the graph | findOrCreateEdge | {
"repo_name": "rmcilroy/HeraJVM",
"path": "rvm/src/org/jikesrvm/compilers/opt/OPT_CoalesceGraph.java",
"license": "epl-1.0",
"size": 2978
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,228,001 |
private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {
if (this.eventIdCounter == 1) {
saveLabel.setForeground(Color.red);
saveLabel.setText("No events to save. Create at least one event.");
}
else {
if (this.mode == CreationWind... | void function(java.awt.event.ActionEvent evt) { if (this.eventIdCounter == 1) { saveLabel.setForeground(Color.red); saveLabel.setText(STR); } else { if (this.mode == CreationWindowMode.SAVE) { this.saveEventsInFile(); } else { this.addEventToExecution(); } } } | /**
* Executes operations controled by 'saveConfig' button.
*
* Performs differents operations depends on the mode of the window:
* - If mode is 'SAVE', saves created/modified events in a file.
* - If mode is 'ADD', events are added to Event Clock during execution time.
*
* @pa... | Executes operations controled by 'saveConfig' button. Performs differents operations depends on the mode of the window: - If mode is 'SAVE', saves created/modified events in a file. - If mode is 'ADD', events are added to Event Clock during execution time | saveButtonActionPerformed | {
"repo_name": "amcajal/ermon",
"path": "project/dev/gui/CreationWindow.java",
"license": "gpl-3.0",
"size": 54660
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,851,158 |
public void modified() {
modified(new Date());
} | void function() { modified(new Date()); } | /**
* The content has changed, reset the modified date and the etag
*/ | The content has changed, reset the modified date and the etag | modified | {
"repo_name": "majianxiong/maera",
"path": "webresource/src/main/java/org/maera/plugin/servlet/util/LastModifiedHandler.java",
"license": "bsd-3-clause",
"size": 3619
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,389,085 |
T getWrapper(@Nonnull UUID uuid, @Nullable String plrName); | T getWrapper(@Nonnull UUID uuid, @Nullable String plrName); | /**
* Wraps a player by name and uuid.
*
* @param uuid the unique id of the wrapped player
* @param plrName name of the wrapped player.
* @return a T wrapping plrName.
* @see PlayerWrapper#PlayerWrapper(java.util.UUID, String, SafeSql)
*/ | Wraps a player by name and uuid | getWrapper | {
"repo_name": "xxyy/xyc",
"path": "games/src/main/java/li/l1t/common/games/data/PlayerWrapperFactory.java",
"license": "mit",
"size": 3330
} | [
"javax.annotation.Nonnull",
"javax.annotation.Nullable"
] | import javax.annotation.Nonnull; import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,265,674 |
Rule Tuplet() {
return Sequence(
suppr("("),
CharRange('2', '9').label("DIGITS").suppressSubnodes(),
OptionalS(SequenceS(
String(":").label(":"),
Optional(CharRange('1', '9')).label("DIGITS").suppressSubnodes(),
OptionalS(SequenceS(
String(":").label(":"),
Opt... | Rule Tuplet() { return Sequence( suppr("("), CharRange('2', '9').label(STR).suppressSubnodes(), OptionalS(SequenceS( String(":").label(":"), Optional(CharRange('1', '9')).label(STR).suppressSubnodes(), OptionalS(SequenceS( String(":").label(":"), OptionalS(DIGITS()) )) ) ) ).label(Tuplet); } | /**
* tuplet ::= "("1*DIGIT [":" [1*DIGIT] ":" [1*DIGIT]]
* <br>%ignored: 2*(*t-elem stem)
*/ | tuplet ::= "("1*DIGIT [":" [1*DIGIT] ":" [1*DIGIT]] %ignored: 2*(*t-elem stem) | Tuplet | {
"repo_name": "Sciss/abc4j",
"path": "abc/src/main/java/abc/parser/AbcGrammar.java",
"license": "lgpl-3.0",
"size": 72845
} | [
"org.parboiled.Rule"
] | import org.parboiled.Rule; | import org.parboiled.*; | [
"org.parboiled"
] | org.parboiled; | 735,963 |
RedisFuture<String> readOnly(); | RedisFuture<String> readOnly(); | /**
* Switch connection to Read-Only mode when connecting to a cluster.
*
* @return String simple-string-reply.
*/ | Switch connection to Read-Only mode when connecting to a cluster | readOnly | {
"repo_name": "taer/lettuce",
"path": "src/main/java/com/lambdaworks/redis/api/async/BaseRedisAsyncCommands.java",
"license": "apache-2.0",
"size": 3602
} | [
"com.lambdaworks.redis.RedisFuture"
] | import com.lambdaworks.redis.RedisFuture; | import com.lambdaworks.redis.*; | [
"com.lambdaworks.redis"
] | com.lambdaworks.redis; | 164,044 |
public void setImage(Bitmap bmp) {
Pix image = ReadFile.readBitmap(bmp);
if (image == null) {
throw new RuntimeException("Failed to read bitmap");
}
nativeSetImagePix(image.getNativePix());
} | void function(Bitmap bmp) { Pix image = ReadFile.readBitmap(bmp); if (image == null) { throw new RuntimeException(STR); } nativeSetImagePix(image.getNativePix()); } | /**
* Provides an image for Tesseract to recognize. Does not copy the image
* buffer. The source image must persist until after Recognize or
* GetUTF8Chars is called.
*
* @param bmp bitmap representation of the image
*/ | Provides an image for Tesseract to recognize. Does not copy the image buffer. The source image must persist until after Recognize or GetUTF8Chars is called | setImage | {
"repo_name": "winlqvin/AdTranslator-with-textfairy",
"path": "tess-two/tess-two/src/com/googlecode/tesseract/android/TessBaseAPI.java",
"license": "apache-2.0",
"size": 22387
} | [
"android.graphics.Bitmap",
"com.googlecode.leptonica.android.Pix",
"com.googlecode.leptonica.android.ReadFile"
] | import android.graphics.Bitmap; import com.googlecode.leptonica.android.Pix; import com.googlecode.leptonica.android.ReadFile; | import android.graphics.*; import com.googlecode.leptonica.android.*; | [
"android.graphics",
"com.googlecode.leptonica"
] | android.graphics; com.googlecode.leptonica; | 2,275,867 |
@SuppressWarnings("unchecked")
private static <T> T createCustomComponent(Class<T> componentType, Class<?> componentClass,
Map<String, String> configProperties) throws Exception {
if (componentClass == null) {
throw new IllegalArgumentException("Invalid component spec (class not ... | @SuppressWarnings(STR) static <T> T function(Class<T> componentType, Class<?> componentClass, Map<String, String> configProperties) throws Exception { if (componentClass == null) { throw new IllegalArgumentException(STR); } try { Constructor<?> constructor = componentClass.getConstructor(Map.class); return (T) construc... | /**
* Creates a custom component from a loaded class.
* @param componentType
* @param componentClass
* @param configProperties
*/ | Creates a custom component from a loaded class | createCustomComponent | {
"repo_name": "kunallimaye/apiman",
"path": "manager/api/micro/src/main/java/io/apiman/manager/api/micro/ManagerApiMicroServiceCdiFactory.java",
"license": "apache-2.0",
"size": 13442
} | [
"java.lang.reflect.Constructor",
"java.util.Map"
] | import java.lang.reflect.Constructor; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 567,011 |
private List<Integer> toList (JSONArray ary) {
ArrayList<Integer> list = new ArrayList<Integer>();
for (int i = 0; i < ary.length(); i++) {
list.add(ary.optInt(i));
}
return list;
} | List<Integer> function (JSONArray ary) { ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < ary.length(); i++) { list.add(ary.optInt(i)); } return list; } | /**
* Convert JSON array of integers to List.
*
* @param ary
* Array of integers
*/ | Convert JSON array of integers to List | toList | {
"repo_name": "DayBr3ak/cordova-plugin-local-notifications",
"path": "src/android/LocalNotification.java",
"license": "apache-2.0",
"size": 18251
} | [
"java.util.ArrayList",
"java.util.List",
"org.json.JSONArray"
] | import java.util.ArrayList; import java.util.List; import org.json.JSONArray; | import java.util.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 1,079,899 |
@Message(id = 320, value = "interval duration is negative")
IllegalArgumentException invalidIntervalDuration(); | @Message(id = 320, value = STR) IllegalArgumentException invalidIntervalDuration(); | /**
* Creates an exception indicating the interval duration is negative
*
* @return an {@link IllegalArgumentException} for the error.
*/ | Creates an exception indicating the interval duration is negative | invalidIntervalDuration | {
"repo_name": "xasx/wildfly",
"path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java",
"license": "lgpl-2.1",
"size": 147231
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 49,865 |
@Override
public String findInExternal(String id, Citation citation) {
// Use content negotiation on the resolver API (wider variety of sources)
CrossrefResolverAPI resolverAPI = new CrossrefResolverAPI();
String json = resolverAPI.findInExternal(id, citation);
// If the content... | String function(String id, Citation citation) { CrossrefResolverAPI resolverAPI = new CrossrefResolverAPI(); String json = resolverAPI.findInExternal(id, citation); if (json == null) { CrossrefNativeAPI nativeAPI = new CrossrefNativeAPI(); json = nativeAPI.findInExternal(id, citation); } return json; } | /**
* Look up the DOI in CrossRef, and populate a citation object
*
* @param id
* @param citation
* @return
*/ | Look up the DOI in CrossRef, and populate a citation object | findInExternal | {
"repo_name": "vivo-project/VIVO",
"path": "api/src/main/java/org/vivoweb/webapp/createandlink/crossref/CrossrefCreateAndLinkResourceProvider.java",
"license": "bsd-3-clause",
"size": 3653
} | [
"org.vivoweb.webapp.createandlink.Citation"
] | import org.vivoweb.webapp.createandlink.Citation; | import org.vivoweb.webapp.createandlink.*; | [
"org.vivoweb.webapp"
] | org.vivoweb.webapp; | 1,515,026 |
public static Response updateGasto(TipoPojo pojo) {
Response response;
try
{
TipoFacade facade = (TipoFacade) ServiceLocator.getInstance().getBean(Constantes.TIPO_FACADE);
TipoGasto obj = new TipoGasto(pojo.getOid(), pojo.getCodigo(), pojo.getNombre(), pojo.getDescripcion());
facade.update(obj);
r... | static Response function(TipoPojo pojo) { Response response; try { TipoFacade facade = (TipoFacade) ServiceLocator.getInstance().getBean(Constantes.TIPO_FACADE); TipoGasto obj = new TipoGasto(pojo.getOid(), pojo.getCodigo(), pojo.getNombre(), pojo.getDescripcion()); facade.update(obj); response = Response.status(Status... | /**
* Actualiza un tipo de gasto
* @param pojo
* @return
*/ | Actualiza un tipo de gasto | updateGasto | {
"repo_name": "dmaldonadol/adm-ceppi",
"path": "ws/ceppi-web/src/main/java/cl/ml/ceppi/web/logic/TipoLogic.java",
"license": "mit",
"size": 17213
} | [
"cl.ml.ceppi.core.facade.TipoFacade",
"cl.ml.ceppi.core.model.tipo.TipoGasto",
"cl.ml.ceppi.web.locator.ServiceLocator",
"cl.ml.ceppi.web.pojo.TipoPojo",
"cl.ml.ceppi.web.util.Constantes",
"javax.ws.rs.core.Response"
] | import cl.ml.ceppi.core.facade.TipoFacade; import cl.ml.ceppi.core.model.tipo.TipoGasto; import cl.ml.ceppi.web.locator.ServiceLocator; import cl.ml.ceppi.web.pojo.TipoPojo; import cl.ml.ceppi.web.util.Constantes; import javax.ws.rs.core.Response; | import cl.ml.ceppi.core.facade.*; import cl.ml.ceppi.core.model.tipo.*; import cl.ml.ceppi.web.locator.*; import cl.ml.ceppi.web.pojo.*; import cl.ml.ceppi.web.util.*; import javax.ws.rs.core.*; | [
"cl.ml.ceppi",
"javax.ws"
] | cl.ml.ceppi; javax.ws; | 1,485,275 |
public void onShowWriteKeyInfo(View view) {
new AlertDialog.Builder(this)
.setTitle(R.string.dialog_key_for_block_0_title)
.setMessage(R.string.dialog_key_for_block_0)
.setIcon(android.R.drawable.ic_dialog_info)
.setPositiveButton(R.string.acti... | void function(View view) { new AlertDialog.Builder(this) .setTitle(R.string.dialog_key_for_block_0_title) .setMessage(R.string.dialog_key_for_block_0) .setIcon(android.R.drawable.ic_dialog_info) .setPositiveButton(R.string.action_ok, (dialog, which) -> { }).show(); } | /**
* Show information about the key which is needed
* to write to block 0.
* @param view The View object that triggered the method
* (in this case the "show info" button).
*/ | Show information about the key which is needed to write to block 0 | onShowWriteKeyInfo | {
"repo_name": "ikarus23/MifareClassicTool",
"path": "Mifare Classic Tool/app/src/main/java/de/syss/MifareClassicTool/Activities/CloneUidTool.java",
"license": "gpl-3.0",
"size": 19177
} | [
"android.app.AlertDialog",
"android.view.View"
] | import android.app.AlertDialog; import android.view.View; | import android.app.*; import android.view.*; | [
"android.app",
"android.view"
] | android.app; android.view; | 14,117 |
public Transformer<Set<V>, CV> getSetToCollapsedVertexTransformer()
{
return MapTransformer.getInstance(set_collapsedv);
} | Transformer<Set<V>, CV> function() { return MapTransformer.getInstance(set_collapsedv); } | /**
* Returns a transformer from vertex sets in the original graph to collapsed vertices
* in the transformed graph.
*/ | Returns a transformer from vertex sets in the original graph to collapsed vertices in the transformed graph | getSetToCollapsedVertexTransformer | {
"repo_name": "xiaohanz/softcontroller",
"path": "third-party/net.sf.jung2/src/main/java/edu/uci/ics/jung/algorithms/transformation/VertexPartitionCollapser.java",
"license": "epl-1.0",
"size": 4112
} | [
"java.util.Set",
"org.apache.commons.collections15.Transformer",
"org.apache.commons.collections15.functors.MapTransformer"
] | import java.util.Set; import org.apache.commons.collections15.Transformer; import org.apache.commons.collections15.functors.MapTransformer; | import java.util.*; import org.apache.commons.collections15.*; import org.apache.commons.collections15.functors.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,900,811 |
@Override
public Region findByPrimaryKey(Serializable primaryKey)
throws NoSuchRegionException {
Region region = fetchByPrimaryKey(primaryKey);
if (region == null) {
if (_log.isDebugEnabled()) {
_log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
}
throw new NoSuchRegionException(_NO_SUC... | Region function(Serializable primaryKey) throws NoSuchRegionException { Region region = fetchByPrimaryKey(primaryKey); if (region == null) { if (_log.isDebugEnabled()) { _log.debug(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); } throw new NoSuchRegionException(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey); } return ... | /**
* Returns the region with the primary key or throws a {@link com.liferay.portal.kernel.exception.NoSuchModelException} if it could not be found.
*
* @param primaryKey the primary key of the region
* @return the region
* @throws NoSuchRegionException if a region with the primary key could not be found
*/ | Returns the region with the primary key or throws a <code>com.liferay.portal.kernel.exception.NoSuchModelException</code> if it could not be found | findByPrimaryKey | {
"repo_name": "rafoli/liferay-blade-samples",
"path": "maven/apps/service-builder/jndi/jndi-service/src/main/java/com/liferay/blade/samples/jndiservicebuilder/service/persistence/impl/RegionPersistenceImpl.java",
"license": "apache-2.0",
"size": 22897
} | [
"com.liferay.blade.samples.jndiservicebuilder.exception.NoSuchRegionException",
"com.liferay.blade.samples.jndiservicebuilder.model.Region",
"java.io.Serializable"
] | import com.liferay.blade.samples.jndiservicebuilder.exception.NoSuchRegionException; import com.liferay.blade.samples.jndiservicebuilder.model.Region; import java.io.Serializable; | import com.liferay.blade.samples.jndiservicebuilder.exception.*; import com.liferay.blade.samples.jndiservicebuilder.model.*; import java.io.*; | [
"com.liferay.blade",
"java.io"
] | com.liferay.blade; java.io; | 2,567,339 |
public List<InstalledWallet> getInstalledWallets() throws WalletsListFailedToLoadException; | List<InstalledWallet> function() throws WalletsListFailedToLoadException; | /**
* This method returns the list of installed wallets in the device
*
* @return A list with the installed wallets information
* @throws WalletsListFailedToLoadException
*/ | This method returns the list of installed wallets in the device | getInstalledWallets | {
"repo_name": "fvasquezjatar/fermat-unused",
"path": "WPD/library/api/fermat-wpd-api/src/main/java/com/bitdubai/fermat_wpd_api/layer/wpd_desktop_module/wallet_manager/interfaces/WalletManagerModule.java",
"license": "mit",
"size": 2433
} | [
"com.bitdubai.fermat_api.layer.dmp_module.wallet_manager.InstalledWallet",
"com.bitdubai.fermat_wpd_api.layer.wpd_desktop_module.wallet_manager.exceptions.WalletsListFailedToLoadException",
"java.util.List"
] | import com.bitdubai.fermat_api.layer.dmp_module.wallet_manager.InstalledWallet; import com.bitdubai.fermat_wpd_api.layer.wpd_desktop_module.wallet_manager.exceptions.WalletsListFailedToLoadException; import java.util.List; | import com.bitdubai.fermat_api.layer.dmp_module.wallet_manager.*; import com.bitdubai.fermat_wpd_api.layer.wpd_desktop_module.wallet_manager.exceptions.*; import java.util.*; | [
"com.bitdubai.fermat_api",
"com.bitdubai.fermat_wpd_api",
"java.util"
] | com.bitdubai.fermat_api; com.bitdubai.fermat_wpd_api; java.util; | 1,603,654 |
private void createTextLayout() {
fTextLayout= new TextLayout(fBrowser.getDisplay());
// Initialize fonts
String symbolicFontName= fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName;
Font font= JFaceResources.getFont(symbolicFontName);
fTextLayout.setFont(font);
fTextLayout.setWi... | void function() { fTextLayout= new TextLayout(fBrowser.getDisplay()); String symbolicFontName= fSymbolicFontName == null ? JFaceResources.DIALOG_FONT : fSymbolicFontName; Font font= JFaceResources.getFont(symbolicFontName); fTextLayout.setFont(font); fTextLayout.setWidth(-1); font= JFaceResources.getFontRegistry().getB... | /**
* Creates and initializes the text layout used
* to compute the size hint.
*
* @since 3.2
*/ | Creates and initializes the text layout used to compute the size hint | createTextLayout | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jface.text_3.8.1.v20120828-155502/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java",
"license": "mit",
"size": 18797
} | [
"org.eclipse.jface.resource.JFaceResources",
"org.eclipse.swt.graphics.Font",
"org.eclipse.swt.graphics.TextLayout",
"org.eclipse.swt.graphics.TextStyle"
] | import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.TextLayout; import org.eclipse.swt.graphics.TextStyle; | import org.eclipse.jface.resource.*; import org.eclipse.swt.graphics.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 1,537,091 |
TreeNavigationGroup getDirectChildByLabel(String label) {
for (TreeNavigationGroup child : getDirectChildren()) {
if (child.getLabel().equals(label)) {
return child;
}
}
throw new NotFoundException("Not found child with label '" + label + "'!");
} | TreeNavigationGroup getDirectChildByLabel(String label) { for (TreeNavigationGroup child : getDirectChildren()) { if (child.getLabel().equals(label)) { return child; } } throw new NotFoundException(STR + label + "'!"); } | /**
* Return direct child of current root tree item by its label
* @param label by which the item will be looked for
* @return child
* @throws NotFoundException if child with given label is not found
*/ | Return direct child of current root tree item by its label | getDirectChildByLabel | {
"repo_name": "hpehl/testsuite",
"path": "common/src/main/java/org/jboss/hal/testsuite/treefinder/TreeNavigationGroup.java",
"license": "lgpl-2.1",
"size": 4016
} | [
"org.openqa.selenium.NotFoundException"
] | import org.openqa.selenium.NotFoundException; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 196,694 |
public Paint getDownPaint() {
return this.downPaint;
} | Paint function() { return this.downPaint; } | /**
* Returns the paint used to fill candles when the price moves down from
* open to close.
*
* @return The paint (possibly <code>null</code>).
*
* @see #setDownPaint(Paint)
*/ | Returns the paint used to fill candles when the price moves down from open to close | getDownPaint | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart-1.0.5/source/org/jfree/chart/renderer/xy/CandlestickRenderer.java",
"license": "lgpl-3.0",
"size": 32247
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 298,395 |
FinishedSuperstepStats setup(); | FinishedSuperstepStats setup(); | /**
* Setup (must be called prior to any other function)
*
* @return Finished superstep stats for the input superstep
*/ | Setup (must be called prior to any other function) | setup | {
"repo_name": "zfighter/giraph-research",
"path": "giraph-core/target/munged/munged/main/org/apache/giraph/bsp/CentralizedServiceWorker.java",
"license": "apache-2.0",
"size": 7172
} | [
"org.apache.giraph.graph.FinishedSuperstepStats"
] | import org.apache.giraph.graph.FinishedSuperstepStats; | import org.apache.giraph.graph.*; | [
"org.apache.giraph"
] | org.apache.giraph; | 605,578 |
@WebMethod
ServiceResponse deleteDirectory(@WebParam(name = "lookup") String lookup, @WebParam(name = "path") List<String> path);
| ServiceResponse deleteDirectory(@WebParam(name = STR) String lookup, @WebParam(name = "path") List<String> path); | /**
* Service removes the directory
*
* @param path - directory path
* @return information about the success of the removal operation
*/ | Service removes the directory | deleteDirectory | {
"repo_name": "firejack-open/Firejack-Platform",
"path": "platform/src/main/java/net/firejack/platform/service/filestore/endpoint/IFileStoreEndpoint.java",
"license": "apache-2.0",
"size": 5116
} | [
"java.util.List",
"javax.jws.WebParam",
"net.firejack.platform.core.response.ServiceResponse"
] | import java.util.List; import javax.jws.WebParam; import net.firejack.platform.core.response.ServiceResponse; | import java.util.*; import javax.jws.*; import net.firejack.platform.core.response.*; | [
"java.util",
"javax.jws",
"net.firejack.platform"
] | java.util; javax.jws; net.firejack.platform; | 2,762,782 |
@SuppressWarnings("deprecation")
private static String getDataName(ItemStack item) {
Material mat = item.getType();
// Find out durability, which indicates additional information on the
// item, color, etc.
short damage = item.getDurability();
switch (mat) {
case ... | @SuppressWarnings(STR) static String function(ItemStack item) { Material mat = item.getType(); short damage = item.getDurability(); switch (mat) { case WOOL: switch ((int) damage) { case 0: return STR; case 1: return STR; case 2: return STR; case 3: return STR; case 4: return STR; case 5: return STR; case 6: return STR... | /**
* Converts a given ItemStack into a pretty string
*
* @param item
* The item stack
* @return A string with the name of the item.
*/ | Converts a given ItemStack into a pretty string | getDataName | {
"repo_name": "tastybento/acidisland",
"path": "src/com/wasteofplastic/acidisland/panels/MiniShopItem.java",
"license": "gpl-2.0",
"size": 45213
} | [
"org.bukkit.Material",
"org.bukkit.inventory.ItemStack",
"org.bukkit.potion.Potion"
] | import org.bukkit.Material; import org.bukkit.inventory.ItemStack; import org.bukkit.potion.Potion; | import org.bukkit.*; import org.bukkit.inventory.*; import org.bukkit.potion.*; | [
"org.bukkit",
"org.bukkit.inventory",
"org.bukkit.potion"
] | org.bukkit; org.bukkit.inventory; org.bukkit.potion; | 651,555 |
private void configBootstrapOptions(Bootstrap bootstrap) {
bootstrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT);
} | void function(Bootstrap bootstrap) { bootstrap.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT); } | /**
* Configures bootstrap options to tune the communication performance.
*
* @param bootstrap LISP server bootstrap
*/ | Configures bootstrap options to tune the communication performance | configBootstrapOptions | {
"repo_name": "LorenzReinhart/ONOSnew",
"path": "protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispControllerBootstrap.java",
"license": "apache-2.0",
"size": 5096
} | [
"io.netty.bootstrap.Bootstrap",
"io.netty.buffer.PooledByteBufAllocator",
"io.netty.channel.ChannelOption"
] | import io.netty.bootstrap.Bootstrap; import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.ChannelOption; | import io.netty.bootstrap.*; import io.netty.buffer.*; import io.netty.channel.*; | [
"io.netty.bootstrap",
"io.netty.buffer",
"io.netty.channel"
] | io.netty.bootstrap; io.netty.buffer; io.netty.channel; | 271,707 |
TaskResult getResult(String taskName) throws UnknownTaskException; | TaskResult getResult(String taskName) throws UnknownTaskException; | /**
* Return the task Result corresponding to the given name.
* A result is returned if the taskName exist and if the result is available.
* Null is returned if the task is not finished (has no result).
*
* @param taskName the task name of the result to get.
* @return the result correspond... | Return the task Result corresponding to the given name. A result is returned if the taskName exist and if the result is available. Null is returned if the task is not finished (has no result) | getResult | {
"repo_name": "ShatalovYaroslav/scheduling",
"path": "scheduler/scheduler-api/src/main/java/org/ow2/proactive/scheduler/common/job/JobResult.java",
"license": "agpl-3.0",
"size": 4739
} | [
"org.ow2.proactive.scheduler.common.exception.UnknownTaskException",
"org.ow2.proactive.scheduler.common.task.TaskResult"
] | import org.ow2.proactive.scheduler.common.exception.UnknownTaskException; import org.ow2.proactive.scheduler.common.task.TaskResult; | import org.ow2.proactive.scheduler.common.exception.*; import org.ow2.proactive.scheduler.common.task.*; | [
"org.ow2.proactive"
] | org.ow2.proactive; | 4,823 |
public PrivateEndpoint privateEndpoint() {
return this.privateEndpoint;
} | PrivateEndpoint function() { return this.privateEndpoint; } | /**
* Get the privateEndpoint property: Properties of the private endpoint object.
*
* @return the privateEndpoint value.
*/ | Get the privateEndpoint property: Properties of the private endpoint object | privateEndpoint | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/models/PrivateEndpointConnectionInner.java",
"license": "mit",
"size": 3852
} | [
"com.azure.resourcemanager.keyvault.models.PrivateEndpoint"
] | import com.azure.resourcemanager.keyvault.models.PrivateEndpoint; | import com.azure.resourcemanager.keyvault.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,668,013 |
public Paint getTickLabelPaint(Comparable category) {
if (category == null) {
throw new IllegalArgumentException("Null 'category' argument.");
}
Paint result = (Paint) this.tickLabelPaintMap.get(category);
// if there is no specific paint, use the general one...
... | Paint function(Comparable category) { if (category == null) { throw new IllegalArgumentException(STR); } Paint result = (Paint) this.tickLabelPaintMap.get(category); if (result == null) { result = getTickLabelPaint(); } return result; } | /**
* Returns the paint for the tick label for the given category.
*
* @param category the category (<code>null</code> not permitted).
*
* @return The paint (never <code>null</code>).
*
* @see #setTickLabelPaint(Paint)
*/ | Returns the paint for the tick label for the given category | getTickLabelPaint | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/chart/axis/CategoryAxis.java",
"license": "lgpl-2.1",
"size": 56101
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,899,428 |
void notifyDialog(String reportFileName) {
Log.d(LOG_TAG, "Creating Dialog for " + reportFileName);
Intent dialogIntent = new Intent(mContext, CrashReportDialog.class);
dialogIntent.putExtra(ACRAConstants.EXTRA_REPORT_FILE_NAME, reportFileName);
dialogIntent.setFlags(Intent.FLAG_... | void notifyDialog(String reportFileName) { Log.d(LOG_TAG, STR + reportFileName); Intent dialogIntent = new Intent(mContext, CrashReportDialog.class); dialogIntent.putExtra(ACRAConstants.EXTRA_REPORT_FILE_NAME, reportFileName); dialogIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); mContext.startActivity(dialogIntent); } | /**
* Notify user with a dialog the app has crashed, ask permission to send it.
* {@link CrashReportDialog} Activity.
*
* @param reportFileName
* Name fo the error report to display in the crash report
* dialog.
*/ | Notify user with a dialog the app has crashed, ask permission to send it. <code>CrashReportDialog</code> Activity | notifyDialog | {
"repo_name": "Crazyphil/acra",
"path": "src/main/java/org/acra/ErrorReporter.java",
"license": "apache-2.0",
"size": 43422
} | [
"android.content.Intent",
"android.util.Log"
] | import android.content.Intent; import android.util.Log; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 2,074,470 |
public void xMaxYMin() throws ParseException {
align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN;
} | void function() throws ParseException { align = SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMAXYMIN; } | /**
* Invoked when 'xMaxYMin' has been parsed.
* @exception ParseException if an error occured while processing
* the transform
*/ | Invoked when 'xMaxYMin' has been parsed | xMaxYMin | {
"repo_name": "apache/batik",
"path": "batik-svg-dom/src/main/java/org/apache/batik/dom/svg/AbstractSVGPreserveAspectRatio.java",
"license": "apache-2.0",
"size": 9953
} | [
"org.apache.batik.parser.ParseException",
"org.w3c.dom.svg.SVGPreserveAspectRatio"
] | import org.apache.batik.parser.ParseException; import org.w3c.dom.svg.SVGPreserveAspectRatio; | import org.apache.batik.parser.*; import org.w3c.dom.svg.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 2,166,444 |
public Map[] publisherZoneStatistics(Integer id, Date startDate)
throws XmlRpcException {
return objectToArrayMaps(execute(PUBLISHER_ZONE_STATISTICS_METHOD, id,
startDate));
} | Map[] function(Integer id, Date startDate) throws XmlRpcException { return objectToArrayMaps(execute(PUBLISHER_ZONE_STATISTICS_METHOD, id, startDate)); } | /**
* Publisher zone statistics.
*
* @param id the id
* @param startDate the start date
*
* @return the Map[]
*
* @throws XmlRpcException the xml rpc exception
*/ | Publisher zone statistics | publisherZoneStatistics | {
"repo_name": "AdRiverSoftware/AdServerProjectWebnock",
"path": "lib/xmlrpc/java/ApacheLib3/org/openads/proxy/PublisherService.java",
"license": "gpl-2.0",
"size": 9171
} | [
"java.util.Date",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import java.util.Date; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import java.util.*; import org.apache.xmlrpc.*; | [
"java.util",
"org.apache.xmlrpc"
] | java.util; org.apache.xmlrpc; | 277,102 |
public void setTrustManagerFactory(TrustManagerFactory factory) {
this.trustManagerFactory = factory;
}
/**
* Sets the algorithm to use when creating the {@link TrustManagerFactory} | void function(TrustManagerFactory factory) { this.trustManagerFactory = factory; } /** * Sets the algorithm to use when creating the {@link TrustManagerFactory} | /**
* Sets the {@link TrustManagerFactory} to use. If this is set the
* properties which are used by this factory bean to create a
* {@link TrustManagerFactory} will all be ignored.
*
* @param factory
* the factory.
*/ | Sets the <code>TrustManagerFactory</code> to use. If this is set the properties which are used by this factory bean to create a <code>TrustManagerFactory</code> will all be ignored | setTrustManagerFactory | {
"repo_name": "solemichael/omni",
"path": "src/main/java/org/omni/remote/mina/filter/ssl/SslContextFactory.java",
"license": "apache-2.0",
"size": 16197
} | [
"javax.net.ssl.TrustManagerFactory"
] | import javax.net.ssl.TrustManagerFactory; | import javax.net.ssl.*; | [
"javax.net"
] | javax.net; | 216,122 |
public String toString() {
if (!Const.isEmpty(filename)) {
if (Const.isEmpty(name)) {
return filename;
} else {
return filename+" : "+name;
}
}
if (name != null) {
if (directory!=null) {
String path = directory.getPat... | String function() { if (!Const.isEmpty(filename)) { if (Const.isEmpty(name)) { return filename; } else { return filename+STR+name; } } if (name != null) { if (directory!=null) { String path = directory.getPath(); if (path.endsWith(RepositoryDirectory.DIRECTORY_SEPARATOR)) { return path+name; } else { return path+Reposi... | /**
* Gets a textual representation of the job. If its name has been set, it will be returned,
* otherwise the classname is returned.
*
* @return the textual representation of the job.
*/ | Gets a textual representation of the job. If its name has been set, it will be returned, otherwise the classname is returned | toString | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 103745
} | [
"org.pentaho.di.core.Const",
"org.pentaho.di.repository.RepositoryDirectory"
] | import org.pentaho.di.core.Const; import org.pentaho.di.repository.RepositoryDirectory; | import org.pentaho.di.core.*; import org.pentaho.di.repository.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 797,137 |
public void setActivityTypeRegistrationOptions(ActivityTypeRegistrationOptions activityTypeRegistrationOptions) {
this.activityTypeRegistrationOptions = activityTypeRegistrationOptions;
} | void function(ActivityTypeRegistrationOptions activityTypeRegistrationOptions) { this.activityTypeRegistrationOptions = activityTypeRegistrationOptions; } | /**
* Activity registration options
*/ | Activity registration options | setActivityTypeRegistrationOptions | {
"repo_name": "adessaigne/camel",
"path": "components/camel-aws-swf/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java",
"license": "apache-2.0",
"size": 12420
} | [
"com.amazonaws.services.simpleworkflow.flow.worker.ActivityTypeRegistrationOptions"
] | import com.amazonaws.services.simpleworkflow.flow.worker.ActivityTypeRegistrationOptions; | import com.amazonaws.services.simpleworkflow.flow.worker.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 2,267,737 |
Grid getAggregatedDataValues( AnalyticalObject object ); | Grid getAggregatedDataValues( AnalyticalObject object ); | /**
* Generates an aggregated value grid for the given query based on the given
* analytical object.
*
* @param object the analytical object.
* @return aggregated data as a Grid object.
*/ | Generates an aggregated value grid for the given query based on the given analytical object | getAggregatedDataValues | {
"repo_name": "mortenoh/dhis2-core",
"path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/AnalyticsService.java",
"license": "bsd-3-clause",
"size": 6798
} | [
"org.hisp.dhis.common.AnalyticalObject",
"org.hisp.dhis.common.Grid"
] | import org.hisp.dhis.common.AnalyticalObject; import org.hisp.dhis.common.Grid; | import org.hisp.dhis.common.*; | [
"org.hisp.dhis"
] | org.hisp.dhis; | 2,634,449 |
protected void fireLayerAddedEvent(MapLayer layer, int index) {
fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.ADD_CHILD, index, layer.isTemporaryLayer()));
} | void function(MapLayer layer, int index) { fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.ADD_CHILD, index, layer.isTemporaryLayer())); } | /** Fire the event that indicates a layer was added.
*
* @param layer is the added layer.
* @param index is the insertion index.
*/ | Fire the event that indicates a layer was added | fireLayerAddedEvent | {
"repo_name": "gallandarakhneorg/afc",
"path": "advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java",
"license": "apache-2.0",
"size": 16680
} | [
"org.arakhne.afc.gis.maplayer.MapLayerHierarchyEvent"
] | import org.arakhne.afc.gis.maplayer.MapLayerHierarchyEvent; | import org.arakhne.afc.gis.maplayer.*; | [
"org.arakhne.afc"
] | org.arakhne.afc; | 2,827,257 |
public Collection<NodeDetail> getPathList(String ContactId) {
SilverTrace.info("yellowpages", "YellowpagesBmEJB.getPathList()",
"root.MSG_GEN_ENTER_METHOD");
Collection<NodePK> fatherPKs = null;
ContactPK contactPK = new ContactPK(ContactId, this.space, this.componentId);
try {
Con... | Collection<NodeDetail> function(String ContactId) { SilverTrace.info(STR, STR, STR); Collection<NodePK> fatherPKs = null; ContactPK contactPK = new ContactPK(ContactId, this.space, this.componentId); try { ContactBm contactBm = getContactBm(); fatherPKs = contactBm.getAllFatherPK(contactPK); } catch (Exception re) { th... | /**
* Return list of all path to this contact - it's a Collection of NodeDetail collection
* @param ContactId the id of the contact
* @return a Collection of NodeDetail collection
* @see com.stratelia.webactiv.util.node.model.NodeDetail
* @exception javax.ejb.FinderException
* @exception javax.e... | Return list of all path to this contact - it's a Collection of NodeDetail collection | getPathList | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Components",
"path": "yellowpages/yellowpages-ejb/src/main/java/com/stratelia/webactiv/yellowpages/control/ejb/YellowpagesBmEJB.java",
"license": "agpl-3.0",
"size": 66397
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"com.stratelia.webactiv.util.contact.control.ContactBm",
"com.stratelia.webactiv.util.contact.model.ContactPK",
"com.stratelia.webactiv.util.exception.SilverpeasRuntimeException",
"com.stratelia.webactiv.util.node.control.NodeBm",
"com.stratelia.webactiv... | import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.util.contact.control.ContactBm; import com.stratelia.webactiv.util.contact.model.ContactPK; import com.stratelia.webactiv.util.exception.SilverpeasRuntimeException; import com.stratelia.webactiv.util.node.control.NodeBm; import com.s... | import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.util.contact.control.*; import com.stratelia.webactiv.util.contact.model.*; import com.stratelia.webactiv.util.exception.*; import com.stratelia.webactiv.util.node.control.*; import com.stratelia.webactiv.util.node.model.*; import com.strateli... | [
"com.stratelia.silverpeas",
"com.stratelia.webactiv",
"java.util"
] | com.stratelia.silverpeas; com.stratelia.webactiv; java.util; | 2,332,114 |
public void render(@NonNull DemoRenderer renderer) {
// Loop through all the nodes in our collection.
for(Node node : mNodes.values()) {
// Loop through all the edges for the given node.
for(Edge edge : node.getEdges().values()) {
renderer.renderEdge(edge);
... | void function(@NonNull DemoRenderer renderer) { for(Node node : mNodes.values()) { for(Edge edge : node.getEdges().values()) { renderer.renderEdge(edge); } } for(Node node : mNodes.values()) { renderer.renderNode(node); } mTreasureChest.update(); renderer.renderActor(mTreasureChest); mCrab.update(); renderer.renderActo... | /**
* Render the elements of the graph into the given
* renderer instance.
*
* @param renderer to send render commands to.
*/ | Render the elements of the graph into the given renderer instance | render | {
"repo_name": "MarcelBraghetto/BlogDemos",
"path": "DijkstraPart2/app/src/main/java/io/github/marcelbraghetto/dijkstra/part2/systems/Graph.java",
"license": "mit",
"size": 13860
} | [
"android.support.annotation.NonNull",
"io.github.marcelbraghetto.dijkstra.part2.models.Edge",
"io.github.marcelbraghetto.dijkstra.part2.models.Node",
"io.github.marcelbraghetto.dijkstra.part2.ui.DemoRenderer"
] | import android.support.annotation.NonNull; import io.github.marcelbraghetto.dijkstra.part2.models.Edge; import io.github.marcelbraghetto.dijkstra.part2.models.Node; import io.github.marcelbraghetto.dijkstra.part2.ui.DemoRenderer; | import android.support.annotation.*; import io.github.marcelbraghetto.dijkstra.part2.models.*; import io.github.marcelbraghetto.dijkstra.part2.ui.*; | [
"android.support",
"io.github.marcelbraghetto"
] | android.support; io.github.marcelbraghetto; | 758,658 |
boolean sendUnauthorized(HttpServletResponse response) {
if (response.isCommitted()) {
log.error("sendUnauthorized: Cannot send 401/UNAUTHORIZED; response is already committed");
} else {
response.resetBuffer();
// just set the status because thi... | boolean sendUnauthorized(HttpServletResponse response) { if (response.isCommitted()) { log.error(STR); } else { response.resetBuffer(); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); response.setHeader(HEADER_WWW_AUTHENTICATE, AUTHENTICATION_SCHEME_BASIC + STRSTR\STRsendUnauthorized: Failed requesting authent... | /**
* Sends status <code>401</code> (Unauthorized) with a
* <code>WWW-Authenticate</code> requesting standard HTTP header
* authentication with the <code>Basic</code> scheme and the configured
* realm name.
*
* @param response The response object to which to send the request
* @return... | Sends status <code>401</code> (Unauthorized) with a <code>WWW-Authenticate</code> requesting standard HTTP header authentication with the <code>Basic</code> scheme and the configured realm name | sendUnauthorized | {
"repo_name": "Nimco/sling",
"path": "bundles/auth/core/src/main/java/org/apache/sling/auth/core/impl/HttpBasicAuthenticationHandler.java",
"license": "apache-2.0",
"size": 14905
} | [
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,939,314 |
public IdentifiedObjectFinder getIdentifiedObjectFinder(Class<? extends IdentifiedObject> type)
throws FactoryException {
return new IdentifiedObjectFinder(this, type);
} | IdentifiedObjectFinder function(Class<? extends IdentifiedObject> type) throws FactoryException { return new IdentifiedObjectFinder(this, type); } | /**
* Returns a finder which can be used for looking up unidentified objects. The finder fetchs a
* fully {@linkplain IdentifiedObject identified object} from an incomplete one, for example
* from an object without identifier or "{@code AUTHORITY[...]}" element in <cite>Well Known
* Text</cite> term... | Returns a finder which can be used for looking up unidentified objects. The finder fetchs a fully IdentifiedObject identified object from an incomplete one, for example from an object without identifier or "AUTHORITY[...]" element in Well Known Text terminology | getIdentifiedObjectFinder | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractAuthorityFactory.java",
"license": "lgpl-2.1",
"size": 41575
} | [
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.IdentifiedObject"
] | import org.opengis.referencing.FactoryException; import org.opengis.referencing.IdentifiedObject; | import org.opengis.referencing.*; | [
"org.opengis.referencing"
] | org.opengis.referencing; | 2,550,518 |
public boolean comparePlayer(OfflinePlayer player1, OfflinePlayer player2)
{
return player1.getUniqueId().equals(player2.getUniqueId());
}
| boolean function(OfflinePlayer player1, OfflinePlayer player2) { return player1.getUniqueId().equals(player2.getUniqueId()); } | /**
* Checks if the Player equals one other
* @param player1 Player one
* @param player2 Player two
* @return True of both Players have the same UUID
*/ | Checks if the Player equals one other | comparePlayer | {
"repo_name": "Jannled/Minecraft-MdI",
"path": "Minecraft-MdI/src/com/github/jannled/mdiServer/lobby/Lobby.java",
"license": "mit",
"size": 4661
} | [
"org.bukkit.OfflinePlayer"
] | import org.bukkit.OfflinePlayer; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 2,819,796 |
//TODO: revisit after #8166 is resolved.
INDArray match(INDArray comp,Condition condition); | INDArray match(INDArray comp,Condition condition); | /**
* Return a mask on whether each element matches the given condition
* @param comp
* @param condition
* @return
*/ | Return a mask on whether each element matches the given condition | match | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/INDArray.java",
"license": "apache-2.0",
"size": 85385
} | [
"org.nd4j.linalg.indexing.conditions.Condition"
] | import org.nd4j.linalg.indexing.conditions.Condition; | import org.nd4j.linalg.indexing.conditions.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 1,744,983 |
// Could make this more efficient using DELETE FROM table WHERE id IN (?,?,?,?,?,?,?,?)
@Override
public int deleteAll(List<K> keys) {
return Util.deleteAll(this, keys);
} | int function(List<K> keys) { return Util.deleteAll(this, keys); } | /**
* delete one or more key-value pairs
*
* @param keys
* iterable data structure containing the keys to delete
*
* @return # of objects deleted, NUM_UNKNOWN if unknown
*
* */ | delete one or more key-value pairs | deleteAll | {
"repo_name": "aruniyengar/storage-manager",
"path": "src/main/java/com/ibm/storage/storagemanager/implementations/sql/KeyValueSQL.java",
"license": "apache-2.0",
"size": 18743
} | [
"com.ibm.storage.storagemanager.util.Util",
"java.util.List"
] | import com.ibm.storage.storagemanager.util.Util; import java.util.List; | import com.ibm.storage.storagemanager.util.*; import java.util.*; | [
"com.ibm.storage",
"java.util"
] | com.ibm.storage; java.util; | 1,092,021 |
private void processSelectedKeys(Set<SelectionKey> keys) throws ClosedByInterruptException {
if (log.isTraceEnabled())
log.trace("Processing keys in client worker: " + keys.size());
if (keys.isEmpty())
return;
for (Iterator<SelectionKey> iter... | void function(Set<SelectionKey> keys) throws ClosedByInterruptException { if (log.isTraceEnabled()) log.trace(STR + keys.size()); if (keys.isEmpty()) return; for (Iterator<SelectionKey> iter = keys.iterator(); iter.hasNext(); ) { SelectionKey key = iter.next(); iter.remove(); if (!key.isValid()) continue; GridSelectorN... | /**
* Processes keys selected by a selector.
*
* @param keys Selected keys.
* @throws ClosedByInterruptException If this thread was interrupted while reading data.
*/ | Processes keys selected by a selector | processSelectedKeys | {
"repo_name": "murador/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java",
"license": "apache-2.0",
"size": 83316
} | [
"java.nio.channels.ClosedByInterruptException",
"java.nio.channels.SelectionKey",
"java.util.Iterator",
"java.util.Set",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.nio.channels.ClosedByInterruptException; import java.nio.channels.SelectionKey; import java.util.Iterator; import java.util.Set; import org.apache.ignite.internal.util.typedef.internal.U; | import java.nio.channels.*; import java.util.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.nio",
"java.util",
"org.apache.ignite"
] | java.nio; java.util; org.apache.ignite; | 107,950 |
static Path split(final FileSystem fs,
final Path splitDir,
final StoreFile f,
final byte [] splitRow,
final Reference.Range range)
throws IOException {
// A reference to the bottom half of the hsf store file.
Reference r = ... | static Path split(final FileSystem fs, final Path splitDir, final StoreFile f, final byte [] splitRow, final Reference.Range range) throws IOException { Reference r = new Reference(splitRow, range); String parentRegionName = f.getPath().getParent().getParent().getName(); Path p = new Path(splitDir, f.getPath().getName(... | /**
* Write out a split reference.
*
* Package local so it doesnt leak out of regionserver.
*
* @param fs
* @param splitDir Presumes path format is actually
* <code>SOME_DIRECTORY/REGIONNAME/FAMILY</code>.
* @param f File to split.
* @param splitRow
* @param range
* @return Path to crea... | Write out a split reference. Package local so it doesnt leak out of regionserver | split | {
"repo_name": "lichongxin/hbase-snapshot",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java",
"license": "apache-2.0",
"size": 40063
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.io.Reference"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.io.Reference; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.io.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,267,390 |
protected boolean end(Writer writer, String body, boolean popComponentStack) {
assert (body != null);
try {
writer.write(body);
} catch (IOException e) {
throw new StrutsException("IOError while writing the body: " + e.getMessage(), e);
}
if (popComponentStack) popComponentStack();
... | boolean function(Writer writer, String body, boolean popComponentStack) { assert (body != null); try { writer.write(body); } catch (IOException e) { throw new StrutsException(STR + e.getMessage(), e); } if (popComponentStack) popComponentStack(); return false; } | /**
* Callback for the start tag of this component. Should the body be
* evaluated again?
* <p/>
* <b>NOTE:</b> has a parameter to determine to pop the component stack.
*
* @param writer the output writer.
* @param body the rendered body.
* @param popComponentStack
* should the compo... | Callback for the start tag of this component. Should the body be evaluated again? | end | {
"repo_name": "beangle/library",
"path": "struts/s2/src/main/java/org/beangle/struts2/view/component/Component.java",
"license": "lgpl-3.0",
"size": 13341
} | [
"java.io.IOException",
"java.io.Writer",
"org.apache.struts2.StrutsException"
] | import java.io.IOException; import java.io.Writer; import org.apache.struts2.StrutsException; | import java.io.*; import org.apache.struts2.*; | [
"java.io",
"org.apache.struts2"
] | java.io; org.apache.struts2; | 2,881,263 |
private static List<String> addPersonsToDepartmemt(Integer departmentID, List<Integer> personIDs) {
List<String> departmentsOfRemovedNodes = new LinkedList<String>();
if (departmentID!=null && personIDs!=null && !personIDs.isEmpty()) {
List<TPersonBean> personBeans = PersonBL.loadByKeys(personIDs);
for (TP... | static List<String> function(Integer departmentID, List<Integer> personIDs) { List<String> departmentsOfRemovedNodes = new LinkedList<String>(); if (departmentID!=null && personIDs!=null && !personIDs.isEmpty()) { List<TPersonBean> personBeans = PersonBL.loadByKeys(personIDs); for (TPersonBean personBean : personBeans)... | /**
* Assign persons to department
* @param departmentID
* @param personIDs
*/ | Assign persons to department | addPersonsToDepartmemt | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/admin/user/department/DepartmentBL.java",
"license": "gpl-3.0",
"size": 21789
} | [
"com.aurel.track.admin.user.person.PersonBL",
"com.aurel.track.beans.TPersonBean",
"java.util.LinkedList",
"java.util.List"
] | import com.aurel.track.admin.user.person.PersonBL; import com.aurel.track.beans.TPersonBean; import java.util.LinkedList; import java.util.List; | import com.aurel.track.admin.user.person.*; import com.aurel.track.beans.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 637,938 |
private void exitApplication()
{
// Does the current keystore contain unsaved changes?
if (needSave())
{
// Yes - ask the user if it should be saved
switch (wantSave())
{
case JOptionPane.YES_OPTION:
// Save it
saveKeyStore();
break;
case JOptionPane.CANCEL_OPTION:
return;... | void function() { if (needSave()) { switch (wantSave()) { case JOptionPane.YES_OPTION: saveKeyStore(); break; case JOptionPane.CANCEL_OPTION: return; } } saveAppPrefs(); System.exit(0); } | /**
* Exit the application.
*/ | Exit the application | exitApplication | {
"repo_name": "gavioto/portecle",
"path": "src/main/net/sf/portecle/FPortecle.java",
"license": "gpl-2.0",
"size": 188859
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,182,500 |
private boolean handleOAuth1a(MessageContext synCtx) {
log.debug("Validating the OAuth 1.0a Request");
OAuthServiceClient client = null;
ConfigurationContext configContext = null;
OAuthConsumerDTO consumer = null;
boolean isValidConsumer = false;
try {
Parameters params = populate... | boolean function(MessageContext synCtx) { log.debug(STR); OAuthServiceClient client = null; ConfigurationContext configContext = null; OAuthConsumerDTO consumer = null; boolean isValidConsumer = false; try { Parameters params = populateOauthConsumerData(synCtx); client = new OAuthServiceClient(getRemoteServiceUrl(), co... | /**
* Try to authenticate using OAuth 1.0a.
*
* @param synCtx
* @return
*/ | Try to authenticate using OAuth 1.0a | handleOAuth1a | {
"repo_name": "maheshika/carbon-identity",
"path": "components/identity/org.wso2.carbon.identity.oauth.mediator/src/main/java/org/wso2/carbon/identity/oauth/mediator/OAuthMediator.java",
"license": "apache-2.0",
"size": 13421
} | [
"org.apache.axis2.context.ConfigurationContext",
"org.apache.synapse.MessageContext",
"org.apache.synapse.SynapseException",
"org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerDTO",
"org.wso2.carbon.identity.oauth.stub.types.Parameters"
] | import org.apache.axis2.context.ConfigurationContext; import org.apache.synapse.MessageContext; import org.apache.synapse.SynapseException; import org.wso2.carbon.identity.oauth.stub.dto.OAuthConsumerDTO; import org.wso2.carbon.identity.oauth.stub.types.Parameters; | import org.apache.axis2.context.*; import org.apache.synapse.*; import org.wso2.carbon.identity.oauth.stub.dto.*; import org.wso2.carbon.identity.oauth.stub.types.*; | [
"org.apache.axis2",
"org.apache.synapse",
"org.wso2.carbon"
] | org.apache.axis2; org.apache.synapse; org.wso2.carbon; | 651,080 |
public static JsonObject getCredentials(String vcapService) {
JsonArray vcapArray = getVCAPServices().get(vcapService).getAsJsonArray();
JsonObject vcapObject = vcapArray.get(0).getAsJsonObject();
JsonObject credentials = vcapObject.get("credentials").getAsJsonObject();
return creden... | static JsonObject function(String vcapService) { JsonArray vcapArray = getVCAPServices().get(vcapService).getAsJsonArray(); JsonObject vcapObject = vcapArray.get(0).getAsJsonObject(); JsonObject credentials = vcapObject.get(STR).getAsJsonObject(); return credentials; } | /**
* Gets a VCAP_SERVICES credentials as the json objects.
*
* @return VCAP credentials as a json object.
*/ | Gets a VCAP_SERVICES credentials as the json objects | getCredentials | {
"repo_name": "xin-cai/openwhisk",
"path": "tests/src/test/scala/common/TestUtils.java",
"license": "apache-2.0",
"size": 11671
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonObject"
] | import com.google.gson.JsonArray; import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,964,546 |
public Iterator<SimpleMatrix> iteratorSimpleMatrix() {
return Arrays.asList(slices).iterator();
} | Iterator<SimpleMatrix> function() { return Arrays.asList(slices).iterator(); } | /**
* Returns an iterator over the <code>SimpleMatrix</code> objects contained in the tensor.
*/ | Returns an iterator over the <code>SimpleMatrix</code> objects contained in the tensor | iteratorSimpleMatrix | {
"repo_name": "tabladrum/CoreNLP",
"path": "src/edu/stanford/nlp/neural/SimpleTensor.java",
"license": "gpl-2.0",
"size": 8710
} | [
"java.util.Arrays",
"java.util.Iterator",
"org.ejml.simple.SimpleMatrix"
] | import java.util.Arrays; import java.util.Iterator; import org.ejml.simple.SimpleMatrix; | import java.util.*; import org.ejml.simple.*; | [
"java.util",
"org.ejml.simple"
] | java.util; org.ejml.simple; | 2,873,979 |
@Test()
static void setGlobalFilter() {
SecurityManager sm = System.getSecurityManager();
ObjectInputFilter filter = new SerialFilterTest.Validator();
ObjectInputFilter global = ObjectInputFilter.Config.getSerialFilter();
if (global != null) {
// once set, can never b... | @Test() static void setGlobalFilter() { SecurityManager sm = System.getSecurityManager(); ObjectInputFilter filter = new SerialFilterTest.Validator(); ObjectInputFilter global = ObjectInputFilter.Config.getSerialFilter(); if (global != null) { try { ObjectInputFilter.Config.setSerialFilter(filter); Assert.fail(STR); } ... | /**
* If the Global filter is already set, it should always refuse to be
* set again.
* If there is a security manager, setting the serialFilter should fail
* without the appropriate permission.
* If there is no security manager then setting it should work.
*/ | If the Global filter is already set, it should always refuse to be set again. If there is a security manager, setting the serialFilter should fail without the appropriate permission. If there is no security manager then setting it should work | setGlobalFilter | {
"repo_name": "JetBrains/jdk8u_jdk",
"path": "test/java/io/Serializable/serialFilter/GlobalFilterTest.java",
"license": "gpl-2.0",
"size": 9654
} | [
"java.io.SerializablePermission",
"org.testng.Assert",
"org.testng.annotations.Test"
] | import java.io.SerializablePermission; import org.testng.Assert; import org.testng.annotations.Test; | import java.io.*; import org.testng.*; import org.testng.annotations.*; | [
"java.io",
"org.testng",
"org.testng.annotations"
] | java.io; org.testng; org.testng.annotations; | 534,177 |
private static String percentEncodeRfc3986(String string) {
try {
string = string.replace("+", "%2B");
string = URLDecoder.decode(string, "UTF-8");
string = URLEncoder.encode(string, "UTF-8");
return string.replace("+", "%20").replace("*", "%2A").replace("%7E", "~");
} catch (Exception e) {
return... | static String function(String string) { try { string = string.replace("+", "%2B"); string = URLDecoder.decode(string, "UTF-8"); string = URLEncoder.encode(string, "UTF-8"); return string.replace("+", "%20").replace("*", "%2A").replace("%7E", "~"); } catch (Exception e) { return string; } } | /**
* Percent-encode values according the RFC 3986. The built-in Java
* URLEncoder does not encode according to the RFC, so we make the extra
* replacements.
*
* @param string
* Decoded string.
* @return Encoded string per RFC 3986.
*/ | Percent-encode values according the RFC 3986. The built-in Java URLEncoder does not encode according to the RFC, so we make the extra replacements | percentEncodeRfc3986 | {
"repo_name": "Chaiavi/Crawler4j",
"path": "src/main/java/edu/uci/ics/crawler4j/url/URLCanonicalizer.java",
"license": "apache-2.0",
"size": 5820
} | [
"java.net.URLDecoder",
"java.net.URLEncoder"
] | import java.net.URLDecoder; import java.net.URLEncoder; | import java.net.*; | [
"java.net"
] | java.net; | 2,492,913 |
public boolean contains(T v) {
Comparator<T> cmp = getComparator(v);
return contains(v, cmp);
} | boolean function(T v) { Comparator<T> cmp = getComparator(v); return contains(v, cmp); } | /**
* Determine if the Region contains the value.
* <p>
* For typical numeric types, and String and Character.
* The Comparator used is the default one for the type
* (e.g., {@code Integer#compareTo(Integer)}.
* <p>
* Use {@link #contains(Object, Comparator)} for other
* types or... | Determine if the Region contains the value. For typical numeric types, and String and Character. The Comparator used is the default one for the type (e.g., Integer#compareTo(Integer). Use <code>#contains(Object, Comparator)</code> for other types or to use a non-default Comparator. | contains | {
"repo_name": "ddebrunner/quarks",
"path": "samples/apps/src/main/java/quarks/samples/apps/Range.java",
"license": "apache-2.0",
"size": 16700
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,745,663 |
public Object evaluate() {
final List<Object> args = new ArrayList<>();
final Object source = this.source.getValue();
try {
this.javaMethod.setAccessible(true);
if (this.javaMethod instanceof Constructor) {
return ((Constructor<?>) this.javaMethod).newInstance(args.toArray());
}
... | Object function() { final List<Object> args = new ArrayList<>(); final Object source = this.source.getValue(); try { this.javaMethod.setAccessible(true); if (this.javaMethod instanceof Constructor) { return ((Constructor<?>) this.javaMethod).newInstance(args.toArray()); } return ((Method) this.javaMethod).invoke(source... | /**
* Will attempt to evaluate this {@link MethodReference} and return its result, even if the
* arguments contains {@link CapturedArgument}.
*
* @return the underlying Java method result.
* @throws AnalyzeException if the underlying Java {@link Method} could not be found or invoked.
*/ | Will attempt to evaluate this <code>MethodReference</code> and return its result, even if the arguments contains <code>CapturedArgument</code> | evaluate | {
"repo_name": "lambdamatic/lambdamatic-analyzer",
"path": "src/main/java/org/lambdamatic/analyzer/ast/node/MethodReference.java",
"license": "epl-1.0",
"size": 9136
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"java.util.ArrayList",
"java.util.List",
"org.lambdamatic.analyzer.exception.AnalyzeException"
] | import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import org.lambdamatic.analyzer.exception.AnalyzeException; | import java.lang.reflect.*; import java.util.*; import org.lambdamatic.analyzer.exception.*; | [
"java.lang",
"java.util",
"org.lambdamatic.analyzer"
] | java.lang; java.util; org.lambdamatic.analyzer; | 2,052,161 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.