method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void testOneOffPatchModifyingMultipleMiscFilesDeletingMultipleMiscFiles() throws Exception {
// prepare the patch
String patchID = randomString();
File oneOffPatchDir = mkdir(tempDir, patchID);
final String testFilePath1 = AS_DISTRIBUTION + FILE_SEPARATOR + "README.... | void function() throws Exception { String patchID = randomString(); File oneOffPatchDir = mkdir(tempDir, patchID); final String testFilePath1 = AS_DISTRIBUTION + FILE_SEPARATOR + STR; final String testContent1 = STR; final String originalContent1 = readFile(testFilePath1); final String testFilePath2 = AS_DISTRIBUTION +... | /**
* Prepare a one-off patch which modifies multiple (2) misc file and deletes multiple (2) misc files. Apply it, check that the files was replaced, deleted.
* Roll it back, check that the files was restored successfully and apply it again to make sure re-applying works as expected
*/ | Prepare a one-off patch which modifies multiple (2) misc file and deletes multiple (2) misc files. Apply it, check that the files was replaced, deleted. Roll it back, check that the files was restored successfully and apply it again to make sure re-applying works as expected | testOneOffPatchModifyingMultipleMiscFilesDeletingMultipleMiscFiles | {
"repo_name": "jamezp/wildfly-core",
"path": "testsuite/patching/src/test/java/org/jboss/as/test/patching/BasicOneOffPatchingScenariosTestCase.java",
"license": "lgpl-2.1",
"size": 90564
} | [
"com.google.common.base.Joiner",
"java.io.File",
"org.jboss.as.patching.IoUtils",
"org.jboss.as.patching.metadata.ContentModification",
"org.jboss.as.patching.metadata.Patch",
"org.jboss.as.patching.metadata.PatchBuilder",
"org.jboss.as.test.patching.PatchingTestUtil",
"org.jboss.as.version.ProductCon... | import com.google.common.base.Joiner; import java.io.File; import org.jboss.as.patching.IoUtils; import org.jboss.as.patching.metadata.ContentModification; import org.jboss.as.patching.metadata.Patch; import org.jboss.as.patching.metadata.PatchBuilder; import org.jboss.as.test.patching.PatchingTestUtil; import org.jbos... | import com.google.common.base.*; import java.io.*; import org.jboss.as.patching.*; import org.jboss.as.patching.metadata.*; import org.jboss.as.test.patching.*; import org.jboss.as.version.*; import org.junit.*; | [
"com.google.common",
"java.io",
"org.jboss.as",
"org.junit"
] | com.google.common; java.io; org.jboss.as; org.junit; | 2,018,615 |
public static UriTemplate createUniqueUriTemplate() {
UriTemplate.UriTemplateBuilder uriTemplate = UriTemplate.UriTemplateBuilder.getInstance().
templateId(UUID.randomUUID().toString())
.uriTemplate(UUID.randomUUID().toString());
return uriTemplate.build();
} | static UriTemplate function() { UriTemplate.UriTemplateBuilder uriTemplate = UriTemplate.UriTemplateBuilder.getInstance(). templateId(UUID.randomUUID().toString()) .uriTemplate(UUID.randomUUID().toString()); return uriTemplate.build(); } | /**
* Create unique URI template objects.
*
* @return UriTemplate object
*/ | Create unique URI template objects | createUniqueUriTemplate | {
"repo_name": "dewmini/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.core/src/test/java/org/wso2/carbon/apimgt/rest/api/core/utils/SampleTestObjectCreator.java",
"license": "apache-2.0",
"size": 21084
} | [
"java.util.UUID",
"org.wso2.carbon.apimgt.core.models.UriTemplate"
] | import java.util.UUID; import org.wso2.carbon.apimgt.core.models.UriTemplate; | import java.util.*; import org.wso2.carbon.apimgt.core.models.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,175,704 |
public AttributeValue getValue() {
return this.value;
} | AttributeValue function() { return this.value; } | /**
* The value of this attribute, or null if no value was included
*
* @return the attribute's value or null
*/ | The value of this attribute, or null if no value was included | getValue | {
"repo_name": "GenericBreakGlass/GenericBreakGlass-XACML",
"path": "src/com.sun.xacml/src/main/java/com/sun/xacml/ctx/Attribute.java",
"license": "apache-2.0",
"size": 16200
} | [
"com.sun.xacml.attr.AttributeValue"
] | import com.sun.xacml.attr.AttributeValue; | import com.sun.xacml.attr.*; | [
"com.sun.xacml"
] | com.sun.xacml; | 2,389,403 |
// creating tree objects of Point.
Point a = new Point(0, 0);
Point b = new Point(0, 2);
Point c = new Point(2, 0);
// Creating triangle and setting point's objects.
Triangle triangle = new Triangle(a, b, c);
// Calculating square.
double result = triangle.area();
... | Point a = new Point(0, 0); Point b = new Point(0, 2); Point c = new Point(2, 0); Triangle triangle = new Triangle(a, b, c); double result = triangle.area(); double expected = 2D; assertThat(result, closeTo(expected, 0.1)); } | /**
* Test for existing triangle.
*/ | Test for existing triangle | whenAreaSetThreePointsThenTriangleArea | {
"repo_name": "MikhailoPalii/paliim",
"path": "chapter_001/src/test/java/ru/job4j/condition/TriangleTest.java",
"license": "apache-2.0",
"size": 1382
} | [
"org.hamcrest.number.IsCloseTo",
"org.junit.Assert"
] | import org.hamcrest.number.IsCloseTo; import org.junit.Assert; | import org.hamcrest.number.*; import org.junit.*; | [
"org.hamcrest.number",
"org.junit"
] | org.hamcrest.number; org.junit; | 1,668,678 |
return this.configNode;
}
/**
* Should match the {@link Identifiable} implementation on a {@link ComponentFactory} | return this.configNode; } /** * Should match the {@link Identifiable} implementation on a {@link ComponentFactory} | /**
* Don't mess with this JsonNode; just read from it.
*
* @return json node representing the config data. {@link ComponentFactory} implementations should deserialize as
* they see fit.
*/ | Don't mess with this JsonNode; just read from it | getConfigNode | {
"repo_name": "palominolabs/benchpress",
"path": "job/src/main/java/com/palominolabs/benchpress/job/json/Task.java",
"license": "apache-2.0",
"size": 1311
} | [
"com.palominolabs.benchpress.job.id.Identifiable",
"com.palominolabs.benchpress.job.task.ComponentFactory"
] | import com.palominolabs.benchpress.job.id.Identifiable; import com.palominolabs.benchpress.job.task.ComponentFactory; | import com.palominolabs.benchpress.job.id.*; import com.palominolabs.benchpress.job.task.*; | [
"com.palominolabs.benchpress"
] | com.palominolabs.benchpress; | 353,944 |
X classify(Vector x);
| X classify(Vector x); | /**
* May return null e.g. if the classifier has not been trained
*/ | May return null e.g. if the classifier has not been trained | classify | {
"repo_name": "sodash/open-code",
"path": "winterwell.maths/src/com/winterwell/maths/classifiers/IClassifier.java",
"license": "mit",
"size": 1511
} | [
"no.uib.cipr.matrix.Vector"
] | import no.uib.cipr.matrix.Vector; | import no.uib.cipr.matrix.*; | [
"no.uib.cipr"
] | no.uib.cipr; | 2,567,796 |
public ResponseProjectDataList listProject(boolean largeList); | ResponseProjectDataList function(boolean largeList); | /**
* Lists existing Crucible projects
*
* @param largeList if more project information must be retrieved
* @return ResponseProjectDataList containing code, message, cause and project list key-value pairs used in REST responses
*/ | Lists existing Crucible projects | listProject | {
"repo_name": "dkoudela/crucible-project-admin-restapi",
"path": "src/main/java/com/davidkoudela/crucible/model/ProjectAdminModel.java",
"license": "gpl-2.0",
"size": 4280
} | [
"com.davidkoudela.crucible.rest.response.ResponseProjectDataList"
] | import com.davidkoudela.crucible.rest.response.ResponseProjectDataList; | import com.davidkoudela.crucible.rest.response.*; | [
"com.davidkoudela.crucible"
] | com.davidkoudela.crucible; | 856,544 |
public CppLinkActionBuilder addLibraries(NestedSet<LibraryToLink> inputs) {
for (LibraryToLink input : inputs) {
checkLibrary(input);
if (input.isMustKeepDebug()) {
mustKeepDebug = true;
}
}
this.libraries.addTransitive(inputs);
return this;
} | CppLinkActionBuilder function(NestedSet<LibraryToLink> inputs) { for (LibraryToLink input : inputs) { checkLibrary(input); if (input.isMustKeepDebug()) { mustKeepDebug = true; } } this.libraries.addTransitive(inputs); return this; } | /**
* Adds multiple artifact to the set of inputs. The artifacts must be archives or shared
* libraries.
*/ | Adds multiple artifact to the set of inputs. The artifacts must be archives or shared libraries | addLibraries | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java",
"license": "apache-2.0",
"size": 62785
} | [
"com.google.devtools.build.lib.collect.nestedset.NestedSet",
"com.google.devtools.build.lib.rules.cpp.LinkerInputs"
] | import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.rules.cpp.LinkerInputs; | import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.rules.cpp.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,576,361 |
@Override
public boolean supportsMultipleInstantiations(VTIEnvironment arg0) throws SQLException {
return false;
} | boolean function(VTIEnvironment arg0) throws SQLException { return false; } | /**
* Whether or not the Table Function can be instantiated multiple times
* within a single query execution.
*/ | Whether or not the Table Function can be instantiated multiple times within a single query execution | supportsMultipleInstantiations | {
"repo_name": "splicemachine/splice-community-sample-code",
"path": "tutorial-vti/src/main/java/com/splicemachine/tutorials/vti/PropertiesFileVTI.java",
"license": "apache-2.0",
"size": 6154
} | [
"com.splicemachine.db.vti.VTIEnvironment",
"java.sql.SQLException"
] | import com.splicemachine.db.vti.VTIEnvironment; import java.sql.SQLException; | import com.splicemachine.db.vti.*; import java.sql.*; | [
"com.splicemachine.db",
"java.sql"
] | com.splicemachine.db; java.sql; | 166,627 |
private List<WebMarkupContainer> iterateThroughClosedTasks(IssueTrackingTool tool){
List<WebMarkupContainer> listOfTaskTimer = new ArrayList<WebMarkupContainer>();
Iterator<Long> keys = closedTasks.keySet().iterator();
while(keys.hasNext()){
Long key = keys.next();
i... | List<WebMarkupContainer> function(IssueTrackingTool tool){ List<WebMarkupContainer> listOfTaskTimer = new ArrayList<WebMarkupContainer>(); Iterator<Long> keys = closedTasks.keySet().iterator(); while(keys.hasNext()){ Long key = keys.next(); if(closedTasks.get(key).getTask().getIssueTrackerType().equals(tool)){ listOfTa... | /**
* Generate a list of closed task panels sorted by issue tracker.
* @param tool IssueTrackingTool
* @return List of WebMarkupContainer
*/ | Generate a list of closed task panels sorted by issue tracker | iterateThroughClosedTasks | {
"repo_name": "tita/tita",
"path": "tita-wicket/src/main/java/at/ac/tuwien/ifs/tita/ui/tasklist/TaskListPanel.java",
"license": "apache-2.0",
"size": 25294
} | [
"at.ac.tuwien.ifs.tita.issuetracker.enums.IssueTrackingTool",
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.apache.wicket.markup.html.WebMarkupContainer"
] | import at.ac.tuwien.ifs.tita.issuetracker.enums.IssueTrackingTool; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.wicket.markup.html.WebMarkupContainer; | import at.ac.tuwien.ifs.tita.issuetracker.enums.*; import java.util.*; import org.apache.wicket.markup.html.*; | [
"at.ac.tuwien",
"java.util",
"org.apache.wicket"
] | at.ac.tuwien; java.util; org.apache.wicket; | 2,221,814 |
public boolean tickUpdates(boolean p_72955_1_)
{
if (this.worldInfo.getTerrainType() == WorldType.DEBUG_WORLD)
{
return false;
}
else
{
int i = this.pendingTickListEntriesTreeSet.size();
if (i != this.pendingTickListEntriesHashSet.size... | boolean function(boolean p_72955_1_) { if (this.worldInfo.getTerrainType() == WorldType.DEBUG_WORLD) { return false; } else { int i = this.pendingTickListEntriesTreeSet.size(); if (i != this.pendingTickListEntriesHashSet.size()) { throw new IllegalStateException(STR); } else { if (i > 65536) { i = 65536; } this.theProf... | /**
* Runs through the list of updates to run and ticks them
*/ | Runs through the list of updates to run and ticks them | tickUpdates | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/WorldServer.java",
"license": "lgpl-2.1",
"size": 54853
} | [
"java.util.Iterator",
"net.minecraft.block.Block",
"net.minecraft.block.material.Material",
"net.minecraft.block.state.IBlockState",
"net.minecraft.crash.CrashReport",
"net.minecraft.crash.CrashReportCategory",
"net.minecraft.util.ReportedException"
] | import java.util.Iterator; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.crash.CrashReport; import net.minecraft.crash.CrashReportCategory; import net.minecraft.util.ReportedException; | import java.util.*; import net.minecraft.block.*; import net.minecraft.block.material.*; import net.minecraft.block.state.*; import net.minecraft.crash.*; import net.minecraft.util.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.crash",
"net.minecraft.util"
] | java.util; net.minecraft.block; net.minecraft.crash; net.minecraft.util; | 1,035,217 |
@Override
public String toString() {
return "\n ChannelPlan {"
+ (channel != null ? " channel [" + channel + "]" : "")
+ (name != null ? " name [" + name + "]" : "")
+ super.toString();
}
/**
* Determine if the required fields in this SSRF data type instance are set.
... | String function() { return STR + (channel != null ? STR + channel + "]" : STR name [STR]STR") + super.toString(); } /** * Determine if the required fields in this SSRF data type instance are set. * <p> * {@link ChannelPlan} requires * {@link ListCCL cls}, {@link Serial serial}, {@link DT entryDateTime} | /**
* Get a string representation of this ChannelPlan instance configuration.
*
* @return The current object instance configuration as a non-null String
*/ | Get a string representation of this ChannelPlan instance configuration | toString | {
"repo_name": "KeyBridge/lib-openssrf",
"path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/ChannelPlan.java",
"license": "apache-2.0",
"size": 6160
} | [
"us.gov.dod.standard.ssrf._3_1.metadata.domains.Serial",
"us.gov.dod.standard.ssrf._3_1.metadata.lists.ListCCL"
] | import us.gov.dod.standard.ssrf._3_1.metadata.domains.Serial; import us.gov.dod.standard.ssrf._3_1.metadata.lists.ListCCL; | import us.gov.dod.standard.ssrf.*; | [
"us.gov.dod"
] | us.gov.dod; | 481,218 |
public void setWorkingDirectory(String aDirectory)
{
StringTokenizer whiteSpaceTester = new StringTokenizer(aDirectory);
if (whiteSpaceTester.countTokens() > 1)
{
props.put($P_QUOT, QM);
}
props.put($Path, aDirectory);
} | void function(String aDirectory) { StringTokenizer whiteSpaceTester = new StringTokenizer(aDirectory); if (whiteSpaceTester.countTokens() > 1) { props.put($P_QUOT, QM); } props.put($Path, aDirectory); } | /**
* Sets the working-directory
*
* @see com.izforge.izpack.util.os.Shortcut#setWorkingDirectory(java.lang.String)
*/ | Sets the working-directory | setWorkingDirectory | {
"repo_name": "RomRaider/original.mirror",
"path": "installer/IzPack/src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java",
"license": "gpl-2.0",
"size": 33355
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 814,061 |
public boolean getContainsUnpaidPaymentRequestsOrCreditMemos() {
if (getRelatedViews().getRelatedPaymentRequestViews() != null) {
for (PaymentRequestView element : getRelatedViews().getRelatedPaymentRequestViews()) {
// If the PREQ is neither cancelled nor voided, check whether t... | boolean function() { if (getRelatedViews().getRelatedPaymentRequestViews() != null) { for (PaymentRequestView element : getRelatedViews().getRelatedPaymentRequestViews()) { if (!PurapConstants.PaymentRequestStatuses.CANCELLED_STATUSES.contains(element.getApplicationDocumentStatus())) { if (element.getPaymentPaidTimesta... | /**
* Returns true if this Purchase Order contains unpaid items in the Payment Request or Credit Memo.
*
* @return true if this Purchase Order contains unpaid items in the Payment Request or Credit Memo.
*/ | Returns true if this Purchase Order contains unpaid items in the Payment Request or Credit Memo | getContainsUnpaidPaymentRequestsOrCreditMemos | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/document/PurchaseOrderDocument.java",
"license": "agpl-3.0",
"size": 84578
} | [
"org.kuali.kfs.module.purap.PurapConstants",
"org.kuali.kfs.module.purap.businessobject.CreditMemoView",
"org.kuali.kfs.module.purap.businessobject.PaymentRequestView"
] | import org.kuali.kfs.module.purap.PurapConstants; import org.kuali.kfs.module.purap.businessobject.CreditMemoView; import org.kuali.kfs.module.purap.businessobject.PaymentRequestView; | import org.kuali.kfs.module.purap.*; import org.kuali.kfs.module.purap.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,793,103 |
public SubResourceListResult withValue(List<SubResource> value) {
this.value = value;
return this;
} | SubResourceListResult function(List<SubResource> value) { this.value = value; return this; } | /**
* Set the value property: Enumeration of the sub-resources.
*
* @param value the value value to set.
* @return the SubResourceListResult object itself.
*/ | Set the value property: Enumeration of the sub-resources | withValue | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/SubResourceListResult.java",
"license": "mit",
"size": 1896
} | [
"com.azure.core.management.SubResource",
"java.util.List"
] | import com.azure.core.management.SubResource; import java.util.List; | import com.azure.core.management.*; import java.util.*; | [
"com.azure.core",
"java.util"
] | com.azure.core; java.util; | 737,914 |
private View setViewError(LayoutInflater inflater, View rootView)
{
return inflater.inflate(R.layout.toast_error, (ViewGroup) rootView.findViewById(R.id.toast_error_layout_root));
} | View function(LayoutInflater inflater, View rootView) { return inflater.inflate(R.layout.toast_error, (ViewGroup) rootView.findViewById(R.id.toast_error_layout_root)); } | /**
* Function setViewError
* for setting custom view form layout toast_error.xml
* @param inflater Inflater to use for inflating the view.
* @param rootView Root view for the view.
* @return Custom toast view.
*/ | Function setViewError for setting custom view form layout toast_error.xml | setViewError | {
"repo_name": "SanteriHetekivi/Rasian",
"path": "app/src/main/java/com/hetekivi/rasian/Managers/ToastManager.java",
"license": "apache-2.0",
"size": 5654
} | [
"android.view.LayoutInflater",
"android.view.View",
"android.view.ViewGroup"
] | import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 590,209 |
@Test
public void testInitialize_withEmptyConsumerKey() throws Exception {
Properties props = new Properties();
props.put(TwitterStreamSource.CFG_TWITTER_CONSUMER_KEY, "");
props.put(TwitterStreamSource.CFG_TWITTER_CONSUMER_SECRET, "csecret");
props.put(TwitterStreamSource.CFG_TWITTER_PROFILES, "");
pr... | void function() throws Exception { Properties props = new Properties(); props.put(TwitterStreamSource.CFG_TWITTER_CONSUMER_KEY, STRcsecretSTRSTRtkeySTRtsecretSTRSTRSTRMissing required input"); } catch(RequiredInputMissingException e) { } } | /**
* Test case for {@link TwitterStreamSource#initialize(java.util.Properties)} being provided
* properties missing the consumer key
*/ | Test case for <code>TwitterStreamSource#initialize(java.util.Properties)</code> being provided properties missing the consumer key | testInitialize_withEmptyConsumerKey | {
"repo_name": "ottogroup/SPQR",
"path": "spqr-operators/spqr-twitter/src/test/java/com/ottogroup/bi/spqr/operator/twitter/source/TwitterStreamSourceTest.java",
"license": "apache-2.0",
"size": 17032
} | [
"com.ottogroup.bi.spqr.exception.RequiredInputMissingException",
"java.util.Properties"
] | import com.ottogroup.bi.spqr.exception.RequiredInputMissingException; import java.util.Properties; | import com.ottogroup.bi.spqr.exception.*; import java.util.*; | [
"com.ottogroup.bi",
"java.util"
] | com.ottogroup.bi; java.util; | 1,417,923 |
@Message(id = 44, value = "Invalid '%s' value: %d, the maximum index is %d")
String invalidValue(String name, int value, int maxIndex); | @Message(id = 44, value = STR) String invalidValue(String name, int value, int maxIndex); | /**
* A message indicating the {@code name} has an invalid value.
*
* @param name the name of the attribute.
* @param value the invalid value.
* @param maxIndex the maximum index.
*
* @return the message.
*/ | A message indicating the name has an invalid value | invalidValue | {
"repo_name": "jamezp/wildfly-core",
"path": "host-controller/src/main/java/org/jboss/as/domain/controller/logging/DomainControllerLogger.java",
"license": "lgpl-2.1",
"size": 34982
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 468,287 |
public void testJavaSerializableClass() {
Object result = service.echo(new InheritanceTestSetFactory.JavaSerializableClass(3));
assertNotNull(result);
} | void function() { Object result = service.echo(new InheritanceTestSetFactory.JavaSerializableClass(3)); assertNotNull(result); } | /**
* Tests that transient fields do not prevent serializability.
*/ | Tests that transient fields do not prevent serializability | testJavaSerializableClass | {
"repo_name": "dice-cyfronet/gwt-proxy",
"path": "test/com/gdevelop/gwt/syncrpc/test/InheritanceTest.java",
"license": "apache-2.0",
"size": 3661
} | [
"com.google.gwt.user.client.rpc.InheritanceTestSetFactory"
] | import com.google.gwt.user.client.rpc.InheritanceTestSetFactory; | import com.google.gwt.user.client.rpc.*; | [
"com.google.gwt"
] | com.google.gwt; | 691,960 |
public POP3Client getPOP3() {
return pop3;
} | POP3Client function() { return pop3; } | /**
* Obtain the serverSocket that that MailServer is listening on.
*/ | Obtain the serverSocket that that MailServer is listening on | getPOP3 | {
"repo_name": "hugosato/apache-axis",
"path": "src/org/apache/axis/transport/mail/MailServer.java",
"license": "apache-2.0",
"size": 7731
} | [
"org.apache.commons.net.pop3.POP3Client"
] | import org.apache.commons.net.pop3.POP3Client; | import org.apache.commons.net.pop3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,359,572 |
static File initStorageDirectory(String storageDirectory) throws
IOException {
File baseDir;
if (StringUtils.isNullOrWhitespaceOnly(storageDirectory)) {
baseDir = new File(System.getProperty("java.io.tmpdir"));
}
else {
baseDir = new File(storageDirectory);
}
File storageDir;
final int MAX_AT... | static File initStorageDirectory(String storageDirectory) throws IOException { File baseDir; if (StringUtils.isNullOrWhitespaceOnly(storageDirectory)) { baseDir = new File(System.getProperty(STR)); } else { baseDir = new File(storageDirectory); } File storageDir; final int MAX_ATTEMPTS = 10; for(int attempt = 0; attemp... | /**
* Creates a storage directory for a blob service.
*
* @return the storage directory used by a BLOB service
*
* @throws IOException
* thrown if the (local or distributed) file storage cannot be created or
* is not usable
*/ | Creates a storage directory for a blob service | initStorageDirectory | {
"repo_name": "fanyon/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobUtils.java",
"license": "apache-2.0",
"size": 12969
} | [
"java.io.File",
"java.io.IOException",
"java.util.UUID",
"org.apache.flink.util.StringUtils"
] | import java.io.File; import java.io.IOException; import java.util.UUID; import org.apache.flink.util.StringUtils; | import java.io.*; import java.util.*; import org.apache.flink.util.*; | [
"java.io",
"java.util",
"org.apache.flink"
] | java.io; java.util; org.apache.flink; | 1,089,774 |
protected void initializeDefaultKeyboardActions() {
this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), "cancel");
this.getRootPane().getActionMap().put("cancel", this.okAction);
}
| void function() { this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), STR); this.getRootPane().getActionMap().put(STR, this.okAction); } | /**
* allow ESC to close the dialog
*/ | allow ESC to close the dialog | initializeDefaultKeyboardActions | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/AboutDialog.java",
"license": "epl-1.0",
"size": 8514
} | [
"java.awt.event.KeyEvent",
"javax.swing.JComponent",
"javax.swing.KeyStroke"
] | import java.awt.event.KeyEvent; import javax.swing.JComponent; import javax.swing.KeyStroke; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,782,763 |
public BigInteger getMaxCRL() {
return maxCRL;
} | BigInteger function() { return maxCRL; } | /**
* Returns the criterion for the maximum CRL number.
* <p>
* The CRL must have a number extension with a value less than or equal to
* the returned value.
*
* @return the maximum CRL number or null if the maximum CRL number is not
* checked.
*/ | Returns the criterion for the maximum CRL number. The CRL must have a number extension with a value less than or equal to the returned value | getMaxCRL | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/classlib/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java",
"license": "apache-2.0",
"size": 16056
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 892,249 |
private void setupDOMResultHandler(DOMSource source, DOMResult result) throws SAXException {
// If there's no DOMResult, unset the validator handler
if (result == null) {
fDOMValidatorHandler = null;
fSchemaValidator.setDocumentHandler(null);
return;
... | void function(DOMSource source, DOMResult result) throws SAXException { if (result == null) { fDOMValidatorHandler = null; fSchemaValidator.setDocumentHandler(null); return; } final Node nodeResult = (Node) result.getNode(); if (source.getNode() == nodeResult) { fDOMValidatorHandler = fDOMResultAugmentor; fDOMResultAug... | /**
* Sets up handler for <code>DOMResult</code>.
*/ | Sets up handler for <code>DOMResult</code> | setupDOMResultHandler | {
"repo_name": "greatrakshit/xerces-for-android",
"path": "src/mf/org/apache/xerces/jaxp/validation/DOMValidatorHelper.java",
"license": "apache-2.0",
"size": 24847
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,870,884 |
public static String getAlertLevelAsString(final int intLevel) {
if (intLevel == Alert.SEVERE) {
return "severe";
} else if (intLevel == Alert.ERROR) {
return "error";
} else if (intLevel == Alert.WARNING) {
return "warning";
} else if (intLevel == Alert.OFF) {
return "none";
... | static String function(final int intLevel) { if (intLevel == Alert.SEVERE) { return STR; } else if (intLevel == Alert.ERROR) { return "error"; } else if (intLevel == Alert.WARNING) { return STR; } else if (intLevel == Alert.OFF) { return "none"; } throw new IllegalArgumentException(STR + intLevel); } | /**
* Converts the int alert level to a string representation.
*
* @param intLevel int alert level to convert
* @return A string representation of the alert level
*/ | Converts the int alert level to a string representation | getAlertLevelAsString | {
"repo_name": "pivotal-amurmann/geode",
"path": "geode-core/src/main/java/org/apache/geode/management/internal/AlertDetails.java",
"license": "apache-2.0",
"size": 4393
} | [
"org.apache.geode.internal.admin.Alert"
] | import org.apache.geode.internal.admin.Alert; | import org.apache.geode.internal.admin.*; | [
"org.apache.geode"
] | org.apache.geode; | 719,279 |
public static CreditCurveDataId.Builder builder() {
return new CreditCurveDataId.Builder();
}
protected CreditCurveDataId(CreditCurveDataId.Builder builder) {
JodaBeanUtils.notEmpty(builder._snapshot, "snapshot");
JodaBeanUtils.notNull(builder._key, "key");
this._snapshot = builder._snapshot;
... | static CreditCurveDataId.Builder function() { return new CreditCurveDataId.Builder(); } CreditCurveDataId(CreditCurveDataId.Builder function) { JodaBeanUtils.notEmpty(builder._snapshot, STR); JodaBeanUtils.notNull(builder._key, "key"); this._snapshot = builder._snapshot; this._key = builder._key; } | /**
* Returns a builder used to create an instance of the bean.
* @return the builder, not null
*/ | Returns a builder used to create an instance of the bean | builder | {
"repo_name": "ChinaQuants/OG-Platform",
"path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/marketdata/CreditCurveDataId.java",
"license": "apache-2.0",
"size": 11649
} | [
"org.joda.beans.JodaBeanUtils"
] | import org.joda.beans.JodaBeanUtils; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,351,672 |
public static boolean attributesEqual(Attributes a, Attributes b)
{
if (a == null && b == null) {
return true;
}
if (a == null || b == null) {
return false;
}
return a.equals(b);
} | static boolean function(Attributes a, Attributes b) { if (a == null && b == null) { return true; } if (a == null b == null) { return false; } return a.equals(b); } | /**
* Checks whether two 'Attributes' objects are equivalent (including naming attributes, if any).
*/ | Checks whether two 'Attributes' objects are equivalent (including naming attributes, if any) | attributesEqual | {
"repo_name": "idega/platform2",
"path": "src/com/idega/core/ldap/client/naming/DXAttributes.java",
"license": "gpl-3.0",
"size": 51405
} | [
"javax.naming.directory.Attributes"
] | import javax.naming.directory.Attributes; | import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 2,645,692 |
public Map<File, String> getAttachments() throws MessagingException, IOException {
Map<File, String> result = Maps.newHashMap();
if (message.isMimeType("multipart/*")) {
Multipart multipart = (Multipart) message.getContent();
for (int i = 0; i < multipart.getCount(); i++) {
BodyPart bodyPart = multip... | Map<File, String> function() throws MessagingException, IOException { Map<File, String> result = Maps.newHashMap(); if (message.isMimeType(STR)) { Multipart multipart = (Multipart) message.getContent(); for (int i = 0; i < multipart.getCount(); i++) { BodyPart bodyPart = multipart.getBodyPart(i); if (Part.ATTACHMENT.eq... | /**
* Returns a map of all attachments. All files are written to a temporary directory and need to be deleted after
* use.
*
* @throws MessagingException
* @throws IOException
*/ | Returns a map of all attachments. All files are written to a temporary directory and need to be deleted after use | getAttachments | {
"repo_name": "equal-it/jira-exchange-connector",
"path": "src/main/java/de/equalIT/jiraExchangeConnector/impl/MessageWrapper.java",
"license": "mit",
"size": 3638
} | [
"com.google.common.base.Strings",
"com.google.common.collect.Maps",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.Map",
"javax.mail.BodyPart",
"javax.mail.MessagingException",
"javax.mail.Multipart",
"javax.mail.Part"
] | import com.google.common.base.Strings; import com.google.common.collect.Maps; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Map; import javax.mail.BodyPart; import javax.mail.MessagingException; import javax.mail.Multipart; import javax.ma... | import com.google.common.base.*; import com.google.common.collect.*; import java.io.*; import java.util.*; import javax.mail.*; | [
"com.google.common",
"java.io",
"java.util",
"javax.mail"
] | com.google.common; java.io; java.util; javax.mail; | 1,962,959 |
public Observable<ServiceResponse<PolicyDefinitionInner>> getAtManagementGroupWithServiceResponseAsync(String policyDefinitionName, String managementGroupId) {
if (policyDefinitionName == null) {
throw new IllegalArgumentException("Parameter policyDefinitionName is required and cannot be null.")... | Observable<ServiceResponse<PolicyDefinitionInner>> function(String policyDefinitionName, String managementGroupId) { if (policyDefinitionName == null) { throw new IllegalArgumentException(STR); } if (managementGroupId == null) { throw new IllegalArgumentException(STR); } if (this.client.apiVersion() == null) { throw ne... | /**
* Retrieve a policy definition in a management group.
* This operation retrieves the policy definition in the given management group with the given name.
*
* @param policyDefinitionName The name of the policy definition to get.
* @param managementGroupId The ID of the management group.
... | Retrieve a policy definition in a management group. This operation retrieves the policy definition in the given management group with the given name | getAtManagementGroupWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/policy/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/policy/v2019_09_01/implementation/PolicyDefinitionsInner.java",
"license": "mit",
"size": 83227
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,194,864 |
public static BuildOptions of(
Iterable<Class<? extends FragmentOptions>> optionsList, OptionsClassProvider provider) {
Builder builder = builder();
for (Class<? extends FragmentOptions> optionsClass : optionsList) {
builder.add(provider.getOptions(optionsClass));
}
return builder.build();... | static BuildOptions function( Iterable<Class<? extends FragmentOptions>> optionsList, OptionsClassProvider provider) { Builder builder = builder(); for (Class<? extends FragmentOptions> optionsClass : optionsList) { builder.add(provider.getOptions(optionsClass)); } return builder.build(); } | /**
* Creates a BuildOptions class by taking the option values from an options provider
* (eg. an OptionsParser).
*/ | Creates a BuildOptions class by taking the option values from an options provider (eg. an OptionsParser) | of | {
"repo_name": "juhalindfors/bazel-patches",
"path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java",
"license": "apache-2.0",
"size": 12381
} | [
"com.google.devtools.common.options.OptionsClassProvider"
] | import com.google.devtools.common.options.OptionsClassProvider; | import com.google.devtools.common.options.*; | [
"com.google.devtools"
] | com.google.devtools; | 872,796 |
private static void writeValue(String prefix, String element, String value, Writer writer)
throws IOException {
if (element != null && !element.equals("") && value != null && !value.equals("")
&& writer != null) {
writer.write(prefix + "<" + element + ">" + value ... | static void function(String prefix, String element, String value, Writer writer) throws IOException { if (element != null && !element.equals(STRSTR<STR>STR</STR>\n"); } } | /**
* Writes closed elements with values.
*
* @param prefix
* A prefix to write.
* @param element
* The name of the element.
* @param value
* The value of the element.
* @param writer
* The writer to write.
* ... | Writes closed elements with values | writeValue | {
"repo_name": "Communote/communote-server",
"path": "communote/persistence/src/main/java/com/communote/server/core/crc/xml/MetadataXMLCreator.java",
"license": "apache-2.0",
"size": 7919
} | [
"java.io.IOException",
"java.io.Writer"
] | import java.io.IOException; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,834,415 |
private void parseRelayOrExpanderMessage(ADMsgType mt, String msg) throws MessageParseException {
String parts[] = splitMessage(msg);
if (parts.length != 3) {
throw new MessageParseException("need 3 comma separated fields in msg");
}
String addr = parts[0] + "," + parts[1... | void function(ADMsgType mt, String msg) throws MessageParseException { String parts[] = splitMessage(msg); if (parts.length != 3) { throw new MessageParseException(STR); } String addr = parts[0] + "," + parts[1]; try { int numeric = Integer.parseInt(parts[2]); if ((numeric & ~0x1) != 0) { throw new MessageParseExceptio... | /**
* The relay and expander messages have identical format
*
* @param mt message type of incoming message
* @param msg string containing incoming message
* @throws MessageParseException
*/ | The relay and expander messages have identical format | parseRelayOrExpanderMessage | {
"repo_name": "vgoldman/openhab",
"path": "bundles/binding/org.openhab.binding.alarmdecoder/src/main/java/org/openhab/binding/alarmdecoder/internal/AlarmDecoderBinding.java",
"license": "epl-1.0",
"size": 28674
} | [
"java.util.ArrayList",
"org.openhab.core.library.types.OpenClosedType"
] | import java.util.ArrayList; import org.openhab.core.library.types.OpenClosedType; | import java.util.*; import org.openhab.core.library.types.*; | [
"java.util",
"org.openhab.core"
] | java.util; org.openhab.core; | 111,687 |
public void addPropertyChangeListener(PropertyChangeListener l) {
m_Support.addPropertyChangeListener(l);
} | void function(PropertyChangeListener l) { m_Support.addPropertyChangeListener(l); } | /**
* Adds a PropertyChangeListener who will be notified of value changes.
*
* @param l a value of type 'PropertyChangeListener'
*/ | Adds a PropertyChangeListener who will be notified of value changes | addPropertyChangeListener | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/experiment/SimpleSetupPanel.java",
"license": "gpl-3.0",
"size": 43141
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 980,351 |
public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers);
/**
* Invoked every time response's chunk are received.
*
* @param bytes a {@link byte[]} | void function(FluentCaseInsensitiveStringsMap headers); /** * Invoked every time response's chunk are received. * * @param bytes a {@link byte[]} | /**
* Invoked when the response bytes are starting to get received.
*/ | Invoked when the response bytes are starting to get received | onResponseHeadersReceived | {
"repo_name": "flipkart-incubator/async-http-client",
"path": "api/src/main/java/org/asynchttpclient/listener/TransferListener.java",
"license": "apache-2.0",
"size": 2076
} | [
"org.asynchttpclient.FluentCaseInsensitiveStringsMap"
] | import org.asynchttpclient.FluentCaseInsensitiveStringsMap; | import org.asynchttpclient.*; | [
"org.asynchttpclient"
] | org.asynchttpclient; | 1,168,280 |
@NonNull CompletableFuture<Void> saveTrack(@NonNull Track track); | @NonNull CompletableFuture<Void> saveTrack(@NonNull Track track); | /**
* Saves a track's data back to the plugin's storage provider.
*
* <p>You should call this after you make any changes to a track.</p>
*
* @param track the track to save
* @return a future to encapsulate the operation.
* @throws NullPointerException if track is null
* @throws ... | Saves a track's data back to the plugin's storage provider. You should call this after you make any changes to a track | saveTrack | {
"repo_name": "lucko/LuckPerms",
"path": "api/src/main/java/net/luckperms/api/track/TrackManager.java",
"license": "mit",
"size": 4931
} | [
"java.util.concurrent.CompletableFuture",
"org.checkerframework.checker.nullness.qual.NonNull"
] | import java.util.concurrent.CompletableFuture; import org.checkerframework.checker.nullness.qual.NonNull; | import java.util.concurrent.*; import org.checkerframework.checker.nullness.qual.*; | [
"java.util",
"org.checkerframework.checker"
] | java.util; org.checkerframework.checker; | 1,310,564 |
EAttribute getAddressType_ElectronicMailAddress(); | EAttribute getAddressType_ElectronicMailAddress(); | /**
* Returns the meta object for the attribute '{@link net.opengis.ows11.AddressType#getElectronicMailAddress <em>Electronic Mail Address</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Electronic Mail Address</em>'.
* @see net.opengis.ows11.A... | Returns the meta object for the attribute '<code>net.opengis.ows11.AddressType#getElectronicMailAddress Electronic Mail Address</code>'. | getAddressType_ElectronicMailAddress | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.ows/src/net/opengis/ows11/Ows11Package.java",
"license": "lgpl-2.1",
"size": 292282
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,256,786 |
public void getData() {
logDebug( BaseMessages.getString( PKG, "DatabaseLookupDialog.Log.GettingKeyInfo" ) );
wCache.setSelection( input.isCached() );
wCachesize.setText( "" + input.getCacheSize() );
wCacheLoadAll.setSelection( input.isLoadingAllDataInCache() );
if ( input.getStreamKeyField1() !... | void function() { logDebug( BaseMessages.getString( PKG, STR ) ); wCache.setSelection( input.isCached() ); wCachesize.setText( "" + input.getCacheSize() ); wCacheLoadAll.setSelection( input.isLoadingAllDataInCache() ); if ( input.getStreamKeyField1() != null ) { for ( int i = 0; i < input.getStreamKeyField1().length; i... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "emartin-pentaho/pentaho-kettle",
"path": "ui/src/main/java/org/pentaho/di/ui/trans/steps/databaselookup/DatabaseLookupDialog.java",
"license": "apache-2.0",
"size": 35329
} | [
"org.eclipse.swt.widgets.TableItem",
"org.pentaho.di.core.row.value.ValueMetaFactory",
"org.pentaho.di.i18n.BaseMessages"
] | import org.eclipse.swt.widgets.TableItem; import org.pentaho.di.core.row.value.ValueMetaFactory; import org.pentaho.di.i18n.BaseMessages; | import org.eclipse.swt.widgets.*; import org.pentaho.di.core.row.value.*; import org.pentaho.di.i18n.*; | [
"org.eclipse.swt",
"org.pentaho.di"
] | org.eclipse.swt; org.pentaho.di; | 1,811,458 |
protected Set<String> getChangedDotFiles() {
Set<String> generatedFiles = getGeneratedFiles();
// If there is no status file to compare against or no files are
// generated then skip image generation
if (generatedFiles == null || generatedFiles.isEmpty()) {
return null;
}
// Check if images for gene... | Set<String> function() { Set<String> generatedFiles = getGeneratedFiles(); if (generatedFiles == null generatedFiles.isEmpty()) { return null; } Set<String> changedDotFiles = new HashSet<String>(); for (String generatedFile : generatedFiles) { if (generatedFile.endsWith(".dot")) { File dotFile = new File(getProject().g... | /**
* Returns a list with file names of dot files that have been changed since
* previous image generation run. Empty if no files changed or
* <code>null</code> if there is no status file to compare against.
*/ | Returns a list with file names of dot files that have been changed since previous image generation run. Empty if no files changed or <code>null</code> if there is no status file to compare against | getChangedDotFiles | {
"repo_name": "sculptor/sculptor",
"path": "sculptor-maven/sculptor-maven-plugin/src/main/java/org/sculptor/maven/plugin/GraphvizMojo.java",
"license": "apache-2.0",
"size": 7631
} | [
"java.io.File",
"java.text.MessageFormat",
"java.util.HashSet",
"java.util.Set"
] | import java.io.File; import java.text.MessageFormat; import java.util.HashSet; import java.util.Set; | import java.io.*; import java.text.*; import java.util.*; | [
"java.io",
"java.text",
"java.util"
] | java.io; java.text; java.util; | 606,770 |
List<PipelineConfig> getPipelineConfigs(final ProviderType providerType,
final Integer page,
final Integer pageSize,
final String sort,
bool... | List<PipelineConfig> getPipelineConfigs(final ProviderType providerType, final Integer page, final Integer pageSize, final String sort, boolean sortOrder) throws BusinessException; | /**
* Gets the Pipeline Configurations registered in the service and associated with the given provider type.
* @param providerType a provider type registered in the system.
* @return a list with the pipeline configurations associated with the provider type.
*/ | Gets the Pipeline Configurations registered in the service and associated with the given provider type | getPipelineConfigs | {
"repo_name": "romartin/kie-wb-common",
"path": "kie-wb-common-ala/kie-wb-common-ala-services-api/src/main/java/org/guvnor/ala/services/api/backend/PipelineServiceBackend.java",
"license": "apache-2.0",
"size": 4693
} | [
"java.util.List",
"org.guvnor.ala.pipeline.PipelineConfig",
"org.guvnor.ala.runtime.providers.ProviderType",
"org.guvnor.ala.services.exceptions.BusinessException"
] | import java.util.List; import org.guvnor.ala.pipeline.PipelineConfig; import org.guvnor.ala.runtime.providers.ProviderType; import org.guvnor.ala.services.exceptions.BusinessException; | import java.util.*; import org.guvnor.ala.pipeline.*; import org.guvnor.ala.runtime.providers.*; import org.guvnor.ala.services.exceptions.*; | [
"java.util",
"org.guvnor.ala"
] | java.util; org.guvnor.ala; | 2,663,584 |
lock.writeLock().lock();
try {
List<EventHandler<? extends T>> list = clazzToListOfHandlersMap.get(clazz);
if (list == null) {
list = new LinkedList<EventHandler<? extends T>>();
clazzToListOfHandlersMap.put(clazz, list);
}
list.add(handler);
} finally {
lock.writeL... | lock.writeLock().lock(); try { List<EventHandler<? extends T>> list = clazzToListOfHandlersMap.get(clazz); if (list == null) { list = new LinkedList<EventHandler<? extends T>>(); clazzToListOfHandlersMap.put(clazz, list); } list.add(handler); } finally { lock.writeLock().unlock(); } } | /**
* Subscribes an event handler for an event class type.
*
* @param clazz an event class
* @param handler an event handler
*/ | Subscribes an event handler for an event class type | subscribe | {
"repo_name": "markusweimer/incubator-reef",
"path": "lang/java/reef-wake/wake/src/main/java/org/apache/reef/wake/impl/PubSubEventHandler.java",
"license": "apache-2.0",
"size": 3506
} | [
"java.util.LinkedList",
"java.util.List",
"org.apache.reef.wake.EventHandler"
] | import java.util.LinkedList; import java.util.List; import org.apache.reef.wake.EventHandler; | import java.util.*; import org.apache.reef.wake.*; | [
"java.util",
"org.apache.reef"
] | java.util; org.apache.reef; | 1,237,758 |
public void linetoHorizontalRel(float x) throws ParseException {
command(SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL);
param(x);
} | void function(float x) throws ParseException { command(SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL); param(x); } | /**
* Implements {@link PathHandler#linetoHorizontalRel(float)}.
*/ | Implements <code>PathHandler#linetoHorizontalRel(float)</code> | linetoHorizontalRel | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/parser/PathArrayProducer.java",
"license": "apache-2.0",
"size": 10360
} | [
"org.w3c.dom.svg.SVGPathSeg"
] | import org.w3c.dom.svg.SVGPathSeg; | import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,095,082 |
public Vector loadHouseDecks(String teacher_id, String root_path, String device_id)
{
String method = "loadHouseDecks";
Vector house_decks = new Vector();
String house_decks_path = root_path
+File.separator+Constants.FILES
+File.separator+Constants.ADMIN
... | Vector function(String teacher_id, String root_path, String device_id) { String method = STR; Vector house_decks = new Vector(); String house_decks_path = root_path +File.separator+Constants.FILES +File.separator+Constants.ADMIN +File.separator+Constants.TEACHERS +File.separator+teacher_id +File.separator+STR +File.sep... | /** UNbind the following type of xml:
* <house_decks>
<house_deck>
<deck_id>-1111111111111111111</deck_id>
<name>green</name>
<deck_card>
<card_id>-1111111111111111111</card_id>
<card_name>R1</card_name>
<index>1</index>
<type>reading</type>
</deck_card>
</house_deck>
</house_decks>
* @param t... | UNbind the following type of xml: | loadHouseDecks | {
"repo_name": "timofeysie/catechis",
"path": "src/org/catechis/file/FileSaveTests.java",
"license": "apache-2.0",
"size": 78319
} | [
"java.io.File",
"java.util.List",
"java.util.Vector",
"org.catechis.constants.Constants",
"org.catechis.wherewithal.HouseDeck",
"org.jdom.Element"
] | import java.io.File; import java.util.List; import java.util.Vector; import org.catechis.constants.Constants; import org.catechis.wherewithal.HouseDeck; import org.jdom.Element; | import java.io.*; import java.util.*; import org.catechis.constants.*; import org.catechis.wherewithal.*; import org.jdom.*; | [
"java.io",
"java.util",
"org.catechis.constants",
"org.catechis.wherewithal",
"org.jdom"
] | java.io; java.util; org.catechis.constants; org.catechis.wherewithal; org.jdom; | 2,395,881 |
EClass getIfExp(); | EClass getIfExp(); | /**
* Returns the meta object for class '{@link anatlyzer.atlext.OCL.IfExp <em>If Exp</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>If Exp</em>'.
* @see anatlyzer.atlext.OCL.IfExp
* @generated
*/ | Returns the meta object for class '<code>anatlyzer.atlext.OCL.IfExp If Exp</code>'. | getIfExp | {
"repo_name": "jesusc/anatlyzer",
"path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/OCL/OCLPackage.java",
"license": "epl-1.0",
"size": 484377
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,621,595 |
public InstructionHandle getLeavingRET(); | InstructionHandle function(); | /**
* Returns the one and only RET that leaves the subroutine.
* Note that JustIce has a pretty rigid notion of a subroutine.
* <B>Must not be invoked on the 'top-level subroutine'.</B>
*
* @see org.apache.bcel.verifier.structurals.Subroutines
*/ | Returns the one and only RET that leaves the subroutine. Note that JustIce has a pretty rigid notion of a subroutine. Must not be invoked on the 'top-level subroutine' | getLeavingRET | {
"repo_name": "tempbottle/CJBE",
"path": "src/org/apache/bcel/verifier/structurals/Subroutine.java",
"license": "gpl-3.0",
"size": 5241
} | [
"org.apache.bcel.generic.InstructionHandle"
] | import org.apache.bcel.generic.InstructionHandle; | import org.apache.bcel.generic.*; | [
"org.apache.bcel"
] | org.apache.bcel; | 1,632,440 |
@Override
public T_URIAGE rename(String name) {
return new T_URIAGE(DSL.name(name), null);
} | T_URIAGE function(String name) { return new T_URIAGE(DSL.name(name), null); } | /**
* Rename this table
*/ | Rename this table | rename | {
"repo_name": "ShowKa/HanbaiKanri",
"path": "src/main/java/com/showka/table/public_/tables/T_URIAGE.java",
"license": "mit",
"size": 7362
} | [
"org.jooq.impl.DSL"
] | import org.jooq.impl.DSL; | import org.jooq.impl.*; | [
"org.jooq.impl"
] | org.jooq.impl; | 1,067,501 |
private static int compareTo(byte[] ip1, byte[] ip2)
{
if (Arrays.areEqual(ip1, ip2))
{
return 0;
}
if (Arrays.areEqual(max(ip1, ip2), ip1))
{
return 1;
}
return -1;
} | static int function(byte[] ip1, byte[] ip2) { if (Arrays.areEqual(ip1, ip2)) { return 0; } if (Arrays.areEqual(max(ip1, ip2), ip1)) { return 1; } return -1; } | /**
* Compares IP address <code>ip1</code> with <code>ip2</code>. If ip1
* is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1
* otherwise.
*
* @param ip1 The first IP address.
* @param ip2 The second IP address.
* @return 0 if ip1 is equal to ip2, 1 if ip1 is bigger, -1... | Compares IP address <code>ip1</code> with <code>ip2</code>. If ip1 is equal to ip2 0 is returned. If ip1 is bigger 1 is returned, -1 otherwise | compareTo | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/jce/provider/PKIXNameConstraintValidator.java",
"license": "mit",
"size": 55817
} | [
"org.bouncycastle.util.Arrays"
] | import org.bouncycastle.util.Arrays; | import org.bouncycastle.util.*; | [
"org.bouncycastle.util"
] | org.bouncycastle.util; | 1,867,772 |
public static void setRememberLastLocation(Context c, Boolean v) {
if (v == null)
v = c.getResources()
.getBoolean(
R.bool.anhuu_f5be488d_pkey_display_remember_last_location_def);
p(c).edit()
.put... | static void function(Context c, Boolean v) { if (v == null) v = c.getResources() .getBoolean( R.bool.anhuu_f5be488d_pkey_display_remember_last_location_def); p(c).edit() .putBoolean( c.getString(R.string.anhuu_f5be488d_pkey_display_remember_last_location), v).commit(); } | /**
* Enables or disables remembering last location.
*
* @param c
* {@link Context}.
* @param v
* your preferred flag. If {@code null}, default will be used
* ( {@code true}).
* @since v4.7 beta
*/ | Enables or disables remembering last location | setRememberLastLocation | {
"repo_name": "Darknutrino/an-huu",
"path": "code/src/com/haibison/android/anhuu/Settings.java",
"license": "mit",
"size": 13708
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 64,525 |
public Map<String, List<String>> listCommands() {
Map<String, List<String>> result = new HashMap<String, List<String>>();
for (String cat : restMetadataJson.keySet()) {
JsonObject commands = restMetadataJson.getJsonObject(cat);
List<String> names = new ArrayList<String>();
... | Map<String, List<String>> function() { Map<String, List<String>> result = new HashMap<String, List<String>>(); for (String cat : restMetadataJson.keySet()) { JsonObject commands = restMetadataJson.getJsonObject(cat); List<String> names = new ArrayList<String>(); for (String commandName: commands.keySet()) { names.add(c... | /**
* Retrieve the map of commands keyed by service name
* @return map of commands
*/ | Retrieve the map of commands keyed by service name | listCommands | {
"repo_name": "dell-oss/Doradus",
"path": "doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java",
"license": "apache-2.0",
"size": 9470
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.json.JsonObject"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.json.JsonObject; | import java.util.*; import javax.json.*; | [
"java.util",
"javax.json"
] | java.util; javax.json; | 232,873 |
ByteBuffer toByteBuffer(); | ByteBuffer toByteBuffer(); | /**
* Converts this buffer's readable bytes into a NIO buffer. The returned
* buffer might or might not share the content with this buffer, while they
* have separate indexes and marks. This method is identical to {@code
* buf.toByteBuffer(buf.readerIndex(), buf.readableBytes())}. This method
... | Converts this buffer's readable bytes into a NIO buffer. The returned buffer might or might not share the content with this buffer, while they have separate indexes and marks. This method is identical to buf.toByteBuffer(buf.readerIndex(), buf.readableBytes()). This method does not modify readerIndex or writerIndex of ... | toByteBuffer | {
"repo_name": "qtvbwfn/dubbo",
"path": "dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/buffer/ChannelBuffer.java",
"license": "apache-2.0",
"size": 43632
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 294,490 |
public JLibItem getJLibItem(FileConfiguration config, String path) {
return new JLibItem(this.getItemNew(config, path + ".Item"), config.getBoolean(path + ".AsteriskItem"), config.getInt(path + ".Position"));
}
/**
* Returns a GUI specified in the Config File
*
* @param config The Co... | JLibItem function(FileConfiguration config, String path) { return new JLibItem(this.getItemNew(config, path + ".Item"), config.getBoolean(path + STR), config.getInt(path + STR)); } /** * Returns a GUI specified in the Config File * * @param config The Config * @param path The path to the GUI * @return The GUI * @deprec... | /**
* Returns a JLibItem specified in the Config File (New format)
*
* @param config The Config
* @param path The path to the GuiItem
* @return The JLibItem
*/ | Returns a JLibItem specified in the Config File (New format) | getJLibItem | {
"repo_name": "j0ach1mmall3/JLib",
"path": "src/main/java/com/j0ach1mmall3/jlib/storage/file/yaml/Config.java",
"license": "gpl-3.0",
"size": 10108
} | [
"com.j0ach1mmall3.jlib.inventory.JLibItem",
"java.io.File",
"org.bukkit.configuration.file.FileConfiguration"
] | import com.j0ach1mmall3.jlib.inventory.JLibItem; import java.io.File; import org.bukkit.configuration.file.FileConfiguration; | import com.j0ach1mmall3.jlib.inventory.*; import java.io.*; import org.bukkit.configuration.file.*; | [
"com.j0ach1mmall3.jlib",
"java.io",
"org.bukkit.configuration"
] | com.j0ach1mmall3.jlib; java.io; org.bukkit.configuration; | 919,470 |
public StructType defineQueryResultType(String name, Map<String, IDataType> tempTypes,
AttributeDefinition... attrDefs) throws AtlasException {
AttributeInfo[] infos = new AttributeInfo[attrDefs.length];
for (int i = 0; i < attrDefs.length; i++) {
infos[i] = new AttributeInf... | StructType function(String name, Map<String, IDataType> tempTypes, AttributeDefinition... attrDefs) throws AtlasException { AttributeInfo[] infos = new AttributeInfo[attrDefs.length]; for (int i = 0; i < attrDefs.length; i++) { infos[i] = new AttributeInfo(this, attrDefs[i], tempTypes); } return new StructType(this, na... | /**
* construct a temporary StructType for a Query Result. This is not registered in the
* typeSystem.
* The attributes in the typeDefinition can only reference permanent types.
* @param name struct type name
* @param attrDefs struct type definition
* @return temporary struct type
... | construct a temporary StructType for a Query Result. This is not registered in the typeSystem. The attributes in the typeDefinition can only reference permanent types | defineQueryResultType | {
"repo_name": "jnhagelberg/incubator-atlas",
"path": "typesystem/src/main/java/org/apache/atlas/typesystem/types/TypeSystem.java",
"license": "apache-2.0",
"size": 33163
} | [
"java.util.Map",
"org.apache.atlas.AtlasException"
] | import java.util.Map; import org.apache.atlas.AtlasException; | import java.util.*; import org.apache.atlas.*; | [
"java.util",
"org.apache.atlas"
] | java.util; org.apache.atlas; | 47,076 |
public InputStream getStream(String key)
{
try
{
if (UNFILTERED.equals(key))
{
return stream.getUnfilteredStream();
}
else if (getFilteredLabel().equals(key))
{
return stream.getFilteredStream();
... | InputStream function(String key) { try { if (UNFILTERED.equals(key)) { return stream.getUnfilteredStream(); } else if (getFilteredLabel().equals(key)) { return stream.getFilteredStream(); } else { return new PDStream(stream).createInputStream(filters.get(key)); } } catch (IOException e) { e.printStackTrace(); } return ... | /**
* Returns a InputStream of a partially filtered stream.
*
* @param key is an instance of String which tells which version of stream should be returned.
* @return an InputStream.
*/ | Returns a InputStream of a partially filtered stream | getStream | {
"repo_name": "ChunghwaTelecom/pdfbox",
"path": "tools/src/main/java/org/apache/pdfbox/tools/pdfdebugger/streampane/Stream.java",
"license": "apache-2.0",
"size": 7131
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.pdfbox.pdmodel.common.PDStream"
] | import java.io.IOException; import java.io.InputStream; import org.apache.pdfbox.pdmodel.common.PDStream; | import java.io.*; import org.apache.pdfbox.pdmodel.common.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 1,016,472 |
final Character character = CharacterStepBuilder.newBuilder()
.name("Merlin")
.wizardClass("alchemist")
.withSpell("poison")
.withAbility("invisibility")
.withAbility("wisdom")
.noMoreAbilities()
.build();
assertEquals("Merlin", character.getName());
asse... | final Character character = CharacterStepBuilder.newBuilder() .name(STR) .wizardClass(STR) .withSpell(STR) .withAbility(STR) .withAbility(STR) .noMoreAbilities() .build(); assertEquals(STR, character.getName()); assertEquals(STR, character.getWizardClass()); assertEquals(STR, character.getSpell()); assertNotNull(charac... | /**
* Build a new wizard {@link Character} and verify if it has the expected attributes
*/ | Build a new wizard <code>Character</code> and verify if it has the expected attributes | testBuildWizard | {
"repo_name": "hoswey/java-design-patterns",
"path": "step-builder/src/test/java/com/iluwatar/stepbuilder/CharacterStepBuilderTest.java",
"license": "mit",
"size": 4443
} | [
"java.util.List",
"org.junit.Assert"
] | import java.util.List; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,478,182 |
@Test
public void testValidatorNotApplied() {
PortletDefinition pd = cut.getPortlet("portlet2");
assertNotNull(pd);
Preferences prefs = pd.getPortletPreferences();
assertNotNull(prefs);
assertNull(prefs.getPreferencesValidator());
pd = cut.getPortlet("portlet5");
a... | void function() { PortletDefinition pd = cut.getPortlet(STR); assertNotNull(pd); Preferences prefs = pd.getPortletPreferences(); assertNotNull(prefs); assertNull(prefs.getPreferencesValidator()); pd = cut.getPortlet(STR); assertNotNull(pd); prefs = pd.getPortletPreferences(); assertNotNull(prefs); assertNull(prefs.getP... | /**
* The annotated validator is not applied to portlet 2. The validator would normally
* be applied to portlet 5, but is explicitly set to null in the portlet DD, so
* portlet 5 doesn't get a validator.
*/ | The annotated validator is not applied to portlet 2. The validator would normally be applied to portlet 5, but is explicitly set to null in the portlet DD, so portlet 5 doesn't get a validator | testValidatorNotApplied | {
"repo_name": "apache/portals-pluto",
"path": "pluto-container/src/test/java/org/apache/pluto/container/om/portlet/impl/jsr362/MergePrefs2Test.java",
"license": "apache-2.0",
"size": 10434
} | [
"org.apache.pluto.container.om.portlet.PortletDefinition",
"org.apache.pluto.container.om.portlet.Preferences",
"org.junit.Assert"
] | import org.apache.pluto.container.om.portlet.PortletDefinition; import org.apache.pluto.container.om.portlet.Preferences; import org.junit.Assert; | import org.apache.pluto.container.om.portlet.*; import org.junit.*; | [
"org.apache.pluto",
"org.junit"
] | org.apache.pluto; org.junit; | 422,413 |
public void applyMirroredCorrection(ResultPoint[] points) {
if (!mirrored || points == null || points.length < 3) {
return;
}
ResultPoint bottomLeft = points[0];
points[0] = points[2];
points[2] = bottomLeft;
// No need to 'fix' top-left and alignment pattern.
} | void function(ResultPoint[] points) { if (!mirrored points == null points.length < 3) { return; } ResultPoint bottomLeft = points[0]; points[0] = points[2]; points[2] = bottomLeft; } | /**
* Apply the result points' order correction due to mirroring.
*
* @param points Array of points to apply mirror correction to.
*/ | Apply the result points' order correction due to mirroring | applyMirroredCorrection | {
"repo_name": "aqnote/AndroidTest",
"path": "app-barcode/src/main/java/com/aqnote/app/barcode/core/qrcode/decoder/QRCodeDecoderMetaData.java",
"license": "apache-2.0",
"size": 1682
} | [
"com.aqnote.app.barcode.core.ResultPoint"
] | import com.aqnote.app.barcode.core.ResultPoint; | import com.aqnote.app.barcode.core.*; | [
"com.aqnote.app"
] | com.aqnote.app; | 1,207,448 |
public static String generateAlphaNumerique(int length) {
return RandomStringUtils.randomAlphanumeric(length);
} | static String function(int length) { return RandomStringUtils.randomAlphanumeric(length); } | /**
* Generates a password.
*
* @param length
* @return the generated password
*/ | Generates a password | generateAlphaNumerique | {
"repo_name": "williamkouwonou/biblitheque-y1",
"path": "biblio-resource-server/src/main/java/com/biblio/service/util/RandomUtil.java",
"license": "apache-2.0",
"size": 2010
} | [
"org.apache.commons.lang.RandomStringUtils"
] | import org.apache.commons.lang.RandomStringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,631,686 |
void saveSecret(String key, Tuple2<String,Secret> keyAndSecret, Host host, User user)
throws DotDataException, DotSecurityException; | void saveSecret(String key, Tuple2<String,Secret> keyAndSecret, Host host, User user) throws DotDataException, DotSecurityException; | /**
* Lookup for an individual secret/property then updates the single entry.
* @param key App unique id.
* @param keyAndSecret Tuple value Pair with the definition of the secret and name.
* @param host The host owning the secret.
* @param user logged-in user
*/ | Lookup for an individual secret/property then updates the single entry | saveSecret | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotcms/security/apps/AppsAPI.java",
"license": "gpl-3.0",
"size": 9865
} | [
"com.dotmarketing.beans.Host",
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.exception.DotSecurityException",
"com.liferay.portal.model.User",
"io.vavr.Tuple2"
] | import com.dotmarketing.beans.Host; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.liferay.portal.model.User; import io.vavr.Tuple2; | import com.dotmarketing.beans.*; import com.dotmarketing.exception.*; import com.liferay.portal.model.*; import io.vavr.*; | [
"com.dotmarketing.beans",
"com.dotmarketing.exception",
"com.liferay.portal",
"io.vavr"
] | com.dotmarketing.beans; com.dotmarketing.exception; com.liferay.portal; io.vavr; | 411,841 |
private ExporterCrawlerParameters createExportParameters(String exportPath, boolean skipBinary, boolean noRecurse)
{
// construct exporter parameters
ExporterCrawlerParameters parameters = new ExporterCrawlerParameters();
Location exportFrom = new Location(getWorkspaceStore());
... | ExporterCrawlerParameters function(String exportPath, boolean skipBinary, boolean noRecurse) { ExporterCrawlerParameters parameters = new ExporterCrawlerParameters(); Location exportFrom = new Location(getWorkspaceStore()); exportFrom.setPath(exportPath); parameters.setExportFrom(exportFrom); parameters.setCrawlSelf(tr... | /**
* Create Export Parameters
*
* @param exportPath path to export from
* @param skipBinary skip binary content in export
* @param noRecurse do not recurse to children
* @return export parameters
*/ | Create Export Parameters | createExportParameters | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/repository/source/java/org/alfresco/jcr/session/SessionImpl.java",
"license": "lgpl-3.0",
"size": 35135
} | [
"javax.jcr.ImportUUIDBehavior",
"org.alfresco.service.cmr.view.ExporterCrawlerParameters",
"org.alfresco.service.cmr.view.ImporterBinding",
"org.alfresco.service.cmr.view.ImporterException",
"org.alfresco.service.cmr.view.Location"
] | import javax.jcr.ImportUUIDBehavior; import org.alfresco.service.cmr.view.ExporterCrawlerParameters; import org.alfresco.service.cmr.view.ImporterBinding; import org.alfresco.service.cmr.view.ImporterException; import org.alfresco.service.cmr.view.Location; | import javax.jcr.*; import org.alfresco.service.cmr.view.*; | [
"javax.jcr",
"org.alfresco.service"
] | javax.jcr; org.alfresco.service; | 1,722,370 |
private static Collection<Class<?>> add(Class<?>... classes) {
return Collections.unmodifiableCollection(Arrays.asList(classes));
} | static Collection<Class<?>> function(Class<?>... classes) { return Collections.unmodifiableCollection(Arrays.asList(classes)); } | /**
* adds classes to a collection which is returned.
*
* @param classes the classes to add
* @return an unmodifiable collection
*/ | adds classes to a collection which is returned | add | {
"repo_name": "mztaylor/rice-git",
"path": "rice-middleware/core/api/src/main/java/org/kuali/rice/core/api/util/type/TypeUtils.java",
"license": "apache-2.0",
"size": 7489
} | [
"java.util.Arrays",
"java.util.Collection",
"java.util.Collections"
] | import java.util.Arrays; import java.util.Collection; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 167,664 |
protected Map<String, CommandIfc> getScriptCommands() {
return scriptCommands;
} | Map<String, CommandIfc> function() { return scriptCommands; } | /**
* Method description
*
*
*
*
* @return a value of <code>Map<String,CommandIfc></code>
*/ | Method description | getScriptCommands | {
"repo_name": "fanout/tigase-server",
"path": "src/main/java/tigase/server/BasicComponent.java",
"license": "agpl-3.0",
"size": 30607
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,000,287 |
public void addExtension(
ASN1ObjectIdentifier oid,
boolean critical,
byte[] value)
{
if (extensions.containsKey(oid))
{
throw new IllegalArgumentException("extension " + oid + " already added");
}
extOrdering.addEleme... | void function( ASN1ObjectIdentifier oid, boolean critical, byte[] value) { if (extensions.containsKey(oid)) { throw new IllegalArgumentException(STR + oid + STR); } extOrdering.addElement(oid); extensions.put(oid, new Extension(oid, critical, new DEROctetString(value))); } | /**
* Add an extension with the given oid and the passed in byte array to be wrapped in the
* OCTET STRING associated with the extension.
*
* @param oid OID for the extension.
* @param critical true if critical, false otherwise.
* @param value the byte array to be wrapped.
*/ | Add an extension with the given oid and the passed in byte array to be wrapped in the OCTET STRING associated with the extension | addExtension | {
"repo_name": "iseki-masaya/spongycastle",
"path": "core/src/main/java/org/spongycastle/asn1/x509/ExtensionsGenerator.java",
"license": "mit",
"size": 2645
} | [
"org.spongycastle.asn1.ASN1ObjectIdentifier",
"org.spongycastle.asn1.DEROctetString"
] | import org.spongycastle.asn1.ASN1ObjectIdentifier; import org.spongycastle.asn1.DEROctetString; | import org.spongycastle.asn1.*; | [
"org.spongycastle.asn1"
] | org.spongycastle.asn1; | 616,777 |
public final Tuple<XContentType, BytesReference> contentOrSourceParam() {
if (hasContentOrSourceParam() == false) {
throw new ElasticsearchParseException("request body or source parameter is required");
} else if (hasContent()) {
return new Tuple<>(xContentType.get(), require... | final Tuple<XContentType, BytesReference> function() { if (hasContentOrSourceParam() == false) { throw new ElasticsearchParseException(STR); } else if (hasContent()) { return new Tuple<>(xContentType.get(), requiredContent()); } String source = param(STR); String typeParam = param(STR); if (source == null typeParam == ... | /**
* Get the content of the request or the contents of the {@code source} param or throw an exception if both are missing.
* Prefer {@link #contentOrSourceParamParser()} or {@link #withContentOrSourceParamParserOrNull(CheckedConsumer)} if you need a parser.
*/ | Get the content of the request or the contents of the source param or throw an exception if both are missing. Prefer <code>#contentOrSourceParamParser()</code> or <code>#withContentOrSourceParamParserOrNull(CheckedConsumer)</code> if you need a parser | contentOrSourceParam | {
"repo_name": "nknize/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/rest/RestRequest.java",
"license": "apache-2.0",
"size": 22546
} | [
"java.util.Collections",
"org.elasticsearch.ElasticsearchParseException",
"org.elasticsearch.common.bytes.BytesArray",
"org.elasticsearch.common.bytes.BytesReference",
"org.elasticsearch.common.collect.Tuple",
"org.elasticsearch.common.xcontent.XContentType"
] | import java.util.Collections; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.xcontent.XContentType; | import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.collect.*; import org.elasticsearch.common.xcontent.*; | [
"java.util",
"org.elasticsearch",
"org.elasticsearch.common"
] | java.util; org.elasticsearch; org.elasticsearch.common; | 1,981,992 |
public DiskUsage averageUsage(RoutingNode node, Map<String, DiskUsage> usages) {
long totalBytes = 0;
long freeBytes = 0;
for (DiskUsage du : usages.values()) {
totalBytes += du.getTotalBytes();
freeBytes += du.getFreeBytes();
}
return new DiskUsage(no... | DiskUsage function(RoutingNode node, Map<String, DiskUsage> usages) { long totalBytes = 0; long freeBytes = 0; for (DiskUsage du : usages.values()) { totalBytes += du.getTotalBytes(); freeBytes += du.getFreeBytes(); } return new DiskUsage(node.nodeId(), node.node().name(), totalBytes / usages.size(), freeBytes / usages... | /**
* Returns a {@link DiskUsage} for the {@link RoutingNode} using the
* average usage of other nodes in the disk usage map.
* @param node Node to return an averaged DiskUsage object for
* @param usages Map of nodeId to DiskUsage for all known nodes
* @return DiskUsage representing given node ... | Returns a <code>DiskUsage</code> for the <code>RoutingNode</code> using the average usage of other nodes in the disk usage map | averageUsage | {
"repo_name": "opendatasoft/elasticsearch",
"path": "src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java",
"license": "apache-2.0",
"size": 29753
} | [
"java.util.Map",
"org.elasticsearch.cluster.DiskUsage",
"org.elasticsearch.cluster.routing.RoutingNode"
] | import java.util.Map; import org.elasticsearch.cluster.DiskUsage; import org.elasticsearch.cluster.routing.RoutingNode; | import java.util.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.routing.*; | [
"java.util",
"org.elasticsearch.cluster"
] | java.util; org.elasticsearch.cluster; | 2,845,335 |
public boolean directionKeyIsPressed() {
return pressedStateKeys.contains(KeyEvent.VK_UP)
|| pressedStateKeys.contains(KeyEvent.VK_DOWN)
|| pressedStateKeys.contains(KeyEvent.VK_LEFT)
|| pressedStateKeys.contains(KeyEvent.VK_RIGHT);
} | boolean function() { return pressedStateKeys.contains(KeyEvent.VK_UP) pressedStateKeys.contains(KeyEvent.VK_DOWN) pressedStateKeys.contains(KeyEvent.VK_LEFT) pressedStateKeys.contains(KeyEvent.VK_RIGHT); } | /**
* Check if any direction key is in "pressed" state.
*
* @return
* Direction key found in pressedStateKeys list
*/ | Check if any direction key is in "pressed" state | directionKeyIsPressed | {
"repo_name": "acsid/stendhal",
"path": "src/games/stendhal/client/StendhalClient.java",
"license": "gpl-2.0",
"size": 22800
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,589,997 |
public int getType() throws SQLException {
return this.resultSetType;
} | int function() throws SQLException { return this.resultSetType; } | /**
* JDBC 2.0 Return the type of this result set. The type is determined based
* on the statement that created the result set.
*
* @return TYPE_FORWARD_ONLY, TYPE_SCROLL_INSENSITIVE, or
* TYPE_SCROLL_SENSITIVE
*
* @exception SQLException
* if a database-... | JDBC 2.0 Return the type of this result set. The type is determined based on the statement that created the result set | getType | {
"repo_name": "martingh15/TPJava",
"path": "TPJavaNotebook/mysql-connector-java-5.1.39/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "mpl-2.0",
"size": 288777
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 695,222 |
public Observable<ServiceResponse<Page<AvailableDelegationInner>>> listNextSinglePageAsync(final String nextPageLink) {
if (nextPageLink == null) {
throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
} | Observable<ServiceResponse<Page<AvailableDelegationInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); } | /**
* Gets all of the available subnet delegations for this resource group in this region.
*
ServiceResponse<PageImpl<AvailableDelegationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the val... | Gets all of the available subnet delegations for this resource group in this region | listNextSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/AvailableResourceGroupDelegationsInner.java",
"license": "mit",
"size": 16747
} | [
"com.microsoft.azure.Page",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 953,180 |
Observable<ServiceResponse<Void>> paramDoubleWithServiceResponseAsync(String scenario, double value); | Observable<ServiceResponse<Void>> paramDoubleWithServiceResponseAsync(String scenario, double value); | /**
* Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0.
*
* @param scenario Send a post request with header values "scenario": "positive" or "negative"
* @param value Send a post request with header values 7e120 or -3.0
* @th... | Send a post request with header values "scenario": "positive", "value": 7e120 or "scenario": "negative", "value": -3.0 | paramDoubleWithServiceResponseAsync | {
"repo_name": "lmazuel/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/header/Headers.java",
"license": "mit",
"size": 69419
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,733,493 |
static void writeOutput(Appendable out, Compiler compiler, String code,
String wrapper, String codePlaceholder) throws IOException {
int pos = wrapper.indexOf(codePlaceholder);
if (pos != -1) {
String prefix = "";
if (pos > 0) {
prefix = wrapper.substring(0, pos);
out.append... | static void writeOutput(Appendable out, Compiler compiler, String code, String wrapper, String codePlaceholder) throws IOException { int pos = wrapper.indexOf(codePlaceholder); if (pos != -1) { String prefix = ""; if (pos > 0) { prefix = wrapper.substring(0, pos); out.append(prefix); } out.append(code); int suffixStart... | /**
* Writes code to an output stream, optionally wrapping it in an arbitrary
* wrapper that contains a placeholder where the code should be inserted.
*/ | Writes code to an output stream, optionally wrapping it in an arbitrary wrapper that contains a placeholder where the code should be inserted | writeOutput | {
"repo_name": "h4ck3rm1k3/javascript-closure-compiler-git",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 67882
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,564,622 |
public Predicate<String> sentenceFinalPunctuationTagAcceptFilter(); | Predicate<String> function(); | /**
* Returns a filter that accepts a String that is a sentence end
* punctuation tag, and rejects everything else.
*
* @return The Filter
*/ | Returns a filter that accepts a String that is a sentence end punctuation tag, and rejects everything else | sentenceFinalPunctuationTagAcceptFilter | {
"repo_name": "sanjithuom/Stanford-corenlp",
"path": "src/edu/stanford/nlp/trees/TreebankLanguagePack.java",
"license": "gpl-2.0",
"size": 13567
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,720,817 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.carts.CartSummary> getUserCartSummaryClient(String userId, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.CartUrl.getUserCartSummaryUrl(responseFields, userId);
String verb = "GET";
Class<?> clz = com.mozu.... | static MozuClient<com.mozu.api.contracts.commerceruntime.carts.CartSummary> function(String userId, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.CartUrl.getUserCartSummaryUrl(responseFields, userId); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.commerceruntime.carts.C... | /**
*
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.carts.CartSummary> mozuClient=GetUserCartSummaryClient( userId, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* CartSummary cartSummary = client.Result();
* </code></pre></p>
* @param respons... | <code><code> MozuClient mozuClient=GetUserCartSummaryClient( userId, responseFields); client.setBaseAddress(url); client.executeRequest(); CartSummary cartSummary = client.Result(); </code></code> | getUserCartSummaryClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/CartClient.java",
"license": "mit",
"size": 16711
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,487,424 |
private CodePattern buildCodePattern_EXHAUSTIVE_CODE(Attribute classLabel) {
int numberOfClasses = classLabel.getMapping().size();
int numberOfFunctions = (int)Math.pow(2, numberOfClasses - 1) - 1;
CodePattern cP = new CodePattern(numberOfClasses, numberOfFunctions); //, EXHAUSTIVE_CODE);
for (int... | CodePattern function(Attribute classLabel) { int numberOfClasses = classLabel.getMapping().size(); int numberOfFunctions = (int)Math.pow(2, numberOfClasses - 1) - 1; CodePattern cP = new CodePattern(numberOfClasses, numberOfFunctions); for (int i = 0; i < numberOfFunctions; i++) { cP.data[0][i] = "true"; } for (int i =... | /**
* Builds a code pattern according to the "exhaustive code" classification scheme.
*/ | Builds a code pattern according to the "exhaustive code" classification scheme | buildCodePattern_EXHAUSTIVE_CODE | {
"repo_name": "ntj/ComplexRapidMiner",
"path": "src/com/rapidminer/operator/learner/meta/Binary2MultiClassLearner.java",
"license": "gpl-2.0",
"size": 14591
} | [
"com.rapidminer.example.Attribute"
] | import com.rapidminer.example.Attribute; | import com.rapidminer.example.*; | [
"com.rapidminer.example"
] | com.rapidminer.example; | 239,949 |
@Test
public void testPutAllStoreSomeOverlapWriterNoOverlapSomeFail() throws Exception {
Map<String, String> originalStoreContent = getEntryMap(KEY_SET_A, KEY_SET_B);
FakeStore fakeStore = new FakeStore(originalStoreContent);
this.store = spy(fakeStore);
Map<String, String> originalWriterContent = ... | void function() throws Exception { Map<String, String> originalStoreContent = getEntryMap(KEY_SET_A, KEY_SET_B); FakeStore fakeStore = new FakeStore(originalStoreContent); this.store = spy(fakeStore); Map<String, String> originalWriterContent = getEntryMap(KEY_SET_A, KEY_SET_B, KEY_SET_D); FakeCacheLoaderWriter fakeLoa... | /**
* Tests {@link EhcacheWithLoaderWriter#putAll(Map)} for
* <ul>
* <li>non-empty request map</li>
* <li>populated {@code Store} - some keys overlap request</li>
* <li>populated {@code CacheLoaderWriter} - some keys overlap</li>
* <li>some {@link CacheLoaderWriter#writeAll(Iterable)} call... | Tests <code>EhcacheWithLoaderWriter#putAll(Map)</code> for non-empty request map populated Store - some keys overlap request populated CacheLoaderWriter - some keys overlap some <code>CacheLoaderWriter#writeAll(Iterable)</code> calls fail | testPutAllStoreSomeOverlapWriterNoOverlapSomeFail | {
"repo_name": "alexsnaps/ehcache3",
"path": "core/src/test/java/org/ehcache/core/EhcacheWithLoaderWriterBasicPutAllTest.java",
"license": "apache-2.0",
"size": 95478
} | [
"java.util.EnumSet",
"java.util.Map",
"java.util.Set",
"org.ehcache.core.EhcacheBasicBulkUtil",
"org.ehcache.core.EhcacheBasicPutAllTest",
"org.ehcache.core.statistics.BulkOps",
"org.ehcache.core.statistics.CacheOperationOutcomes",
"org.ehcache.spi.loaderwriter.BulkCacheWritingException",
"org.hamcr... | import java.util.EnumSet; import java.util.Map; import java.util.Set; import org.ehcache.core.EhcacheBasicBulkUtil; import org.ehcache.core.EhcacheBasicPutAllTest; import org.ehcache.core.statistics.BulkOps; import org.ehcache.core.statistics.CacheOperationOutcomes; import org.ehcache.spi.loaderwriter.BulkCacheWritingE... | import java.util.*; import org.ehcache.core.*; import org.ehcache.core.statistics.*; import org.ehcache.spi.loaderwriter.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*; | [
"java.util",
"org.ehcache.core",
"org.ehcache.spi",
"org.hamcrest",
"org.junit",
"org.mockito"
] | java.util; org.ehcache.core; org.ehcache.spi; org.hamcrest; org.junit; org.mockito; | 1,193,909 |
@AfterClass
public static void tearDownClass() throws IOException {
w.flush();
w.close();
} | static void function() throws IOException { w.flush(); w.close(); } | /**
* DOCUMENT ME!
*
* @throws IOException DOCUMENT ME!
*/ | DOCUMENT ME | tearDownClass | {
"repo_name": "cismet/cids-custom-sudplan",
"path": "src/test/java/de/cismet/cids/custom/sudplan/SOSTest.java",
"license": "lgpl-3.0",
"size": 15483
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 148,308 |
public void setTFieldConfigKey(ObjectKey key) throws TorqueException
{
setConfig(new Integer(((NumberKey) key).intValue()));
}
private static List<String> fieldNames = null; | void function(ObjectKey key) throws TorqueException { setConfig(new Integer(((NumberKey) key).intValue())); } private static List<String> fieldNames = null; | /**
* Provides convenient way to set a relationship based on a
* ObjectKey, for example
* <code>bar.setFooKey(foo.getPrimaryKey())</code>
*
*/ | Provides convenient way to set a relationship based on a ObjectKey, for example <code>bar.setFooKey(foo.getPrimaryKey())</code> | setTFieldConfigKey | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTTextBoxSettings.java",
"license": "gpl-3.0",
"size": 59636
} | [
"java.util.List",
"org.apache.torque.TorqueException",
"org.apache.torque.om.NumberKey",
"org.apache.torque.om.ObjectKey"
] | import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.om.NumberKey; import org.apache.torque.om.ObjectKey; | import java.util.*; import org.apache.torque.*; import org.apache.torque.om.*; | [
"java.util",
"org.apache.torque"
] | java.util; org.apache.torque; | 2,001,125 |
protected IIconFactory<F> getIconFactory() {
return viewFactory.getIconFactory();
} | IIconFactory<F> function() { return viewFactory.getIconFactory(); } | /**
* Gets the iconFactory.
*
* @return the iconFactory.
*/ | Gets the iconFactory | getIconFactory | {
"repo_name": "maximehamm/jspresso-ce",
"path": "application/src/main/java/org/jspresso/framework/application/frontend/controller/AbstractFrontendController.java",
"license": "lgpl-3.0",
"size": 82212
} | [
"org.jspresso.framework.view.IIconFactory"
] | import org.jspresso.framework.view.IIconFactory; | import org.jspresso.framework.view.*; | [
"org.jspresso.framework"
] | org.jspresso.framework; | 1,374,768 |
logger.info("Exiting " + className + "/" + methodName);
return attributesMap;
}*/
public static Map<String, String> getHashMapFromProcessForm(Long processInstKey) throws tcNotAtomicProcessException, tcFormNotFoundException, tcAPIException, tcProcessNotFoundException,
... | logger.info(STR + className + "/" + methodName); return attributesMap; }*/ static Map<String, String> function(Long processInstKey) throws tcNotAtomicProcessException, tcFormNotFoundException, tcAPIException, tcProcessNotFoundException, tcColumnNotFoundException { String METHOD_NAME = STR; logger.entering(ElavonUSBUtil... | /**
* This method is used to fetch the process form data based on process Instance Key.
* @param processInstKey
* @return
* @throws tcNotAtomicProcessException
* @throws tcFormNotFoundException
* @throws tcAPIException
* @throws tcProcessNotFoundException
* @throws tcColu... | This method is used to fetch the process form data based on process Instance Key | getHashMapFromProcessForm | {
"repo_name": "vineetgupta007/OIM",
"path": "ElavonUSBUtil.java",
"license": "epl-1.0",
"size": 68362
} | [
"java.util.HashMap",
"java.util.Map",
"oracle.iam.platform.Platform"
] | import java.util.HashMap; import java.util.Map; import oracle.iam.platform.Platform; | import java.util.*; import oracle.iam.platform.*; | [
"java.util",
"oracle.iam.platform"
] | java.util; oracle.iam.platform; | 1,763,428 |
protected void basicCommitTransaction() throws DatabaseException {
Collection<Accessor> accessors = getAccessors();
if (accessors == null) {
return;
}
try {
for (Accessor accessor : accessors) {
accessor.commitTransaction(this);
}
... | void function() throws DatabaseException { Collection<Accessor> accessors = getAccessors(); if (accessors == null) { return; } try { for (Accessor accessor : accessors) { accessor.commitTransaction(this); } } catch (RuntimeException exception) { handleException(exception); } } | /**
* INTERNAL:
* Called by commitTransaction() to commit a transaction.
* This commits the active transaction.
*/ | Called by commitTransaction() to commit a transaction. This commits the active transaction | basicCommitTransaction | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AbstractSession.java",
"license": "epl-1.0",
"size": 198170
} | [
"java.util.Collection",
"org.eclipse.persistence.exceptions.DatabaseException",
"org.eclipse.persistence.internal.databaseaccess.Accessor"
] | import java.util.Collection; import org.eclipse.persistence.exceptions.DatabaseException; import org.eclipse.persistence.internal.databaseaccess.Accessor; | import java.util.*; import org.eclipse.persistence.exceptions.*; import org.eclipse.persistence.internal.databaseaccess.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 1,015,642 |
public void testParseFile() {
final String CONTENTS = "goog.provide('yes1');\n"
+ "goog.provide(\"yes2\")\n"
+ "goog.require('yes3'); // goog.provide('no3');\n"
+ "// goog.provide('no4');\n"
+ "goog.require(\""
+ "bar.data.SuperstarAddStarThreadActionRequestDelegate\"); "
+ "//... | void function() { final String CONTENTS = STR + STRyes2\")\n" + STR + STRSTRbar.data.SuperstarAddStarThreadActionRequestDelegate\"); STR Collection<SymbolInfo> symbols = parser.parseFile(SRC_PATH, CONTENTS); Iterator<SymbolInfo> i = symbols.iterator(); SymbolInfo symbolInfo = i.next(); assertEquals(symbolInfo.symbol, "... | /**
* Tests:
* -Parsing of comments,
* -Parsing of different styles of quotes,
* -Correct recording of what was parsed.
*/ | Tests: -Parsing of comments, -Parsing of different styles of quotes, -Correct recording of what was parsed | testParseFile | {
"repo_name": "JonathanWalsh/Granule-Closure-Compiler",
"path": "test/com/google/javascript/jscomp/deps/JsFunctionParserTest.java",
"license": "apache-2.0",
"size": 5920
} | [
"com.google.javascript.jscomp.deps.JsFunctionParser",
"java.util.Collection",
"java.util.Iterator"
] | import com.google.javascript.jscomp.deps.JsFunctionParser; import java.util.Collection; import java.util.Iterator; | import com.google.javascript.jscomp.deps.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 1,690,337 |
public Builder symlink(byte[] symlink) {
this.symlink = null == symlink
? null
: Arrays.copyOf(symlink, symlink.length);
return this;
} | Builder function(byte[] symlink) { this.symlink = null == symlink ? null : Arrays.copyOf(symlink, symlink.length); return this; } | /**
* Set symlink bytes for this entity (default = null).
* @param symlink Symlink bytes (see
* {@link DFSUtilClient#bytes2String(byte[])})
* @return This Builder instance
*/ | Set symlink bytes for this entity (default = null) | symlink | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/HdfsFileStatus.java",
"license": "apache-2.0",
"size": 14918
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 290,008 |
ScheduledBlockUpdate addScheduledUpdate(int x, int y, int z, int priority, int ticks); | ScheduledBlockUpdate addScheduledUpdate(int x, int y, int z, int priority, int ticks); | /**
* Adds a new {@link ScheduledBlockUpdate} to this block.
*
* @param x The X position
* @param y The Y position
* @param z The Z position
* @param priority The priority of the scheduled update
* @param ticks The ticks until the scheduled update should be processed
* @return Th... | Adds a new <code>ScheduledBlockUpdate</code> to this block | addScheduledUpdate | {
"repo_name": "kenzierocks/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/world/extent/Extent.java",
"license": "mit",
"size": 33484
} | [
"org.spongepowered.api.block.ScheduledBlockUpdate"
] | import org.spongepowered.api.block.ScheduledBlockUpdate; | import org.spongepowered.api.block.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 723,958 |
public static void initAndExecPythonScript(PythonEnvironmentFactory factory, java.nio.file.Path scriptDirectory, String scriptName, String[] args) {
String[] fullArgs = new String[args.length + 1];
fullArgs[0] = scriptDirectory.resolve(scriptName).toString();
System.arraycopy(args, 0, fullArgs, 1, args.length)... | static void function(PythonEnvironmentFactory factory, java.nio.file.Path scriptDirectory, String scriptName, String[] args) { String[] fullArgs = new String[args.length + 1]; fullArgs[0] = scriptDirectory.resolve(scriptName).toString(); System.arraycopy(args, 0, fullArgs, 1, args.length); PythonInterpreter pythonInter... | /**
* Initializes the Jython interpreter and executes a python script.
*
* @param factory environment factory
* @param scriptDirectory the directory containing all required user python scripts
* @param scriptName the name of the main python script
* @param args Command line arguments that will be delivered ... | Initializes the Jython interpreter and executes a python script | initAndExecPythonScript | {
"repo_name": "mylog00/flink",
"path": "flink-libraries/flink-streaming-python/src/main/java/org/apache/flink/streaming/python/util/InterpreterUtils.java",
"license": "apache-2.0",
"size": 5679
} | [
"org.apache.flink.streaming.python.api.environment.PythonEnvironmentFactory",
"org.python.util.PythonInterpreter"
] | import org.apache.flink.streaming.python.api.environment.PythonEnvironmentFactory; import org.python.util.PythonInterpreter; | import org.apache.flink.streaming.python.api.environment.*; import org.python.util.*; | [
"org.apache.flink",
"org.python.util"
] | org.apache.flink; org.python.util; | 1,359,656 |
public SUnit getUnit(int unitIDtoFind) {
// for all types and weight classes
for (int type_id = 0; type_id < Unit.TOTALTYPES; type_id++) {
for (int i = Unit.LIGHT; i <= Unit.ASSAULT; i++) {
// Loop through all units of the current type/weightclass
... | SUnit function(int unitIDtoFind) { for (int type_id = 0; type_id < Unit.TOTALTYPES; type_id++) { for (int i = Unit.LIGHT; i <= Unit.ASSAULT; i++) { Iterator<SUnit> it = (this.getHangar(type_id).elementAt(i)).iterator(); while (it.hasNext()) { SUnit currU = it.next(); if (currU.getId() == unitIDtoFind) { return currU; }... | /**
* Method required for compliance with ISeller. Loop through all house
* queues and return a unit with matching ID, or null if no matching unit is
* found.
*
* NOTE: This should be used sparingly. Outside of the Market and various
* admin commands, there are ALWAYS better ways to... | Method required for compliance with ISeller. Loop through all house queues and return a unit with matching ID, or null if no matching unit is found. admin commands, there are ALWAYS better ways to get a unit from SHouse | getUnit | {
"repo_name": "mekwars-legends/mekwars-upstream",
"path": "src/server/campaign/SHouse.java",
"license": "gpl-2.0",
"size": 146456
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,838 |
protected void normalizeWhitespace(XMLString value) {
int end = value.offset + value.length;
for (int i = value.offset; i < end; ++i) {
int c = value.ch[i];
if (XMLChar.isSpace(c)) {
value.ch[i] = ' ';
}
}
} | void function(XMLString value) { int end = value.offset + value.length; for (int i = value.offset; i < end; ++i) { int c = value.ch[i]; if (XMLChar.isSpace(c)) { value.ch[i] = ' '; } } } | /**
* Normalize whitespace in an XMLString converting all whitespace
* characters to space characters.
*/ | Normalize whitespace in an XMLString converting all whitespace characters to space characters | normalizeWhitespace | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XML11DocumentScannerImpl.java",
"license": "gpl-2.0",
"size": 24933
} | [
"com.sun.org.apache.xerces.internal.util.XMLChar",
"com.sun.org.apache.xerces.internal.xni.XMLString"
] | import com.sun.org.apache.xerces.internal.util.XMLChar; import com.sun.org.apache.xerces.internal.xni.XMLString; | import com.sun.org.apache.xerces.internal.util.*; import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 2,579,756 |
try {
helpText = reader.readLine();
while (helpText != null) {
helpText += "\n";
this.append(helpText);
helpText = reader.readLine();
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
displayWindow.setContentPane(scrollPane);
displayWindow.validat... | try { helpText = reader.readLine(); while (helpText != null) { helpText += "\n"; this.append(helpText); helpText = reader.readLine(); } } catch (IOException e) { e.printStackTrace(); } displayWindow.setContentPane(scrollPane); displayWindow.validate(); displayWindow.pack(); displayWindow.setVisible(true); displayWindow... | /**
* Display the help window with background image and text.
*/ | Display the help window with background image and text | display | {
"repo_name": "haichuand/RanibowReef",
"path": "src/game2D/ui/HelpWindow.java",
"license": "apache-2.0",
"size": 2817
} | [
"java.io.IOException",
"javax.swing.JFrame"
] | import java.io.IOException; import javax.swing.JFrame; | import java.io.*; import javax.swing.*; | [
"java.io",
"javax.swing"
] | java.io; javax.swing; | 1,124,147 |
@Override
public ResourceLocator getResourceLocator() {
return CityGMLEditPlugin.INSTANCE;
} | ResourceLocator function() { return CityGMLEditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TimePeriodPropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 12183
} | [
"net.opengis.citygml.building.provider.CityGMLEditPlugin",
"org.eclipse.emf.common.util.ResourceLocator"
] | import net.opengis.citygml.building.provider.CityGMLEditPlugin; import org.eclipse.emf.common.util.ResourceLocator; | import net.opengis.citygml.building.provider.*; import org.eclipse.emf.common.util.*; | [
"net.opengis.citygml",
"org.eclipse.emf"
] | net.opengis.citygml; org.eclipse.emf; | 2,247,736 |
EAttribute getIXid_Quality(); | EAttribute getIXid_Quality(); | /**
* Returns the meta object for the attribute '{@link ch.elexis.core.model.IXid#getQuality <em>Quality</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Quality</em>'.
* @see ch.elexis.core.model.IXid#getQuality()
* @see #getIXid()
* @generated
... | Returns the meta object for the attribute '<code>ch.elexis.core.model.IXid#getQuality Quality</code>'. | getIXid_Quality | {
"repo_name": "sazgin/elexis-3-core",
"path": "ch.elexis.core/src-gen/ch/elexis/core/model/ModelPackage.java",
"license": "epl-1.0",
"size": 108231
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,368,519 |
void onItemClick(MenuItem menuItem) {
if (menuItem.isEnabled()) {
dismiss();
mHandler.onOptionsItemSelected(menuItem);
}
} | void onItemClick(MenuItem menuItem) { if (menuItem.isEnabled()) { dismiss(); mHandler.onOptionsItemSelected(menuItem); } } | /**
* Handles clicks on the AppMenu popup.
* @param menuItem The menu item in the popup that was clicked.
*/ | Handles clicks on the AppMenu popup | onItemClick | {
"repo_name": "Workday/OpenFrame",
"path": "chrome/android/java/src/org/chromium/chrome/browser/appmenu/AppMenu.java",
"license": "bsd-3-clause",
"size": 16832
} | [
"android.view.MenuItem"
] | import android.view.MenuItem; | import android.view.*; | [
"android.view"
] | android.view; | 169,071 |
public void testNextByQuadrant(){
Integer[] plates = new Integer[] {1,4,6,12};
Integer[] quadrants = new Integer[] {1,2,3,4};
String[] conditions = new String[] {"condition1", "condition2"};
String[] replicates = new String[] {"1","2","3"};
String[] readouts = new String[] {"1","2","3"};
... | void function(){ Integer[] plates = new Integer[] {1,4,6,12}; Integer[] quadrants = new Integer[] {1,2,3,4}; String[] conditions = new String[] {STR, STR}; String[] replicates = new String[] {"1","2","3"}; String[] readouts = new String[] {"1","2","3"}; CollationOrder ordering = CollationOrder.getOrder("PQCR"); PlateRe... | /**
* Test that, for a set of matrices having a collation order with quadrants
* not being last, that we can iterate through the matrices such that we pick
* from each quadrant in succession.
*/ | Test that, for a set of matrices having a collation order with quadrants not being last, that we can iterate through the matrices such that we pick from each quadrant in succession | testNextByQuadrant | {
"repo_name": "hmsiccbl/screensaver",
"path": "web/src/test/java/edu/harvard/med/screensaver/ui/screenresults/PlateReaderRawDataParserTest.java",
"license": "gpl-2.0",
"size": 26560
} | [
"edu.harvard.med.screensaver.ui.screenresults.PlateReaderRawDataParser",
"java.util.List"
] | import edu.harvard.med.screensaver.ui.screenresults.PlateReaderRawDataParser; import java.util.List; | import edu.harvard.med.screensaver.ui.screenresults.*; import java.util.*; | [
"edu.harvard.med",
"java.util"
] | edu.harvard.med; java.util; | 1,002,177 |
public Date getLastBuildDate() {
return lastBuildDate;
}
| Date function() { return lastBuildDate; } | /**
* Gets the last build date.
*
* @return last build date
*/ | Gets the last build date | getLastBuildDate | {
"repo_name": "446541492/solo",
"path": "src/main/java/org/b3log/solo/model/feed/rss/Channel.java",
"license": "apache-2.0",
"size": 8172
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,736,421 |
private void addAuxClassPathEntries(String argument) {
StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator);
while (tok.hasMoreTokens()) {
project.addAuxClasspathEntry(tok.nextToken());
}
} | void function(String argument) { StringTokenizer tok = new StringTokenizer(argument, File.pathSeparator); while (tok.hasMoreTokens()) { project.addAuxClasspathEntry(tok.nextToken()); } } | /**
* Parse the argument as auxclasspath entries and add them
*
* @param argument
*/ | Parse the argument as auxclasspath entries and add them | addAuxClassPathEntries | {
"repo_name": "sewe/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/TextUICommandLine.java",
"license": "lgpl-2.1",
"size": 31729
} | [
"java.io.File",
"java.util.StringTokenizer"
] | import java.io.File; import java.util.StringTokenizer; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 841,807 |
EAttribute getDocument_TestFlag(); | EAttribute getDocument_TestFlag(); | /**
* Returns the meta object for the attribute '{@link org.fusesource.camel.component.sap.model.idoc.Document#getTestFlag <em>Test Flag</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Test Flag</em>'.
* @see org.fusesource.camel.component.sap.model.i... | Returns the meta object for the attribute '<code>org.fusesource.camel.component.sap.model.idoc.Document#getTestFlag Test Flag</code>'. | getDocument_TestFlag | {
"repo_name": "DaemonSu/fuse-master",
"path": "components/camel-sap/org.fusesource.camel.component.sap.model/src/org/fusesource/camel/component/sap/model/idoc/IdocPackage.java",
"license": "apache-2.0",
"size": 63339
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 106,687 |
public static int getInt(Context context, String key, int defaultValue) {
SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);
return settings.getInt(key, defaultValue);
} | static int function(Context context, String key, int defaultValue) { SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); return settings.getInt(key, defaultValue); } | /**
* get int preferences
*
* @param context
* @param key The name of the preference to retrieve
* @param defaultValue Value to return if this preference does not exist
* @return The preference value if it exists, or defValue. Throws ClassCastException if there is a preference with
*... | get int preferences | getInt | {
"repo_name": "Alexander0024/alexsophialib",
"path": "AlexsophiaLib/src/com/alexsophia/alexsophialib/util/preferences/PreferencesUtils.java",
"license": "gpl-2.0",
"size": 9824
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 2,140,606 |
public ArrayList<Fact> createFacts (MAcctSchema as)
{
//
ArrayList<Fact> facts = new ArrayList<Fact>();
// create Fact Header
Fact fact = new Fact(this, as, Fact.POST_Actual);
setC_Currency_ID (as.getC_Currency_ID());
// Line pointers
FactLine dr = null;
FactLine cr = null;
// ***... | ArrayList<Fact> function (MAcctSchema as) { ArrayList<Fact> facts = new ArrayList<Fact>(); Fact fact = new Fact(this, as, Fact.POST_Actual); setC_Currency_ID (as.getC_Currency_ID()); FactLine dr = null; FactLine cr = null; if (getDocumentType().equals(DOCTYPE_MatShipment) && isSOTrx()) { BigDecimal total = Env.ZERO; fo... | /**
* Create Facts (the accounting logic) for
* MMS, MMR.
* <pre>
* Shipment
* CoGS (RevOrg) DR
* Inventory CR
* Shipment of Project Issue
* CoGS DR
* Project CR
* Receipt
* Inventory DR
* NotInvoice... | Create Facts (the accounting logic) for MMS, MMR. <code> Shipment CoGS (RevOrg) DR Inventory CR Shipment of Project Issue CoGS DR Project CR Receipt Inventory DR NotInvoicedReceipt CR </code> | createFacts | {
"repo_name": "neuroidss/adempiere",
"path": "base/src/org/compiere/acct/Doc_InOut.java",
"license": "gpl-2.0",
"size": 19417
} | [
"java.math.BigDecimal",
"java.util.ArrayList",
"java.util.logging.Level",
"org.compiere.model.MAccount",
"org.compiere.model.MAcctSchema",
"org.compiere.model.MCostDetail",
"org.compiere.model.MInOut",
"org.compiere.model.MProduct",
"org.compiere.model.ProductCost",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import java.util.ArrayList; import java.util.logging.Level; import org.compiere.model.MAccount; import org.compiere.model.MAcctSchema; import org.compiere.model.MCostDetail; import org.compiere.model.MInOut; import org.compiere.model.MProduct; import org.compiere.model.ProductCost; import o... | import java.math.*; import java.util.*; import java.util.logging.*; import org.compiere.model.*; import org.compiere.util.*; | [
"java.math",
"java.util",
"org.compiere.model",
"org.compiere.util"
] | java.math; java.util; org.compiere.model; org.compiere.util; | 2,429,200 |
public ServiceFuture<DeploymentExtendedInner> createOrUpdateAtManagementGroupScopeAsync(String groupId, String deploymentName, ScopedDeployment parameters, final ServiceCallback<DeploymentExtendedInner> serviceCallback) {
return ServiceFuture.fromResponse(createOrUpdateAtManagementGroupScopeWithServiceRespo... | ServiceFuture<DeploymentExtendedInner> function(String groupId, String deploymentName, ScopedDeployment parameters, final ServiceCallback<DeploymentExtendedInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateAtManagementGroupScopeWithServiceResponseAsync(groupId, deploymentName, parameters), servi... | /**
* Deploys resources at management group scope.
* You can provide the template and parameters directly in the request or link to JSON files.
*
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied... | Deploys resources at management group scope. You can provide the template and parameters directly in the request or link to JSON files | createOrUpdateAtManagementGroupScopeAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resources/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/resources/v2020_06_01/implementation/DeploymentsInner.java",
"license": "mit",
"size": 445517
} | [
"com.microsoft.azure.management.resources.v2020_06_01.ScopedDeployment",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.management.resources.v2020_06_01.ScopedDeployment; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.management.resources.v2020_06_01.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,455,961 |
public static Set getMirroredFileSuffixes () {
return new TreeSet ( Arrays.asList ( new String [] {
".bmp",
".css",
".gif",
".gz",
".ico",
".jpg",
".jpeg",
".js",
".pdf",
".swf",
... | static Set function () { return new TreeSet ( Arrays.asList ( new String [] { ".bmp", ".css", ".gif", ".gz", ".ico", ".jpg", ".jpeg", ".js", ".pdf", ".swf", ".txt", ".zip", ".xml", } ) ) ; } | /**
* Suffixes of files which are copied into the JSP file system as-is
*/ | Suffixes of files which are copied into the JSP file system as-is | getMirroredFileSuffixes | {
"repo_name": "janekdb/ntropa",
"path": "presentation/wps/src/org/ntropa/build/Constants.java",
"license": "apache-2.0",
"size": 4353
} | [
"java.util.Arrays",
"java.util.Set",
"java.util.TreeSet"
] | import java.util.Arrays; import java.util.Set; import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,534,389 |
public void sendStringSync(String text) {
if (text == null) {
return;
}
KeyCharacterMap keyCharacterMap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD);
KeyEvent[] events = keyCharacterMap.getEvents(text.toCharArray());
if (events != null) {
... | void function(String text) { if (text == null) { return; } KeyCharacterMap keyCharacterMap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD); KeyEvent[] events = keyCharacterMap.getEvents(text.toCharArray()); if (events != null) { for (int i = 0; i < events.length; i++) { sendKeySync(KeyEvent.changeTimeRepeat(ev... | /**
* Sends the key events corresponding to the text to the app being
* instrumented.
*
* @param text The text to be sent.
*/ | Sends the key events corresponding to the text to the app being instrumented | sendStringSync | {
"repo_name": "cuplv/droidel",
"path": "stubs/src/android/app/Instrumentation.java",
"license": "apache-2.0",
"size": 69632
} | [
"android.os.SystemClock",
"android.view.KeyCharacterMap",
"android.view.KeyEvent"
] | import android.os.SystemClock; import android.view.KeyCharacterMap; import android.view.KeyEvent; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 1,564,577 |
public void endElement(String uri, String loc, String raw)
throws SAXException {
if (extractLevel == 0) {
super.endElement(uri,loc,raw);
} else {
if (endExtracting(uri, loc, raw)) {
extractLevel--;
if (this.getLogger().isDebugEnabled()) {
... | void function(String uri, String loc, String raw) throws SAXException { if (extractLevel == 0) { super.endElement(uri,loc,raw); } else { if (endExtracting(uri, loc, raw)) { extractLevel--; if (this.getLogger().isDebugEnabled()) { getLogger().debug(STR + extractLevel + "."); } if (extractLevel != 0) { this.currentBuilde... | /**
* Receive notification of the end of an element. Uses
* endExtraction to determine whether to stop extracting or
* not. Calls endExtractedDocument with the extracted document.
*
* @param uri The Namespace URI, or the empty string if the element has no
* Namespace URI or if N... | Receive notification of the end of an element. Uses endExtraction to determine whether to stop extracting or not. Calls endExtractedDocument with the extracted document | endElement | {
"repo_name": "apache/cocoon",
"path": "core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/transformation/AbstractExtractionTransformer.java",
"license": "apache-2.0",
"size": 15696
} | [
"java.util.Iterator",
"java.util.Map",
"org.xml.sax.SAXException"
] | import java.util.Iterator; import java.util.Map; import org.xml.sax.SAXException; | import java.util.*; import org.xml.sax.*; | [
"java.util",
"org.xml.sax"
] | java.util; org.xml.sax; | 52,357 |
public EntryVisibilityHandler<SimpleFeature> getVisibilityHandler(
final CommonIndexModel indexModel,
final DataTypeAdapter<SimpleFeature> adapter,
final StatisticsId statisticsId) {
// If the statistics object is of type CountDataStats or there is no
// visibility handler, then return the d... | EntryVisibilityHandler<SimpleFeature> function( final CommonIndexModel indexModel, final DataTypeAdapter<SimpleFeature> adapter, final StatisticsId statisticsId) { if (statisticsId.getType().equals(CountDataStatistics.STATS_TYPE) (!statisticsIdToFieldNameMap.containsKey(statisticsId))) { return DEFAULT_VISIBILITY_HANDL... | /**
* Get a visibility handler for the specified statistics object
*
* @param statisticsId
* @return - visibility handler for given stats object
*/ | Get a visibility handler for the specified statistics object | getVisibilityHandler | {
"repo_name": "spohnan/geowave",
"path": "extensions/adapters/vector/src/main/java/org/locationtech/geowave/adapter/vector/stats/StatsManager.java",
"license": "apache-2.0",
"size": 11193
} | [
"org.locationtech.geowave.core.store.EntryVisibilityHandler",
"org.locationtech.geowave.core.store.adapter.statistics.CountDataStatistics",
"org.locationtech.geowave.core.store.adapter.statistics.FieldNameStatisticVisibility",
"org.locationtech.geowave.core.store.adapter.statistics.StatisticsId",
"org.locat... | import org.locationtech.geowave.core.store.EntryVisibilityHandler; import org.locationtech.geowave.core.store.adapter.statistics.CountDataStatistics; import org.locationtech.geowave.core.store.adapter.statistics.FieldNameStatisticVisibility; import org.locationtech.geowave.core.store.adapter.statistics.StatisticsId; im... | import org.locationtech.geowave.core.store.*; import org.locationtech.geowave.core.store.adapter.statistics.*; import org.locationtech.geowave.core.store.api.*; import org.locationtech.geowave.core.store.index.*; import org.opengis.feature.simple.*; | [
"org.locationtech.geowave",
"org.opengis.feature"
] | org.locationtech.geowave; org.opengis.feature; | 213,769 |
private ITypeBinding getElementType(final ITypeBinding iterator) {
if (iterator != null) {
final ITypeBinding[] bindings= iterator.getTypeArguments();
if (bindings.length > 0) {
ITypeBinding arg= bindings[0];
if (arg.isWildcardType()) {
arg= ASTResolving.normalizeWildcardType(arg, true, getRoot(... | ITypeBinding function(final ITypeBinding iterator) { if (iterator != null) { final ITypeBinding[] bindings= iterator.getTypeArguments(); if (bindings.length > 0) { ITypeBinding arg= bindings[0]; if (arg.isWildcardType()) { arg= ASTResolving.normalizeWildcardType(arg, true, getRoot().getAST()); } return arg; } } return ... | /**
* Returns the type of elements returned by the iterator.
*
* @param iterator
* the iterator type binding, or <code>null</code>
* @return the element type
*/ | Returns the type of elements returned by the iterator | getElementType | {
"repo_name": "kumattau/JDTPatch",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/corext/fix/ConvertIterableLoopOperation.java",
"license": "epl-1.0",
"size": 22223
} | [
"org.eclipse.jdt.core.dom.ITypeBinding",
"org.eclipse.jdt.internal.ui.text.correction.ASTResolving"
] | import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.internal.ui.text.correction.ASTResolving; | import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.ui.text.correction.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 529,153 |
private SemiJoin findSemiJoinIndexByCost(
LoptMultiJoin multiJoin,
List<RexNode> joinFilters,
int factIdx,
int dimIdx) {
// create a SemiJoin with the semi-join condition and keys
RexNode semiJoinCondition =
RexUtil.composeConjunction(rexBuilder, joinFilters, true);
int le... | SemiJoin function( LoptMultiJoin multiJoin, List<RexNode> joinFilters, int factIdx, int dimIdx) { RexNode semiJoinCondition = RexUtil.composeConjunction(rexBuilder, joinFilters, true); int leftAdjustment = 0; for (int i = 0; i < factIdx; i++) { leftAdjustment -= multiJoin.getNumFieldsInJoinFactor(i); } semiJoinConditio... | /**
* Given a list of possible filters on a fact table, determine if there is
* an index that can be used, provided all the fact table keys originate
* from the same underlying table.
*
* @param multiJoin join factors being optimized
* @param joinFilters filters to be used on the fact table
* @para... | Given a list of possible filters on a fact table, determine if there is an index that can be used, provided all the fact table keys originate from the same underlying table | findSemiJoinIndexByCost | {
"repo_name": "sreev/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java",
"license": "apache-2.0",
"size": 29760
} | [
"com.google.common.collect.Lists",
"java.util.ArrayList",
"java.util.List",
"org.apache.calcite.plan.RelOptUtil",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.core.JoinInfo",
"org.apache.calcite.rel.core.SemiJoin",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.rex.RexUtil",
"o... | import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.JoinInfo; import org.apache.calcite.rel.core.SemiJoin; import org.apache.calcite.rex.RexNode; import org.apache.... | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.plan.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 2,767,237 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.