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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
public String toString()
{
if (SanityManager.DEBUG)
{
return super.toString() +
"checkOption: " + checkOption + "\n" +
"qeText: " + qeText + "\n";
}
else
{
return "";
}
} | String function() { if (SanityManager.DEBUG) { return super.toString() + STR + checkOption + "\n" + STR + qeText + "\n"; } else { return ""; } } | /**
* Convert this object to a String. See comments in QueryTreeNode.java
* for how this should be done for tree printing.
*
* @return This object as a String
*/ | Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing | toString | {
"repo_name": "lpxz/grail-derby104",
"path": "java/engine/org/apache/derby/impl/sql/compile/CreateViewNode.java",
"license": "apache-2.0",
"size": 12488
} | [
"org.apache.derby.iapi.services.sanity.SanityManager"
] | import org.apache.derby.iapi.services.sanity.SanityManager; | import org.apache.derby.iapi.services.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 716,698 |
public static File copyAudioToTmp(String fileName, File newFileName) {
File inputFile = new File(TEST_DATA_DIR, fileName);
File outputFile = getTestDataTmpFile(newFileName.getName());
assertThat(Utils.copy(inputFile, outputFile), is(true));
return outputFile;
} | static File function(String fileName, File newFileName) { File inputFile = new File(TEST_DATA_DIR, fileName); File outputFile = getTestDataTmpFile(newFileName.getName()); assertThat(Utils.copy(inputFile, outputFile), is(true)); return outputFile; } | /**
* Copy audiofile to processing dir ready for use in test, use this if using
* same file in multiple tests because with junit multithreading can have
* problems otherwise
*
* @param fileName file name to copy
*
* @return new file to use
*/ | Copy audiofile to processing dir ready for use in test, use this if using same file in multiple tests because with junit multithreading can have problems otherwise | copyAudioToTmp | {
"repo_name": "pandasys/ealvatag",
"path": "ealvatag/src/test/java/ealvatag/TestUtil.java",
"license": "lgpl-3.0",
"size": 5436
} | [
"java.io.File",
"org.hamcrest.CoreMatchers",
"org.hamcrest.MatcherAssert"
] | import java.io.File; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; | import java.io.*; import org.hamcrest.*; | [
"java.io",
"org.hamcrest"
] | java.io; org.hamcrest; | 1,746,633 |
try {
Call<ResponseBody> call = service.getNull();
ServiceResponse<List<Integer>> response = getNullDelegate(call.execute(), null);
return response.getBody();
} catch (ServiceException ex) {
throw ex;
} catch (Exception ex) {
throw new ServiceE... | try { Call<ResponseBody> call = service.getNull(); ServiceResponse<List<Integer>> response = getNullDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex); } } | /**
* Get null array value
*
* @return the List<Integer> object if successful.
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/ | Get null array value | getNull | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayImpl.java",
"license": "mit",
"size": 128720
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"com.squareup.okhttp.ResponseBody",
"java.util.List"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import com.squareup.okhttp.ResponseBody; import java.util.List; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.util.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"java.util"
] | com.microsoft.rest; com.squareup.okhttp; java.util; | 1,406,125 |
public void setParties(ArrayList<String> s){
for (String u : s){
JsonTools<User> json = new JsonTools<>(new TypeReference<User>(){});
Users users = new Users();
User user = json.toEntity(users.get(u));
this.parties.add(user.getKey());
this.partiesId.put(user.getKey(), user.getId());
}
this.contr... | void function(ArrayList<String> s){ for (String u : s){ JsonTools<User> json = new JsonTools<>(new TypeReference<User>(){}); Users users = new Users(); User user = json.toEntity(users.get(u)); this.parties.add(user.getKey()); this.partiesId.put(user.getKey(), user.getId()); } this.contract.setParties(s); | /**
* Find the parties keys
* @param s : List of user ids
*/ | Find the parties keys | setParties | {
"repo_name": "SturgisRaphael/ResilientSXP",
"path": "src/main/java/protocol/impl/sigma/SigmaContract.java",
"license": "lgpl-3.0",
"size": 6804
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.util.ArrayList"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.util.ArrayList; | import com.fasterxml.jackson.core.type.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 106,353 |
public String getAdditional() {
return additional;
}
}
private class StackNode {
private final int ancestorMask;
private final String name; // null if not HTML
private final String role;
private final String activeDescendant;
private final... | String function() { return additional; } } private class StackNode { private final int ancestorMask; private final String name; private final String role; private final String activeDescendant; private final String forAttr; private Set<Locator> imagesLackingAlt = new HashSet<Locator>(); private Locator nonEmptyOption =... | /**
* Returns the additional.
*
* @return the additional
*/ | Returns the additional | getAdditional | {
"repo_name": "YOTOV-LIMITED/validator",
"path": "src/nu/validator/checker/schematronequiv/Assertions.java",
"license": "mit",
"size": 111886
} | [
"java.util.HashSet",
"java.util.Set",
"org.xml.sax.Locator"
] | import java.util.HashSet; import java.util.Set; import org.xml.sax.Locator; | import java.util.*; import org.xml.sax.*; | [
"java.util",
"org.xml.sax"
] | java.util; org.xml.sax; | 1,118,236 |
private MetadataEntry[] convertMetadata(Map metadataMap) {
MetadataEntry[] metadata = new MetadataEntry[metadataMap.size()];
Iterator metadataIter = metadataMap.entrySet().iterator();
int index = 0;
while (metadataIter.hasNext()) {
Map.Entry entry = (Map.Entry) metadataIt... | MetadataEntry[] function(Map metadataMap) { MetadataEntry[] metadata = new MetadataEntry[metadataMap.size()]; Iterator metadataIter = metadataMap.entrySet().iterator(); int index = 0; while (metadataIter.hasNext()) { Map.Entry entry = (Map.Entry) metadataIter.next(); Object metadataName = entry.getKey(); Object metadat... | /**
* Converts metadata information from a standard map to SOAP objects.
*
* @param metadataMap
* @return
*/ | Converts metadata information from a standard map to SOAP objects | convertMetadata | {
"repo_name": "ind9/jets3t",
"path": "src/org/jets3t/service/impl/soap/axis/SoapS3Service.java",
"license": "apache-2.0",
"size": 44725
} | [
"java.util.Iterator",
"java.util.Map",
"org.jets3t.service.impl.soap.axis._2006_03_01.MetadataEntry"
] | import java.util.Iterator; import java.util.Map; import org.jets3t.service.impl.soap.axis._2006_03_01.MetadataEntry; | import java.util.*; import org.jets3t.service.impl.soap.axis.*; | [
"java.util",
"org.jets3t.service"
] | java.util; org.jets3t.service; | 1,407,484 |
public List<ShardRouting> getActiveShards() {
return activeShards();
} | List<ShardRouting> function() { return activeShards(); } | /**
* Returns a {@link List} of active shards
*
* @return a {@link List} of shards
*/ | Returns a <code>List</code> of active shards | getActiveShards | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/cluster/routing/IndexShardRoutingTable.java",
"license": "apache-2.0",
"size": 26322
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,867,671 |
private static int compareField(int Pfield, int Qfield) {
if (Pfield == Qfield) {
//fields are either equal in value or both undefined.
// Step B. 1.1 AND optimized result of performing 1.1-1.4.
return DatatypeConstants.EQUAL;
} else {
if (Pfield == D... | static int function(int Pfield, int Qfield) { if (Pfield == Qfield) { return DatatypeConstants.EQUAL; } else { if (Pfield == DatatypeConstants.FIELD_UNDEFINED Qfield == DatatypeConstants.FIELD_UNDEFINED) { return DatatypeConstants.INDETERMINATE; } else { return (Pfield < Qfield ? DatatypeConstants.LESSER : DatatypeCons... | /**
* <p>Implement Step B from
* http://www.w3.org/TR/xmlschema-2/#dateTime-order.</p>
*/ | Implement Step B from HREF | compareField | {
"repo_name": "openjdk/jdk8u",
"path": "jaxp/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java",
"license": "gpl-2.0",
"size": 118225
} | [
"javax.xml.datatype.DatatypeConstants"
] | import javax.xml.datatype.DatatypeConstants; | import javax.xml.datatype.*; | [
"javax.xml"
] | javax.xml; | 2,211,987 |
public void deleteExecService(ExecService execService); | void function(ExecService execService); | /**
* Remove execService
*
* @param execService execService to be removed
*/ | Remove execService | deleteExecService | {
"repo_name": "ondrocks/perun",
"path": "perun-controller/src/main/java/cz/metacentrum/perun/controller/service/GeneralServiceManager.java",
"license": "bsd-2-clause",
"size": 14197
} | [
"cz.metacentrum.perun.taskslib.model.ExecService"
] | import cz.metacentrum.perun.taskslib.model.ExecService; | import cz.metacentrum.perun.taskslib.model.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,959,064 |
@Nullable
public PermissionGrantPolicy put(@Nonnull final PermissionGrantPolicy newPermissionGrantPolicy) throws ClientException {
return send(HttpMethod.PUT, newPermissionGrantPolicy);
} | PermissionGrantPolicy function(@Nonnull final PermissionGrantPolicy newPermissionGrantPolicy) throws ClientException { return send(HttpMethod.PUT, newPermissionGrantPolicy); } | /**
* Creates a PermissionGrantPolicy with a new object
*
* @param newPermissionGrantPolicy the object to create/update
* @return the created PermissionGrantPolicy
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/ | Creates a PermissionGrantPolicy with a new object | put | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/PermissionGrantPolicyRequest.java",
"license": "mit",
"size": 6540
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.PermissionGrantPolicy",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.PermissionGrantPolicy; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,102,744 |
public void run() throws Exception {
Exporter me = new ValidMainExporter();
Exporter be = new ISEExporter();
Remote ro = new SPTRemoteObject();
ProxyTrustExporter pte = createPTE(me, be);
try {
pte.export(ro);
// FAIL
throw new TestExcept... | void function() throws Exception { Exporter me = new ValidMainExporter(); Exporter be = new ISEExporter(); Remote ro = new SPTRemoteObject(); ProxyTrustExporter pte = createPTE(me, be); try { pte.export(ro); throw new TestException( STR + ro + STR + STR + STR); } catch (IllegalStateException ise) { logger.fine(STR + ro... | /**
* This method performs all actions mentioned in class description.
*
*/ | This method performs all actions mentioned in class description | run | {
"repo_name": "cdegroot/river",
"path": "qa/src/com/sun/jini/test/spec/security/proxytrust/proxytrustexporter/Export_IllegalStateExceptionTest.java",
"license": "apache-2.0",
"size": 4951
} | [
"com.sun.jini.qa.harness.TestException",
"com.sun.jini.test.spec.security.proxytrust.util.SPTRemoteObject",
"com.sun.jini.test.spec.security.proxytrust.util.ValidBootExporter",
"com.sun.jini.test.spec.security.proxytrust.util.ValidMainExporter",
"java.rmi.Remote",
"net.jini.export.Exporter",
"net.jini.s... | import com.sun.jini.qa.harness.TestException; import com.sun.jini.test.spec.security.proxytrust.util.SPTRemoteObject; import com.sun.jini.test.spec.security.proxytrust.util.ValidBootExporter; import com.sun.jini.test.spec.security.proxytrust.util.ValidMainExporter; import java.rmi.Remote; import net.jini.export.Exporte... | import com.sun.jini.qa.harness.*; import com.sun.jini.test.spec.security.proxytrust.util.*; import java.rmi.*; import net.jini.export.*; import net.jini.security.proxytrust.*; | [
"com.sun.jini",
"java.rmi",
"net.jini.export",
"net.jini.security"
] | com.sun.jini; java.rmi; net.jini.export; net.jini.security; | 1,501,495 |
public MatchType isNumberMatch(PhoneNumber firstNumber, String secondNumber) {
// First see if the second number has an implicit country calling code, by attempting to parse
// it.
try {
PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION);
return isNumberMatch(firstNumber, se... | MatchType function(PhoneNumber firstNumber, String secondNumber) { try { PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION); return isNumberMatch(firstNumber, secondNumberAsProto); } catch (NumberParseException e) { if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) { String... | /**
* Takes two phone numbers and compares them for equality. This is a convenience wrapper for
* {@link #isNumberMatch(PhoneNumber, PhoneNumber)}. No default region is known.
*
* @param firstNumber first number to compare in proto buffer format.
* @param secondNumber second number to compare. Can cont... | Takes two phone numbers and compares them for equality. This is a convenience wrapper for <code>#isNumberMatch(PhoneNumber, PhoneNumber)</code>. No default region is known | isNumberMatch | {
"repo_name": "tg123/libphonenumber",
"path": "java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java",
"license": "apache-2.0",
"size": 161577
} | [
"com.google.i18n.phonenumbers.Phonenumber"
] | import com.google.i18n.phonenumbers.Phonenumber; | import com.google.i18n.phonenumbers.*; | [
"com.google.i18n"
] | com.google.i18n; | 696,761 |
public WorldGenerator getRandomWorldGenForGrass(Random rand)
{
return rand.nextInt(4) == 0 ? new WorldGenTallGrass(BlockTallGrass.EnumType.FERN) : new WorldGenTallGrass(BlockTallGrass.EnumType.GRASS);
} | WorldGenerator function(Random rand) { return rand.nextInt(4) == 0 ? new WorldGenTallGrass(BlockTallGrass.EnumType.FERN) : new WorldGenTallGrass(BlockTallGrass.EnumType.GRASS); } | /**
* Gets a WorldGen appropriate for this biome.
*/ | Gets a WorldGen appropriate for this biome | getRandomWorldGenForGrass | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/biome/BiomeGenJungle.java",
"license": "gpl-3.0",
"size": 3841
} | [
"java.util.Random",
"net.minecraft.block.BlockTallGrass",
"net.minecraft.world.gen.feature.WorldGenTallGrass",
"net.minecraft.world.gen.feature.WorldGenerator"
] | import java.util.Random; import net.minecraft.block.BlockTallGrass; import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenerator; | import java.util.*; import net.minecraft.block.*; import net.minecraft.world.gen.feature.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.world; | 2,716,569 |
public Builder withR(int r)
{
this.r = new Quorum(r);
return this;
} | Builder function(int r) { this.r = new Quorum(r); return this; } | /**
* Set the r value. Individual requests (or buckets in a bucket type)
* can override this.
*
* @param r the r value as an integer.
* @return a reference to this object.
*/ | Set the r value. Individual requests (or buckets in a bucket type) can override this | withR | {
"repo_name": "basho/riak-java-client",
"path": "src/main/java/com/basho/riak/client/core/query/BucketProperties.java",
"license": "apache-2.0",
"size": 32623
} | [
"com.basho.riak.client.api.cap.Quorum"
] | import com.basho.riak.client.api.cap.Quorum; | import com.basho.riak.client.api.cap.*; | [
"com.basho.riak"
] | com.basho.riak; | 1,593,425 |
private void finish() throws IOException {
// Update the last shard if at least one element was written.
if (previousShard.isPresent()) {
finishShard();
}
long startOfBloomFilter = out.getCount();
ScalableBloomFilterCoder.of().encode(bloomFilterBuilder.build(), out);
lo... | void function() throws IOException { if (previousShard.isPresent()) { finishShard(); } long startOfBloomFilter = out.getCount(); ScalableBloomFilterCoder.of().encode(bloomFilterBuilder.build(), out); long startOfIndex = out.getCount(); IsmFormat.ISM_SHARD_INDEX_CODER.encode(new ArrayList<>(shardKeyToShardMap.values()),... | /**
* Completes the construction of the Ism file. This is done by:
*
* <ul>
* <li>finishing the last shard if present
* <li>writing out the Bloom filter
* <li>writing out the shard index
* <li>writing out the footer
* </ul>
*
* @throws IOException if an underlyi... | Completes the construction of the Ism file. This is done by: finishing the last shard if present writing out the Bloom filter writing out the shard index writing out the footer | finish | {
"repo_name": "rangadi/beam",
"path": "runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/IsmSink.java",
"license": "apache-2.0",
"size": 12798
} | [
"java.io.IOException",
"java.util.ArrayList",
"org.apache.beam.runners.dataflow.internal.IsmFormat",
"org.apache.beam.runners.dataflow.worker.util.ScalableBloomFilter"
] | import java.io.IOException; import java.util.ArrayList; import org.apache.beam.runners.dataflow.internal.IsmFormat; import org.apache.beam.runners.dataflow.worker.util.ScalableBloomFilter; | import java.io.*; import java.util.*; import org.apache.beam.runners.dataflow.internal.*; import org.apache.beam.runners.dataflow.worker.util.*; | [
"java.io",
"java.util",
"org.apache.beam"
] | java.io; java.util; org.apache.beam; | 793,170 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<CustomerPolicyInner> getByCustomerWithResponse(
String billingAccountName, String customerName, Context context) {
return getByCustomerWithResponseAsync(billingAccountName, customerName, context).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) Response<CustomerPolicyInner> function( String billingAccountName, String customerName, Context context) { return getByCustomerWithResponseAsync(billingAccountName, customerName, context).block(); } | /**
* Lists the policies for a customer. This operation is supported only for billing accounts with agreement type
* Microsoft Partner Agreement.
*
* @param billingAccountName The ID that uniquely identifies a billing account.
* @param customerName The ID that uniquely identifies a customer.
... | Lists the policies for a customer. This operation is supported only for billing accounts with agreement type Microsoft Partner Agreement | getByCustomerWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/implementation/PoliciesClientImpl.java",
"license": "mit",
"size": 35613
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.billing.fluent.models.CustomerPolicyInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.billing.fluent.models.CustomerPolicyInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.billing.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 744,408 |
public ParseContext transform(ParseContext pctx) throws SemanticException {
pCtx = pctx;
if (HiveConf.getBoolVar(pCtx.getConf(),HiveConf.ConfVars.HIVECONVERTJOIN)) {
findPossibleAutoConvertedJoinOperators();
}
// detect correlations
CorrelationNodeProcCtx corrCtx = new CorrelationNodeProc... | ParseContext function(ParseContext pctx) throws SemanticException { pCtx = pctx; if (HiveConf.getBoolVar(pCtx.getConf(),HiveConf.ConfVars.HIVECONVERTJOIN)) { findPossibleAutoConvertedJoinOperators(); } CorrelationNodeProcCtx corrCtx = new CorrelationNodeProcCtx(pCtx); Map<Rule, NodeProcessor> opRules = new LinkedHashMa... | /**
* Detect correlations and transform the query tree.
*
* @param pactx
* current parse context
* @throws SemanticException
*/ | Detect correlations and transform the query tree | transform | {
"repo_name": "asonipsl/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/CorrelationOptimizer.java",
"license": "apache-2.0",
"size": 29917
} | [
"java.util.ArrayList",
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.ql.exec.ReduceSinkOperator",
"org.apache.hadoop.hive.ql.lib.DefaultGraphWalker",
"org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher",
"org.apache.had... | import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.ReduceSinkOperator; import org.apache.hadoop.hive.ql.lib.DefaultGraphWalker; import org.apache.hadoop.hive.ql.lib.DefaultRuleDispatc... | import java.util.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.lib.*; import org.apache.hadoop.hive.ql.parse.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,568,183 |
public void addExternalId(final ExternalId legalentityId) {
ArgumentChecker.notNull(legalentityId, "legalentityId");
addExternalIds(Arrays.asList(legalentityId));
} | void function(final ExternalId legalentityId) { ArgumentChecker.notNull(legalentityId, STR); addExternalIds(Arrays.asList(legalentityId)); } | /**
* Adds a single legal entity external identifier to the collection to search for. Unless customized, the search will match
* {@link com.opengamma.id.ExternalIdSearchType#ANY any} of the identifiers.
*
* @param legalentityId
* the legal entity key identifier to add, not null
*/ | Adds a single legal entity external identifier to the collection to search for. Unless customized, the search will match <code>com.opengamma.id.ExternalIdSearchType#ANY any</code> of the identifiers | addExternalId | {
"repo_name": "McLeodMoores/starling",
"path": "projects/master/src/main/java/com/opengamma/master/legalentity/LegalEntitySearchRequest.java",
"license": "apache-2.0",
"size": 27714
} | [
"com.opengamma.id.ExternalId",
"com.opengamma.util.ArgumentChecker",
"java.util.Arrays"
] | import com.opengamma.id.ExternalId; import com.opengamma.util.ArgumentChecker; import java.util.Arrays; | import com.opengamma.id.*; import com.opengamma.util.*; import java.util.*; | [
"com.opengamma.id",
"com.opengamma.util",
"java.util"
] | com.opengamma.id; com.opengamma.util; java.util; | 1,339,713 |
@Override
public BlobClientBuilder credential(AzureNamedKeyCredential credential) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
return credential(StorageSharedKeyCredential.fromAzureNamedKeyCredential(credential));
} | BlobClientBuilder function(AzureNamedKeyCredential credential) { Objects.requireNonNull(credential, STR); return credential(StorageSharedKeyCredential.fromAzureNamedKeyCredential(credential)); } | /**
* Sets the {@link AzureNamedKeyCredential} used to authorize requests sent to the service.
*
* @param credential {@link AzureNamedKeyCredential}.
* @return the updated BlobClientBuilder
* @throws NullPointerException If {@code credential} is {@code null}.
*/ | Sets the <code>AzureNamedKeyCredential</code> used to authorize requests sent to the service | credential | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/BlobClientBuilder.java",
"license": "mit",
"size": 29263
} | [
"com.azure.core.credential.AzureNamedKeyCredential",
"com.azure.storage.common.StorageSharedKeyCredential",
"java.util.Objects"
] | import com.azure.core.credential.AzureNamedKeyCredential; import com.azure.storage.common.StorageSharedKeyCredential; import java.util.Objects; | import com.azure.core.credential.*; import com.azure.storage.common.*; import java.util.*; | [
"com.azure.core",
"com.azure.storage",
"java.util"
] | com.azure.core; com.azure.storage; java.util; | 333,726 |
// -----------------------------------------------------------------------
public static boolean contentEquals(File file1, File file2) throws IOException {
boolean file1Exists = file1.exists();
if (file1Exists != file2.exists()) {
return false;
}
if (!file1Exists) {
// two not existing... | static boolean function(File file1, File file2) throws IOException { boolean file1Exists = file1.exists(); if (file1Exists != file2.exists()) { return false; } if (!file1Exists) { return true; } if (file1.isDirectory() file2.isDirectory()) { throw new IOException(STR); } if (file1.length() != file2.length()) { return f... | /**
* Compares the contents of two files to determine if they are equal or not.
* <p>
* This method checks to see if the two files are different lengths or if they point to the same file, before resorting to byte-by-byte comparison of the contents.
* <p>
* Code origin: Avalon
*
* @param file1 the f... | Compares the contents of two files to determine if they are equal or not. This method checks to see if the two files are different lengths or if they point to the same file, before resorting to byte-by-byte comparison of the contents. Code origin: Avalon | contentEquals | {
"repo_name": "OhmGeek/ThanCue",
"path": "src/org/zeroturnaround/zip/commons/FileUtils.java",
"license": "gpl-3.0",
"size": 35202
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,970,084 |
public int findNrPrevJobEntries( JobEntryCopy from ) {
return findNrPrevJobEntries( from, false );
} | int function( JobEntryCopy from ) { return findNrPrevJobEntries( from, false ); } | /**
* Find nr prev job entries.
*
* @param from the from
* @return the int
*/ | Find nr prev job entries | findNrPrevJobEntries | {
"repo_name": "ViswesvarSekar/pentaho-kettle",
"path": "engine/src/org/pentaho/di/job/JobMeta.java",
"license": "apache-2.0",
"size": 86688
} | [
"org.pentaho.di.job.entry.JobEntryCopy"
] | import org.pentaho.di.job.entry.JobEntryCopy; | import org.pentaho.di.job.entry.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,663,384 |
public String unescape( String s ) {
StringBuffer buf = new StringBuffer( s.length() );
Matcher m = entityPtn.matcher( s );
String decRef;
String hexRef;
int charCode;
String entName;
String entity;
while ( m.find() ) {
decRef = m.group( 1 );
hexRef = m.group( 2 );
entName = m.group( 3 );
... | String function( String s ) { StringBuffer buf = new StringBuffer( s.length() ); Matcher m = entityPtn.matcher( s ); String decRef; String hexRef; int charCode; String entName; String entity; while ( m.find() ) { decRef = m.group( 1 ); hexRef = m.group( 2 ); entName = m.group( 3 ); if ( (decRef != null) ) { charCode = ... | /**
* Unescapes standard named entities and numeric character references.
* This applies to attributes and element values.
*
* They are: lt, gt, quot, apos, amp, #1234, #x1a2b.
*/ | Unescapes standard named entities and numeric character references. This applies to attributes and element values. They are: lt, gt, quot, apos, amp, #1234, #x1a2b | unescape | {
"repo_name": "Vhati/ftl-profile-editor",
"path": "src/main/java/net/vhati/modmanager/core/SloppyXMLParser.java",
"license": "gpl-2.0",
"size": 16542
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,926,789 |
protected void setConfigurationContextService(ConfigurationContextService service) {
if (log.isDebugEnabled()) {
log.debug("carbon-registry deployment synchronizer component bound to the configuration context service");
}
RegistryServiceReferenceHolder.setConfigurationContextServ... | void function(ConfigurationContextService service) { if (log.isDebugEnabled()) { log.debug(STR); } RegistryServiceReferenceHolder.setConfigurationContextService(service); } | /**
* This method is used to set configuration context service.
*
* @param service configuration context service.
*/ | This method is used to set configuration context service | setConfigurationContextService | {
"repo_name": "laki88/carbon-registry",
"path": "components/registry/org.wso2.carbon.registry.deployment.synchronizer/src/main/java/org/wso2/carbon/registry/deployment/synchronizer/internal/RegistryDeploymentSynchronizerComponent.java",
"license": "apache-2.0",
"size": 4399
} | [
"org.wso2.carbon.registry.deployment.synchronizer.utils.RegistryServiceReferenceHolder",
"org.wso2.carbon.utils.ConfigurationContextService"
] | import org.wso2.carbon.registry.deployment.synchronizer.utils.RegistryServiceReferenceHolder; import org.wso2.carbon.utils.ConfigurationContextService; | import org.wso2.carbon.registry.deployment.synchronizer.utils.*; import org.wso2.carbon.utils.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,592,157 |
@Override
public void getBeerOfMonth() {
new BeerRequest().start(this,
(Iface) getClient(new Client.Factory(), mPluginName),
(Object) null);
} | void function() { new BeerRequest().start(this, (Iface) getClient(new Client.Factory(), mPluginName), (Object) null); } | /**
* Initiates a request to the server to get the beer of the month.
*/ | Initiates a request to the server to get the beer of the month | getBeerOfMonth | {
"repo_name": "ValentinMinder/pocketcampus",
"path": "plugin/satellite/android/src/main/java/org/pocketcampus/plugin/satellite/android/SatelliteController.java",
"license": "bsd-3-clause",
"size": 1774
} | [
"org.pocketcampus.plugin.satellite.android.req.BeerRequest",
"org.pocketcampus.plugin.satellite.shared.SatelliteService"
] | import org.pocketcampus.plugin.satellite.android.req.BeerRequest; import org.pocketcampus.plugin.satellite.shared.SatelliteService; | import org.pocketcampus.plugin.satellite.android.req.*; import org.pocketcampus.plugin.satellite.shared.*; | [
"org.pocketcampus.plugin"
] | org.pocketcampus.plugin; | 602,234 |
public static void main(String args[]) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException ex) {
} catch (InstantiationException ex) {
} catch (IllegalAccessException ex) {
} catch (UnsupportedLookAndFeel... | static void function(String args[]) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { } catch (InstantiationException ex) { } catch (IllegalAccessException ex) { } catch (UnsupportedLookAndFeelException ex) { } | /**
* Runs the uninstaller.
* @param args Command line arguments are not supported.
*/ | Runs the uninstaller | main | {
"repo_name": "JLimperg/SalSSuite",
"path": "src/salssuite/util/gui/Uninstaller.java",
"license": "gpl-3.0",
"size": 10215
} | [
"javax.swing.UIManager",
"javax.swing.UnsupportedLookAndFeelException"
] | import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,212,093 |
KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException; | KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException; | /**
* returns a Channel with TransportLayer and Authenticator configured.
* @param id channel id
* @param key SelectionKey
*/ | returns a Channel with TransportLayer and Authenticator configured | buildChannel | {
"repo_name": "usakey/kafka",
"path": "clients/src/main/java/org/apache/kafka/common/network/ChannelBuilder.java",
"license": "apache-2.0",
"size": 1510
} | [
"java.nio.channels.SelectionKey",
"org.apache.kafka.common.KafkaException"
] | import java.nio.channels.SelectionKey; import org.apache.kafka.common.KafkaException; | import java.nio.channels.*; import org.apache.kafka.common.*; | [
"java.nio",
"org.apache.kafka"
] | java.nio; org.apache.kafka; | 9,260 |
public SnapshotPolicyPatch withWeeklySchedule(WeeklySchedule weeklySchedule) {
if (this.innerProperties() == null) {
this.innerProperties = new SnapshotPolicyProperties();
}
this.innerProperties().withWeeklySchedule(weeklySchedule);
return this;
} | SnapshotPolicyPatch function(WeeklySchedule weeklySchedule) { if (this.innerProperties() == null) { this.innerProperties = new SnapshotPolicyProperties(); } this.innerProperties().withWeeklySchedule(weeklySchedule); return this; } | /**
* Set the weeklySchedule property: Schedule for weekly snapshots.
*
* @param weeklySchedule the weeklySchedule value to set.
* @return the SnapshotPolicyPatch object itself.
*/ | Set the weeklySchedule property: Schedule for weekly snapshots | withWeeklySchedule | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/main/java/com/azure/resourcemanager/netapp/models/SnapshotPolicyPatch.java",
"license": "mit",
"size": 7723
} | [
"com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties"
] | import com.azure.resourcemanager.netapp.fluent.models.SnapshotPolicyProperties; | import com.azure.resourcemanager.netapp.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,982,745 |
public void endLocator(String namespaceURI, String sName, String qName) throws XLinkException {
;
}
| void function(String namespaceURI, String sName, String qName) throws XLinkException { ; } | /**
* Handle the end of the locator.
*/ | Handle the end of the locator | endLocator | {
"repo_name": "martinggww/Programming",
"path": "XBRL/xbrl-api/module-api/src/main/java/org/xbrlapi/xlink/handler/XBRLXLinkHandlerImpl.java",
"license": "gpl-2.0",
"size": 15679
} | [
"org.xbrlapi.xlink.XLinkException"
] | import org.xbrlapi.xlink.XLinkException; | import org.xbrlapi.xlink.*; | [
"org.xbrlapi.xlink"
] | org.xbrlapi.xlink; | 2,696,753 |
public Map<String, String> getRequestParameters() {
return requestParameters;
} | Map<String, String> function() { return requestParameters; } | /**
* Returns the complete map of additional request parameters to be included
* in the pre-signed URL.
*
* @return The complete map of additional request parameters to be included
* in the pre-signed URL.
*/ | Returns the complete map of additional request parameters to be included in the pre-signed URL | getRequestParameters | {
"repo_name": "trasa/aws-sdk-java",
"path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/GeneratePresignedUrlRequest.java",
"license": "apache-2.0",
"size": 21304
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,625,896 |
public static void buildSize( StringBuffer styleBuffer, IStyle style)
{
buildProperty( styleBuffer, HTMLTags.ATTR_HEIGHT, style.getHeight( ) );
buildProperty( styleBuffer, HTMLTags.ATTR_WIDTH, style.getWidth( ) );
} | static void function( StringBuffer styleBuffer, IStyle style) { buildProperty( styleBuffer, HTMLTags.ATTR_HEIGHT, style.getHeight( ) ); buildProperty( styleBuffer, HTMLTags.ATTR_WIDTH, style.getWidth( ) ); } | /**
* Build size style, set height and width
*
* @param styleBuffer
* The <code>StringBuffer</code> to which the result is output.
* @param style
* The style object.
*/ | Build size style, set height and width | buildSize | {
"repo_name": "sguan-actuate/birt",
"path": "engine/org.eclipse.birt.report.engine.emitter.html/src/org/eclipse/birt/report/engine/emitter/html/AttributeBuilder.java",
"license": "epl-1.0",
"size": 21204
} | [
"org.eclipse.birt.report.engine.content.IStyle",
"org.eclipse.birt.report.engine.emitter.HTMLTags"
] | import org.eclipse.birt.report.engine.content.IStyle; import org.eclipse.birt.report.engine.emitter.HTMLTags; | import org.eclipse.birt.report.engine.content.*; import org.eclipse.birt.report.engine.emitter.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 424,948 |
void removeChangeListener(RendererChangeListener listener);
//// TOOL TIP GENERATOR /////////////////////////////////////////////////// | void removeChangeListener(RendererChangeListener listener); | /**
* Removes a change listener.
*
* @param listener the listener.
*/ | Removes a change listener | removeChangeListener | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/renderer/PolarItemRenderer.java",
"license": "lgpl-2.1",
"size": 6378
} | [
"org.jfree.chart.event.RendererChangeListener"
] | import org.jfree.chart.event.RendererChangeListener; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 87,859 |
public boolean invertDirectInversion(DenseMatrix64F A) {
createSolver(A.numCols);
return invertUnsafe(getInversionSolver(), A, false);
} | boolean function(DenseMatrix64F A) { createSolver(A.numCols); return invertUnsafe(getInversionSolver(), A, false); } | /**
* Invert symmetric positive definite matrix A. On output a replaced by A^-1.
*
* @param A the matrix A
* @return False if the matrix is singular (no solution)
*/ | Invert symmetric positive definite matrix A. On output a replaced by A^-1 | invertDirectInversion | {
"repo_name": "aherbert/GDSC-SMLM",
"path": "src/main/java/uk/ac/sussex/gdsc/smlm/fitting/linear/EjmlLinearSolver.java",
"license": "gpl-3.0",
"size": 40872
} | [
"org.ejml.data.DenseMatrix64F"
] | import org.ejml.data.DenseMatrix64F; | import org.ejml.data.*; | [
"org.ejml.data"
] | org.ejml.data; | 2,223,335 |
@Test
public void testRemovingPropertyDefinition() {
String name = "asdt-rpd";
String propName = name + "-name";
Toolkit toolkit = mToolkit;
Scope scope = mScope;
Assert.assertNotNull(toolkit);
Assert.assertNotNull(scope);
StructureDefinition newDef = checkAndCreate(name);
P... | void function() { String name = STR; String propName = name + "-name"; Toolkit toolkit = mToolkit; Scope scope = mScope; Assert.assertNotNull(toolkit); Assert.assertNotNull(scope); StructureDefinition newDef = checkAndCreate(name); PropertyDefinition newPD = toolkit.createNewPropertyDefinition(scope, propName, Property... | /**
* Test that removing an existing PropertyDefinition survies a write/read
*/ | Test that removing an existing PropertyDefinition survies a write/read | testRemovingPropertyDefinition | {
"repo_name": "diamondq/dq-common-java",
"path": "model/common-model.standard/src/test/java/com/diamondq/adventuretools/model/AbstractStructureDefinitionTests.java",
"license": "apache-2.0",
"size": 11899
} | [
"com.diamondq.common.model.interfaces.PropertyDefinition",
"com.diamondq.common.model.interfaces.PropertyType",
"com.diamondq.common.model.interfaces.Scope",
"com.diamondq.common.model.interfaces.StructureDefinition",
"com.diamondq.common.model.interfaces.Toolkit",
"java.util.Map",
"org.junit.Assert"
] | import com.diamondq.common.model.interfaces.PropertyDefinition; import com.diamondq.common.model.interfaces.PropertyType; import com.diamondq.common.model.interfaces.Scope; import com.diamondq.common.model.interfaces.StructureDefinition; import com.diamondq.common.model.interfaces.Toolkit; import java.util.Map; import ... | import com.diamondq.common.model.interfaces.*; import java.util.*; import org.junit.*; | [
"com.diamondq.common",
"java.util",
"org.junit"
] | com.diamondq.common; java.util; org.junit; | 246,411 |
public List<String> getKemidsByCampusCode(List<String> campusCodes); | List<String> function(List<String> campusCodes); | /**
* Gets the campus codes, using the campus codes
*
* @param campusCodes
* @return
*/ | Gets the campus codes, using the campus codes | getKemidsByCampusCode | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/dataaccess/KemidBenefittingOrganizationDao.java",
"license": "apache-2.0",
"size": 2757
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 293,545 |
private static List<Object[]> memStoreTSAndTagsCombination() {
List<Object[]> configurations = new ArrayList<>();
configurations.add(new Object[] { false, false });
configurations.add(new Object[] { false, true });
configurations.add(new Object[] { true, false });
configurations.add(new Object[] {... | static List<Object[]> function() { List<Object[]> configurations = new ArrayList<>(); configurations.add(new Object[] { false, false }); configurations.add(new Object[] { false, true }); configurations.add(new Object[] { true, false }); configurations.add(new Object[] { true, true }); return Collections.unmodifiableLis... | /**
* Create combination of memstoreTS and tags
*/ | Create combination of memstoreTS and tags | memStoreTSAndTagsCombination | {
"repo_name": "ndimiduk/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java",
"license": "apache-2.0",
"size": 151074
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 756,798 |
double asum(INDArray x); | double asum(INDArray x); | /**
* Compute || x ||_1 (1-norm, sum of absolute values)
*/ | Compute || x ||_1 (1-norm, sum of absolute values) | asum | {
"repo_name": "phvu/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/factory/BlasWrapper.java",
"license": "apache-2.0",
"size": 9818
} | [
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 1,299,073 |
public void initialize(CordovaInterface cordova, CordovaWebView webView) {
} | void function(CordovaInterface cordova, CordovaWebView webView) { } | /**
* Called after plugin construction and fields have been initialized.
* Prefer to use pluginInitialize instead since there is no value in
* having parameters on the initialize() function.
*/ | Called after plugin construction and fields have been initialized. Prefer to use pluginInitialize instead since there is no value in having parameters on the initialize() function | initialize | {
"repo_name": "zendey/Zendey",
"path": "zendey/platforms/android/CordovaLib/src/org/apache/cordova/CordovaPlugin.java",
"license": "gpl-3.0",
"size": 15690
} | [
"org.apache.cordova.CordovaInterface",
"org.apache.cordova.CordovaWebView"
] | import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaWebView; | import org.apache.cordova.*; | [
"org.apache.cordova"
] | org.apache.cordova; | 1,249,115 |
public List<ExpectedStudyProject> getAllStudyProjectsByStudy(Long studyId);
| List<ExpectedStudyProject> function(Long studyId); | /**
* This method gets a list of expectedStudyProject by a given projectExpectedStudy identifier.
*
* @param studyId is the projectExpectedStudy identifier.
* @return a list of expectedStudyProject objects.
*/ | This method gets a list of expectedStudyProject by a given projectExpectedStudy identifier | getAllStudyProjectsByStudy | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ExpectedStudyProjectManager.java",
"license": "gpl-3.0",
"size": 3534
} | [
"java.util.List",
"org.cgiar.ccafs.marlo.data.model.ExpectedStudyProject"
] | import java.util.List; import org.cgiar.ccafs.marlo.data.model.ExpectedStudyProject; | import java.util.*; import org.cgiar.ccafs.marlo.data.model.*; | [
"java.util",
"org.cgiar.ccafs"
] | java.util; org.cgiar.ccafs; | 3,381 |
public I_CmsPrincipal lookupPrincipal(CmsRequestContext context, String principalName) {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
I_CmsPrincipal result = null;
try {
result = m_driverManager.lookupPrincipal(dbc, CmsOrganizationalUnit.removeLeadingSeparator(pr... | I_CmsPrincipal function(CmsRequestContext context, String principalName) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); I_CmsPrincipal result = null; try { result = m_driverManager.lookupPrincipal(dbc, CmsOrganizationalUnit.removeLeadingSeparator(principalName)); } finally { dbc.clear(); } return result... | /**
* Lookup and read the user or group with the given name.<p>
*
* @param context the current request context
* @param principalName the name of the principal to lookup
*
* @return the principal (group or user) if found, otherwise <code>null</code>
*/ | Lookup and read the user or group with the given name | lookupPrincipal | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/db/CmsSecurityManager.java",
"license": "lgpl-2.1",
"size": 287876
} | [
"org.opencms.file.CmsRequestContext",
"org.opencms.security.CmsOrganizationalUnit",
"org.opencms.security.CmsPrincipal"
] | import org.opencms.file.CmsRequestContext; import org.opencms.security.CmsOrganizationalUnit; import org.opencms.security.CmsPrincipal; | import org.opencms.file.*; import org.opencms.security.*; | [
"org.opencms.file",
"org.opencms.security"
] | org.opencms.file; org.opencms.security; | 2,580,098 |
@SuppressWarnings("unchecked")
public Type setBody(Expression expression) {
SetBodyDefinition answer = new SetBodyDefinition(expression);
addOutput(answer);
return (Type) this;
} | @SuppressWarnings(STR) Type function(Expression expression) { SetBodyDefinition answer = new SetBodyDefinition(expression); addOutput(answer); return (Type) this; } | /**
* <a href="http://camel.apache.org/message-translator.html">Message
* Translator EIP:</a> Adds a processor which sets the body on the IN
* message
*
* @param expression
* the expression used to set the body
* @return the builder
*/ | Message message | setBody | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 138060
} | [
"org.apache.camel.Expression"
] | import org.apache.camel.Expression; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 264,730 |
public static void setResult(String key, double _result, String _unit, AggregationPolicy _aggregationPolicy) {
setResult(new ScalarResult(SECONDARY_RESULT_PREFIX + key, _result, _unit, _aggregationPolicy));
} | static void function(String key, double _result, String _unit, AggregationPolicy _aggregationPolicy) { setResult(new ScalarResult(SECONDARY_RESULT_PREFIX + key, _result, _unit, _aggregationPolicy)); } | /**
* Insert the counter value as secondary result. An existing counter value is replaced.
*/ | Insert the counter value as secondary result. An existing counter value is replaced | setResult | {
"repo_name": "headissue/cache2k-benchmark",
"path": "jmh-suite/src/main/java/org/cache2k/benchmark/jmh/MiscResultRecorderProfiler.java",
"license": "gpl-3.0",
"size": 3728
} | [
"org.openjdk.jmh.results.AggregationPolicy",
"org.openjdk.jmh.results.ScalarResult"
] | import org.openjdk.jmh.results.AggregationPolicy; import org.openjdk.jmh.results.ScalarResult; | import org.openjdk.jmh.results.*; | [
"org.openjdk.jmh"
] | org.openjdk.jmh; | 1,540,613 |
public static KeyStructureInfo getKeyStructureInfo(SegmentProperties segmentProperties,
DimColumnResolvedFilterInfo dimColumnEvaluatorInfo) throws KeyGenException {
int colGrpId = getColumnGroupId(segmentProperties, dimColumnEvaluatorInfo.getColumnIndex());
KeyGenerator keyGenerator = segmentProperties.... | static KeyStructureInfo function(SegmentProperties segmentProperties, DimColumnResolvedFilterInfo dimColumnEvaluatorInfo) throws KeyGenException { int colGrpId = getColumnGroupId(segmentProperties, dimColumnEvaluatorInfo.getColumnIndex()); KeyGenerator keyGenerator = segmentProperties.getColumnGroupAndItsKeygenartor().... | /**
* Below method will be used to get the key structure for the column group
*
* @param segmentProperties segment properties
* @param dimColumnEvaluatorInfo dimension evaluator info
* @return key structure info for column group dimension
* @throws KeyGenException
*/ | Below method will be used to get the key structure for the column group | getKeyStructureInfo | {
"repo_name": "mayunSaicmotor/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java",
"license": "apache-2.0",
"size": 40568
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.carbondata.core.datastore.block.SegmentProperties",
"org.apache.carbondata.core.keygenerator.KeyGenException",
"org.apache.carbondata.core.keygenerator.KeyGenerator",
"org.apache.carbondata.core.scan.executor.infos.KeyStructureInfo",
"org.apache.carbo... | import java.util.ArrayList; import java.util.List; import org.apache.carbondata.core.datastore.block.SegmentProperties; import org.apache.carbondata.core.keygenerator.KeyGenException; import org.apache.carbondata.core.keygenerator.KeyGenerator; import org.apache.carbondata.core.scan.executor.infos.KeyStructureInfo; imp... | import java.util.*; import org.apache.carbondata.core.datastore.block.*; import org.apache.carbondata.core.keygenerator.*; import org.apache.carbondata.core.scan.executor.infos.*; import org.apache.carbondata.core.scan.filter.resolver.resolverinfo.*; | [
"java.util",
"org.apache.carbondata"
] | java.util; org.apache.carbondata; | 922,320 |
FormDataMultiPart localFormData = formData;
if (entity != null && !entity.getDataList().isEmpty()) {
for (int i = 0; i < entity.getDataList().size(); i++) {
int inc = i + 1;
TOneASCreativeAssetsApproveData data = entity.getDataList().get(i);
localFormData = setIsHttps(localFormData... | FormDataMultiPart localFormData = formData; if (entity != null && !entity.getDataList().isEmpty()) { for (int i = 0; i < entity.getDataList().size(); i++) { int inc = i + 1; TOneASCreativeAssetsApproveData data = entity.getDataList().get(i); localFormData = setIsHttps(localFormData, data); localFormData = setAdvertiser... | /**
* Creates a Multi Part Form object.
*
* @param entity
* expects a TOneASCreativeAssetsApprove entity.
* @param formData
* expects a FormDataMultiPart formData object.
* @return
*/ | Creates a Multi Part Form object | getMultiPartForm | {
"repo_name": "MediaMath/t1-java",
"path": "src/main/java/com/mediamath/terminalone/models/helper/TOneCreativeAssetsApproveHelper.java",
"license": "apache-2.0",
"size": 4853
} | [
"com.mediamath.terminalone.models.TOneASCreativeAssetsApproveData",
"org.glassfish.jersey.media.multipart.FormDataMultiPart"
] | import com.mediamath.terminalone.models.TOneASCreativeAssetsApproveData; import org.glassfish.jersey.media.multipart.FormDataMultiPart; | import com.mediamath.terminalone.models.*; import org.glassfish.jersey.media.multipart.*; | [
"com.mediamath.terminalone",
"org.glassfish.jersey"
] | com.mediamath.terminalone; org.glassfish.jersey; | 121,652 |
public T textSize(float size) {
if (view instanceof TextView) {
TextView tv = (TextView) view;
tv.setTextSize(size);
}
return self();
} | T function(float size) { if (view instanceof TextView) { TextView tv = (TextView) view; tv.setTextSize(size); } return self(); } | /**
* Set the text size (in sp) of a TextView.
*
* @param size size
* @return self
*/ | Set the text size (in sp) of a TextView | textSize | {
"repo_name": "tsdl2013/COCOQuery",
"path": "query/src/main/java/com/cocosw/query/AbstractViewQuery.java",
"license": "apache-2.0",
"size": 31255
} | [
"android.widget.TextView"
] | import android.widget.TextView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 103,273 |
public ColumnMetadata getColumn() {
return m_column;
} | ColumnMetadata function() { return m_column; } | /**
* INTERNAL:
* Used for OX mapping.
*/ | Used for OX mapping | getColumn | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/BasicAccessor.java",
"license": "epl-1.0",
"size": 23098
} | [
"org.eclipse.persistence.internal.jpa.metadata.columns.ColumnMetadata"
] | import org.eclipse.persistence.internal.jpa.metadata.columns.ColumnMetadata; | import org.eclipse.persistence.internal.jpa.metadata.columns.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,152,288 |
public Link two() {
return two;
} | Link function() { return two; } | /**
* Returns the second link in this bi-link.
*
* @return the second link
*/ | Returns the second link in this bi-link | two | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "core/api/src/main/java/org/onosproject/ui/topo/BiLink.java",
"license": "apache-2.0",
"size": 2663
} | [
"org.onosproject.net.Link"
] | import org.onosproject.net.Link; | import org.onosproject.net.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 429,990 |
public static List<File> deeplyEnclosedJavaTestFiles(File directory) {
if (!directory.exists())
throw new IllegalArgumentException("directory does not exist: " + directory);
if (!directory.isDirectory())
throw new IllegalArgumentException("found file instead of directory: " +... | static List<File> function(File directory) { if (!directory.exists()) throw new IllegalArgumentException(STR + directory); if (!directory.isDirectory()) throw new IllegalArgumentException(STR + directory); List<File> javaFiles = new ArrayList<File>(); | /**
* Returns all the java files that are descendants of the given directory
*/ | Returns all the java files that are descendants of the given directory | deeplyEnclosedJavaTestFiles | {
"repo_name": "biddyweb/checker-framework",
"path": "framework/src/org/checkerframework/framework/test/TestUtilities.java",
"license": "gpl-2.0",
"size": 6847
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List"
] | import java.io.File; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,872,957 |
@Internal
public void setBrcTop( BorderCode field_37_brcTop )
{
this.field_37_brcTop = field_37_brcTop;
} | void function( BorderCode field_37_brcTop ) { this.field_37_brcTop = field_37_brcTop; } | /**
* Set the brcTop field for the TAP record.
*/ | Set the brcTop field for the TAP record | setBrcTop | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/scratchpad/src/org/apache/poi/hwpf/model/types/TAPAbstractType.java",
"license": "apache-2.0",
"size": 73127
} | [
"org.apache.poi.hwpf.usermodel.BorderCode"
] | import org.apache.poi.hwpf.usermodel.BorderCode; | import org.apache.poi.hwpf.usermodel.*; | [
"org.apache.poi"
] | org.apache.poi; | 1,949,986 |
@ApiMethod(name = "getGareByCode", httpMethod = ApiMethod.HttpMethod.GET, path = "getGareByCode")
public Gare getGareByCode(@Named("codeUIC") Integer codeUIC) {
return GareRepository.getInstance().findGareByCode(codeUIC);
} | @ApiMethod(name = STR, httpMethod = ApiMethod.HttpMethod.GET, path = STR) Gare function(@Named(STR) Integer codeUIC) { return GareRepository.getInstance().findGareByCode(codeUIC); } | /**
* Recherche une gare par son codeUIC
*
* @param codeUIC
* le codeUIC d'une gare
* @return la gare ou null
*/ | Recherche une gare par son codeUIC | getGareByCode | {
"repo_name": "Mag-Stellon/dar-transilienupmc",
"path": "src/main/java/com/upmc/transilien/v1/endPoint/GaresEndPoint.java",
"license": "apache-2.0",
"size": 1838
} | [
"com.google.api.server.spi.config.ApiMethod",
"com.google.api.server.spi.config.Named",
"com.upmc.transilien.v1.model.Gare",
"com.upmc.transilien.v1.repository.GareRepository"
] | import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.config.Named; import com.upmc.transilien.v1.model.Gare; import com.upmc.transilien.v1.repository.GareRepository; | import com.google.api.server.spi.config.*; import com.upmc.transilien.v1.model.*; import com.upmc.transilien.v1.repository.*; | [
"com.google.api",
"com.upmc.transilien"
] | com.google.api; com.upmc.transilien; | 866,804 |
protected weka.classifiers.Classifier getBestClassifier(weka.classifiers.Classifier template, weka.classifiers.Classifier trained) {
weka.classifiers.Classifier result;
result = template;
if (m_OutputBestSetup && (m_Folds < 2)) {
try {
if (trained instanceof GridSearch)
result = ObjectC... | weka.classifiers.Classifier function(weka.classifiers.Classifier template, weka.classifiers.Classifier trained) { weka.classifiers.Classifier result; result = template; if (m_OutputBestSetup && (m_Folds < 2)) { try { if (trained instanceof GridSearch) result = ObjectCopyHelper.copyObject(((GridSearch) trained).getBestC... | /**
* In case of GridSearch/MultiSearch the best setup is returned, otherwise
* the classifier itself.
*
* @param template the template classifier
* @param trained the trained classifier
* @return either the best classifier (in case of GridSearch/MultiSearch) or the template
*/ | In case of GridSearch/MultiSearch the best setup is returned, otherwise the classifier itself | getBestClassifier | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-weka/src/main/java/adams/flow/transformer/WekaClassifierRanker.java",
"license": "gpl-3.0",
"size": 35983
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,642,824 |
List<T> list = new LinkedList<T>(coll);
Collections.sort(list, new UComp<T>());
return list;
} | List<T> list = new LinkedList<T>(coll); Collections.sort(list, new UComp<T>()); return list; } | /** Returns a list containing all the objects from a collection,
in increasing lexicographic order of their string
representations. */ | Returns a list containing all the objects from a collection | sortedCollection | {
"repo_name": "protegeproject/jpaul",
"path": "src/main/java/jpaul/Misc/Debug.java",
"license": "bsd-3-clause",
"size": 1865
} | [
"java.util.Collections",
"java.util.LinkedList",
"java.util.List"
] | import java.util.Collections; import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 579,754 |
@Test
public void setValueAtNotEditable()
{
final String expected = "a";
Object result = _tableModel.getValueAt(0, 1);
assertThat(result, instanceOf(String.class));
assertThat((String)result, is(expected));
// This call fails (silently) because the cell is not edita... | void function() { final String expected = "a"; Object result = _tableModel.getValueAt(0, 1); assertThat(result, instanceOf(String.class)); assertThat((String)result, is(expected)); _tableModel.setValueAt(STR, 0, 1); result = _tableModel.getValueAt(0, 1); assertThat(result, instanceOf(String.class)); assertThat((String)... | /**
* Test the <code>setValueAt()</code> method.
*/ | Test the <code>setValueAt()</code> method | setValueAtNotEditable | {
"repo_name": "jmthompson2015/rivalry",
"path": "swingui/src/test/java/org/rivalry/swingui/table/CriterionTableModelTest.java",
"license": "mit",
"size": 4617
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 2,873,765 |
public static String abbreviate(String str, int max) {
str = str.trim();
int len = str.length();
int suffixlength = 20;
if (len <= max) {
return str;
}
suffixlength = Math.min(suffixlength, (max - 3) / 2);
String rev = StringUtils.reverse(str);
// get the last few words
S... | static String function(String str, int max) { str = str.trim(); int len = str.length(); int suffixlength = 20; if (len <= max) { return str; } suffixlength = Math.min(suffixlength, (max - 3) / 2); String rev = StringUtils.reverse(str); String suffix = WordUtils.abbreviate(rev, 0, suffixlength, STR"; public static enum ... | /**
* convert "From src insert blah blah" to "From src insert ... blah"
*/ | convert "From src insert blah blah" to "From src insert ... blah" | abbreviate | {
"repo_name": "WANdisco/amplab-hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java",
"license": "apache-2.0",
"size": 137553
} | [
"org.apache.commons.lang.StringUtils",
"org.apache.commons.lang.WordUtils"
] | import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.WordUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,089,231 |
public boolean find(boolean update) {
BasicDBList list = new BasicDBList();
for (Object pk : getPK()) {
if (pk instanceof String) {
String pks = (String) pk;
if (getField(pks) != null) {
list.add(new BasicDBObject(pks, getField(pks)));
}
} else if (pk instanceof Integer) {
Integer pk... | boolean function(boolean update) { BasicDBList list = new BasicDBList(); for (Object pk : getPK()) { if (pk instanceof String) { String pks = (String) pk; if (getField(pks) != null) { list.add(new BasicDBObject(pks, getField(pks))); } } else if (pk instanceof Integer) { Integer pks = (Integer) pk; if (getField(pks) != ... | /**
* Query a object based on the list of PKs.
*
* @param update update object case found.
* @return true case the object is found.
*/ | Query a object based on the list of PKs | find | {
"repo_name": "AKSW/LODVader",
"path": "src/main/java/lodVader/mongodb/DBSuperClass2.java",
"license": "apache-2.0",
"size": 9085
} | [
"com.mongodb.BasicDBList",
"com.mongodb.BasicDBObject",
"com.mongodb.DBCursor"
] | import com.mongodb.BasicDBList; import com.mongodb.BasicDBObject; import com.mongodb.DBCursor; | import com.mongodb.*; | [
"com.mongodb"
] | com.mongodb; | 293,299 |
public synchronized OServerAdmin copyDatabase(final String databaseName, final String iDatabaseUserName,
final String iDatabaseUserPassword, final String iRemoteName, final String iRemoteEngine) throws IOException {
try {
final OChannelBinaryAsynchClient network = storage.beginRequest(OChannelB... | synchronized OServerAdmin function(final String databaseName, final String iDatabaseUserName, final String iDatabaseUserPassword, final String iRemoteName, final String iRemoteEngine) throws IOException { try { final OChannelBinaryAsynchClient network = storage.beginRequest(OChannelBinaryProtocol.REQUEST_DB_COPY); try ... | /**
* Copies a database to a remote server instance.
*
* @param databaseName
* @param iDatabaseUserName
* @param iDatabaseUserPassword
* @param iRemoteName
* @param iRemoteEngine
* @return The instance itself. Useful to execute method in chain
* @throws IOException
*/ | Copies a database to a remote server instance | copyDatabase | {
"repo_name": "sanyaade-g2g-repos/orientdb",
"path": "client/src/main/java/com/orientechnologies/orient/client/remote/OServerAdmin.java",
"license": "apache-2.0",
"size": 20090
} | [
"com.orientechnologies.common.log.OLogManager",
"com.orientechnologies.orient.core.exception.OStorageException",
"com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient",
"com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryProtocol",
"java.io.IOException"
] | import com.orientechnologies.common.log.OLogManager; import com.orientechnologies.orient.core.exception.OStorageException; import com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient; import com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryProtocol; import java.io.IOExce... | import com.orientechnologies.common.log.*; import com.orientechnologies.orient.core.exception.*; import com.orientechnologies.orient.enterprise.channel.binary.*; import java.io.*; | [
"com.orientechnologies.common",
"com.orientechnologies.orient",
"java.io"
] | com.orientechnologies.common; com.orientechnologies.orient; java.io; | 2,051,889 |
private Boolean locateNonStrictModuleArtifact(Module module, String sha1, String md5) {
List<Artifact> artifacts = module.getArtifacts();
if (artifacts != null) {
for (Artifact artifact : artifacts) {
String artifactSha1 = artifact.getSha1();
String artifa... | Boolean function(Module module, String sha1, String md5) { List<Artifact> artifacts = module.getArtifacts(); if (artifacts != null) { for (Artifact artifact : artifacts) { String artifactSha1 = artifact.getSha1(); String artifactMd5 = artifact.getMd5(); if (isArtifactMatch(sha1, md5, artifactSha1, artifactMd5)) { retur... | /**
* Locates the given modules produced artifact
*
* @param module Module to extract artifact from
* @return Repo path of produced artifact if found. Null if not
*/ | Locates the given modules produced artifact | locateNonStrictModuleArtifact | {
"repo_name": "alancnet/artifactory",
"path": "web/rest-ui/src/main/java/org/artifactory/ui/rest/service/artifacts/browse/treebrowser/tabs/builds/GetArtifactBuildsService.java",
"license": "apache-2.0",
"size": 10066
} | [
"java.util.List",
"org.jfrog.build.api.Artifact",
"org.jfrog.build.api.Module"
] | import java.util.List; import org.jfrog.build.api.Artifact; import org.jfrog.build.api.Module; | import java.util.*; import org.jfrog.build.api.*; | [
"java.util",
"org.jfrog.build"
] | java.util; org.jfrog.build; | 2,319,081 |
protected List<SolutionStep> findAllHiddenXle() {
sudoku = finder.getSudoku();
List<SolutionStep> oldList = steps;
List<SolutionStep> newList = new ArrayList<SolutionStep>();
steps = newList;
List<SolutionStep> tmpSteps = findAllHiddenSingles();
steps.addAll(tmpSteps)... | List<SolutionStep> function() { sudoku = finder.getSudoku(); List<SolutionStep> oldList = steps; List<SolutionStep> newList = new ArrayList<SolutionStep>(); steps = newList; List<SolutionStep> tmpSteps = findAllHiddenSingles(); steps.addAll(tmpSteps); for (int i = 2; i <= 4; i++) { findHiddenXleInEntity(2 * Sudoku2.UNI... | /**
* Find all Hidden Subsets in the grid.
* @return
*/ | Find all Hidden Subsets in the grid | findAllHiddenXle | {
"repo_name": "mbraeunlein/ExtendedHodoku",
"path": "src/solver/SimpleSolver.java",
"license": "gpl-3.0",
"size": 46044
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,153,101 |
public void install()
{
// the manager is needed by both the participant or the coordinator recovery modules so whichever
// one gets there first creates it. No synchronization is needed as modules are only ever
// installed in a single thread
if (!XTSBARecoveryManagerImple.isRec... | void function() { if (!XTSBARecoveryManagerImple.isRecoveryManagerInitialised()) { XTSBARecoveryManager baRecoveryManager = new XTSBARecoveryManagerImple(_recoveryStore); XTSBARecoveryManager.setRecoveryManager(baRecoveryManager); } Implementations.install(); } | /**
* called by the service startup code before the recovery module is added to the recovery managers
* module list
*/ | called by the service startup code before the recovery module is added to the recovery managers module list | install | {
"repo_name": "nmcl/scratch",
"path": "graalvm/transactions/fork/narayana/XTS/recovery/src/org/jboss/jbossts/xts/recovery/coordinator/ba/BACoordinatorRecoveryModule.java",
"license": "apache-2.0",
"size": 10472
} | [
"org.jboss.jbossts.xts.recovery.participant.ba.XTSBARecoveryManager",
"org.jboss.jbossts.xts.recovery.participant.ba.XTSBARecoveryManagerImple"
] | import org.jboss.jbossts.xts.recovery.participant.ba.XTSBARecoveryManager; import org.jboss.jbossts.xts.recovery.participant.ba.XTSBARecoveryManagerImple; | import org.jboss.jbossts.xts.recovery.participant.ba.*; | [
"org.jboss.jbossts"
] | org.jboss.jbossts; | 1,873,204 |
@Test
public void testUpdateInstructionsFinishedSoFar_1() throws Exception {
RdaCloudlet cloudlet = new RdaCloudlet(1, 1, 1L, 1L, "src/test/resources/input1.csv",
false);
cloudlet.setInstructionsFinishedSoFar(1L);
long instructionsFinishedSoFar = 2L;
cloudlet.updateInstructionsFinishedSoFar(in... | void function() throws Exception { RdaCloudlet cloudlet = new RdaCloudlet(1, 1, 1L, 1L, STR, false); cloudlet.setInstructionsFinishedSoFar(1L); long instructionsFinishedSoFar = 2L; cloudlet.updateInstructionsFinishedSoFar(instructionsFinishedSoFar); assertEquals(3, cloudlet.getInstructionsFinishedSoFar(), 0); } | /**
* Run the void updateInstructionsFinishedSoFar(long) method test.
*
* @throws Exception
*
* @generatedBy CodePro at 5/11/15 10:59 AM
*/ | Run the void updateInstructionsFinishedSoFar(long) method test | testUpdateInstructionsFinishedSoFar_1 | {
"repo_name": "pattad/cloudsim-rda",
"path": "src/test/java/ch/uzh/ifi/csg/cloudsim/rda/RdaCloudletTest.java",
"license": "gpl-2.0",
"size": 16697
} | [
"ch.uzh.ifi.csg.cloudsim.rda.RdaCloudlet",
"org.junit.Assert"
] | import ch.uzh.ifi.csg.cloudsim.rda.RdaCloudlet; import org.junit.Assert; | import ch.uzh.ifi.csg.cloudsim.rda.*; import org.junit.*; | [
"ch.uzh.ifi",
"org.junit"
] | ch.uzh.ifi; org.junit; | 1,841,901 |
public static String getDetailType(CmsObject cms, CmsResource detailPage, CmsResource parentFolder) {
String type = null;
try {
if (OpenCms.getADEManager().isDetailPage(cms, detailPage)) {
List<CmsDetailPageInfo> detailPages = OpenCms.getADEManager().getRawDetailPages(cm... | static String function(CmsObject cms, CmsResource detailPage, CmsResource parentFolder) { String type = null; try { if (OpenCms.getADEManager().isDetailPage(cms, detailPage)) { List<CmsDetailPageInfo> detailPages = OpenCms.getADEManager().getRawDetailPages(cms); if (parentFolder == null) { parentFolder = cms.readParent... | /**
* Returns the detail content type for container pages that may be detail pages.<p>
*
* @param cms the cms context
* @param detailPage the container page resource
* @param parentFolder the parent folder or <code>null</code>
*
* @return the detail content type
*/ | Returns the detail content type for container pages that may be detail pages | getDetailType | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/ui/components/CmsResourceIcon.java",
"license": "lgpl-2.1",
"size": 19666
} | [
"java.util.List",
"org.opencms.ade.detailpage.CmsDetailPageInfo",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsResource",
"org.opencms.main.CmsException",
"org.opencms.main.OpenCms",
"org.opencms.xml.containerpage.CmsXmlDynamicFunctionHandler"
] | import java.util.List; import org.opencms.ade.detailpage.CmsDetailPageInfo; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.xml.containerpage.CmsXmlDynamicFunctionHandler; | import java.util.*; import org.opencms.ade.detailpage.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.xml.containerpage.*; | [
"java.util",
"org.opencms.ade",
"org.opencms.file",
"org.opencms.main",
"org.opencms.xml"
] | java.util; org.opencms.ade; org.opencms.file; org.opencms.main; org.opencms.xml; | 2,762,306 |
@SuppressWarnings("unchecked")
public HashMap<String, String> getTestMap() {
//return testMap;
return (HashMap<String, String>) testMap.clone();
}
public FinalClassExample(int i, String n, HashMap<String,String> hm){
System.out.println("Performing Deep Copy for Object initialization");
this.id=i;
t... | @SuppressWarnings(STR) HashMap<String, String> function() { return (HashMap<String, String>) testMap.clone(); } public FinalClassExample(int i, String n, HashMap<String,String> hm){ System.out.println(STR); this.id=i; this.name=n; HashMap<String,String> tempMap=new HashMap<String,String>(); String key; Iterator<String>... | /**
* Accessor function for mutable objects
*/ | Accessor function for mutable objects | getTestMap | {
"repo_name": "thekant/myCodeRepo",
"path": "src/com/kant/design/patterns/classes/FinalClassExample.java",
"license": "mit",
"size": 2594
} | [
"java.util.HashMap",
"java.util.Iterator"
] | import java.util.HashMap; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,124,889 |
ServiceResponse<Void> getSwaggerQueryValid(String q1) throws ErrorException, IOException; | ServiceResponse<Void> getSwaggerQueryValid(String q1) throws ErrorException, IOException; | /**
* Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3'.
*
* @param q1 An unencoded query parameter with value 'value1&q2=value2&q3=value3'. Possible values for this parameter include: 'value1&q2=value2&q3=value3'
* @throws ErrorException excep... | Get method with unencoded query parameter with value 'value1&q2=value2&q3=value3' | getSwaggerQueryValid | {
"repo_name": "vulcansteel/autorest",
"path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/azurespecials/SkipUrlEncodingOperations.java",
"license": "mit",
"size": 10406
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 2,674,912 |
public RexLiteral makeApproxLiteral(BigDecimal bd, RelDataType type) {
assert SqlTypeFamily.APPROXIMATE_NUMERIC.getTypeNames().contains(
type.getSqlTypeName());
return makeLiteral(bd, type, SqlTypeName.DOUBLE);
} | RexLiteral function(BigDecimal bd, RelDataType type) { assert SqlTypeFamily.APPROXIMATE_NUMERIC.getTypeNames().contains( type.getSqlTypeName()); return makeLiteral(bd, type, SqlTypeName.DOUBLE); } | /**
* Creates an approximate numeric literal (double or float).
*
* @param bd literal value
* @param type approximate numeric type
* @return new literal
*/ | Creates an approximate numeric literal (double or float) | makeApproxLiteral | {
"repo_name": "b-slim/calcite",
"path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java",
"license": "apache-2.0",
"size": 51633
} | [
"java.math.BigDecimal",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.sql.type.SqlTypeFamily",
"org.apache.calcite.sql.type.SqlTypeName"
] | import java.math.BigDecimal; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.sql.type.SqlTypeFamily; import org.apache.calcite.sql.type.SqlTypeName; | import java.math.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.type.*; | [
"java.math",
"org.apache.calcite"
] | java.math; org.apache.calcite; | 1,209,849 |
public void valueChanged(ListSelectionEvent e) {
if (!e.getValueIsAdjusting()) {
JList list = (JList) e.getSource();
PreferencesCategory selectedCategory =
(PreferencesCategory) list.getSelectedValue();
if (!builtForms.contains(selectedCategory.getCategor... | void function(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { JList list = (JList) e.getSource(); PreferencesCategory selectedCategory = (PreferencesCategory) list.getSelectedValue(); if (!builtForms.contains(selectedCategory.getCategoryID())) { PreferencesForm form = new PreferencesForm(selectedCategory); form... | /**
* Called when the category is changed
*/ | Called when the category is changed | valueChanged | {
"repo_name": "superzadeh/processdash",
"path": "src/net/sourceforge/processdash/tool/prefs/PreferencesDialog.java",
"license": "gpl-3.0",
"size": 14258
} | [
"java.awt.CardLayout",
"javax.swing.JList",
"javax.swing.event.ListSelectionEvent",
"net.sourceforge.processdash.DashboardContext"
] | import java.awt.CardLayout; import javax.swing.JList; import javax.swing.event.ListSelectionEvent; import net.sourceforge.processdash.DashboardContext; | import java.awt.*; import javax.swing.*; import javax.swing.event.*; import net.sourceforge.processdash.*; | [
"java.awt",
"javax.swing",
"net.sourceforge.processdash"
] | java.awt; javax.swing; net.sourceforge.processdash; | 2,086,985 |
@ApiModelProperty(example = "null", value = "")
public List<OntologyItem> getServiceClasses() {
return serviceClasses;
} | @ApiModelProperty(example = "null", value = "") List<OntologyItem> function() { return serviceClasses; } | /**
* Get serviceClasses
* @return serviceClasses
**/ | Get serviceClasses | getServiceClasses | {
"repo_name": "Metatavu/kunta-api-spec",
"path": "java-client-generated/src/main/java/fi/metatavu/kuntaapi/client/model/Service.java",
"license": "agpl-3.0",
"size": 24169
} | [
"fi.metatavu.kuntaapi.client.model.OntologyItem",
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import fi.metatavu.kuntaapi.client.model.OntologyItem; import io.swagger.annotations.ApiModelProperty; import java.util.List; | import fi.metatavu.kuntaapi.client.model.*; import io.swagger.annotations.*; import java.util.*; | [
"fi.metatavu.kuntaapi",
"io.swagger.annotations",
"java.util"
] | fi.metatavu.kuntaapi; io.swagger.annotations; java.util; | 1,937,680 |
public static Pointer getStdin() {
return Utils.get_stdin();
} | static Pointer function() { return Utils.get_stdin(); } | /**
* Obtain stdin FILE* stream.
*
* @return stdin FILE* stream
*/ | Obtain stdin FILE* stream | getStdin | {
"repo_name": "liyi-david/ePMC",
"path": "plugins/util/src/main/java/epmc/util/JNATools.java",
"license": "gpl-3.0",
"size": 11655
} | [
"com.sun.jna.Pointer"
] | import com.sun.jna.Pointer; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 2,450,818 |
public Date getCreateDate(){
Object value = this.source.getProperty( ModuleProperties.CREATE_DATE);
if( value == null )
return Calendar.getInstance().getTime();
return ( Date )value;
}
| Date function(){ Object value = this.source.getProperty( ModuleProperties.CREATE_DATE); if( value == null ) return Calendar.getInstance().getTime(); return ( Date )value; } | /**
* Get the create date
*/ | Get the create date | getCreateDate | {
"repo_name": "chaupal/jp2p",
"path": "Workspace/net.jp2p.container/src/net/jp2p/container/activator/AbstractJp2pService.java",
"license": "apache-2.0",
"size": 5006
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,718,268 |
public void playerLoggedOut(EntityPlayerMP playerIn)
{
playerIn.triggerAchievement(StatList.leaveGameStat);
this.writePlayerData(playerIn);
WorldServer var2 = playerIn.getServerForPlayer();
if (playerIn.ridingEntity != null)
{
var2.removePlayerEntityDangerous... | void function(EntityPlayerMP playerIn) { playerIn.triggerAchievement(StatList.leaveGameStat); this.writePlayerData(playerIn); WorldServer var2 = playerIn.getServerForPlayer(); if (playerIn.ridingEntity != null) { var2.removePlayerEntityDangerously(playerIn.ridingEntity); logger.debug(STR); } var2.removeEntity(playerIn)... | /**
* Called when a player disconnects from the game. Writes player data to disk and removes them from the world.
*/ | Called when a player disconnects from the game. Writes player data to disk and removes them from the world | playerLoggedOut | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/server/management/ServerConfigurationManager.java",
"license": "mit",
"size": 39517
} | [
"net.minecraft.entity.player.EntityPlayerMP",
"net.minecraft.network.play.server.S38PacketPlayerListItem",
"net.minecraft.stats.StatList",
"net.minecraft.world.WorldServer"
] | import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.play.server.S38PacketPlayerListItem; import net.minecraft.stats.StatList; import net.minecraft.world.WorldServer; | import net.minecraft.entity.player.*; import net.minecraft.network.play.server.*; import net.minecraft.stats.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.network",
"net.minecraft.stats",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.network; net.minecraft.stats; net.minecraft.world; | 1,973,088 |
@UiThreadTest
public void testPush() {
GithubEvent event = createEvent(EventType.PushEvent);
PushEventPayload payload = new PushEventPayload();
payload.ref = "refs/heads/master";
event.payload = payload;
updateView(event);
verify("user pushed to master at user/re... | void function() { GithubEvent event = createEvent(EventType.PushEvent); PushEventPayload payload = new PushEventPayload(); payload.ref = STR; event.payload = payload; updateView(event); verify(STR); } | /**
* Verify text of push event
*/ | Verify text of push event | testPush | {
"repo_name": "marceloneil/PocketHub",
"path": "app/src/androidTest/java/com/github/pockethub/tests/NewsEventTextTest.java",
"license": "apache-2.0",
"size": 9525
} | [
"com.alorma.github.sdk.bean.dto.response.GithubEvent",
"com.alorma.github.sdk.bean.dto.response.events.EventType",
"com.alorma.github.sdk.bean.dto.response.events.payload.PushEventPayload"
] | import com.alorma.github.sdk.bean.dto.response.GithubEvent; import com.alorma.github.sdk.bean.dto.response.events.EventType; import com.alorma.github.sdk.bean.dto.response.events.payload.PushEventPayload; | import com.alorma.github.sdk.bean.dto.response.*; import com.alorma.github.sdk.bean.dto.response.events.*; import com.alorma.github.sdk.bean.dto.response.events.payload.*; | [
"com.alorma.github"
] | com.alorma.github; | 1,227,337 |
@Override
protected LI_Source wrap(final Source metadata) {
return new LI_Source(metadata);
} | LI_Source function(final Source metadata) { return new LI_Source(metadata); } | /**
* Invoked by {@link PropertyType} at marshalling time for wrapping the given metadata value
* in a {@code <gmd:LI_Source>} XML element.
*
* @param metadata the metadata element to marshall.
* @return a {@code PropertyType} wrapping the given the metadata element.
*/ | Invoked by <code>PropertyType</code> at marshalling time for wrapping the given metadata value in a XML element | wrap | {
"repo_name": "Geomatys/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/LI_Source.java",
"license": "apache-2.0",
"size": 3147
} | [
"org.opengis.metadata.lineage.Source"
] | import org.opengis.metadata.lineage.Source; | import org.opengis.metadata.lineage.*; | [
"org.opengis.metadata"
] | org.opengis.metadata; | 202,686 |
@Test
public void testRegisteredPrefix() throws Exception {
Log.info(Log.FAC_TEST, "Starting testRegisteredPrefix");
TestInterestHandler tfl = new TestInterestHandler();
TestContentHandler tl = new TestContentHandler();
ContentName testName1 = new ContentName(testPrefix, "foo");
Interest interest1 = new... | void function() throws Exception { Log.info(Log.FAC_TEST, STR); TestInterestHandler tfl = new TestInterestHandler(); TestContentHandler tl = new TestContentHandler(); ContentName testName1 = new ContentName(testPrefix, "foo"); Interest interest1 = new Interest(testName1); ContentName testName2 = new ContentName(testNam... | /**
* Partially test prefix registration/deregistration
* @throws Exception
*/ | Partially test prefix registration/deregistration | testRegisteredPrefix | {
"repo_name": "MobileCloudNetworking/icnaas",
"path": "mcn-ccn-router/ccnx-0.8.2/javasrc/src/systemtest/org/ccnx/ccn/impl/NetworkTest.java",
"license": "apache-2.0",
"size": 13810
} | [
"java.util.ArrayList",
"java.util.concurrent.TimeUnit",
"org.ccnx.ccn.impl.support.Log",
"org.ccnx.ccn.protocol.ContentName",
"org.ccnx.ccn.protocol.Interest",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.concurrent.TimeUnit; import org.ccnx.ccn.impl.support.Log; import org.ccnx.ccn.protocol.ContentName; import org.ccnx.ccn.protocol.Interest; import org.junit.Assert; | import java.util.*; import java.util.concurrent.*; import org.ccnx.ccn.impl.support.*; import org.ccnx.ccn.protocol.*; import org.junit.*; | [
"java.util",
"org.ccnx.ccn",
"org.junit"
] | java.util; org.ccnx.ccn; org.junit; | 2,310,041 |
public void setLocation(Location location) {
this.location = location;
} | void function(Location location) { this.location = location; } | /**
* Sets the location to search around. Either the location or the search text (or both) must be specified.
*
* @param location the Location to search around
*/ | Sets the location to search around. Either the location or the search text (or both) must be specified | setLocation | {
"repo_name": "jonathangerbaud/Klyph",
"path": "Klyph/src/com/facebook/widget/KlyphPlacePickerFragment.java",
"license": "mit",
"size": 22294
} | [
"android.location.Location"
] | import android.location.Location; | import android.location.*; | [
"android.location"
] | android.location; | 298,232 |
public static IAtom getClosestAtom(int xPosition, int yPosition, IAtomContainer atomCon) {
IAtom closestAtom = null;
IAtom currentAtom;
double smallestMouseDistance = -1;
double mouseDistance;
double atomX;
double atomY;
for (int i = 0; i < atomCon.getAtomCoun... | static IAtom function(int xPosition, int yPosition, IAtomContainer atomCon) { IAtom closestAtom = null; IAtom currentAtom; double smallestMouseDistance = -1; double mouseDistance; double atomX; double atomY; for (int i = 0; i < atomCon.getAtomCount(); i++) { currentAtom = atomCon.getAtom(i); atomX = currentAtom.getPoin... | /**
* Returns the atom of the given molecule that is closest to the given
* coordinates. See comment for center(IAtomContainer atomCon, Dimension
* areaDim, HashMap renderingCoordinates) for details on coordinate sets
*
* @param xPosition The x coordinate
* @param yPosition The y coordinat... | Returns the atom of the given molecule that is closest to the given coordinates. See comment for center(IAtomContainer atomCon, Dimension areaDim, HashMap renderingCoordinates) for details on coordinate sets | getClosestAtom | {
"repo_name": "asad/ReactionDecoder",
"path": "src/main/java/uk/ac/ebi/reactionblast/graphics/direct/GeometryTools.java",
"license": "lgpl-3.0",
"size": 74105
} | [
"org.openscience.cdk.interfaces.IAtom",
"org.openscience.cdk.interfaces.IAtomContainer"
] | import org.openscience.cdk.interfaces.IAtom; import org.openscience.cdk.interfaces.IAtomContainer; | import org.openscience.cdk.interfaces.*; | [
"org.openscience.cdk"
] | org.openscience.cdk; | 1,744,158 |
public List<ConnectionMonitorOutput> outputs() {
return this.outputs;
} | List<ConnectionMonitorOutput> function() { return this.outputs; } | /**
* Get list of connection monitor outputs.
*
* @return the outputs value
*/ | Get list of connection monitor outputs | outputs | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/ConnectionMonitorResultInner.java",
"license": "mit",
"size": 10417
} | [
"com.microsoft.azure.management.network.v2020_04_01.ConnectionMonitorOutput",
"java.util.List"
] | import com.microsoft.azure.management.network.v2020_04_01.ConnectionMonitorOutput; import java.util.List; | import com.microsoft.azure.management.network.v2020_04_01.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 482,511 |
public void setOctetCodec(OctetCodec octetCodec) {
this.octetCodec = octetCodec;
} | void function(OctetCodec octetCodec) { this.octetCodec = octetCodec; } | /**
* Sets the OctetCodec instance used for encoding OCTET.
*
* @param octetCodec
* the OctetCodec instance used for encoding OCTET
*/ | Sets the OctetCodec instance used for encoding OCTET | setOctetCodec | {
"repo_name": "pires/openj21",
"path": "src/main/java/net/openj21/mih/protocol/codec/GenericEncoder.java",
"license": "apache-2.0",
"size": 18798
} | [
"net.openj21.mih.protocol.codec.basic.OctetCodec"
] | import net.openj21.mih.protocol.codec.basic.OctetCodec; | import net.openj21.mih.protocol.codec.basic.*; | [
"net.openj21.mih"
] | net.openj21.mih; | 2,210,457 |
private void doJazziness(View item, int position, int scrollDirection) {
if (mIsScrolling) {
if (mOnlyAnimateNewItems && mAlreadyAnimatedItems.contains(position))
return;
if (mOnlyAnimateOnFling && !mIsFlingEvent)
return;
if (mMaxVelocity... | void function(View item, int position, int scrollDirection) { if (mIsScrolling) { if (mOnlyAnimateNewItems && mAlreadyAnimatedItems.contains(position)) return; if (mOnlyAnimateOnFling && !mIsFlingEvent) return; if (mMaxVelocity > MAX_VELOCITY_OFF && mMaxVelocity < mSpeed) return; if (mSimulateGridWithList) { ViewGroup ... | /**
* Initializes the item view and triggers the animation.
*
* @param item The view to be animated.
* @param position The index of the view in the list.
* @param scrollDirection Positive number indicating scrolling down, or negative number indicating scrolling up.
*/ | Initializes the item view and triggers the animation | doJazziness | {
"repo_name": "lonfen1108/Coding-Android-master",
"path": "scrollanimationlibrary/src/main/java/com/twotoasters/jazzylistview/JazzyHelper.java",
"license": "mit",
"size": 12125
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 1,315,252 |
public static @Nullable String getViewIdText(AccessibilityNodeInfoCompat node) {
if (node == null) {
return null;
}
String resourceName = node.getViewIdResourceName();
if (resourceName == null) {
return null;
}
String[] parsedResourceName = RESOURCE_NAME_SPLIT_PATTERN.split(resou... | static @Nullable String function(AccessibilityNodeInfoCompat node) { if (node == null) { return null; } String resourceName = node.getViewIdResourceName(); if (resourceName == null) { return null; } String[] parsedResourceName = RESOURCE_NAME_SPLIT_PATTERN.split(resourceName, 2); if (parsedResourceName.length != 2 Text... | /**
* Gets the textual representation of the view ID that can be used when no custom label is
* available. For better readability/listenability, the "_" characters are replaced with spaces.
*
* @param node The node
* @return Readable text of the view Id
*/ | Gets the textual representation of the view ID that can be used when no custom label is available. For better readability/listenability, the "_" characters are replaced with spaces | getViewIdText | {
"repo_name": "google/talkback",
"path": "utils/src/main/java/com/google/android/accessibility/utils/AccessibilityNodeInfoUtils.java",
"license": "apache-2.0",
"size": 105305
} | [
"android.text.TextUtils",
"androidx.core.view.accessibility.AccessibilityNodeInfoCompat",
"org.checkerframework.checker.nullness.qual.Nullable"
] | import android.text.TextUtils; import androidx.core.view.accessibility.AccessibilityNodeInfoCompat; import org.checkerframework.checker.nullness.qual.Nullable; | import android.text.*; import androidx.core.view.accessibility.*; import org.checkerframework.checker.nullness.qual.*; | [
"android.text",
"androidx.core",
"org.checkerframework.checker"
] | android.text; androidx.core; org.checkerframework.checker; | 1,400,553 |
boolean refreshMuteState() {
boolean oldMuteState = mIsMuted;
mIsMuted = mAudioManager.isStreamMute(mStreamType);
if (DEBUG_LEVEL >= 2) Log.i(TAG, "refresh: muted=" + mIsMuted);
return oldMuteState != mIsMuted;
}
private final int mStreamType;
... | boolean refreshMuteState() { boolean oldMuteState = mIsMuted; mIsMuted = mAudioManager.isStreamMute(mStreamType); if (DEBUG_LEVEL >= 2) Log.i(TAG, STR + mIsMuted); return oldMuteState != mIsMuted; } private final int mStreamType; private final float mMaxVolumeIndexAsFloat; private int mMinVolumeIndex; float mVolumeInde... | /** Refreshes the stored mute state by reading it from AudioManager.
* Returns true if the state changed, false otherwise. */ | Refreshes the stored mute state by reading it from AudioManager | refreshMuteState | {
"repo_name": "chromium/chromium",
"path": "chromecast/media/cma/backend/android/java/src/org/chromium/chromecast/cma/backend/android/VolumeControl.java",
"license": "bsd-3-clause",
"size": 12007
} | [
"android.content.BroadcastReceiver",
"android.content.Context",
"android.media.AudioManager",
"android.util.SparseArray",
"android.util.SparseIntArray",
"org.chromium.base.Log",
"org.chromium.chromecast.media.AudioContentType"
] | import android.content.BroadcastReceiver; import android.content.Context; import android.media.AudioManager; import android.util.SparseArray; import android.util.SparseIntArray; import org.chromium.base.Log; import org.chromium.chromecast.media.AudioContentType; | import android.content.*; import android.media.*; import android.util.*; import org.chromium.base.*; import org.chromium.chromecast.media.*; | [
"android.content",
"android.media",
"android.util",
"org.chromium.base",
"org.chromium.chromecast"
] | android.content; android.media; android.util; org.chromium.base; org.chromium.chromecast; | 573,103 |
public void testPublicCloneable() {
XYSeriesCollection c1 = new XYSeriesCollection();
assertTrue(c1 instanceof PublicCloneable);
} | void function() { XYSeriesCollection c1 = new XYSeriesCollection(); assertTrue(c1 instanceof PublicCloneable); } | /**
* Verify that this class implements {@link PublicCloneable}.
*/ | Verify that this class implements <code>PublicCloneable</code> | testPublicCloneable | {
"repo_name": "integrated/jfreechart",
"path": "tests/org/jfree/data/xy/junit/XYSeriesCollectionTests.java",
"license": "lgpl-2.1",
"size": 8569
} | [
"org.jfree.data.xy.XYSeriesCollection",
"org.jfree.util.PublicCloneable"
] | import org.jfree.data.xy.XYSeriesCollection; import org.jfree.util.PublicCloneable; | import org.jfree.data.xy.*; import org.jfree.util.*; | [
"org.jfree.data",
"org.jfree.util"
] | org.jfree.data; org.jfree.util; | 254,930 |
public static String getPrintingLocale(Partner partner) {
if (partner != null) {
return Beans.get(PartnerServiceImpl.class).getPartnerLanguageCode(partner);
} else {
return Beans.get(UserService.class).getLanguage();
}
} | static String function(Partner partner) { if (partner != null) { return Beans.get(PartnerServiceImpl.class).getPartnerLanguageCode(partner); } else { return Beans.get(UserService.class).getLanguage(); } } | /**
* Get the language select for a partner or current connected user.
*
* @param partner The partner affected. You can pass a new partner to get the default partner
* language. If null, the user language is used.
* @return Partner language selected or User language if no partner is given. Otherwise,... | Get the language select for a partner or current connected user | getPrintingLocale | {
"repo_name": "axelor/axelor-business-suite",
"path": "axelor-base/src/main/java/com/axelor/apps/report/engine/ReportSettings.java",
"license": "agpl-3.0",
"size": 7548
} | [
"com.axelor.apps.base.db.Partner",
"com.axelor.apps.base.service.PartnerServiceImpl",
"com.axelor.apps.base.service.user.UserService",
"com.axelor.inject.Beans"
] | import com.axelor.apps.base.db.Partner; import com.axelor.apps.base.service.PartnerServiceImpl; import com.axelor.apps.base.service.user.UserService; import com.axelor.inject.Beans; | import com.axelor.apps.base.db.*; import com.axelor.apps.base.service.*; import com.axelor.apps.base.service.user.*; import com.axelor.inject.*; | [
"com.axelor.apps",
"com.axelor.inject"
] | com.axelor.apps; com.axelor.inject; | 1,214,020 |
public Byte[] getValueAsByteObjectArray() {
return this.getIsNull() ? null : Base64.decodeAsByteObjectArray(this.value);
} | Byte[] function() { return this.getIsNull() ? null : Base64.decodeAsByteObjectArray(this.value); } | /**
* Gets the value of this {@link EntityProperty} as a <code>Byte</code> array.
*
* @return
* A <code>Byte[]</code> representation of the {@link EntityProperty} value, or <code>null</code>.
*/ | Gets the value of this <code>EntityProperty</code> as a <code>Byte</code> array | getValueAsByteObjectArray | {
"repo_name": "risezhang/azure-storage-cli",
"path": "src/main/java/com/microsoft/azure/storage/table/EntityProperty.java",
"license": "mit",
"size": 27532
} | [
"com.microsoft.azure.storage.core.Base64"
] | import com.microsoft.azure.storage.core.Base64; | import com.microsoft.azure.storage.core.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 275,058 |
void addTab(SlidingTabSpec newTab) {
BackgroundImage bgImg = new BackgroundImage(mContext, mNumTabs, newTab);
final int drawableWidth = bgImg.getDrawable().getIntrinsicWidth();
final int drawableHeight = bgImg.getDrawable().getIntrinsicHeight();
final int hPadding = Math.round((float)(mSeparationWidth ... | void addTab(SlidingTabSpec newTab) { BackgroundImage bgImg = new BackgroundImage(mContext, mNumTabs, newTab); final int drawableWidth = bgImg.getDrawable().getIntrinsicWidth(); final int drawableHeight = bgImg.getDrawable().getIntrinsicHeight(); final int hPadding = Math.round((float)(mSeparationWidth - drawableWidth) ... | /**
* Adds a new tab and sets the correct paddings defined by the
* separation width.
* @param newTab
*/ | Adds a new tab and sets the correct paddings defined by the separation width | addTab | {
"repo_name": "star-app/xbmc-remote-control",
"path": "src/org/xbmc/android/widget/slidingtabs/SlidingTabWidget.java",
"license": "gpl-2.0",
"size": 18709
} | [
"android.view.ViewGroup",
"android.widget.LinearLayout",
"org.xbmc.android.widget.slidingtabs.SlidingTabHost"
] | import android.view.ViewGroup; import android.widget.LinearLayout; import org.xbmc.android.widget.slidingtabs.SlidingTabHost; | import android.view.*; import android.widget.*; import org.xbmc.android.widget.slidingtabs.*; | [
"android.view",
"android.widget",
"org.xbmc.android"
] | android.view; android.widget; org.xbmc.android; | 210,757 |
@Override
public void logProcessingStage(MessageContext ctx, LoggingHandlerStage stage) throws ServiceException {
} | void function(MessageContext ctx, LoggingHandlerStage stage) throws ServiceException { } | /**
* Log processing stage.
*
* @param ctx
* the ctx
* @param stage
* the stage
* @throws ServiceException
* the service exception
* @see org.ebayopensource.turmeric.runtime.common.pipeline.LoggingHandler#logProcessingStage(org.ebayopensource.turmeric.... | Log processing stage | logProcessingStage | {
"repo_name": "ebayopensource/turmeric-runtime",
"path": "logging-handler-cassandra/src/main/java/org/ebayopensource/turmeric/runtime/error/cassandra/handler/CassandraErrorLoggingHandler.java",
"license": "apache-2.0",
"size": 12016
} | [
"org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException",
"org.ebayopensource.turmeric.runtime.common.pipeline.LoggingHandlerStage",
"org.ebayopensource.turmeric.runtime.common.pipeline.MessageContext"
] | import org.ebayopensource.turmeric.runtime.common.exceptions.ServiceException; import org.ebayopensource.turmeric.runtime.common.pipeline.LoggingHandlerStage; import org.ebayopensource.turmeric.runtime.common.pipeline.MessageContext; | import org.ebayopensource.turmeric.runtime.common.exceptions.*; import org.ebayopensource.turmeric.runtime.common.pipeline.*; | [
"org.ebayopensource.turmeric"
] | org.ebayopensource.turmeric; | 2,196,787 |
List<Field> result = Lists.newArrayList();
Class c = clazz;
while (c != null) {
for (Field declaredField : c.getDeclaredFields()) {
if (!Modifier.isPublic(declaredField.getModifiers())) {
if (forceAccess) {
declaredField.setAccessible(true);//NOSONAR only works from sufficien... | List<Field> result = Lists.newArrayList(); Class c = clazz; while (c != null) { for (Field declaredField : c.getDeclaredFields()) { if (!Modifier.isPublic(declaredField.getModifiers())) { if (forceAccess) { declaredField.setAccessible(true); } else { continue; } } result.add(declaredField); } c = c.getSuperclass(); } f... | /**
* Get accessible <code>Field</code> breaking scope if requested. Superclasses/interfaces are considered.
*
* @param clazz the class to reflect, must not be null
* @param forceAccess whether to break scope restrictions using the <code>setAccessible</code> method.
* <code>False... | Get accessible <code>Field</code> breaking scope if requested. Superclasses/interfaces are considered | getFields | {
"repo_name": "jmecosta/sonar",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils2.java",
"license": "lgpl-3.0",
"size": 2347
} | [
"com.google.common.collect.Lists",
"java.lang.reflect.Field",
"java.lang.reflect.Modifier",
"java.util.Collections",
"java.util.List",
"org.apache.commons.lang.ClassUtils"
] | import com.google.common.collect.Lists; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collections; import java.util.List; import org.apache.commons.lang.ClassUtils; | import com.google.common.collect.*; import java.lang.reflect.*; import java.util.*; import org.apache.commons.lang.*; | [
"com.google.common",
"java.lang",
"java.util",
"org.apache.commons"
] | com.google.common; java.lang; java.util; org.apache.commons; | 933,631 |
public boolean hasPropValue(String propType, String propValue) {
if (otherProperties == null) {
return false;
}
for (Map.Entry<String, String> kv: otherProperties.entrySet()) {
if (propType.equals(kv.getKey())) {
if (propValue == null) {
... | boolean function(String propType, String propValue) { if (otherProperties == null) { return false; } for (Map.Entry<String, String> kv: otherProperties.entrySet()) { if (propType.equals(kv.getKey())) { if (propValue == null) { return true; } if (propValue.equals(kv.getValue())) { return true; } } } return false; } | /**
* Ask property type has value.
*
* @param propType property type to ask
* @param propValue property value to be equal
* @return true property of the type has the value
*/ | Ask property type has value | hasPropValue | {
"repo_name": "miurahr/tmpotter",
"path": "src/main/java/org/tmpotter/core/TmxEntry.java",
"license": "gpl-3.0",
"size": 3559
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,659,825 |
@MXBeanDescription("String presentation of the start timestamp.")
public String getStartTimestampFormatted(); | @MXBeanDescription(STR) String function(); | /**
* Gets string presentation of the start timestamp.
*
* @return String presentation of the start timestamp.
*/ | Gets string presentation of the start timestamp | getStartTimestampFormatted | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiManagementMBean.java",
"license": "apache-2.0",
"size": 2653
} | [
"org.apache.ignite.mxbean.MXBeanDescription"
] | import org.apache.ignite.mxbean.MXBeanDescription; | import org.apache.ignite.mxbean.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 180,921 |
public static String generateLoadReportURLDownloadDispatch( HttpServletRequest request, String reportId )
{
return generateLoadReportURL( request, reportId, XDocProcessServletConstants.DOWNLOAD_DISPATCH );
} | static String function( HttpServletRequest request, String reportId ) { return generateLoadReportURL( request, reportId, XDocProcessServletConstants.DOWNLOAD_DISPATCH ); } | /**
* Generate URL to call loadReport servlet to download original document archive from the report.
*
* <pre>
* ex : http://localhost:8080/xdocreport-webapp/loadReport?reportId=$reportId&dispatch=download
* </pre>
*
* @param request
* @param reportId
* @param dispatch
... | Generate URL to call loadReport servlet to download original document archive from the report. <code> ex : HREF </code> | generateLoadReportURLDownloadDispatch | {
"repo_name": "xiaoguiguiaichixiaomomo/Learning",
"path": "word报表生成/xdocreport.samples-master/demo-webapp/src/main/java/fr/opensagres/xdocreport/webapp/utils/HTMLUtils.java",
"license": "mit",
"size": 22982
} | [
"fr.opensagres.xdocreport.document.web.XDocProcessServletConstants",
"javax.servlet.http.HttpServletRequest"
] | import fr.opensagres.xdocreport.document.web.XDocProcessServletConstants; import javax.servlet.http.HttpServletRequest; | import fr.opensagres.xdocreport.document.web.*; import javax.servlet.http.*; | [
"fr.opensagres.xdocreport",
"javax.servlet"
] | fr.opensagres.xdocreport; javax.servlet; | 420,760 |
private void shortenFields(Idea idea) {
if (null != idea) {
idea.setTitle(StringUtils.abbreviate(idea.getTitle(), 50));
idea.setDescription(StringUtils.abbreviate(idea.getDescription(), 150));
}
} | void function(Idea idea) { if (null != idea) { idea.setTitle(StringUtils.abbreviate(idea.getTitle(), 50)); idea.setDescription(StringUtils.abbreviate(idea.getDescription(), 150)); } } | /**
* Shortens the length of title and description fields
*
* @param idea
*/ | Shortens the length of title and description fields | shortenFields | {
"repo_name": "akrain/thoughtsite",
"path": "src/main/java/com/google/ie/common/builder/IdeaBuilder.java",
"license": "apache-2.0",
"size": 10732
} | [
"com.google.ie.business.domain.Idea",
"org.apache.commons.lang.StringUtils"
] | import com.google.ie.business.domain.Idea; import org.apache.commons.lang.StringUtils; | import com.google.ie.business.domain.*; import org.apache.commons.lang.*; | [
"com.google.ie",
"org.apache.commons"
] | com.google.ie; org.apache.commons; | 2,389,473 |
public CmsUUID getEntryId() {
return m_entryId;
} | CmsUUID function() { return m_entryId; } | /**
* Returns the entry id.<p>
*
* @return the entry id
*/ | Returns the entry id | getEntryId | {
"repo_name": "alkacon/opencms-core",
"path": "src-gwt/org/opencms/ade/sitemap/client/CmsSitemapTreeItem.java",
"license": "lgpl-2.1",
"size": 33865
} | [
"org.opencms.util.CmsUUID"
] | import org.opencms.util.CmsUUID; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 2,596,294 |
public List<Group> getGroupsToSynchronize(PerunSession sess) throws InternalErrorException {
try {
// Get all groups which have defined
return jdbc.query("select " + groupMappingSelectQuery + " from groups, attr_names, group_attr_values " +
"where attr_names.attr_name=? and attr_names.id=group_attr_valu... | List<Group> function(PerunSession sess) throws InternalErrorException { try { return jdbc.query(STR + groupMappingSelectQuery + STR + STR + STR, GROUP_MAPPER, GroupsManager.GROUPSYNCHROENABLED_ATTRNAME); } catch (EmptyResultDataAccessException e) { return new ArrayList<Group>(); } catch (RuntimeException e) { throw new... | /**
* Gets all groups which have enabled synchronization.
*
* @param sess
* @return list of groups to synchronize
* @throws InternalErrorException
*/ | Gets all groups which have enabled synchronization | getGroupsToSynchronize | {
"repo_name": "Simcsa/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/impl/GroupsManagerImpl.java",
"license": "bsd-2-clause",
"size": 33106
} | [
"cz.metacentrum.perun.core.api.Group",
"cz.metacentrum.perun.core.api.GroupsManager",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.ArrayList",
"java.util.List",
"org.springframework.dao.EmptyResultDataAccessException"
] | import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.GroupsManager; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.ArrayList; import java.util.List; import org.springframework.dao.EmptyResultDataAcce... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; import org.springframework.dao.*; | [
"cz.metacentrum.perun",
"java.util",
"org.springframework.dao"
] | cz.metacentrum.perun; java.util; org.springframework.dao; | 577,455 |
public static Name
fromAddress(String addr, int family) throws UnknownHostException {
byte [] array = Address.toByteArray(addr, family);
if (array == null)
throw new UnknownHostException("Invalid IP address");
return fromAddress(array);
} | static Name function(String addr, int family) throws UnknownHostException { byte [] array = Address.toByteArray(addr, family); if (array == null) throw new UnknownHostException(STR); return fromAddress(array); } | /**
* Creates a reverse map name corresponding to an address contained in
* a String.
* @param addr The address from which to build a name.
* @return The name corresponding to the address in the reverse map.
* @throws UnknownHostException The string does not contain a valid address.
*/ | Creates a reverse map name corresponding to an address contained in a String | fromAddress | {
"repo_name": "Jimmy-Gao/browsermob-proxy",
"path": "src/main/java/org/xbill/DNS/ReverseMap.java",
"license": "apache-2.0",
"size": 4003
} | [
"java.net.UnknownHostException"
] | import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 1,336,049 |
EReference getAssignmentExpression_LeftExpr(); | EReference getAssignmentExpression_LeftExpr(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.AssignmentExpression#getLeftExpr <em>Left Expr</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Left Expr... | Returns the meta object for the containment reference '<code>org.eclipse.xtext.testlanguages.backtracking.beeLangTestLanguage.AssignmentExpression#getLeftExpr Left Expr</code>'. | getAssignmentExpression_LeftExpr | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.testlanguages/src-gen/org/eclipse/xtext/testlanguages/backtracking/beeLangTestLanguage/BeeLangTestLanguagePackage.java",
"license": "epl-1.0",
"size": 161651
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 682,259 |
public JSONObject refViewRetrieveJSON(ContextualisedStorage storage,CSPRequestCredentials creds,CSPRequestCache cache,String path, JSONObject restrictions) throws ExistException,UnimplementedException, UnderlyingStorageException, JSONException, UnsupportedEncodingException {
try {
JSONObject out=new JSONObject(... | JSONObject function(ContextualisedStorage storage,CSPRequestCredentials creds,CSPRequestCache cache,String path, JSONObject restrictions) throws ExistException,UnimplementedException, UnderlyingStorageException, JSONException, UnsupportedEncodingException { try { JSONObject out=new JSONObject(); JSONObject pagination=n... | /**
* get data needed for terms Used block of a record
* @param creds
* @param cache
* @param path
* @return
* @throws ExistException
* @throws UnimplementedException
* @throws UnderlyingStorageException
* @throws JSONException
* @throws UnsupportedEncodingException
*/ | get data needed for terms Used block of a record | refViewRetrieveJSON | {
"repo_name": "cherryhill/collectionspace-application",
"path": "cspi-services/src/main/java/org/collectionspace/chain/csp/persistence/services/GenericStorage.java",
"license": "apache-2.0",
"size": 93300
} | [
"java.io.UnsupportedEncodingException",
"org.collectionspace.chain.csp.persistence.services.connection.ConnectionException",
"org.collectionspace.csp.api.core.CSPRequestCache",
"org.collectionspace.csp.api.core.CSPRequestCredentials",
"org.collectionspace.csp.api.persistence.ExistException",
"org.collecti... | import java.io.UnsupportedEncodingException; import org.collectionspace.chain.csp.persistence.services.connection.ConnectionException; import org.collectionspace.csp.api.core.CSPRequestCache; import org.collectionspace.csp.api.core.CSPRequestCredentials; import org.collectionspace.csp.api.persistence.ExistException; im... | import java.io.*; import org.collectionspace.chain.csp.persistence.services.connection.*; import org.collectionspace.csp.api.core.*; import org.collectionspace.csp.api.persistence.*; import org.collectionspace.csp.helper.persistence.*; import org.json.*; | [
"java.io",
"org.collectionspace.chain",
"org.collectionspace.csp",
"org.json"
] | java.io; org.collectionspace.chain; org.collectionspace.csp; org.json; | 1,472,954 |
public synchronized void removeAppFromRegistry(ApplicationId appId) {
Map<String, Token<AMRMTokenIdentifier>> subClusterTokenMap =
this.appSubClusterTokenMap.get(appId);
LOG.info("Removing all registry entries for {}", appId);
if (subClusterTokenMap == null || subClusterTokenMap.size() == 0) {
... | synchronized void function(ApplicationId appId) { Map<String, Token<AMRMTokenIdentifier>> subClusterTokenMap = this.appSubClusterTokenMap.get(appId); LOG.info(STR, appId); if (subClusterTokenMap == null subClusterTokenMap.size() == 0) { return; } String key = getRegistryKey(appId, null); try { removeKeyRegistry(this.re... | /**
* Remove an application from registry.
*
* @param appId application id
*/ | Remove an application from registry | removeAppFromRegistry | {
"repo_name": "mapr/hadoop-common",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/utils/FederationRegistryClient.java",
"license": "apache-2.0",
"size": 11583
} | [
"java.util.Map",
"org.apache.hadoop.security.token.Token",
"org.apache.hadoop.yarn.api.records.ApplicationId",
"org.apache.hadoop.yarn.exceptions.YarnException",
"org.apache.hadoop.yarn.security.AMRMTokenIdentifier"
] | import java.util.Map; import org.apache.hadoop.security.token.Token; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.exceptions.YarnException; import org.apache.hadoop.yarn.security.AMRMTokenIdentifier; | import java.util.*; import org.apache.hadoop.security.token.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.exceptions.*; import org.apache.hadoop.yarn.security.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 993,408 |
private void sendResponse( String status, String mime, Properties header, InputStream data )
{
try
{
if ( status == null )
throw new Error( "sendResponse(): Status can't be null." );
OutputStream out = mySocket.getOutputStream();
PrintWriter pw = new PrintWriter( out );
pw.print("HTTP... | void function( String status, String mime, Properties header, InputStream data ) { try { if ( status == null ) throw new Error( STR ); OutputStream out = mySocket.getOutputStream(); PrintWriter pw = new PrintWriter( out ); pw.print(STR + status + STR); if ( mime != null ) pw.print(STR + mime + "\r\n"); if ( header == n... | /**
* Sends given response to the socket.
*/ | Sends given response to the socket | sendResponse | {
"repo_name": "s373/s373-processing-libs",
"path": "apache/src/s373/apache/NanoHTTPD.java",
"license": "lgpl-2.1",
"size": 30675
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.OutputStream",
"java.io.PrintWriter",
"java.net.Socket",
"java.util.Date",
"java.util.Enumeration",
"java.util.Properties"
] | import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.net.Socket; import java.util.Date; import java.util.Enumeration; import java.util.Properties; | import java.io.*; import java.net.*; import java.util.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 133,322 |
@Override()
public java.lang.Class<?> getJavaClass(
) {
return org.opennms.netmgt.config.threshd.ThresholdingConfig.class;
} | @Override() java.lang.Class<?> function( ) { return org.opennms.netmgt.config.threshd.ThresholdingConfig.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-config/target/generated-sources/castor/org/opennms/netmgt/config/threshd/descriptors/ThresholdingConfigDescriptor.java",
"license": "gpl-2.0",
"size": 6138
} | [
"org.opennms.netmgt.config.threshd.ThresholdingConfig"
] | import org.opennms.netmgt.config.threshd.ThresholdingConfig; | import org.opennms.netmgt.config.threshd.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 919,371 |
public void testFailedFuture_null() {
try {
CompletableFuture<Integer> f = CompletableFuture.failedFuture(null);
shouldThrow();
} catch (NullPointerException success) {}
} | void function() { try { CompletableFuture<Integer> f = CompletableFuture.failedFuture(null); shouldThrow(); } catch (NullPointerException success) {} } | /**
* failedFuture(null) throws NPE
*/ | failedFuture(null) throws NPE | testFailedFuture_null | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/CompletableFutureTest.java",
"license": "gpl-2.0",
"size": 182910
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 114,315 |
@Test
public void whenKingWayUpLeftOutputCorrectThenTrue() throws ImpossibleMoveException {
Board board = new Board();
Figure figure = new King('C', 3);
board.addFigures(figure);
Cell cellDist = new Cell('D', 4);
Cell[] result = figure.way(cellDist);
Cell[] exp... | void function() throws ImpossibleMoveException { Board board = new Board(); Figure figure = new King('C', 3); board.addFigures(figure); Cell cellDist = new Cell('D', 4); Cell[] result = figure.way(cellDist); Cell[] expected = new Cell[1]; expected[0] = new Cell('D', 4); assertThat(result[0].getHorizontal(), is(expected... | /**
* 6.4.5 Test King exception way Up Left.
* @throws ImpossibleMoveException Impossible Move figure.
*/ | 6.4.5 Test King exception way Up Left | whenKingWayUpLeftOutputCorrectThenTrue | {
"repo_name": "rvkhaustov/rkhaustov",
"path": "chapter_002/src/test/java/ru/rkhaustov/chess/BoardTest.java",
"license": "apache-2.0",
"size": 34285
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 170,896 |
public static List<AbstractWarningsParser> getParsers(final String group) {
return getParsers(Collections.singleton(group));
} | static List<AbstractWarningsParser> function(final String group) { return getParsers(Collections.singleton(group)); } | /**
* Returns a list of parsers that match the specified group name. Note that the
* mapping of groups to parsers is one to many.
*
* @param group
* the parser group
* @return a list of parsers, might be modified by the receiver
*/ | Returns a list of parsers that match the specified group name. Note that the mapping of groups to parsers is one to many | getParsers | {
"repo_name": "recena/warnings-plugin",
"path": "src/main/java/hudson/plugins/warnings/parser/ParserRegistry.java",
"license": "mit",
"size": 12649
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,676,413 |
private long makeDate(int day) {
cal.set((Calendar.DAY_OF_YEAR), day);
return cal.getTime().getTime();
} | long function(int day) { cal.set((Calendar.DAY_OF_YEAR), day); return cal.getTime().getTime(); } | /**
* Little utility for making up java.util.Dates for different days, just
* to generate test data.
*/ | Little utility for making up java.util.Dates for different days, just to generate test data | makeDate | {
"repo_name": "racker/omnibus",
"path": "source/db-5.0.26.NC/examples_java/src/persist/EventExample.java",
"license": "apache-2.0",
"size": 15076
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 460,058 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.