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 HTable createTable(TableName tableName, byte[][] families,
final Configuration c)
throws IOException {
return createTable(new HTableDescriptor(tableName), families, c);
} | HTable function(TableName tableName, byte[][] families, final Configuration c) throws IOException { return createTable(new HTableDescriptor(tableName), families, c); } | /**
* Create a table.
* @param tableName
* @param families
* @param c Configuration to use
* @return An HTable instance for the created table.
* @throws IOException
*/ | Create a table | createTable | {
"repo_name": "grokcoder/pbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 132664
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.client.HTable"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.HTable; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 559,650 |
public Meter meter(final String name) {
final String fullName = name + serviceTag;
final Meter t = metricRegistry.meter(fullName);
meters.put(fullName, t);
return t;
}
| Meter function(final String name) { final String fullName = name + serviceTag; final Meter t = metricRegistry.meter(fullName); meters.put(fullName, t); return t; } | /**
* Acquires the named meter
* @param name The name of the meter
* @return the meter
*/ | Acquires the named meter | meter | {
"repo_name": "nickman/HeliosStreams",
"path": "opentsdb-connector/src/main/java/com/heliosapm/streams/opentsdb/plugin/PluginMetricManager.java",
"license": "apache-2.0",
"size": 10387
} | [
"com.codahale.metrics.Meter"
] | import com.codahale.metrics.Meter; | import com.codahale.metrics.*; | [
"com.codahale.metrics"
] | com.codahale.metrics; | 1,450,195 |
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String clusterName, String applicationName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, applicationName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String clusterName, String applicationName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, clusterName, applicationName), serviceCallback); } | /**
* Deletes the specified application on the HDInsight cluster.
*
* @param resourceGroupName The name of the resource group.
* @param clusterName The name of the cluster.
* @param applicationName The constant value for the application name.
* @param serviceCallback the async ServiceCallb... | Deletes the specified application on the HDInsight cluster | beginDeleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/hdinsight/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ApplicationsInner.java",
"license": "mit",
"size": 45428
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,111,883 |
@Test
public void testIV() {
Set<String> ivs = new HashSet<>();
for (int i = 0; i < 50; i++) {
assertTrue(ivs.add(encodeBytesToBase64String(
randomBytes(ivLength))));
}
} | void function() { Set<String> ivs = new HashSet<>(); for (int i = 0; i < 50; i++) { assertTrue(ivs.add(encodeBytesToBase64String( randomBytes(ivLength)))); } } | /**
* generates new ivs and tests if they are unique
*/ | generates new ivs and tests if they are unique | testIV | {
"repo_name": "nextcloud/android",
"path": "src/androidTest/java/com/owncloud/android/util/EncryptionTestIT.java",
"license": "gpl-2.0",
"size": 25040
} | [
"com.owncloud.android.utils.EncryptionUtils",
"java.util.HashSet",
"java.util.Set",
"junit.framework.Assert"
] | import com.owncloud.android.utils.EncryptionUtils; import java.util.HashSet; import java.util.Set; import junit.framework.Assert; | import com.owncloud.android.utils.*; import java.util.*; import junit.framework.*; | [
"com.owncloud.android",
"java.util",
"junit.framework"
] | com.owncloud.android; java.util; junit.framework; | 824,164 |
public Path getLogDir() {
return this.logDir;
} | Path function() { return this.logDir; } | /**
* Get the directory where hlogs are stored by their RSs
* @return the directory where hlogs are stored by their RSs
*/ | Get the directory where hlogs are stored by their RSs | getLogDir | {
"repo_name": "mapr/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java",
"license": "apache-2.0",
"size": 21623
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 958,562 |
protected long getDelayBeforeNextRetryInMillis(HttpRequestBase method, BceClientException exception, int attempt,
RetryPolicy retryPolicy) {
int retries = attempt - 1;
int maxErrorRetry = retryPolicy.getMaxErrorRetry();
// Immediately fails when it has exceeds the max retry cou... | long function(HttpRequestBase method, BceClientException exception, int attempt, RetryPolicy retryPolicy) { int retries = attempt - 1; int maxErrorRetry = retryPolicy.getMaxErrorRetry(); if (retries >= maxErrorRetry) { return -1; } if (method instanceof HttpEntityEnclosingRequest) { HttpEntity entity = ((HttpEntityEncl... | /**
* Get delay time before next retry.
*
* @param method The current HTTP method being executed.
* @param exception The client/service exception from the failed request.
* @param attempt The number of times the current request has been attempted.
* @param retryPolicy The retryPolicy being... | Get delay time before next retry | getDelayBeforeNextRetryInMillis | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/http/BceHttpClient.java",
"license": "apache-2.0",
"size": 24497
} | [
"com.baidubce.BceClientException",
"org.apache.http.HttpEntity",
"org.apache.http.HttpEntityEnclosingRequest",
"org.apache.http.client.methods.HttpRequestBase"
] | import com.baidubce.BceClientException; import org.apache.http.HttpEntity; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.client.methods.HttpRequestBase; | import com.baidubce.*; import org.apache.http.*; import org.apache.http.client.methods.*; | [
"com.baidubce",
"org.apache.http"
] | com.baidubce; org.apache.http; | 12,313 |
@Test
public final void testValidateMove_threeSnapshots_A1() {
assertThat("The PUT_DISC move to square A1 is not allowed."
+ " GameFixtureFactories.threeSnapshots().validateMove(Square.A1)"
+ " must return false.",
GameFixtureFactories.threeSnapsh... | final void function() { assertThat(STR + STR + STR, GameFixtureFactories.threeSnapshots().validateMove(Move.valueOf(Square.A1)), is(false)); } | /**
* Tests the {@code validateMove(Move)} method.
*
* @see Game#validateMove(Move)
*/ | Tests the validateMove(Move) method | testValidateMove_threeSnapshots_A1 | {
"repo_name": "rcrr/reversi",
"path": "java/test/rcrr/reversi/GameTest.java",
"license": "gpl-3.0",
"size": 42789
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 2,521,214 |
public void execute(String opaqueContext)
{
// need to instantiate components locally because this class is instantiated by the
// scheduled invocation manager and not pulled from spring context.
final Event event = popEventDelay(opaqueContext);
if (event != null) {
LOG.info("Refiring delayed event [" +... | void function(String opaqueContext) { final Event event = popEventDelay(opaqueContext); if (event != null) { LOG.info(STR + opaqueContext + "]"); try { User user = userDirectoryService.getUser(event.getUserId()); | /**
* Deserializes the context into an event and refires the event.
*/ | Deserializes the context into an event and refires the event | execute | {
"repo_name": "ouit0408/sakai",
"path": "content/content-impl-providers/impl/src/java/org/sakaiproject/content/providers/BaseEventDelayHandler.java",
"license": "apache-2.0",
"size": 11472
} | [
"org.sakaiproject.event.api.Event",
"org.sakaiproject.user.api.User"
] | import org.sakaiproject.event.api.Event; import org.sakaiproject.user.api.User; | import org.sakaiproject.event.api.*; import org.sakaiproject.user.api.*; | [
"org.sakaiproject.event",
"org.sakaiproject.user"
] | org.sakaiproject.event; org.sakaiproject.user; | 1,391,703 |
static boolean isValid(int type) {
// make sure this is always synchronized with Zoodefs!!
switch (type) {
case OpCode.notification:
return false;
case OpCode.create:
case OpCode.delete:
case OpCode.createSession:
case OpCode.exists:
case O... | static boolean isValid(int type) { switch (type) { case OpCode.notification: return false; case OpCode.create: case OpCode.delete: case OpCode.createSession: case OpCode.exists: case OpCode.getData: case OpCode.check: case OpCode.multi: case OpCode.setData: case OpCode.sync: case OpCode.getACL: case OpCode.setACL: case... | /**
* is the packet type a valid packet in zookeeper
*
* @param type
* the type of the packet
* @return true if a valid packet, false if not
*/ | is the packet type a valid packet in zookeeper | isValid | {
"repo_name": "spccold/zookeeper_v3_4_8",
"path": "src/java/main/org/apache/zookeeper/server/Request.java",
"license": "apache-2.0",
"size": 6992
} | [
"org.apache.zookeeper.ZooDefs"
] | import org.apache.zookeeper.ZooDefs; | import org.apache.zookeeper.*; | [
"org.apache.zookeeper"
] | org.apache.zookeeper; | 35,628 |
public void undoChanges(CmsRequestContext context, CmsResource resource, CmsResource.CmsResourceUndoMode mode)
throws CmsException, CmsSecurityException {
CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
try {
checkOfflineProject(dbc);
checkPermissions(dbc, r... | void function(CmsRequestContext context, CmsResource resource, CmsResource.CmsResourceUndoMode mode) throws CmsException, CmsSecurityException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); try { checkOfflineProject(dbc); checkPermissions(dbc, resource, CmsPermissionSet.ACCESS_WRITE, true, CmsResourceFi... | /**
* Undos all changes in the resource by restoring the version from the
* online project to the current offline project.<p>
*
* @param context the current request context
* @param resource the name of the resource to apply this operation to
* @param mode the undo mode, one of the <code>{... | Undos all changes in the resource by restoring the version from the online project to the current offline project | undoChanges | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/db/CmsSecurityManager.java",
"license": "lgpl-2.1",
"size": 287876
} | [
"org.opencms.file.CmsRequestContext",
"org.opencms.file.CmsResource",
"org.opencms.file.CmsResourceFilter",
"org.opencms.main.CmsException",
"org.opencms.security.CmsPermissionSet",
"org.opencms.security.CmsSecurityException"
] | import org.opencms.file.CmsRequestContext; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.main.CmsException; import org.opencms.security.CmsPermissionSet; import org.opencms.security.CmsSecurityException; | import org.opencms.file.*; import org.opencms.main.*; import org.opencms.security.*; | [
"org.opencms.file",
"org.opencms.main",
"org.opencms.security"
] | org.opencms.file; org.opencms.main; org.opencms.security; | 2,580,166 |
public AnnotationParser createAnnotationParser() {
if(parser.getAnnotationParserFactory()==null)
return DefaultAnnotationParser.theInstance;
else
return parser.getAnnotationParserFactory().create();
} | AnnotationParser function() { if(parser.getAnnotationParserFactory()==null) return DefaultAnnotationParser.theInstance; else return parser.getAnnotationParserFactory().create(); } | /**
* Creates a new instance of annotation parser.
*/ | Creates a new instance of annotation parser | createAnnotationParser | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxws/drop_included/jaxws_src/src/com/sun/xml/internal/xsom/impl/parser/NGCCRuntimeEx.java",
"license": "gpl-2.0",
"size": 17939
} | [
"com.sun.xml.internal.xsom.parser.AnnotationParser"
] | import com.sun.xml.internal.xsom.parser.AnnotationParser; | import com.sun.xml.internal.xsom.parser.*; | [
"com.sun.xml"
] | com.sun.xml; | 2,729,057 |
public ExecIndexRow buildIndexKeyRow(int indexNumber,
PermissionsDescriptor perm)
throws StandardException {
ExecIndexRow row = null;
switch (indexNumber) {
case GRANTEE_OBJECTID_GRANTOR_INDEX_NUM:
// RESOLVE We do not support... | ExecIndexRow function(int indexNumber, PermissionsDescriptor perm) throws StandardException { ExecIndexRow row = null; switch (indexNumber) { case GRANTEE_OBJECTID_GRANTOR_INDEX_NUM: row = getExecutionFactory().getIndexableRow( 2 ); row.setColumn(1, getAuthorizationID( perm.getGrantee())); String protectedObjectsIDStr ... | /**
* builds an index key row given for a given index number.
*/ | builds an index key row given for a given index number | buildIndexKeyRow | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/impl/sql/catalog/SYSPERMSRowFactory.java",
"license": "apache-2.0",
"size": 12949
} | [
"org.apache.derby.iapi.sql.dictionary.PermDescriptor",
"org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor",
"org.apache.derby.iapi.sql.execute.ExecIndexRow",
"org.apache.derby.iapi.types.SQLChar",
"org.apache.derby.shared.common.error.StandardException"
] | import org.apache.derby.iapi.sql.dictionary.PermDescriptor; import org.apache.derby.iapi.sql.dictionary.PermissionsDescriptor; import org.apache.derby.iapi.sql.execute.ExecIndexRow; import org.apache.derby.iapi.types.SQLChar; import org.apache.derby.shared.common.error.StandardException; | import org.apache.derby.iapi.sql.dictionary.*; import org.apache.derby.iapi.sql.execute.*; import org.apache.derby.iapi.types.*; import org.apache.derby.shared.common.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 1,478,108 |
@Override
public void visit(final Assertion assertion) {
// add this assertion to the list of things that have to be proven
this.weakestPreconditionStack.peek().add(
new Proof(AstNodeCloneHelper.clone(assertion.getExpression()),
ProofImplication.ASSERTION_VALI... | void function(final Assertion assertion) { this.weakestPreconditionStack.peek().add( new Proof(AstNodeCloneHelper.clone(assertion.getExpression()), ProofImplication.ASSERTION_VALID, assertion)); } | /**
* Visit a {@link Assertion}.
*
* @param assertion
* the {@link Assertion} to visit
*/ | Visit a <code>Assertion</code> | visit | {
"repo_name": "team-worthwhile/worthwhile",
"path": "implementierung/src/worthwhile.prover/src/edu/kit/iti/formal/pse/worthwhile/prover/transformer/WPStrategy.java",
"license": "bsd-3-clause",
"size": 24988
} | [
"edu.kit.iti.formal.pse.worthwhile.model.ast.Assertion",
"edu.kit.iti.formal.pse.worthwhile.model.ast.util.AstNodeCloneHelper"
] | import edu.kit.iti.formal.pse.worthwhile.model.ast.Assertion; import edu.kit.iti.formal.pse.worthwhile.model.ast.util.AstNodeCloneHelper; | import edu.kit.iti.formal.pse.worthwhile.model.ast.*; import edu.kit.iti.formal.pse.worthwhile.model.ast.util.*; | [
"edu.kit.iti"
] | edu.kit.iti; | 1,720,714 |
if (uuid == null) {
synchronized (DeviceIdentifier.class) {
if (uuid == null) {
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
String id = sharedPreferences.getString(KEY_DEVICE_IDENTIFIER, null);
... | if (uuid == null) { synchronized (DeviceIdentifier.class) { if (uuid == null) { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); String id = sharedPreferences.getString(KEY_DEVICE_IDENTIFIER, null); if (id != null) { uuid = id; } else { uuid = PREFIX + UUID.randomUUID().toSt... | /**
* Returns a unique(very highly likely) identifier for this device.
* This identifier is prefixed with "commcare_"
*
* This id may change when user re-installs the app or does a factory reset.
*/ | Returns a unique(very highly likely) identifier for this device. This identifier is prefixed with "commcare_" This id may change when user re-installs the app or does a factory reset | getDeviceIdentifier | {
"repo_name": "dimagi/commcare-android",
"path": "app/src/org/commcare/utils/DeviceIdentifier.java",
"license": "apache-2.0",
"size": 1452
} | [
"android.content.SharedPreferences",
"androidx.preference.PreferenceManager",
"java.util.UUID"
] | import android.content.SharedPreferences; import androidx.preference.PreferenceManager; import java.util.UUID; | import android.content.*; import androidx.preference.*; import java.util.*; | [
"android.content",
"androidx.preference",
"java.util"
] | android.content; androidx.preference; java.util; | 181,692 |
protected void putIntoMappingQueue(final Object o) {
try {
if (o != null) {
IfMapClient.mappingQueue.put(o);
}
} catch (InterruptedException e) {
IfMapClient.criticalError(e);
}
} | void function(final Object o) { try { if (o != null) { IfMapClient.mappingQueue.put(o); } } catch (InterruptedException e) { IfMapClient.criticalError(e); } } | /**
* abstract method for notifying observers about occurred updates
*
* @param Object
* read in data as object
*/ | abstract method for notifying observers about occurred updates | putIntoMappingQueue | {
"repo_name": "decoit/decomap",
"path": "src/main/java/de/simu/decomap/component/polling/PollingThread.java",
"license": "apache-2.0",
"size": 1718
} | [
"de.simu.decomap.main.IfMapClient"
] | import de.simu.decomap.main.IfMapClient; | import de.simu.decomap.main.*; | [
"de.simu.decomap"
] | de.simu.decomap; | 2,240,799 |
@Test
public void setNoTtlForFileWithTtl() throws Exception {
CreateFileOptions options =
CreateFileOptions.defaults().setBlockSizeBytes(Constants.KB).setRecursive(true).setTtl(0);
long fileId = mFileSystemMaster.createFile(NESTED_FILE_URI, options);
// After setting TTL to NO_TTL, the original ... | void function() throws Exception { CreateFileOptions options = CreateFileOptions.defaults().setBlockSizeBytes(Constants.KB).setRecursive(true).setTtl(0); long fileId = mFileSystemMaster.createFile(NESTED_FILE_URI, options); mFileSystemMaster.setAttribute(NESTED_FILE_URI, SetAttributeOptions.defaults().setTtl(Constants.... | /**
* Tests that the original TTL is removed after setting it to {@link Constants#NO_TTL} for a file.
*/ | Tests that the original TTL is removed after setting it to <code>Constants#NO_TTL</code> for a file | setNoTtlForFileWithTtl | {
"repo_name": "WilliamZapata/alluxio",
"path": "core/server/master/src/test/java/alluxio/master/file/FileSystemMasterTest.java",
"license": "apache-2.0",
"size": 70132
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,817,923 |
public TypeInfo<?> getFieldType(Field field) {
checkArgument(field.getDeclaringClass().isAssignableFrom(rawType),
"%s is not defined by a supertype of %s", field, type);
return resolve(field.getGenericType());
} | TypeInfo<?> function(Field field) { checkArgument(field.getDeclaringClass().isAssignableFrom(rawType), STR, field, type); return resolve(field.getGenericType()); } | /**
* Returns the resolved generic type of {@code field}.
*
* @param field a field defined by this or any superclass.
* @since 2.0
*/ | Returns the resolved generic type of field | getFieldType | {
"repo_name": "jaspeen/classinfo",
"path": "src/main/java/org/jeesy/classinfo/TypeInfo.java",
"license": "apache-2.0",
"size": 14691
} | [
"java.lang.reflect.Field",
"org.jeesy.classinfo.Utils"
] | import java.lang.reflect.Field; import org.jeesy.classinfo.Utils; | import java.lang.reflect.*; import org.jeesy.classinfo.*; | [
"java.lang",
"org.jeesy.classinfo"
] | java.lang; org.jeesy.classinfo; | 2,196,701 |
public void step14() throws Exception {
ODB odb = null;
try {
// Open the database
odb = ODBFactory.open(ODB_NAME);
Sport tennis = (Sport) odb.getObjects(new CriteriaQuery(Sport.class, Where.equal("name", "Tennis"))).getFirst();
// Firts re-create Agassi player - it has been deleted in step 13
P... | void function() throws Exception { ODB odb = null; try { odb = ODBFactory.open(ODB_NAME); Sport tennis = (Sport) odb.getObjects(new CriteriaQuery(Sport.class, Where.equal("name", STR))).getFirst(); Player agassi = new Player(STR, new Date(), tennis); odb.store(agassi); odb.commit(); IQuery query = new CriteriaQuery(Pla... | /**
* Deleting objects using id
*
*/ | Deleting objects using id | step14 | {
"repo_name": "vagnerbarbosa/ifpb-vagnerbarbosa-bdnc-neodatis",
"path": "neodatis-odb-1.9.30-689/doc/src/org/neodatis/odb/tutorial/Tutorial1.java",
"license": "lgpl-2.1",
"size": 19647
} | [
"java.util.Date",
"org.neodatis.odb.ODBFactory",
"org.neodatis.odb.Objects",
"org.neodatis.odb.core.query.IQuery",
"org.neodatis.odb.core.query.criteria.Where",
"org.neodatis.odb.impl.core.query.criteria.CriteriaQuery"
] | import java.util.Date; import org.neodatis.odb.ODBFactory; import org.neodatis.odb.Objects; import org.neodatis.odb.core.query.IQuery; import org.neodatis.odb.core.query.criteria.Where; import org.neodatis.odb.impl.core.query.criteria.CriteriaQuery; | import java.util.*; import org.neodatis.odb.*; import org.neodatis.odb.core.query.*; import org.neodatis.odb.core.query.criteria.*; import org.neodatis.odb.impl.core.query.criteria.*; | [
"java.util",
"org.neodatis.odb"
] | java.util; org.neodatis.odb; | 1,745,586 |
if( in.getReader()!=null )
return new XMLInputSource(
in.getPublicId(), in.getSystemId(), in.getSystemId(),
in.getReader(), null );
if( in.getInputStream()!=null )
return new XMLInputSource(
in.getPublicId(), in.getSystemId(), in.getSystemId(),
... | if( in.getReader()!=null ) return new XMLInputSource( in.getPublicId(), in.getSystemId(), in.getSystemId(), in.getReader(), null ); if( in.getInputStream()!=null ) return new XMLInputSource( in.getPublicId(), in.getSystemId(), in.getSystemId(), in.getInputStream(), null ); return new XMLInputSource( in.getPublicId(), i... | /**
* Creates a proper {@link XMLInputSource} from a {@link StreamSource}.
*
* @return always return non-null valid object.
*/ | Creates a proper <code>XMLInputSource</code> from a <code>StreamSource</code> | toXMLInputSource | {
"repo_name": "AaronZhangL/SplitCharater",
"path": "xerces-2_11_0/src/org/apache/xerces/jaxp/validation/Util.java",
"license": "gpl-2.0",
"size": 2961
} | [
"org.apache.xerces.xni.parser.XMLInputSource"
] | import org.apache.xerces.xni.parser.XMLInputSource; | import org.apache.xerces.xni.parser.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 755,241 |
public ServiceCall<Void> arrayStringCsvNullAsync(final ServiceCallback<Void> serviceCallback) {
return ServiceCall.fromResponse(arrayStringCsvNullWithServiceResponseAsync(), serviceCallback);
} | ServiceCall<Void> function(final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(arrayStringCsvNullWithServiceResponseAsync(), serviceCallback); } | /**
* Get a null array of string using the csv-array format.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} object
*/ | Get a null array of string using the csv-array format | arrayStringCsvNullAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/implementation/QueriesImpl.java",
"license": "mit",
"size": 139435
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,679,424 |
public Expression getArg0()
{
return m_arg0;
}
| Expression function() { return m_arg0; } | /**
* Return the first argument passed to the function (at index 0).
*
* @return An expression that represents the first argument passed to the
* function.
*/ | Return the first argument passed to the function (at index 0) | getArg0 | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xpath/functions/FunctionOneArg.java",
"license": "mit",
"size": 4980
} | [
"org.apache.xpath.Expression"
] | import org.apache.xpath.Expression; | import org.apache.xpath.*; | [
"org.apache.xpath"
] | org.apache.xpath; | 402,603 |
public int shell_read(byte[] buf) {
if (programsInputStream == null)
return -1;
try {
int n = programsInputStream.read(buf);
if (n <= 0) {
programsInputStream.close();
programsInputStream = null;
return 0;
... | int function(byte[] buf) { if (programsInputStream == null) return -1; try { int n = programsInputStream.read(buf); if (n <= 0) { programsInputStream.close(); programsInputStream = null; return 0; } else return n; } catch (IOException e) { try { programsInputStream.close(); } catch (IOException e2) {} programsInputStre... | /**
* shell_read()
*
* Callback for core_import_programs(). Returns the number of bytes actually
* read. Returns -1 if an error occurred; a return value of 0 signifies end of
* input.
*/ | shell_read() Callback for core_import_programs(). Returns the number of bytes actually read. Returns -1 if an error occurred; a return value of 0 signifies end of input | shell_read | {
"repo_name": "jackokring/free42",
"path": "android/src/com/thomasokken/free42/Free42Activity.java",
"license": "gpl-2.0",
"size": 74616
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 809,635 |
ModelBuildingRequest setActiveProfileIds( List<String> activeProfileIds ); | ModelBuildingRequest setActiveProfileIds( List<String> activeProfileIds ); | /**
* Sets the identifiers of those profiles that should be activated by explicit demand.
*
* @param activeProfileIds The identifiers of those profiles to activate, may be {@code null}.
* @return This request, never {@code null}.
*/ | Sets the identifiers of those profiles that should be activated by explicit demand | setActiveProfileIds | {
"repo_name": "rogerchina/maven",
"path": "maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java",
"license": "apache-2.0",
"size": 13022
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 432,195 |
public BlockingRequestQueue getRequestQueue(); | BlockingRequestQueue function(); | /**
* Returns the request queue associated to this body
* @return the request queue associated to this body
*/ | Returns the request queue associated to this body | getRequestQueue | {
"repo_name": "lpellegr/programming",
"path": "programming-core/src/main/java/org/objectweb/proactive/core/body/LocalBodyStrategy.java",
"license": "agpl-3.0",
"size": 4266
} | [
"org.objectweb.proactive.core.body.request.BlockingRequestQueue"
] | import org.objectweb.proactive.core.body.request.BlockingRequestQueue; | import org.objectweb.proactive.core.body.request.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 1,406,514 |
private String findTargetUrl(HttpServletRequest request) {
StringBuilder targetUrl = new StringBuilder();
targetUrl.append(request.getServletPath());
if (StringUtils.isNotBlank(request.getPathInfo())) {
targetUrl.append(request.getPathInfo());
}
// clean login p... | String function(HttpServletRequest request) { StringBuilder targetUrl = new StringBuilder(); targetUrl.append(request.getServletPath()); if (StringUtils.isNotBlank(request.getPathInfo())) { targetUrl.append(request.getPathInfo()); } if (StringUtils.isNotBlank(request.getQueryString())) { targetUrl.append("?"); for (Str... | /**
* Construct a url from a HttpServletRequest with login properties removed
*
* @param request
* @return Url string
*/ | Construct a url from a HttpServletRequest with login properties removed | findTargetUrl | {
"repo_name": "kuali/kc-rice",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/web/filter/DummyLoginFilter.java",
"license": "apache-2.0",
"size": 8998
} | [
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.lang.StringUtils"
] | import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; | import javax.servlet.http.*; import org.apache.commons.lang.*; | [
"javax.servlet",
"org.apache.commons"
] | javax.servlet; org.apache.commons; | 1,543,086 |
public Image getImage() {
return this.image;
}
| Image function() { return this.image; } | /**
* Returns the image for the title.
*
* @return The image for the title (never <code>null</code>).
*/ | Returns the image for the title | getImage | {
"repo_name": "apetresc/JFreeChart",
"path": "src/main/java/org/jfree/chart/title/ImageTitle.java",
"license": "lgpl-2.1",
"size": 13468
} | [
"java.awt.Image"
] | import java.awt.Image; | import java.awt.*; | [
"java.awt"
] | java.awt; | 438,504 |
private Void onInteger(final BigInteger size)
{
final String offset_constant =
JPRAGeneratedNames.getOffsetConstantName(this.field.getName());
final String getter_name =
JPRAGeneratedNames.getGetterName(this.field.getName());
final String setter_name =
JPRAGeneratedNames.getSetterName(... | Void function(final BigInteger size) { final String offset_constant = JPRAGeneratedNames.getOffsetConstantName(this.field.getName()); final String getter_name = JPRAGeneratedNames.getGetterName(this.field.getName()); final String setter_name = JPRAGeneratedNames.getSetterName(this.field.getName()); if (size.compareTo(B... | /**
* Generate a set of methods for setting and retrieving integer values.
*
* @param size The size of the integer
*/ | Generate a set of methods for setting and retrieving integer values | onInteger | {
"repo_name": "io7m/jpra",
"path": "com.io7m.jpra.compiler.java/src/main/java/com/io7m/jpra/compiler/java/RecordFieldImplementationIntegerProcessor.java",
"license": "isc",
"size": 13653
} | [
"com.io7m.junreachable.UnimplementedCodeException",
"java.math.BigInteger"
] | import com.io7m.junreachable.UnimplementedCodeException; import java.math.BigInteger; | import com.io7m.junreachable.*; import java.math.*; | [
"com.io7m.junreachable",
"java.math"
] | com.io7m.junreachable; java.math; | 935,052 |
public static ArrayList<Entity> findBeamCollisions(LivingEntity lshooter, double R, double l)
{
ArrayList<Entity> caught = new ArrayList<Entity>();
List<Entity> nearby = lshooter.getNearbyEntities(l, l, l);
for (Entity entity : nearby) {
if(entity.getLocation().distanceSquared(lshooter.getLocation()) > l... | static ArrayList<Entity> function(LivingEntity lshooter, double R, double l) { ArrayList<Entity> caught = new ArrayList<Entity>(); List<Entity> nearby = lshooter.getNearbyEntities(l, l, l); for (Entity entity : nearby) { if(entity.getLocation().distanceSquared(lshooter.getLocation()) > l*l) continue; if(checkBeam(lshoo... | /**
* Finds all entities caught in the beam.
*
* @param lshooter living entity
* @param R beam radius
* @param l beam length
* @return all entities caught in the beam
*/ | Finds all entities caught in the beam | findBeamCollisions | {
"repo_name": "andfRa/Mythr",
"path": "src/org/andfRa/mythr/util/TargetUtil.java",
"license": "gpl-3.0",
"size": 3983
} | [
"java.util.ArrayList",
"java.util.List",
"org.bukkit.entity.Entity",
"org.bukkit.entity.LivingEntity"
] | import java.util.ArrayList; import java.util.List; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; | import java.util.*; import org.bukkit.entity.*; | [
"java.util",
"org.bukkit.entity"
] | java.util; org.bukkit.entity; | 711,113 |
public void resumeRunningRepairRuns(AppContext context) {
Collection<RepairRun> running =
context.storage.getRepairRunsWithState(RepairRun.RunState.RUNNING);
for (RepairRun repairRun : running) {
Collection<RepairSegment> runningSegments =
context.storage.getSegmentsWithState(repairRun... | void function(AppContext context) { Collection<RepairRun> running = context.storage.getRepairRunsWithState(RepairRun.RunState.RUNNING); for (RepairRun repairRun : running) { Collection<RepairSegment> runningSegments = context.storage.getSegmentsWithState(repairRun.getId(), RepairSegment.State.RUNNING); for (RepairSegme... | /**
* Consult storage to see if any repairs are running, and resume those repair runs.
*
* @param context Reaper's application context.
*/ | Consult storage to see if any repairs are running, and resume those repair runs | resumeRunningRepairRuns | {
"repo_name": "colinkuo/cassandra-reaper",
"path": "src/main/java/com/spotify/reaper/service/RepairManager.java",
"license": "apache-2.0",
"size": 7012
} | [
"com.spotify.reaper.AppContext",
"com.spotify.reaper.ReaperException",
"com.spotify.reaper.core.RepairRun",
"com.spotify.reaper.core.RepairSegment",
"java.util.Collection"
] | import com.spotify.reaper.AppContext; import com.spotify.reaper.ReaperException; import com.spotify.reaper.core.RepairRun; import com.spotify.reaper.core.RepairSegment; import java.util.Collection; | import com.spotify.reaper.*; import com.spotify.reaper.core.*; import java.util.*; | [
"com.spotify.reaper",
"java.util"
] | com.spotify.reaper; java.util; | 2,297,414 |
public static XLog getLog(Class clazz, boolean prefix) {
return new XLog(LogFactory.getLog(clazz), (prefix) ? Info.get().createPrefix() : "");
} | static XLog function(Class clazz, boolean prefix) { return new XLog(LogFactory.getLog(clazz), (prefix) ? Info.get().createPrefix() : ""); } | /**
* Return the named logger.
*
* @param clazz from which the logger name will be derived.
* @param prefix indicates if the {@link org.apache.oozie.util.XLog.Info} prefix has to be used or not.
* @return the named logger.
*/ | Return the named logger | getLog | {
"repo_name": "terrancesnyder/oozie-hadoop2",
"path": "core/src/main/java/org/apache/oozie/util/XLog.java",
"license": "apache-2.0",
"size": 23036
} | [
"org.apache.commons.logging.LogFactory"
] | import org.apache.commons.logging.LogFactory; | import org.apache.commons.logging.*; | [
"org.apache.commons"
] | org.apache.commons; | 972,545 |
@Override
public void notLeader() {
LOG.warn("Server instance with server id {} is removed as leader", serverId);
serviceState.becomingPassive();
for (ActiveStateChangeHandler handler: activeStateChangeHandlers) {
try {
handler.instanceIsPassive();
... | void function() { LOG.warn(STR, serverId); serviceState.becomingPassive(); for (ActiveStateChangeHandler handler: activeStateChangeHandlers) { try { handler.instanceIsPassive(); } catch (AtlasException e) { LOG.error(STR, e); } } serviceState.setPassive(); } | /**
* Call all registered {@link ActiveStateChangeHandler}s on becoming passive instance.
*/ | Call all registered <code>ActiveStateChangeHandler</code>s on becoming passive instance | notLeader | {
"repo_name": "jnhagelberg/incubator-atlas",
"path": "webapp/src/main/java/org/apache/atlas/web/service/ActiveInstanceElectorService.java",
"license": "apache-2.0",
"size": 8014
} | [
"org.apache.atlas.AtlasException",
"org.apache.atlas.listener.ActiveStateChangeHandler"
] | import org.apache.atlas.AtlasException; import org.apache.atlas.listener.ActiveStateChangeHandler; | import org.apache.atlas.*; import org.apache.atlas.listener.*; | [
"org.apache.atlas"
] | org.apache.atlas; | 181,867 |
public Execution fail(ExecutionType type, String configJson, Exception e) throws Exception {
final Execution execution = parse(type, configJson);
persistExecution(execution);
handleStartupFailure(execution, e);
return execution;
} | Execution function(ExecutionType type, String configJson, Exception e) throws Exception { final Execution execution = parse(type, configJson); persistExecution(execution); handleStartupFailure(execution, e); return execution; } | /**
* Log that an execution failed; useful if a pipeline failed validation and we want to persist the
* failure to the execution history but don't actually want to attempt to run the execution.
*
* @param e the exception that was thrown during pipeline validation
*/ | Log that an execution failed; useful if a pipeline failed validation and we want to persist the failure to the execution history but don't actually want to attempt to run the execution | fail | {
"repo_name": "cfieber/orca",
"path": "orca-core/src/main/java/com/netflix/spinnaker/orca/pipeline/ExecutionLauncher.java",
"license": "apache-2.0",
"size": 9787
} | [
"com.netflix.spinnaker.orca.pipeline.model.Execution"
] | import com.netflix.spinnaker.orca.pipeline.model.Execution; | import com.netflix.spinnaker.orca.pipeline.model.*; | [
"com.netflix.spinnaker"
] | com.netflix.spinnaker; | 1,236,754 |
public final StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition)
{
if (obj instanceof Number)
obj = new Date(((Number)obj).longValue());
if (!(obj instanceof Date))
throw new IllegalArgumentException("Invalid object type: " + obj);
return(format((Date)obj,... | final StringBuffer function(Object obj, StringBuffer toAppendTo, FieldPosition fieldPosition) { if (obj instanceof Number) obj = new Date(((Number)obj).longValue()); if (!(obj instanceof Date)) throw new IllegalArgumentException(STR + obj); return(format((Date)obj, toAppendTo, fieldPosition)); } | /**
* This method formats the specified <code>Object</code> into a date string
* and appends it to the specified <code>StringBuffer</code>.
* The specified object must be an instance of <code>Number</code> or
* <code>Date</code> or an <code>IllegalArgumentException</code> will be
* thrown.
*
* @par... | This method formats the specified <code>Object</code> into a date string and appends it to the specified <code>StringBuffer</code>. The specified object must be an instance of <code>Number</code> or <code>Date</code> or an <code>IllegalArgumentException</code> will be thrown | format | {
"repo_name": "sehugg/SSBT",
"path": "fastjlib/java/text/DateFormat.java",
"license": "lgpl-2.1",
"size": 15140
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 733,643 |
public SyncGroupSchema withTables(List<SyncGroupSchemaTable> tables) {
this.tables = tables;
return this;
} | SyncGroupSchema function(List<SyncGroupSchemaTable> tables) { this.tables = tables; return this; } | /**
* Set list of tables in sync group schema.
*
* @param tables the tables value to set
* @return the SyncGroupSchema object itself.
*/ | Set list of tables in sync group schema | withTables | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/SyncGroupSchema.java",
"license": "mit",
"size": 1854
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,120,132 |
static double extractFloatingPointValue(final byte[] values,
final int value_idx,
final byte flags) {
switch (flags & Const.LENGTH_MASK) {
case 7: return Double.longBitsToDouble(Bytes.getLong(values, value_idx));
case ... | static double extractFloatingPointValue(final byte[] values, final int value_idx, final byte flags) { switch (flags & Const.LENGTH_MASK) { case 7: return Double.longBitsToDouble(Bytes.getLong(values, value_idx)); case 3: return Float.intBitsToFloat(Bytes.getInt(values, value_idx)); } throw new IllegalDataException(STR ... | /**
* Extracts the value of a cell containing a data point.
* @param value The contents of a cell in HBase.
* @param value_idx The offset inside {@code values} at which the value
* starts.
* @param flags The flags for this value.
* @return The value of the cell.
* @throws IllegalDataException if th... | Extracts the value of a cell containing a data point | extractFloatingPointValue | {
"repo_name": "manolama/opentsdb",
"path": "src/core/RowSeq.java",
"license": "lgpl-2.1",
"size": 23391
} | [
"java.util.Arrays",
"org.hbase.async.Bytes"
] | import java.util.Arrays; import org.hbase.async.Bytes; | import java.util.*; import org.hbase.async.*; | [
"java.util",
"org.hbase.async"
] | java.util; org.hbase.async; | 2,401,149 |
public static PropertyContainer find(Object src, Path path) {
PropertyContainer result;
PropertyDescriptor desc;
Object newSrc;
PathElement part;
Method method;
Object methodResult;
Method read;
Method write;
part = path.get(0);
desc = null;
read = null;
write... | static PropertyContainer function(Object src, Path path) { PropertyContainer result; PropertyDescriptor desc; Object newSrc; PathElement part; Method method; Object methodResult; Method read; Method write; part = path.get(0); desc = null; read = null; write = null; if (part.getType() == PathElementType.LIST) { try { re... | /**
* returns the property and object associated with the given path, null if
* a problem occurred.
*
* @param src the object to start from
* @param path the path to follow
* @return not null, if the property could be found
*/ | returns the property and object associated with the given path, null if a problem occurred | find | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/gui/goe/PropertyPath.java",
"license": "gpl-3.0",
"size": 16580
} | [
"java.beans.PropertyDescriptor",
"java.lang.reflect.Array",
"java.lang.reflect.Method"
] | import java.beans.PropertyDescriptor; import java.lang.reflect.Array; import java.lang.reflect.Method; | import java.beans.*; import java.lang.reflect.*; | [
"java.beans",
"java.lang"
] | java.beans; java.lang; | 286,186 |
@Message(id = 99, value = "%s is invalid")
String invalid(String name); | @Message(id = 99, value = STR) String invalid(String name); | /**
* A message indicating the {@code name} is invalid.
*
* @param name the name of the invalid attribute.
*
* @return the message.
*/ | A message indicating the name is invalid | invalid | {
"repo_name": "aloubyansky/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/logging/ControllerLogger.java",
"license": "lgpl-2.1",
"size": 164970
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 79,096 |
public boolean isThisOurZnode(String znode) {
String otherRs = ZKUtil.joinZNode(this.rsZNode, znode);
return otherRs.equals(rsServerNameZnode);
} | boolean function(String znode) { String otherRs = ZKUtil.joinZNode(this.rsZNode, znode); return otherRs.equals(rsServerNameZnode); } | /**
* Checks if the provided znode is the same as this region server's
* @param znode to check
* @return if this is this rs's znode
*/ | Checks if the provided znode is the same as this region server's | isThisOurZnode | {
"repo_name": "JichengSong/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java",
"license": "apache-2.0",
"size": 34562
} | [
"org.apache.hadoop.hbase.zookeeper.ZKUtil"
] | import org.apache.hadoop.hbase.zookeeper.ZKUtil; | import org.apache.hadoop.hbase.zookeeper.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,835,848 |
public Map<DbDataMapKey, List<ArrivalDeparture>> getArrivalDepartureMap() {
// Make sure data was read in
if (arrivalDepartureMap == null)
throw new RuntimeException("Called getArrivalDepartureMap() before "
+ "data was read in using readData().");
return arrivalDepartureMap;
} | Map<DbDataMapKey, List<ArrivalDeparture>> function() { if (arrivalDepartureMap == null) throw new RuntimeException(STR + STR); return arrivalDepartureMap; } | /**
* Provides the arrival/departure data in a map. The values in the map are
* Lists of ArrivalDeparture times, one list for each trip where there was
* historic data.
*
* @return arrival/departure data
*/ | Provides the arrival/departure data in a map. The values in the map are Lists of ArrivalDeparture times, one list for each trip where there was historic data | getArrivalDepartureMap | {
"repo_name": "TheTransitClock/transitime",
"path": "transitclock/src/main/java/org/transitclock/core/travelTimes/DataFetcher.java",
"license": "gpl-3.0",
"size": 16670
} | [
"java.util.List",
"java.util.Map",
"org.transitclock.db.structs.ArrivalDeparture"
] | import java.util.List; import java.util.Map; import org.transitclock.db.structs.ArrivalDeparture; | import java.util.*; import org.transitclock.db.structs.*; | [
"java.util",
"org.transitclock.db"
] | java.util; org.transitclock.db; | 1,042,201 |
@Override
public void readFields(DataInput in) {
throw new UnsupportedOperationException("ChunkWritable.readFields() is not implemented");
} | void function(DataInput in) { throw new UnsupportedOperationException(STR); } | /**
* Deserializes the fields of this object from <code>in</code>.
* <p>For efficiency, implementations should attempt to re-use storage in the
* existing object where possible.</p>
*
* @param in <code>DataInput</code> to deserialize this object from.
* @throws UnsupportedOperationExceptio... | Deserializes the fields of this object from <code>in</code>. For efficiency, implementations should attempt to re-use storage in the existing object where possible | readFields | {
"repo_name": "hornn/interviews",
"path": "pxf/pxf-hdfs/src/main/java/org/apache/hawq/pxf/plugins/hdfs/ChunkWritable.java",
"license": "apache-2.0",
"size": 1298
} | [
"java.io.DataInput",
"java.lang.UnsupportedOperationException"
] | import java.io.DataInput; import java.lang.UnsupportedOperationException; | import java.io.*; import java.lang.*; | [
"java.io",
"java.lang"
] | java.io; java.lang; | 481,140 |
protected void onException(String message, Throwable ex)
{
activity.notifyError("Unable to download the image",
message, ex);
}
public ArchivedLoader(UserNotifier viewer, Registry registry,
SecurityContext ctx, ImageData image, String name, File file,
boolean override, ActivityCompo... | void function(String message, Throwable ex) { activity.notifyError(STR, message, ex); } public ArchivedLoader(UserNotifier viewer, Registry registry, SecurityContext ctx, ImageData image, String name, File file, boolean override, ActivityComponent activity) { super(viewer, registry, ctx, activity); if (image == null) t... | /**
* Notifies that an error occurred.
* @see UserNotifierLoader#onException(String, Throwable)
*/ | Notifies that an error occurred | onException | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/ArchivedLoader.java",
"license": "gpl-2.0",
"size": 5835
} | [
"java.io.File",
"org.openmicroscopy.shoola.env.config.Registry",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import java.io.File; import org.openmicroscopy.shoola.env.config.Registry; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import java.io.*; import org.openmicroscopy.shoola.env.config.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"java.io",
"org.openmicroscopy.shoola"
] | java.io; org.openmicroscopy.shoola; | 2,310,064 |
public static IExpr expand(IExpr a, boolean expandNegativePowers, boolean distributePlus,
boolean evalParts) {
if (a.isAST()) {
EvalEngine engine = EvalEngine.get();
IAST ast = engine.evalFlatOrderlessAttributesRecursive((IAST) a).orElse((IAST) a);
return Algebra.expand(ast, null, expandNe... | static IExpr function(IExpr a, boolean expandNegativePowers, boolean distributePlus, boolean evalParts) { if (a.isAST()) { EvalEngine engine = EvalEngine.get(); IAST ast = engine.evalFlatOrderlessAttributesRecursive((IAST) a).orElse((IAST) a); return Algebra.expand(ast, null, expandNegativePowers, distributePlus, evalP... | /**
* Apply <code>Expand()</code> to the given expression if it's an <code>IAST</code>. If expanding
* wasn't possible this method returns the given argument.
*
* @param a the expression which should be evaluated
* @param expandNegativePowers
* @param distributePlus
* @param evalParts evaluate the ... | Apply <code>Expand()</code> to the given expression if it's an <code>IAST</code>. If expanding wasn't possible this method returns the given argument | expand | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/expression/F.java",
"license": "gpl-3.0",
"size": 283472
} | [
"org.matheclipse.core.builtin.Algebra",
"org.matheclipse.core.eval.EvalEngine",
"org.matheclipse.core.interfaces.IExpr"
] | import org.matheclipse.core.builtin.Algebra; import org.matheclipse.core.eval.EvalEngine; import org.matheclipse.core.interfaces.IExpr; | import org.matheclipse.core.builtin.*; import org.matheclipse.core.eval.*; import org.matheclipse.core.interfaces.*; | [
"org.matheclipse.core"
] | org.matheclipse.core; | 140,781 |
public static IDownloader load(byte[] data) {
if (data == null || data.length <= 0) {
return null;
}
ByteBuffer byteBuffer = ByteBuffer.wrap(data);
byte type = byteBuffer.get();
IDownloader downloader = null;
if (type == IDownloader.TYPE_NORMAL_DOWNLOADER)... | static IDownloader function(byte[] data) { if (data == null data.length <= 0) { return null; } ByteBuffer byteBuffer = ByteBuffer.wrap(data); byte type = byteBuffer.get(); IDownloader downloader = null; if (type == IDownloader.TYPE_NORMAL_DOWNLOADER) { downloader = new NormalDownloader(); } else if (type == IDownloader... | /**
* load downloader
*
* @param data 第一个字节为下载器类型标识 0 NormalDownloader
* @return load downloader instance
*/ | load downloader | load | {
"repo_name": "TheoTian/TinyDownloader",
"path": "exdownloader/src/main/java/com/theo/downloader/DownloaderFactory.java",
"license": "bsd-3-clause",
"size": 3135
} | [
"com.theo.downloader.hls.HLSDownloader",
"java.nio.ByteBuffer"
] | import com.theo.downloader.hls.HLSDownloader; import java.nio.ByteBuffer; | import com.theo.downloader.hls.*; import java.nio.*; | [
"com.theo.downloader",
"java.nio"
] | com.theo.downloader; java.nio; | 711,935 |
void closeBlock(ExtendedBlock block, String delHint, String storageUuid) {
metrics.incrBlocksWritten();
BPOfferService bpos = blockPoolManager.get(block.getBlockPoolId());
if(bpos != null) {
bpos.notifyNamenodeReceivedBlock(block, delHint, storageUuid);
} else {
LOG.warn("Cannot find BPOff... | void closeBlock(ExtendedBlock block, String delHint, String storageUuid) { metrics.incrBlocksWritten(); BPOfferService bpos = blockPoolManager.get(block.getBlockPoolId()); if(bpos != null) { bpos.notifyNamenodeReceivedBlock(block, delHint, storageUuid); } else { LOG.warn(STR + block.getBlockPoolId()); } } | /**
* After a block becomes finalized, a datanode increases metric counter,
* notifies namenode, and adds it to the block scanner
* @param block block to close
* @param delHint hint on which excess block to delete
* @param storageUuid UUID of the storage where block is stored
*/ | After a block becomes finalized, a datanode increases metric counter, notifies namenode, and adds it to the block scanner | closeBlock | {
"repo_name": "qqming113/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 120064
} | [
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import org.apache.hadoop.hdfs.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,145,195 |
private void fillRepresentativeScoresAndPvalues(List<Geneset> genesets,
Map<String, List<GenesetGeneticData>> genesetScoresMap, Map<String, List<GenesetGeneticData>> genesetPvaluesMap,
Integer percentile) throws GeneticProfileNotFoundException {
genesets.stream().forEach(g -> calculateAndSetRepresentati... | void function(List<Geneset> genesets, Map<String, List<GenesetGeneticData>> genesetScoresMap, Map<String, List<GenesetGeneticData>> genesetPvaluesMap, Integer percentile) throws GeneticProfileNotFoundException { genesets.stream().forEach(g -> calculateAndSetRepresentativeScoreAndPvalue(g, genesetScoresMap, genesetPvalu... | /**
* This will set the representativeScore attribute for each gene set, based on the data (the gene set
* scores per sample).
* @param sampleIds
*
* @param genesets: list of gene sets for which to calculate and record the representativeScore
* @param genesetDataMap: the set of GSVA(like) scores per samp... | This will set the representativeScore attribute for each gene set, based on the data (the gene set scores per sample) | fillRepresentativeScoresAndPvalues | {
"repo_name": "adamabeshouse/cbioportal",
"path": "service/src/main/java/org/cbioportal/service/impl/GenesetHierarchyServiceImpl.java",
"license": "agpl-3.0",
"size": 16361
} | [
"java.util.List",
"java.util.Map",
"org.cbioportal.model.Geneset",
"org.cbioportal.model.GenesetGeneticData",
"org.cbioportal.service.exception.GeneticProfileNotFoundException"
] | import java.util.List; import java.util.Map; import org.cbioportal.model.Geneset; import org.cbioportal.model.GenesetGeneticData; import org.cbioportal.service.exception.GeneticProfileNotFoundException; | import java.util.*; import org.cbioportal.model.*; import org.cbioportal.service.exception.*; | [
"java.util",
"org.cbioportal.model",
"org.cbioportal.service"
] | java.util; org.cbioportal.model; org.cbioportal.service; | 2,773,673 |
public static String eachMatch(String self, String regex, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) {
return eachMatch(self, Pattern.compile(regex), closure);
} | static String function(String self, String regex, @ClosureParams(value=FromString.class, options={STR,STR}) Closure closure) { return eachMatch(self, Pattern.compile(regex), closure); } | /**
* Process each regex group matched substring of the given string. If the closure
* parameter takes one argument, an array with all match groups is passed to it.
* If the closure takes as many arguments as there are match groups, then each
* parameter will be one match group.
*
* @param... | Process each regex group matched substring of the given string. If the closure parameter takes one argument, an array with all match groups is passed to it. If the closure takes as many arguments as there are match groups, then each parameter will be one match group | eachMatch | {
"repo_name": "traneHead/groovy-core",
"path": "src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java",
"license": "apache-2.0",
"size": 144409
} | [
"groovy.lang.Closure",
"groovy.transform.stc.ClosureParams",
"groovy.transform.stc.FromString",
"java.util.regex.Pattern"
] | import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.FromString; import java.util.regex.Pattern; | import groovy.lang.*; import groovy.transform.stc.*; import java.util.regex.*; | [
"groovy.lang",
"groovy.transform.stc",
"java.util"
] | groovy.lang; groovy.transform.stc; java.util; | 2,222,399 |
public void commitBlockSynchronization(ExtendedBlock block,
long newgenerationstamp, long newlength, boolean closeFile,
boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages)
throws IOException;
| void function(ExtendedBlock block, long newgenerationstamp, long newlength, boolean closeFile, boolean deleteblock, DatanodeID[] newtargets, String[] newtargetstorages) throws IOException; | /**
* Commit block synchronization in lease recovery
*/ | Commit block synchronization in lease recovery | commitBlockSynchronization | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/protocol/DatanodeProtocol.java",
"license": "apache-2.0",
"size": 7648
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 996,818 |
@Override
protected String getRelativePath(HttpServletRequest request) {
// Remove the servlet path from the request URI.
String p = request.getRequestURI();
String servletPath = request.getContextPath() + request.getServletPath();
String result = p.substring(servletPath.length());
if (result == null || r... | String function(HttpServletRequest request) { String p = request.getRequestURI(); String servletPath = request.getContextPath() + request.getServletPath(); String result = p.substring(servletPath.length()); if (result == null result.equals(STR/"; return result; } | /**
* Return the actual requested path in the API namespace.
*
* @param request the servlet request we are processing
* @return the relative path
*/ | Return the actual requested path in the API namespace | getRelativePath | {
"repo_name": "andrewbissada/gss",
"path": "src/org/gss_project/gss/server/rest/RequestHandler.java",
"license": "gpl-3.0",
"size": 25567
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,560,596 |
public GroupTree findOrCreateGroup(String fullyQualifiedGroupName, OperatorDocBundle bundle) {
String[] groupKeys = fullyQualifiedGroupName.split("\\.");
GroupTree group = this;
for (int i = 0; i < groupKeys.length && group != null; i++) {
group = group.getOrCreateSubGroup(groupKeys[i], bundle);
}
... | GroupTree function(String fullyQualifiedGroupName, OperatorDocBundle bundle) { String[] groupKeys = fullyQualifiedGroupName.split("\\."); GroupTree group = this; for (int i = 0; i < groupKeys.length && group != null; i++) { group = group.getOrCreateSubGroup(groupKeys[i], bundle); } return group; } | /**
* Finds or creates the group for the given fully qualified name (dot separated).
*
* @param bundle
*/ | Finds or creates the group for the given fully qualified name (dot separated) | findOrCreateGroup | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/tools/GroupTreeRoot.java",
"license": "agpl-3.0",
"size": 5022
} | [
"com.rapidminer.tools.documentation.OperatorDocBundle"
] | import com.rapidminer.tools.documentation.OperatorDocBundle; | import com.rapidminer.tools.documentation.*; | [
"com.rapidminer.tools"
] | com.rapidminer.tools; | 195,261 |
@Override
public void adjustmentValueChanged(AdjustmentEvent e) {
JScrollBar scrollBar = this.scrollPane.getVerticalScrollBar();
if (e.getSource() == scrollBar) {
// the maximum value of the scroll bar assumes that the content is
// not visible anymore, since this is not the case when scrolling
// to t... | void function(AdjustmentEvent e) { JScrollBar scrollBar = this.scrollPane.getVerticalScrollBar(); if (e.getSource() == scrollBar) { int currentValue = scrollBar.getValue() + scrollBar.getVisibleAmount(); if (currentValue >= scrollBar.getMaximum()) { this.acceptCheckBox.setEnabled(true); this.acceptCheckBox.requestFocus... | /**
* Listens to changes of the scroll bar of the text are showing the EULA text, enables the check
* box once the user scrolled to the end of the document.
*/ | Listens to changes of the scroll bar of the text are showing the EULA text, enables the check box once the user scrolled to the end of the document | adjustmentValueChanged | {
"repo_name": "rapidminer/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/dialog/EULADialog.java",
"license": "agpl-3.0",
"size": 12974
} | [
"java.awt.event.AdjustmentEvent",
"javax.swing.JScrollBar"
] | import java.awt.event.AdjustmentEvent; import javax.swing.JScrollBar; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,091,439 |
@Test
public void testSerialDateConstructorWithThreadLocalCalendar() {
Consumer<Integer> calendarSetup = hours -> RegularTimePeriod.setThreadLocalCalendarInstance(
Calendar.getInstance(TimeZone.getTimeZone(ZoneOffset.ofHours(hours)))
);
testSerialDateConstructorWithCustom... | void function() { Consumer<Integer> calendarSetup = hours -> RegularTimePeriod.setThreadLocalCalendarInstance( Calendar.getInstance(TimeZone.getTimeZone(ZoneOffset.ofHours(hours))) ); testSerialDateConstructorWithCustomCalendar(3, calendarSetup); testSerialDateConstructorWithCustomCalendar(4, calendarSetup); } | /**
* If a thread-local calendar was set, the SerialDate constructor should use it.
*/ | If a thread-local calendar was set, the SerialDate constructor should use it | testSerialDateConstructorWithThreadLocalCalendar | {
"repo_name": "jfree/jfreechart",
"path": "src/test/java/org/jfree/data/time/DayTest.java",
"license": "lgpl-2.1",
"size": 19390
} | [
"java.time.ZoneOffset",
"java.util.Calendar",
"java.util.TimeZone",
"java.util.function.Consumer"
] | import java.time.ZoneOffset; import java.util.Calendar; import java.util.TimeZone; import java.util.function.Consumer; | import java.time.*; import java.util.*; import java.util.function.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 715,891 |
PagedIterable<Input> listByStreamingJob(String resourceGroupName, String jobName, String select, Context context); | PagedIterable<Input> listByStreamingJob(String resourceGroupName, String jobName, String select, Context context); | /**
* Lists all of the inputs under the specified streaming job.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the streaming job.
* @param select The $select OData query parameter. This is a comma-separated list of struct... | Lists all of the inputs under the specified streaming job | listByStreamingJob | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/models/Inputs.java",
"license": "mit",
"size": 11010
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 837,980 |
Color getContextSelectorBackground() {
return fContextSelectorBackground;
} | Color getContextSelectorBackground() { return fContextSelectorBackground; } | /**
* Returns the background of the context selector.
*
* @return the background of the context selector
* @since 2.0
*/ | Returns the background of the context selector | getContextSelectorBackground | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jface.text_3.6.1.r361_v20100825-0800/src/org/eclipse/jface/text/contentassist/ContentAssistant.java",
"license": "mit",
"size": 77038
} | [
"org.eclipse.swt.graphics.Color"
] | import org.eclipse.swt.graphics.Color; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,877,736 |
void disarm() {
_disarmed = true;
}
}
private class GoCommand extends Command implements Runnable {
private GoCommand(final String label, final int type, final int priority) {
super(label, type, priority);
}
| void disarm() { _disarmed = true; } } private class GoCommand extends Command implements Runnable { private GoCommand(final String label, final int type, final int priority) { super(label, type, priority); } | /**
* Disarms the device and stops the countdown.
*/ | Disarms the device and stops the countdown | disarm | {
"repo_name": "blackberry/JDE-Samples",
"path": "com/rim/samples/device/midletdemo/MIDletDemo.java",
"license": "apache-2.0",
"size": 7044
} | [
"javax.microedition.lcdui.Command"
] | import javax.microedition.lcdui.Command; | import javax.microedition.lcdui.*; | [
"javax.microedition"
] | javax.microedition; | 309,884 |
public XYSeriesLabelGenerator getLegendItemToolTipGenerator() {
return this.legendItemToolTipGenerator;
}
| XYSeriesLabelGenerator function() { return this.legendItemToolTipGenerator; } | /**
* Returns the legend item tool tip generator.
*
* @return The tool tip generator (possibly <code>null</code>).
*
* @see #setLegendItemToolTipGenerator(XYSeriesLabelGenerator)
*/ | Returns the legend item tool tip generator | getLegendItemToolTipGenerator | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/renderer/xy/AbstractXYItemRenderer.java",
"license": "gpl-2.0",
"size": 67112
} | [
"org.jfree.chart.labels.XYSeriesLabelGenerator"
] | import org.jfree.chart.labels.XYSeriesLabelGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,829,335 |
@SuppressWarnings("unchecked")
public static List<Stop> getStops(Session session, int configRev)
throws HibernateException {
String hql = "FROM Stop " +
" WHERE configRev = :configRev";
Query query = session.createQuery(hql);
query.setInteger("configRev", configRev);
return query.list();
} | @SuppressWarnings(STR) static List<Stop> function(Session session, int configRev) throws HibernateException { String hql = STR + STR; Query query = session.createQuery(hql); query.setInteger(STR, configRev); return query.list(); } | /**
* Returns List of Stop objects for the specified database revision.
*
* @param session
* @param configRev
* @return
* @throws HibernateException
*/ | Returns List of Stop objects for the specified database revision | getStops | {
"repo_name": "scrudden/core",
"path": "transitime/src/main/java/org/transitime/db/structs/Stop.java",
"license": "gpl-3.0",
"size": 9296
} | [
"java.util.List",
"org.hibernate.HibernateException",
"org.hibernate.Query",
"org.hibernate.Session"
] | import java.util.List; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 1,314,466 |
static protected String objectAsXmlString(Object o, Class<?> clazz) {
StringWriter sw = new StringWriter();
try {
JAXBContext jc = JAXBContext.newInstance(clazz);
Marshaller m = jc.createMarshaller();
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
... | static String function(Object o, Class<?> clazz) { StringWriter sw = new StringWriter(); try { JAXBContext jc = JAXBContext.newInstance(clazz); Marshaller m = jc.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(o, sw); } catch (Exception e) { e.printStackTrace(); } return sw.... | /**
* Object as xml string.
*
* @param o the o
* @param clazz the clazz
* @return the string
*/ | Object as xml string | objectAsXmlString | {
"repo_name": "cherryhill/collectionspace-services",
"path": "services/client/src/main/java/org/collectionspace/services/client/test/BaseServiceTest.java",
"license": "apache-2.0",
"size": 31191
} | [
"java.io.StringWriter",
"javax.xml.bind.JAXBContext",
"javax.xml.bind.Marshaller"
] | import java.io.StringWriter; import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,976,408 |
public Set<QName> getAspects();
| Set<QName> function(); | /**
* Get the Aspects that this node has.
* @return A Set of Aspects IDs.
*/ | Get the Aspects that this node has | getAspects | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/repository/source/java/org/alfresco/repo/avm/AVMNode.java",
"license": "lgpl-3.0",
"size": 7132
} | [
"java.util.Set",
"org.alfresco.service.namespace.QName"
] | import java.util.Set; import org.alfresco.service.namespace.QName; | import java.util.*; import org.alfresco.service.namespace.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 761,977 |
private void step_3() {
// player never asked for this quest
npc.add(ConversationStates.ATTENDING,
ConversationPhrases.FINISH_MESSAGES,
new QuestNotStartedCondition(QUEST_SLOT),
ConversationStates.ATTENDING,
"I'm afraid I didn't send you on a #quest yet.",
null);
// player already complet... | void function() { npc.add(ConversationStates.ATTENDING, ConversationPhrases.FINISH_MESSAGES, new QuestNotStartedCondition(QUEST_SLOT), ConversationStates.ATTENDING, STR, null); npc.add(ConversationStates.ATTENDING, ConversationPhrases.FINISH_MESSAGES, new QuestCompletedCondition(QUEST_SLOT), ConversationStates.ATTENDIN... | /**
* player said "done"
*/ | player said "done" | step_3 | {
"repo_name": "acsid/stendhal",
"path": "src/games/stendhal/server/maps/quests/DailyMonsterQuest.java",
"license": "gpl-2.0",
"size": 17268
} | [
"games.stendhal.server.entity.npc.ConversationPhrases",
"games.stendhal.server.entity.npc.ConversationStates",
"games.stendhal.server.entity.npc.condition.QuestCompletedCondition",
"games.stendhal.server.entity.npc.condition.QuestNotStartedCondition"
] | import games.stendhal.server.entity.npc.ConversationPhrases; import games.stendhal.server.entity.npc.ConversationStates; import games.stendhal.server.entity.npc.condition.QuestCompletedCondition; import games.stendhal.server.entity.npc.condition.QuestNotStartedCondition; | import games.stendhal.server.entity.npc.*; import games.stendhal.server.entity.npc.condition.*; | [
"games.stendhal.server"
] | games.stendhal.server; | 1,870,133 |
protected void addComputedParameters(final Map map) {
if (this instanceof IComputeValue) {
final String value = ((IComputeValue) this).getComputedValue();
MapUtil.putIfNotNull(map, "=> value", value);
}
} | void function(final Map map) { if (this instanceof IComputeValue) { final String value = ((IComputeValue) this).getComputedValue(); MapUtil.putIfNotNull(map, STR, value); } } | /**
* Adds parameters that are not issued from the config file but computed at runtime by the step
*
* @param map the map in which the parameters should be added
*/ | Adds parameters that are not issued from the config file but computed at runtime by the step | addComputedParameters | {
"repo_name": "lukecampbell/webtest",
"path": "src/main/java/com/canoo/webtest/steps/Step.java",
"license": "apache-2.0",
"size": 16120
} | [
"com.canoo.webtest.interfaces.IComputeValue",
"com.canoo.webtest.util.MapUtil",
"java.util.Map"
] | import com.canoo.webtest.interfaces.IComputeValue; import com.canoo.webtest.util.MapUtil; import java.util.Map; | import com.canoo.webtest.interfaces.*; import com.canoo.webtest.util.*; import java.util.*; | [
"com.canoo.webtest",
"java.util"
] | com.canoo.webtest; java.util; | 2,350,010 |
public void setSecret(String secret) {
encryptor = new BasicBinaryEncryptor();
((BasicBinaryEncryptor)encryptor).setPassword(secret);
} | void function(String secret) { encryptor = new BasicBinaryEncryptor(); ((BasicBinaryEncryptor)encryptor).setPassword(secret); } | /**
* A key to encrypt communication. Avoids that an unwanted member participates.
*/ | A key to encrypt communication. Avoids that an unwanted member participates | setSecret | {
"repo_name": "kcarlson/jminix",
"path": "src/main/java/org/jminix/server/cluster/ClusterManager.java",
"license": "apache-2.0",
"size": 7936
} | [
"org.jasypt.util.binary.BasicBinaryEncryptor"
] | import org.jasypt.util.binary.BasicBinaryEncryptor; | import org.jasypt.util.binary.*; | [
"org.jasypt.util"
] | org.jasypt.util; | 1,017,166 |
return (code == KeeperException.Code.CONNECTIONLOSS
|| code == KeeperException.Code.OPERATIONTIMEOUT
|| code == KeeperException.Code.SESSIONEXPIRED
|| code == KeeperException.Code.SESSIONMOVED);
} | return (code == KeeperException.Code.CONNECTIONLOSS code == KeeperException.Code.OPERATIONTIMEOUT code == KeeperException.Code.SESSIONEXPIRED code == KeeperException.Code.SESSIONMOVED); } | /**
* Tells if a given operation error code can be retried or not.
* @param code The error code of the operation.
* @return {@code true} if the operation can be retried.
*/ | Tells if a given operation error code can be retried or not | canRetry | {
"repo_name": "cdapio/twill",
"path": "twill-zookeeper/src/main/java/org/apache/twill/internal/zookeeper/RetryUtils.java",
"license": "apache-2.0",
"size": 1835
} | [
"org.apache.zookeeper.KeeperException"
] | import org.apache.zookeeper.KeeperException; | import org.apache.zookeeper.*; | [
"org.apache.zookeeper"
] | org.apache.zookeeper; | 1,539,938 |
public boolean hasNewMessages() throws MessagingException {
int oldLast = lastArticle;
updateGroupStats();
return lastArticle > oldLast;
} | boolean function() throws MessagingException { int oldLast = lastArticle; updateGroupStats(); return lastArticle > oldLast; } | /**
* Ping the NNTP server to check if a newsgroup has any new messages.
*
* @return True if the server has new articles from the last time we
* checked. Also returns true if this is the first time we've
* checked.
* @exception MessagingException
*/ | Ping the NNTP server to check if a newsgroup has any new messages | hasNewMessages | {
"repo_name": "apache/geronimo-javamail",
"path": "geronimo-javamail_1.3.1/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/store/nntp/NNTPGroupFolder.java",
"license": "apache-2.0",
"size": 13006
} | [
"javax.mail.MessagingException"
] | import javax.mail.MessagingException; | import javax.mail.*; | [
"javax.mail"
] | javax.mail; | 2,290,824 |
private void temporaryReleaseLock(Deque<GridTuple3<Long, Long, Long>> lockedPages) {
lockedPages.iterator().forEachRemaining(t -> writeUnlock(t.get1(), t.get2(), t.get3(), true));
temporaryReleaseLock();
lockedPages.descendingIterator().forEachRemaining(t -> writeLock(t.get1(), t.get2()));... | void function(Deque<GridTuple3<Long, Long, Long>> lockedPages) { lockedPages.iterator().forEachRemaining(t -> writeUnlock(t.get1(), t.get2(), t.get3(), true)); temporaryReleaseLock(); lockedPages.descendingIterator().forEachRemaining(t -> writeLock(t.get1(), t.get2())); } | /**
* Releases the lock that is held by long tree destroy process for a short period of time and acquires it again,
* allowing other processes to acquire it.
* @param lockedPages Deque of locked pages. {@link GridTuple3} contains page id, page pointer and page address.
* Pages are ordered in that or... | Releases the lock that is held by long tree destroy process for a short period of time and acquires it again, allowing other processes to acquire it | temporaryReleaseLock | {
"repo_name": "chandresh-pancholi/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/tree/BPlusTree.java",
"license": "apache-2.0",
"size": 200244
} | [
"java.util.Deque",
"org.apache.ignite.internal.util.lang.GridTuple3"
] | import java.util.Deque; import org.apache.ignite.internal.util.lang.GridTuple3; | import java.util.*; import org.apache.ignite.internal.util.lang.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,175,190 |
public void setBuiltInProvider() throws SQLException {
try (Statement s = conex.createStatement()) {
s.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + "'derby.authentication.provider', 'BUILTIN')");
}
} | void function() throws SQLException { try (Statement s = conex.createStatement()) { s.executeUpdate(STR + STR); } } | /**
* Sets BuiltIn provider of derby authentication
*
* @throws SQLException
*/ | Sets BuiltIn provider of derby authentication | setBuiltInProvider | {
"repo_name": "jcrcano/DrakkarKeel",
"path": "Modules/DrakkarStern/src/drakkar/stern/tracker/persistent/security/DerbyAuthentication.java",
"license": "gpl-2.0",
"size": 14725
} | [
"java.sql.SQLException",
"java.sql.Statement"
] | import java.sql.SQLException; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 744,520 |
public CmsResource getDetailPageResource() {
return m_detailPageResource;
}
| CmsResource function() { return m_detailPageResource; } | /**
* Gets the detail page resource in case the link is the link to a detail page, else returns null.<p>
*
* @return the container page used as the detail page
*/ | Gets the detail page resource in case the link is the link to a detail page, else returns null | getDetailPageResource | {
"repo_name": "mediaworx/opencms-core",
"path": "src/org/opencms/site/xmlsitemap/CmsXmlSitemapUrlBean.java",
"license": "lgpl-2.1",
"size": 6498
} | [
"org.opencms.file.CmsResource"
] | import org.opencms.file.CmsResource; | import org.opencms.file.*; | [
"org.opencms.file"
] | org.opencms.file; | 1,519,593 |
void sendMessage(int port, final String msg, final String expectedResponse) throws IOException {
Socket socket = new Socket((String) null, port);
DataInputStream reader = new DataInputStream(socket.getInputStream());
DataOutputStream writer = new DataOutputStream(socket.getOutputStream());
wri... | void sendMessage(int port, final String msg, final String expectedResponse) throws IOException { Socket socket = new Socket((String) null, port); DataInputStream reader = new DataInputStream(socket.getInputStream()); DataOutputStream writer = new DataOutputStream(socket.getOutputStream()); writer.writeUTF(msg); String ... | /**
* Send a message to the ERFA.
* @param port port number.
* @param msg message, may not be null.
* @param expectedResponse expected response, may not be null.
* @throws IOException thrown on IO error.
* @deprecated since class under test is deprecated.
*/ | Send a message to the ERFA | sendMessage | {
"repo_name": "MuShiiii/log4j",
"path": "tests/src/java/org/apache/log4j/varia/ERFATestCase.java",
"license": "apache-2.0",
"size": 4315
} | [
"java.io.DataInputStream",
"java.io.DataOutputStream",
"java.io.IOException",
"java.net.Socket"
] | import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.Socket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,172,870 |
public int intValue() throws ClassCastException {
try {
return ((OtpErlangLong) value).intValue();
} catch (final OtpErlangRangeException e) {
throw new ClassCastException("Cannot cast to int - value is too big (use longValue() or bigIntValue() instead).");
}
} | int function() throws ClassCastException { try { return ((OtpErlangLong) value).intValue(); } catch (final OtpErlangRangeException e) { throw new ClassCastException(STR); } } | /**
* Returns the Java int value of the wrapped erlang value.
*
* @return the converted value
*
* @throws ClassCastException
* if thrown if a conversion is not possible, i.e. the type is
* not supported or the value is too big
*/ | Returns the Java int value of the wrapped erlang value | intValue | {
"repo_name": "scalaris-team/scalaris",
"path": "java-api/src/de/zib/scalaris/ErlangValue.java",
"license": "apache-2.0",
"size": 23933
} | [
"com.ericsson.otp.erlang.OtpErlangLong",
"com.ericsson.otp.erlang.OtpErlangRangeException"
] | import com.ericsson.otp.erlang.OtpErlangLong; import com.ericsson.otp.erlang.OtpErlangRangeException; | import com.ericsson.otp.erlang.*; | [
"com.ericsson.otp"
] | com.ericsson.otp; | 1,448,629 |
// Keep this in sync with {@link PrepareAnalysisPhaseFunction#getConfigurations}.
// TODO(ulfjack): Remove this legacy method after switching to the Skyframe-based implementation.
public ConfigurationsResult getConfigurations(
ExtendedEventHandler eventHandler, BuildOptions fromOptions, Iterable<Dependency>... | ConfigurationsResult function( ExtendedEventHandler eventHandler, BuildOptions fromOptions, Iterable<Dependency> keys) throws InvalidConfigurationException { ConfigurationsResult.Builder builder = ConfigurationsResult.newBuilder(); Set<Dependency> depsToEvaluate = new HashSet<>(); ImmutableSortedSet<Class<? extends Bui... | /**
* Retrieves the configurations needed for the given deps. If {@link
* CoreOptions#trimConfigurations()} is true, trims their fragments to only those needed by their
* transitive closures. Else unconditionally includes all fragments.
*
* <p>Skips targets with loading phase errors.
*/ | Retrieves the configurations needed for the given deps. If <code>CoreOptions#trimConfigurations()</code> is true, trims their fragments to only those needed by their transitive closures. Else unconditionally includes all fragments. Skips targets with loading phase errors | getConfigurations | {
"repo_name": "dslomov/bazel-windows",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java",
"license": "apache-2.0",
"size": 133601
} | [
"com.google.common.collect.ImmutableSortedSet",
"com.google.devtools.build.lib.analysis.Dependency",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.analysis.config.BuildOptions",
"com.google.devtools.build.lib.analysis.config.ConfigurationResolver",
"com... | import com.google.common.collect.ImmutableSortedSet; import com.google.devtools.build.lib.analysis.Dependency; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.analysis.config.ConfigurationRes... | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.analysis.config.transitions.*; import com.google.devtools.build.lib.analysis.skylark.*; import com.google.devtools.build.lib.cmdline.*; import... | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,505,978 |
public static String firstOrNull(List<String> list) {
return list == null || list.size() == 0 ? null : list.get(0);
} | static String function(List<String> list) { return list == null list.size() == 0 ? null : list.get(0); } | /**
* Gets first string or null from list.
*
* @param list
* list
* @return result
*/ | Gets first string or null from list | firstOrNull | {
"repo_name": "IstiN/android_xcore",
"path": "xcore-library/xcore/src/main/java/by/istin/android/xcore/utils/StringUtil.java",
"license": "apache-2.0",
"size": 12066
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,581,195 |
@Override
public Iterator<Group> getGroups() {
synchronized (groups) {
return (groups.iterator());
}
} | Iterator<Group> function() { synchronized (groups) { return (groups.iterator()); } } | /**
* Return the set of {@link Group}s to which this user belongs.
*/ | Return the set of <code>Group</code>s to which this user belongs | getGroups | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/MemoryUser.java",
"license": "mit",
"size": 8875
} | [
"java.util.Iterator",
"org.apache.catalina.Group"
] | import java.util.Iterator; import org.apache.catalina.Group; | import java.util.*; import org.apache.catalina.*; | [
"java.util",
"org.apache.catalina"
] | java.util; org.apache.catalina; | 2,528,861 |
default Function0<R> applyPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) {
return () -> apply(args.v1, args.v2, args.v3, args.v4, args.v5, args.v... | default Function0<R> applyPartially(Tuple13<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6, ? extends T7, ? extends T8, ? extends T9, ? extends T10, ? extends T11, ? extends T12, ? extends T13> args) { return () -> apply(args.v1, args.v2, args.v3, args.v4, args.v5, args.v6, args.v7, ... | /**
* Partially apply this function to the arguments.
*/ | Partially apply this function to the arguments | applyPartially | {
"repo_name": "jOOQ/jOOL",
"path": "jOOL/src/main/java/org/jooq/lambda/function/Function13.java",
"license": "apache-2.0",
"size": 23187
} | [
"org.jooq.lambda.tuple.Tuple13"
] | import org.jooq.lambda.tuple.Tuple13; | import org.jooq.lambda.tuple.*; | [
"org.jooq.lambda"
] | org.jooq.lambda; | 444,917 |
void onTimeout(Timer timer); | void onTimeout(Timer timer); | /**
* On timeout.
*
* @param timer the timer
*/ | On timeout | onTimeout | {
"repo_name": "OpenWIS/openwis",
"path": "openwis-dataservice/openwis-dataservice-common/openwis-dataservice-common-timer/src/main/java/org/openwis/dataservice/common/timer/LocalDataSourcePollingTimerService.java",
"license": "gpl-3.0",
"size": 608
} | [
"javax.ejb.Timer"
] | import javax.ejb.Timer; | import javax.ejb.*; | [
"javax.ejb"
] | javax.ejb; | 1,109,549 |
private static boolean checkPermissionOfOther(FileSystem fs, Path path,
FsAction action, Map<URI, FileStatus> statCache) throws IOException {
FileStatus status = getFileStatus(fs, path.toUri(), statCache);
// Encrypted files are always treated as private. This stance has two
// important side effec... | static boolean function(FileSystem fs, Path path, FsAction action, Map<URI, FileStatus> statCache) throws IOException { FileStatus status = getFileStatus(fs, path.toUri(), statCache); if (!status.isEncrypted()) { FsAction otherAction = status.getPermission().getOtherAction(); if (otherAction.implies(action)) { return t... | /**
* Checks for a given path whether the Other permissions on it
* imply the permission in the passed FsAction
* @param fs
* @param path
* @param action
* @return true if the path in the uri is visible to all, false otherwise
* @throws IOException
*/ | Checks for a given path whether the Other permissions on it imply the permission in the passed FsAction | checkPermissionOfOther | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/filecache/ClientDistributedCacheManager.java",
"license": "apache-2.0",
"size": 12590
} | [
"java.io.IOException",
"java.util.Map",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.permission.FsAction"
] | import java.io.IOException; import java.util.Map; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsAction; | 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,749,905 |
public void testLiteralNumbers() throws Exception {
Expression e = buildExpression("5");
assertEquals("Unexpected expression type", ExpressionType.LITERAL, e.getExpressionType());
LiteralImpl l = (LiteralImpl) e;
assertEquals("Unexpected number literal value", 5.0, l.getValue());
... | void function() throws Exception { Expression e = buildExpression("5"); assertEquals(STR, ExpressionType.LITERAL, e.getExpressionType()); LiteralImpl l = (LiteralImpl) e; assertEquals(STR, 5.0, l.getValue()); e = buildExpression("5.345"); assertEquals(STR, ExpressionType.LITERAL, e.getExpressionType()); l = (LiteralImp... | /**
* Number literals include integers, decimals, and exponents.
*/ | Number literals include integers, decimals, and exponents | testLiteralNumbers | {
"repo_name": "igor-sfdc/aura",
"path": "aura-impl-expression/src/test/java/org/auraframework/impl/expression/parser/ExpressionParserTest.java",
"license": "apache-2.0",
"size": 26206
} | [
"org.auraframework.expression.Expression",
"org.auraframework.expression.ExpressionType",
"org.auraframework.impl.expression.LiteralImpl"
] | import org.auraframework.expression.Expression; import org.auraframework.expression.ExpressionType; import org.auraframework.impl.expression.LiteralImpl; | import org.auraframework.expression.*; import org.auraframework.impl.expression.*; | [
"org.auraframework.expression",
"org.auraframework.impl"
] | org.auraframework.expression; org.auraframework.impl; | 734,130 |
public void setMaxStairLength(int value) {
this.maxStairLength = value;
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
public static class GapProbability {
@XmlValue
protected BigDecimal value;
@XmlAttribute(na... | void function(int value) { this.maxStairLength = value; } @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = STRvalueSTRvariance") protected BigDecimal variance; /** * Gets the value of the value property. * * * possible object is * {@link BigDecimal } | /**
* Sets the value of the maxStairLength property.
*
*/ | Sets the value of the maxStairLength property | setMaxStairLength | {
"repo_name": "Yarichi/Proyecto-DASI",
"path": "Malmo/Minecraft/build/sources/main/java/com/microsoft/Malmo/Schemas/SnakeDecorator.java",
"license": "gpl-2.0",
"size": 21677
} | [
"java.math.BigDecimal",
"javax.xml.bind.annotation.XmlAccessType",
"javax.xml.bind.annotation.XmlAccessorType",
"javax.xml.bind.annotation.XmlType"
] | import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; | import java.math.*; import javax.xml.bind.annotation.*; | [
"java.math",
"javax.xml"
] | java.math; javax.xml; | 2,098,849 |
@Test
public void testExecutionOnSample() throws IOException {
List<KeyValue> kvList = generator.generateTestKeyValues(NUMBER_OF_KV, includesTags);
testEncodersOnDataset(RedundantKVGenerator.convertKvToByteBuffer(kvList, includesMemstoreTS),
kvList);
} | void function() throws IOException { List<KeyValue> kvList = generator.generateTestKeyValues(NUMBER_OF_KV, includesTags); testEncodersOnDataset(RedundantKVGenerator.convertKvToByteBuffer(kvList, includesMemstoreTS), kvList); } | /**
* Test whether compression -> decompression gives the consistent results on
* pseudorandom sample.
* @throws IOException On test failure.
*/ | Test whether compression -> decompression gives the consistent results on pseudorandom sample | testExecutionOnSample | {
"repo_name": "alipayhuber/hack-hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/io/encoding/TestDataBlockEncoders.java",
"license": "apache-2.0",
"size": 15975
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.util.test.RedundantKVGenerator"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.util.test.RedundantKVGenerator; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.test.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 537,772 |
public Date getCreationDate()
{
return (m_creationDate);
} | Date function() { return (m_creationDate); } | /**
* Retrieve the created date.
*
* @return created date
*/ | Retrieve the created date | getCreationDate | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/mpp/SummaryInformation.java",
"license": "lgpl-2.1",
"size": 7352
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,297,396 |
public void setOverlayImage(int index, @Nullable Drawable drawable) {
// Note that overlays are by definition top-most and therefore the last elements in the array.
Preconditions.checkArgument(
index >= 0 && OVERLAY_IMAGES_INDEX + index < mFadeDrawable.getNumberOfLayers(),
"The given index doe... | void function(int index, @Nullable Drawable drawable) { Preconditions.checkArgument( index >= 0 && OVERLAY_IMAGES_INDEX + index < mFadeDrawable.getNumberOfLayers(), STR); setChildDrawableAtIndex(OVERLAY_IMAGES_INDEX + index, drawable); } | /**
* Sets a new overlay image at the specified index.
*
* This method will throw if the given index is out of bounds.
*
* @param drawable background image
*/ | Sets a new overlay image at the specified index. This method will throw if the given index is out of bounds | setOverlayImage | {
"repo_name": "s1rius/fresco",
"path": "drawee/src/main/java/com/facebook/drawee/generic/GenericDraweeHierarchy.java",
"license": "mit",
"size": 21031
} | [
"android.graphics.drawable.Drawable",
"com.facebook.common.internal.Preconditions",
"javax.annotation.Nullable"
] | import android.graphics.drawable.Drawable; import com.facebook.common.internal.Preconditions; import javax.annotation.Nullable; | import android.graphics.drawable.*; import com.facebook.common.internal.*; import javax.annotation.*; | [
"android.graphics",
"com.facebook.common",
"javax.annotation"
] | android.graphics; com.facebook.common; javax.annotation; | 2,728,818 |
public void insert(_FrjSequent provedSequent) {
Formula right = provedSequent.right();
switch (provedSequent.type()) {
case IRREGULAR: {
HashSet<FrjIrregularSequent> set = irregular.get(right);
if (set == null) {
set = new HashSet<FrjIrregularSequent>();
irregular.put(right, set)... | void function(_FrjSequent provedSequent) { Formula right = provedSequent.right(); switch (provedSequent.type()) { case IRREGULAR: { HashSet<FrjIrregularSequent> set = irregular.get(right); if (set == null) { set = new HashSet<FrjIrregularSequent>(); irregular.put(right, set); } set.add((FrjIrregularSequent) provedSeque... | /**
* This method inserts the sequent <code>seq</code> in this table. This method
* does not check if <code>seq</code> is already in the table or it is
* subsumed by some method in the table; thus to avoid redundancies you should
* check these facts with the methods {@link #contains(_FrjSequent)} and
* {... | This method inserts the sequent <code>seq</code> in this table. This method does not check if <code>seq</code> is already in the table or it is subsumed by some method in the table; thus to avoid redundancies you should check these facts with the methods <code>#contains(_FrjSequent)</code> and <code>#subsumes(_FrjSeque... | insert | {
"repo_name": "ferram/jtabwb_provers",
"path": "ipl_frj/src/ipl/frj/seqdb/SequentsTable.java",
"license": "gpl-3.0",
"size": 8737
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,256,517 |
return new QueryDslSearchQuery<T>(fetchableQuery);
}
private static class QueryDslSearchQuery<T> implements IQuery<T> {
private final FetchableQueryBase<T, ?> fetchableQuery;
public QueryDslSearchQuery(FetchableQueryBase<T, ?> fetchableQuery) {
this.fetchableQuery = fetchableQuery;
} | return new QueryDslSearchQuery<T>(fetchableQuery); } private static class QueryDslSearchQuery<T> implements IQuery<T> { private final FetchableQueryBase<T, ?> fetchableQuery; public QueryDslSearchQuery(FetchableQueryBase<T, ?> fetchableQuery) { this.fetchableQuery = fetchableQuery; } | /**
* A simple wrapper from {@link FetchableQueryBase} to {@link IQuery}.
* <p>The resulting query is not thread-safe.
*/ | A simple wrapper from <code>FetchableQueryBase</code> to <code>IQuery</code>. The resulting query is not thread-safe | fromQueryDsl | {
"repo_name": "openwide-java/owsi-core-parent",
"path": "owsi-core/owsi-core-components/owsi-core-component-jpa/src/main/java/fr/openwide/core/jpa/query/Queries.java",
"license": "apache-2.0",
"size": 1156
} | [
"com.querydsl.core.support.FetchableQueryBase"
] | import com.querydsl.core.support.FetchableQueryBase; | import com.querydsl.core.support.*; | [
"com.querydsl.core"
] | com.querydsl.core; | 704,397 |
public boolean statisticsExist(ConglomerateDescriptor cd)
throws StandardException
{
List sdl = getStatistics();
if (cd == null)
return (sdl.size() > 0);
UUID cdUUID = cd.getUUID();
for (Iterator li = sdl.iterator(); li.hasNext(); )
{
StatisticsDescriptor statDesc = (StatisticsDescriptor) li.ne... | boolean function(ConglomerateDescriptor cd) throws StandardException { List sdl = getStatistics(); if (cd == null) return (sdl.size() > 0); UUID cdUUID = cd.getUUID(); for (Iterator li = sdl.iterator(); li.hasNext(); ) { StatisticsDescriptor statDesc = (StatisticsDescriptor) li.next(); if (cdUUID.equals(statDesc.getRef... | /**
* Are there statistics for this particular conglomerate.
*
* @param cd Conglomerate/Index for which we want to check if statistics
* exist. cd can be null in which case user wants to know if there are any
* statistics at all on the table.
*/ | Are there statistics for this particular conglomerate | statisticsExist | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/engine/org/apache/derby/iapi/sql/dictionary/TableDescriptor.java",
"license": "apache-2.0",
"size": 46099
} | [
"java.util.Iterator",
"java.util.List",
"org.apache.derby.iapi.error.StandardException"
] | import java.util.Iterator; import java.util.List; import org.apache.derby.iapi.error.StandardException; | import java.util.*; import org.apache.derby.iapi.error.*; | [
"java.util",
"org.apache.derby"
] | java.util; org.apache.derby; | 673,985 |
private boolean isTagIgnored(DetailNode javadocTagSection) {
return ignoredTags.contains(JavadocUtils.getTagName(javadocTagSection));
} | boolean function(DetailNode javadocTagSection) { return ignoredTags.contains(JavadocUtils.getTagName(javadocTagSection)); } | /**
* Checks if list of ignored tags contains javadocTagSection's javadoc tag.
*
* @param javadocTagSection to check javadoc tag in.
* @return true, if ignoredTags contains javadocTagSection's javadoc tag.
*/ | Checks if list of ignored tags contains javadocTagSection's javadoc tag | isTagIgnored | {
"repo_name": "nikhilgupta23/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SingleLineJavadocCheck.java",
"license": "lgpl-2.1",
"size": 6810
} | [
"com.puppycrawl.tools.checkstyle.api.DetailNode",
"com.puppycrawl.tools.checkstyle.utils.JavadocUtils"
] | import com.puppycrawl.tools.checkstyle.api.DetailNode; import com.puppycrawl.tools.checkstyle.utils.JavadocUtils; | import com.puppycrawl.tools.checkstyle.api.*; import com.puppycrawl.tools.checkstyle.utils.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 180,812 |
default void truncateTable(TableName tableName, boolean preserveSplits) throws IOException {
get(truncateTableAsync(tableName, preserveSplits), getSyncWaitTimeout(), TimeUnit.MILLISECONDS);
} | default void truncateTable(TableName tableName, boolean preserveSplits) throws IOException { get(truncateTableAsync(tableName, preserveSplits), getSyncWaitTimeout(), TimeUnit.MILLISECONDS); } | /**
* Truncate a table. Synchronous operation.
* @param tableName name of table to truncate
* @param preserveSplits <code>true</code> if the splits should be preserved
* @throws IOException if a remote or network exception occurs
*/ | Truncate a table. Synchronous operation | truncateTable | {
"repo_name": "francisliu/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 106428
} | [
"java.io.IOException",
"java.util.concurrent.TimeUnit",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.util.FutureUtils"
] | import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.util.FutureUtils; | import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,803,624 |
public static float getJsonObjectFloatFieldValueOrDefault(JsonObject p_151221_0_, String p_151221_1_, float p_151221_2_)
{
return p_151221_0_.has(p_151221_1_) ? getJsonElementFloatValue(p_151221_0_.get(p_151221_1_), p_151221_1_) : p_151221_2_;
} | static float function(JsonObject p_151221_0_, String p_151221_1_, float p_151221_2_) { return p_151221_0_.has(p_151221_1_) ? getJsonElementFloatValue(p_151221_0_.get(p_151221_1_), p_151221_1_) : p_151221_2_; } | /**
* Gets the float value of the field on the JsonObject with the given name, or the given default value if the field
* is missing.
*/ | Gets the float value of the field on the JsonObject with the given name, or the given default value if the field is missing | getJsonObjectFloatFieldValueOrDefault | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/util/JsonUtils.java",
"license": "mit",
"size": 12217
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,878,454 |
public static void main(final String[] args) throws UNISoNException {
final JFrame frame = new JFrame();
frame.setVisible(true);
final LinkedList<String> posters = new LinkedList<>();
final String LUCY = "Lucy";
posters.add(LUCY);
final String JESS = "Jess";
posters.add(JESS);
final String MIC = "Mic... | static void function(final String[] args) throws UNISoNException { final JFrame frame = new JFrame(); frame.setVisible(true); final LinkedList<String> posters = new LinkedList<>(); final String LUCY = "Lucy"; posters.add(LUCY); final String JESS = "Jess"; posters.add(JESS); final String MIC = "Mic"; posters.add(MIC); f... | /**
* a driver for this demo.
*
* @param args
* the arguments
* @throws UNISoNException
* the UNI so n exception
*/ | a driver for this demo | main | {
"repo_name": "leonarduk/unison",
"path": "src/main/java/uk/co/sleonard/unison/gui/GraphPreviewPanel.java",
"license": "apache-2.0",
"size": 7420
} | [
"edu.uci.ics.jung.graph.Vertex",
"edu.uci.ics.jung.graph.decorators.DefaultToolTipFunction",
"edu.uci.ics.jung.graph.decorators.EdgeShape",
"edu.uci.ics.jung.graph.decorators.EllipseVertexShapeFunction",
"edu.uci.ics.jung.graph.decorators.PickableVertexPaintFunction",
"edu.uci.ics.jung.graph.decorators.Ve... | import edu.uci.ics.jung.graph.Vertex; import edu.uci.ics.jung.graph.decorators.DefaultToolTipFunction; import edu.uci.ics.jung.graph.decorators.EdgeShape; import edu.uci.ics.jung.graph.decorators.EllipseVertexShapeFunction; import edu.uci.ics.jung.graph.decorators.PickableVertexPaintFunction; import edu.uci.ics.jung.gr... | import edu.uci.ics.jung.graph.*; import edu.uci.ics.jung.graph.decorators.*; import edu.uci.ics.jung.graph.impl.*; import edu.uci.ics.jung.visualization.*; import edu.uci.ics.jung.visualization.control.*; import java.awt.*; import java.util.*; import javax.swing.*; import uk.co.sleonard.unison.*; import uk.co.sleonard.... | [
"edu.uci.ics",
"java.awt",
"java.util",
"javax.swing",
"uk.co.sleonard"
] | edu.uci.ics; java.awt; java.util; javax.swing; uk.co.sleonard; | 2,587,695 |
public Enumeration<ScriptingEngine> scripts();
| Enumeration<ScriptingEngine> function(); | /**
* Returns an enumerator of all the scripts on this object.
* @see com.planet_ink.coffee_mud.Common.interfaces.ScriptingEngine
* @return an enumerator of all the scripts on this object.
*/ | Returns an enumerator of all the scripts on this object | scripts | {
"repo_name": "bozimmerman/CoffeeMud",
"path": "com/planet_ink/coffee_mud/core/interfaces/Behavable.java",
"license": "apache-2.0",
"size": 4922
} | [
"com.planet_ink.coffee_mud.Common",
"java.util.Enumeration"
] | import com.planet_ink.coffee_mud.Common; import java.util.Enumeration; | import com.planet_ink.coffee_mud.*; import java.util.*; | [
"com.planet_ink.coffee_mud",
"java.util"
] | com.planet_ink.coffee_mud; java.util; | 2,488,045 |
private void startDl() {
progress = new ProgressDialog(this);
progress.setTitle(getString(R.string.rss_download_title));
progress.setMessage(getString(R.string.rss_download_description));
progress.show();
new RequestTask()
.execute(rssUrl);
} | void function() { progress = new ProgressDialog(this); progress.setTitle(getString(R.string.rss_download_title)); progress.setMessage(getString(R.string.rss_download_description)); progress.show(); new RequestTask() .execute(rssUrl); } | /**
* Launches the progress dialog and the downloader.
*/ | Launches the progress dialog and the downloader | startDl | {
"repo_name": "LeoLogeart/PodcastDownloader",
"path": "PodcastDownloader/app/src/main/java/com/cynh/podcastdownloader/context/DownloadActivity.java",
"license": "mit",
"size": 13137
} | [
"android.app.ProgressDialog"
] | import android.app.ProgressDialog; | import android.app.*; | [
"android.app"
] | android.app; | 2,441,195 |
@FIXVersion(introduced="5.0")
public PosAmtGroup deletePosAmtGroup(int index) {
throw new UnsupportedOperationException(getUnsupportedTagMessage());
} | @FIXVersion(introduced="5.0") PosAmtGroup function(int index) { throw new UnsupportedOperationException(getUnsupportedTagMessage()); } | /**
* This method deletes a {@link PosAmtGroup} object from the existing array of <code>posAmtGroups</code>
* and shrink the static array with 1 place.<br/>
* If the array does not have the index position then a null object will be returned.)<br/>
* This method will also update <code>noPosAmt</code>... | This method deletes a <code>PosAmtGroup</code> object from the existing array of <code>posAmtGroups</code> and shrink the static array with 1 place. If the array does not have the index position then a null object will be returned.) This method will also update <code>noPosAmt</code> field to the proper value | deletePosAmtGroup | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/AllocationInstructionMsg.java",
"license": "gpl-3.0",
"size": 122626
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.group.PosAmtGroup"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.group.PosAmtGroup; | import net.hades.fix.message.anno.*; import net.hades.fix.message.group.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,939,921 |
@Override
public void modifyTestElement(TestElement el) {
configureTestElement(el);
SizeAssertion assertion = (SizeAssertion) el;
if (responseHeadersButton.isSelected()) {
assertion.setTestFieldResponseHeaders();
} else if (responseBodyButton.isSelected()) {
... | void function(TestElement el) { configureTestElement(el); SizeAssertion assertion = (SizeAssertion) el; if (responseHeadersButton.isSelected()) { assertion.setTestFieldResponseHeaders(); } else if (responseBodyButton.isSelected()) { assertion.setTestFieldResponseBody(); } else if (responseCodeButton.isSelected()) { ass... | /**
* Modifies a given TestElement to mirror the data in the gui components.
*
* @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
*/ | Modifies a given TestElement to mirror the data in the gui components | modifyTestElement | {
"repo_name": "d0k1/jmeter",
"path": "src/components/org/apache/jmeter/assertions/gui/SizeAssertionGui.java",
"license": "apache-2.0",
"size": 11328
} | [
"org.apache.jmeter.assertions.SizeAssertion",
"org.apache.jmeter.testelement.TestElement"
] | import org.apache.jmeter.assertions.SizeAssertion; import org.apache.jmeter.testelement.TestElement; | import org.apache.jmeter.assertions.*; import org.apache.jmeter.testelement.*; | [
"org.apache.jmeter"
] | org.apache.jmeter; | 1,718,610 |
void showErrorMessage(RefactoringStatus status); | void showErrorMessage(RefactoringStatus status); | /**
* Show error message into bottom of view.
*
* @param status status of error move operation
*/ | Show error message into bottom of view | showErrorMessage | {
"repo_name": "TypeFox/che",
"path": "plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/rename/wizard/RenameView.java",
"license": "epl-1.0",
"size": 4576
} | [
"org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatus"
] | import org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringStatus; | import org.eclipse.che.ide.ext.java.shared.dto.refactoring.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,399,099 |
public void setLayout(LayoutManager manager)
{
if (isRootPaneCheckingEnabled())
throw new Error("Cannot set layout. Use getContentPane().setLayout() instead.");
super.setLayout(manager);
} | void function(LayoutManager manager) { if (isRootPaneCheckingEnabled()) throw new Error(STR); super.setLayout(manager); } | /**
* This method sets the Layout Manager used in the JInternalFrame. SetLayout
* should not be called on the JInternalFrame directly. Instead, it should
* be called with JInternalFrame.getContentPane().setLayout. Calls to this
* method with root pane checking enabled will cause exceptions to be
* thrown... | This method sets the Layout Manager used in the JInternalFrame. SetLayout should not be called on the JInternalFrame directly. Instead, it should be called with JInternalFrame.getContentPane().setLayout. Calls to this method with root pane checking enabled will cause exceptions to be thrown | setLayout | {
"repo_name": "aosm/gcc_40",
"path": "libjava/javax/swing/JInternalFrame.java",
"license": "gpl-2.0",
"size": 45208
} | [
"java.awt.LayoutManager"
] | import java.awt.LayoutManager; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,048,403 |
public void addDefinitionPostProcessor(DefinitionPostProcessor... dpps);
/**
* Binds a specified {@link ComponentServiceContextType}.
* <p>
* <b>Note:</b> It will be only effected if the current container is
* {@link ServiceProvider}
| void function(DefinitionPostProcessor... dpps); /** * Binds a specified {@link ComponentServiceContextType}. * <p> * <b>Note:</b> It will be only effected if the current container is * {@link ServiceProvider} | /**
* Adds an instance or a group of instances of
* {@link DefinitionPostProcessor}.
*
* @param dpps
* the list of instances of {@link DefinitionPostProcessor} need
* to be added
*/ | Adds an instance or a group of instances of <code>DefinitionPostProcessor</code> | addDefinitionPostProcessor | {
"repo_name": "haint/jgentle",
"path": "src/org/jgentleframework/configure/SystemConfig.java",
"license": "apache-2.0",
"size": 7087
} | [
"org.jgentleframework.context.ComponentServiceContextType",
"org.jgentleframework.context.ServiceProvider",
"org.jgentleframework.reflection.DefinitionPostProcessor"
] | import org.jgentleframework.context.ComponentServiceContextType; import org.jgentleframework.context.ServiceProvider; import org.jgentleframework.reflection.DefinitionPostProcessor; | import org.jgentleframework.context.*; import org.jgentleframework.reflection.*; | [
"org.jgentleframework.context",
"org.jgentleframework.reflection"
] | org.jgentleframework.context; org.jgentleframework.reflection; | 1,789,227 |
private File getFileForImageCapture(Context context) throws IOException {
assert !ThreadUtils.runningOnUiThread();
File photoFile = File.createTempFile(String.valueOf(System.currentTimeMillis()), ".jpg",
UiUtils.getDirectoryForImageCapture(context));
return photoFile;
} | File function(Context context) throws IOException { assert !ThreadUtils.runningOnUiThread(); File photoFile = File.createTempFile(String.valueOf(System.currentTimeMillis()), ".jpg", UiUtils.getDirectoryForImageCapture(context)); return photoFile; } | /**
* Get a file for the image capture operation. For devices with JB MR2 or
* latter android versions, the file is put under IMAGE_FILE_PATH directory.
* For ICS devices, the file is put under CAPTURE_IMAGE_DIRECTORY.
*
* @param context The application context.
* @return file path for the... | Get a file for the image capture operation. For devices with JB MR2 or latter android versions, the file is put under IMAGE_FILE_PATH directory. For ICS devices, the file is put under CAPTURE_IMAGE_DIRECTORY | getFileForImageCapture | {
"repo_name": "nwjs/chromium.src",
"path": "ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java",
"license": "bsd-3-clause",
"size": 52206
} | [
"android.content.Context",
"java.io.File",
"java.io.IOException",
"org.chromium.base.ThreadUtils",
"org.chromium.ui.UiUtils"
] | import android.content.Context; import java.io.File; import java.io.IOException; import org.chromium.base.ThreadUtils; import org.chromium.ui.UiUtils; | import android.content.*; import java.io.*; import org.chromium.base.*; import org.chromium.ui.*; | [
"android.content",
"java.io",
"org.chromium.base",
"org.chromium.ui"
] | android.content; java.io; org.chromium.base; org.chromium.ui; | 2,329,007 |
//given
clearAllOldStubConfigs();
setOperationModeTo("wilma");
uploadTemplateToWilma(RESOURCE_FILE_NAME, EXAMPLE_4_XML);
uploadStubConfigToWilma(STUB_CONFIG);
setOriginalRequestMessageFromFile(EXAMPLE_3_XML);
setExpectedResponseMessageFromFile("resources/uc3_2TestResponse... | clearAllOldStubConfigs(); setOperationModeTo("wilma"); uploadTemplateToWilma(RESOURCE_FILE_NAME, EXAMPLE_4_XML); uploadStubConfigToWilma(STUB_CONFIG); setOriginalRequestMessageFromFile(EXAMPLE_3_XML); setExpectedResponseMessageFromFile(STR); RequestParameters requestParameters = createRequestParameters(); if (tcName.co... | /**
* B, send the req2-xml message to Apache (use wilma as proxy), but when the this request arrives to Wilma,
* Wilma sends resp-xml2 back as response instead of forwarding te request to Apache.
* (don't forget to log the messages)
*
* @throws Exception
*/ | B, send the req2-xml message to Apache (use wilma as proxy), but when the this request arrives to Wilma, Wilma sends resp-xml2 back as response instead of forwarding te request to Apache. (don't forget to log the messages) | testBasicStubBehavior | {
"repo_name": "epam/Wilma",
"path": "wilma-functionaltest/src/main/java/com/epam/wilma/gepard/test/basic/BasicStubBehaviorTest.java",
"license": "gpl-3.0",
"size": 3931
} | [
"com.epam.wilma.gepard.testclient.RequestParameters"
] | import com.epam.wilma.gepard.testclient.RequestParameters; | import com.epam.wilma.gepard.testclient.*; | [
"com.epam.wilma"
] | com.epam.wilma; | 2,895,703 |
@SuppressWarnings("unchecked")
public List<CaseType> list(String[] keywords, boolean includeClosed,
boolean detail, String group, String startDate, String endDate,
String count, String start, String[] kwargs)
throws RequestException, MalformedURLException {
StringBui... | @SuppressWarnings(STR) List<CaseType> function(String[] keywords, boolean includeClosed, boolean detail, String group, String startDate, String endDate, String count, String start, String[] kwargs) throws RequestException, MalformedURLException { StringBuilder xmlString = new StringBuilder(); xmlString .append(STR1.0\S... | /**
* Queries the cases RESTful interface with a given set of keywords. RESTful method:
* https://api.access.redhat.com/rs/cases?keyword=NFS
*
* @param keywords A string array of keywords to search on.
* @param includeClosed Do not include closed cases.
* @param detail Include additional d... | Queries the cases RESTful interface with a given set of keywords. RESTful method: HREF | list | {
"repo_name": "redhataccess/redhat-support-lib-java",
"path": "src/main/java/com/redhat/gss/redhat_support_lib/infrastructure/Cases.java",
"license": "apache-2.0",
"size": 7607
} | [
"com.redhat.gss.redhat_support_lib.errors.RequestException",
"com.redhat.gss.redhat_support_lib.helpers.FilterHelper",
"com.redhat.gss.redhat_support_lib.helpers.QueryBuilder",
"com.redhat.gss.redhat_support_lib.parsers.CaseType",
"java.net.MalformedURLException",
"java.util.ArrayList",
"java.util.List"... | import com.redhat.gss.redhat_support_lib.errors.RequestException; import com.redhat.gss.redhat_support_lib.helpers.FilterHelper; import com.redhat.gss.redhat_support_lib.helpers.QueryBuilder; import com.redhat.gss.redhat_support_lib.parsers.CaseType; import java.net.MalformedURLException; import java.util.ArrayList; im... | import com.redhat.gss.redhat_support_lib.errors.*; import com.redhat.gss.redhat_support_lib.helpers.*; import com.redhat.gss.redhat_support_lib.parsers.*; import java.net.*; import java.util.*; | [
"com.redhat.gss",
"java.net",
"java.util"
] | com.redhat.gss; java.net; java.util; | 2,704,332 |
public void unPublishPort() {
// unregister with epmd
OtpEpmd.unPublishPort(this);
// close the local descriptor (if we have one)
try {
if (super.epmd != null) {
super.epmd.close();
}
} catch (final IOException e) {
}
super.epmd = null;
} | void function() { OtpEpmd.unPublishPort(this); try { if (super.epmd != null) { super.epmd.close(); } } catch (final IOException e) { } super.epmd = null; } | /**
* Unregister the server node's name and port number from the Erlang port
* mapper, thus preventing any new connections from remote nodes.
*/ | Unregister the server node's name and port number from the Erlang port mapper, thus preventing any new connections from remote nodes | unPublishPort | {
"repo_name": "racker/omnibus",
"path": "source/otp_src_R14B02/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpSelf.java",
"license": "apache-2.0",
"size": 7029
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 860,727 |
CompletionProposalsResource streamCompletions(String prefix, int levelOfDetail); | CompletionProposalsResource streamCompletions(String prefix, int levelOfDetail); | /**
* Return the list of streamCompletions that are compatible with the given DSL prefix.
*
* @param levelOfDetail 1 based integer allowing progressive disclosure of more and more
* complex streamCompletions
*/ | Return the list of streamCompletions that are compatible with the given DSL prefix | streamCompletions | {
"repo_name": "frosenberg/spring-cloud-dataflow",
"path": "spring-cloud-dataflow-rest-client/src/main/java/org/springframework/cloud/dataflow/rest/client/CompletionOperations.java",
"license": "apache-2.0",
"size": 1224
} | [
"org.springframework.cloud.dataflow.rest.resource.CompletionProposalsResource"
] | import org.springframework.cloud.dataflow.rest.resource.CompletionProposalsResource; | import org.springframework.cloud.dataflow.rest.resource.*; | [
"org.springframework.cloud"
] | org.springframework.cloud; | 570,618 |
private void loadMapBottom(Settings settings, StageConfig config, Media media, Optional<String> raster)
{
final Media bottomRip = Medias.create(media.getPath().replace(Extension.MAP, MAP_BOTTOM + Extension.IMAGE));
final Media bottom = Medias.create(media.getPath().replace(Extension.MAP, MAP_... | void function(Settings settings, StageConfig config, Media media, Optional<String> raster) { final Media bottomRip = Medias.create(media.getPath().replace(Extension.MAP, MAP_BOTTOM + Extension.IMAGE)); final Media bottom = Medias.create(media.getPath().replace(Extension.MAP, MAP_BOTTOM + Extension.MAP)); if (bottom.exi... | /**
* Load map bottom part.
*
* @param settings The settings reference.
* @param config The stage config.
* @param media The media reference.
* @param raster The raster reference.
*/ | Load map bottom part | loadMapBottom | {
"repo_name": "b3dgs/lionheart-remake",
"path": "lionheart-game/src/main/java/com/b3dgs/lionheart/World.java",
"license": "gpl-3.0",
"size": 36167
} | [
"com.b3dgs.lionengine.Media",
"com.b3dgs.lionengine.Medias",
"com.b3dgs.lionengine.game.feature.LayerableModel",
"com.b3dgs.lionengine.game.feature.tile.map.MapTileGame",
"com.b3dgs.lionengine.game.feature.tile.map.MapTileGroupModel",
"com.b3dgs.lionengine.game.feature.tile.map.TileSheetsConfig",
"com.b... | import com.b3dgs.lionengine.Media; import com.b3dgs.lionengine.Medias; import com.b3dgs.lionengine.game.feature.LayerableModel; import com.b3dgs.lionengine.game.feature.tile.map.MapTileGame; import com.b3dgs.lionengine.game.feature.tile.map.MapTileGroupModel; import com.b3dgs.lionengine.game.feature.tile.map.TileSheets... | import com.b3dgs.lionengine.*; import com.b3dgs.lionengine.game.feature.*; import com.b3dgs.lionengine.game.feature.tile.map.*; import com.b3dgs.lionengine.game.feature.tile.map.collision.*; import com.b3dgs.lionengine.game.feature.tile.map.raster.*; import com.b3dgs.lionengine.game.feature.tile.map.viewer.*; import co... | [
"com.b3dgs.lionengine",
"com.b3dgs.lionheart",
"java.util"
] | com.b3dgs.lionengine; com.b3dgs.lionheart; java.util; | 1,193,348 |
public int compareTo(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2,
int length2) {
// Short circuit equal case
if (buffer1 == buffer2 && offset1 == offset2 && length1 == length2) {
return 0;
}
int minLength = Math.min(length1, length2);
int minWo... | int function(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2) { if (buffer1 == buffer2 && offset1 == offset2 && length1 == length2) { return 0; } int minLength = Math.min(length1, length2); int minWords = minLength / SIZEOF_LONG; int offset1Adj = offset1 + CarbonUnsafe.BYTE_ARRAY_OFFS... | /**
* Lexicographically compare two arrays.
*
* @param buffer1 left operand
* @param buffer2 right operand
* @param offset1 Where to start comparing in the left buffer
* @param offset2 Where to start comparing in the right buffer
* @param length1 How much to compare from the left buff... | Lexicographically compare two arrays | compareTo | {
"repo_name": "zzcclp/carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/util/ByteUtil.java",
"license": "apache-2.0",
"size": 23899
} | [
"org.apache.carbondata.core.memory.CarbonUnsafe"
] | import org.apache.carbondata.core.memory.CarbonUnsafe; | import org.apache.carbondata.core.memory.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 1,634,423 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.