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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
if (!expected.isAssignableFrom(type.type())) {
throw new IllegalArgumentException(
String.format("Cannot assign type (%s) to expected (%s)", type, expected));
}
return (List<T>) data;
} | if (!expected.isAssignableFrom(type.type())) { throw new IllegalArgumentException( String.format(STR, type, expected)); } return (List<T>) data; } | /**
* Helper method to fetch a collection of the given type, if applicable.
*
* @param expected The expected type to read.
* @return A list of the expected type.
*/ | Helper method to fetch a collection of the given type, if applicable | getDataAs | {
"repo_name": "dimaslv/heroic",
"path": "heroic-component/src/main/java/com/spotify/heroic/metric/MetricCollection.java",
"license": "apache-2.0",
"size": 8948
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,118,530 |
private NodeState createRootNodeState(NodeId rootNodeId,
NodeTypeRegistry ntReg)
throws ItemStateException {
NodeState rootState = createInstance(rootNodeId, NameConstants.REP_ROOT, null);
NodeState jcrSystemState = createInstance(RepositoryImpl... | NodeState function(NodeId rootNodeId, NodeTypeRegistry ntReg) throws ItemStateException { NodeState rootState = createInstance(rootNodeId, NameConstants.REP_ROOT, null); NodeState jcrSystemState = createInstance(RepositoryImpl.SYSTEM_ROOT_NODE_ID, NameConstants.REP_SYSTEM, rootNodeId); rootState.addPropertyName(NameCon... | /**
* Create root node state
*
* @param rootNodeId root node id
* @param ntReg node type registry
* @return root node state
* @throws ItemStateException if an error occurs
*/ | Create root node state | createRootNodeState | {
"repo_name": "Overseas-Student-Living/jackrabbit",
"path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java",
"license": "apache-2.0",
"size": 75818
} | [
"javax.jcr.PropertyType",
"org.apache.jackrabbit.core.RepositoryImpl",
"org.apache.jackrabbit.core.id.NodeId",
"org.apache.jackrabbit.core.nodetype.NodeTypeRegistry",
"org.apache.jackrabbit.core.value.InternalValue",
"org.apache.jackrabbit.spi.commons.name.NameConstants"
] | import javax.jcr.PropertyType; import org.apache.jackrabbit.core.RepositoryImpl; import org.apache.jackrabbit.core.id.NodeId; import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry; import org.apache.jackrabbit.core.value.InternalValue; import org.apache.jackrabbit.spi.commons.name.NameConstants; | import javax.jcr.*; import org.apache.jackrabbit.core.*; import org.apache.jackrabbit.core.id.*; import org.apache.jackrabbit.core.nodetype.*; import org.apache.jackrabbit.core.value.*; import org.apache.jackrabbit.spi.commons.name.*; | [
"javax.jcr",
"org.apache.jackrabbit"
] | javax.jcr; org.apache.jackrabbit; | 1,982,401 |
@Override
public void setTimeZone(final TimeZone timeZone) {
formatter.setTimeZone(timeZone);
previousTime = Long.MIN_VALUE;
slotBegin = Long.MIN_VALUE;
} | void function(final TimeZone timeZone) { formatter.setTimeZone(timeZone); previousTime = Long.MIN_VALUE; slotBegin = Long.MIN_VALUE; } | /**
* Sets the time zone.
* <p>
* Setting the time zone using getCalendar().setTimeZone() will likely cause caching to misbehave.
* </p>
*
* @param timeZone
* TimeZone new time zone
*/ | Sets the time zone. Setting the time zone using getCalendar().setTimeZone() will likely cause caching to misbehave. | setTimeZone | {
"repo_name": "SourceStudyNotes/log4j2",
"path": "src/main/java/org/apache/logging/log4j/core/pattern/CachedDateFormat.java",
"license": "apache-2.0",
"size": 12775
} | [
"java.util.TimeZone"
] | import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 2,058,894 |
public static int getFreeSlots(final Inventory inventory){
final ItemStack[] contents = inventory.getContents();
int count = 0;
for (int i = 0; i < contents.length; i++){
final ItemStack stack = contents[i];
if (stack == null || isEmpty(stack.getType())){
count ++;
}
}
return count;
... | static int function(final Inventory inventory){ final ItemStack[] contents = inventory.getContents(); int count = 0; for (int i = 0; i < contents.length; i++){ final ItemStack stack = contents[i]; if (stack == null isEmpty(stack.getType())){ count ++; } } return count; } | /**
* Does not account for special slots like armor.
* @param inventory
* @return
*/ | Does not account for special slots like armor | getFreeSlots | {
"repo_name": "MyPictures/NoCheatPlus",
"path": "NCPCore/src/main/java/fr/neatmonster/nocheatplus/utilities/InventoryUtil.java",
"license": "gpl-3.0",
"size": 3870
} | [
"org.bukkit.inventory.Inventory",
"org.bukkit.inventory.ItemStack"
] | import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; | import org.bukkit.inventory.*; | [
"org.bukkit.inventory"
] | org.bukkit.inventory; | 1,822,502 |
public com.squareup.okhttp.Call findOrganizationTileAsync(String organizationId, String tileId, final ApiCallback<Tile> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; | com.squareup.okhttp.Call function(String organizationId, String tileId, final ApiCallback<Tile> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; | /**
* Finds organizations tile (asynchronously)
* Finds single organization tile
* @param organizationId Organization id (required)
* @param tileId tile id (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiExce... | Finds organizations tile (asynchronously) Finds single organization tile | findOrganizationTileAsync | {
"repo_name": "Metatavu/kunta-api-spec",
"path": "java-client-generated/src/main/java/fi/metatavu/kuntaapi/client/TilesApi.java",
"license": "agpl-3.0",
"size": 32613
} | [
"fi.metatavu.kuntaapi.ApiCallback",
"fi.metatavu.kuntaapi.ApiException",
"fi.metatavu.kuntaapi.ProgressRequestBody",
"fi.metatavu.kuntaapi.ProgressResponseBody",
"fi.metatavu.kuntaapi.client.model.Tile"
] | import fi.metatavu.kuntaapi.ApiCallback; import fi.metatavu.kuntaapi.ApiException; import fi.metatavu.kuntaapi.ProgressRequestBody; import fi.metatavu.kuntaapi.ProgressResponseBody; import fi.metatavu.kuntaapi.client.model.Tile; | import fi.metatavu.kuntaapi.*; import fi.metatavu.kuntaapi.client.model.*; | [
"fi.metatavu.kuntaapi"
] | fi.metatavu.kuntaapi; | 1,999,042 |
public Jid getResponder() {
return responder;
} | Jid function() { return responder; } | /**
* Get the session responder
*
* @return the responder
*/ | Get the session responder | getResponder | {
"repo_name": "opg7371/Smack",
"path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java",
"license": "apache-2.0",
"size": 40151
} | [
"org.jxmpp.jid.Jid"
] | import org.jxmpp.jid.Jid; | import org.jxmpp.jid.*; | [
"org.jxmpp.jid"
] | org.jxmpp.jid; | 414,658 |
Explanation explain(Query<Entity> q, EntityType entityType, Object entityId); | Explanation explain(Query<Entity> q, EntityType entityType, Object entityId); | /**
* Get explanation for a specific document in elasticSearch
*/ | Get explanation for a specific document in elasticSearch | explain | {
"repo_name": "djvanenckevort/molgenis",
"path": "molgenis-semantic-search/src/main/java/org/molgenis/data/semanticsearch/explain/service/ElasticSearchExplainService.java",
"license": "lgpl-3.0",
"size": 739
} | [
"org.apache.lucene.search.Explanation",
"org.molgenis.data.Entity",
"org.molgenis.data.Query",
"org.molgenis.data.meta.model.EntityType"
] | import org.apache.lucene.search.Explanation; import org.molgenis.data.Entity; import org.molgenis.data.Query; import org.molgenis.data.meta.model.EntityType; | import org.apache.lucene.search.*; import org.molgenis.data.*; import org.molgenis.data.meta.model.*; | [
"org.apache.lucene",
"org.molgenis.data"
] | org.apache.lucene; org.molgenis.data; | 1,025,173 |
public static DateTime calciteDateToJoda(final int date, final DateTimeZone timeZone)
{
return DateTimes.EPOCH.plusDays(date).withZoneRetainFields(timeZone);
} | static DateTime function(final int date, final DateTimeZone timeZone) { return DateTimes.EPOCH.plusDays(date).withZoneRetainFields(timeZone); } | /**
* The inverse of {@link #jodaToCalciteDate(DateTime, DateTimeZone)}.
*
* @param date Calcite style date
* @param timeZone session time zone
*
* @return joda timestamp, with time zone set to the session time zone
*/ | The inverse of <code>#jodaToCalciteDate(DateTime, DateTimeZone)</code> | calciteDateToJoda | {
"repo_name": "mghosh4/druid",
"path": "sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java",
"license": "apache-2.0",
"size": 16337
} | [
"org.apache.druid.java.util.common.DateTimes",
"org.joda.time.DateTime",
"org.joda.time.DateTimeZone"
] | import org.apache.druid.java.util.common.DateTimes; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; | import org.apache.druid.java.util.common.*; import org.joda.time.*; | [
"org.apache.druid",
"org.joda.time"
] | org.apache.druid; org.joda.time; | 79,787 |
public static SDOException errorProcessingImport(String schemaLocation, String namespace, Exception nestedException) {
Object[] args = { schemaLocation, namespace };
SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage(//
SDOException.class, ERROR_PROCESSI... | static SDOException function(String schemaLocation, String namespace, Exception nestedException) { Object[] args = { schemaLocation, namespace }; SDOException exception = new SDOException(ExceptionMessageGenerator.buildMessage( exception.setErrorCode(ERROR_PROCESSING_IMPORT); return exception; } | /**
* INTERNAL:
* Exception when processing an import during xsdhelper.define
*/ | Exception when processing an import during xsdhelper.define | errorProcessingImport | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/exceptions/SDOException.java",
"license": "epl-1.0",
"size": 34743
} | [
"org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator"
] | import org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator; | import org.eclipse.persistence.exceptions.i18n.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,533,120 |
public boolean isGroupMember(String username) {
boolean retval = false;
try {
for (String group : this.allowedGroupNames) {
retval = isGroupMember(username, group);
if (retval) {
break;
}
}
} catch (ApplicationPermissionException ex) {
LOG.warning(applicationPermission());
} catch ... | boolean function(String username) { boolean retval = false; try { for (String group : this.allowedGroupNames) { retval = isGroupMember(username, group); if (retval) { break; } } } catch (ApplicationPermissionException ex) { LOG.warning(applicationPermission()); } catch (InvalidAuthenticationException ex) { LOG.warning(... | /**
* Checks whether the user is a member of one of the Crowd groups whose
* members are allowed to login.
*
* @param username
* The name of the user to check. May not be <code>null</code> or
* empty.
* @return <code>true</code> if and only if the group exists, is active and
* ... | Checks whether the user is a member of one of the Crowd groups whose members are allowed to login | isGroupMember | {
"repo_name": "hudson3-plugins/crowd2-plugin",
"path": "src/main/java/de/theit/jenkins/crowd/CrowdConfigurationService.java",
"license": "mit",
"size": 12450
} | [
"com.atlassian.crowd.exception.ApplicationPermissionException",
"com.atlassian.crowd.exception.InvalidAuthenticationException",
"com.atlassian.crowd.exception.OperationFailedException",
"de.theit.jenkins.crowd.ErrorMessages",
"java.util.logging.Level"
] | import com.atlassian.crowd.exception.ApplicationPermissionException; import com.atlassian.crowd.exception.InvalidAuthenticationException; import com.atlassian.crowd.exception.OperationFailedException; import de.theit.jenkins.crowd.ErrorMessages; import java.util.logging.Level; | import com.atlassian.crowd.exception.*; import de.theit.jenkins.crowd.*; import java.util.logging.*; | [
"com.atlassian.crowd",
"de.theit.jenkins",
"java.util"
] | com.atlassian.crowd; de.theit.jenkins; java.util; | 872,082 |
List<String> cdatas(int... indexes);
| List<String> cdatas(int... indexes); | /**
* Get all CDATA content of the elements at given indexes in the set of
* matched elements.
* <p>
* This is the same as {@link #texts(int...)}.
*/ | Get all CDATA content of the elements at given indexes in the set of matched elements. This is the same as <code>#texts(int...)</code> | cdatas | {
"repo_name": "jOOQ/jOOX",
"path": "jOOX/src/main/java/org/joox/Match.java",
"license": "apache-2.0",
"size": 83723
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,181,854 |
JavaTemplateFileProvider javaTemplateFileProvider = new JavaTemplateFileProvider(
"conf/test/data");
// source path relative to conf/test/data
// testfolder1/test.java
javaTemplateFileProvider.provideTemplate("test");
// testfolder1/test.zip/test2.java
javaTempl... | JavaTemplateFileProvider javaTemplateFileProvider = new JavaTemplateFileProvider( STR); javaTemplateFileProvider.provideTemplate("test"); javaTemplateFileProvider.provideTemplate("test2"); javaTemplateFileProvider.provideTemplate("test3"); javaTemplateFileProvider.provideTemplate("test4"); javaTemplateFileProvider.prov... | /**
* Test template loader.
*
* @throws Exception
*/ | Test template loader | testLoadJavaTemplateFromDir | {
"repo_name": "NABUCCO/org.nabucco.framework.mda",
"path": "org.nabucco.framework.mda.template.java/src/test/org/nabucco/framework/mda/template/java/loader/JavaTemplateLoaderTest.java",
"license": "epl-1.0",
"size": 2491
} | [
"org.nabucco.framework.mda.template.java.provider.JavaTemplateFileProvider"
] | import org.nabucco.framework.mda.template.java.provider.JavaTemplateFileProvider; | import org.nabucco.framework.mda.template.java.provider.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,144,961 |
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(LanguagePackage.Literals.SET_TYPE__GROUP);
childrenFeatures.add(LanguagePackage.Literals.SET_TYPE__ANY_ATTRIBUTE);
}
r... | Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(LanguagePackage.Literals.SET_TYPE__GROUP); childrenFeatures.add(LanguagePackage.Literals.SET_TYPE__ANY_ATTRIBUTE); } return childrenFeatures; } | /**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-... | This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>. | getChildrenFeatures | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/org/w3/_2001/smil20/language/provider/SetTypeItemProvider.java",
"license": "apache-2.0",
"size": 255549
} | [
"java.util.Collection",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.w3._2001.smil20.language.LanguagePackage"
] | import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.w3._2001.smil20.language.LanguagePackage; | import java.util.*; import org.eclipse.emf.ecore.*; import org.w3.*; | [
"java.util",
"org.eclipse.emf",
"org.w3"
] | java.util; org.eclipse.emf; org.w3; | 2,134,449 |
ProjectSourceZip exportProjectSourceZip(String userId, long projectId,
boolean includeProjectHistory,
boolean includeAndroidKeystore, @Nullable String zipName)
throws IOException;
| ProjectSourceZip exportProjectSourceZip(String userId, long projectId, boolean includeProjectHistory, boolean includeAndroidKeystore, @Nullable String zipName) throws IOException; | /**
* Exports the project source files as a zip.
*
* @param userId the userId
* @param projectId the project id belonging to the userId
* @param includeProjectHistory indicates whether to include a file
* containing the project's history in the zip
* @param includeAndroidKeystore indi... | Exports the project source files as a zip | exportProjectSourceZip | {
"repo_name": "ajhalbleib/aicg",
"path": "appinventor/appengine/src/com/google/appinventor/server/FileExporter.java",
"license": "mit",
"size": 3860
} | [
"com.google.appinventor.shared.rpc.project.ProjectSourceZip",
"java.io.IOException",
"javax.annotation.Nullable"
] | import com.google.appinventor.shared.rpc.project.ProjectSourceZip; import java.io.IOException; import javax.annotation.Nullable; | import com.google.appinventor.shared.rpc.project.*; import java.io.*; import javax.annotation.*; | [
"com.google.appinventor",
"java.io",
"javax.annotation"
] | com.google.appinventor; java.io; javax.annotation; | 912,532 |
public void add(Value... values) throws AerospikeException {
client.execute(policy, key, PackageName, "add_all", binName, Value.get(values), createModule);
}
| void function(Value... values) throws AerospikeException { client.execute(policy, key, PackageName, STR, binName, Value.get(values), createModule); } | /**
* Add values to the set. If the set does not exist, create it using specified userModule configuration.
*
* @param values values to add
*/ | Add values to the set. If the set does not exist, create it using specified userModule configuration | add | {
"repo_name": "wgpshashank/aerospike-client-java",
"path": "client/src/com/aerospike/client/large/LargeSet.java",
"license": "apache-2.0",
"size": 5552
} | [
"com.aerospike.client.AerospikeException",
"com.aerospike.client.Value"
] | import com.aerospike.client.AerospikeException; import com.aerospike.client.Value; | import com.aerospike.client.*; | [
"com.aerospike.client"
] | com.aerospike.client; | 2,393,798 |
private void loadStepImages() {
// imagesSteps.clear();
// imagesStepsSmall.clear();
//
// STEP IMAGES TO LOAD
//
PluginRegistry registry = PluginRegistry.getInstance();
List<PluginInterface> steps = registry.getPlugins( StepPluginType.class );
for ( PluginInterface step : steps ) {
... | void function() { List<PluginInterface> steps = registry.getPlugins( StepPluginType.class ); for ( PluginInterface step : steps ) { if ( imagesSteps.get( step.getIds()[ 0 ] ) != null ) { continue; } SwtUniversalImage image = null; Image smallImage; String filename = step.getImageFile(); try { ClassLoader classLoader = ... | /**
* Load all step images from files.
*/ | Load all step images from files | loadStepImages | {
"repo_name": "HiromuHota/pentaho-kettle",
"path": "ui/src/main/java/org/pentaho/di/ui/core/gui/GUIResource.java",
"license": "apache-2.0",
"size": 79871
} | [
"java.util.List",
"org.eclipse.swt.graphics.Image",
"org.pentaho.di.core.SwtUniversalImage",
"org.pentaho.di.core.plugins.PluginInterface",
"org.pentaho.di.core.plugins.StepPluginType",
"org.pentaho.di.ui.util.SwtSvgImageUtil"
] | import java.util.List; import org.eclipse.swt.graphics.Image; import org.pentaho.di.core.SwtUniversalImage; import org.pentaho.di.core.plugins.PluginInterface; import org.pentaho.di.core.plugins.StepPluginType; import org.pentaho.di.ui.util.SwtSvgImageUtil; | import java.util.*; import org.eclipse.swt.graphics.*; import org.pentaho.di.core.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.ui.util.*; | [
"java.util",
"org.eclipse.swt",
"org.pentaho.di"
] | java.util; org.eclipse.swt; org.pentaho.di; | 2,539,195 |
public static ASN1Primitive toASN1Primitive(byte[] data)
throws IOException {
ByteArrayInputStream inStream = new ByteArrayInputStream(data);
ASN1InputStream derInputStream = new ASN1InputStream(inStream);
return derInputStream.readObject();
} | static ASN1Primitive function(byte[] data) throws IOException { ByteArrayInputStream inStream = new ByteArrayInputStream(data); ASN1InputStream derInputStream = new ASN1InputStream(inStream); return derInputStream.readObject(); } | /**
* Converts the DER-encoded byte array into a
* <code>DERObject</code>.
*
* @param data the DER-encoded byte array to convert.
* @return the DERObject.
* @exception IOException if conversion fails
*/ | Converts the DER-encoded byte array into a <code>DERObject</code> | toASN1Primitive | {
"repo_name": "ellert/JGlobus",
"path": "ssl-proxies/src/main/java/org/globus/gsi/bc/BouncyCastleUtil.java",
"license": "apache-2.0",
"size": 22088
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"org.bouncycastle.asn1.ASN1InputStream",
"org.bouncycastle.asn1.ASN1Primitive"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import org.bouncycastle.asn1.ASN1InputStream; import org.bouncycastle.asn1.ASN1Primitive; | import java.io.*; import org.bouncycastle.asn1.*; | [
"java.io",
"org.bouncycastle.asn1"
] | java.io; org.bouncycastle.asn1; | 2,262,731 |
private void finishLoadingArtifacts(InputStream in)
throws InvalidFormatException, IOException {
final ZipInputStream zip = new ZipInputStream(in);
Map<String, Object> artifactMap = new HashMap<String, Object>();
ZipEntry entry;
while((entry = zip.getNextEntry()) != null ) {
// Note: T... | void function(InputStream in) throws InvalidFormatException, IOException { final ZipInputStream zip = new ZipInputStream(in); Map<String, Object> artifactMap = new HashMap<String, Object>(); ZipEntry entry; while((entry = zip.getNextEntry()) != null ) { String entryName = entry.getName(); String extension = getEntryExt... | /**
* Finish loading the artifacts now that it knows all serializers.
*/ | Finish loading the artifacts now that it knows all serializers | finishLoadingArtifacts | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/opennlp/opennlp-tools/src/main/java/opennlp/tools/util/model/BaseModel.java",
"license": "apache-2.0",
"size": 21908
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.HashMap",
"java.util.Map",
"java.util.zip.ZipEntry",
"java.util.zip.ZipInputStream"
] | import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; | import java.io.*; import java.util.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,465,700 |
private int getEqualDim (TriConcept<T> a, TriConcept<T> b) {
for (int dim = 0; dim < TriConcept.DIMS; dim++) {
if (Arrays.equals(a.getDim(dim), b.getDim(dim))) return dim;
}
return -1;
} | int function (TriConcept<T> a, TriConcept<T> b) { for (int dim = 0; dim < TriConcept.DIMS; dim++) { if (Arrays.equals(a.getDim(dim), b.getDim(dim))) return dim; } return -1; } | /** Returns the dimension, in which the given tri concepts are equal.
*
* @param a
* @param b
* @return
*/ | Returns the dimension, in which the given tri concepts are equal | getEqualDim | {
"repo_name": "hosniah/Trias",
"path": "src/main/java/de/unikassel/cs/kde/trias/neighborhoods/GraphvizGraphWriter.java",
"license": "gpl-2.0",
"size": 6870
} | [
"de.unikassel.cs.kde.trias.model.TriConcept",
"java.util.Arrays"
] | import de.unikassel.cs.kde.trias.model.TriConcept; import java.util.Arrays; | import de.unikassel.cs.kde.trias.model.*; import java.util.*; | [
"de.unikassel.cs",
"java.util"
] | de.unikassel.cs; java.util; | 1,995,470 |
private static int setColorAlpha(int color, byte alpha) {
return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color));
} | static int function(int color, byte alpha) { return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); } | /**
* Set the alpha value of the {@code color} to be the given {@code alpha} value.
*/ | Set the alpha value of the color to be the given alpha value | setColorAlpha | {
"repo_name": "cymcsg/UltimateAndroid",
"path": "deprecated/UltimateAndroidGradle/demoofui/src/main/java/com/marshalchen/common/demoofui/observablescrollview/ui/widget/SlidingTabStrip.java",
"license": "apache-2.0",
"size": 6447
} | [
"android.graphics.Color"
] | import android.graphics.Color; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 873,919 |
public static void verifyUserContext() {
String user = null;
Session session = ContextInfo.getUserSession();
if ( session != null ) {
try {
user = session.getEffectiveUserName();
}
catch (NotesException e) {
// Ign... | static void function() { String user = null; Session session = ContextInfo.getUserSession(); if ( session != null ) { try { user = session.getEffectiveUserName(); } catch (NotesException e) { } } if ( user == null user.equals(STR)) { throw new NoAccessSignal(STR); } } | /**
* Verifies the current request has a user context (not Anonymous).
*/ | Verifies the current request has a user context (not Anonymous) | verifyUserContext | {
"repo_name": "iharkhukhrakou/XPagesExtensionLibrary",
"path": "extlib/lwp/product/runtime/eclipse/plugins/com.ibm.domino.das/src/com/ibm/domino/das/service/RestService.java",
"license": "apache-2.0",
"size": 9030
} | [
"com.ibm.domino.osgi.core.context.ContextInfo",
"com.ibm.xsp.acl.NoAccessSignal"
] | import com.ibm.domino.osgi.core.context.ContextInfo; import com.ibm.xsp.acl.NoAccessSignal; | import com.ibm.domino.osgi.core.context.*; import com.ibm.xsp.acl.*; | [
"com.ibm.domino",
"com.ibm.xsp"
] | com.ibm.domino; com.ibm.xsp; | 2,175,172 |
private void writeObject(ObjectOutputStream out) throws IOException {
maybeParse();
out.defaultWriteObject();
} | void function(ObjectOutputStream out) throws IOException { maybeParse(); out.defaultWriteObject(); } | /**
* Ensure object is fully parsed before invoking java serialization. The backing byte array
* is transient so if the object has parseLazy = true and hasn't invoked checkParse yet
* then data will be lost during serialization.
*/ | Ensure object is fully parsed before invoking java serialization. The backing byte array is transient so if the object has parseLazy = true and hasn't invoked checkParse yet then data will be lost during serialization | writeObject | {
"repo_name": "leafcoin/leafcoinj",
"path": "core/src/main/java/com/google/leafcoin/core/TransactionOutPoint.java",
"license": "apache-2.0",
"size": 7148
} | [
"java.io.IOException",
"java.io.ObjectOutputStream"
] | import java.io.IOException; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 857,139 |
Map<String, String> currentContainerConfigurationFiles(); | Map<String, String> currentContainerConfigurationFiles(); | /**
* Returns a map of all the current configuration files in the profiles of the current container with the file name as the key and the profile ID as the value
*/ | Returns a map of all the current configuration files in the profiles of the current container with the file name as the key and the profile ID as the value | currentContainerConfigurationFiles | {
"repo_name": "jonathanchristison/fabric8",
"path": "fabric/fabric-api/src/main/java/io/fabric8/api/jmx/FabricManagerMBean.java",
"license": "apache-2.0",
"size": 12059
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,541,832 |
@EndpointImplementation(Endpoints.STYLESHEET)
public String getStylesheet(String subreddit) throws NetworkException {
if (subreddit == null) throw new NullPointerException("subreddit cannot be null");
String path = "/r/" + subreddit + "/stylesheet";
HttpRequest r = request()
... | @EndpointImplementation(Endpoints.STYLESHEET) String function(String subreddit) throws NetworkException { if (subreddit == null) throw new NullPointerException(STR); String path = "/r/" + subreddit + STR; HttpRequest r = request() .path(path) .expected(MediaTypes.CSS.type()) .build(); RestResponse response = execute(r)... | /**
* Gets the contents of the CSS file affiliated with a given subreddit
* @param subreddit The name of the subreddit whose stylesheet will be fetched. Must not be null.
* @return The content of the raw CSS file
* @throws NetworkException If the request was not successful or the Content-Type header... | Gets the contents of the CSS file affiliated with a given subreddit | getStylesheet | {
"repo_name": "pokowaka/JRAW",
"path": "src/main/java/net/dean/jraw/RedditClient.java",
"license": "mit",
"size": 25791
} | [
"net.dean.jraw.http.HttpRequest",
"net.dean.jraw.http.MediaTypes",
"net.dean.jraw.http.NetworkException",
"net.dean.jraw.http.RestResponse"
] | import net.dean.jraw.http.HttpRequest; import net.dean.jraw.http.MediaTypes; import net.dean.jraw.http.NetworkException; import net.dean.jraw.http.RestResponse; | import net.dean.jraw.http.*; | [
"net.dean.jraw"
] | net.dean.jraw; | 652,769 |
PortStatistics nicStatistics(int nicId); | PortStatistics nicStatistics(int nicId); | /**
* Returns the statistics of a particular NIC
* of a server device.
*
* @param nicId ID of the NIC
* @return PortStatistics object for this NIC
*/ | Returns the statistics of a particular NIC of a server device | nicStatistics | {
"repo_name": "gkatsikas/onos",
"path": "drivers/server/src/main/java/org/onosproject/drivers/server/stats/MonitoringStatistics.java",
"license": "apache-2.0",
"size": 2297
} | [
"org.onosproject.net.device.PortStatistics"
] | import org.onosproject.net.device.PortStatistics; | import org.onosproject.net.device.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 66,054 |
public boolean interact(Player player)
{
ItemStack itemstack = player.inventory.getCurrentItem();
if (itemstack != null && itemstack.getItem() == Items.spawn_egg)
{
return super.interact(player);
}
else if (!this.isTame() && this.isUndead())
{
... | boolean function(Player player) { ItemStack itemstack = player.inventory.getCurrentItem(); if (itemstack != null && itemstack.getItem() == Items.spawn_egg) { return super.interact(player); } else if (!this.isTame() && this.isUndead()) { return false; } else if (this.isTame() && this.isAdultHorse() && player.isSneaking(... | /**
* Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig.
*/ | Called when a player interacts with a mob. e.g. gets milk from a cow, gets into the saddle on a pig | interact | {
"repo_name": "TorchPowered/Thallium",
"path": "src/main/java/net/minecraft/entity/passive/EntityHorse.java",
"license": "mit",
"size": 54229
} | [
"net.minecraft.block.Block",
"net.minecraft.entity.player.Player",
"net.minecraft.init.Blocks",
"net.minecraft.init.Items",
"net.minecraft.item.Item",
"net.minecraft.item.ItemStack"
] | import net.minecraft.block.Block; import net.minecraft.entity.player.Player; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; | import net.minecraft.block.*; import net.minecraft.entity.player.*; import net.minecraft.init.*; import net.minecraft.item.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.init",
"net.minecraft.item"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.init; net.minecraft.item; | 1,288,092 |
driver.get(context.sut.getBaseUrl());
exception.expect(PageVerificationException.class);
utils.initPage(ProblematicPage.class);
} | driver.get(context.sut.getBaseUrl()); exception.expect(PageVerificationException.class); utils.initPage(ProblematicPage.class); } | /**
* Check the taget/selenium-results folder after running this test.
*/ | Check the taget/selenium-results folder after running this test | initPage | {
"repo_name": "virgo/selenium-framework-demo",
"path": "src/test/java/hu/virgo/demo/testscripts/PageObjectTest.java",
"license": "mit",
"size": 679
} | [
"hu.virgo.demo.pages.ProblematicPage",
"hu.virgo.selenium.framework.page.verify.PageVerificationException"
] | import hu.virgo.demo.pages.ProblematicPage; import hu.virgo.selenium.framework.page.verify.PageVerificationException; | import hu.virgo.demo.pages.*; import hu.virgo.selenium.framework.page.verify.*; | [
"hu.virgo.demo",
"hu.virgo.selenium"
] | hu.virgo.demo; hu.virgo.selenium; | 2,124,823 |
private void startReloadSchemaThread() {
Thread thread = new Thread(new ReloadSchemaRunnable(), "XML Schema Importation");
thread.setPriority(Thread.NORM_PRIORITY - (Thread.NORM_PRIORITY - Thread.MIN_PRIORITY) /2);
thread.start();
}
private class ReloadSchemaRunnable implements Runnable {
private ... | void function() { Thread thread = new Thread(new ReloadSchemaRunnable(), STR); thread.setPriority(Thread.NORM_PRIORITY - (Thread.NORM_PRIORITY - Thread.MIN_PRIORITY) /2); thread.start(); } private class ReloadSchemaRunnable implements Runnable { private WaitDialog waitDialog; ReloadSchemaRunnable() { super(); initializ... | /**
* Starts a thread that will reload the XML schema.
*/ | Starts a thread that will reload the XML schema | startReloadSchemaThread | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "utils/eclipselink.utils.workbench/mappingsplugin/source/org/eclipse/persistence/tools/workbench/mappingsplugin/ui/schema/EditSchemaDialog.java",
"license": "epl-1.0",
"size": 11491
} | [
"org.eclipse.persistence.tools.workbench.framework.ui.dialog.WaitDialog"
] | import org.eclipse.persistence.tools.workbench.framework.ui.dialog.WaitDialog; | import org.eclipse.persistence.tools.workbench.framework.ui.dialog.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 2,325,006 |
int update(Param[] values, Param[] where) throws JDOException; | int update(Param[] values, Param[] where) throws JDOException; | /**
* <p>Update records.</p>
* @param values Param[] Values to be updated
* @param where Param[] Values for the filter clause
* @return int Count of updated records
* @throws JDOException
*/ | Update records | update | {
"repo_name": "sergiomt/judal",
"path": "core/src/main/java/org/judal/storage/table/SchemalessIndexableTable.java",
"license": "apache-2.0",
"size": 1783
} | [
"javax.jdo.JDOException",
"org.judal.storage.Param"
] | import javax.jdo.JDOException; import org.judal.storage.Param; | import javax.jdo.*; import org.judal.storage.*; | [
"javax.jdo",
"org.judal.storage"
] | javax.jdo; org.judal.storage; | 1,470,898 |
public void writeManifest(final Manifest manifest) throws IOException {
JarArchiveEntry entry = new JarArchiveEntry("META-INF/MANIFEST.MF");
writeEntry(entry, manifest::write);
} | void function(final Manifest manifest) throws IOException { JarArchiveEntry entry = new JarArchiveEntry(STR); writeEntry(entry, manifest::write); } | /**
* Write the specified manifest.
* @param manifest the manifest to write
* @throws IOException of the manifest cannot be written
*/ | Write the specified manifest | writeManifest | {
"repo_name": "deki/spring-boot",
"path": "spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java",
"license": "apache-2.0",
"size": 12570
} | [
"java.io.IOException",
"java.util.jar.Manifest",
"org.apache.commons.compress.archivers.jar.JarArchiveEntry"
] | import java.io.IOException; import java.util.jar.Manifest; import org.apache.commons.compress.archivers.jar.JarArchiveEntry; | import java.io.*; import java.util.jar.*; import org.apache.commons.compress.archivers.jar.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 2,190,976 |
private void loadDataStorageQuota() {
try {
dataStorageQuota = SpaceServiceFactory.getDataStorageSpaceQuotaService().get(
DataStorageSpaceQuotaKey.from(this));
} catch (final QuotaException qe) {
throw new QuotaRuntimeException("Space", SilverpeasException.ERROR,
"root.EX_CANT_... | void function() { try { dataStorageQuota = SpaceServiceFactory.getDataStorageSpaceQuotaService().get( DataStorageSpaceQuotaKey.from(this)); } catch (final QuotaException qe) { throw new QuotaRuntimeException("Space", SilverpeasException.ERROR, STR, qe); } } | /**
* Centralizes the data storage quota loading
*/ | Centralizes the data storage quota loading | loadDataStorageQuota | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "lib-core/src/main/java/com/stratelia/webactiv/beans/admin/SpaceInst.java",
"license": "agpl-3.0",
"size": 23190
} | [
"com.stratelia.webactiv.util.exception.SilverpeasException",
"org.silverpeas.admin.space.SpaceServiceFactory",
"org.silverpeas.admin.space.quota.DataStorageSpaceQuotaKey",
"org.silverpeas.quota.exception.QuotaException",
"org.silverpeas.quota.exception.QuotaRuntimeException"
] | import com.stratelia.webactiv.util.exception.SilverpeasException; import org.silverpeas.admin.space.SpaceServiceFactory; import org.silverpeas.admin.space.quota.DataStorageSpaceQuotaKey; import org.silverpeas.quota.exception.QuotaException; import org.silverpeas.quota.exception.QuotaRuntimeException; | import com.stratelia.webactiv.util.exception.*; import org.silverpeas.admin.space.*; import org.silverpeas.admin.space.quota.*; import org.silverpeas.quota.exception.*; | [
"com.stratelia.webactiv",
"org.silverpeas.admin",
"org.silverpeas.quota"
] | com.stratelia.webactiv; org.silverpeas.admin; org.silverpeas.quota; | 500,467 |
public void setAlimony(final IncomeandsourcesAlimonyEnum alimony) {
this.alimony = alimony;
} | void function(final IncomeandsourcesAlimonyEnum alimony) { this.alimony = alimony; } | /**
* Set the value related to the column: alimony.
* @param alimony the alimony value you wish to set
*/ | Set the value related to the column: alimony | setAlimony | {
"repo_name": "servinglynk/hmis-lynk-open-source",
"path": "hmis-model-v2016/src/main/java/com/servinglynk/hmis/warehouse/model/v2016/Incomeandsources.java",
"license": "mpl-2.0",
"size": 41587
} | [
"com.servinglynk.hmis.warehouse.enums.IncomeandsourcesAlimonyEnum"
] | import com.servinglynk.hmis.warehouse.enums.IncomeandsourcesAlimonyEnum; | import com.servinglynk.hmis.warehouse.enums.*; | [
"com.servinglynk.hmis"
] | com.servinglynk.hmis; | 484,992 |
public void execute(final TableQueryCallback<E> callback) throws MobileServiceException {
ListenableFuture<MobileServiceList<E>> executeFuture = execute(); | void function(final TableQueryCallback<E> callback) throws MobileServiceException { ListenableFuture<MobileServiceList<E>> executeFuture = execute(); | /**
* Executes a query to retrieve all the table rows
*
* @param callback Callback to invoke when the operation is completed
* @throws com.microsoft.windowsazure.mobileservices.MobileServiceException
* @deprecated use {@link #execute()} instead
*/ | Executes a query to retrieve all the table rows | execute | {
"repo_name": "Azure/azure-mobile-apps-android-client",
"path": "sdk/src/sdk/src/main/java/com/microsoft/windowsazure/mobileservices/table/MobileServiceTable.java",
"license": "apache-2.0",
"size": 32228
} | [
"com.google.common.util.concurrent.ListenableFuture",
"com.microsoft.windowsazure.mobileservices.MobileServiceException",
"com.microsoft.windowsazure.mobileservices.MobileServiceList"
] | import com.google.common.util.concurrent.ListenableFuture; import com.microsoft.windowsazure.mobileservices.MobileServiceException; import com.microsoft.windowsazure.mobileservices.MobileServiceList; | import com.google.common.util.concurrent.*; import com.microsoft.windowsazure.mobileservices.*; | [
"com.google.common",
"com.microsoft.windowsazure"
] | com.google.common; com.microsoft.windowsazure; | 1,174,696 |
VersionControlComponentMappingEntity registerFlowWithFlowRegistry(String groupId, StartVersionControlRequestEntity requestEntity); | VersionControlComponentMappingEntity registerFlowWithFlowRegistry(String groupId, StartVersionControlRequestEntity requestEntity); | /**
* Creates a snapshot of the Process Group with the given identifier, then creates a new Flow entity in the NiFi Registry
* and adds the snapshot of the Process Group as the first version of that flow.
*
* @param groupId the UUID of the Process Group
* @param requestEntity the details of the... | Creates a snapshot of the Process Group with the given identifier, then creates a new Flow entity in the NiFi Registry and adds the snapshot of the Process Group as the first version of that flow | registerFlowWithFlowRegistry | {
"repo_name": "InspurUSA/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 75521
} | [
"org.apache.nifi.web.api.entity.StartVersionControlRequestEntity",
"org.apache.nifi.web.api.entity.VersionControlComponentMappingEntity"
] | import org.apache.nifi.web.api.entity.StartVersionControlRequestEntity; import org.apache.nifi.web.api.entity.VersionControlComponentMappingEntity; | import org.apache.nifi.web.api.entity.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 1,815,863 |
public void fillEllipse(Rectangle rect, Color color) {
template.saveState();
setFill(color);
template.ellipse(origX + rect.getLeft(), origY + rect.getBottom(), origX + rect.getRight(),
origY + rect.getTop());
template.fill();
template.restoreState();
} | void function(Rectangle rect, Color color) { template.saveState(); setFill(color); template.ellipse(origX + rect.getLeft(), origY + rect.getBottom(), origX + rect.getRight(), origY + rect.getTop()); template.fill(); template.restoreState(); } | /**
* Draw an elliptical interior with this color.
*
* @param rect rectangle in which ellipse should fit
* @param color colour to use for filling
*/ | Draw an elliptical interior with this color | fillEllipse | {
"repo_name": "olivermay/geomajas",
"path": "plugin/geomajas-plugin-printing/printing/src/main/java/org/geomajas/plugin/printing/component/PdfContext.java",
"license": "agpl-3.0",
"size": 18358
} | [
"com.lowagie.text.Rectangle",
"java.awt.Color"
] | import com.lowagie.text.Rectangle; import java.awt.Color; | import com.lowagie.text.*; import java.awt.*; | [
"com.lowagie.text",
"java.awt"
] | com.lowagie.text; java.awt; | 2,087,278 |
public JAnnotation []getDeclaredAnnotations()
{
if (_annotations == null) {
Attribute attr = getAttribute("RuntimeVisibleAnnotations");
if (attr instanceof OpaqueAttribute) {
byte []buffer = ((OpaqueAttribute) attr).getValue();
try {
ByteArrayInputStream is = new ByteArra... | public JAnnotation []getDeclaredAnnotations() { if (_annotations == null) { Attribute attr = getAttribute(STR); if (attr instanceof OpaqueAttribute) { byte []buffer = ((OpaqueAttribute) attr).getValue(); try { ByteArrayInputStream is = new ByteArrayInputStream(buffer); ConstantPool cp = getConstantPool(); _annotations ... | /**
* Returns the declared annotations.
*/ | Returns the declared annotations | getDeclaredAnnotations | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/bytecode/JavaClass.java",
"license": "gpl-2.0",
"size": 16398
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.util.logging.Level"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.logging.Level; | import java.io.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 739,777 |
try {
HiveConf hiveConf = new HiveConf();
config.forEach(hiveConf::set);
return new HCatalogBeamSchema(new HiveMetaStoreClient(hiveConf));
} catch (Exception e) {
throw new RuntimeException(e);
}
} | try { HiveConf hiveConf = new HiveConf(); config.forEach(hiveConf::set); return new HCatalogBeamSchema(new HiveMetaStoreClient(hiveConf)); } catch (Exception e) { throw new RuntimeException(e); } } | /**
* Create the schema adapter.
*
* <p>Config map is used to construct the {@link HiveMetaStoreClient}.
*/ | Create the schema adapter. Config map is used to construct the <code>HiveMetaStoreClient</code> | create | {
"repo_name": "lukecwik/incubator-beam",
"path": "sdks/java/io/hcatalog/src/main/java/org/apache/beam/sdk/io/hcatalog/HCatalogBeamSchema.java",
"license": "apache-2.0",
"size": 3570
} | [
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.metastore.HiveMetaStoreClient"
] | import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.HiveMetaStoreClient; | import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.metastore.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,399,046 |
public Font getSelectedFont() {
Font font = new Font(getSelectedFontFamily(),
getSelectedFontStyle(), getSelectedFontSize());
return font;
} | Font function() { Font font = new Font(getSelectedFontFamily(), getSelectedFontStyle(), getSelectedFontSize()); return font; } | /**
* Get the selected font.
* @return the selected font
*
* @see #setSelectedFont
* @see java.awt.Font
**/ | Get the selected font | getSelectedFont | {
"repo_name": "dublinio/smile",
"path": "SmilePlot/src/main/java/smile/swing/FontChooser.java",
"license": "apache-2.0",
"size": 27193
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 385,418 |
private static TypeInfo generateMapTypeInfo(Schema schema,
Set<Schema> seenSchemas) throws AvroSerdeException {
assert schema.getType().equals(Schema.Type.MAP);
Schema valueType = schema.getValueType();
TypeInfo ti = generateTypeInfo(valueType, seenSchemas);
return TypeI... | static TypeInfo function(Schema schema, Set<Schema> seenSchemas) throws AvroSerdeException { assert schema.getType().equals(Schema.Type.MAP); Schema valueType = schema.getValueType(); TypeInfo ti = generateTypeInfo(valueType, seenSchemas); return TypeInfoFactory.getMapTypeInfo(TypeInfoFactory.getPrimitiveTypeInfo(STR),... | /**
* Generate a TypeInfo for an Avro Map. This is made slightly simpler in that
* Avro only allows maps with strings for keys.
*/ | Generate a TypeInfo for an Avro Map. This is made slightly simpler in that Avro only allows maps with strings for keys | generateMapTypeInfo | {
"repo_name": "prestodb/presto-hive-apache",
"path": "src/main/java/org/apache/hadoop/hive/serde2/avro/SchemaToTypeInfo.java",
"license": "apache-2.0",
"size": 12247
} | [
"java.util.Set",
"org.apache.avro.Schema",
"org.apache.hadoop.hive.serde2.typeinfo.TypeInfo",
"org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory"
] | import java.util.Set; import org.apache.avro.Schema; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory; | import java.util.*; import org.apache.avro.*; import org.apache.hadoop.hive.serde2.typeinfo.*; | [
"java.util",
"org.apache.avro",
"org.apache.hadoop"
] | java.util; org.apache.avro; org.apache.hadoop; | 1,869,930 |
CustomerData getCustomerDataByLicenseKey(@NonNull String licenseKey)
throws AuthenticationCredentialsNotFoundException; | CustomerData getCustomerDataByLicenseKey(@NonNull String licenseKey) throws AuthenticationCredentialsNotFoundException; | /**
* Translates a licenseKey to customer data.
*
* @param licenseKey The licenseKey to translate.
* @return A CustomerData object.
* @throws AuthenticationCredentialsNotFoundException iff the licenseKey was invalid.
*/ | Translates a licenseKey to customer data | getCustomerDataByLicenseKey | {
"repo_name": "crispab/codekvast",
"path": "product/server/common/src/main/java/io/codekvast/common/customer/CustomerService.java",
"license": "mit",
"size": 6537
} | [
"org.springframework.security.authentication.AuthenticationCredentialsNotFoundException"
] | import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; | import org.springframework.security.authentication.*; | [
"org.springframework.security"
] | org.springframework.security; | 238,529 |
public static Key<?> get(Type type) {
return new Key<Object>(type, NullAnnotationStrategy.INSTANCE);
} | static Key<?> function(Type type) { return new Key<Object>(type, NullAnnotationStrategy.INSTANCE); } | /**
* Gets a key for an injection type.
*/ | Gets a key for an injection type | get | {
"repo_name": "utopiazh/google-guice",
"path": "core/src/com/google/inject/Key.java",
"license": "apache-2.0",
"size": 14234
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 43,070 |
private static final int findLocalizedModifier(String modifierName) {
if (modifierName == null) {
return 0;
}
if (modifierName
.equalsIgnoreCase(Action.findModifierString(SWT.CTRL))) {
return SWT.CTRL;
}
if (modifierName
.equalsIgnoreCase(Action.findModifierString(SWT.SHIFT))) {
return SW... | static final int function(String modifierName) { if (modifierName == null) { return 0; } if (modifierName .equalsIgnoreCase(Action.findModifierString(SWT.CTRL))) { return SWT.CTRL; } if (modifierName .equalsIgnoreCase(Action.findModifierString(SWT.SHIFT))) { return SWT.SHIFT; } if (modifierName.equalsIgnoreCase(Action.... | /**
* Maps the localized modifier name to a code in the same manner as
* {@link org.eclipse.jface.action.Action#findModifier
* Action.findModifier()}.
*
* @param modifierName
* the modifier name
* @return the SWT modifier bit, or {@code 0} if no match was found
*/ | Maps the localized modifier name to a code in the same manner as <code>org.eclipse.jface.action.Action#findModifier Action.findModifier()</code> | findLocalizedModifier | {
"repo_name": "SmithAndr/egit",
"path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/dialogs/HyperlinkSourceViewer.java",
"license": "epl-1.0",
"size": 14129
} | [
"org.eclipse.jface.action.Action"
] | import org.eclipse.jface.action.Action; | import org.eclipse.jface.action.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 1,320,041 |
super.init(TestUserMode.SUPER_TENANT_USER);
} | super.init(TestUserMode.SUPER_TENANT_USER); } | /**
* Initializing test case
*
* @throws XPathExpressionException if the test initialization fails
*/ | Initializing test case | prepare | {
"repo_name": "wso2/product-ei",
"path": "integration/broker-tests/tests-integration/tests-amqp/src/test/java/org/wso2/mb/integration/tests/amqp/functional/dtx/DtxPrepareNegativeTestCase.java",
"license": "apache-2.0",
"size": 9214
} | [
"org.wso2.carbon.automation.engine.context.TestUserMode"
] | import org.wso2.carbon.automation.engine.context.TestUserMode; | import org.wso2.carbon.automation.engine.context.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 1,040,891 |
public static <T extends KademliaOverlayID> KademliaOverlayContact<T> createContact(
T id, int randomNumber) {
NetID someNetID;
TransInfo someTransportAddress;
KademliaOverlayContact<T> result;
someNetID = new SimpleNetID(randomNumber);
someTransportAddress = DefaultTransInfo.getTransInfo(someNetID,
... | static <T extends KademliaOverlayID> KademliaOverlayContact<T> function( T id, int randomNumber) { NetID someNetID; TransInfo someTransportAddress; KademliaOverlayContact<T> result; someNetID = new SimpleNetID(randomNumber); someTransportAddress = DefaultTransInfo.getTransInfo(someNetID, (short) (2 * randomNumber)); re... | /**
* Creates a KademliaOverlayContact with the given <code>id</code>, and
* pseudo TransportAddress.
*
* @param id
* the KademliaOverlayID to be used in the new contact.
* @param randomNumber
* some random number used to generate NetIDs and ports needed in
* TransportA... | Creates a KademliaOverlayContact with the given <code>id</code>, and pseudo TransportAddress | createContact | {
"repo_name": "flyroom/PeerfactSimKOM_Clone",
"path": "test/org/peerfact/util/helpers/TestHelper.java",
"license": "gpl-2.0",
"size": 4673
} | [
"org.peerfact.api.network.NetID",
"org.peerfact.api.transport.TransInfo",
"org.peerfact.impl.network.simple.SimpleNetID",
"org.peerfact.impl.overlay.dht.kademlia.base.components.KademliaOverlayContact",
"org.peerfact.impl.overlay.dht.kademlia.base.components.KademliaOverlayID",
"org.peerfact.impl.transpor... | import org.peerfact.api.network.NetID; import org.peerfact.api.transport.TransInfo; import org.peerfact.impl.network.simple.SimpleNetID; import org.peerfact.impl.overlay.dht.kademlia.base.components.KademliaOverlayContact; import org.peerfact.impl.overlay.dht.kademlia.base.components.KademliaOverlayID; import org.peerf... | import org.peerfact.api.network.*; import org.peerfact.api.transport.*; import org.peerfact.impl.network.simple.*; import org.peerfact.impl.overlay.dht.kademlia.base.components.*; import org.peerfact.impl.transport.*; | [
"org.peerfact.api",
"org.peerfact.impl"
] | org.peerfact.api; org.peerfact.impl; | 2,023,645 |
if (path == null) {
return null;
}
if (new File(path).exists()) {
try {
return new File(path).toURI().toURL();
} catch (Exception e) {
return null;
}
} else {
URL res = Classes.getResource(path);... | if (path == null) { return null; } if (new File(path).exists()) { try { return new File(path).toURI().toURL(); } catch (Exception e) { return null; } } else { URL res = Classes.getResource(path); if (res != null) { return res; } } return null; } | /**
* Locate the file or throw an exception.
* @param path
* @return
*/ | Locate the file or throw an exception | locateFile | {
"repo_name": "tadayosi/switchyard",
"path": "core/validate/src/main/java/org/switchyard/validate/xml/internal/XmlValidatorDTDResolver.java",
"license": "apache-2.0",
"size": 4185
} | [
"java.io.File",
"org.switchyard.common.type.Classes"
] | import java.io.File; import org.switchyard.common.type.Classes; | import java.io.*; import org.switchyard.common.type.*; | [
"java.io",
"org.switchyard.common"
] | java.io; org.switchyard.common; | 2,716,642 |
public void prepForModal() {
RelativeLayout blackOutLayer = (RelativeLayout)findViewById(R.id.settings_fog);
RelativeLayout mainBackLayer = (RelativeLayout)findViewById(R.id.object_detail_main);
ScrollView scroller = (ScrollView)findViewById(R.id.object_detail_scroll_view);
mainBackLayer.setEnabled(false)... | void function() { RelativeLayout blackOutLayer = (RelativeLayout)findViewById(R.id.settings_fog); RelativeLayout mainBackLayer = (RelativeLayout)findViewById(R.id.object_detail_main); ScrollView scroller = (ScrollView)findViewById(R.id.object_detail_scroll_view); mainBackLayer.setEnabled(false); scroller.setEnabled(fal... | /**
* Helper method to dim out the background and make the list view unclickable in preparation to display a modal
*/ | Helper method to dim out the background and make the list view unclickable in preparation to display a modal | prepForModal | {
"repo_name": "alphonzo79/MobileObservingLog",
"path": "app/src/main/java/com/mobileobservinglog/ObjectDetailScreen.java",
"license": "mit",
"size": 67684
} | [
"android.view.View",
"android.widget.RelativeLayout",
"android.widget.ScrollView"
] | import android.view.View; import android.widget.RelativeLayout; import android.widget.ScrollView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,397,108 |
protected void stopWebApp(Deployment deployment) throws Exception {
WebDeploymentController context;
try {
context = deployment.getAttachment(WebDeploymentController.class);
context.stop();
} catch (Exception e) {
throw WSLogger.ROOT_LOGGER.stopContextPhas... | void function(Deployment deployment) throws Exception { WebDeploymentController context; try { context = deployment.getAttachment(WebDeploymentController.class); context.stop(); } catch (Exception e) { throw WSLogger.ROOT_LOGGER.stopContextPhaseFailed(e); } try { context.destroy(); } catch (Exception e) { throw WSLogge... | /**
* Stops the webapp serving the provided ws deployment
*
* @param deployment
* @throws Exception
*/ | Stops the webapp serving the provided ws deployment | stopWebApp | {
"repo_name": "tomazzupan/wildfly",
"path": "webservices/server-integration/src/main/java/org/jboss/as/webservices/publish/EndpointPublisherImpl.java",
"license": "lgpl-2.1",
"size": 17058
} | [
"org.jboss.as.web.host.WebDeploymentController",
"org.jboss.as.webservices.logging.WSLogger",
"org.jboss.wsf.spi.deployment.Deployment"
] | import org.jboss.as.web.host.WebDeploymentController; import org.jboss.as.webservices.logging.WSLogger; import org.jboss.wsf.spi.deployment.Deployment; | import org.jboss.as.web.host.*; import org.jboss.as.webservices.logging.*; import org.jboss.wsf.spi.deployment.*; | [
"org.jboss.as",
"org.jboss.wsf"
] | org.jboss.as; org.jboss.wsf; | 2,379,623 |
//-----------------------------------------------------------------------
public ExternalIdBean getUnderlying() {
return _underlying;
} | ExternalIdBean function() { return _underlying; } | /**
* Gets the underlying.
* @return the value of the property
*/ | Gets the underlying | getUnderlying | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-MasterDB/src/main/java/com/opengamma/masterdb/security/hibernate/fra/FRASecurityBean.java",
"license": "apache-2.0",
"size": 17419
} | [
"com.opengamma.masterdb.security.hibernate.ExternalIdBean"
] | import com.opengamma.masterdb.security.hibernate.ExternalIdBean; | import com.opengamma.masterdb.security.hibernate.*; | [
"com.opengamma.masterdb"
] | com.opengamma.masterdb; | 2,705,235 |
public void test_copyOf_$II() throws Exception {
int[] result = Arrays.copyOf(intArray, arraySize * 2);
int i = 0;
for (; i < arraySize; i++) {
assertEquals(i, result[i]);
}
for (; i < result.length; i++) {
assertEquals(0, result[i]);
}
... | public void test_copyOf_$II() throws Exception { int[] result = Arrays.copyOf(intArray, arraySize * 2); int i = 0; for (; i < arraySize; i++) { assertEquals(i, result[i]); } for (; i < result.length; i++) { assertEquals(0, result[i]); } result = Arrays.copyOf(intArray, arraySize / 2); i = 0; for (; i < result.length; i... | /**
* {@link java.util.Arrays#copyOf(int[], int)
*/ | {@link java.util.Arrays#copyOf(int[], int) | test_copyOf_$II | {
"repo_name": "mirego/j2objc",
"path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java",
"license": "apache-2.0",
"size": 207868
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,183,384 |
XHTMLExtension xhtmlExtension = (XHTMLExtension) message.getExtension("html", namespace);
if (xhtmlExtension != null)
return xhtmlExtension.getBodies();
else
return null;
} | XHTMLExtension xhtmlExtension = (XHTMLExtension) message.getExtension("html", namespace); if (xhtmlExtension != null) return xhtmlExtension.getBodies(); else return null; } | /**
* Returns an Iterator for the XHTML bodies in the message. Returns null if
* the message does not contain an XHTML extension.
*
* @param message an XHTML message
* @return an Iterator for the bodies in the message or null if none.
*/ | Returns an Iterator for the XHTML bodies in the message. Returns null if the message does not contain an XHTML extension | getBodies | {
"repo_name": "jtietema/telegraph",
"path": "app/libs/asmack-android-16-source/org/jivesoftware/smackx/XHTMLManager.java",
"license": "gpl-3.0",
"size": 5445
} | [
"org.jivesoftware.smackx.packet.XHTMLExtension"
] | import org.jivesoftware.smackx.packet.XHTMLExtension; | import org.jivesoftware.smackx.packet.*; | [
"org.jivesoftware.smackx"
] | org.jivesoftware.smackx; | 2,435,710 |
public void addImage(PDFPage page, ImageInfo info, Bitmap image,
PDFRenderer renderer) {
addImageRecord(page, info, image, renderer);
} | void function(PDFPage page, ImageInfo info, Bitmap image, PDFRenderer renderer) { addImageRecord(page, info, image, renderer); } | /**
* Add an image to the cache. This method should be used for images
* which are still in the process of being rendered.
*
* @param page the page this image is associated with
* @param info the image info associated with this image
* @param image the image to add
* @param renderer ... | Add an image to the cache. This method should be used for images which are still in the process of being rendered | addImage | {
"repo_name": "erpragatisingh/androidTraining",
"path": "Android_6_weekTraning/AndroidPdfViewer/src/com/sun/pdfview/Cache.java",
"license": "gpl-2.0",
"size": 9784
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,110,424 |
@Test
public void readsByte() throws IOException {
final String data = "test";
final InputStream stream = new RqLengthAware(
new RqFake(
Arrays.asList(
"GET /test1",
"Host: b.example.com",
contentLengthHeader... | void function() throws IOException { final String data = "test"; final InputStream stream = new RqLengthAware( new RqFake( Arrays.asList( STR, STR, contentLengthHeader(data.getBytes().length) ), data ) ).body(); MatcherAssert.assertThat( stream.read(), Matchers.equalTo((int) data.getBytes()[0]) ); MatcherAssert.assertT... | /**
* RqLengthAware can read byte.
* @throws IOException If some problem inside
*/ | RqLengthAware can read byte | readsByte | {
"repo_name": "dalifreire/takes",
"path": "src/test/java/org/takes/rq/RqLengthAwareTest.java",
"license": "mit",
"size": 5760
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.Arrays",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import java.io.*; import java.util.*; import org.hamcrest.*; | [
"java.io",
"java.util",
"org.hamcrest"
] | java.io; java.util; org.hamcrest; | 2,355 |
public static void makeGrid(Container parent, int rows, int cols,
int initialX, int initialY, int xPad, int yPad) {
SpringLayout layout;
try {
layout = (SpringLayout) parent.getLayout();
} catch (ClassCastException exc) {
System.err
.println("The first argument to makeGrid must use SpringLayout."... | static void function(Container parent, int rows, int cols, int initialX, int initialY, int xPad, int yPad) { SpringLayout layout; try { layout = (SpringLayout) parent.getLayout(); } catch (ClassCastException exc) { System.err .println(STR); return; } Spring xPadSpring = Spring.constant(xPad); Spring yPadSpring = Spring... | /**
* Aligns the first <code>rows</code> <code>cols</code> components of
* <code>parent</code> in a grid. Each component is as big as the maximum
* preferred width and height of the components. The parent is made just big
* enough to fit them all.
*
* @param rows
* number of rows
* @param co... | Aligns the first <code>rows</code> <code>cols</code> components of <code>parent</code> in a grid. Each component is as big as the maximum preferred width and height of the components. The parent is made just big enough to fit them all | makeGrid | {
"repo_name": "harryho/demo-r-java-statistics-prototype",
"path": "rm/rm/src/com/rm/app/util/SpringUtilities.java",
"license": "mit",
"size": 6165
} | [
"java.awt.Container",
"javax.swing.Spring",
"javax.swing.SpringLayout"
] | import java.awt.Container; import javax.swing.Spring; import javax.swing.SpringLayout; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,474,614 |
List<PaymentMethod> getPaymentMethods(Order order); | List<PaymentMethod> getPaymentMethods(Order order); | /**
* Returns the available payment methods for the informed order.
*
* @param order
* @return
*/ | Returns the available payment methods for the informed order | getPaymentMethods | {
"repo_name": "raphaelazzolini/mercurius",
"path": "mercurius/order-mgr/order-mgr-spec/src/main/java/br/unicamp/ic/lsd/mercurius/ordermgr/spec/prov/OrderMgt.java",
"license": "apache-2.0",
"size": 3657
} | [
"br.unicamp.ic.lsd.mercurius.datatype.Order",
"br.unicamp.ic.lsd.mercurius.datatype.PaymentMethod",
"java.util.List"
] | import br.unicamp.ic.lsd.mercurius.datatype.Order; import br.unicamp.ic.lsd.mercurius.datatype.PaymentMethod; import java.util.List; | import br.unicamp.ic.lsd.mercurius.datatype.*; import java.util.*; | [
"br.unicamp.ic",
"java.util"
] | br.unicamp.ic; java.util; | 2,417,811 |
protected static Optional<String> getTicketGrantingTicketId(final SingleSignOnParticipationRequest ssoRequest) {
return Optional.ofNullable(ssoRequest.getRequestContext()
.map(WebUtils::getTicketGrantingTicketId)
.orElseGet(() -> ssoRequest.getAttributeValue(TicketGrantingTicket.clas... | static Optional<String> function(final SingleSignOnParticipationRequest ssoRequest) { return Optional.ofNullable(ssoRequest.getRequestContext() .map(WebUtils::getTicketGrantingTicketId) .orElseGet(() -> ssoRequest.getAttributeValue(TicketGrantingTicket.class.getName(), String.class))); } | /**
* Gets ticket granting ticket id.
*
* @param ssoRequest the sso request
* @return the ticket granting ticket id
*/ | Gets ticket granting ticket id | getTicketGrantingTicketId | {
"repo_name": "apereo/cas",
"path": "core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/BaseSingleSignOnParticipationStrategy.java",
"license": "apache-2.0",
"size": 3070
} | [
"java.util.Optional",
"org.apereo.cas.ticket.TicketGrantingTicket",
"org.apereo.cas.web.support.WebUtils"
] | import java.util.Optional; import org.apereo.cas.ticket.TicketGrantingTicket; import org.apereo.cas.web.support.WebUtils; | import java.util.*; import org.apereo.cas.ticket.*; import org.apereo.cas.web.support.*; | [
"java.util",
"org.apereo.cas"
] | java.util; org.apereo.cas; | 2,176,226 |
public String getId() {
byte[] attr = getAttribute(ID_ATRIBUTE);
return attr == null? null: Bytes.toString(attr);
} | String function() { byte[] attr = getAttribute(ID_ATRIBUTE); return attr == null? null: Bytes.toString(attr); } | /**
* This method allows you to retrieve the identifier for the operation if one
* was set.
* @return the id or null if not set
*/ | This method allows you to retrieve the identifier for the operation if one was set | getId | {
"repo_name": "daidong/DominoHBase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/client/OperationWithAttributes.java",
"license": "apache-2.0",
"size": 3394
} | [
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,328,204 |
private static HashMap<String,URL> getauxiliaryURLs(URL auxdirURL, Set<String> requiredauxfiles) {
HashMap<String, URL> foundauxfiles = new HashMap<String, URL>();
String inputAuxLine;
try {
URL parent = new URL(auxdirURL,".");
String relauxiliary=auxdirURL.getFile();
... | static HashMap<String,URL> function(URL auxdirURL, Set<String> requiredauxfiles) { HashMap<String, URL> foundauxfiles = new HashMap<String, URL>(); String inputAuxLine; try { URL parent = new URL(auxdirURL,"."); String relauxiliary=auxdirURL.getFile(); URLConnection urlconauxiliary = auxdirURL.openConnection(); Buffere... | /**
* Private method for obtaining a hashmap of URLs for named auxiliary files, whether in a file directory, web directory or web page
*
* @param auxdirURL
* URL to the directory containing auxiliary files or web page linking to auxiliary files
* @param requiredauxfiles
* Set of... | Private method for obtaining a hashmap of URLs for named auxiliary files, whether in a file directory, web directory or web page | getauxiliaryURLs | {
"repo_name": "Auto-ID-Lab-Japan/fosstrak-tdt",
"path": "src/main/java/org/fosstrak/tdt/TDTEngine.java",
"license": "lgpl-2.1",
"size": 96390
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.net.MalformedURLException",
"java.net.URLConnection",
"java.util.HashMap",
"java.util.Set",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URLConnection; import java.util.HashMap; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 2,440,598 |
RawWoof.run(args, (socketCount, server, port, database, username,
password) -> new SqlClientOfficeFloorMain(socketCount, server, port, database, username, password));
}
private static class Connections {
private int index = -1;
private final PgConnection[] connections;
private Connections(PgConnection... | RawWoof.run(args, (socketCount, server, port, database, username, password) -> new SqlClientOfficeFloorMain(socketCount, server, port, database, username, password)); } private static class Connections { private int index = -1; private final PgConnection[] connections; private Connections(PgConnection[] connections) { ... | /**
* Run application.
*/ | Run application | main | {
"repo_name": "sumeetchhetri/FrameworkBenchmarks",
"path": "frameworks/Java/officefloor/src/woof_benchmark_sqlclient/src/main/java/net/officefloor/benchmark/SqlClientOfficeFloorMain.java",
"license": "bsd-3-clause",
"size": 8761
} | [
"io.vertx.pgclient.PgConnection"
] | import io.vertx.pgclient.PgConnection; | import io.vertx.pgclient.*; | [
"io.vertx.pgclient"
] | io.vertx.pgclient; | 931,786 |
public boolean nodeConnected(DiscoveryNode node) {
return isLocalNode(node) || connectionManager.nodeConnected(node);
} | boolean function(DiscoveryNode node) { return isLocalNode(node) connectionManager.nodeConnected(node); } | /**
* Returns <code>true</code> iff the given node is already connected.
*/ | Returns <code>true</code> iff the given node is already connected | nodeConnected | {
"repo_name": "scorpionvicky/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/transport/TransportService.java",
"license": "apache-2.0",
"size": 57483
} | [
"org.elasticsearch.cluster.node.DiscoveryNode"
] | import org.elasticsearch.cluster.node.DiscoveryNode; | import org.elasticsearch.cluster.node.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 2,174,267 |
protected void healCluster(ClusterModel clusterModel, Set<Goal> optimizedGoals)
throws AnalysisInputException, ModelInputException {
// Move self healed replicas (if their broker is overloaded or they reside at dead brokers) to eligible ones.
for (Replica replica : clusterModel.selfHealingEligibleReplic... | void function(ClusterModel clusterModel, Set<Goal> optimizedGoals) throws AnalysisInputException, ModelInputException { for (Replica replica : clusterModel.selfHealingEligibleReplicas()) { _replicaDistributionTarget.moveSelfHealingEligibleReplicaToEligibleBroker(clusterModel, replica, replica.broker().replicas().size()... | /**
* Heal the given cluster without violating the requirements of optimized goals.
*
* @param clusterModel The state of the cluster.
* @param optimizedGoals Optimized goals.
*/ | Heal the given cluster without violating the requirements of optimized goals | healCluster | {
"repo_name": "GergoHong/cruise-control",
"path": "cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/analyzer/goals/ReplicaDistributionGoal.java",
"license": "bsd-2-clause",
"size": 9525
} | [
"com.linkedin.kafka.cruisecontrol.exception.AnalysisInputException",
"com.linkedin.kafka.cruisecontrol.exception.ModelInputException",
"com.linkedin.kafka.cruisecontrol.model.ClusterModel",
"com.linkedin.kafka.cruisecontrol.model.Replica",
"java.util.Set"
] | import com.linkedin.kafka.cruisecontrol.exception.AnalysisInputException; import com.linkedin.kafka.cruisecontrol.exception.ModelInputException; import com.linkedin.kafka.cruisecontrol.model.ClusterModel; import com.linkedin.kafka.cruisecontrol.model.Replica; import java.util.Set; | import com.linkedin.kafka.cruisecontrol.exception.*; import com.linkedin.kafka.cruisecontrol.model.*; import java.util.*; | [
"com.linkedin.kafka",
"java.util"
] | com.linkedin.kafka; java.util; | 1,530,422 |
public void registerLogger(String name, Logger logger)
{
checkNotNull(logger, "Logger cannot be null!");
checkNotNull(name, "Name cannot be null!");
checkArgument(!name.isEmpty(), "Name cannot be empty");
this.loggers.put(name, logger);
} | void function(String name, Logger logger) { checkNotNull(logger, STR); checkNotNull(name, STR); checkArgument(!name.isEmpty(), STR); this.loggers.put(name, logger); } | /**
* Registers a new child logger. Logged messages will be distributed to all registered child
* loggers.
*
* @param name The name of the logger
* @param logger The logger
*/ | Registers a new child logger. Logged messages will be distributed to all registered child loggers | registerLogger | {
"repo_name": "Featherblade/VoxelGunsmith",
"path": "src/main/java/com/voxelplugineering/voxelsniper/GunsmithLogger.java",
"license": "mit",
"size": 6625
} | [
"com.google.common.base.Preconditions",
"com.voxelplugineering.voxelsniper.service.logging.Logger"
] | import com.google.common.base.Preconditions; import com.voxelplugineering.voxelsniper.service.logging.Logger; | import com.google.common.base.*; import com.voxelplugineering.voxelsniper.service.logging.*; | [
"com.google.common",
"com.voxelplugineering.voxelsniper"
] | com.google.common; com.voxelplugineering.voxelsniper; | 2,614,358 |
public String getJobParameterDescription( ObjectId id_job, int nr ) throws KettleException {
return repository.connectionDelegate.getJobAttributeString(
id_job, nr, KettleDatabaseRepository.JOB_ATTRIBUTE_PARAM_DESCRIPTION );
} | String function( ObjectId id_job, int nr ) throws KettleException { return repository.connectionDelegate.getJobAttributeString( id_job, nr, KettleDatabaseRepository.JOB_ATTRIBUTE_PARAM_DESCRIPTION ); } | /**
* Get a job parameter description. You can count the number of parameters up front.
*
* @param id_job
* job id
* @param nr
* number of the parameter
* @return the description of the parameter
*
* @throws KettleException
* Upon any error.
*/ | Get a job parameter description. You can count the number of parameters up front | getJobParameterDescription | {
"repo_name": "nicoben/pentaho-kettle",
"path": "engine/src/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryJobDelegate.java",
"license": "apache-2.0",
"size": 45329
} | [
"org.pentaho.di.core.exception.KettleException",
"org.pentaho.di.repository.ObjectId",
"org.pentaho.di.repository.kdr.KettleDatabaseRepository"
] | import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.repository.ObjectId; import org.pentaho.di.repository.kdr.KettleDatabaseRepository; | import org.pentaho.di.core.exception.*; import org.pentaho.di.repository.*; import org.pentaho.di.repository.kdr.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 670,125 |
public static VAlarm getDisplayAlarm(Component component) {
ComponentList<VAlarm> alarms = null;
if(component instanceof VEvent) {
alarms = ((VEvent) component).getAlarms();
}
else if(component instanceof VToDo) {
alarms = ((VToDo) component).getAlarm... | static VAlarm function(Component component) { ComponentList<VAlarm> alarms = null; if(component instanceof VEvent) { alarms = ((VEvent) component).getAlarms(); } else if(component instanceof VToDo) { alarms = ((VToDo) component).getAlarms(); } if(alarms==null alarms.size()==0) { return null; } for(Iterator<VAlarm> it =... | /**
* Find and return the first DISPLAY VALARM in a comoponent
* @param component VEVENT or VTODO
* @return first DISPLAY VALARM, null if there is none
*/ | Find and return the first DISPLAY VALARM in a comoponent | getDisplayAlarm | {
"repo_name": "1and1/cosmo",
"path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/calendar/ICalendarUtils.java",
"license": "apache-2.0",
"size": 23897
} | [
"java.util.Iterator",
"net.fortuna.ical4j.model.Component",
"net.fortuna.ical4j.model.ComponentList",
"net.fortuna.ical4j.model.component.VAlarm",
"net.fortuna.ical4j.model.component.VEvent",
"net.fortuna.ical4j.model.component.VToDo",
"net.fortuna.ical4j.model.property.Action"
] | import java.util.Iterator; import net.fortuna.ical4j.model.Component; import net.fortuna.ical4j.model.ComponentList; import net.fortuna.ical4j.model.component.VAlarm; import net.fortuna.ical4j.model.component.VEvent; import net.fortuna.ical4j.model.component.VToDo; import net.fortuna.ical4j.model.property.Action; | import java.util.*; import net.fortuna.ical4j.model.*; import net.fortuna.ical4j.model.component.*; import net.fortuna.ical4j.model.property.*; | [
"java.util",
"net.fortuna.ical4j"
] | java.util; net.fortuna.ical4j; | 1,586,419 |
public HttpClient verifyHost(Env env, BooleanValue verifyHost) {
PhpTypes.assertNotNull(env, verifyHost, "Value to Vertx\\Http\\HttpClient::verifyHost() must be a boolean.");
client.setVerifyHost(verifyHost.toBoolean());
return this;
} | HttpClient function(Env env, BooleanValue verifyHost) { PhpTypes.assertNotNull(env, verifyHost, STR); client.setVerifyHost(verifyHost.toBoolean()); return this; } | /**
* Sets verify host.
*/ | Sets verify host | verifyHost | {
"repo_name": "khasinski/mod-lang-php",
"path": "src/main/java/io/vertx/lang/php/http/HttpClient.java",
"license": "mit",
"size": 8868
} | [
"com.caucho.quercus.env.BooleanValue",
"com.caucho.quercus.env.Env",
"io.vertx.lang.php.util.PhpTypes"
] | import com.caucho.quercus.env.BooleanValue; import com.caucho.quercus.env.Env; import io.vertx.lang.php.util.PhpTypes; | import com.caucho.quercus.env.*; import io.vertx.lang.php.util.*; | [
"com.caucho.quercus",
"io.vertx.lang"
] | com.caucho.quercus; io.vertx.lang; | 1,407,567 |
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
// Extract attributes and parameters we will need
MessageResources messages = getResources(request);
H... | ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { MessageResources messages = getResources(request); HttpSession session = request.getSession(); SubscriptionForm subform = (SubscriptionForm) form; String action = subform.getAction... | /**
* Process the specified HTTP request, and create the corresponding HTTP
* response (or forward to another web component that will create it).
* Return an <code>ActionForward</code> instance describing where and how
* control should be forwarded, or <code>null</code> if the response has
* al... | Process the specified HTTP request, and create the corresponding HTTP response (or forward to another web component that will create it). Return an <code>ActionForward</code> instance describing where and how control should be forwarded, or <code>null</code> if the response has already been completed | execute | {
"repo_name": "shuliangtao/struts-1.3.10",
"path": "src/apps/faces-example1/src/main/java/org/apache/struts/webapp/example/SaveSubscriptionAction.java",
"license": "apache-2.0",
"size": 7447
} | [
"java.lang.reflect.InvocationTargetException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"org.apache.commons.beanutils.PropertyUtils",
"org.apache.struts.action.ActionForm",
"org.apache.struts.... | import java.lang.reflect.InvocationTargetException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.commons.beanutils.PropertyUtils; import org.apache.struts.action.ActionForm; im... | import java.lang.reflect.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.commons.beanutils.*; import org.apache.struts.action.*; import org.apache.struts.util.*; | [
"java.lang",
"javax.servlet",
"org.apache.commons",
"org.apache.struts"
] | java.lang; javax.servlet; org.apache.commons; org.apache.struts; | 1,910,672 |
public final TObjectPrototype getSymbolObjectType() {
return getEObjectOrProxy(QN_SYMBOL_OBJECT);
} | final TObjectPrototype function() { return getEObjectOrProxy(QN_SYMBOL_OBJECT); } | /**
* Returns the built-in object type "Symbol" (upper case!).
*/ | Returns the built-in object type "Symbol" (upper case!) | getSymbolObjectType | {
"repo_name": "lbeurerkellner/n4js",
"path": "plugins/org.eclipse.n4js.ts/src/org/eclipse/n4js/ts/scoping/builtin/BuiltInTypeScope.java",
"license": "epl-1.0",
"size": 16124
} | [
"org.eclipse.n4js.ts.types.TObjectPrototype"
] | import org.eclipse.n4js.ts.types.TObjectPrototype; | import org.eclipse.n4js.ts.types.*; | [
"org.eclipse.n4js"
] | org.eclipse.n4js; | 2,138,414 |
public boolean hasCurrentRole(String roleToCheck) {
Set<String> roles = getCurrentRoles();
return roles.contains(roleToCheck);
}
| boolean function(String roleToCheck) { Set<String> roles = getCurrentRoles(); return roles.contains(roleToCheck); } | /**
* Controlla se l'utente attuale possiede il ruolo specificato. Case Sensitive!
* @param roleToCheck nel formato senza ROLE_ iniziale
* @return
*/ | Controlla se l'utente attuale possiede il ruolo specificato. Case Sensitive | hasCurrentRole | {
"repo_name": "xtianus/yadaframework",
"path": "YadaWebSecurity/src/main/java/net/yadaframework/security/components/YadaSecurityUtil.java",
"license": "mit",
"size": 11827
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 755,073 |
public com.mozu.api.contracts.reference.TimeZoneCollection getTimeZones(String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.reference.TimeZoneCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getTimeZonesClient( responseFields);
client.setContext(_apiContext);
... | com.mozu.api.contracts.reference.TimeZoneCollection function(String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.reference.TimeZoneCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getTimeZonesClient( responseFields); client.setContext(_apiContext); client.executeRequest(); ... | /**
*
* <p><pre><code>
* ReferenceData referencedata = new ReferenceData();
* TimeZoneCollection timeZoneCollection = referencedata.getTimeZones( responseFields);
* </code></pre></p>
* @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned i... | <code><code> ReferenceData referencedata = new ReferenceData(); TimeZoneCollection timeZoneCollection = referencedata.getTimeZones( responseFields); </code></code> | getTimeZones | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java",
"license": "mit",
"size": 21126
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 612,717 |
public void setTitle(String title) {
JavaScript.eval(
"document.querySelector('#"
+ getId()
+ " .fakewindowheader').innerHTML = '"
+ StringEscapeUtils.escapeJavaScript(title)
+ "'");
} | void function(String title) { JavaScript.eval( STR + getId() + STR + StringEscapeUtils.escapeJavaScript(title) + "'"); } | /**
* Sets the window title.<p>
*
* @param title the new window title
*/ | Sets the window title | setTitle | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/ui/report/CmsReportOverlay.java",
"license": "lgpl-2.1",
"size": 4700
} | [
"com.vaadin.ui.JavaScript",
"org.apache.commons.lang.StringEscapeUtils"
] | import com.vaadin.ui.JavaScript; import org.apache.commons.lang.StringEscapeUtils; | import com.vaadin.ui.*; import org.apache.commons.lang.*; | [
"com.vaadin.ui",
"org.apache.commons"
] | com.vaadin.ui; org.apache.commons; | 2,199,728 |
public IDataset getMaterial();
| IDataset function(); | /**
* Absorbing material of the aperture
*
* @return the value.
*/ | Absorbing material of the aperture | getMaterial | {
"repo_name": "jamesmudd/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXaperture.java",
"license": "epl-1.0",
"size": 6548
} | [
"org.eclipse.january.dataset.IDataset"
] | import org.eclipse.january.dataset.IDataset; | import org.eclipse.january.dataset.*; | [
"org.eclipse.january"
] | org.eclipse.january; | 2,110,307 |
public long set(long instant, int year) {
FieldUtils.verifyValueBounds(this, year, 1, getMaximumValue());
if (iChronology.getYear(instant) <= 0) {
year = 1 - year;
}
return super.set(instant, year);
}
| long function(long instant, int year) { FieldUtils.verifyValueBounds(this, year, 1, getMaximumValue()); if (iChronology.getYear(instant) <= 0) { year = 1 - year; } return super.set(instant, year); } | /**
* Set the year component of the specified time instant.
*
* @param instant the time instant in millis to update.
* @param year the year (0,292278994) to update the time to.
* @return the updated time instant.
* @throws IllegalArgumentException if year is invalid.
*/ | Set the year component of the specified time instant | set | {
"repo_name": "wspeirs/sop4j-base",
"path": "src/main/java/com/sop4j/base/joda/time/chrono/GJYearOfEraDateTimeField.java",
"license": "apache-2.0",
"size": 3833
} | [
"com.sop4j.base.joda.time.field.FieldUtils"
] | import com.sop4j.base.joda.time.field.FieldUtils; | import com.sop4j.base.joda.time.field.*; | [
"com.sop4j.base"
] | com.sop4j.base; | 2,514,346 |
public void load()
{
props.load();
// rename keys (useful if keys change but value is to be kept)
for (final Entry<String, String> entry : renameTable.entrySet()) {
final String value = props.getProperty(entry.getKey());
if (value == null) continue;
final String oldKey = entry.getKey()... | void function() { props.load(); for (final Entry<String, String> entry : renameTable.entrySet()) { final String value = props.getProperty(entry.getKey()); if (value == null) continue; final String oldKey = entry.getKey(); final String newKey = entry.getValue(); props.removeProperty(oldKey); props.setProperty(newKey, va... | /**
* Load from file
*/ | Load from file | load | {
"repo_name": "MightyPork/mightyutils",
"path": "src/mightypork/utils/config/propmgr/PropertyManager.java",
"license": "bsd-2-clause",
"size": 5838
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,377,008 |
public PluralTupleLatticeElement storeCurrentAliasingInfo(ASTNode n);
| PluralTupleLatticeElement function(ASTNode n); | /**
* Calling this method signals to the object that it is a good time
* to record the current aliasing information. The object will store
* that information. Note that this method, for convenience only, returns
* 'this.' This is the mutated object.
*
* @param ASTNode The current location where we ar... | Calling this method signals to the object that it is a good time to record the current aliasing information. The object will store that information. Note that this method, for convenience only, returns 'this.' This is the mutated object | storeCurrentAliasingInfo | {
"repo_name": "plaidgroup/plural",
"path": "Plural/src/edu/cmu/cs/plural/track/PluralLatticeElement.java",
"license": "gpl-2.0",
"size": 5231
} | [
"org.eclipse.jdt.core.dom.ASTNode"
] | import org.eclipse.jdt.core.dom.ASTNode; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 791,452 |
public void process() {
final int sectorId = Integer.parseInt(getOrder().getParameter1());
// Retrieve the sector that we wish to build the ship
final Sector thisSector = SectorManager.getInstance().getByID(sectorId);
if (thisSector == null) {
getOrder().setResult(-11);... | void function() { final int sectorId = Integer.parseInt(getOrder().getParameter1()); final Sector thisSector = SectorManager.getInstance().getByID(sectorId); if (thisSector == null) { getOrder().setResult(-11); getOrder().setExplanation(STR); return; } getOrder().setRegion(thisSector.getPosition().getRegion()); if (thi... | /**
* Process this particular order.
*/ | Process this particular order | process | {
"repo_name": "EaW1805/engine",
"path": "src/main/java/com/eaw1805/orders/fleet/BuildShip.java",
"license": "mit",
"size": 11655
} | [
"com.eaw1805.data.constants.NationConstants",
"com.eaw1805.data.managers.fleet.ShipManager",
"com.eaw1805.data.managers.fleet.ShipTypeManager",
"com.eaw1805.data.managers.map.SectorManager",
"com.eaw1805.data.model.fleet.Ship",
"com.eaw1805.data.model.fleet.ShipType",
"com.eaw1805.data.model.map.Sector"... | import com.eaw1805.data.constants.NationConstants; import com.eaw1805.data.managers.fleet.ShipManager; import com.eaw1805.data.managers.fleet.ShipTypeManager; import com.eaw1805.data.managers.map.SectorManager; import com.eaw1805.data.model.fleet.Ship; import com.eaw1805.data.model.fleet.ShipType; import com.eaw1805.da... | import com.eaw1805.data.constants.*; import com.eaw1805.data.managers.fleet.*; import com.eaw1805.data.managers.map.*; import com.eaw1805.data.model.fleet.*; import com.eaw1805.data.model.map.*; import java.util.*; | [
"com.eaw1805.data",
"java.util"
] | com.eaw1805.data; java.util; | 2,604,376 |
public static void verify(String filename, JavaFileScanner check, int javaVersion) {
JavaCheckVerifier javaCheckVerifier = new JavaCheckVerifier();
javaCheckVerifier.providedJavaVersion = true;
javaCheckVerifier.javaVersion = new JavaVersionImpl(javaVersion);
scanFile(filename, check, javaCheckVerifie... | static void function(String filename, JavaFileScanner check, int javaVersion) { JavaCheckVerifier javaCheckVerifier = new JavaCheckVerifier(); javaCheckVerifier.providedJavaVersion = true; javaCheckVerifier.javaVersion = new JavaVersionImpl(javaVersion); scanFile(filename, check, javaCheckVerifier); } | /**
* Verifies that the provided file will raise all the expected issues when analyzed with the given check and a given
* java version used for the sources.
*
* @param filename The file to be analyzed
* @param check The check to be used for the analysis
* @param javaVersion The version to consider for... | Verifies that the provided file will raise all the expected issues when analyzed with the given check and a given java version used for the sources | verify | {
"repo_name": "mbring/sonar-java",
"path": "java-checks-testkit/src/main/java/org/sonar/java/checks/verifier/JavaCheckVerifier.java",
"license": "lgpl-3.0",
"size": 12303
} | [
"org.sonar.java.model.JavaVersionImpl",
"org.sonar.plugins.java.api.JavaFileScanner"
] | import org.sonar.java.model.JavaVersionImpl; import org.sonar.plugins.java.api.JavaFileScanner; | import org.sonar.java.model.*; import org.sonar.plugins.java.api.*; | [
"org.sonar.java",
"org.sonar.plugins"
] | org.sonar.java; org.sonar.plugins; | 740,527 |
public String getSQLString()
{
return DateConverter.binaryToString(this.getData(), DBConstants.SQL_TIME_FORMAT);
} | String function() { return DateConverter.binaryToString(this.getData(), DBConstants.SQL_TIME_FORMAT); } | /**
* Get this field in SQL format.
* For dates, I use the DateConverter.binaryToString SQL formats (ie., XX/XX/XX).
* @return The date formatted as a SQL string.
*/ | Get this field in SQL format. For dates, I use the DateConverter.binaryToString SQL formats (ie., XX/XX/XX) | getSQLString | {
"repo_name": "jbundle/jbundle",
"path": "base/base/src/main/java/org/jbundle/base/field/TimeField.java",
"license": "gpl-3.0",
"size": 9163
} | [
"org.jbundle.base.field.convert.DateConverter",
"org.jbundle.base.model.DBConstants"
] | import org.jbundle.base.field.convert.DateConverter; import org.jbundle.base.model.DBConstants; | import org.jbundle.base.field.convert.*; import org.jbundle.base.model.*; | [
"org.jbundle.base"
] | org.jbundle.base; | 2,223,430 |
private static synchronized void addDatabaseObject(String type,
String path, Database db) {
Object key = path;
HashMap databaseMap;
if (type == DatabaseURL.S_FILE) {
databaseMap = fileDatabaseMap;
key = filePathToKey(path);
} else if (ty... | static synchronized void function(String type, String path, Database db) { Object key = path; HashMap databaseMap; if (type == DatabaseURL.S_FILE) { databaseMap = fileDatabaseMap; key = filePathToKey(path); } else if (type == DatabaseURL.S_RES) { databaseMap = resDatabaseMap; } else if (type == DatabaseURL.S_MEM) { dat... | /**
* Adds a database to the registry.
*/ | Adds a database to the registry | addDatabaseObject | {
"repo_name": "ggorsontanguy/pocHSQLDB",
"path": "hsqldb-2.2.9/hsqldb/src/org/hsqldb/DatabaseManager.java",
"license": "gpl-3.0",
"size": 16440
} | [
"org.hsqldb.error.Error",
"org.hsqldb.error.ErrorCode",
"org.hsqldb.lib.HashMap"
] | import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.lib.HashMap; | import org.hsqldb.error.*; import org.hsqldb.lib.*; | [
"org.hsqldb.error",
"org.hsqldb.lib"
] | org.hsqldb.error; org.hsqldb.lib; | 1,220,797 |
static void setEntryValue( StepInjectionMetaEntry entry, RowMetaAndData row, SourceStepField source )
throws KettleValueException {
// A standard attribute, a single row of data...
//
Object value = null;
switch ( entry.getValueType() ) {
case ValueMetaInterface.TYPE_STRING:
value = ... | static void setEntryValue( StepInjectionMetaEntry entry, RowMetaAndData row, SourceStepField source ) throws KettleValueException { switch ( entry.getValueType() ) { case ValueMetaInterface.TYPE_STRING: value = row.getString( source.getField(), null ); break; case ValueMetaInterface.TYPE_BOOLEAN: value = row.getBoolean... | /**
* package-local visibility for testing purposes
*/ | package-local visibility for testing purposes | setEntryValue | {
"repo_name": "TatsianaKasiankova/pentaho-kettle",
"path": "plugins/meta-inject/src/main/java/org/pentaho/di/trans/steps/metainject/MetaInject.java",
"license": "apache-2.0",
"size": 30119
} | [
"org.pentaho.di.core.RowMetaAndData",
"org.pentaho.di.core.exception.KettleValueException",
"org.pentaho.di.core.row.ValueMetaInterface",
"org.pentaho.di.trans.step.StepInjectionMetaEntry"
] | import org.pentaho.di.core.RowMetaAndData; import org.pentaho.di.core.exception.KettleValueException; import org.pentaho.di.core.row.ValueMetaInterface; import org.pentaho.di.trans.step.StepInjectionMetaEntry; | import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.row.*; import org.pentaho.di.trans.step.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,651,416 |
public static WildcardType subtypeOf(Type bound) {
return new WildcardTypeImpl(new Type[] { bound }, MoreTypes.EMPTY_TYPE_ARRAY);
} | static WildcardType function(Type bound) { return new WildcardTypeImpl(new Type[] { bound }, MoreTypes.EMPTY_TYPE_ARRAY); } | /**
* Returns a type that represents an unknown type that extends {@code bound}.
* For example, if {@code bound} is {@code CharSequence.class}, this returns
* {@code ? extends CharSequence}. If {@code bound} is {@code Object.class},
* this returns {@code ?}, which is shorthand for {@code ? extends Object}.
... | Returns a type that represents an unknown type that extends bound. For example, if bound is CharSequence.class, this returns ? extends CharSequence. If bound is Object.class, this returns ?, which is shorthand for ? extends Object | subtypeOf | {
"repo_name": "easyfmxu/guice",
"path": "core/src/com/google/inject/util/Types.java",
"license": "apache-2.0",
"size": 4633
} | [
"com.google.inject.internal.MoreTypes",
"java.lang.reflect.Type",
"java.lang.reflect.WildcardType"
] | import com.google.inject.internal.MoreTypes; import java.lang.reflect.Type; import java.lang.reflect.WildcardType; | import com.google.inject.internal.*; import java.lang.reflect.*; | [
"com.google.inject",
"java.lang"
] | com.google.inject; java.lang; | 584,933 |
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(VARIANT, BlockSilverfish.EnumType.byMetadata(meta));
} | IBlockState function(int meta) { return this.getDefaultState().withProperty(VARIANT, BlockSilverfish.EnumType.byMetadata(meta)); } | /**
* Convert the given metadata into a BlockState for this Block
*/ | Convert the given metadata into a BlockState for this Block | getStateFromMeta | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/block/BlockSilverfish.java",
"license": "gpl-2.0",
"size": 7776
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 1,120,188 |
public void setTargetBeanName(String targetBeanName) {
this.targetBeanName = StringUtils.trimAllWhitespace(targetBeanName);
} | void function(String targetBeanName) { this.targetBeanName = StringUtils.trimAllWhitespace(targetBeanName); } | /**
* Specify the name of a target bean to apply the property path to.
* Alternatively, specify a target object directly.
* @param targetBeanName the bean name to be looked up in the
* containing bean factory (e.g. "testBean")
* @see #setTargetObject
*/ | Specify the name of a target bean to apply the property path to. Alternatively, specify a target object directly | setTargetBeanName | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java",
"license": "apache-2.0",
"size": 9109
} | [
"org.springframework.util.StringUtils"
] | import org.springframework.util.StringUtils; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 124,211 |
@Test
public void testEqual() {
Formula f1 = and(
or("A", not(True.INSTANCE)),
and(not("B"), False.INSTANCE)
);
Assert.assertFalse(f1.equals(new Object()));
Formula f2 = and(
or("A", not(True.INSTANCE)),
and... | void function() { Formula f1 = and( or("A", not(True.INSTANCE)), and(not("B"), False.INSTANCE) ); Assert.assertFalse(f1.equals(new Object())); Formula f2 = and( or("A", not(True.INSTANCE)), and(not("B"), False.INSTANCE) ); Assert.assertTrue(f1.equals(f2)); Formula f3 = and( or("A", not(True.INSTANCE)), and(not("C"), Fa... | /**
* Tests whether equals() works.
*/ | Tests whether equals() works | testEqual | {
"repo_name": "KernelHaven/KernelHaven",
"path": "test/net/ssehub/kernel_haven/util/logic/FormulaTest.java",
"license": "apache-2.0",
"size": 2403
} | [
"net.ssehub.kernel_haven.util.logic.FormulaBuilder",
"org.junit.Assert"
] | import net.ssehub.kernel_haven.util.logic.FormulaBuilder; import org.junit.Assert; | import net.ssehub.kernel_haven.util.logic.*; import org.junit.*; | [
"net.ssehub.kernel_haven",
"org.junit"
] | net.ssehub.kernel_haven; org.junit; | 615,817 |
private boolean compareCerts(Certificate[] pcerts,
Certificate[] certs)
{
// certs can be null, indicating no certs.
if ((certs == null) || (certs.length == 0)) {
return pcerts.length == 0;
}
// the length must be the same at this poi... | boolean function(Certificate[] pcerts, Certificate[] certs) { if ((certs == null) (certs.length == 0)) { return pcerts.length == 0; } if (certs.length != pcerts.length) return false; boolean match; for (int i = 0; i < certs.length; i++) { match = false; for (int j = 0; j < pcerts.length; j++) { if (certs[i].equals(pcer... | /**
* check to make sure the certs for the new class (certs) are the same as
* the certs for the first class inserted in the package (pcerts)
*/ | check to make sure the certs for the new class (certs) are the same as the certs for the first class inserted in the package (pcerts) | compareCerts | {
"repo_name": "openjdk/jdk7u",
"path": "jdk/src/share/classes/java/lang/ClassLoader.java",
"license": "gpl-2.0",
"size": 85657
} | [
"java.security.cert.Certificate"
] | import java.security.cert.Certificate; | import java.security.cert.*; | [
"java.security"
] | java.security; | 856,579 |
public static String getCanoncialTimezone(String timezoneStr, ExceptionInterceptor exceptionInterceptor) throws SQLException {
if (timezoneStr == null) {
return null;
}
timezoneStr = timezoneStr.trim();
// handle '+/-hh:mm' form ...
if (timezoneStr.length() > 2) {
if ((timezoneStr.charAt(0) == '... | static String function(String timezoneStr, ExceptionInterceptor exceptionInterceptor) throws SQLException { if (timezoneStr == null) { return null; } timezoneStr = timezoneStr.trim(); if (timezoneStr.length() > 2) { if ((timezoneStr.charAt(0) == '+' timezoneStr.charAt(0) == '-') && Character.isDigit(timezoneStr.charAt(... | /**
* Returns the 'official' Java timezone name for the given timezone
*
* @param timezoneStr
* the 'common' timezone name
*
* @return the Java timezone name for the given timezone
* @throws SQLException
*
* @throws IllegalArgumentException
* DOCUMENT ME!
*/ | Returns the 'official' Java timezone name for the given timezone | getCanoncialTimezone | {
"repo_name": "vaisaghvt/gameAnalyzer",
"path": "mysql-connector-java-5.1.22/src/com/mysql/jdbc/TimeUtil.java",
"license": "mit",
"size": 58799
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 869,826 |
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN })
@Path("/items/{itemname}")
public static String getAllStates(@PathParam("itemname") String ContainerID) {
ContainerManagement containerManager = new ContainerManagement();
logger.debug("openHAB is getting a state and a container ID with: ... | @Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN }) @Path(STR) static String function(@PathParam(STR) String ContainerID) { ContainerManagement containerManager = new ContainerManagement(); logger.debug(STR + ContainerID); String[] types = { STR, STR, STR}; JSONObject result = new JSONObject(); try { for (S... | /**
* Retrieves the current state of a device
*
* @param deviceContainerID
* : the the device container ID (wrapperID.deviceID)
* @return
*/ | Retrieves the current state of a device | getAllStates | {
"repo_name": "B2M-Software/project-drahtlos-smg20",
"path": "webrest.impl/src/main/java/org/fortiss/smg/webrest/impl/openhab/OpenhabGateway.java",
"license": "apache-2.0",
"size": 9122
} | [
"java.util.concurrent.TimeoutException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.codehaus.jettison.json.JSONException",
"org.codehaus.jettison.json.JSONObject",
"org.fortiss.smg.containermanager.api.devices.SIDeviceType",
"org.fortiss.s... | import java.util.concurrent.TimeoutException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; import org.fortiss.smg.containermanager.api.devices.SIDevice... | import java.util.concurrent.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.codehaus.jettison.json.*; import org.fortiss.smg.containermanager.api.devices.*; import org.fortiss.smg.webrest.impl.*; import org.fortiss.smg.webrest.impl.front.*; | [
"java.util",
"javax.ws",
"org.codehaus.jettison",
"org.fortiss.smg"
] | java.util; javax.ws; org.codehaus.jettison; org.fortiss.smg; | 1,770,608 |
public TimeZone getTimeZone() {
if (myTimeZoneZulu) {
return TimeZone.getTimeZone("Z");
}
return myTimeZone;
}
/**
* Returns the value of this object as a {@link GregorianCalendar} | TimeZone function() { if (myTimeZoneZulu) { return TimeZone.getTimeZone("Z"); } return myTimeZone; } /** * Returns the value of this object as a {@link GregorianCalendar} | /**
* Returns the TimeZone associated with this dateTime's value. May return <code>null</code> if no timezone was
* supplied.
*/ | Returns the TimeZone associated with this dateTime's value. May return <code>null</code> if no timezone was supplied | getTimeZone | {
"repo_name": "eug48/hapi-fhir",
"path": "hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/BaseDateTimeType.java",
"license": "apache-2.0",
"size": 25323
} | [
"java.util.GregorianCalendar",
"java.util.TimeZone"
] | import java.util.GregorianCalendar; import java.util.TimeZone; | import java.util.*; | [
"java.util"
] | java.util; | 1,757,979 |
public static PlaceholderFragment newInstance(int sectionNumber) {
PlaceholderFragment fragment = new PlaceholderFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
... | static PlaceholderFragment function(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public PlaceholderFragment() { } | /**
* Returns a new instance of this fragment for the given section
* number.
*/ | Returns a new instance of this fragment for the given section number | newInstance | {
"repo_name": "teamcipher/ProjectDIWA",
"path": "app/src/main/java/com/teamcipher/apc/projectdiwa/MainActivity.java",
"license": "gpl-3.0",
"size": 4861
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,909,736 |
@Override
public boolean exists(ObjectId commitId) {
try {
Iterable<Vertex> results = graphDB.getVertices("identifier", commitId.toString());
Iterator<Vertex> iterator = results.iterator();
if (iterator.hasNext()) {
iterator.next();
ret... | boolean function(ObjectId commitId) { try { Iterable<Vertex> results = graphDB.getVertices(STR, commitId.toString()); Iterator<Vertex> iterator = results.iterator(); if (iterator.hasNext()) { iterator.next(); return true; } else { return false; } } finally { this.rollback(); } } | /**
* Determines if the given commit exists in the graph database.
*
* @param commitId the commit id to search for
* @return true if the commit exists, false otherwise
*/ | Determines if the given commit exists in the graph database | exists | {
"repo_name": "markles/GeoGit",
"path": "src/storage/blueprints/src/main/java/org/geogit/storage/blueprints/BlueprintsGraphDatabase.java",
"license": "bsd-3-clause",
"size": 19553
} | [
"com.tinkerpop.blueprints.Vertex",
"java.util.Iterator",
"org.geogit.api.ObjectId"
] | import com.tinkerpop.blueprints.Vertex; import java.util.Iterator; import org.geogit.api.ObjectId; | import com.tinkerpop.blueprints.*; import java.util.*; import org.geogit.api.*; | [
"com.tinkerpop.blueprints",
"java.util",
"org.geogit.api"
] | com.tinkerpop.blueprints; java.util; org.geogit.api; | 727,943 |
public void setMultiString(String name, String[] value) {
long h = openKeyHandle(handle, path, false);
byte[] b = null;
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
for (int i = 0; i < value.length; i++) {
bos.write(NativeHelper.toByt... | void function(String name, String[] value) { long h = openKeyHandle(handle, path, false); byte[] b = null; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); for (int i = 0; i < value.length; i++) { bos.write(NativeHelper.toBytes(value[i], true)); } bos.write(new byte[] { 0, 0 }); b = bos.toByteArray(); } c... | /**
* Sets a multi-string value.
*
* @param name.
* @param value.
*/ | Sets a multi-string value | setMultiString | {
"repo_name": "cthiemann/SPaTo_Visual_Explorer",
"path": "lib/src/WinRun4J/src/org/boris/winrun4j/RegistryKey.java",
"license": "gpl-3.0",
"size": 12739
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,896,754 |
public static void setParamAge(final Bundle bundle, final int age) {
bundle.putInt(PARAM_AGE, age);
} | static void function(final Bundle bundle, final int age) { bundle.putInt(PARAM_AGE, age); } | /**
* set age value to bundle.
* @param bundle bundle
* @param age age value.
*/ | set age value to bundle | setParamAge | {
"repo_name": "ssdwa/android",
"path": "dConnectDevicePlugin/dConnectDevicePluginSDK/src/org/deviceconnect/android/profile/HumanDetectProfile.java",
"license": "mit",
"size": 53966
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,770,405 |
public static void closeSafely(@Nullable CloseableReference<?> ref) {
if (ref != null) {
ref.close();
}
} | static void function(@Nullable CloseableReference<?> ref) { if (ref != null) { ref.close(); } } | /**
* Closes the reference handling null.
*
* @param ref the reference to close
*/ | Closes the reference handling null | closeSafely | {
"repo_name": "MaTriXy/fresco",
"path": "fbcore/src/main/java/com/facebook/common/references/CloseableReference.java",
"license": "bsd-3-clause",
"size": 8358
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 799,423 |
public void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
throws AxisFault {
try {
this.configurationContext = axisConf;
this.trpInDesc = transprtIn;
Parameter param = transprtIn.getParameter(PARAM_PORT);
if (param != null... | void function(ConfigurationContext axisConf, TransportInDescription transprtIn) throws AxisFault { try { this.configurationContext = axisConf; this.trpInDesc = transprtIn; Parameter param = transprtIn.getParameter(PARAM_PORT); if (param != null) { this.port = Integer.parseInt((String) param.getValue()); } if (httpFacto... | /**
* init method in TransportListener
*
* @param axisConf
* @param transprtIn
* @throws AxisFault
*/ | init method in TransportListener | init | {
"repo_name": "shafreenAnfar/wso2-axis2",
"path": "modules/transport/http/src/org/apache/axis2/transport/http/SimpleHTTPServer.java",
"license": "apache-2.0",
"size": 11256
} | [
"org.apache.axis2.AxisFault",
"org.apache.axis2.context.ConfigurationContext",
"org.apache.axis2.description.Parameter",
"org.apache.axis2.description.TransportInDescription",
"org.apache.axis2.transport.http.server.HttpFactory"
] | import org.apache.axis2.AxisFault; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.description.Parameter; import org.apache.axis2.description.TransportInDescription; import org.apache.axis2.transport.http.server.HttpFactory; | import org.apache.axis2.*; import org.apache.axis2.context.*; import org.apache.axis2.description.*; import org.apache.axis2.transport.http.server.*; | [
"org.apache.axis2"
] | org.apache.axis2; | 591,098 |
public static final SourceModel.Expr mode(SourceModel.Expr values) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.mode), values});
}
public static final QualifiedName mode =
QualifiedName.make(CAL_Summary.MODULE_NAME, "mode");... | static final SourceModel.Expr function(SourceModel.Expr values) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.mode), values}); } static final QualifiedName function = QualifiedName.make(CAL_Summary.MODULE_NAME, "mode"); | /**
* Mode returns <code>Cal.Core.Prelude.Just</code> (the most-frequently-occurring element) for a list of values,
* or Nothing for the empty list. <code>mode xs</code> and <code>Cal.Utilities.Summary.nthMostFrequent xs 1</code> are semantically
* equivalent, but mode is more efficient.
* <p>
* Ru... | Mode returns <code>Cal.Core.Prelude.Just</code> (the most-frequently-occurring element) for a list of values, or Nothing for the empty list. <code>mode xs</code> and <code>Cal.Utilities.Summary.nthMostFrequent xs 1</code> are semantically equivalent, but mode is more efficient. Runtime performance is O(n(lg n)) | mode | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Libraries/src/org/openquark/cal/module/Cal/Utilities/CAL_Summary.java",
"license": "bsd-3-clause",
"size": 33128
} | [
"org.openquark.cal.compiler.QualifiedName",
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 970,500 |
private void renderGameOverText(Graphics g) {
int fSize=40;
g.setFont(new Font("Times New Roman", fSize, fSize));
Color c = g.getColor();
g.setColor(Color.WHITE);
String s = "Game Over";
String t = "Press 'R' to Retry";
g.drawString(s, fWidth/2 - g.getFontMetrics().stringWidth(s)/2, fHeight/2 - ... | void function(Graphics g) { int fSize=40; g.setFont(new Font(STR, fSize, fSize)); Color c = g.getColor(); g.setColor(Color.WHITE); String s = STR; String t = STR; g.drawString(s, fWidth/2 - g.getFontMetrics().stringWidth(s)/2, fHeight/2 - (g.getFontMetrics().getMaxDescent())); g.setFont(new Font(STR, fSize*2/3, fSize*2... | /**
* Renders text for the game over screen
* @param g Graphics object of the Component that this will be drawn on
*/ | Renders text for the game over screen | renderGameOverText | {
"repo_name": "LaggFTW/Tenryuu-Project",
"path": "dev/src/edu/mbhs/madubozhi/touhou/game/SpellCardRushGame.java",
"license": "gpl-2.0",
"size": 44720
} | [
"java.awt.Color",
"java.awt.Font",
"java.awt.Graphics"
] | import java.awt.Color; import java.awt.Font; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 520,529 |
String getHyperlinkTarget(JRPrintHyperlink hyperlink); | String getHyperlinkTarget(JRPrintHyperlink hyperlink); | /**
* Generates the String hyperlink target for a hyperlink instance.
*
* @param hyperlink the hyperlink instance
* @return the genereated String hyperlink target
*/ | Generates the String hyperlink target for a hyperlink instance | getHyperlinkTarget | {
"repo_name": "delafer/j7project",
"path": "jasper352/csb-jasperreport-dep/src/net/sf/jasperreports/engine/export/JRHyperlinkTargetProducer.java",
"license": "gpl-2.0",
"size": 1923
} | [
"net.sf.jasperreports.engine.JRPrintHyperlink"
] | import net.sf.jasperreports.engine.JRPrintHyperlink; | import net.sf.jasperreports.engine.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 2,059,315 |
protected XMLDTDValidator createDTDValidator() {
return new XMLNSDTDValidator();
} // createDTDValidator():XMLDTDValidator | XMLDTDValidator function() { return new XMLNSDTDValidator(); } | /** Create a DTD validator: this validator performs namespace binding.
*/ | Create a DTD validator: this validator performs namespace binding | createDTDValidator | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xerces/internal/parsers/IntegratedParserConfiguration.java",
"license": "apache-2.0",
"size": 10833
} | [
"com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator",
"com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator"
] | import com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator; import com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator; | import com.sun.org.apache.xerces.internal.impl.dtd.*; | [
"com.sun.org"
] | com.sun.org; | 2,056,064 |
ClusterHealthRequestBuilder prepareHealth(String... indices); | ClusterHealthRequestBuilder prepareHealth(String... indices); | /**
* The health of the cluster.
*/ | The health of the cluster | prepareHealth | {
"repo_name": "strapdata/elassandra",
"path": "server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java",
"license": "apache-2.0",
"size": 26657
} | [
"org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder"
] | import org.elasticsearch.action.admin.cluster.health.ClusterHealthRequestBuilder; | import org.elasticsearch.action.admin.cluster.health.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 463,133 |
public HostPoolType hostPoolType() {
return this.hostPoolType;
} | HostPoolType function() { return this.hostPoolType; } | /**
* Get the hostPoolType property: HostPool type for desktop.
*
* @return the hostPoolType value.
*/ | Get the hostPoolType property: HostPool type for desktop | hostPoolType | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/HostPoolPropertiesInner.java",
"license": "mit",
"size": 19228
} | [
"com.azure.resourcemanager.desktopvirtualization.models.HostPoolType"
] | import com.azure.resourcemanager.desktopvirtualization.models.HostPoolType; | import com.azure.resourcemanager.desktopvirtualization.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,159,723 |
private RestifResponseDto readSliceInternal(RestifRequestDto reqDto) throws MloException {
final String owner = reqDto.common.srcComponent.name;
// Obtains saved slice data from reqpested slice ID.
SliceEntity sliceEntity = sliceService.findSliceEntity(reqDto.slice.id, owner);
if (sliceEntity == null) {
... | RestifResponseDto function(RestifRequestDto reqDto) throws MloException { final String owner = reqDto.common.srcComponent.name; SliceEntity sliceEntity = sliceService.findSliceEntity(reqDto.slice.id, owner); if (sliceEntity == null) { ApiCallException e = new ApiCallException(STR); e.setSliceInfo(reqDto.slice.name, get... | /**
* Reads a slice.
* @param reqDto Request DTO.
* @return Response DTO.
* @throws MloException An MLO exception.
*/ | Reads a slice | readSliceInternal | {
"repo_name": "o3project/mlo-net",
"path": "mlo-srv/src/main/java/org/o3project/mlo/server/impl/logic/SliceManager.java",
"license": "apache-2.0",
"size": 17692
} | [
"java.util.Arrays",
"org.o3project.mlo.server.dto.FlowDto",
"org.o3project.mlo.server.dto.RestifRequestDto",
"org.o3project.mlo.server.dto.RestifResponseDto",
"org.o3project.mlo.server.dto.SliceDto",
"org.o3project.mlo.server.logic.ApiCallException",
"org.o3project.mlo.server.logic.MloException",
"org... | import java.util.Arrays; import org.o3project.mlo.server.dto.FlowDto; import org.o3project.mlo.server.dto.RestifRequestDto; import org.o3project.mlo.server.dto.RestifResponseDto; import org.o3project.mlo.server.dto.SliceDto; import org.o3project.mlo.server.logic.ApiCallException; import org.o3project.mlo.server.logic.M... | import java.util.*; import org.o3project.mlo.server.dto.*; import org.o3project.mlo.server.logic.*; | [
"java.util",
"org.o3project.mlo"
] | java.util; org.o3project.mlo; | 215,552 |
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
} | Builder function(Map<String, Object> map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } this.extraParams.putAll(map); return this; } | /**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link TestClockAdvanceParams#extraParams} for the field documentation.
*/ | Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. See <code>TestClockAdvanceParams#extraParams</code> for the field documentation | putAllExtraParam | {
"repo_name": "stripe/stripe-java",
"path": "src/main/java/com/stripe/param/testhelpers/TestClockAdvanceParams.java",
"license": "mit",
"size": 4324
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,661,770 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.