method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static boolean isSimpleValueType(Class<?> clazz) {
return ClassUtils.isPrimitiveOrWrapper(clazz) || clazz.isEnum() ||
CharSequence.class.isAssignableFrom(clazz) ||
Number.class.isAssignableFrom(clazz) ||
Date.class.isAssignableFrom(clazz) ||
clazz.equals(URI.class) || clazz.equals(URL.class)... | static boolean function(Class<?> clazz) { return ClassUtils.isPrimitiveOrWrapper(clazz) clazz.isEnum() CharSequence.class.isAssignableFrom(clazz) Number.class.isAssignableFrom(clazz) Date.class.isAssignableFrom(clazz) clazz.equals(URI.class) clazz.equals(URL.class) clazz.equals(Locale.class) clazz.equals(Class.class); ... | /**
* Check if the given type represents a "simple" value type:
* a primitive, a String or other CharSequence, a Number, a Date,
* a URI, a URL, a Locale or a Class.
* @param clazz the type to check
* @return whether the given type represents a "simple" value type
*/ | Check if the given type represents a "simple" value type: a primitive, a String or other CharSequence, a Number, a Date, a URI, a URL, a Locale or a Class | isSimpleValueType | {
"repo_name": "sunpy1106/SpringBeanLifeCycle",
"path": "src/main/java/org/springframework/beans/BeanUtils.java",
"license": "apache-2.0",
"size": 25798
} | [
"java.util.Date",
"java.util.Locale",
"org.springframework.util.ClassUtils"
] | import java.util.Date; import java.util.Locale; import org.springframework.util.ClassUtils; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 1,895,439 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedResponse<SparkJobDefinitionResource>> getSparkJobDefinitionsByWorkspaceSinglePageAsync(
Context context) {
final String apiVersion = "2020-12-01";
final String accept = "application/json";
return service.getSparkJob... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<SparkJobDefinitionResource>> function( Context context) { final String apiVersion = STR; final String accept = STR; return service.getSparkJobDefinitionsByWorkspace(this.client.getEndpoint(), apiVersion, accept, context) .map( res -> new PagedResponseBase<>... | /**
* Lists spark job definitions.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws CloudErrorAutoGeneratedException thrown if the request is rejected by server.
* @throws RuntimeExceptio... | Lists spark job definitions | getSparkJobDefinitionsByWorkspaceSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-analytics-synapse-artifacts/src/main/java/com/azure/analytics/synapse/artifacts/implementation/SparkJobDefinitionsImpl.java",
"license": "mit",
"size": 59062
} | [
"com.azure.analytics.synapse.artifacts.models.SparkJobDefinitionResource",
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context"
] | import com.azure.analytics.synapse.artifacts.models.SparkJobDefinitionResource; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; | import com.azure.analytics.synapse.artifacts.models.*; import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.analytics",
"com.azure.core"
] | com.azure.analytics; com.azure.core; | 285,777 |
public void loadResources(@NonNull IAbstractFolder rootFolder)
throws IOException {
ScanningContext context = new ScanningContext(this);
IAbstractResource[] files = rootFolder.listMembers();
for (IAbstractResource file : files) {
if (file instanceof IAbstractFolder) ... | void function(@NonNull IAbstractFolder rootFolder) throws IOException { ScanningContext context = new ScanningContext(this); IAbstractResource[] files = rootFolder.listMembers(); for (IAbstractResource file : files) { if (file instanceof IAbstractFolder) { IAbstractFolder folder = (IAbstractFolder) file; ResourceFolder... | /**
* Loads the resources from a resource folder.
* <p/>
*
* @param rootFolder The folder to read the resources from. This is the top level
* resource folder (res/)
* @throws IOException
*/ | Loads the resources from a resource folder. | loadResources | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "sdk/sdk_common/src/com/android/ide/common/resources/ResourceRepository.java",
"license": "gpl-2.0",
"size": 27098
} | [
"com.android.annotations.NonNull",
"com.android.io.IAbstractFile",
"com.android.io.IAbstractFolder",
"com.android.io.IAbstractResource",
"java.io.IOException"
] | import com.android.annotations.NonNull; import com.android.io.IAbstractFile; import com.android.io.IAbstractFolder; import com.android.io.IAbstractResource; import java.io.IOException; | import com.android.annotations.*; import com.android.io.*; import java.io.*; | [
"com.android.annotations",
"com.android.io",
"java.io"
] | com.android.annotations; com.android.io; java.io; | 1,743,925 |
public static String getRegistrationId(Context context) {
final SharedPreferences prefs = getGcmPreferences(context);
String registrationId = prefs.getString(PROPERTY_REG_ID, "");
if (registrationId.isEmpty()) {
Log.i(TAG, "Registration not found.");
return "";
... | static String function(Context context) { final SharedPreferences prefs = getGcmPreferences(context); String registrationId = prefs.getString(PROPERTY_REG_ID, STRRegistration not found.STRSTRApp version changed.STR"; } return registrationId; } | /**
* Gets the current registration ID for application on GCM service, if there is one.
* If result is empty, the app needs to register.
*
* @param context application's context
* @return registration ID, or empty string if there is no existing registration ID.
*/ | Gets the current registration ID for application on GCM service, if there is one. If result is empty, the app needs to register | getRegistrationId | {
"repo_name": "macisamuele/GoogleCloudMessaging",
"path": "Demo/GoogleCloudMessaging-Android/gcm/src/main/java/com/android/google/gcm/GCMRegister.java",
"license": "apache-2.0",
"size": 8155
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 2,398,001 |
EClass getTypePrimaryExpression(); | EClass getTypePrimaryExpression(); | /**
* Returns the meta object for class '{@link com.euclideanspace.spad.editor.TypePrimaryExpression <em>Type Primary Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Type Primary Expression</em>'.
* @see com.euclideanspace.spad.editor.TypePrim... | Returns the meta object for class '<code>com.euclideanspace.spad.editor.TypePrimaryExpression Type Primary Expression</code>'. | getTypePrimaryExpression | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,666 |
@Override
public void onCompletion(MediaPlayer mp) {
mVideoPlayer.seekTo(0);
}
| void function(MediaPlayer mp) { mVideoPlayer.seekTo(0); } | /**
* Called when the file is finished playing.
*
* Rewinds the video
*
* @param mp {@link MediaPlayer} instance performing the playback.
*/ | Called when the file is finished playing. Rewinds the video | onCompletion | {
"repo_name": "posbit/android",
"path": "src/com/owncloud/android/ui/preview/PreviewVideoActivity.java",
"license": "gpl-2.0",
"size": 9119
} | [
"android.media.MediaPlayer"
] | import android.media.MediaPlayer; | import android.media.*; | [
"android.media"
] | android.media; | 2,659,765 |
@Override
public RepositoryDirectoryInterface getRepositoryDirectory() {
if ( transMeta == null ) {
return null;
}
return transMeta.getRepositoryDirectory();
} | RepositoryDirectoryInterface function() { if ( transMeta == null ) { return null; } return transMeta.getRepositoryDirectory(); } | /**
* Gets the repository directory.
*
* @return the repository directory
* @see org.pentaho.di.core.logging.LoggingObjectInterface#getRepositoryDirectory()
*/ | Gets the repository directory | getRepositoryDirectory | {
"repo_name": "denisprotopopov/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 196543
} | [
"org.pentaho.di.repository.RepositoryDirectoryInterface"
] | import org.pentaho.di.repository.RepositoryDirectoryInterface; | import org.pentaho.di.repository.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 652,676 |
public static List<String> setUnique(List<String> list1, List<String> list2) {
return SetUniqueList.decorate(ListUtils.union(list1, list2));
} | static List<String> function(List<String> list1, List<String> list2) { return SetUniqueList.decorate(ListUtils.union(list1, list2)); } | /**
* Combine two lists, with no duplicates
* @param list1
* @param list2
* @return
*/ | Combine two lists, with no duplicates | setUnique | {
"repo_name": "AGES-Initiatives/common-utilities",
"path": "common-utilities/src/main/java/net/ages/alwb/utils/core/misc/AlwbGeneralUtils.java",
"license": "epl-1.0",
"size": 10198
} | [
"java.util.List",
"org.apache.commons.collections.ListUtils",
"org.apache.commons.collections.list.SetUniqueList"
] | import java.util.List; import org.apache.commons.collections.ListUtils; import org.apache.commons.collections.list.SetUniqueList; | import java.util.*; import org.apache.commons.collections.*; import org.apache.commons.collections.list.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,826,711 |
public synchronized boolean restartDataNode(DataNodeProperties dnprop,
boolean keepPort) throws IOException {
Configuration conf = dnprop.conf;
String[] args = dnprop.dnArgs;
Configuration newconf = new HdfsConfiguration(conf); // save cloned config
if (keepPort) {
InetSocketAddress addr =... | synchronized boolean function(DataNodeProperties dnprop, boolean keepPort) throws IOException { Configuration conf = dnprop.conf; String[] args = dnprop.dnArgs; Configuration newconf = new HdfsConfiguration(conf); if (keepPort) { InetSocketAddress addr = dnprop.datanode.getSelfAddr(); conf.set(STR, addr.getAddress().ge... | /**
* Restart a datanode, on the same port if requested
* @param dnprop the datanode to restart
* @param keepPort whether to use the same port
* @return true if restarting is successful
* @throws IOException
*/ | Restart a datanode, on the same port if requested | restartDataNode | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java",
"license": "apache-2.0",
"size": 74425
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.server.datanode.DataNode"
] | import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.server.datanode.DataNode; | import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.server.datanode.*; | [
"java.io",
"java.net",
"org.apache.hadoop"
] | java.io; java.net; org.apache.hadoop; | 88,299 |
private void handle200OkUnregister(SipTransactionContext ctx) {
// 200 OK response received
if (logger.isActivated()) {
logger.info("200 OK response received");
}
mAuoconfigRetryTimes = 0;
} | void function(SipTransactionContext ctx) { if (logger.isActivated()) { logger.info(STR); } mAuoconfigRetryTimes = 0; } | /**
* Handle 200 0K response of UNREGISTER
*
* @param ctx SIP transaction context
*/ | Handle 200 0K response of UNREGISTER | handle200OkUnregister | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/RCSe/core/src/com/orangelabs/rcs/core/ims/network/registration/RegistrationManager.java",
"license": "gpl-2.0",
"size": 30955
} | [
"com.orangelabs.rcs.core.ims.protocol.sip.SipTransactionContext"
] | import com.orangelabs.rcs.core.ims.protocol.sip.SipTransactionContext; | import com.orangelabs.rcs.core.ims.protocol.sip.*; | [
"com.orangelabs.rcs"
] | com.orangelabs.rcs; | 2,112,716 |
@SuppressWarnings("unchecked")
public static <T> T readObjectByXpath(Object object, Class<T> cls, String xpath) {
logger.entering(new Object[] { object, cls, xpath });
JXPathContext context = JXPathContext.newContext(object);
T value = (T) context.getValue(xpath);
logger.exiting(... | @SuppressWarnings(STR) static <T> T function(Object object, Class<T> cls, String xpath) { logger.entering(new Object[] { object, cls, xpath }); JXPathContext context = JXPathContext.newContext(object); T value = (T) context.getValue(xpath); logger.exiting(value); return value; } | /**
* Traverses the object graph by following an XPath expression and returns the desired type from object matched at
* the XPath.
*
* Supports single object retrieval. Also see {@link DataProviderHelper#readListByXpath(Object, Class, String)}.
*
* Note: Need {@code object} and {@code cls}... | Traverses the object graph by following an XPath expression and returns the desired type from object matched at the XPath. Supports single object retrieval. Also see <code>DataProviderHelper#readListByXpath(Object, Class, String)</code>. Note: Need object and cls to have getter and setter properties defined to allow ob... | readObjectByXpath | {
"repo_name": "ILikeToNguyen/SeLion",
"path": "dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/DataProviderHelper.java",
"license": "apache-2.0",
"size": 29323
} | [
"org.apache.commons.jxpath.JXPathContext"
] | import org.apache.commons.jxpath.JXPathContext; | import org.apache.commons.jxpath.*; | [
"org.apache.commons"
] | org.apache.commons; | 289,050 |
void compile(Context context, BatchInfo batch, Jobflow jobflow);
class Context extends CompilerContext.Basic {
private final FileContainer output;
private final TaskContainerMap taskContainerMap = new TaskContainerMap();
private final ExternalPortContainer externalPorts = new Ex... | void compile(Context context, BatchInfo batch, Jobflow jobflow); class Context extends CompilerContext.Basic { private final FileContainer output; private final TaskContainerMap taskContainerMap = new TaskContainerMap(); private final ExternalPortContainer externalPorts = new ExternalPortContainer(); public Context(Com... | /**
* Compiles the target jobflow.
* @param context the current context
* @param batch information of the jobflow owner
* @param jobflow the target jobflow
* @throws DiagnosticException if compilation was failed
*/ | Compiles the target jobflow | compile | {
"repo_name": "asakusafw/asakusafw-compiler",
"path": "compiler-project/core/src/main/java/com/asakusafw/lang/compiler/core/JobflowCompiler.java",
"license": "apache-2.0",
"size": 3726
} | [
"com.asakusafw.lang.compiler.api.CompilerOptions",
"com.asakusafw.lang.compiler.api.basic.ExternalPortContainer",
"com.asakusafw.lang.compiler.api.basic.TaskContainerMap",
"com.asakusafw.lang.compiler.model.graph.Jobflow",
"com.asakusafw.lang.compiler.model.info.BatchInfo",
"com.asakusafw.lang.compiler.pa... | import com.asakusafw.lang.compiler.api.CompilerOptions; import com.asakusafw.lang.compiler.api.basic.ExternalPortContainer; import com.asakusafw.lang.compiler.api.basic.TaskContainerMap; import com.asakusafw.lang.compiler.model.graph.Jobflow; import com.asakusafw.lang.compiler.model.info.BatchInfo; import com.asakusafw... | import com.asakusafw.lang.compiler.api.*; import com.asakusafw.lang.compiler.api.basic.*; import com.asakusafw.lang.compiler.model.graph.*; import com.asakusafw.lang.compiler.model.info.*; import com.asakusafw.lang.compiler.packaging.*; | [
"com.asakusafw.lang"
] | com.asakusafw.lang; | 184,269 |
public void parseLicenseTemplateRule(String parseableLicenseTemplateRule) throws LicenseTemplateRuleException {
//TODO: Check for repeated keywords
this.example = null;
this.name = null;
this.original = null;
this.type = null;
this.match = null;
Matcher rulePartMatcher = SPLIT_REGEX.matcher(parseableLi... | void function(String parseableLicenseTemplateRule) throws LicenseTemplateRuleException { this.example = null; this.name = null; this.original = null; this.type = null; this.match = null; Matcher rulePartMatcher = SPLIT_REGEX.matcher(parseableLicenseTemplateRule); int start = 0; String typeStr = null; if (rulePartMatche... | /**
* Parse a license template rule string compliant with the SPDX license template text and
* replace all properties with the parsed values
* @param parseableLicenseTemplateRule
* @throws LicenseTemplateRuleException
*/ | Parse a license template rule string compliant with the SPDX license template text and replace all properties with the parsed values | parseLicenseTemplateRule | {
"repo_name": "spdx/tools",
"path": "src/org/spdx/licenseTemplate/LicenseTemplateRule.java",
"license": "apache-2.0",
"size": 8511
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,573,433 |
public static java.lang.reflect.Field getIdField(Class<?> clazz) {
for (java.lang.reflect.Field field : clazz.getFields()) {
if (field.getAnnotation(Id.class) != null) {
return field;
}
}
throw new RuntimeException("Your class " + clazz.getName()
... | static java.lang.reflect.Field function(Class<?> clazz) { for (java.lang.reflect.Field field : clazz.getFields()) { if (field.getAnnotation(Id.class) != null) { return field; } } throw new RuntimeException(STR + clazz.getName() + STR); } | /**
* Find a ID field on the JPABase target class
*
* @param clazz JPABase target class
* @return corresponding field
*/ | Find a ID field on the JPABase target class | getIdField | {
"repo_name": "tempbottle/restcommander",
"path": "play-1.2.4/modules/search-2.0/src/play/modules/search/store/ConvertionUtils.java",
"license": "apache-2.0",
"size": 6293
} | [
"javax.persistence.Id",
"org.apache.lucene.document.Field"
] | import javax.persistence.Id; import org.apache.lucene.document.Field; | import javax.persistence.*; import org.apache.lucene.document.*; | [
"javax.persistence",
"org.apache.lucene"
] | javax.persistence; org.apache.lucene; | 385,380 |
public Future<IAction> getPreference(Requestor requestor, IIdentity ownerID, String serviceType, ServiceResourceIdentifier serviceID, String preferenceName);
| Future<IAction> function(Requestor requestor, IIdentity ownerID, String serviceType, ServiceResourceIdentifier serviceID, String preferenceName); | /**
* Allows any service to request an context-based evaluated preference outcome.
*
* @param requestor the DigitalIdentity of the service requesting the outcome
* @param ownerID the DigitalIdentity of the owner of the preferences (i.e. the
* user of this ... | Allows any service to request an context-based evaluated preference outcome | getPreference | {
"repo_name": "EPapadopoulou/PersoNIS",
"path": "api/java/external/src/main/java/org/societies/api/personalisation/mgmt/IPersonalisationManager.java",
"license": "bsd-2-clause",
"size": 4987
} | [
"java.util.concurrent.Future",
"org.societies.api.identity.IIdentity",
"org.societies.api.identity.Requestor",
"org.societies.api.personalisation.model.IAction",
"org.societies.api.schema.servicelifecycle.model.ServiceResourceIdentifier"
] | import java.util.concurrent.Future; import org.societies.api.identity.IIdentity; import org.societies.api.identity.Requestor; import org.societies.api.personalisation.model.IAction; import org.societies.api.schema.servicelifecycle.model.ServiceResourceIdentifier; | import java.util.concurrent.*; import org.societies.api.identity.*; import org.societies.api.personalisation.model.*; import org.societies.api.schema.servicelifecycle.model.*; | [
"java.util",
"org.societies.api"
] | java.util; org.societies.api; | 2,281,097 |
public Iterator<CellLocation> columnMajorOrderIterator() {
return new CellRangeIterator(this, IterationOrder.COLUMN_MAJOR);
} | Iterator<CellLocation> function() { return new CellRangeIterator(this, IterationOrder.COLUMN_MAJOR); } | /**
* Returns an {@link Iterator} over the {@code CellRange} that traverses the
* range in column-major order.
*
* @return a column-major order {@link Iterator} over the {@code CellRange}.
*/ | Returns an <code>Iterator</code> over the CellRange that traverses the range in column-major order | columnMajorOrderIterator | {
"repo_name": "aftenkap/jutility-common",
"path": "src/main/java/org/jutility/common/datatype/table/CellRange.java",
"license": "apache-2.0",
"size": 15468
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,292,888 |
public static void resolveExpressionVariables(Collection<String> vars, String exprStr) {
if (StringUtils.isNotEmpty(exprStr)) {
Matcher m = EXPR_VAR_PATTERN.matcher(exprStr);
while (m.find()) {
vars.add(m.group(0));
}
}
} | static void function(Collection<String> vars, String exprStr) { if (StringUtils.isNotEmpty(exprStr)) { Matcher m = EXPR_VAR_PATTERN.matcher(exprStr); while (m.find()) { vars.add(m.group(0)); } } } | /**
* Finds variable expressions like '${VarName}' in provided string and puts into collection.
*
* @param vars
* collection to add resolved variable expression
* @param exprStr
* expression string
*/ | Finds variable expressions like '${VarName}' in provided string and puts into collection | resolveExpressionVariables | {
"repo_name": "Nastel/tnt4j-stream-jmx",
"path": "tnt4j-stream-jmx-core/src/main/java/com/jkoolcloud/tnt4j/stream/jmx/utils/Utils.java",
"license": "apache-2.0",
"size": 10093
} | [
"java.util.Collection",
"java.util.regex.Matcher",
"org.apache.commons.lang3.StringUtils"
] | import java.util.Collection; import java.util.regex.Matcher; import org.apache.commons.lang3.StringUtils; | import java.util.*; import java.util.regex.*; import org.apache.commons.lang3.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 487,669 |
protected void assertActiveHierarchy(Path path) {
if (path != null && path.hasNext()) {
String key = isOverlayActive() ? MAIN_CHILD_KEY : OVERLAY_CHILD_KEY;
Assert.isTrue(!key.equals(path.getNext()), "Cannot deliver action to wrong hierarchy!");
}
} | void function(Path path) { if (path != null && path.hasNext()) { String key = isOverlayActive() ? MAIN_CHILD_KEY : OVERLAY_CHILD_KEY; Assert.isTrue(!key.equals(path.getNext()), STR); } } | /**
* Asserts that the current widget is in the active hierarchy. If not, the execution will fail with an exception.
*
* @param path Path of the widget (from the request).
* @since 1.1.2
*/ | Asserts that the current widget is in the active hierarchy. If not, the execution will fail with an exception | assertActiveHierarchy | {
"repo_name": "nortal/araneaframework",
"path": "src/org/araneaframework/framework/container/StandardOverlayContainerWidget.java",
"license": "apache-2.0",
"size": 9073
} | [
"org.araneaframework.Path",
"org.araneaframework.core.Assert"
] | import org.araneaframework.Path; import org.araneaframework.core.Assert; | import org.araneaframework.*; import org.araneaframework.core.*; | [
"org.araneaframework",
"org.araneaframework.core"
] | org.araneaframework; org.araneaframework.core; | 1,033,095 |
public ContainerServiceMasterProfile masterProfile() {
return this.masterProfile;
} | ContainerServiceMasterProfile function() { return this.masterProfile; } | /**
* Get the masterProfile value.
*
* @return the masterProfile value
*/ | Get the masterProfile value | masterProfile | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/containerservice/mgmt-v2017_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2017_07_01/implementation/ContainerServiceInner.java",
"license": "mit",
"size": 8249
} | [
"com.microsoft.azure.management.containerservice.v2017_07_01.ContainerServiceMasterProfile"
] | import com.microsoft.azure.management.containerservice.v2017_07_01.ContainerServiceMasterProfile; | import com.microsoft.azure.management.containerservice.v2017_07_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,422,322 |
private void updateListValues(Cluster cluster, String configType, String propertyName, Set<String> valuesToAdd, Set<String> valuesToRemove)
throws AmbariException {
Config config = cluster.getDesiredConfigByType(configType);
if (config != null) {
Map<String, String> properties = config.getProperti... | void function(Cluster cluster, String configType, String propertyName, Set<String> valuesToAdd, Set<String> valuesToRemove) throws AmbariException { Config config = cluster.getDesiredConfigByType(configType); if (config != null) { Map<String, String> properties = config.getProperties(); if (properties != null) { String... | /**
* Updates the contents of a configuration with comma-delimited list of values.
* <p>
* Items will be added and/or removed as needed. If changes are made to the value, the configuration
* is updated in the cluster.
*
* @param cluster the cluster
* @param configType the configuration t... | Updates the contents of a configuration with comma-delimited list of values. Items will be added and/or removed as needed. If changes are made to the value, the configuration is updated in the cluster | updateListValues | {
"repo_name": "radicalbit/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog252.java",
"license": "apache-2.0",
"size": 14999
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.Map",
"java.util.Set",
"java.util.TreeSet",
"org.apache.ambari.server.AmbariException",
"org.apache.ambari.server.state.Cluster",
"org.apache.ambari.server.state.Config",
"org.apache.commons.lang.StringUtils"
] | import java.util.Arrays; import java.util.Collections; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.state.Cluster; import org.apache.ambari.server.state.Config; import org.apache.commons.lang.StringUtils; | import java.util.*; import org.apache.ambari.server.*; import org.apache.ambari.server.state.*; import org.apache.commons.lang.*; | [
"java.util",
"org.apache.ambari",
"org.apache.commons"
] | java.util; org.apache.ambari; org.apache.commons; | 2,660,040 |
@Test
public final void testSetParameterByteArray() {
// Setup the resources for the test.
int frameID = 0x10;
String command = "NI";
byte[] parameterToSet = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65};
ATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, new byte[0]);
... | final void function() { int frameID = 0x10; String command = "NI"; byte[] parameterToSet = new byte[]{0x6D, 0x79, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65}; ATCommandQueuePacket packet = new ATCommandQueuePacket(frameID, command, new byte[0]); packet.setParameter(parameterToSet); assertThat(STR + new String(parameterToSet) +... | /**
* Test method for {@link com.digi.xbee.api.packet.common.ATCommandQueuePacket#setParameter(byte[])}.
*
* <p>Test if a byte array parameter is properly configured.</p>
*/ | Test method for <code>com.digi.xbee.api.packet.common.ATCommandQueuePacket#setParameter(byte[])</code>. Test if a byte array parameter is properly configured | testSetParameterByteArray | {
"repo_name": "brucetsao/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/packet/common/ATCommandQueuePacketTest.java",
"license": "mpl-2.0",
"size": 30492
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 2,512,668 |
public void setWahl(Bundestagswahl wahl) {
this.wahl = wahl;
setComponentAt(0, new EinWahlTabellenAnsicht(wahl));
setComponentAt(1, new EinWahlKuchendiagrammAnsicht(wahl));
setComponentAt(2, new EinWahlStabdiagrammAnsicht(wahl));
setComponentAt(3, new EinWahlDeutschlandAnsicht(wahl, true));
this.... | void function(Bundestagswahl wahl) { this.wahl = wahl; setComponentAt(0, new EinWahlTabellenAnsicht(wahl)); setComponentAt(1, new EinWahlKuchendiagrammAnsicht(wahl)); setComponentAt(2, new EinWahlStabdiagrammAnsicht(wahl)); setComponentAt(3, new EinWahlDeutschlandAnsicht(wahl, true)); this.repaint(); } } private static... | /**
* Legt die darzustellende {@link Bundestagswahl} fest
*
* @param wahl
* the wahl to set
*/ | Legt die darzustellende <code>Bundestagswahl</code> fest | setWahl | {
"repo_name": "Bundeswahlrechner/Bundeswahlrechner",
"path": "mandatsverteilung/src/main/java/edu/kit/iti/formal/mandatsverteilung/gui/GUI.java",
"license": "gpl-3.0",
"size": 9742
} | [
"edu.kit.iti.formal.mandatsverteilung.datenhaltung.Bundestagswahl"
] | import edu.kit.iti.formal.mandatsverteilung.datenhaltung.Bundestagswahl; | import edu.kit.iti.formal.mandatsverteilung.datenhaltung.*; | [
"edu.kit.iti"
] | edu.kit.iti; | 1,308,839 |
@Override
public void endElement(final String uri, final String localName, final String qname) throws SAXException {
// determine which tag these chars are for and save them
if (this.isMimeType) {
this.isMimeType = false;
this.match.setMimeType(this.finalValue);
... | void function(final String uri, final String localName, final String qname) throws SAXException { if (this.isMimeType) { this.isMimeType = false; this.match.setMimeType(this.finalValue); } else if (this.isExtension) { this.isExtension = false; this.match.setExtension(this.finalValue); } else if (this.isDescription) { t... | /**
* DOCUMENT ME!
*
* @param uri DOCUMENT ME!
* @param localName DOCUMENT ME!
* @param qname DOCUMENT ME!
*
* @throws SAXException DOCUMENT ME!
*/ | DOCUMENT ME | endElement | {
"repo_name": "venanciolm/afirma-ui-miniapplet_x_x",
"path": "afirma_ui_miniapplet/src/main/java/net/sf/jmimemagic/MagicParser.java",
"license": "mit",
"size": 15042
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 480,206 |
@Test
public void testDropCreateKeyspaceIfNotExists() throws Throwable
{
String keyspace = KEYSPACE_PER_TEST;
dropPerTestKeyspace();
// try dropping when doesn't exist
dropPerTestKeyspace();
// create and confirm
schemaChange("CREATE KEYSPACE IF NOT EXISTS... | void function() throws Throwable { String keyspace = KEYSPACE_PER_TEST; dropPerTestKeyspace(); dropPerTestKeyspace(); schemaChange(STR + keyspace + STR); assertRows(execute(format(STR, SchemaConstants.SCHEMA_KEYSPACE_NAME, SchemaKeyspace.KEYSPACES), keyspace), row(true)); schemaChange(STR + keyspace + STR); assertRows(... | /**
* Migrated from cql_tests.py:TestCQL.conditional_ddl_keyspace_test()
*/ | Migrated from cql_tests.py:TestCQL.conditional_ddl_keyspace_test() | testDropCreateKeyspaceIfNotExists | {
"repo_name": "szhou1234/cassandra",
"path": "test/unit/org/apache/cassandra/cql3/validation/operations/InsertUpdateIfConditionTest.java",
"license": "apache-2.0",
"size": 46771
} | [
"org.apache.cassandra.schema.SchemaConstants",
"org.apache.cassandra.schema.SchemaKeyspace"
] | import org.apache.cassandra.schema.SchemaConstants; import org.apache.cassandra.schema.SchemaKeyspace; | import org.apache.cassandra.schema.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 2,190,684 |
public Read<K, V> updateConsumerProperties(Map<String, Object> configUpdates) {
Map<String, Object> config = updateKafkaProperties(getConsumerConfig(),
IGNORED_CONSUMER_PROPERTIES, configUpdates);
return toBuilder().setConsumerConfig(config).build();
} | Read<K, V> function(Map<String, Object> configUpdates) { Map<String, Object> config = updateKafkaProperties(getConsumerConfig(), IGNORED_CONSUMER_PROPERTIES, configUpdates); return toBuilder().setConsumerConfig(config).build(); } | /**
* Update consumer configuration with new properties.
*/ | Update consumer configuration with new properties | updateConsumerProperties | {
"repo_name": "amitsela/incubator-beam",
"path": "sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java",
"license": "apache-2.0",
"size": 59120
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 842,123 |
public final Collection<Function> getFunctions(String name, boolean caseSensitive) {
final ImmutableList.Builder<Function> builder = ImmutableList.builder();
// Add explicit functions.
for (FunctionEntry functionEntry
: Pair.right(functionMap.range(name, caseSensitive))) {
builder.add(functi... | final Collection<Function> function(String name, boolean caseSensitive) { final ImmutableList.Builder<Function> builder = ImmutableList.builder(); for (FunctionEntry functionEntry : Pair.right(functionMap.range(name, caseSensitive))) { builder.add(functionEntry.getFunction()); } addImplicitFunctionsToBuilder(builder, n... | /** Returns a collection of all functions, explicit and implicit, with a given
* name. Never null. */ | Returns a collection of all functions, explicit and implicit, with a given | getFunctions | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/jdbc/CalciteSchema.java",
"license": "apache-2.0",
"size": 28594
} | [
"com.google.common.collect.ImmutableList",
"java.util.Collection",
"org.apache.calcite.schema.Function",
"org.apache.calcite.util.Pair"
] | import com.google.common.collect.ImmutableList; import java.util.Collection; import org.apache.calcite.schema.Function; import org.apache.calcite.util.Pair; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.schema.*; import org.apache.calcite.util.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 202,667 |
public Matrix getImageViewMatrix() {
return getImageViewMatrix(mSuppMatrix);
} | Matrix function() { return getImageViewMatrix(mSuppMatrix); } | /**
* Returns the current view matrix
*
* @return
*/ | Returns the current view matrix | getImageViewMatrix | {
"repo_name": "junchenChow/exciting-app",
"path": "app/src/main/java/me/vociegif/android/widget/ImageViewTouchBase.java",
"license": "apache-2.0",
"size": 25660
} | [
"android.graphics.Matrix"
] | import android.graphics.Matrix; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,001,954 |
@Test
public void initiateMessageTest33() throws PcepParseException, PcepOutOfBoundMessageException {
// SRP, LSP ( StatefulLspDbVerTlv), END-POINTS,
// ERO, LSPA, BANDWIDTH OBJECT.
//
byte[] initiateCreationMsg = new byte[]{0x20, 0x0C, 0x00, (byte) 0x58,
0x21, 0... | void function() throws PcepParseException, PcepOutOfBoundMessageException { 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x20, 0x10, 0x00, 0x14, 0x00, 0x00, 0x10, 0x03, 0x00, 0x17, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04... | /**
* This test case checks for SRP, LSP ( StatefulLspDbVerTlv), END-POINTS,
* ERO, LSPA, BANDWIDTH OBJECT objects in PcInitiate message.
*/ | This test case checks for SRP, LSP ( StatefulLspDbVerTlv), END-POINTS, ERO, LSPA, BANDWIDTH OBJECT objects in PcInitiate message | initiateMessageTest33 | {
"repo_name": "sonu283304/onos",
"path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepInitiateMsgExtTest.java",
"license": "apache-2.0",
"size": 81890
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.hamcrest.core.Is",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException",
"org.onosproject.pcepio.exceptions.PcepParseException"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException; | import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; | [
"org.hamcrest",
"org.hamcrest.core",
"org.jboss.netty",
"org.onosproject.pcepio"
] | org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio; | 1,652,577 |
public static MozuUrl performOrderActionUrl(String orderId, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/actions?responseFields={responseFields}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("responseFields", responseFields);
return new... | static MozuUrl function(String orderId, String responseFields) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, orderId); formatter.formatUrl(STR, responseFields); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } | /**
* Get Resource Url for PerformOrderAction
* @param orderId Unique identifier of the order.
* @param responseFields Use this field to include those fields which are not included by default.
* @return String Resource Url
*/ | Get Resource Url for PerformOrderAction | performOrderActionUrl | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java",
"license": "mit",
"size": 12845
} | [
"com.mozu.api.MozuUrl",
"com.mozu.api.utils.UrlFormatter"
] | import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; | import com.mozu.api.*; import com.mozu.api.utils.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,793,109 |
public final Term getNegatedSMTFormula(Theory smtTheory, boolean useAuxVars) {
return smtTheory.not(getSMTFormula(smtTheory, useAuxVars));
} | final Term function(Theory smtTheory, boolean useAuxVars) { return smtTheory.not(getSMTFormula(smtTheory, useAuxVars)); } | /**
* Returns a SMT formula representing the negated atoms.
* Subclasses may overwrite this for pretty output.
*/ | Returns a SMT formula representing the negated atoms. Subclasses may overwrite this for pretty output | getNegatedSMTFormula | {
"repo_name": "juergenchrist/smtinterpol",
"path": "SMTInterpol/src/de/uni_freiburg/informatik/ultimate/smtinterpol/dpll/DPLLAtom.java",
"license": "gpl-3.0",
"size": 3989
} | [
"de.uni_freiburg.informatik.ultimate.logic.Term",
"de.uni_freiburg.informatik.ultimate.logic.Theory"
] | import de.uni_freiburg.informatik.ultimate.logic.Term; import de.uni_freiburg.informatik.ultimate.logic.Theory; | import de.uni_freiburg.informatik.ultimate.logic.*; | [
"de.uni_freiburg.informatik"
] | de.uni_freiburg.informatik; | 201,849 |
public T rss() {
return dataFormat(new RssDataFormat());
} | T function() { return dataFormat(new RssDataFormat()); } | /**
* Uses the RSS data format
*/ | Uses the RSS data format | rss | {
"repo_name": "rmarting/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 42614
} | [
"org.apache.camel.model.dataformat.RssDataFormat"
] | import org.apache.camel.model.dataformat.RssDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,066,870 |
@Override
public void close();
/**
* Initiates a commit of modification. This call logically seals the
* transaction, preventing any the client from interacting with the
* data stores. The transaction is marked as {@link TransactionStatus#SUBMITED}
* and enqueued into the data store bac... | void function(); /** * Initiates a commit of modification. This call logically seals the * transaction, preventing any the client from interacting with the * data stores. The transaction is marked as {@link TransactionStatus#SUBMITED} * and enqueued into the data store backed for processing. * * <p> * The successful co... | /**
*
* Closes transaction and resources allocated to the transaction.
*
* This call does not change Transaction status. Client SHOULD
* explicitly {@link #commit()} or {@link #cancel()} transaction.
*
* @throws IllegalStateException if the transaction has not been
* upda... | Closes transaction and resources allocated to the transaction. This call does not change Transaction status. Client SHOULD explicitly <code>#commit()</code> or <code>#cancel()</code> transaction | close | {
"repo_name": "niuqg/controller",
"path": "opendaylight/md-sal/sal-common-api/src/main/java/org/opendaylight/controller/md/sal/common/api/data/AsyncWriteTransaction.java",
"license": "epl-1.0",
"size": 5050
} | [
"org.opendaylight.controller.md.sal.common.api.TransactionStatus"
] | import org.opendaylight.controller.md.sal.common.api.TransactionStatus; | import org.opendaylight.controller.md.sal.common.api.*; | [
"org.opendaylight.controller"
] | org.opendaylight.controller; | 1,221,820 |
Date getDate(int col); | Date getDate(int col); | /**
* Convenience method to read a Date.
*
* @param col The column, numbered from zero
*
* @return The column value as a Date
*
* @throws IndexOutOfBoundsException If col is an invalid index.
*/ | Convenience method to read a Date | getDate | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/hibernate-core/org/hibernate/ScrollableResults.java",
"license": "gpl-2.0",
"size": 8529
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,998,705 |
ArrayList<Instruction> performCleanupAfterRecompilation(ArrayList<Instruction> tmp) {
String [] outputs = (_outVarnames != null) ? _outVarnames.toArray(new String[0]) : new String[0];
return JMLCUtils.cleanupRuntimeInstructions(tmp, outputs);
}
// -------------------------------- Utility methods ends -------... | ArrayList<Instruction> performCleanupAfterRecompilation(ArrayList<Instruction> tmp) { String [] outputs = (_outVarnames != null) ? _outVarnames.toArray(new String[0]) : new String[0]; return JMLCUtils.cleanupRuntimeInstructions(tmp, outputs); } public MLContext(SparkContext sc, boolean monitorPerformance) throws DMLRun... | /**
* Used internally
* @param tmp
* @return
*/ | Used internally | performCleanupAfterRecompilation | {
"repo_name": "Wenpei/incubator-systemml",
"path": "src/main/java/org/apache/sysml/api/MLContext.java",
"license": "apache-2.0",
"size": 58727
} | [
"java.util.ArrayList",
"org.apache.spark.SparkContext",
"org.apache.spark.api.java.JavaSparkContext",
"org.apache.sysml.api.jmlc.JMLCUtils",
"org.apache.sysml.runtime.DMLRuntimeException",
"org.apache.sysml.runtime.instructions.Instruction"
] | import java.util.ArrayList; import org.apache.spark.SparkContext; import org.apache.spark.api.java.JavaSparkContext; import org.apache.sysml.api.jmlc.JMLCUtils; import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.instructions.Instruction; | import java.util.*; import org.apache.spark.*; import org.apache.spark.api.java.*; import org.apache.sysml.api.jmlc.*; import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.instructions.*; | [
"java.util",
"org.apache.spark",
"org.apache.sysml"
] | java.util; org.apache.spark; org.apache.sysml; | 1,290,816 |
public String getSongTitle() {
return song;
} | String function() { return song; } | /**
* Get song title
* @return title of song (string)
*/ | Get song title | getSongTitle | {
"repo_name": "krs-world/bridges",
"path": "src/main/java/bridges/data_src_dependent/Song.java",
"license": "gpl-2.0",
"size": 2763
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 2,042,353 |
public void setOutFilter(Set<String> value) {
outFilter = value;
} | void function(Set<String> value) { outFilter = value; } | /**
* Sets the "out" direction filter set. The "out" direction is referred to
* copying headers from a Camel message to an external message.
*
* @param value the filter
*/ | Sets the "out" direction filter set. The "out" direction is referred to copying headers from a Camel message to an external message | setOutFilter | {
"repo_name": "objectiser/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/DefaultHeaderFilterStrategy.java",
"license": "apache-2.0",
"size": 9848
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,018,184 |
public int lengthUnknownElement() {
int result = 0;
Node n=this._constructionElement.getFirstChild();
while (n!=null){
if ((n.getNodeType() == Node.ELEMENT_NODE)
&&!n.getNamespaceURI().equals(Constants.SignatureSpecNS)) {
result += 1;
}
n=n.... | int function() { int result = 0; Node n=this._constructionElement.getFirstChild(); while (n!=null){ if ((n.getNodeType() == Node.ELEMENT_NODE) &&!n.getNamespaceURI().equals(Constants.SignatureSpecNS)) { result += 1; } n=n.getNextSibling(); } return result; } | /**
* Method lengthUnknownElement
*
* @return the number of UnknownElement elements in this X509Data
*/ | Method lengthUnknownElement | lengthUnknownElement | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/keys/content/X509Data.java",
"license": "apache-2.0",
"size": 14872
} | [
"com.sun.org.apache.xml.internal.security.utils.Constants",
"org.w3c.dom.Node"
] | import com.sun.org.apache.xml.internal.security.utils.Constants; import org.w3c.dom.Node; | import com.sun.org.apache.xml.internal.security.utils.*; import org.w3c.dom.*; | [
"com.sun.org",
"org.w3c.dom"
] | com.sun.org; org.w3c.dom; | 2,051,543 |
// it is illegal URI (fragment before query), but we must support such URI
// Semicolon as parameters separator is supported (WEB-6671)
public interface Url {
@NotNull String getPath(); | interface Url { @NotNull String function(); | /**
* System-independent path
*/ | System-independent path | getPath | {
"repo_name": "ingokegel/intellij-community",
"path": "platform/platform-util-io/src/com/intellij/util/Url.java",
"license": "apache-2.0",
"size": 1382
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 897,042 |
@Override
public Timer createTimer(final MetricsComponent component,
final MetricsFeature feature,
final String metricName) {
final String name = generateName(component, feature, metricName);
return metricsRegistry.timer(name);
} | Timer function(final MetricsComponent component, final MetricsFeature feature, final String metricName) { final String name = generateName(component, feature, metricName); return metricsRegistry.timer(name); } | /**
* Creates a Timer metric.
*
* @param component component the Timer is defined in
* @param feature feature the Timer is defined in
* @param metricName local name of the metric
* @return the created Timer Metric
*/ | Creates a Timer metric | createTimer | {
"repo_name": "helloworld20000/onos",
"path": "utils/misc/src/main/java/org/onlab/metrics/MetricsManager.java",
"license": "apache-2.0",
"size": 10366
} | [
"com.codahale.metrics.Timer"
] | import com.codahale.metrics.Timer; | import com.codahale.metrics.*; | [
"com.codahale.metrics"
] | com.codahale.metrics; | 616,938 |
private void waitForAllRegionsAssigned() throws IOException {
int totalRegions = HBaseTestingUtility.KEYS.length;
try {
Thread.sleep(200);
} catch (InterruptedException e) {
throw new InterruptedIOException();
}
while (UTIL.getMiniHBaseCluster().countServedRegions() < totalRegions) {... | void function() throws IOException { int totalRegions = HBaseTestingUtility.KEYS.length; try { Thread.sleep(200); } catch (InterruptedException e) { throw new InterruptedIOException(); } while (UTIL.getMiniHBaseCluster().countServedRegions() < totalRegions) { LOG.debug(STR+ totalRegions +STR + UTIL.getMiniHBaseCluster(... | /**
* Wait until all the regions are assigned.
*/ | Wait until all the regions are assigned | waitForAllRegionsAssigned | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java",
"license": "apache-2.0",
"size": 11804
} | [
"java.io.IOException",
"java.io.InterruptedIOException"
] | import java.io.IOException; import java.io.InterruptedIOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,025,526 |
public void testBug47029() throws Exception {
//System.setProperty("gemfirexd.debug.true", "QueryDistribution,TraceLock_*");
// reduce lock timeout for this test
Properties props = new Properties();
props.setProperty(GfxdConstants.MAX_LOCKWAIT, "10000");
// start one server and one client
st... | void function() throws Exception { Properties props = new Properties(); props.setProperty(GfxdConstants.MAX_LOCKWAIT, "10000"); startVMs(1, 2, 0, null, props); GemFireXDQueryObserver old = null; try { clientSQLExecute(1, STR); clientSQLExecute(1, STR + STR + STR + STR); clientSQLExecute(1, STR); | /**
* Test PutAll and Drop Index in //.
*
* @throws Exception
*/ | Test PutAll and Drop Index in // | testBug47029 | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/tools/src/dunit/java/com/pivotal/gemfirexd/insert/DistributedInsertDUnit.java",
"license": "apache-2.0",
"size": 9416
} | [
"com.pivotal.gemfirexd.internal.engine.GemFireXDQueryObserver",
"com.pivotal.gemfirexd.internal.engine.GfxdConstants",
"java.util.Properties"
] | import com.pivotal.gemfirexd.internal.engine.GemFireXDQueryObserver; import com.pivotal.gemfirexd.internal.engine.GfxdConstants; import java.util.Properties; | import com.pivotal.gemfirexd.internal.engine.*; import java.util.*; | [
"com.pivotal.gemfirexd",
"java.util"
] | com.pivotal.gemfirexd; java.util; | 926,386 |
public synchronized WSProjectInfo getProjectInfo() throws IhcExecption {
openConnection(url);
super.setCookies(cookies);
setRequestProperty("SOAPAction", "getProjectInfo");
String response = sendQuery(emptyQuery);
closeConnection();
WSProjectInfo projectInfo = new WSProjectInfo();
projectInfo.encode... | synchronized WSProjectInfo function() throws IhcExecption { openConnection(url); super.setCookies(cookies); setRequestProperty(STR, STR); String response = sendQuery(emptyQuery); closeConnection(); WSProjectInfo projectInfo = new WSProjectInfo(); projectInfo.encodeData(response); return projectInfo; } | /**
* Query project information from the controller.
*
* @return project information.
* @throws IhcExecption
*/ | Query project information from the controller | getProjectInfo | {
"repo_name": "rahulopengts/myhome",
"path": "bundles/binding/org.openhab.binding.ihc/src/main/java/org/openhab/binding/ihc/ws/IhcControllerService.java",
"license": "epl-1.0",
"size": 6258
} | [
"org.openhab.binding.ihc.ws.datatypes.WSProjectInfo"
] | import org.openhab.binding.ihc.ws.datatypes.WSProjectInfo; | import org.openhab.binding.ihc.ws.datatypes.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,287,828 |
@GwtCompatible(serializable = true)
public static <E> ArrayList<E> newArrayList(Iterator<? extends E> elements) {
ArrayList<E> list = newArrayList();
Iterators.addAll(list, elements);
return list;
}
/**
* Creates an {@code ArrayList} instance backed by an array of the
* <i>exact</i> size spec... | @GwtCompatible(serializable = true) static <E> ArrayList<E> function(Iterator<? extends E> elements) { ArrayList<E> list = newArrayList(); Iterators.addAll(list, elements); return list; } /** * Creates an {@code ArrayList} instance backed by an array of the * <i>exact</i> size specified; equivalent to * {@link ArrayLis... | /**
* Creates a <i>mutable</i> {@code ArrayList} instance containing the given
* elements.
*
* <p><b>Note:</b> if mutability is not required and the elements are
* non-null, use {@link ImmutableList#copyOf(Iterator)} instead.
*
* @param elements the elements that the list should contain, in order
... | Creates a mutable ArrayList instance containing the given elements. Note: if mutability is not required and the elements are non-null, use <code>ImmutableList#copyOf(Iterator)</code> instead | newArrayList | {
"repo_name": "npvincent/guava",
"path": "guava/src/com/google/common/collect/Lists.java",
"license": "apache-2.0",
"size": 35510
} | [
"com.google.common.annotations.GwtCompatible",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Iterator"
] | import com.google.common.annotations.GwtCompatible; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; | import com.google.common.annotations.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,098,923 |
void addCloneParagraph(Paragraph srcParagraph, AuthenticationInfo subject) {
// Keep paragraph original ID
Paragraph newParagraph = new Paragraph(srcParagraph.getId(), this, paragraphJobListener);
Map<String, Object> config = new HashMap<>(srcParagraph.getConfig());
Map<String, Object> param = srcPa... | void addCloneParagraph(Paragraph srcParagraph, AuthenticationInfo subject) { Paragraph newParagraph = new Paragraph(srcParagraph.getId(), this, paragraphJobListener); Map<String, Object> config = new HashMap<>(srcParagraph.getConfig()); Map<String, Object> param = srcParagraph.settings.getParams(); Map<String, Input> f... | /**
* Clone paragraph and add it to note.
*
* @param srcParagraph source paragraph
*/ | Clone paragraph and add it to note | addCloneParagraph | {
"repo_name": "apache/zeppelin",
"path": "zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Note.java",
"license": "apache-2.0",
"size": 37466
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.zeppelin.display.Input",
"org.apache.zeppelin.interpreter.InterpreterResult",
"org.apache.zeppelin.user.AuthenticationInfo"
] | import java.util.HashMap; import java.util.Map; import org.apache.zeppelin.display.Input; import org.apache.zeppelin.interpreter.InterpreterResult; import org.apache.zeppelin.user.AuthenticationInfo; | import java.util.*; import org.apache.zeppelin.display.*; import org.apache.zeppelin.interpreter.*; import org.apache.zeppelin.user.*; | [
"java.util",
"org.apache.zeppelin"
] | java.util; org.apache.zeppelin; | 2,027,191 |
public void showOnAnchor(
@NonNull View anchor,
@VerticalPosition int vertPos,
@HorizontalPosition int horizPos,
int x,
int y,
boolean fitInScreen
) {
setClippingEnabled(fitInScreen);
final View contentView = getContentView(... | void function( @NonNull View anchor, @VerticalPosition int vertPos, @HorizontalPosition int horizPos, int x, int y, boolean fitInScreen ) { setClippingEnabled(fitInScreen); final View contentView = getContentView(); final Rect windowRect = new Rect(); contentView.getWindowVisibleDisplayFrame(windowRect); final int wind... | /**
* Show at relative position to anchor View with translation.
* @param anchor Anchor View
* @param vertPos Vertical Position Flag
* @param horizPos Horizontal Position Flag
* @param x Translation X
* @param y Translation Y
* @param fitInScreen Automatically fit in screen or not
... | Show at relative position to anchor View with translation | showOnAnchor | {
"repo_name": "kakajika/RelativePopupWindow",
"path": "relativepopupwindow/src/main/java/com/labo/kaji/relativepopupwindow/RelativePopupWindow.java",
"license": "mit",
"size": 7915
} | [
"android.graphics.Rect",
"android.view.Gravity",
"android.view.View",
"androidx.annotation.NonNull",
"androidx.core.widget.PopupWindowCompat"
] | import android.graphics.Rect; import android.view.Gravity; import android.view.View; import androidx.annotation.NonNull; import androidx.core.widget.PopupWindowCompat; | import android.graphics.*; import android.view.*; import androidx.annotation.*; import androidx.core.widget.*; | [
"android.graphics",
"android.view",
"androidx.annotation",
"androidx.core"
] | android.graphics; android.view; androidx.annotation; androidx.core; | 1,982,962 |
@Override
public List<InventoryItem> getChainList(Sha256Hash startBlock, Sha256Hash stopBlock) throws BlockStoreException {
//
// Get the block height for the start block
//
int blockHeight = 0;
Connection conn = getConnection();
try (PreparedStatement s = conn
.prepareStatement("SELECT block_height... | List<InventoryItem> function(Sha256Hash startBlock, Sha256Hash stopBlock) throws BlockStoreException { Connection conn = getConnection(); try (PreparedStatement s = conn .prepareStatement(STR + STR)) { s.setLong(1, getHashIndex(startBlock)); s.setBytes(2, startBlock.getBytes()); ResultSet r = s.executeQuery(); if (r.ne... | /**
* Returns the chain list from the block following the start block up to the
* stop block. A maximum of 500 blocks will be returned. The list will start
* with the genesis block if the start block is not found.
*
* @param startBlock
* The start block
* @param stopBlock
* The sto... | Returns the chain list from the block following the start block up to the stop block. A maximum of 500 blocks will be returned. The list will start with the genesis block if the start block is not found | getChainList | {
"repo_name": "cping/RipplePower",
"path": "eclipse/RipplePower/src/org/ripple/power/txns/btc/BlockStoreDataBase.java",
"license": "apache-2.0",
"size": 97318
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.util.List"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,125,721 |
private static boolean createDirIfNotExist(String path) {
File f = new File(path);
if (!f.exists()) {
if (!f.mkdirs()) {
Log.e(LOG_GPAC_CONFIG, "Failed to create directory " + path); //$NON-NLS-1$
return false;
} else {
Log.i(LO... | static boolean function(String path) { File f = new File(path); if (!f.exists()) { if (!f.mkdirs()) { Log.e(LOG_GPAC_CONFIG, STR + path); return false; } else { Log.i(LOG_GPAC_CONFIG, STR + path); } } return true; } | /**
* Creates a given directory if it does not exist
*
* @param path
*/ | Creates a given directory if it does not exist | createDirIfNotExist | {
"repo_name": "psteinb/gpac",
"path": "applications/osmo4_android/src/com/gpac/Osmo4/GpacConfig.java",
"license": "lgpl-2.1",
"size": 6126
} | [
"android.util.Log",
"java.io.File"
] | import android.util.Log; import java.io.File; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 1,439,759 |
public boolean openAnalysis(File f, SaveType saveType) {
if (!f.exists() || !f.canRead()) {
throw new IllegalArgumentException("Can't read " + f.getPath());
}
mainFrameLoadSaveHelper.prepareForFileLoad(f, saveType);
mainFrameLoadSaveHelper.loadAnalysis(f);
retur... | boolean function(File f, SaveType saveType) { if (!f.exists() !f.canRead()) { throw new IllegalArgumentException(STR + f.getPath()); } mainFrameLoadSaveHelper.prepareForFileLoad(f, saveType); mainFrameLoadSaveHelper.loadAnalysis(f); return true; } | /**
* Opens the analysis. Also clears the source and summary panes. Makes
* comments enabled false. Sets the saveType and adds the file to the recent
* menu.
*
* @param f
* @return whether the operation was successful
*/ | Opens the analysis. Also clears the source and summary panes. Makes comments enabled false. Sets the saveType and adds the file to the recent menu | openAnalysis | {
"repo_name": "jesusaplsoft/FindAllBugs",
"path": "findbugs/src/gui/edu/umd/cs/findbugs/gui2/MainFrame.java",
"license": "gpl-2.0",
"size": 39137
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,643,820 |
public boolean addAttribute(Name Dn, Attribute a)
{
Name dn = preParse(Dn);
if (ctx == null) return error("Null Directory Context\n in BasicOps.addAttribute()\n (so can't do anything!)", null);
BasicAttributes atts = new BasicAttributes();
atts.put(a);
return ... | boolean function(Name Dn, Attribute a) { Name dn = preParse(Dn); if (ctx == null) return error(STR, null); BasicAttributes atts = new BasicAttributes(); atts.put(a); return modifyAttributes(dn, DirContext.ADD_ATTRIBUTE, atts); } | /**
* Adds a new attribute to a particular dn.
*
* @param Dn distinguished name of object
* @param a the attribute to modify
* @return success status
*/ | Adds a new attribute to a particular dn | addAttribute | {
"repo_name": "idega/com.idega.block.ldap",
"path": "src/java/com/idega/core/ldap/client/jndi/BasicOps.java",
"license": "gpl-3.0",
"size": 48723
} | [
"javax.naming.Name",
"javax.naming.directory.Attribute",
"javax.naming.directory.BasicAttributes",
"javax.naming.directory.DirContext"
] | import javax.naming.Name; import javax.naming.directory.Attribute; import javax.naming.directory.BasicAttributes; import javax.naming.directory.DirContext; | import javax.naming.*; import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 1,492,805 |
public ProcStarter envs(Map<String, String> overrides) {
return envs(Util.mapToEnv(overrides));
} | ProcStarter function(Map<String, String> overrides) { return envs(Util.mapToEnv(overrides)); } | /**
* Sets the environment variable overrides.
*
* <p>
* In adition to what the current process
* is inherited (if this is going to be launched from a slave agent, that
* becomes the "current" process), these variables will be also set.
*/ | Sets the environment variable overrides. In adition to what the current process is inherited (if this is going to be launched from a slave agent, that becomes the "current" process), these variables will be also set | envs | {
"repo_name": "stefanbrausch/hudson-main",
"path": "core/src/main/java/hudson/Launcher.java",
"license": "mit",
"size": 33125
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,273,344 |
void createUserCacheDirs(List<String> localDirs, String user)
throws IOException {
LOG.info("Initializing user " + user);
boolean appcacheDirStatus = false;
boolean distributedCacheDirStatus = false;
FsPermission appCachePerms = new FsPermission(APPCACHE_PERM);
FsPermission fileperms = new Fs... | void createUserCacheDirs(List<String> localDirs, String user) throws IOException { LOG.info(STR + user); boolean appcacheDirStatus = false; boolean distributedCacheDirStatus = false; FsPermission appCachePerms = new FsPermission(APPCACHE_PERM); FsPermission fileperms = new FsPermission(FILECACHE_PERM); for (String loca... | /**
* Initialize the local cache directories for a particular user.
* <ul>
* <li>$local.dir/usercache/$user</li>
* <li>$local.dir/usercache/$user/appcache</li>
* <li>$local.dir/usercache/$user/filecache</li>
* </ul>
*/ | Initialize the local cache directories for a particular user. $local.dir/usercache/$user $local.dir/usercache/$user/appcache $local.dir/usercache/$user/filecache | createUserCacheDirs | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DockerContainerExecutor.java",
"license": "apache-2.0",
"size": 30543
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsPermission"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,679,009 |
@SuppressWarnings("unchecked")
public FieldsQueryCursor<List<?>> runDdlStatement(String sql, SqlCommand cmd) throws IgniteCheckedException{
IgniteInternalFuture fut;
try {
if (cmd instanceof SqlCreateIndexCommand) {
SqlCreateIndexCommand cmd0 = (SqlCreateIndexCommand... | @SuppressWarnings(STR) FieldsQueryCursor<List<?>> function(String sql, SqlCommand cmd) throws IgniteCheckedException{ IgniteInternalFuture fut; try { if (cmd instanceof SqlCreateIndexCommand) { SqlCreateIndexCommand cmd0 = (SqlCreateIndexCommand)cmd; GridH2Table tbl = idx.dataTable(cmd0.schemaName(), cmd0.tableName());... | /**
* Run DDL statement.
*
* @param sql Original SQL.
* @param cmd Command.
* @return Result.
* @throws IgniteCheckedException On error.
*/ | Run DDL statement | runDdlStatement | {
"repo_name": "dream-x/ignite",
"path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ddl/DdlStatementsProcessor.java",
"license": "apache-2.0",
"size": 20842
} | [
"java.util.Collections",
"java.util.LinkedHashMap",
"java.util.List",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.cache.QueryIndex",
"org.apache.ignite.cache.QueryIndexType",
"org.apache.ignite.cache.query.FieldsQueryCursor",
"org.apache.ignite.internal.IgniteInternalFuture",
"org... | import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.cache.QueryIndexType; import org.apache.ignite.cache.query.FieldsQueryCursor; import org.apache.ignite.internal.Ignite... | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.query.*; import org.apache.ignite.internal.processors.qu... | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 619,969 |
return VillagerShops.getShopFromEntityId(targetUniqueId).map(shopEntity -> {
if (shopEntity.playershopContainer != null && !shopEntity.playershopContainer.getTileEntity().isPresent()) {
VillagerShops.w("Found a shop that lost his container, cancelled interaction!");
VillagerShops.w("Location: %s", shopEnti... | return VillagerShops.getShopFromEntityId(targetUniqueId).map(shopEntity -> { if (shopEntity.playershopContainer != null && !shopEntity.playershopContainer.getTileEntity().isPresent()) { VillagerShops.w(STR); VillagerShops.w(STR, shopEntity.getLocation().toString()); if (shopEntity.getShopOwner().isPresent()) VillagerSh... | /**
* return true to cancel the event in the parent
*/ | return true to cancel the event in the parent | clickEntity | {
"repo_name": "DosMike/VillagerShops",
"path": "src/main/java/de/dosmike/sponge/vshop/shops/InteractionHandler.java",
"license": "mit",
"size": 6642
} | [
"de.dosmike.sponge.vshop.PermissionRegistra",
"de.dosmike.sponge.vshop.Utilities",
"de.dosmike.sponge.vshop.VillagerShops"
] | import de.dosmike.sponge.vshop.PermissionRegistra; import de.dosmike.sponge.vshop.Utilities; import de.dosmike.sponge.vshop.VillagerShops; | import de.dosmike.sponge.vshop.*; | [
"de.dosmike.sponge"
] | de.dosmike.sponge; | 1,362,556 |
protected void handleUpdate() {
Log.w(this.getClass().getName(), "activity doesn't implement handleUpdate");
} | void function() { Log.w(this.getClass().getName(), STR); } | /**
* Called on each NB activity after the DB has been updated by the sync service. This method
* should return as quickly as possible.
*/ | Called on each NB activity after the DB has been updated by the sync service. This method should return as quickly as possible | handleUpdate | {
"repo_name": "bruceyou/NewsBlur",
"path": "clients/android/NewsBlur/src/com/newsblur/activity/NbActivity.java",
"license": "mit",
"size": 4096
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 914,693 |
@Nullable
public MerchantRecipe canRecipeBeUsed(ItemStack stack0, ItemStack stack1, int index)
{
if (index > 0 && index < this.size())
{
MerchantRecipe merchantrecipe1 = (MerchantRecipe)this.get(index);
return !this.areItemStacksExactlyEqual(stack0, merchantrecipe1.ge... | MerchantRecipe function(ItemStack stack0, ItemStack stack1, int index) { if (index > 0 && index < this.size()) { MerchantRecipe merchantrecipe1 = (MerchantRecipe)this.get(index); return !this.areItemStacksExactlyEqual(stack0, merchantrecipe1.getItemToBuy()) (!stack1.isEmpty() merchantrecipe1.hasSecondItemToBuy()) && (!... | /**
* can par1,par2 be used to in crafting recipe par3
*
* @param stack0 The first stack for the recipe.
* @param stack1 The second stack for the recipe.
* @param index The recipe's index.
*/ | can par1,par2 be used to in crafting recipe par3 | canRecipeBeUsed | {
"repo_name": "SuperUnitato/UnLonely",
"path": "build/tmp/recompileMc/sources/net/minecraft/village/MerchantRecipeList.java",
"license": "lgpl-2.1",
"size": 5247
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,600,600 |
public void commandHung() {
final Error error = new Error();
error.setErrorLevel(Error.ERROR_LEVEL_FATAL);
error.setBuildID(commandToReportOn.agent.getActiveBuildID());
error.setHostName(commandToReportOn.getAgentHost().getHost());
error.setDescription("Version control command hung");
... | void function() { final Error error = new Error(); error.setErrorLevel(Error.ERROR_LEVEL_FATAL); error.setBuildID(commandToReportOn.agent.getActiveBuildID()); error.setHostName(commandToReportOn.getAgentHost().getHost()); error.setDescription(STR); error.setDetails(STRSTR\STR + commandToReportOn.getTimeoutSecs() + STR)... | /**
* This callback method is called when watched command is
* identified as hung.
*/ | This callback method is called when watched command is identified as hung | commandHung | {
"repo_name": "simeshev/parabuild-ci",
"path": "src/org/parabuild/ci/versioncontrol/VersionControlRemoteCommand.java",
"license": "lgpl-3.0",
"size": 10806
} | [
"org.parabuild.ci.error.Error",
"org.parabuild.ci.error.ErrorManagerFactory"
] | import org.parabuild.ci.error.Error; import org.parabuild.ci.error.ErrorManagerFactory; | import org.parabuild.ci.error.*; | [
"org.parabuild.ci"
] | org.parabuild.ci; | 1,287,384 |
public void addChoosableFileFilterWithDefaultExtension(FileFilter filter, String ext) {
filters.put(filter, ext);
addChoosableFileFilter(filter);
}
| void function(FileFilter filter, String ext) { filters.put(filter, ext); addChoosableFileFilter(filter); } | /**
* Adds a chooseable file filter and associates it with a default extension.
* @param filter the filter to add
* @param ext the default extension for files of this type
*/ | Adds a chooseable file filter and associates it with a default extension | addChoosableFileFilterWithDefaultExtension | {
"repo_name": "seamang/droid",
"path": "droid-swing-ui/src/main/java/uk/gov/nationalarchives/droid/gui/widgetwrapper/SaveAsFileChooser.java",
"license": "bsd-3-clause",
"size": 6994
} | [
"javax.swing.filechooser.FileFilter"
] | import javax.swing.filechooser.FileFilter; | import javax.swing.filechooser.*; | [
"javax.swing"
] | javax.swing; | 1,930,281 |
private OnEvaluateJavaScriptResultHelper executeJavaScriptAndWaitForDialog(
final OnEvaluateJavaScriptResultHelper helper, String script)
throws InterruptedException {
helper.evaluateJavaScript(getActivity().getActiveContentViewCore().getWebContents(),
script);
... | OnEvaluateJavaScriptResultHelper function( final OnEvaluateJavaScriptResultHelper helper, String script) throws InterruptedException { helper.evaluateJavaScript(getActivity().getActiveContentViewCore().getWebContents(), script); boolean criteriaSatisfied = CriteriaHelper.pollForCriteria( new JavascriptAppModalDialogSho... | /**
* Given a JavaScript evaluation helper, asynchronously executes the given
* code for spawning a dialog and waits for the dialog to be visible.
*/ | Given a JavaScript evaluation helper, asynchronously executes the given code for spawning a dialog and waits for the dialog to be visible | executeJavaScriptAndWaitForDialog | {
"repo_name": "markYoungH/chromium.src",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/test/ModalDialogTest.java",
"license": "bsd-3-clause",
"size": 17268
} | [
"org.chromium.content.browser.test.util.CriteriaHelper",
"org.chromium.content.browser.test.util.TestCallbackHelperContainer"
] | import org.chromium.content.browser.test.util.CriteriaHelper; import org.chromium.content.browser.test.util.TestCallbackHelperContainer; | import org.chromium.content.browser.test.util.*; | [
"org.chromium.content"
] | org.chromium.content; | 2,315,146 |
if (!hooks.containsKey(hook) || hooks.get(hook) == null) {
hooks.put(hook, new ArrayList<Hook>());
}
boolean found = false;
for (Hook h : hooks.get(hook)) {
if (func.equals(h)) {
found = true;
break;
}
}
if (!fou... | if (!hooks.containsKey(hook) hooks.get(hook) == null) { hooks.put(hook, new ArrayList<Hook>()); } boolean found = false; for (Hook h : hooks.get(hook)) { if (func.equals(h)) { found = true; break; } } if (!found) { hooks.get(hook).add(func); } } | /**
* Add a function to hook. Ignore if already on hook.
*
* @param hook The name of the hook.
* @param func A class implements interface Hook and contains the function to add.
*/ | Add a function to hook. Ignore if already on hook | addHook | {
"repo_name": "stockcode/vicky-learn",
"path": "src/main/java/com/ichi2/libanki/hooks/Hooks.java",
"license": "gpl-3.0",
"size": 5091
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 252,027 |
public void setSeriesItemLabelPaint(int series, Paint paint,
boolean notify);
| void function(int series, Paint paint, boolean notify); | /**
* Sets the item label paint for a series and, if requested, sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param series the series index.
* @param paint the paint (<code>null</code> permitted).
* @param notify notify listeners?
*
* @sinc... | Sets the item label paint for a series and, if requested, sends a <code>RendererChangeEvent</code> to all registered listeners | setSeriesItemLabelPaint | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_11/source/org/jfree/chart/renderer/category/CategoryItemRenderer.java",
"license": "gpl-2.0",
"size": 64985
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,678,524 |
private void processPingRequest() {
TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(getLocalNodeId());
res.client(true);
sockWriter.sendMessage(res);
} | void function() { TcpDiscoveryPingResponse res = new TcpDiscoveryPingResponse(getLocalNodeId()); res.client(true); sockWriter.sendMessage(res); } | /**
* Router want to ping this client.
*/ | Router want to ping this client | processPingRequest | {
"repo_name": "nivanov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ClientImpl.java",
"license": "apache-2.0",
"size": 86902
} | [
"org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingResponse"
] | import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryPingResponse; | import org.apache.ignite.spi.discovery.tcp.messages.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 284,616 |
private static void persistAttributes(Mutator<String> mutator, final String mailbox,
final List<UUID> messageIds, final Map<String, Object> attributes)
throws HectorException
{
List<HColumn<String, byte[]>> columns = Marshaller.mapToHColumns(attributes);
for (UUID messageId : messageIds) {
logger.debu... | static void function(Mutator<String> mutator, final String mailbox, final List<UUID> messageIds, final Map<String, Object> attributes) throws HectorException { List<HColumn<String, byte[]>> columns = Marshaller.mapToHColumns(attributes); for (UUID messageId : messageIds) { logger.debug(STR, messageId.toString(), mailbo... | /**
* Persist attributes for multiple messages
*
* @param mailbox
* @param messageIds
* @param attributes
* @throws HectorException
*/ | Persist attributes for multiple messages | persistAttributes | {
"repo_name": "elasticinbox/elasticinbox",
"path": "modules/core/src/main/java/com/elasticinbox/core/cassandra/persistence/MessagePersistence.java",
"license": "bsd-3-clause",
"size": 10613
} | [
"java.util.List",
"java.util.Map",
"me.prettyprint.hector.api.beans.HColumn",
"me.prettyprint.hector.api.exceptions.HectorException",
"me.prettyprint.hector.api.factory.HFactory",
"me.prettyprint.hector.api.mutation.Mutator"
] | import java.util.List; import java.util.Map; import me.prettyprint.hector.api.beans.HColumn; import me.prettyprint.hector.api.exceptions.HectorException; import me.prettyprint.hector.api.factory.HFactory; import me.prettyprint.hector.api.mutation.Mutator; | import java.util.*; import me.prettyprint.hector.api.beans.*; import me.prettyprint.hector.api.exceptions.*; import me.prettyprint.hector.api.factory.*; import me.prettyprint.hector.api.mutation.*; | [
"java.util",
"me.prettyprint.hector"
] | java.util; me.prettyprint.hector; | 346,110 |
public static void createtable(String pathTable1, long numbRows, int seed,
boolean debug) throws ExecException, IOException, ParseException {
System.out.println("createtable()");
Path unsortedPath = new Path(pathTable1);
// Remove old table (if present)
removeDir(unsortedPath);
// Create ... | static void function(String pathTable1, long numbRows, int seed, boolean debug) throws ExecException, IOException, ParseException { System.out.println(STR); Path unsortedPath = new Path(pathTable1); removeDir(unsortedPath); BasicTable.Writer writer = new BasicTable.Writer(unsortedPath, TABLE_SCHEMA, TABLE_STORAGE, conf... | /**
* Create unsorted table
*
*/ | Create unsorted table | createtable | {
"repo_name": "simplegeo/hadoop-pig",
"path": "contrib/zebra/src/test/org/apache/hadoop/zebra/mapred/ToolTestComparator.java",
"license": "apache-2.0",
"size": 32152
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.BytesWritable",
"org.apache.hadoop.zebra.io.BasicTable",
"org.apache.hadoop.zebra.io.TableInserter",
"org.apache.hadoop.zebra.parser.ParseException",
"org.apache.hadoop.zebra.schema.Schema... | import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.zebra.io.BasicTable; import org.apache.hadoop.zebra.io.TableInserter; import org.apache.hadoop.zebra.parser.ParseException; import org.apache.... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.zebra.io.*; import org.apache.hadoop.zebra.parser.*; import org.apache.hadoop.zebra.schema.*; import org.apache.hadoop.zebra.types.*; import org.apache.pig.backend.executionengine.*; import org.a... | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.pig"
] | java.io; java.util; org.apache.hadoop; org.apache.pig; | 2,843,737 |
protected void resetLocation(int endOffset, int g1) {
if (undoLocation != endOffset) {
this.rec.index = undoLocation;
}
else {
this.rec.index = g1;
}
}
protected int undoLocation;
protected... | void function(int endOffset, int g1) { if (undoLocation != endOffset) { this.rec.index = undoLocation; } else { this.rec.index = g1; } } protected int undoLocation; protected MarkData rec; } @SuppressWarnings(STR) class InsertUndo extends AbstractUndoableEdit { protected InsertUndo(int offset, int length) { super(); th... | /**
* Resets the location of the Position to the offset when the
* receiver was instantiated.
*
* @param endOffset end location of inserted string.
* @param g1 resulting end of gap.
*/ | Resets the location of the Position to the offset when the receiver was instantiated | resetLocation | {
"repo_name": "universsky/openjdk",
"path": "jdk/src/java.desktop/share/classes/javax/swing/text/GapContent.java",
"license": "gpl-2.0",
"size": 32121
} | [
"javax.swing.undo.AbstractUndoableEdit"
] | import javax.swing.undo.AbstractUndoableEdit; | import javax.swing.undo.*; | [
"javax.swing"
] | javax.swing; | 2,573,821 |
@Nonnull
List<Entity> getEntities(@Nonnull Object value); | List<Entity> getEntities(@Nonnull Object value); | /**
* Get the entities with the associated attribute value.
* @param value The attribute value.
* @return The list of entities.
*/ | Get the entities with the associated attribute value | getEntities | {
"repo_name": "kluver/lenskit",
"path": "lenskit-core/src/main/java/org/lenskit/data/store/EntityIndex.java",
"license": "lgpl-2.1",
"size": 1462
} | [
"java.util.List",
"javax.annotation.Nonnull",
"org.lenskit.data.entities.Entity"
] | import java.util.List; import javax.annotation.Nonnull; import org.lenskit.data.entities.Entity; | import java.util.*; import javax.annotation.*; import org.lenskit.data.entities.*; | [
"java.util",
"javax.annotation",
"org.lenskit.data"
] | java.util; javax.annotation; org.lenskit.data; | 426,165 |
public void beforeTestMethod(Object testObject, Method testMethod) {
// empty
}
| void function(Object testObject, Method testMethod) { } | /**
* Invoked before the test but after the test setup (eg @Before) is run.
* This can be overridden to for example further initialize the test-fixture using values that were set during
* the test setup.
*
* @param testObject The test instance, not null
* @param testMethod The test m... | Invoked before the test but after the test setup (eg @Before) is run. This can be overridden to for example further initialize the test-fixture using values that were set during the test setup | beforeTestMethod | {
"repo_name": "arteam/unitils",
"path": "unitils-core/src/main/java/org/unitils/core/TestListener.java",
"license": "apache-2.0",
"size": 5403
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,230,938 |
private static boolean hasConstraint(Rule rule, String keyword) {
return NonconfigurableAttributeMapper.of(rule).get(CONSTRAINTS_ATTR, Type.STRING_LIST)
.contains(keyword);
} | static boolean function(Rule rule, String keyword) { return NonconfigurableAttributeMapper.of(rule).get(CONSTRAINTS_ATTR, Type.STRING_LIST) .contains(keyword); } | /**
* Checks whether specified constraint keyword is present in the
* tags attribute of the test or test suite rule.
*
* Method assumes that provided rule is a test or a test suite. Behavior is
* undefined otherwise.
*/ | Checks whether specified constraint keyword is present in the tags attribute of the test or test suite rule. Method assumes that provided rule is a test or a test suite. Behavior is undefined otherwise | hasConstraint | {
"repo_name": "abergmeier-dsfishlabs/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/TargetUtils.java",
"license": "apache-2.0",
"size": 9459
} | [
"com.google.devtools.build.lib.syntax.Type"
] | import com.google.devtools.build.lib.syntax.Type; | import com.google.devtools.build.lib.syntax.*; | [
"com.google.devtools"
] | com.google.devtools; | 147,386 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null)
{
super.getPropertyDescriptors(object);
addNamePropertyDescriptor(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addNamePropertyDescriptor(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This returns the property descriptors for the adapted class. | getPropertyDescriptors | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/provider/BranchInfoItemProvider.java",
"license": "epl-1.0",
"size": 7812
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 712,905 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Ports.class)) {
case VhdlPackage.PORTS__DECLARATION:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Ports.class)) { case VhdlPackage.PORTS__DECLARATION: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "mlanoe/x-vhdl",
"path": "plugins/net.mlanoe.language.vhdl.edit/src-gen/net/mlanoe/language/vhdl/provider/PortsItemProvider.java",
"license": "gpl-3.0",
"size": 8084
} | [
"net.mlanoe.language.vhdl.Ports",
"net.mlanoe.language.vhdl.VhdlPackage",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import net.mlanoe.language.vhdl.Ports; import net.mlanoe.language.vhdl.VhdlPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import net.mlanoe.language.vhdl.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"net.mlanoe.language",
"org.eclipse.emf"
] | net.mlanoe.language; org.eclipse.emf; | 2,127,275 |
EClass getStraight(); | EClass getStraight(); | /**
* Returns the meta object for class '{@link org.xtext.rollercoaster.dsl.coaster.Straight <em>Straight</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Straight</em>'.
* @see org.xtext.rollercoaster.dsl.coaster.Straight
* @generated
*/ | Returns the meta object for class '<code>org.xtext.rollercoaster.dsl.coaster.Straight Straight</code>'. | getStraight | {
"repo_name": "bettsmatt/roller-coaster-dsl",
"path": "org.xtext.rollercoaster.dsl/src-gen/org/xtext/rollercoaster/dsl/coaster/CoasterPackage.java",
"license": "mit",
"size": 28313
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 754,963 |
public synchronized CmsScheduledJobInfo unscheduleJob(CmsObject cms, String jobId)
throws CmsRoleViolationException {
if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) {
// simple unit tests will have runlevel 1 and no CmsObject
OpenCms.getRoleManager().checkRole(cms, ... | synchronized CmsScheduledJobInfo function(CmsObject cms, String jobId) throws CmsRoleViolationException { if (OpenCms.getRunLevel() > OpenCms.RUNLEVEL_1_CORE_OBJECT) { OpenCms.getRoleManager().checkRole(cms, CmsRole.WORKPLACE_MANAGER); } CmsScheduledJobInfo jobInfo = null; if (m_jobs.size() > 0) { for (int i = (m_jobs.... | /**
* Removes a currently scheduled job from the scheduler.<p>
*
* @param cms an OpenCms context object that must have been initialized with "Admin" permissions
* @param jobId the id of the job to unschedule, obtained with <code>{@link CmsScheduledJobInfo#getId()}</code>
*
* @return the <c... | Removes a currently scheduled job from the scheduler | unscheduleJob | {
"repo_name": "victos/opencms-core",
"path": "src/org/opencms/scheduler/CmsScheduleManager.java",
"license": "lgpl-2.1",
"size": 23357
} | [
"org.opencms.file.CmsObject",
"org.opencms.main.OpenCms",
"org.opencms.security.CmsRole",
"org.opencms.security.CmsRoleViolationException",
"org.quartz.Scheduler",
"org.quartz.SchedulerException"
] | import org.opencms.file.CmsObject; import org.opencms.main.OpenCms; import org.opencms.security.CmsRole; import org.opencms.security.CmsRoleViolationException; import org.quartz.Scheduler; import org.quartz.SchedulerException; | import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; import org.quartz.*; | [
"org.opencms.file",
"org.opencms.main",
"org.opencms.security",
"org.quartz"
] | org.opencms.file; org.opencms.main; org.opencms.security; org.quartz; | 2,058,571 |
public boolean isFrequentAe(String stitchId, String aeCui) throws CorruptIndexException, IOException, ParseException {
boolean isFreq = false;
String field = "stitchId";
String userQuery = "stitchId:"+stitchId+" AND aeCuiId:"+aeCui;
// only searching, so read-only=true
Query ... | boolean function(String stitchId, String aeCui) throws CorruptIndexException, IOException, ParseException { boolean isFreq = false; String field = STR; String userQuery = STR+stitchId+STR+aeCui; Query query = new QueryParser(Version.LUCENE_35, field, ANALYSER).parse(userQuery); int hitsPerPage = 10; TopScoreDocCollecto... | /**
* does an AE form sider is frequent or note (ie is minFreq is >= 0.01)
* @param stitchId
* @param aeCui
* @return
* @throws IOException
* @throws CorruptIndexException
* @throws ParseException
*/ | does an AE form sider is frequent or note (ie is minFreq is >= 0.01) | isFrequentAe | {
"repo_name": "TNCY-3A-IL/PLBC",
"path": "CTDParseur/src/SimpleLuceneSearch.java",
"license": "gpl-2.0",
"size": 19387
} | [
"java.io.IOException",
"org.apache.lucene.document.Document",
"org.apache.lucene.index.CorruptIndexException",
"org.apache.lucene.queryParser.ParseException",
"org.apache.lucene.queryParser.QueryParser",
"org.apache.lucene.search.Query",
"org.apache.lucene.search.ScoreDoc",
"org.apache.lucene.search.T... | import java.io.IOException; import org.apache.lucene.document.Document; import org.apache.lucene.index.CorruptIndexException; import org.apache.lucene.queryParser.ParseException; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.Query; import org.apache.lucene.search.ScoreDoc; import org... | import java.io.*; import org.apache.lucene.*; import org.apache.lucene.document.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.lucene.util.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 807,183 |
public SappAddressRollershutterControl getStopControl() {
return stopControl;
}
/**
* {@inheritDoc} | SappAddressRollershutterControl function() { return stopControl; } /** * {@inheritDoc} | /**
* stopControl getter
*/ | stopControl getter | getStopControl | {
"repo_name": "jowiho/openhab",
"path": "bundles/binding/org.openhab.binding.sapp/src/main/java/org/openhab/binding/sapp/internal/configs/SappBindingConfigRollershutterItem.java",
"license": "epl-1.0",
"size": 7785
} | [
"org.openhab.binding.sapp.internal.model.SappAddressRollershutterControl"
] | import org.openhab.binding.sapp.internal.model.SappAddressRollershutterControl; | import org.openhab.binding.sapp.internal.model.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,087,675 |
void unbindBidirectional(@NonNull Observable<V> observable); | void unbindBidirectional(@NonNull Observable<V> observable); | /**
* <p>Unbinds a specific bidirectional relation from this observable.</p>
*
* <p>When this method is called, the last known value is retained for this observable even when
* the last bidirectional binding is removed.</p>
*
* @throws IllegalStateException when no matching binding is present.
*/ | Unbinds a specific bidirectional relation from this observable. When this method is called, the last known value is retained for this observable even when the last bidirectional binding is removed | unbindBidirectional | {
"repo_name": "Torchmind/Observables",
"path": "src/main/java/com/torchmind/observable/Observable.java",
"license": "apache-2.0",
"size": 4845
} | [
"edu.umd.cs.findbugs.annotations.NonNull"
] | import edu.umd.cs.findbugs.annotations.NonNull; | import edu.umd.cs.findbugs.annotations.*; | [
"edu.umd.cs"
] | edu.umd.cs; | 90,845 |
private void saveToDatabase() {
BooksDbAdapter booksDbAdapter = BooksDbAdapter.getInstance();
mBook.setRootAccountUID(mRootAccount.getUID());
mBook.setDisplayName(booksDbAdapter.generateDefaultBookName());
//we on purpose do not set the book active. Only import. Caller should handle ... | void function() { BooksDbAdapter booksDbAdapter = BooksDbAdapter.getInstance(); mBook.setRootAccountUID(mRootAccount.getUID()); mBook.setDisplayName(booksDbAdapter.generateDefaultBookName()); long startTime = System.nanoTime(); mAccountsDbAdapter.beginTransaction(); Log.d(getClass().getSimpleName(), STR); try { mAccoun... | /**
* Saves the imported data to the database
* @return GUID of the newly created book, or null if not successful
*/ | Saves the imported data to the database | saveToDatabase | {
"repo_name": "codinguser/gnucash-android",
"path": "app/src/main/java/org/gnucash/android/importer/GncXmlHandler.java",
"license": "apache-2.0",
"size": 49457
} | [
"android.util.Log",
"org.gnucash.android.db.adapter.BooksDbAdapter",
"org.gnucash.android.db.adapter.DatabaseAdapter"
] | import android.util.Log; import org.gnucash.android.db.adapter.BooksDbAdapter; import org.gnucash.android.db.adapter.DatabaseAdapter; | import android.util.*; import org.gnucash.android.db.adapter.*; | [
"android.util",
"org.gnucash.android"
] | android.util; org.gnucash.android; | 2,328,708 |
public COSDocument getVisualSignature()
{
return visualSignature;
} | COSDocument function() { return visualSignature; } | /**
* Get the visual signature.
*
* @return the visual signature
*/ | Get the visual signature | getVisualSignature | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/interactive/digitalsignature/SignatureOptions.java",
"license": "lgpl-2.1",
"size": 3202
} | [
"org.apache.pdfbox.cos.COSDocument"
] | import org.apache.pdfbox.cos.COSDocument; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 498,377 |
public List<Statistics> findByCategoryAndUser(long categoryId, User user) {
List<Statistics> userStatistics = findByUser(user.getId());
if (categoryId == CategoryDataSource.CATEGORY_ID_ALL)
return userStatistics;
else {
List<Statistics> statistics = new ArrayList<>()... | List<Statistics> function(long categoryId, User user) { List<Statistics> userStatistics = findByUser(user.getId()); if (categoryId == CategoryDataSource.CATEGORY_ID_ALL) return userStatistics; else { List<Statistics> statistics = new ArrayList<>(); for (Statistics statistic : userStatistics) { Challenge challenge; chal... | /**
* Returns all Statistics objects of the given user and category
*
* @param categoryId the id of the category whose statistics entries will be returned
* @param user the user whose statistics entries will be returned
* @return list of Statistics objects with the given category id and u... | Returns all Statistics objects of the given user and category | findByCategoryAndUser | {
"repo_name": "tope018/CSC439_Project",
"path": "app/src/main/java/de/fhdw/ergoholics/brainphaser/database/StatisticsDataSource.java",
"license": "gpl-3.0",
"size": 2905
} | [
"de.fhdw.ergoholics.brainphaser.model.Challenge",
"de.fhdw.ergoholics.brainphaser.model.Statistics",
"de.fhdw.ergoholics.brainphaser.model.User",
"java.util.ArrayList",
"java.util.List"
] | import de.fhdw.ergoholics.brainphaser.model.Challenge; import de.fhdw.ergoholics.brainphaser.model.Statistics; import de.fhdw.ergoholics.brainphaser.model.User; import java.util.ArrayList; import java.util.List; | import de.fhdw.ergoholics.brainphaser.model.*; import java.util.*; | [
"de.fhdw.ergoholics",
"java.util"
] | de.fhdw.ergoholics; java.util; | 304,476 |
@Override
public @Nullable String getBlockNameMetaData() {
return internalBlock.getBlockNameMetaData();
} | @Nullable String function() { return internalBlock.getBlockNameMetaData(); } | /**
* Returns the custom meta data.
*
* @return customMeta
*/ | Returns the custom meta data | getBlockNameMetaData | {
"repo_name": "Shynixn/StructureBlockLib",
"path": "structureblocklib-bukkit-core/bukkit-nms-117R1/src/main/java/com/github/shynixn/structureblocklib/bukkit/v1_17_R1/CraftStructureBlock.java",
"license": "mit",
"size": 14800
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,177,660 |
return new TestSuite(ContourEntityTests.class);
}
public ContourEntityTests(String name) {
super(name);
} | return new TestSuite(ContourEntityTests.class); } public ContourEntityTests(String name) { super(name); } | /**
* Returns the tests as a test suite.
*
* @return The test suite.
*/ | Returns the tests as a test suite | suite | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart0921/source/org/jfree/chart/entity/junit/ContourEntityTests.java",
"license": "lgpl-3.0",
"size": 4888
} | [
"junit.framework.TestSuite"
] | import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 284,917 |
public static VRL getInstallationDocDir()
{
String docdir=getInstallationProperty(GlobalConfig.PROP_VLET_DOCDIR);
if (StringUtil.isNonWhiteSpace(docdir))
return new VRL("file",null,docdir); // scheme,host,path
// Default: return VLET_INSTALL/lib
return getInstallBas... | static VRL function() { String docdir=getInstallationProperty(GlobalConfig.PROP_VLET_DOCDIR); if (StringUtil.isNonWhiteSpace(docdir)) return new VRL("file",null,docdir); return getInstallBaseDir().appendPath("doc"); } | /**
* Return location of VLET_INSTALL/doc.
* This value is configured by the bootstrapper.
*/ | Return location of VLET_INSTALL/doc. This value is configured by the bootstrapper | getInstallationDocDir | {
"repo_name": "skoulouzis/vlet-1.5.0",
"path": "source/core/nl.uva.vlet.vrs.core/source/main/nl/uva/vlet/GlobalConfig.java",
"license": "apache-2.0",
"size": 41980
} | [
"nl.uva.vlet.data.StringUtil"
] | import nl.uva.vlet.data.StringUtil; | import nl.uva.vlet.data.*; | [
"nl.uva.vlet"
] | nl.uva.vlet; | 2,139,729 |
public static CalciteSchema.TableEntry getTableEntry(
SqlValidatorCatalogReader catalogReader, List<String> names) {
// First look in the default schema, if any.
// If not found, look in the root schema.
for (List<String> schemaPath : catalogReader.getSchemaPaths()) {
CalciteSchema schema =
... | static CalciteSchema.TableEntry function( SqlValidatorCatalogReader catalogReader, List<String> names) { for (List<String> schemaPath : catalogReader.getSchemaPaths()) { CalciteSchema schema = getSchema(catalogReader.getRootSchema(), Iterables.concat(schemaPath, Util.skipLast(names)), catalogReader.nameMatcher()); if (... | /**
* Finds a {@link org.apache.calcite.jdbc.CalciteSchema.TableEntry} in a
* given catalog reader whose table has the given name, possibly qualified.
*
* <p>Uses the case-sensitivity policy of the specified catalog reader.
*
* <p>If not found, returns null.
*
* @param catalogReader accessor to ... | Finds a <code>org.apache.calcite.jdbc.CalciteSchema.TableEntry</code> in a given catalog reader whose table has the given name, possibly qualified. Uses the case-sensitivity policy of the specified catalog reader. If not found, returns null | getTableEntry | {
"repo_name": "b-slim/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java",
"license": "apache-2.0",
"size": 42728
} | [
"com.google.common.collect.Iterables",
"java.util.List",
"org.apache.calcite.jdbc.CalciteSchema",
"org.apache.calcite.util.Util"
] | import com.google.common.collect.Iterables; import java.util.List; import org.apache.calcite.jdbc.CalciteSchema; import org.apache.calcite.util.Util; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.jdbc.*; import org.apache.calcite.util.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 228,414 |
public synchronized void initializeCacheBuffer(){
writecommonlibmap = new HashMap<String, JarIdentification>();
writetenantlibmap = new HashMap<String, Map<String, JarIdentification>>();
writeliblocationmap = new HashMap<String, String>();
} | synchronized void function(){ writecommonlibmap = new HashMap<String, JarIdentification>(); writetenantlibmap = new HashMap<String, Map<String, JarIdentification>>(); writeliblocationmap = new HashMap<String, String>(); } | /**
* Initialize double buffer cache.
*/ | Initialize double buffer cache | initializeCacheBuffer | {
"repo_name": "deleidos/digitaledge-platform",
"path": "webapp-ingestapi/src/main/java/com/deleidos/rtws/webapp/ingestapi/cache/PluginsCache.java",
"license": "apache-2.0",
"size": 18118
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.maven.shared.jar.identification.JarIdentification"
] | import java.util.HashMap; import java.util.Map; import org.apache.maven.shared.jar.identification.JarIdentification; | import java.util.*; import org.apache.maven.shared.jar.identification.*; | [
"java.util",
"org.apache.maven"
] | java.util; org.apache.maven; | 1,823,795 |
@Test
public final void testRdfModelWitPreviousSentenceWithoutAnnotations() {
final Context context = new Context("My favorite actress is: Natalie Portman. She is very "
+ "stunning.", 0, 62);
final Sentence sentence = new SentenceImpl("My favorite actress is: Natalie Portman.", context,
0, ... | final void function() { final Context context = new Context(STR + STR, 0, 62); final Sentence sentence = new SentenceImpl(STR, context, 0, 40, 1, NullSentence.getInstance()); final Sentence sentence2 = new SentenceImpl(STR, context, 41, 62, 2, sentence); final String nif = STRhttp: final Model model = ModelFactory.crea... | /**
* Test the {@link SentenceImpl#rdfModel(String, NlpProcess, String)} method with a
* {@link Sentence} that has a previous {@link Sentence} without NER or POS annotations.
*/ | Test the <code>SentenceImpl#rdfModel(String, NlpProcess, String)</code> method with a <code>Sentence</code> that has a previous <code>Sentence</code> without NER or POS annotations | testRdfModelWitPreviousSentenceWithoutAnnotations | {
"repo_name": "jplu/stanfordNLPRESTAPI",
"path": "src/test/java/fr/eurecom/stanfordnlprestapi/datatypes/SentenceImplTest.java",
"license": "gpl-3.0",
"size": 20369
} | [
"fr.eurecom.stanfordnlprestapi.enums.NlpProcess",
"fr.eurecom.stanfordnlprestapi.interfaces.Sentence",
"fr.eurecom.stanfordnlprestapi.nullobjects.NullSentence",
"org.apache.jena.datatypes.xsd.XSDDatatype",
"org.apache.jena.rdf.model.Model",
"org.apache.jena.rdf.model.ModelFactory",
"org.apache.jena.rdf.... | import fr.eurecom.stanfordnlprestapi.enums.NlpProcess; import fr.eurecom.stanfordnlprestapi.interfaces.Sentence; import fr.eurecom.stanfordnlprestapi.nullobjects.NullSentence; import org.apache.jena.datatypes.xsd.XSDDatatype; import org.apache.jena.rdf.model.Model; import org.apache.jena.rdf.model.ModelFactory; import ... | import fr.eurecom.stanfordnlprestapi.enums.*; import fr.eurecom.stanfordnlprestapi.interfaces.*; import fr.eurecom.stanfordnlprestapi.nullobjects.*; import org.apache.jena.datatypes.xsd.*; import org.apache.jena.rdf.model.*; import org.junit.*; | [
"fr.eurecom.stanfordnlprestapi",
"org.apache.jena",
"org.junit"
] | fr.eurecom.stanfordnlprestapi; org.apache.jena; org.junit; | 2,555,191 |
protected void processCloudlet(SimEvent ev, int type) {
int cloudletId = 0;
int userId = 0;
int vmId = 0;
try { // if the sender using cloudletXXX() methods
int data[] = (int[]) ev.getData();
cloudletId = data[0];
userId = data[1];
vmId = data[2];
}
// if the sender using normal send() meth... | void function(SimEvent ev, int type) { int cloudletId = 0; int userId = 0; int vmId = 0; try { int data[] = (int[]) ev.getData(); cloudletId = data[0]; userId = data[1]; vmId = data[2]; } catch (ClassCastException c) { try { Cloudlet cl = (Cloudlet) ev.getData(); cloudletId = cl.getCloudletId(); userId = cl.getUserId()... | /**
* Processes a Cloudlet based on the event type.
*
* @param ev information about the event just happened
* @param type event type
*
* @pre ev != null
* @pre type > 0
* @post $none
*/ | Processes a Cloudlet based on the event type | processCloudlet | {
"repo_name": "mhe504/MigSim",
"path": "src/org/cloudbus/cloudsim/Datacenter.java",
"license": "mit",
"size": 34380
} | [
"org.cloudbus.cloudsim.core.CloudSimTags",
"org.cloudbus.cloudsim.core.SimEvent"
] | import org.cloudbus.cloudsim.core.CloudSimTags; import org.cloudbus.cloudsim.core.SimEvent; | import org.cloudbus.cloudsim.core.*; | [
"org.cloudbus.cloudsim"
] | org.cloudbus.cloudsim; | 2,556,379 |
@Override
public void validateScopes(Set<Scope> scopes) throws APIManagementException {
for (Scope scope : scopes) {
Scope sharedScope = getScopeByName(scope.getKey());
scope.setName(sharedScope.getName());
scope.setDescription(sharedScope.getDescription());
... | void function(Set<Scope> scopes) throws APIManagementException { for (Scope scope : scopes) { Scope sharedScope = getScopeByName(scope.getKey()); scope.setName(sharedScope.getName()); scope.setDescription(sharedScope.getDescription()); scope.setRoles(sharedScope.getRoles()); } } | /**
* This method will be used to validate the scope set provided and populate the additional parameters
* (description and bindings) for each Scope object.
*
* @param scopes Scope set to validate
* @throws APIManagementException if an error occurs while validating and populating
*/ | This method will be used to validate the scope set provided and populate the additional parameters (description and bindings) for each Scope object | validateScopes | {
"repo_name": "isharac/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/AMDefaultKeyManagerImpl.java",
"license": "apache-2.0",
"size": 56424
} | [
"java.util.Set",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.Scope"
] | import java.util.Set; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Scope; | import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,521,075 |
public static Query createQueryForNodesWithFieldLike( String likeExpression,
String fieldName,
ValueFactories factories,
CaseOperation caseOpe... | static Query function( String likeExpression, String fieldName, ValueFactories factories, CaseOperation caseOperation ) { assert likeExpression != null; assert likeExpression.length() > 0; if (!hasWildcardCharacters(likeExpression)) { return createQueryForNodesWithFieldEqualTo(likeExpression, fieldName, factories, case... | /**
* Construct a {@link Query} implementation that scores documents with a string field value that is LIKE the supplied
* constraint value, where the LIKE expression contains the SQL wildcard characters '%' and '_' or the regular expression
* wildcard characters '*' and '?'.
*
* @param likeEx... | Construct a <code>Query</code> implementation that scores documents with a string field value that is LIKE the supplied constraint value, where the LIKE expression contains the SQL wildcard characters '%' and '_' or the regular expression wildcard characters '*' and '?' | createQueryForNodesWithFieldLike | {
"repo_name": "mdrillin/modeshape",
"path": "index-providers/modeshape-lucene-index-provider/src/main/java/org/modeshape/jcr/index/lucene/query/CompareStringQuery.java",
"license": "apache-2.0",
"size": 16775
} | [
"java.util.regex.Pattern",
"org.apache.lucene.index.Term",
"org.apache.lucene.search.Query",
"org.apache.lucene.search.RegexpQuery",
"org.apache.lucene.search.WildcardQuery",
"org.modeshape.jcr.index.lucene.query.CaseOperations",
"org.modeshape.jcr.value.ValueFactories"
] | import java.util.regex.Pattern; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.RegexpQuery; import org.apache.lucene.search.WildcardQuery; import org.modeshape.jcr.index.lucene.query.CaseOperations; import org.modeshape.jcr.value.ValueFactories; | import java.util.regex.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.modeshape.jcr.index.lucene.query.*; import org.modeshape.jcr.value.*; | [
"java.util",
"org.apache.lucene",
"org.modeshape.jcr"
] | java.util; org.apache.lucene; org.modeshape.jcr; | 593,805 |
private boolean isHostnameInCryptoMaterial(Configuration conf, String hostname) {
for (CryptoKeys key : CryptoKeys.values()) {
String propValue = conf.get(key.getValue(), key.getDefaultValue());
if (key.getType() == PropType.FILEPATH
&& !propValue.contains(hostnam... | boolean function(Configuration conf, String hostname) { for (CryptoKeys key : CryptoKeys.values()) { String propValue = conf.get(key.getValue(), key.getDefaultValue()); if (key.getType() == PropType.FILEPATH && !propValue.contains(hostname)) { return false; } } return true; } | /**
* Services like RM, NM, NN, DN their certificate file name will contain their hostname
*
* @param conf
* @param hostname
* @return
*/ | Services like RM, NM, NN, DN their certificate file name will contain their hostname | isHostnameInCryptoMaterial | {
"repo_name": "robzor92/hops",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/HopsSSLSocketFactory.java",
"license": "apache-2.0",
"size": 20783
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,791,566 |
@Test
public void whenAddElementThenGetItForCheck() {
User fourthUser = new User();
fourthUser.setId("010");
store.add(fourthUser);
SimpleArray<User> resultList = store.getSimpleArray();
User resultUser = resultList.get(3);
User checkUser = fourthUser;
ass... | void function() { User fourthUser = new User(); fourthUser.setId("010"); store.add(fourthUser); SimpleArray<User> resultList = store.getSimpleArray(); User resultUser = resultList.get(3); User checkUser = fourthUser; assertThat(resultUser, is(checkUser)); } | /**
* test method add().
* Adding element and get it.
*/ | test method add(). Adding element and get it | whenAddElementThenGetItForCheck | {
"repo_name": "Alesandrus/aivanov",
"path": "chapter_005_Collections_Pro/src/test/java/ru/job4j/generic/BaseStoreTest.java",
"license": "apache-2.0",
"size": 2292
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 1,124,436 |
public static void initTableMapperJob(List<Scan> scans,
Class<? extends TableMapper> mapper,
Class<?> outputKeyClass,
Class<?> outputValueClass, Job job,
boolean addDependencyJars,
boolean initCredentials) throws IOException {
job.setInputFormatClass(MultiTableInputFormat.class);
... | static void function(List<Scan> scans, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job, boolean addDependencyJars, boolean initCredentials) throws IOException { job.setInputFormatClass(MultiTableInputFormat.class); if (outputValueClass != null) { job.setMapOutputValueCla... | /**
* Use this before submitting a Multi TableMap job. It will appropriately set
* up the job.
*
* @param scans The list of {@link Scan} objects to read from.
* @param mapper The mapper class to use.
* @param outputKeyClass The class of the output key.
* @param outputValueClass The class of the out... | Use this before submitting a Multi TableMap job. It will appropriately set up the job | initTableMapperJob | {
"repo_name": "mahak/hbase",
"path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 46796
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HBaseConfiguration",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.mapreduce.Job"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.mapreduce.Job; | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 394,916 |
public static X509ExtendedTrustManager trustManager(Certificate[] certificates)
throws NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException {
KeyStore store = trustStore(certificates);
return trustManager(store, TrustManagerFactory.getDefaultAlgorithm());
} | static X509ExtendedTrustManager function(Certificate[] certificates) throws NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException { KeyStore store = trustStore(certificates); return trustManager(store, TrustManagerFactory.getDefaultAlgorithm()); } | /**
* Creates a {@link X509ExtendedTrustManager} based on the provided certificates
*
* @param certificates the certificates to trust
* @return a trust manager that trusts the provided certificates
*/ | Creates a <code>X509ExtendedTrustManager</code> based on the provided certificates | trustManager | {
"repo_name": "coding0011/elasticsearch",
"path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ssl/CertParsingUtils.java",
"license": "apache-2.0",
"size": 14401
} | [
"java.io.IOException",
"java.security.KeyStore",
"java.security.KeyStoreException",
"java.security.NoSuchAlgorithmException",
"java.security.cert.Certificate",
"java.security.cert.CertificateException",
"javax.net.ssl.TrustManagerFactory",
"javax.net.ssl.X509ExtendedTrustManager"
] | import java.io.IOException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.Certificate; import java.security.cert.CertificateException; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509ExtendedTrustManager... | import java.io.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*; | [
"java.io",
"java.security",
"javax.net"
] | java.io; java.security; javax.net; | 2,206,531 |
@Test
public void testByteArrayToShort() {
byte[] src = new byte[]{
(byte)0xCD, (byte)0xF1, (byte)0xF0, (byte)0xC1, (byte)0x0F, (byte)0x12, (byte)0x34,
(byte)0x56, (byte)0x78};
assertEquals((short)0x0000, Conversion.byteArrayToShort(src, 0, (short)0, 0, 0));
asser... | void function() { byte[] src = new byte[]{ (byte)0xCD, (byte)0xF1, (byte)0xF0, (byte)0xC1, (byte)0x0F, (byte)0x12, (byte)0x34, (byte)0x56, (byte)0x78}; assertEquals((short)0x0000, Conversion.byteArrayToShort(src, 0, (short)0, 0, 0)); assertEquals((short)0x00CD, Conversion.byteArrayToShort(src, 0, (short)0, 0, 1)); asse... | /**
* Tests {@link Conversion#byteArrayToShort(byte[], int, short, int, int)}.
*/ | Tests <code>Conversion#byteArrayToShort(byte[], int, short, int, int)</code> | testByteArrayToShort | {
"repo_name": "martingwhite/astor",
"path": "examples/lang_7/src/test/java/org/apache/commons/lang3/ConversionTest.java",
"license": "gpl-2.0",
"size": 100416
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,267,079 |
private void setMessage(final String message) {
new Handler(Looper.getMainLooper()).post(new Runnable() { | void function(final String message) { new Handler(Looper.getMainLooper()).post(new Runnable() { | /**
* Updates the dialog message.
*
* @param message
* Message which should be displayed.
*/ | Updates the dialog message | setMessage | {
"repo_name": "stachch/Privacy_Management_Platform",
"path": "code/PMP/PMP/src/main/java/de/unistuttgart/ipvs/pmp/gui/preset/conflict/ScanningProgressDialog.java",
"license": "apache-2.0",
"size": 4156
} | [
"android.os.Handler",
"android.os.Looper"
] | import android.os.Handler; import android.os.Looper; | import android.os.*; | [
"android.os"
] | android.os; | 1,722,529 |
@Test
public void testWalk() {
TREE_ROOT.walk();
assertTrue(appender.logContains("root"));
assertTrue(appender.logContains("level1_a"));
assertTrue(appender.logContains("level2_a"));
assertTrue(appender.logContains("level3_a"));
assertTrue(appender.logContains("level3_b"));
assertTrue(a... | void function() { TREE_ROOT.walk(); assertTrue(appender.logContains("root")); assertTrue(appender.logContains(STR)); assertTrue(appender.logContains(STR)); assertTrue(appender.logContains(STR)); assertTrue(appender.logContains(STR)); assertTrue(appender.logContains(STR)); assertTrue(appender.logContains(STR)); assertEq... | /**
* Walk through the tree and verify if every item is handled
*/ | Walk through the tree and verify if every item is handled | testWalk | {
"repo_name": "zik43/java-design-patterns",
"path": "null-object/src/test/java/com/iluwatar/nullobject/TreeTest.java",
"license": "mit",
"size": 5395
} | [
"org.junit.jupiter.api.Assertions"
] | import org.junit.jupiter.api.Assertions; | import org.junit.jupiter.api.*; | [
"org.junit.jupiter"
] | org.junit.jupiter; | 2,560,265 |
public void whenRollbackTransaction(Connection connection)
throws SQLException;
// --- Inner classes ---
public static final class Default implements ResourceHandler {
public Default() {
}
/**
* {@inheritDoc} | void function(Connection connection) throws SQLException; public static final class Default implements ResourceHandler { public Default() { } /** * {@inheritDoc} | /**
* Is fired when the transaction of |connection| is rollbacked.
*
* @see java.sql.Connection#rollback
*/ | Is fired when the transaction of |connection| is rollbacked | whenRollbackTransaction | {
"repo_name": "cchantep/acolyte",
"path": "jdbc-driver/src/main/java/acolyte/jdbc/ResourceHandler.java",
"license": "lgpl-2.1",
"size": 1190
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 624,143 |
return Hudson.getInstance().<MyViewsTabBar, Descriptor<MyViewsTabBar>>getDescriptorList(MyViewsTabBar.class);
} | return Hudson.getInstance().<MyViewsTabBar, Descriptor<MyViewsTabBar>>getDescriptorList(MyViewsTabBar.class); } | /**
* Returns all the registered {@link ListViewColumn} descriptors.
*/ | Returns all the registered <code>ListViewColumn</code> descriptors | all | {
"repo_name": "sincere520/testGitRepo",
"path": "hudson-core/src/main/java/hudson/views/MyViewsTabBar.java",
"license": "mit",
"size": 2435
} | [
"hudson.model.Descriptor",
"hudson.model.Hudson"
] | import hudson.model.Descriptor; import hudson.model.Hudson; | import hudson.model.*; | [
"hudson.model"
] | hudson.model; | 660,384 |
@SafeVarargs
public static Set<Method> getAllDeclaredMethodsNotAnnotatedWithAny(Class<?> _class, Class<? extends Annotation>... _annotations) {
return getAllDeclaredWithAnnotationAction(ReflectionType.METHOD, _class, (f, a) -> !f.isAnnotationPresent(a), _annotations);
} | static Set<Method> function(Class<?> _class, Class<? extends Annotation>... _annotations) { return getAllDeclaredWithAnnotationAction(ReflectionType.METHOD, _class, (f, a) -> !f.isAnnotationPresent(a), _annotations); } | /**
* Extract all {@link Method}s without any of the given annotations found in the given class recursively.
* This means, all {@link Method}s are retrieved, even fields which only exists in superclasses.<br>
* <br>
* <b>NOTE:</b> Accessibility of {@link Method}s returned in the {@link Set} have not... | Extract all <code>Method</code>s without any of the given annotations found in the given class recursively. This means, all <code>Method</code>s are retrieved, even fields which only exists in superclasses. (setAccessable(true) is NOT called explicitly) | getAllDeclaredMethodsNotAnnotatedWithAny | {
"repo_name": "hypfvieh/java-utils",
"path": "src/main/java/com/github/hypfvieh/util/ReflectionUtil.java",
"license": "mit",
"size": 13792
} | [
"java.lang.annotation.Annotation",
"java.lang.reflect.Method",
"java.util.Set"
] | import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Set; | import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,907,051 |
public static int convertStrokeLinejoin(Value v) {
String s = v.getStringValue();
switch (s.charAt(0)) {
case 'm':
return BasicStroke.JOIN_MITER;
case 'r':
return BasicStroke.JOIN_ROUND;
case 'b':
return BasicStroke.JOIN_BEVEL;
defa... | static int function(Value v) { String s = v.getStringValue(); switch (s.charAt(0)) { case 'm': return BasicStroke.JOIN_MITER; case 'r': return BasicStroke.JOIN_ROUND; case 'b': return BasicStroke.JOIN_BEVEL; default: throw new IllegalArgumentException (STR); } } | /**
* Converts the 'linejoin' property to the appropriate BasicStroke
* constant.
* @param v the CSS value describing the linejoin property
*/ | Converts the 'linejoin' property to the appropriate BasicStroke constant | convertStrokeLinejoin | {
"repo_name": "iconfinder/batik",
"path": "sources/org/apache/batik/bridge/PaintServer.java",
"license": "apache-2.0",
"size": 24302
} | [
"java.awt.BasicStroke",
"org.apache.batik.css.engine.value.Value"
] | import java.awt.BasicStroke; import org.apache.batik.css.engine.value.Value; | import java.awt.*; import org.apache.batik.css.engine.value.*; | [
"java.awt",
"org.apache.batik"
] | java.awt; org.apache.batik; | 1,407,088 |
public static int readChar(InputStreamReader r) {
int c = readCharRawly(r);
if (c == -1)
return -1;
if (c == 0x0d) {
readCharRawly(r);
if (c == -1)
return -1;
c = '\n';
}
return c;
}
| static int function(InputStreamReader r) { int c = readCharRawly(r); if (c == -1) return -1; if (c == 0x0d) { readCharRawly(r); if (c == -1) return -1; c = '\n'; } return c; } | /**
* Reads a character from a file. If the character is <code>0x0D</code>,
* then the following <code>0x0A</code> character is skipped.
*/ | Reads a character from a file. If the character is <code>0x0D</code>, then the following <code>0x0A</code> character is skipped | readChar | {
"repo_name": "mdamis/unilabIDE",
"path": "Unitex-Java/src/fr/umlv/unitex/io/UnicodeIO.java",
"license": "lgpl-3.0",
"size": 5377
} | [
"java.io.InputStreamReader"
] | import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 678,048 |
@Nullable
static Long getTimeoutFromMethodConfig(Map<String, ?> methodConfig) {
return JsonUtil.getStringAsDuration(methodConfig, "timeout");
} | static Long getTimeoutFromMethodConfig(Map<String, ?> methodConfig) { return JsonUtil.getStringAsDuration(methodConfig, STR); } | /**
* Returns the number of nanoseconds of timeout for the given method config.
*
* @return duration nanoseconds, or {@code null} if it isn't present.
*/ | Returns the number of nanoseconds of timeout for the given method config | getTimeoutFromMethodConfig | {
"repo_name": "dapengzhang0/grpc-java",
"path": "core/src/main/java/io/grpc/internal/ServiceConfigUtil.java",
"license": "apache-2.0",
"size": 15553
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,641,768 |
PutMessageResult putMessages(final MessageExtBatch messageExtBatch); | PutMessageResult putMessages(final MessageExtBatch messageExtBatch); | /**
* Store a batch of messages.
*
* @param messageExtBatch Message batch.
* @return result of storing batch messages.
*/ | Store a batch of messages | putMessages | {
"repo_name": "lindzh/incubator-rocketmq",
"path": "store/src/main/java/org/apache/rocketmq/store/MessageStore.java",
"license": "apache-2.0",
"size": 10653
} | [
"org.apache.rocketmq.common.message.MessageExtBatch"
] | import org.apache.rocketmq.common.message.MessageExtBatch; | import org.apache.rocketmq.common.message.*; | [
"org.apache.rocketmq"
] | org.apache.rocketmq; | 318,863 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.