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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Operation setMetadata(String zone, String instance, Metadata metadata, Map<Option, ?> options); | Operation setMetadata(String zone, String instance, Metadata metadata, Map<Option, ?> options); | /**
* Sets the metadata for the provided instance.
*
* @return a zone operation if the set request was issued correctly, {@code null} if the instance
* was not found
* @throws ComputeException upon failure
*/ | Sets the metadata for the provided instance | setMetadata | {
"repo_name": "mbrukman/gcloud-java",
"path": "google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/spi/v1/ComputeRpc.java",
"license": "apache-2.0",
"size": 20843
} | [
"com.google.api.services.compute.model.Metadata",
"com.google.api.services.compute.model.Operation",
"java.util.Map"
] | import com.google.api.services.compute.model.Metadata; import com.google.api.services.compute.model.Operation; import java.util.Map; | import com.google.api.services.compute.model.*; import java.util.*; | [
"com.google.api",
"java.util"
] | com.google.api; java.util; | 1,031,707 |
@Test
public void testWithTextNode() {
ITextNode textNode = new XMLTextNode("key1", "context1");
textNode.addValueNode(new XMLValueNode("de", Status.INITIAL, "value1"));
textNode.addValueNode(new XMLValueNode("en", Status.INITIAL, "value2"));
LanguageValidator validator = new LanguageValidator(textN... | void function() { ITextNode textNode = new XMLTextNode("key1", STR); textNode.addValueNode(new XMLValueNode("de", Status.INITIAL, STR)); textNode.addValueNode(new XMLValueNode("en", Status.INITIAL, STR)); LanguageValidator validator = new LanguageValidator(textNode); Assert.assertNull(validator.isValid("it")); Assert.a... | /**
* Tests the LanguageValidator.
*/ | Tests the LanguageValidator | testWithTextNode | {
"repo_name": "netceteragroup/trema-eclipse",
"path": "com.netcetera.trema.eclipse.plugin.test/src/main/java/com/netcetera/trema/eclipse/validators/LanguageValidatorTest.java",
"license": "mit",
"size": 1770
} | [
"com.netcetera.trema.core.Status",
"com.netcetera.trema.core.XMLTextNode",
"com.netcetera.trema.core.XMLValueNode",
"com.netcetera.trema.core.api.ITextNode",
"org.junit.Assert"
] | import com.netcetera.trema.core.Status; import com.netcetera.trema.core.XMLTextNode; import com.netcetera.trema.core.XMLValueNode; import com.netcetera.trema.core.api.ITextNode; import org.junit.Assert; | import com.netcetera.trema.core.*; import com.netcetera.trema.core.api.*; import org.junit.*; | [
"com.netcetera.trema",
"org.junit"
] | com.netcetera.trema; org.junit; | 142,888 |
public static void showWelcome() {
if (System.currentTimeMillis() - lastLogin >= 100
&& Data.get("shownWelcome") == null
&& Main.mc.currentScreen == null) {
Tutorial.build();
}
}
| static void function() { if (System.currentTimeMillis() - lastLogin >= 100 && Data.get(STR) == null && Main.mc.currentScreen == null) { Tutorial.build(); } } | /**
* Shows the tutorial screen.
*/ | Shows the tutorial screen | showWelcome | {
"repo_name": "NomNuggetNom/mcpvp-mod",
"path": "src/main/java/us/mcpvpmod/events/join/AllJoin.java",
"license": "gpl-3.0",
"size": 3393
} | [
"us.mcpvpmod.Main",
"us.mcpvpmod.data.Data",
"us.mcpvpmod.gui.tutorial.Tutorial"
] | import us.mcpvpmod.Main; import us.mcpvpmod.data.Data; import us.mcpvpmod.gui.tutorial.Tutorial; | import us.mcpvpmod.*; import us.mcpvpmod.data.*; import us.mcpvpmod.gui.tutorial.*; | [
"us.mcpvpmod",
"us.mcpvpmod.data",
"us.mcpvpmod.gui"
] | us.mcpvpmod; us.mcpvpmod.data; us.mcpvpmod.gui; | 755,413 |
if (attributes == null)
attributes = new HashMap<String,String>();
attributes.put(name, value);
} | if (attributes == null) attributes = new HashMap<String,String>(); attributes.put(name, value); } | /**
* Add an attribute to this node, replacing any existing attribute
* with the same name.
*
* @param name The attribute name to add
* @param value The new attribute value
*/ | Add an attribute to this node, replacing any existing attribute with the same name | addAttribute | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/TreeNode.java",
"license": "mit",
"size": 8369
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,376,207 |
@Test
public void testInitiateUploadSingleAssertTargetStorageKmsKeyIdRequired()
{
// Create database entities required for testing.
uploadDownloadServiceTestHelper.createDatabaseEntitiesForUploadDownloadTesting();
StorageEntity storageEntity = storageDaoTestHelper.createStorageEntity... | void function() { uploadDownloadServiceTestHelper.createDatabaseEntitiesForUploadDownloadTesting(); StorageEntity storageEntity = storageDaoTestHelper.createStorageEntity(STORAGE_NAME_3); storageEntity.getAttributes().add(storageDaoTestHelper .createStorageAttributeEntity(storageEntity, configurationHelper.getProperty(... | /**
* Asserts that error is thrown when target storage's kms kms id is not set.
*/ | Asserts that error is thrown when target storage's kms kms id is not set | testInitiateUploadSingleAssertTargetStorageKmsKeyIdRequired | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-service/src/test/java/org/finra/herd/service/UploadDownloadServiceTest.java",
"license": "apache-2.0",
"size": 117267
} | [
"org.finra.herd.model.api.xml.UploadSingleInitiationRequest",
"org.finra.herd.model.dto.ConfigurationValue",
"org.finra.herd.model.jpa.StorageEntity",
"org.junit.Assert"
] | import org.finra.herd.model.api.xml.UploadSingleInitiationRequest; import org.finra.herd.model.dto.ConfigurationValue; import org.finra.herd.model.jpa.StorageEntity; import org.junit.Assert; | import org.finra.herd.model.api.xml.*; import org.finra.herd.model.dto.*; import org.finra.herd.model.jpa.*; import org.junit.*; | [
"org.finra.herd",
"org.junit"
] | org.finra.herd; org.junit; | 694,029 |
public void initialize() throws Exception {
logger.info("Attempting to initialize resource.");
Resource resource = find(null);
if (resource == null) {
logger.error("Unable to initialize resource!");
} else {
logger.info("Successfully initialized resource.");
}
}
| void function() throws Exception { logger.info(STR); Resource resource = find(null); if (resource == null) { logger.error(STR); } else { logger.info(STR); } } | /**
* Initialze the singleton resource, when the home is initialized.
*/ | Initialze the singleton resource, when the home is initialized | initialize | {
"repo_name": "NCIP/labviewer",
"path": "LabLoader-1.3/src/gov/nih/nci/cagrid/labviewer/service/globus/resource/LabLoaderResourceHome.java",
"license": "bsd-3-clause",
"size": 3189
} | [
"org.globus.wsrf.Resource"
] | import org.globus.wsrf.Resource; | import org.globus.wsrf.*; | [
"org.globus.wsrf"
] | org.globus.wsrf; | 2,020,431 |
public void setSaturation(float value) {
colorizerMatrix.setSaturation(value);
ColorMatrixColorFilter colorizerFilter = new ColorMatrixColorFilter(colorizerMatrix);
mViewPager.getBackground().setColorFilter(colorizerFilter);
} | void function(float value) { colorizerMatrix.setSaturation(value); ColorMatrixColorFilter colorizerFilter = new ColorMatrixColorFilter(colorizerMatrix); mViewPager.getBackground().setColorFilter(colorizerFilter); } | /**
* This is called by the colorizing animator. It sets a saturation factor that is then
* passed onto a filter on the picture's drawable.
*
* @param value saturation
*/ | This is called by the colorizing animator. It sets a saturation factor that is then passed onto a filter on the picture's drawable | setSaturation | {
"repo_name": "xyzmst/PhotoPicker",
"path": "PhotoPicker/src/main/java/me/iwf/photopicker/fragment/ImagePagerFragment.java",
"license": "apache-2.0",
"size": 11336
} | [
"android.graphics.ColorMatrixColorFilter"
] | import android.graphics.ColorMatrixColorFilter; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,898,619 |
public static boolean pathHasSnapshotSubDir(Path p, FileSystem fs) throws IOException {
// Hadoop is missing a public API to check for snapshotable directories. Check with the directory name
// until a more appropriate API is provided by HDFS-12257.
final FileStatus[] statuses = fs.listStatus(p, FileUtils... | static boolean function(Path p, FileSystem fs) throws IOException { final FileStatus[] statuses = fs.listStatus(p, FileUtils.SNAPSHOT_DIR_PATH_FILTER); return statuses != null && statuses.length != 0; } | /**
* Check if the path contains a subdirectory named '.snapshot'
* @param p path to check
* @param fs filesystem of the path
* @return true if p contains a subdirectory named '.snapshot'
* @throws IOException
*/ | Check if the path contains a subdirectory named '.snapshot' | pathHasSnapshotSubDir | {
"repo_name": "alanfgates/hive",
"path": "standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/FileUtils.java",
"license": "apache-2.0",
"size": 21503
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,524,043 |
@Test
public void testWriteFlushRequestMarker() throws IOException {
// primary region is empty at this point. Request a flush with writeFlushRequestWalMarker=false
FlushResultImpl result = primaryRegion.flushcache(true, false, FlushLifeCycleTracker.DUMMY);
assertNotNull(result);
assertEquals(FlushR... | void function() throws IOException { FlushResultImpl result = primaryRegion.flushcache(true, false, FlushLifeCycleTracker.DUMMY); assertNotNull(result); assertEquals(FlushResultImpl.Result.CANNOT_FLUSH_MEMSTORE_EMPTY, result.result); assertFalse(result.wroteFlushWalMarker); result = primaryRegion.flushcache(true, true,... | /**
* Tests the case where a request for flush cache is sent to the region, but region cannot flush.
* It should write the flush request marker instead.
*/ | Tests the case where a request for flush cache is sent to the region, but region cannot flush. It should write the flush request marker instead | testWriteFlushRequestMarker | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionReplayEvents.java",
"license": "apache-2.0",
"size": 69815
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.regionserver.HRegion",
"org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos",
"org.apache.hadoop.hbase.wal.WALEdit",
"org.apache.hbase.thirdparty.com.google.common.collect.Lists",
"org.junit.Assert"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.shaded.protobuf.generated.WALProtos; import org.apache.hadoop.hbase.wal.WALEdit; import org.apache.hbase.thirdparty.com.google.common.collect.Lists; import org.junit.Assert; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*; import org.apache.hadoop.hbase.wal.*; import org.apache.hbase.thirdparty.com.google.common.collect.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.hbase",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.apache.hbase; org.junit; | 164,065 |
try {
if (purpose.equals(ServerLayout.WEBSTART_JNLP_PURPOSE_CODEBLOCKS)) {
// see if we can avoid sending the content again
if (ModifiedHeaders.notModified(req)) {
resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return;
}
// Create jnlp file and send... | try { if (purpose.equals(ServerLayout.WEBSTART_JNLP_PURPOSE_CODEBLOCKS)) { if (ModifiedHeaders.notModified(req)) { resp.setStatus(HttpServletResponse.SC_NOT_MODIFIED); return; } String jnlp = prepareJnlpForJsonpServer(req, "1.5+", "925m", ResourceUtil.CODEBLOCKS_JAR, ResourceUtil.CODEBLOCKS_MAIN, STR, STR); ModifiedHea... | /**
* {@inheritDoc}
*
* The purpose parameter must be one of the following values:
* <ul>
* <li>{@link ServerLayout#WEBSTART_JNLP_PURPOSE_CODEBLOCKS}</li>
* </ul>
*/ | The purpose parameter must be one of the following values: <code>ServerLayout#WEBSTART_JNLP_PURPOSE_CODEBLOCKS</code> | sendJnlpFile | {
"repo_name": "yflou520/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/server/project/youngandroid/YoungAndroidWebStartSupport.java",
"license": "apache-2.0",
"size": 9885
} | [
"com.google.appinventor.server.CrashReport",
"com.google.appinventor.server.encryption.EncryptionException",
"com.google.appinventor.server.util.ModifiedHeaders",
"com.google.appinventor.server.util.ResourceUtil",
"com.google.appinventor.shared.rpc.ServerLayout",
"com.google.common.base.Charsets",
"java... | import com.google.appinventor.server.CrashReport; import com.google.appinventor.server.encryption.EncryptionException; import com.google.appinventor.server.util.ModifiedHeaders; import com.google.appinventor.server.util.ResourceUtil; import com.google.appinventor.shared.rpc.ServerLayout; import com.google.common.base.C... | import com.google.appinventor.server.*; import com.google.appinventor.server.encryption.*; import com.google.appinventor.server.util.*; import com.google.appinventor.shared.rpc.*; import com.google.common.base.*; import java.io.*; import javax.servlet.http.*; | [
"com.google.appinventor",
"com.google.common",
"java.io",
"javax.servlet"
] | com.google.appinventor; com.google.common; java.io; javax.servlet; | 902,015 |
void serviceFailed(DiscoveryEvent event) throws IOException; | void serviceFailed(DiscoveryEvent event) throws IOException; | /**
* A process actively using a service may see it go down before the DiscoveryAgent notices the
* service's failure. That process can use this method to notify the DiscoveryAgent of the failure
* so that other listeners of this DiscoveryAgent can also be made aware of the failure.
*/ | A process actively using a service may see it go down before the DiscoveryAgent notices the service's failure. That process can use this method to notify the DiscoveryAgent of the failure so that other listeners of this DiscoveryAgent can also be made aware of the failure | serviceFailed | {
"repo_name": "christian-posta/activemq-apollo-java-port",
"path": "apollo-broker/src/main/java/org/apache/activemq/apollo/broker/transport/DiscoveryAgent.java",
"license": "apache-2.0",
"size": 1850
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,439,432 |
throw new IOException("write(" + b + ") failed: stream is closed");
} | throw new IOException(STR + b + STR); } | /**
* Throws an {@link IOException} to indicate that the stream is closed.
*
* @param b ignored
* @throws IOException always thrown
*/ | Throws an <code>IOException</code> to indicate that the stream is closed | write | {
"repo_name": "copyliu/Spoutcraft_CJKPatch",
"path": "src/minecraft/org/apache/commons/io/output/ClosedOutputStream.java",
"license": "lgpl-3.0",
"size": 1787
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,037,900 |
public JSONObject put(String key, Map<?, ?> value) throws JSONException {
this.put(key, new JSONObject(value));
return this;
} | JSONObject function(String key, Map<?, ?> value) throws JSONException { this.put(key, new JSONObject(value)); return this; } | /**
* Put a key/value pair in the JSONObject, where the value will be a
* JSONObject which is produced from a Map.
*
* @param key
* A key string.
* @param value
* A Map value.
* @return this.
* @throws JSONException
*/ | Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map | put | {
"repo_name": "gravitee-io/gravitee-policy-mock",
"path": "src/main/java/io/gravitee/policy/mock/json/JSONObject.java",
"license": "apache-2.0",
"size": 63311
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,511,598 |
@Temporal(TemporalType.TIMESTAMP)
@Column(
name = "creationtime",
nullable = false,
length = 29
)
public Date getCreationtime() {
return this.creationtime;
} | @Temporal(TemporalType.TIMESTAMP) @Column( name = STR, nullable = false, length = 29 ) Date function() { return this.creationtime; } | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getCreationtime | {
"repo_name": "cismet/report-api",
"path": "src/main/java/de/cismet/projecttracker/report/db/entities/Report.java",
"license": "lgpl-3.0",
"size": 7594
} | [
"java.util.Date",
"javax.persistence.Column",
"javax.persistence.Temporal",
"javax.persistence.TemporalType"
] | import java.util.Date; import javax.persistence.Column; import javax.persistence.Temporal; import javax.persistence.TemporalType; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 1,016,215 |
public boolean deleteProduct(int id) {
try {
return new AsyncDelete().execute(id).get();
} catch (InterruptedException e) {
Log.e(tag, e.getClass() + " " + e.getMessage());
} catch (ExecutionException e) {
Log.e(tag, e.getClass() + " " + e.getMessage());
}
return false;
} | boolean function(int id) { try { return new AsyncDelete().execute(id).get(); } catch (InterruptedException e) { Log.e(tag, e.getClass() + " " + e.getMessage()); } catch (ExecutionException e) { Log.e(tag, e.getClass() + " " + e.getMessage()); } return false; } | /**
* Deletes a product based on the id.
*
* @param id
* the id of the product to delete
* @return if the operation was successful or not
*/ | Deletes a product based on the id | deleteProduct | {
"repo_name": "GabrielGhe/AndroidApp-PHPSite",
"path": "AndroidLibraryApp/src/cs534/team3/phase1/database/AsyncDBHelper.java",
"license": "mit",
"size": 6486
} | [
"android.util.Log",
"java.util.concurrent.ExecutionException"
] | import android.util.Log; import java.util.concurrent.ExecutionException; | import android.util.*; import java.util.concurrent.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 2,309,592 |
void unloadZowns(World world); | void unloadZowns(World world); | /**
* Unloads the Zowns for the specified World. Does not automatically save the Zowns.
*
* @param world The World.
*/ | Unloads the Zowns for the specified World. Does not automatically save the Zowns | unloadZowns | {
"repo_name": "toddharrison/Zown",
"path": "src/main/java/com/goodformentertainment/canary/zown/api/IZownManager.java",
"license": "apache-2.0",
"size": 4298
} | [
"net.canarymod.api.world.World"
] | import net.canarymod.api.world.World; | import net.canarymod.api.world.*; | [
"net.canarymod.api"
] | net.canarymod.api; | 262,996 |
private void reconnectChronosServer() throws IOException {
LOG.info("Try to reconnect chronos server");
if (transport != null) {
transport.close();
}
connectChronosServer();
} | void function() throws IOException { LOG.info(STR); if (transport != null) { transport.close(); } connectChronosServer(); } | /**
* Reconnect with ChronosServer.
*
* @throws IOException when error to connect ChronosServer
*/ | Reconnect with ChronosServer | reconnectChronosServer | {
"repo_name": "XiaoMi/chronos",
"path": "chronos-client/src/main/java/com/xiaomi/infra/chronos/client/ChronosClientWatcher.java",
"license": "apache-2.0",
"size": 8701
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 471,651 |
//------------------------------------------------------------------------------
// Method: LogFileHandle.becomeInactive
//------------------------------------------------------------------------------
void becomeInactive() throws InternalLogException {
if (tc.isEntryEnabled())
Tr.e... | void becomeInactive() throws InternalLogException { if (tc.isEntryEnabled()) Tr.entry(tc, STR, this); _logFileHeader.changeStatus(LogFileHeader.STATUS_INACTIVE); try { writeFileStatus(false); } catch (InternalLogException exc) { FFDCFilter.processException(exc, STR, "1161", this); if (tc.isEntryEnabled()) Tr.exit(tc, S... | /**
* This method is invoked to inform the LogFileHandle instance that the file
* it manages is no longer required by the recovery log serivce. The status
* field stored in the header is updated to INACTIVE.
*
* @exception InternalLogException An unexpected error has occured.
*/ | This method is invoked to inform the LogFileHandle instance that the file it manages is no longer required by the recovery log serivce. The status field stored in the header is updated to INACTIVE | becomeInactive | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/LogFileHandle.java",
"license": "epl-1.0",
"size": 63719
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.ws.ffdc.FFDCFilter"
] | import com.ibm.websphere.ras.Tr; import com.ibm.ws.ffdc.FFDCFilter; | import com.ibm.websphere.ras.*; import com.ibm.ws.ffdc.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 1,835,522 |
private void test( String testName, String stringToSplit, boolean isDelimiterRegex, String delimiter,
String delimiterVariableValue, String[] expectedResult ) {
List<RowMetaAndData> result = splitFieldToRows( testName, stringToSplit, isDelimiterRegex, delimiter, delimiterVariableValue );
assertDataEqual... | void function( String testName, String stringToSplit, boolean isDelimiterRegex, String delimiter, String delimiterVariableValue, String[] expectedResult ) { List<RowMetaAndData> result = splitFieldToRows( testName, stringToSplit, isDelimiterRegex, delimiter, delimiterVariableValue ); assertDataEquals( expectedResult, r... | /**
* Execute a test with the passed parameters.
*
* @param testName
* @param stringToSplit
* @param isDelimiterRegex
* @param delimiter
* @param delimiterVariableValue - Should be null if {@code delimiter} is not variable
* @param expectedResult
* @throws Exception
*/ | Execute a test with the passed parameters | test | {
"repo_name": "AliaksandrShuhayeu/pentaho-kettle",
"path": "integration/src/it/java/org/pentaho/di/trans/steps/splitfieldtorows/SplitFieldToRowsIT.java",
"license": "apache-2.0",
"size": 11519
} | [
"java.util.List",
"org.pentaho.di.core.RowMetaAndData"
] | import java.util.List; import org.pentaho.di.core.RowMetaAndData; | import java.util.*; import org.pentaho.di.core.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 194,457 |
public static void recomputeSSA(IR ir) {
// Use register /ist to enumerate register objects (FAST)
for (Register reg = ir.regpool.getFirstSymbolicRegister(); reg != null; reg = reg.getNext()) {
// Set isSSA = true iff reg has exactly one static definition.
reg.putSSA((reg.defList != null && reg.de... | static void function(IR ir) { for (Register reg = ir.regpool.getFirstSymbolicRegister(); reg != null; reg = reg.getNext()) { reg.putSSA((reg.defList != null && reg.defList.getNext() == null)); } } | /**
* Recompute <code> isSSA </code> for all registers by traversing register
* list.
* NOTE: the DU MUST be computed BEFORE calling this function
*
* @param ir the IR in question
*/ | Recompute <code> isSSA </code> for all registers by traversing register list | recomputeSSA | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/compilers/opt/DefUse.java",
"license": "bsd-3-clause",
"size": 15595
} | [
"org.jikesrvm.compilers.opt.ir.Register"
] | import org.jikesrvm.compilers.opt.ir.Register; | import org.jikesrvm.compilers.opt.ir.*; | [
"org.jikesrvm.compilers"
] | org.jikesrvm.compilers; | 2,601,322 |
@Override
public void onCheckedChanged(CompoundButton switchView, boolean isChecked) {
if (!isResumed()) {
// very important, setChecked(...) is called automatically during
// Fragment recreation on device rotations
return;
}
... | void function(CompoundButton switchView, boolean isChecked) { if (!isResumed()) { return; } if (mCapabilities.getFilesFileDrop().isTrue()) { ((FileActivity) getActivity()).getFileOperationsHelper(). setHideFileListingPermissionsToShare( mPublicShare, isChecked ); } else { Snackbar.make(getView(), R.string.files_drop_no... | /**
* Called by R.id.shareViaLinkHideListPermissionSwitch to set or clear the edit permission.
*
* @param switchView {@link SwitchCompat} toggled by the user, R.id.shareViaLinkHideListPermissionSwitch
* @param isChecked New switch state.
*/ | Called by R.id.shareViaLinkHideListPermissionSwitch to set or clear the edit permission | onCheckedChanged | {
"repo_name": "SpryServers/sprycloud-android",
"path": "src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java",
"license": "gpl-2.0",
"size": 39010
} | [
"android.widget.CompoundButton",
"com.google.android.material.snackbar.Snackbar",
"com.owncloud.android.ui.activity.FileActivity",
"com.owncloud.android.utils.DisplayUtils"
] | import android.widget.CompoundButton; import com.google.android.material.snackbar.Snackbar; import com.owncloud.android.ui.activity.FileActivity; import com.owncloud.android.utils.DisplayUtils; | import android.widget.*; import com.google.android.material.snackbar.*; import com.owncloud.android.ui.activity.*; import com.owncloud.android.utils.*; | [
"android.widget",
"com.google.android",
"com.owncloud.android"
] | android.widget; com.google.android; com.owncloud.android; | 411,810 |
public JsonNode getIssue(String issueId); | JsonNode function(String issueId); | /**
* Get Issue from JIRA
*
* @param issueId
* @return RemoteIssue or throw exception
*/ | Get Issue from JIRA | getIssue | {
"repo_name": "jbossorg/jive-jira",
"path": "src/main/java/org/jboss/community/sbs/plugin/jira/RemoteJiraManager.java",
"license": "apache-2.0",
"size": 1384
} | [
"com.fasterxml.jackson.databind.JsonNode"
] | import com.fasterxml.jackson.databind.JsonNode; | import com.fasterxml.jackson.databind.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,576,249 |
public static <T, R> Collection<R> doInParallelUninterruptibly(
int parallelismLvl,
ExecutorService executorSvc,
Collection<T> srcDatas,
IgniteThrowableFunction<T, R> operation
) throws IgniteCheckedException, IgniteInterruptedCheckedException {
return doInParallel(parall... | static <T, R> Collection<R> function( int parallelismLvl, ExecutorService executorSvc, Collection<T> srcDatas, IgniteThrowableFunction<T, R> operation ) throws IgniteCheckedException, IgniteInterruptedCheckedException { return doInParallel(parallelismLvl, executorSvc, srcDatas, operation, true); } | /**
* Execute operation on data in parallel uninterruptibly.
*
* @param parallelismLvl Number of threads on which it should be executed.
* @param executorSvc Service for parallel execution.
* @param srcDatas List of data for parallelization.
* @param operation Logic for execution of on eac... | Execute operation on data in parallel uninterruptibly | doInParallelUninterruptibly | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 374177
} | [
"java.util.Collection",
"java.util.concurrent.ExecutorService",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.IgniteInterruptedCheckedException",
"org.apache.ignite.internal.util.lang.IgniteThrowableFunction"
] | import java.util.Collection; import java.util.concurrent.ExecutorService; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.IgniteInterruptedCheckedException; import org.apache.ignite.internal.util.lang.IgniteThrowableFunction; | import java.util.*; import java.util.concurrent.*; import org.apache.ignite.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.lang.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 211,512 |
Observable<DatabasisDatabaseAccountMetricDefinition> listMetricDefinitionsAsync(String resourceGroupName, String accountName, String databaseRid); | Observable<DatabasisDatabaseAccountMetricDefinition> listMetricDefinitionsAsync(String resourceGroupName, String accountName, String databaseRid); | /**
* Retrieves metric definitions for the given database.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param databaseRid Cosmos DB database rid.
* @throws IllegalArgumentException thrown if parameters fail the valid... | Retrieves metric definitions for the given database | listMetricDefinitionsAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_03_01/Databases.java",
"license": "mit",
"size": 2573
} | [
"com.microsoft.azure.management.cosmosdb.v2020_03_01.DatabasisDatabaseAccountMetricDefinition"
] | import com.microsoft.azure.management.cosmosdb.v2020_03_01.DatabasisDatabaseAccountMetricDefinition; | import com.microsoft.azure.management.cosmosdb.v2020_03_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,604,344 |
void close() throws HiveSQLException; | void close() throws HiveSQLException; | /**
* close the session
* @throws HiveSQLException
*/ | close the session | close | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "service/src/java/org/apache/hive/service/cli/session/HiveSession.java",
"license": "apache-2.0",
"size": 6281
} | [
"org.apache.hive.service.cli.HiveSQLException"
] | import org.apache.hive.service.cli.HiveSQLException; | import org.apache.hive.service.cli.*; | [
"org.apache.hive"
] | org.apache.hive; | 2,883,454 |
public NinePatch getToggleButtonIcon_CheckedGreen()
{
return getRaw(IMGS_ROOT+"/toggle_button_selected.9.png");
}
| NinePatch function() { return getRaw(IMGS_ROOT+STR); } | /**
* Gets the toggle button icon_ checked green.
*
* @return the toggle button icon_ checked green
*/ | Gets the toggle button icon_ checked green | getToggleButtonIcon_CheckedGreen | {
"repo_name": "xiruibing/beautyeye",
"path": "src_all/beautyeye_v3.6_utf8/src/org/jb2011/lnf/beautyeye/ch3_button/__Icon9Factory__.java",
"license": "apache-2.0",
"size": 3755
} | [
"org.jb2011.ninepatch4j.NinePatch"
] | import org.jb2011.ninepatch4j.NinePatch; | import org.jb2011.ninepatch4j.*; | [
"org.jb2011.ninepatch4j"
] | org.jb2011.ninepatch4j; | 899,497 |
@BeanProperty(bound = false, preferred = true, description
= "The amount of the view that is currently visible.")
public void setVisibleAmount(int extent) {
getModel().setExtent(extent);
} | @BeanProperty(bound = false, preferred = true, description = STR) void function(int extent) { getModel().setExtent(extent); } | /**
* Set the model's extent property.
*
* @see #getVisibleAmount
* @see BoundedRangeModel#setExtent
*/ | Set the model's extent property | setVisibleAmount | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JScrollBar.java",
"license": "apache-2.0",
"size": 31216
} | [
"java.beans.BeanProperty"
] | import java.beans.BeanProperty; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,634,752 |
public String[] getMultiStringValue(long hive, String subkey, String value) throws Exception {
Element defKey = doc.createElementNS(CLASS_URI, "hDefKey");
defKey.setTextContent(Long.toString(hive));
Element subKeyName = doc.createElementNS(CLASS_URI, "sSubKeyName");
subKeyName.setTextContent(subkey);
Elem... | String[] function(long hive, String subkey, String value) throws Exception { Element defKey = doc.createElementNS(CLASS_URI, STR); defKey.setTextContent(Long.toString(hive)); Element subKeyName = doc.createElementNS(CLASS_URI, STR); subKeyName.setTextContent(subkey); Element valueName = doc.createElementNS(CLASS_URI, S... | /**
* Get a REG_MULTI_SZ value from the registry.
*/ | Get a REG_MULTI_SZ value from the registry | getMultiStringValue | {
"repo_name": "joval/jWSMV",
"path": "src/jwsmv/cim/StdRegProv.java",
"license": "agpl-3.0",
"size": 18542
} | [
"java.util.NoSuchElementException",
"org.w3c.dom.Element",
"org.w3c.dom.NodeList"
] | import java.util.NoSuchElementException; import org.w3c.dom.Element; import org.w3c.dom.NodeList; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 2,754,701 |
public synchronized void add(String name, long value) {
MutableMetric m = metricsMap.get(name);
if (m != null) {
if (m instanceof MutableStat) {
((MutableStat) m).add(value);
}
else {
throw new MetricsException("Unsupported add(value) for metric "+ name);
}
}
e... | synchronized void function(String name, long value) { MutableMetric m = metricsMap.get(name); if (m != null) { if (m instanceof MutableStat) { ((MutableStat) m).add(value); } else { throw new MetricsException(STR+ name); } } else { metricsMap.put(name, newRate(name)); add(name, value); } } | /**
* Add sample to a stat metric by name.
* @param name of the metric
* @param value of the snapshot to add
*/ | Add sample to a stat metric by name | add | {
"repo_name": "simonzhangsm/WDP",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MetricsRegistry.java",
"license": "gpl-2.0",
"size": 12808
} | [
"org.apache.hadoop.metrics2.MetricsException"
] | import org.apache.hadoop.metrics2.MetricsException; | import org.apache.hadoop.metrics2.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,910,309 |
public TrimResult trimFields(
Filter filter,
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
final RelDataType rowType = filter.getRowType();
final int fieldCount = rowType.getFieldCount();
final RexNode conditionExpr = filter.getCondition();
final RelNode input = fi... | TrimResult function( Filter filter, ImmutableBitSet fieldsUsed, Set<RelDataTypeField> extraFields) { final RelDataType rowType = filter.getRowType(); final int fieldCount = rowType.getFieldCount(); final RexNode conditionExpr = filter.getCondition(); final RelNode input = filter.getInput(); final Set<RelDataTypeField> ... | /**
* Variant of {@link #trimFields(RelNode, ImmutableBitSet, Set)} for
* {@link org.apache.calcite.rel.logical.LogicalFilter}.
*/ | Variant of <code>#trimFields(RelNode, ImmutableBitSet, Set)</code> for <code>org.apache.calcite.rel.logical.LogicalFilter</code> | trimFields | {
"repo_name": "googleinterns/calcite",
"path": "core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java",
"license": "apache-2.0",
"size": 46033
} | [
"java.util.LinkedHashSet",
"java.util.Set",
"org.apache.calcite.plan.RelOptUtil",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.core.Filter",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rel.type.RelDataTypeField",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.r... | import java.util.LinkedHashSet; import java.util.Set; import org.apache.calcite.plan.RelOptUtil; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.Filter; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.rex.RexNode; i... | import java.util.*; import org.apache.calcite.plan.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; import org.apache.calcite.util.mapping.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 2,785,652 |
public Map<Integer, String> getTaskToComponent() {
return delegate.getTaskToComponent();
} | Map<Integer, String> function() { return delegate.getTaskToComponent(); } | /**
* Gets a map from task id to component id.
*/ | Gets a map from task id to component id | getTaskToComponent | {
"repo_name": "cliffyg/heron",
"path": "heron/storm/src/java/org/apache/storm/task/GeneralTopologyContext.java",
"license": "apache-2.0",
"size": 6013
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 908,707 |
void setHandlers(Map<String, StatisticsServiceEventHandler<?>> handlers);
/**
* Sets the payload to the Resolver class. Before the {@link #resolve()} | void setHandlers(Map<String, StatisticsServiceEventHandler<?>> handlers); /** * Sets the payload to the Resolver class. Before the {@link #resolve()} | /**
* before the processing the Handlers can be added to the resolver via
* spring xml
*
* @param handlers
*/ | before the processing the Handlers can be added to the resolver via spring xml | setHandlers | {
"repo_name": "autermann/iceland",
"path": "statistics/core/src/main/java/org/n52/iceland/statistics/api/interfaces/StatisticsServiceEventResolver.java",
"license": "apache-2.0",
"size": 1395
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,344,927 |
private void readAllParameters(StringTokenizer line){
String new_line,cadena;
StringTokenizer data;
while (line.hasMoreTokens()) { //While there is more parameters...
new_line = line.nextToken();
data = new StringTokenizer(new_line, " = ");
cadena = ... | void function(StringTokenizer line){ String new_line,cadena; StringTokenizer data; while (line.hasMoreTokens()) { new_line = line.nextToken(); data = new StringTokenizer(new_line, STR); cadena = new String(""); while (data.hasMoreTokens()){ cadena = data.nextToken(); } parameters.add(cadena); } } | /**
* We read all the possible parameters of the algorithm
* @param line StringTokenizer It contains all the parameters.
*/ | We read all the possible parameters of the algorithm | readAllParameters | {
"repo_name": "triguero/Keel3.0",
"path": "src/keel/Algorithms/UnsupervisedLearning/AssociationRules/IntervalRuleLearning/MOPNAR/parseParameters.java",
"license": "gpl-3.0",
"size": 6507
} | [
"java.util.StringTokenizer"
] | import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 870,576 |
File outputFile = new File(OUTPUT_LOCATION_BASE);
if (outputFile.exists() && outputFile.isDirectory()) {
deleteDir(outputFile);
outputFile.mkdir();
} else {
outputFile.mkdirs();
}
} | File outputFile = new File(OUTPUT_LOCATION_BASE); if (outputFile.exists() && outputFile.isDirectory()) { deleteDir(outputFile); outputFile.mkdir(); } else { outputFile.mkdirs(); } } | /**
* Make the root output directory
*
* @throws Exception
*/ | Make the root output directory | setUp | {
"repo_name": "apache/axis2-java",
"path": "modules/xmlbeans/test/org/apache/axis2/xmlbeans/WSDL2JavaSuccessTestBase.java",
"license": "apache-2.0",
"size": 11210
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 190,929 |
protected final void buildTheInterface()
{
// we've had to do this here, so that we know we've foudn the chart
addTools();
// retrieve the tools for this interface
final Enumeration<MenuItemInfo> iter = getTools();
while (iter.hasMoreElements())
{
final MenuItemInfo thisItem = iter.next... | final void function() { addTools(); final Enumeration<MenuItemInfo> iter = getTools(); while (iter.hasMoreElements()) { final MenuItemInfo thisItem = iter.nextElement(); addThisTool(thisItem); } getChart().addCursorDblClickedListener(new DblClickEdit(getProperties())); final RightClickEdit rc = new RightClickEdit(getPr... | /**
* <code>buildTheInterface</code> puts the bits together
*/ | <code>buildTheInterface</code> puts the bits together | buildTheInterface | {
"repo_name": "alastrina123/debrief",
"path": "org.mwc.debrief.legacy/src/Debrief/GUI/Views/AnalysisView.java",
"license": "epl-1.0",
"size": 28485
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,040,711 |
public Iterator getGroups() {
synchronized (groups) {
return (groups.iterator());
}
} | Iterator 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/6.0.43/MemoryUser.java",
"license": "mit",
"size": 8691
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 730,785 |
public static String parse(Job job){
String inputParam = job.getInputParam();
//按默认替换
if(StringUtils.isBlank(inputParam)){//如果没有传递参数,则默认取值
String cmdValue=parseDefault(job);
return cmdValue.trim();
}
//append
String command = job.getCommand();
... | static String function(Job job){ String inputParam = job.getInputParam(); if(StringUtils.isBlank(inputParam)){ String cmdValue=parseDefault(job); return cmdValue.trim(); } String command = job.getCommand(); int f$ = command.indexOf(MARK); if(f$<0){ return command.trim()+" "+inputParam.trim(); } return parse2(job); } | /**
* a.sh 1 2 $date 3 $name 5 $jobId $pid
* inputParam=2017-3-4 Lily 21 1111111
* @param job
* @return
*/ | a.sh 1 2 $date 3 $name 5 $jobId $pid inputParam=2017-3-4 Lily 21 1111111 | parse | {
"repo_name": "wolfboys/opencron",
"path": "jobx-server/src/main/java/com/jobxhub/server/util/Parser.java",
"license": "apache-2.0",
"size": 4977
} | [
"com.jobxhub.common.util.StringUtils",
"com.jobxhub.server.dto.Job"
] | import com.jobxhub.common.util.StringUtils; import com.jobxhub.server.dto.Job; | import com.jobxhub.common.util.*; import com.jobxhub.server.dto.*; | [
"com.jobxhub.common",
"com.jobxhub.server"
] | com.jobxhub.common; com.jobxhub.server; | 174,448 |
public ScriptNode createNode(String name, String type, Object properties, String assocType, String assocName)
{
ParameterCheck.mandatoryString("Node Type", type);
ParameterCheck.mandatoryString("Association Type", assocType);
Map<QName, Serializable> props = null;
... | ScriptNode function(String name, String type, Object properties, String assocType, String assocName) { ParameterCheck.mandatoryString(STR, type); ParameterCheck.mandatoryString(STR, assocType); Map<QName, Serializable> props = null; if (properties instanceof ScriptableObject) { props = new HashMap<QName, Serializable>(... | /**
* Create a new Node of the specified type as a child of this node.
*
* Beware: Any unsaved property changes will be lost when this is called. To preserve property changes call {@link #save()} first.
*
* @param name Name of the node to create (can be null for a node without a 'cm:name'... | Create a new Node of the specified type as a child of this node. Beware: Any unsaved property changes will be lost when this is called. To preserve property changes call <code>#save()</code> first | createNode | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/jscript/ScriptNode.java",
"license": "lgpl-3.0",
"size": 153865
} | [
"java.io.Serializable",
"java.util.HashMap",
"java.util.Map",
"org.alfresco.model.ContentModel",
"org.alfresco.service.cmr.repository.ChildAssociationRef",
"org.alfresco.service.namespace.NamespaceService",
"org.alfresco.service.namespace.QName",
"org.alfresco.util.GUID",
"org.mozilla.javascript.Scr... | import java.io.Serializable; import java.util.HashMap; import java.util.Map; import org.alfresco.model.ContentModel; import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.namespace.QName; import org.alfresco.util.GUID; import ... | import java.io.*; import java.util.*; import org.alfresco.model.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; import org.alfresco.util.*; import org.mozilla.javascript.*; import org.springframework.extensions.surf.util.*; | [
"java.io",
"java.util",
"org.alfresco.model",
"org.alfresco.service",
"org.alfresco.util",
"org.mozilla.javascript",
"org.springframework.extensions"
] | java.io; java.util; org.alfresco.model; org.alfresco.service; org.alfresco.util; org.mozilla.javascript; org.springframework.extensions; | 1,281,826 |
public void writeFrame(byte[] frame, long timeStamp) throws IOException {
if (writeIvfHeader) {
mOutputFile.write(makeIvfFrameHeader(frame.length, timeStamp));
}
mOutputFile.write(frame);
mFrameCount++;
} | void function(byte[] frame, long timeStamp) throws IOException { if (writeIvfHeader) { mOutputFile.write(makeIvfFrameHeader(frame.length, timeStamp)); } mOutputFile.write(frame); mFrameCount++; } | /**
* Writes a single encoded VP8 frame with its frame header.
*
* @param frame actual contents of the encoded frame data
* @param timeStamp timestamp of the frame (in accordance to specified timebase)
*/ | Writes a single encoded VP8 frame with its frame header | writeFrame | {
"repo_name": "jingcmu/VP8_H264_HW_ENC_Q_COMPARE",
"path": "AlglApp/src/com/example/alglapp/IvfWriter.java",
"license": "bsd-2-clause",
"size": 6567
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 330,051 |
public Map<String, ?> getAll() {
return preferences.getAll();
} | Map<String, ?> function() { return preferences.getAll(); } | /**
* Retrieve all values from SharedPreferences. Do not modify collection return by method
* @return a Map representing a list of key/value pairs from SharedPreferences
*/ | Retrieve all values from SharedPreferences. Do not modify collection return by method | getAll | {
"repo_name": "vector-solutions/MatzoMatch",
"path": "app/src/main/java/com/algorepublic/matzomatch/Utils/TinyDB.java",
"license": "apache-2.0",
"size": 16343
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,134,223 |
public static ComponentUI createUI(JComponent component)
{
return new MetalSplitPaneUI();
}
/**
* Returns the divider that is used by the <code>JSplitPane</code>.
*
* The divider returned by this method is a {@link BasicSplitPaneDivider} | static ComponentUI function(JComponent component) { return new MetalSplitPaneUI(); } /** * Returns the divider that is used by the <code>JSplitPane</code>. * * The divider returned by this method is a {@link BasicSplitPaneDivider} | /**
* Returns a new instance of <code>MetalSplitPaneUI</code>.
*
* @param component the component for which we return an UI instance
*
* @return A new instance of <code>MetalSplitPaneUI</code>.
*/ | Returns a new instance of <code>MetalSplitPaneUI</code> | createUI | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/plaf/metal/MetalSplitPaneUI.java",
"license": "gpl-2.0",
"size": 3113
} | [
"javax.swing.JComponent",
"javax.swing.JSplitPane",
"javax.swing.plaf.ComponentUI",
"javax.swing.plaf.basic.BasicSplitPaneDivider"
] | import javax.swing.JComponent; import javax.swing.JSplitPane; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.basic.BasicSplitPaneDivider; | import javax.swing.*; import javax.swing.plaf.*; import javax.swing.plaf.basic.*; | [
"javax.swing"
] | javax.swing; | 2,418,744 |
public static Function<RoleDefinition, RoleResponse> buildRole(LabelProvider labelProvider) {
return role -> new RoleResponse()
.setId(role.getIdentifier())
.setOrder(role.getGlobalPriority())
.setLabel(labelProvider.getLabel(role.getIdentifier().toLowerCase() + ".label"))
.setCanRead(role.canRe... | static Function<RoleDefinition, RoleResponse> function(LabelProvider labelProvider) { return role -> new RoleResponse() .setId(role.getIdentifier()) .setOrder(role.getGlobalPriority()) .setLabel(labelProvider.getLabel(role.getIdentifier().toLowerCase() + STR)) .setCanRead(role.canRead()) .setCanWrite(role.canWrite()) .... | /**
* Build {@link RoleReponse} that represents the information from the given role
*
* @param labelProvider
* label provider to use when resolving labels
* @return the build response object
*/ | Build <code>RoleReponse</code> that represents the information from the given role | buildRole | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/authority-management/role-management/src/main/java/com/sirmaenterprise/sep/roles/rest/ResponseBuilders.java",
"license": "lgpl-3.0",
"size": 2507
} | [
"com.sirma.itt.seip.domain.definition.label.LabelProvider",
"com.sirmaenterprise.sep.roles.RoleDefinition",
"java.util.function.Function"
] | import com.sirma.itt.seip.domain.definition.label.LabelProvider; import com.sirmaenterprise.sep.roles.RoleDefinition; import java.util.function.Function; | import com.sirma.itt.seip.domain.definition.label.*; import com.sirmaenterprise.sep.roles.*; import java.util.function.*; | [
"com.sirma.itt",
"com.sirmaenterprise.sep",
"java.util"
] | com.sirma.itt; com.sirmaenterprise.sep; java.util; | 2,040,176 |
@Override
protected void setFileHeaderMap()
{
l.debug("Setting ADF file header...");
try(Scanner s = new Scanner(getFileHeader()))
{
String h = "";
if (null == this.fileHeaderMap)
{
this.fileHeaderMap = new HashMap<>();
}
try
{
while(s.hasNextLine())
{
h = s.ne... | void function() { l.debug(STR); try(Scanner s = new Scanner(getFileHeader())) { String h = ""; if (null == this.fileHeaderMap) { this.fileHeaderMap = new HashMap<>(); } try { while(s.hasNextLine()) { h = s.nextLine(); Matcher m = HEADER_RX.matcher(h); if (m.matches()) { this.fileHeaderMap.put(m.group(1),m.group(2)); } ... | /**
* Builds a map from the values in the file header buffer.
* @see com.novartis.opensource.yada.io.FileHelper#setFileHeaderMap()
*/ | Builds a map from the values in the file header buffer | setFileHeaderMap | {
"repo_name": "Novartis/YADA",
"path": "yada-api/src/main/java/com/novartis/opensource/yada/io/ADFHelper.java",
"license": "apache-2.0",
"size": 3433
} | [
"java.util.HashMap",
"java.util.NoSuchElementException",
"java.util.Scanner",
"java.util.regex.Matcher"
] | import java.util.HashMap; import java.util.NoSuchElementException; import java.util.Scanner; import java.util.regex.Matcher; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 2,372,017 |
public void readSchematicFromNBT(NBTTagCompound nbt, MappingRegistry registry) {
} | void function(NBTTagCompound nbt, MappingRegistry registry) { } | /**
* Loads this schematic from the blueprint NBT.
*/ | Loads this schematic from the blueprint NBT | readSchematicFromNBT | {
"repo_name": "amadornes/Connected",
"path": "src/api/java/buildcraft/api/blueprints/Schematic.java",
"license": "mit",
"size": 8098
} | [
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 332,673 |
public void addStat(Sample sample, int numberOfMismatches, String quality){
try{
lock.lock();
HashMap<Integer, Integer> misMap = this.stats.get(sample);
if (misMap == null){
//create everything for the new sample
HashMap<Integer, Integer> m... | void function(Sample sample, int numberOfMismatches, String quality){ try{ lock.lock(); HashMap<Integer, Integer> misMap = this.stats.get(sample); if (misMap == null){ HashMap<Integer, Integer> mismatchMap = new HashMap(); this.stats.put(sample, mismatchMap); this.basecall_count.put(sample, 0L); this.basecall_qual.put(... | /**
* Adds a stat to the file (adds the mismatch, basequality, and other statistics)
* @param sample Sample | the sample of this read
* @param numberOfMismatches int | the number of mismatches occured in the barcode
* @param quality String | the quality string of the sample (for paired end: concatin... | Adds a stat to the file (adds the mismatch, basequality, and other statistics) | addStat | {
"repo_name": "GenomicsCoreLeuven/GBSX",
"path": "src/be/uzleuven/gc/logistics/GBSX/demultiplexer/application/DemultiplexStats.java",
"license": "gpl-3.0",
"size": 10837
} | [
"be.uzleuven.gc.logistics.GBSX",
"java.util.HashMap"
] | import be.uzleuven.gc.logistics.GBSX; import java.util.HashMap; | import be.uzleuven.gc.logistics.*; import java.util.*; | [
"be.uzleuven.gc",
"java.util"
] | be.uzleuven.gc; java.util; | 1,105,482 |
public String[] getDesignationTypes() throws ToolException
{
String select = "select detl_name from sbr.designation_types_lov_view where detl_name not in ( "
+ "select value from sbrext.tool_options_view_ext where property like 'EXCLUDE.DESIGNATION_TYPE.%' "
+") order by upper(de... | String[] function() throws ToolException { String select = STR + STR +STR; return getList(select); } | /**
* Get the Alternate Name Types.
*
* @return the Alternate Name Types.
* @throws ToolException
*/ | Get the Alternate Name Types | getDesignationTypes | {
"repo_name": "NCIP/cadsr-cdecurate",
"path": "src/gov/nih/nci/cadsr/cdecurate/database/DBAccess.java",
"license": "bsd-3-clause",
"size": 56715
} | [
"gov.nih.nci.cadsr.cdecurate.util.ToolException"
] | import gov.nih.nci.cadsr.cdecurate.util.ToolException; | import gov.nih.nci.cadsr.cdecurate.util.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 2,164,031 |
protected void prepareRequest() {
http11 = true;
http09 = false;
contentDelimitation = false;
expectation = false;
prepareRequestInternal();
if (endpoint.isSSLEnabled()) {
request.scheme().setString("https");
}
MessageBytes protocolMB = ... | void function() { http11 = true; http09 = false; contentDelimitation = false; expectation = false; prepareRequestInternal(); if (endpoint.isSSLEnabled()) { request.scheme().setString("https"); } MessageBytes protocolMB = request.protocol(); if (protocolMB.equals(Constants.HTTP_11)) { http11 = true; protocolMB.setString... | /**
* After reading the request headers, we have to setup the request filters.
*/ | After reading the request headers, we have to setup the request filters | prepareRequest | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.0/AbstractHttp11Processor.java",
"license": "mit",
"size": 58821
} | [
"java.util.Locale",
"org.apache.tomcat.util.buf.MessageBytes"
] | import java.util.Locale; import org.apache.tomcat.util.buf.MessageBytes; | import java.util.*; import org.apache.tomcat.util.buf.*; | [
"java.util",
"org.apache.tomcat"
] | java.util; org.apache.tomcat; | 1,566,642 |
public Sort getSort(){
return item.getSort();
}
| Sort function(){ return item.getSort(); } | /**
* Return the encapsulate Low Level API object.
*/ | Return the encapsulate Low Level API object | getSort | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/LessThanOrEqualHLAPI.java",
"license": "epl-1.0",
"size": 108661
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; | import fr.lip6.move.pnml.hlpn.terms.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 2,815,356 |
@Override
public Adapter createSeriesAdapter() {
if (seriesItemProvider == null) {
seriesItemProvider = new SeriesItemProvider(this);
}
return seriesItemProvider;
}
protected CategoryItemProvider categoryItemProvider; | Adapter function() { if (seriesItemProvider == null) { seriesItemProvider = new SeriesItemProvider(this); } return seriesItemProvider; } protected CategoryItemProvider categoryItemProvider; | /**
* This creates an adapter for a {@link de.hub.clickwatch.analysis.results.Series}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>de.hub.clickwatch.analysis.results.Series</code>. | createSeriesAdapter | {
"repo_name": "markus1978/clickwatch",
"path": "analysis/de.hub.clickwatch.analysis.results.edit/src/de/hub/clickwatch/analysis/results/provider/ResultsItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 16282
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,900,887 |
EReference getPropertyAlias_Query(); | EReference getPropertyAlias_Query(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.bpel.model.messageproperties.PropertyAlias#getQuery <em>Query</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Query</em>'.
* @see org.eclipse.bpel.model.messag... | Returns the meta object for the containment reference '<code>org.eclipse.bpel.model.messageproperties.PropertyAlias#getQuery Query</code>'. | getPropertyAlias_Query | {
"repo_name": "Drifftr/devstudio-tooling-bps",
"path": "plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/messageproperties/MessagepropertiesPackage.java",
"license": "apache-2.0",
"size": 22281
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 134,964 |
public AudioSample createSample(float[] sampleData, AudioFormat format)
{
return createSample( sampleData, format, 1024 );
} | AudioSample function(float[] sampleData, AudioFormat format) { return createSample( sampleData, format, 1024 ); } | /**
* Creates an AudioSample using the provided sample data and AudioFormat.
* When a buffer size is not provided, it defaults to 1024. The buffer size
* of a sample controls the size of the left, right, and mix AudioBuffer
* fields of the returned AudioSample.
*
* @shortdesc Creates an AudioSample usin... | Creates an AudioSample using the provided sample data and AudioFormat. When a buffer size is not provided, it defaults to 1024. The buffer size of a sample controls the size of the left, right, and mix AudioBuffer fields of the returned AudioSample | createSample | {
"repo_name": "noncom/Minim",
"path": "src/ddf/minim/Minim.java",
"license": "lgpl-3.0",
"size": 32600
} | [
"javax.sound.sampled.AudioFormat"
] | import javax.sound.sampled.AudioFormat; | import javax.sound.sampled.*; | [
"javax.sound"
] | javax.sound; | 351,376 |
public List<FlowEntry> getFlowEntriesForNode(Node node); | List<FlowEntry> function(Node node); | /**
* Returns the list of Flow entries for a network node.
* This list contains the flows as they were
* requested to be installed by the applications, before any merging with
* container flow is done.
*
* @param node
* @return the original list of flow entries belonging to the specif... | Returns the list of Flow entries for a network node. This list contains the flows as they were requested to be installed by the applications, before any merging with container flow is done | getFlowEntriesForNode | {
"repo_name": "xiaohanz/softcontroller",
"path": "opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/IForwardingRulesManager.java",
"license": "epl-1.0",
"size": 17958
} | [
"java.util.List",
"org.opendaylight.controller.sal.core.Node"
] | import java.util.List; import org.opendaylight.controller.sal.core.Node; | import java.util.*; import org.opendaylight.controller.sal.core.*; | [
"java.util",
"org.opendaylight.controller"
] | java.util; org.opendaylight.controller; | 2,880,229 |
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int posX, int posY, int posZ, Random random) {
if (world.canLightningStrikeAt(posX, posY + 1, posZ) && !World.doesBlockHaveSolidTopSurface(world, posX, posY - 1, posZ) && random.nextInt(15) == 1) {
double d0 = (double) ((float... | @SideOnly(Side.CLIENT) void function(World world, int posX, int posY, int posZ, Random random) { if (world.canLightningStrikeAt(posX, posY + 1, posZ) && !World.doesBlockHaveSolidTopSurface(world, posX, posY - 1, posZ) && random.nextInt(15) == 1) { double d0 = (double) ((float) posX + random.nextFloat()); double d1 = (d... | /**
* A randomly called display update to be able to add particles or other items for display
*/ | A randomly called display update to be able to add particles or other items for display | randomDisplayTick | {
"repo_name": "djLead/modelead",
"path": "src/java/com/djlead/leadmod/blocks/LeavesBT.java",
"license": "gpl-2.0",
"size": 14331
} | [
"java.util.Random",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.world.World; | import java.util.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.world"
] | java.util; net.minecraft.world; | 1,677,255 |
public DefaultKubernetesClient getKubernetesClient() {
return kubernetesClient;
} | DefaultKubernetesClient function() { return kubernetesClient; } | /**
* Default KubernetesClient to use if provided
*/ | Default KubernetesClient to use if provided | getKubernetesClient | {
"repo_name": "erwelch/camel",
"path": "components/camel-kubernetes/src/main/java/org/apache/camel/component/kubernetes/KubernetesConfiguration.java",
"license": "apache-2.0",
"size": 8785
} | [
"io.fabric8.kubernetes.client.DefaultKubernetesClient"
] | import io.fabric8.kubernetes.client.DefaultKubernetesClient; | import io.fabric8.kubernetes.client.*; | [
"io.fabric8.kubernetes"
] | io.fabric8.kubernetes; | 1,733,048 |
private boolean genData() {
Boolean res = false;
DecimalFormatSymbols decimalFormatSymbols = new DecimalFormatSymbols();
decimalFormatSymbols.setDecimalSeparator('.');
DecimalFormat decimalFormat = new DecimalFormat("###.00000", decimalFormatSymbols);
... | boolean function() { Boolean res = false; DecimalFormatSymbols decimalFormatSymbols = new DecimalFormatSymbols(); decimalFormatSymbols.setDecimalSeparator('.'); DecimalFormat decimalFormat = new DecimalFormat(STR, decimalFormatSymbols); int step; int totPoints = currTrace.Tb_Good_Points.size(); if (totPoints > 200) { s... | /**
* HTML generation of track data
* @param tracePM
* @return
*/ | HTML generation of track data | genData | {
"repo_name": "giloutho/Logfly",
"path": "src/main/java/leaflet/map_markers_coord.java",
"license": "gpl-3.0",
"size": 7428
} | [
"java.text.DecimalFormat",
"java.text.DecimalFormatSymbols"
] | import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; | import java.text.*; | [
"java.text"
] | java.text; | 2,516,588 |
int updateByPrimaryKeyWithBLOBs(RelayEmailNotificationWithBLOBs record); | int updateByPrimaryKeyWithBLOBs(RelayEmailNotificationWithBLOBs record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table s_relay_email_notification
*
* @mbggenerated Thu Jul 16 10:50:11 ICT 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table s_relay_email_notification | updateByPrimaryKeyWithBLOBs | {
"repo_name": "uniteddiversity/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/common/dao/RelayEmailNotificationMapper.java",
"license": "agpl-3.0",
"size": 5245
} | [
"com.esofthead.mycollab.common.domain.RelayEmailNotificationWithBLOBs"
] | import com.esofthead.mycollab.common.domain.RelayEmailNotificationWithBLOBs; | import com.esofthead.mycollab.common.domain.*; | [
"com.esofthead.mycollab"
] | com.esofthead.mycollab; | 2,838,410 |
ArrayList<CBRCase> newList = new ArrayList<>(cases);
newList.removeAll(tabu);
return newList;
} | ArrayList<CBRCase> newList = new ArrayList<>(cases); newList.removeAll(tabu); return newList; } | /**
* Removes cases from the tabu list.
*
* @param cases
* to remove
* @return updated tabu list.
*/ | Removes cases from the tabu list | removeTabuList | {
"repo_name": "agkphysics/ChatBot",
"path": "JavaBot/src/main/java/jcolibri/extensions/recommendation/tabuList/TabuList.java",
"license": "gpl-3.0",
"size": 1275
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 649,415 |
private PurchaseDetail updatePurchaseDetail(PurchaseDetail purchaseDetail, DeliveryDetail deliveryDetail) {
Purchase purchase = updatePurchase(purchaseDetail.getPurchase());
try {
IManagerBean purchaseDetailBean = BeanManager.getManagerBean(PurchaseDetail.class);
purchaseDetail.setItem(deliveryDetail.g... | PurchaseDetail function(PurchaseDetail purchaseDetail, DeliveryDetail deliveryDetail) { Purchase purchase = updatePurchase(purchaseDetail.getPurchase()); try { IManagerBean purchaseDetailBean = BeanManager.getManagerBean(PurchaseDetail.class); purchaseDetail.setItem(deliveryDetail.getItem()); purchaseDetail.setDescript... | /**
* Updates the purchaseDetail.
*
* @param purchaseDetail the purchase detail
* @param deliveryDetail the delivery detail
*
* @return the purchase detail
*/ | Updates the purchaseDetail | updatePurchaseDetail | {
"repo_name": "Esleelkartea/aonGTA",
"path": "aongta_v1.0.0_src/Fuentes y JavaDoc/aon-ui-sales-purchase/src/com/code/aon/ui/salesPurchase/event/SalesPurchaseListener.java",
"license": "gpl-2.0",
"size": 16664
} | [
"com.code.aon.common.BeanManager",
"com.code.aon.common.IManagerBean",
"com.code.aon.common.ManagerBeanException",
"com.code.aon.purchase.Purchase",
"com.code.aon.purchase.PurchaseDetail",
"com.code.aon.warehouse.DeliveryDetail",
"java.util.logging.Level"
] | import com.code.aon.common.BeanManager; import com.code.aon.common.IManagerBean; import com.code.aon.common.ManagerBeanException; import com.code.aon.purchase.Purchase; import com.code.aon.purchase.PurchaseDetail; import com.code.aon.warehouse.DeliveryDetail; import java.util.logging.Level; | import com.code.aon.common.*; import com.code.aon.purchase.*; import com.code.aon.warehouse.*; import java.util.logging.*; | [
"com.code.aon",
"java.util"
] | com.code.aon; java.util; | 1,693,634 |
@Override
public void setSelectionRange(int pos, int length) {
if (textInputEnabled) {
WidgetUtil.setSelectionRange(getElement(), pos, length,
"backward");
} else {
super.setSelectionRange(... | void function(int pos, int length) { if (textInputEnabled) { WidgetUtil.setSelectionRange(getElement(), pos, length, STR); } else { super.setSelectionRange(0, 0); } } } public static final FilteringMode FILTERINGMODE_OFF = FilteringMode.OFF; public static final FilteringMode FILTERINGMODE_STARTSWITH = FilteringMode.STA... | /**
* Overridden to avoid selecting text when text input is disabled
*/ | Overridden to avoid selecting text when text input is disabled | setSelectionRange | {
"repo_name": "jdahlstrom/vaadin.react",
"path": "client/src/main/java/com/vaadin/client/ui/VFilterSelect.java",
"license": "apache-2.0",
"size": 89400
} | [
"com.google.gwt.user.client.ui.FlowPanel",
"com.google.gwt.user.client.ui.TextBox",
"com.vaadin.client.WidgetUtil",
"com.vaadin.shared.ui.combobox.FilteringMode"
] | import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.TextBox; import com.vaadin.client.WidgetUtil; import com.vaadin.shared.ui.combobox.FilteringMode; | import com.google.gwt.user.client.ui.*; import com.vaadin.client.*; import com.vaadin.shared.ui.combobox.*; | [
"com.google.gwt",
"com.vaadin.client",
"com.vaadin.shared"
] | com.google.gwt; com.vaadin.client; com.vaadin.shared; | 1,879,024 |
public void updateLogoViews() {
setCursor(new Cursor(Cursor.WAIT_CURSOR));
labelImageProtocol.setIcon(Data.getInstance().getIcon("noImageProgress_30x30.gif"));
labelImageInvitation.setIcon(Data.getInstance().getIcon("noImageProgress_30x30.gif"));
ImageIcon icon = Data.getInstance().getIcon("noImag... | void function() { setCursor(new Cursor(Cursor.WAIT_CURSOR)); labelImageProtocol.setIcon(Data.getInstance().getIcon(STR)); labelImageInvitation.setIcon(Data.getInstance().getIcon(STR)); ImageIcon icon = Data.getInstance().getIcon(STR); if (logoPathProtocol != null) { icon = new ImageIcon(logoPathProtocol); } Image image... | /**
* Update logo views.
*/ | Update logo views | updateLogoViews | {
"repo_name": "googol42/revager",
"path": "src/org/revager/gui/dialogs/SettingsDialog.java",
"license": "gpl-3.0",
"size": 31855
} | [
"java.awt.Cursor",
"java.awt.Image",
"javax.swing.ImageIcon",
"org.revager.app.model.Data"
] | import java.awt.Cursor; import java.awt.Image; import javax.swing.ImageIcon; import org.revager.app.model.Data; | import java.awt.*; import javax.swing.*; import org.revager.app.model.*; | [
"java.awt",
"javax.swing",
"org.revager.app"
] | java.awt; javax.swing; org.revager.app; | 1,132,736 |
private static void executeListener(Runnable runnable, Executor executor) {
try {
executor.execute(runnable);
} catch (RuntimeException e) {
// Log it and keep going, bad runnable and/or executor. Don't punish the other runnables if
// we're given a bad one. We only catch RuntimeException ... | static void function(Runnable runnable, Executor executor) { try { executor.execute(runnable); } catch (RuntimeException e) { voltLog.error(STR + runnable + STR + executor, e); } } private static final class RunnableExecutorPair { final Runnable runnable; final Executor executor; @Nullable RunnableExecutorPair next; Ru... | /**
* Submits the given runnable to the given {@link Executor} catching and logging all {@linkplain
* RuntimeException runtime exceptions} thrown by the executor.
*/ | Submits the given runnable to the given <code>Executor</code> catching and logging all RuntimeException runtime exceptions thrown by the executor | executeListener | {
"repo_name": "paulmartel/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/util/concurrent/ExecutionList.java",
"license": "agpl-3.0",
"size": 6825
} | [
"java.util.concurrent.Executor",
"javax.annotation_voltpatches.Nullable"
] | import java.util.concurrent.Executor; import javax.annotation_voltpatches.Nullable; | import java.util.concurrent.*; import javax.annotation_voltpatches.*; | [
"java.util",
"javax.annotation_voltpatches"
] | java.util; javax.annotation_voltpatches; | 849,792 |
public PCollection<HealthcareIOError<String>> getFailedBodies() {
return this.failedBodies;
} | PCollection<HealthcareIOError<String>> function() { return this.failedBodies; } | /**
* Gets failed bodies with err.
*
* @return the failed inserts with err
*/ | Gets failed bodies with err | getFailedBodies | {
"repo_name": "iemejia/incubator-beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java",
"license": "apache-2.0",
"size": 45554
} | [
"org.apache.beam.sdk.values.PCollection"
] | import org.apache.beam.sdk.values.PCollection; | import org.apache.beam.sdk.values.*; | [
"org.apache.beam"
] | org.apache.beam; | 2,481,418 |
public int insertBulk(ContentValues[] values) {
int noOfRecordInserted = mContext.getContentResolver().bulkInsert(
SmartCampusContentProvider.CONTENT_URI_NEWS_FEED, values);
// System.out.println("Inserted Record Count :: " + noOfRecordInserted);
return noOfRecordInserted... | int function(ContentValues[] values) { int noOfRecordInserted = mContext.getContentResolver().bulkInsert( SmartCampusContentProvider.CONTENT_URI_NEWS_FEED, values); return noOfRecordInserted; } | /**
* method used to insert all rows via content provider
*
* @param values
* @return
*/ | method used to insert all rows via content provider | insertBulk | {
"repo_name": "hiteshharora/SmartCampus",
"path": "app/src/main/java/com/example/hitesharora/smartcampus/database/NewsFeedApi.java",
"license": "apache-2.0",
"size": 4933
} | [
"android.content.ContentValues"
] | import android.content.ContentValues; | import android.content.*; | [
"android.content"
] | android.content; | 2,006,108 |
public void updateStatus(Message msg) {
displayBatteryLevel(msg);
displaySignalStrength(msg);
manageDataConnection();
displayUnreadTextMessages(msg);
displayUnreadEmails(msg);
displayNextAlarm(msg);
displayCurrentTimeAndDate(msg);
displayBrightness(msg);
} | void function(Message msg) { displayBatteryLevel(msg); displaySignalStrength(msg); manageDataConnection(); displayUnreadTextMessages(msg); displayUnreadEmails(msg); displayNextAlarm(msg); displayCurrentTimeAndDate(msg); displayBrightness(msg); } | /**
* Updates the status of all the components.
*
* @param msg
* The status is updated based on the data in msg.
*/ | Updates the status of all the components | updateStatus | {
"repo_name": "saurabh2590/EasyAccess",
"path": "src/org/easyaccess/status/StatusApp.java",
"license": "apache-2.0",
"size": 37410
} | [
"android.os.Message"
] | import android.os.Message; | import android.os.*; | [
"android.os"
] | android.os; | 1,581,841 |
public List<PluginSummaryBean> listPlugins() throws StorageException; | List<PluginSummaryBean> function() throws StorageException; | /**
* Lists all of the Plugins.
* @return list of plugins
* @throws StorageException if a storage problem occurs while storing a bean.
*/ | Lists all of the Plugins | listPlugins | {
"repo_name": "KevinHorvatin/apiman",
"path": "manager/api/core/src/main/java/io/apiman/manager/api/core/IStorageQuery.java",
"license": "apache-2.0",
"size": 12577
} | [
"io.apiman.manager.api.beans.summary.PluginSummaryBean",
"io.apiman.manager.api.core.exceptions.StorageException",
"java.util.List"
] | import io.apiman.manager.api.beans.summary.PluginSummaryBean; import io.apiman.manager.api.core.exceptions.StorageException; import java.util.List; | import io.apiman.manager.api.beans.summary.*; import io.apiman.manager.api.core.exceptions.*; import java.util.*; | [
"io.apiman.manager",
"java.util"
] | io.apiman.manager; java.util; | 2,380,060 |
public void updateSubscription(APIIdentifier identifier, String subStatus, int applicationId)
throws APIManagementException {
Connection conn = null;
ResultSet resultSet = null;
PreparedStatement ps = null;
PreparedStatement updatePs = null;
int apiId = -1;
... | void function(APIIdentifier identifier, String subStatus, int applicationId) throws APIManagementException { Connection conn = null; ResultSet resultSet = null; PreparedStatement ps = null; PreparedStatement updatePs = null; int apiId = -1; try { conn = APIMgtDBUtil.getConnection(); conn.setAutoCommit(false); String ge... | /**
* This method is used to update the subscription
*
* @param identifier APIIdentifier
* @param subStatus Subscription Status[BLOCKED/UNBLOCKED]
* @param applicationId Application id
* @throws org.wso2.carbon.apimgt.api.APIManagementException if failed to update subscriber
*/ | This method is used to update the subscription | updateSubscription | {
"repo_name": "knPerera/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 493075
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Timestamp",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.APIIdentifier",
"org.wso2.carbon.apimgt.impl.APIConstants",
"org.wso2.carbon.apimgt.impl.da... | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.impl.APIConstants; import org.... | import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,052,079 |
@Override
public Adapter createConfigurationAdapter() {
if (configurationItemProvider == null) {
configurationItemProvider = new ConfigurationItemProvider(this);
}
return configurationItemProvider;
} | Adapter function() { if (configurationItemProvider == null) { configurationItemProvider = new ConfigurationItemProvider(this); } return configurationItemProvider; } | /**
* This creates an adapter for a {@link com.dbdesigner.model.relationaldatabase.Configuration}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>com.dbdesigner.model.relationaldatabase.Configuration</code>. | createConfigurationAdapter | {
"repo_name": "cadorca/rdb-designer",
"path": "com.dbdesigner.design.edit/src/com/dbdesigner/model/relationaldatabase/provider/RelationalDatabaseItemProviderAdapterFactory.java",
"license": "mit",
"size": 10708
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,579,521 |
public RequestPatch<Script> updateScript(Script script) {
Validate.checkNotNullAndZero(script.getId(), "Trying to update object without id!");
String url = String.format(Constants.SCRIPTS_DETAIL_URL, getNotEmptyInstanceName(), script.getId());
return new RequestPatch<>(Script.class, url, thi... | RequestPatch<Script> function(Script script) { Validate.checkNotNullAndZero(script.getId(), STR); String url = String.format(Constants.SCRIPTS_DETAIL_URL, getNotEmptyInstanceName(), script.getId()); return new RequestPatch<>(Script.class, url, this, script); } | /**
* Update a Script.
*
* @param script Script to update. It has to have id.
* @return Updated Script.
*/ | Update a Script | updateScript | {
"repo_name": "Syncano/syncano-android",
"path": "library/src/main/java/com/syncano/library/SyncanoDashboard.java",
"license": "mit",
"size": 24946
} | [
"com.syncano.library.api.RequestPatch",
"com.syncano.library.data.Script",
"com.syncano.library.utils.Validate"
] | import com.syncano.library.api.RequestPatch; import com.syncano.library.data.Script; import com.syncano.library.utils.Validate; | import com.syncano.library.api.*; import com.syncano.library.data.*; import com.syncano.library.utils.*; | [
"com.syncano.library"
] | com.syncano.library; | 1,590,248 |
public void set(int index, SmallIntHolder holder) {
BitVectorHelper.setValidityBitToOne(validityBuffer, index);
setValue(index, holder.value);
} | void function(int index, SmallIntHolder holder) { BitVectorHelper.setValidityBitToOne(validityBuffer, index); setValue(index, holder.value); } | /**
* Set the element at the given index to the value set in data holder.
*
* @param index position of element
* @param holder data holder for value of element
*/ | Set the element at the given index to the value set in data holder | set | {
"repo_name": "renesugar/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/SmallIntVector.java",
"license": "apache-2.0",
"size": 12026
} | [
"org.apache.arrow.vector.holders.SmallIntHolder"
] | import org.apache.arrow.vector.holders.SmallIntHolder; | import org.apache.arrow.vector.holders.*; | [
"org.apache.arrow"
] | org.apache.arrow; | 1,958,855 |
public static ManagedChannel createChannelPool(final String host, final BigtableOptions options,
int count) throws IOException, GeneralSecurityException {
final List<ClientInterceptor> interceptorList = new ArrayList<>();
ClientInterceptor credentialsInterceptor = CredentialInterceptorCache.getInstance... | static ManagedChannel function(final String host, final BigtableOptions options, int count) throws IOException, GeneralSecurityException { final List<ClientInterceptor> interceptorList = new ArrayList<>(); ClientInterceptor credentialsInterceptor = CredentialInterceptorCache.getInstance() .getCredentialsInterceptor(opt... | /**
* Create a new {@link com.google.cloud.bigtable.grpc.io.ChannelPool}, with auth headers.
*
* @param host a {@link String} object specifying the host to connect to.
* @param options a {@link BigtableOptions} object with the credentials, retry and other connection options.
* @param count an int definin... | Create a new <code>com.google.cloud.bigtable.grpc.io.ChannelPool</code>, with auth headers | createChannelPool | {
"repo_name": "kevinsi4508/cloud-bigtable-client",
"path": "bigtable-client-core-parent/bigtable-client-core/src/main/java/com/google/cloud/bigtable/grpc/BigtableSession.java",
"license": "apache-2.0",
"size": 23569
} | [
"com.google.cloud.bigtable.config.BigtableOptions",
"com.google.cloud.bigtable.grpc.io.CredentialInterceptorCache",
"com.google.cloud.bigtable.grpc.io.GoogleCloudResourcePrefixInterceptor",
"io.grpc.ClientInterceptor",
"io.grpc.ManagedChannel",
"java.io.IOException",
"java.security.GeneralSecurityExcept... | import com.google.cloud.bigtable.config.BigtableOptions; import com.google.cloud.bigtable.grpc.io.CredentialInterceptorCache; import com.google.cloud.bigtable.grpc.io.GoogleCloudResourcePrefixInterceptor; import io.grpc.ClientInterceptor; import io.grpc.ManagedChannel; import java.io.IOException; import java.security.G... | import com.google.cloud.bigtable.config.*; import com.google.cloud.bigtable.grpc.io.*; import io.grpc.*; import java.io.*; import java.security.*; import java.util.*; | [
"com.google.cloud",
"io.grpc",
"java.io",
"java.security",
"java.util"
] | com.google.cloud; io.grpc; java.io; java.security; java.util; | 1,113,451 |
public void setLastUsage(Date lastUsage);
| void function(Date lastUsage); | /**
* BusinessGroup was active, lastUsage will be used to determine which groups
* should get deleted by the big administrator.
*
* @param lastUsage
*/ | BusinessGroup was active, lastUsage will be used to determine which groups should get deleted by the big administrator | setLastUsage | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/org/olat/group/BusinessGroup.java",
"license": "apache-2.0",
"size": 5629
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 666,631 |
private File getExecutable() {
String execName = (File.separatorChar == '\\') ? "java.exe" : "java";
return new File(getHome(),"bin/"+execName);
} | File function() { String execName = (File.separatorChar == '\\') ? STR : "java"; return new File(getHome(),"bin/"+execName); } | /**
* Gets the path to 'java'.
*/ | Gets the path to 'java' | getExecutable | {
"repo_name": "lindzh/jenkins",
"path": "core/src/main/java/hudson/model/JDK.java",
"license": "mit",
"size": 6418
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,540,035 |
public long getArtistId() {
synchronized (this) {
if (mCursor == null) {
return -1;
}
return mCursor.getLong(mCursor.getColumnIndexOrThrow(AudioColumns.ARTIST_ID));
}
} | long function() { synchronized (this) { if (mCursor == null) { return -1; } return mCursor.getLong(mCursor.getColumnIndexOrThrow(AudioColumns.ARTIST_ID)); } } | /**
* Returns the artist ID
*
* @return The current song artist ID
*/ | Returns the artist ID | getArtistId | {
"repo_name": "micromacer/Player-by-TweekProject",
"path": "src/com/andrew/apollo/MusicPlaybackService.java",
"license": "gpl-3.0",
"size": 95974
} | [
"android.provider.MediaStore"
] | import android.provider.MediaStore; | import android.provider.*; | [
"android.provider"
] | android.provider; | 1,871,261 |
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) {
environment.getActiveProfiles(); // ensure they are initialized
// But these ones should go first (last wins in a property key clash)
Set<String> profiles = new LinkedHashSet<String>(this.additionalProfiles);
profiles.addA... | void function(ConfigurableEnvironment environment, String[] args) { environment.getActiveProfiles(); Set<String> profiles = new LinkedHashSet<String>(this.additionalProfiles); profiles.addAll(Arrays.asList(environment.getActiveProfiles())); environment.setActiveProfiles(profiles.toArray(new String[profiles.size()])); } | /**
* Configure which profiles are active (or active by default) for this application
* environment. Additional profiles may be activated during configuration file
* processing via the {@code spring.profiles.active} property.
* @param environment this application's environment
* @param args arguments passed t... | Configure which profiles are active (or active by default) for this application environment. Additional profiles may be activated during configuration file processing via the spring.profiles.active property | configureProfiles | {
"repo_name": "bijukunjummen/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/SpringApplication.java",
"license": "apache-2.0",
"size": 44386
} | [
"java.util.Arrays",
"java.util.LinkedHashSet",
"java.util.Set",
"org.springframework.core.env.ConfigurableEnvironment"
] | import java.util.Arrays; import java.util.LinkedHashSet; import java.util.Set; import org.springframework.core.env.ConfigurableEnvironment; | import java.util.*; import org.springframework.core.env.*; | [
"java.util",
"org.springframework.core"
] | java.util; org.springframework.core; | 1,991,281 |
public Cancellable getCategoriesAsync(GetCategoriesRequest request, RequestOptions options,
ActionListener<GetCategoriesResponse> listener) {
return restHighLevelClient.performRequestAsyncAndParseEntity(request,
MLRequestConverters::getCategories,
... | Cancellable function(GetCategoriesRequest request, RequestOptions options, ActionListener<GetCategoriesResponse> listener) { return restHighLevelClient.performRequestAsyncAndParseEntity(request, MLRequestConverters::getCategories, options, GetCategoriesResponse::fromXContent, listener, Collections.emptySet()); } | /**
* Gets the categories for a Machine Learning Job, notifies listener once the requested buckets are retrieved.
* <p>
* For additional info
* see <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html">
* ML GET categories documentation</a>
*
*... | Gets the categories for a Machine Learning Job, notifies listener once the requested buckets are retrieved. For additional info see ML GET categories documentation | getCategoriesAsync | {
"repo_name": "nknize/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/MachineLearningClient.java",
"license": "apache-2.0",
"size": 133260
} | [
"java.util.Collections",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.client.ml.GetCategoriesRequest",
"org.elasticsearch.client.ml.GetCategoriesResponse"
] | import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.ml.GetCategoriesRequest; import org.elasticsearch.client.ml.GetCategoriesResponse; | import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.ml.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.client"
] | java.util; org.elasticsearch.action; org.elasticsearch.client; | 1,179,298 |
private Cursor get(String table, Where where, Limit limit) {
String whereClause = null;
if(where != null) {
whereClause = where.toString().replace(" WHERE ", "");
}
String limitClause = null;
if(limit != null) {
limitClause = limit.toString().replace(" LIMIT ", "");
}
Cursor result = mDb.q... | Cursor function(String table, Where where, Limit limit) { String whereClause = null; if(where != null) { whereClause = where.toString().replace(STR, STR LIMIT STR"); } Cursor result = mDb.query(table, null, whereClause, null, null, null, null, limitClause); return result; } | /**
* Query the database for a specific item.
*
* @param table Query table.
* @param where {@link Where} clause to apply.
* @param limit {@link Limit} clause to apply.
* @return {@link Cursor} that represents the query result.
*/ | Query the database for a specific item | get | {
"repo_name": "legua25/android-course",
"path": "course-todos/orm/src/main/java/com/orm/androrm/DatabaseAdapter.java",
"license": "mit",
"size": 9246
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 2,370,692 |
private static Expression checkForCircularExpressions(ExpressionMap expressionMap)
throws AnalyzeException {
for (Location point : expressionMap.dirtyPoints) {
Expression expr = expressionMap.get(point);
if (expr.isCircular()) return expr;
}
return null;
} | static Expression function(ExpressionMap expressionMap) throws AnalyzeException { for (Location point : expressionMap.dirtyPoints) { Expression expr = expressionMap.get(point); if (expr.isCircular()) return expr; } return null; } | /** Checks whether any of the recently placed expressions in the
* expression map are self-referential; if so, return it. */ | Checks whether any of the recently placed expressions in the | checkForCircularExpressions | {
"repo_name": "franciscaconcha/ProyectoLogisim",
"path": "src/com/cburch/logisim/circuit/Analyze.java",
"license": "gpl-2.0",
"size": 12460
} | [
"com.cburch.logisim.analyze.model.Expression",
"com.cburch.logisim.data.Location"
] | import com.cburch.logisim.analyze.model.Expression; import com.cburch.logisim.data.Location; | import com.cburch.logisim.analyze.model.*; import com.cburch.logisim.data.*; | [
"com.cburch.logisim"
] | com.cburch.logisim; | 2,323,017 |
public static String createSignedUrl(String method, String bucketName, String objectKey,
String specialParamName, Map headersMap, AWSCredentials awsCredentials,
long secondsSinceEpoch, boolean isVirtualHost)
throws S3ServiceException
{
boolean isHttps = Jets3tProperties.getIns... | static String function(String method, String bucketName, String objectKey, String specialParamName, Map headersMap, AWSCredentials awsCredentials, long secondsSinceEpoch, boolean isVirtualHost) throws S3ServiceException { boolean isHttps = Jets3tProperties.getInstance(Constants.JETS3T_PROPERTIES_FILENAME) .getBoolPrope... | /**
* Generates a signed URL string that will grant access to an S3 resource (bucket or object)
* to whoever uses the URL up until the time specified. The URL will use the HTTP or
* HTTPS protocol depending on the value of the <code>s3service.https-only</code> property
* in the default jets3t.proper... | Generates a signed URL string that will grant access to an S3 resource (bucket or object) to whoever uses the URL up until the time specified. The URL will use the HTTP or HTTPS protocol depending on the value of the <code>s3service.https-only</code> property in the default jets3t.properties file | createSignedUrl | {
"repo_name": "fajoy/jets3t",
"path": "src/org/jets3t/service/S3Service.java",
"license": "apache-2.0",
"size": 110491
} | [
"java.util.Map",
"org.jets3t.service.security.AWSCredentials"
] | import java.util.Map; import org.jets3t.service.security.AWSCredentials; | import java.util.*; import org.jets3t.service.security.*; | [
"java.util",
"org.jets3t.service"
] | java.util; org.jets3t.service; | 1,797,393 |
List<String> lines;
try {
lines = Files.readAllLines(Paths.get(filename),
StandardCharsets.UTF_8);
} catch (IOException ex) {
ex.printStackTrace();
return false;
}
Connection connection = SQLite.getConnection();
Map<String, ... | List<String> lines; try { lines = Files.readAllLines(Paths.get(filename), StandardCharsets.UTF_8); } catch (IOException ex) { ex.printStackTrace(); return false; } Connection connection = SQLite.getConnection(); Map<String, ITable> map = new HashMap<>(); map.put(Author.class.getSimpleName(), new Author().dropTable(conn... | /**
* Filling the database tables from a file
*
* @param {String} name of file
* @return {boolean}
**/ | Filling the database tables from a file | load | {
"repo_name": "biblelamp/JavaExercises",
"path": "TestTasks/merck.com/jdbc/src/main/java/tools/Service.java",
"license": "gpl-2.0",
"size": 3594
} | [
"java.io.IOException",
"java.nio.charset.StandardCharsets",
"java.nio.file.Files",
"java.nio.file.Paths",
"java.sql.Connection",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.sql.Connection; import java.util.HashMap; import java.util.List; import java.util.Map; | import java.io.*; import java.nio.charset.*; import java.nio.file.*; import java.sql.*; import java.util.*; | [
"java.io",
"java.nio",
"java.sql",
"java.util"
] | java.io; java.nio; java.sql; java.util; | 2,761,986 |
protected Topic getTopic(Entity entity) throws CommonException{
if (entity instanceof Reader) {
return super.getTopic(entity);
}
Topic result = null;
Writer w = (Writer) entity;
try {
result = (Topic) w.getOwnedEntities(EntityFilter.TOPIC)[0];
... | Topic function(Entity entity) throws CommonException{ if (entity instanceof Reader) { return super.getTopic(entity); } Topic result = null; Writer w = (Writer) entity; try { result = (Topic) w.getOwnedEntities(EntityFilter.TOPIC)[0]; } catch (CMException e) { throw new CommonException(e.getMessage()); } return result; ... | /**
* Retrieve the Topic Entity for the Writer or Reader. This reference must be freed by the caller.
* @return the Topic Entity associated with the Writer or Reader.
* @throws CommonException
*/ | Retrieve the Topic Entity for the Writer or Reader. This reference must be freed by the caller | getTopic | {
"repo_name": "PrismTech/opensplice",
"path": "src/tools/cm/common/code/org/opensplice/common/model/sample/ReaderWriterDetailSampleModel.java",
"license": "gpl-3.0",
"size": 10096
} | [
"org.opensplice.cm.CMException",
"org.opensplice.cm.Entity",
"org.opensplice.cm.EntityFilter",
"org.opensplice.cm.Reader",
"org.opensplice.cm.Topic",
"org.opensplice.cm.Writer",
"org.opensplice.common.CommonException"
] | import org.opensplice.cm.CMException; import org.opensplice.cm.Entity; import org.opensplice.cm.EntityFilter; import org.opensplice.cm.Reader; import org.opensplice.cm.Topic; import org.opensplice.cm.Writer; import org.opensplice.common.CommonException; | import org.opensplice.cm.*; import org.opensplice.common.*; | [
"org.opensplice.cm",
"org.opensplice.common"
] | org.opensplice.cm; org.opensplice.common; | 2,091,363 |
public static <T> int mergeSortedFiles(List<File> files, File outputfile,
final Comparator<String> cmp, Charset cs, boolean distinct,
boolean append, boolean usegzip) throws IOException {
return mergeSortedFiles(files, out... | static <T> int function(List<File> files, File outputfile, final Comparator<String> cmp, Charset cs, boolean distinct, boolean append, boolean usegzip) throws IOException { return mergeSortedFiles(files, outputfile, cmp, cs, distinct, append, usegzip, Function.identity(), Function.identity()); } | /**
* This merges a bunch of temporary flat files
*
* @param files
* The {@link List} of sorted {@link File}s to be merged.
* @param distinct
* Pass <code>true</code> if duplicate lines should be discarded. (elchetz@gmail.com)
* @param outputfile
* ... | This merges a bunch of temporary flat files | mergeSortedFiles | {
"repo_name": "chetanmeh/jackrabbit-oak",
"path": "oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/sort/ExternalSort.java",
"license": "apache-2.0",
"size": 31166
} | [
"java.io.File",
"java.io.IOException",
"java.nio.charset.Charset",
"java.util.Comparator",
"java.util.List",
"java.util.function.Function"
] | import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.Comparator; import java.util.List; import java.util.function.Function; | import java.io.*; import java.nio.charset.*; import java.util.*; import java.util.function.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 77,849 |
public void scrollIntoView() {
WidgetUtil.scrollIntoViewVertically(nodeCaptionDiv);
} | void function() { WidgetUtil.scrollIntoViewVertically(nodeCaptionDiv); } | /**
* Scrolls the caption into view.
*/ | Scrolls the caption into view | scrollIntoView | {
"repo_name": "Darsstar/framework",
"path": "compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java",
"license": "apache-2.0",
"size": 78641
} | [
"com.vaadin.client.WidgetUtil"
] | import com.vaadin.client.WidgetUtil; | import com.vaadin.client.*; | [
"com.vaadin.client"
] | com.vaadin.client; | 945,904 |
public Variable getParameter(int paramIndex) {
return getD().getParameter(paramIndex);
} | Variable function(int paramIndex) { return getD().getParameter(paramIndex); } | /**
* Method to return the Parameter by its paramIndex.
* @param paramIndex index of Parameter.
* @return the Parameter with given paramIndex.
* @throws ArrayIndexOutOfBoundesException if paramIndex out of bounds.
*/ | Method to return the Parameter by its paramIndex | getParameter | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/database/hierarchy/Cell.java",
"license": "gpl-3.0",
"size": 185659
} | [
"com.sun.electric.database.variable.Variable"
] | import com.sun.electric.database.variable.Variable; | import com.sun.electric.database.variable.*; | [
"com.sun.electric"
] | com.sun.electric; | 476,034 |
public XYToolTipGenerator getBaseToolTipGenerator();
/**
* Sets the base tool tip generator and sends a {@link RendererChangeEvent}
| XYToolTipGenerator function(); /** * Sets the base tool tip generator and sends a {@link RendererChangeEvent} | /**
* Returns the base tool tip generator.
*
* @return The generator (possibly <code>null</code>).
*
* @see #setBaseToolTipGenerator(XYToolTipGenerator)
*
* @since 1.0.14
*/ | Returns the base tool tip generator | getBaseToolTipGenerator | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/chart/renderer/PolarItemRenderer.java",
"license": "lgpl-2.1",
"size": 7074
} | [
"org.jfree.chart.event.RendererChangeEvent",
"org.jfree.chart.labels.XYToolTipGenerator"
] | import org.jfree.chart.event.RendererChangeEvent; import org.jfree.chart.labels.XYToolTipGenerator; | import org.jfree.chart.event.*; import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,906,416 |
private void setReactionToList(ListOf<Reaction> lor){
long max = lor.size();
for(int i = 0; i < max; i++){
Reaction r = lor.get(i);
memberList.add(r.clone());
}
}
| void function(ListOf<Reaction> lor){ long max = lor.size(); for(int i = 0; i < max; i++){ Reaction r = lor.get(i); memberList.add(r.clone()); } } | /**
* Sets the new reaction to the list.
*
* @param lor the new reaction to the list
*/ | Sets the new reaction to the list | setReactionToList | {
"repo_name": "spatialsimulator/XitoSBML",
"path": "src/main/java/jp/ac/keio/bio/fun/xitosbml/pane/ReactionTable.java",
"license": "apache-2.0",
"size": 6351
} | [
"org.sbml.jsbml.ListOf",
"org.sbml.jsbml.Reaction"
] | import org.sbml.jsbml.ListOf; import org.sbml.jsbml.Reaction; | import org.sbml.jsbml.*; | [
"org.sbml.jsbml"
] | org.sbml.jsbml; | 1,223,726 |
public boolean isCamelRouteStart(PsiElement element) {
return enabledExtensions.stream()
.anyMatch(extension -> extension.isCamelRouteStart(element));
} | boolean function(PsiElement element) { return enabledExtensions.stream() .anyMatch(extension -> extension.isCamelRouteStart(element)); } | /**
* Is the given element from the start of a Camel route, eg <tt>from</tt>, ot <from>.
*/ | Is the given element from the start of a Camel route, eg from, ot <from> | isCamelRouteStart | {
"repo_name": "camel-idea-plugin/camel-idea-plugin",
"path": "camel-idea-plugin/src/main/java/com/github/cameltooling/idea/util/CamelIdeaUtils.java",
"license": "apache-2.0",
"size": 10336
} | [
"com.intellij.psi.PsiElement"
] | import com.intellij.psi.PsiElement; | import com.intellij.psi.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 1,600,173 |
public ClientBuilder<T> handlers(Handler... handlers) {
this.handlers = ImmutableList.<Handler>builder().add(handlers).build();
return this;
} | ClientBuilder<T> function(Handler... handlers) { this.handlers = ImmutableList.<Handler>builder().add(handlers).build(); return this; } | /**
* Add client side JAX-WS handlers.
* @param handlers JAX-WS handlers.
* @return ClientBuilder instance.
*/ | Add client side JAX-WS handlers | handlers | {
"repo_name": "jasongardnerlv/alakazam",
"path": "alakazam-ws/src/main/java/io/alakazam/jaxws/ClientBuilder.java",
"license": "apache-2.0",
"size": 3443
} | [
"com.google.common.collect.ImmutableList",
"javax.xml.ws.handler.Handler"
] | import com.google.common.collect.ImmutableList; import javax.xml.ws.handler.Handler; | import com.google.common.collect.*; import javax.xml.ws.handler.*; | [
"com.google.common",
"javax.xml"
] | com.google.common; javax.xml; | 998,564 |
public ResetPasswordRequest sendResetPassword(final User user) throws DataOperationException {
final long code = RandomUtils.getRandomNumber(1000000000000000L, 9999999999999999L);
final ResetPasswordRequest rpr = new ResetPasswordRequest();
rpr.setId(new ResetPasswordRequestId(UUID.randomUUID().toString()));
... | ResetPasswordRequest function(final User user) throws DataOperationException { final long code = RandomUtils.getRandomNumber(1000000000000000L, 9999999999999999L); final ResetPasswordRequest rpr = new ResetPasswordRequest(); rpr.setId(new ResetPasswordRequestId(UUID.randomUUID().toString())); rpr.setUserId(user.getId()... | /**
* Sends a reset password request to the particular user.
*
* @param user
* @return The ResetPasswordRequest if creation/transport was successful.
* Will not return null.
* @throws DataOperationException
* If the query could not be executed.
*/ | Sends a reset password request to the particular user | sendResetPassword | {
"repo_name": "efsavage/ajah",
"path": "ajah-user/src/main/java/com/ajah/user/resetpw/data/ResetPasswordRequestManager.java",
"license": "apache-2.0",
"size": 3842
} | [
"com.ajah.spring.jdbc.err.DataOperationException",
"com.ajah.user.User",
"com.ajah.user.resetpw.ResetPasswordRequest",
"com.ajah.user.resetpw.ResetPasswordRequestId",
"com.ajah.user.resetpw.ResetPasswordRequestStatus",
"com.ajah.util.RandomUtils",
"java.util.Date",
"java.util.UUID"
] | import com.ajah.spring.jdbc.err.DataOperationException; import com.ajah.user.User; import com.ajah.user.resetpw.ResetPasswordRequest; import com.ajah.user.resetpw.ResetPasswordRequestId; import com.ajah.user.resetpw.ResetPasswordRequestStatus; import com.ajah.util.RandomUtils; import java.util.Date; import java.util.UU... | import com.ajah.spring.jdbc.err.*; import com.ajah.user.*; import com.ajah.user.resetpw.*; import com.ajah.util.*; import java.util.*; | [
"com.ajah.spring",
"com.ajah.user",
"com.ajah.util",
"java.util"
] | com.ajah.spring; com.ajah.user; com.ajah.util; java.util; | 841,045 |
private boolean checkGlobalPermissions(String authority)
{
for (PermissionEntry pe : modelDAO.getGlobalPermissionEntries())
{
if (isDenied(pe, authority))
{
return true;
}
}
retur... | boolean function(String authority) { for (PermissionEntry pe : modelDAO.getGlobalPermissionEntries()) { if (isDenied(pe, authority)) { return true; } } return false; } | /**
* Check if we have a global permission
*
* @param authority String
* @return true if granted
*/ | Check if we have a global permission | checkGlobalPermissions | {
"repo_name": "loftuxab/alfresco-community-loftux",
"path": "projects/repository/source/java/org/alfresco/repo/security/permissions/impl/PermissionServiceImpl.java",
"license": "lgpl-3.0",
"size": 108452
} | [
"org.alfresco.repo.security.permissions.PermissionEntry"
] | import org.alfresco.repo.security.permissions.PermissionEntry; | import org.alfresco.repo.security.permissions.*; | [
"org.alfresco.repo"
] | org.alfresco.repo; | 157,511 |
@DbRead
public void listUserWithAContrat()
{
EntityManager em = TransactionHelper.getEm();
Query q = em.createQuery("select u from Utilisateur u WHERE EXISTS (select c from Contrat c where c.utilisateur = u)");
//q.setParameter("mc","nom_a");
List<Utilisateur> us = q.getResultList();
for (Utilisateur ... | void function() { EntityManager em = TransactionHelper.getEm(); Query q = em.createQuery(STR); List<Utilisateur> us = q.getResultList(); for (Utilisateur u : us) { System.out.println(STR+u.getNom()+STR+u.getPrenom()); } } | /**
* Retourne la liste des utilisateurs ayant au moins un contrat
*/ | Retourne la liste des utilisateurs ayant au moins un contrat | listUserWithAContrat | {
"repo_name": "amapj/amapj",
"path": "amapj/src/fr/amapj/model/samples/query/SelectDbUtilisateurHsql.java",
"license": "agpl-3.0",
"size": 6106
} | [
"fr.amapj.model.engine.transaction.TransactionHelper",
"fr.amapj.model.models.fichierbase.Utilisateur",
"java.util.List",
"javax.persistence.EntityManager",
"javax.persistence.Query"
] | import fr.amapj.model.engine.transaction.TransactionHelper; import fr.amapj.model.models.fichierbase.Utilisateur; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; | import fr.amapj.model.engine.transaction.*; import fr.amapj.model.models.fichierbase.*; import java.util.*; import javax.persistence.*; | [
"fr.amapj.model",
"java.util",
"javax.persistence"
] | fr.amapj.model; java.util; javax.persistence; | 284,126 |
public static boolean isSupportedByUserStore(UserStoreManager userStoreManager, String operation) {
boolean isOperationSupported = true;
if (userStoreManager != null) {
String isOperationSupportedProperty = userStoreManager.getRealmConfiguration().getUserStoreProperty
... | static boolean function(UserStoreManager userStoreManager, String operation) { boolean isOperationSupported = true; if (userStoreManager != null) { String isOperationSupportedProperty = userStoreManager.getRealmConfiguration().getUserStoreProperty (operation); if (StringUtils.isNotBlank(isOperationSupportedProperty)) {... | /**
* Returns whether the passed operation is supported by userstore or not
*
* @param userStoreManager User Store
* @param operation Operation name
* @return true if the operation is supported by userstore. False if it doesnt
*/ | Returns whether the passed operation is supported by userstore or not | isSupportedByUserStore | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/identity-core/org.wso2.carbon.identity.core/src/main/java/org/wso2/carbon/identity/core/util/IdentityUtil.java",
"license": "apache-2.0",
"size": 73793
} | [
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.user.core.UserStoreManager"
] | import org.apache.commons.lang.StringUtils; import org.wso2.carbon.user.core.UserStoreManager; | import org.apache.commons.lang.*; import org.wso2.carbon.user.core.*; | [
"org.apache.commons",
"org.wso2.carbon"
] | org.apache.commons; org.wso2.carbon; | 90,479 |
public static Process startProcess(String name,
ProcessBuilder processBuilder)
throws IOException {
return startProcess(name, processBuilder, null);
}
/**
* <p>Starts a process from its builder.</p>
* <span>The default redirects of STDOUT and STD... | static Process function(String name, ProcessBuilder processBuilder) throws IOException { return startProcess(name, processBuilder, null); } /** * <p>Starts a process from its builder.</p> * <span>The default redirects of STDOUT and STDERR are started</span> * <p>It is possible to monitor the in-streams via the provided... | /**
* <p>Starts a process from its builder.</p>
* <span>The default redirects of STDOUT and STDERR are started</span>
* @param name The process name
* @param processBuilder The process builder
* @return Returns the initialized process
* @throws IOException
*/ | Starts a process from its builder. The default redirects of STDOUT and STDERR are started | startProcess | {
"repo_name": "isaacl/openjdk-jdk",
"path": "test/lib/testlibrary/jdk/testlibrary/ProcessTools.java",
"license": "gpl-2.0",
"size": 14035
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 991,748 |
private static String getAbsolutePath(String directory) {
String realPath = Paths.get(directory).toAbsolutePath().toString();
String separator = FileSystems.getDefault().getSeparator();
if (!realPath.endsWith(separator)) {
realPath += separator;
}
return rea... | static String function(String directory) { String realPath = Paths.get(directory).toAbsolutePath().toString(); String separator = FileSystems.getDefault().getSeparator(); if (!realPath.endsWith(separator)) { realPath += separator; } return realPath; } | /**
* Returns the absolute path for the given {@code directory}.
* <p>
* The path is terminated with a separator.
*
* @param directory the directory whose path will be made absolute
* @return the absolute path for the given {@code directory}, terminated with a separator
* @sin... | Returns the absolute path for the given directory. The path is terminated with a separator | getAbsolutePath | {
"repo_name": "gsavastano/zaproxy",
"path": "src/org/parosproxy/paros/Constant.java",
"license": "apache-2.0",
"size": 46893
} | [
"java.nio.file.FileSystems",
"java.nio.file.Paths"
] | import java.nio.file.FileSystems; import java.nio.file.Paths; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 40,043 |
public static BufferedImage resizeImage(BufferedImage image, int type, int maxWidth, int maxHeight) {
Dimension largestDimension = new Dimension(maxWidth, maxHeight);
// Original size
int imageWidth = image.getWidth(null);
int imageHeight = image.getHeight(null);
flo... | static BufferedImage function(BufferedImage image, int type, int maxWidth, int maxHeight) { Dimension largestDimension = new Dimension(maxWidth, maxHeight); int imageWidth = image.getWidth(null); int imageHeight = image.getHeight(null); float aspectRatio = (float) imageWidth / imageHeight; if (imageWidth > maxWidth ima... | /**
* Resizes an image.
*
* @param image The image to resize
* @param maxWidth The image's max width
* @param maxHeight The image's max height
* @param type int code jpeg, png or gif
* @return A resized <code>BufferedImage</code>
*/ | Resizes an image | resizeImage | {
"repo_name": "Elishtar/jcommune",
"path": "jcommune-view/jcommune-web-controller/src/main/java/org/jtalks/jcommune/web/util/ImageUtil.java",
"license": "lgpl-2.1",
"size": 8303
} | [
"java.awt.Dimension",
"java.awt.image.BufferedImage"
] | import java.awt.Dimension; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,895,860 |
private WeightedObservedPoint[] getInterpolationPointsForY(WeightedObservedPoint[] points,
int startIdx, int idxStep, double y)
throws OutOfRangeException {
if (idxStep == 0) {
throw new ZeroException();
... | WeightedObservedPoint[] function(WeightedObservedPoint[] points, int startIdx, int idxStep, double y) throws OutOfRangeException { if (idxStep == 0) { throw new ZeroException(); } for (int i = startIdx; (idxStep < 0) ? (i + idxStep >= 0) : (i + idxStep < points.length); i += idxStep) { if (isBetween(y, points[i].getY()... | /**
* Gets the two bounding interpolation points from the specified points
* suitable for determining X at the specified Y.
*
* @param points Points to use for interpolation.
* @param startIdx Index within points from which to start search for
* interpolation bounds... | Gets the two bounding interpolation points from the specified points suitable for determining X at the specified Y | getInterpolationPointsForY | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_50v2/src/main/java/org/apache/commons/math/optimization/fitting/GaussianFitter.java",
"license": "gpl-2.0",
"size": 13565
} | [
"org.apache.commons.math.exception.OutOfRangeException",
"org.apache.commons.math.exception.ZeroException",
"org.apache.commons.math.optimization.fitting.WeightedObservedPoint"
] | import org.apache.commons.math.exception.OutOfRangeException; import org.apache.commons.math.exception.ZeroException; import org.apache.commons.math.optimization.fitting.WeightedObservedPoint; | import org.apache.commons.math.exception.*; import org.apache.commons.math.optimization.fitting.*; | [
"org.apache.commons"
] | org.apache.commons; | 78,162 |
public static final Atom[] getAtomArray(Chain c, String[] atomNames){
List<Group> groups = c.getAtomGroups();
List<Atom> atoms = new ArrayList<Atom>();
for (Group g : groups){
// a temp container for the atoms of this group
List<Atom> thisGroupAtoms = new ArrayList<Atom>();
// flag to check if thi... | static final Atom[] function(Chain c, String[] atomNames){ List<Group> groups = c.getAtomGroups(); List<Atom> atoms = new ArrayList<Atom>(); for (Group g : groups){ List<Atom> thisGroupAtoms = new ArrayList<Atom>(); boolean thisGroupAllAtoms = true; for ( int i = 0 ; i < atomNames.length; i++){ String atomName = atomNa... | /** Returns an array of the requested Atoms from the Structure object. Iterates over all groups
* and checks if the requested atoms are in this group, no matter if this is a AminoAcid or Hetatom group.
*
*
* @param c the Chain to get the atoms from
*
* @param atomNames contains the atom names to be used.
... | Returns an array of the requested Atoms from the Structure object. Iterates over all groups and checks if the requested atoms are in this group, no matter if this is a AminoAcid or Hetatom group | getAtomArray | {
"repo_name": "kumar-physics/BioJava",
"path": "biojava3-structure/src/main/java/org/biojava/bio/structure/StructureTools.java",
"license": "lgpl-2.1",
"size": 38927
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 822,094 |
public void disconnectFromNodesExcept(DiscoveryNodes nodesToKeep) {
Set<DiscoveryNode> currentNodes = new HashSet<>(nodes.keySet());
for (DiscoveryNode node : nodesToKeep) {
currentNodes.remove(node);
}
for (final DiscoveryNode node : currentNodes) {
try (Rele... | void function(DiscoveryNodes nodesToKeep) { Set<DiscoveryNode> currentNodes = new HashSet<>(nodes.keySet()); for (DiscoveryNode node : nodesToKeep) { currentNodes.remove(node); } for (final DiscoveryNode node : currentNodes) { try (Releasable ignored = nodeLocks.acquire(node)) { Integer current = nodes.remove(node); as... | /**
* Disconnects from all nodes except the ones provided as parameter
*/ | Disconnects from all nodes except the ones provided as parameter | disconnectFromNodesExcept | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/cluster/NodeConnectionsService.java",
"license": "apache-2.0",
"size": 9175
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.logging.log4j.message.ParameterizedMessage",
"org.apache.logging.log4j.util.Supplier",
"org.elasticsearch.cluster.node.DiscoveryNode",
"org.elasticsearch.cluster.node.DiscoveryNodes",
"org.elasticsearch.common.lease.Releasable"
] | import java.util.HashSet; import java.util.Set; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.util.Supplier; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.common.lease.Releasable; | import java.util.*; import org.apache.logging.log4j.message.*; import org.apache.logging.log4j.util.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.common.lease.*; | [
"java.util",
"org.apache.logging",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | java.util; org.apache.logging; org.elasticsearch.cluster; org.elasticsearch.common; | 2,585,103 |
boolean validateSession(HttpServletRequest request) throws ServiceLayerException; | boolean validateSession(HttpServletRequest request) throws ServiceLayerException; | /**
* Validate user's active session
*
* @param request
* @return true if user session is valid
*/ | Validate user's active session | validateSession | {
"repo_name": "craftercms/studio2",
"path": "src/main/java/org/craftercms/studio/api/v1/service/security/SecurityService.java",
"license": "gpl-3.0",
"size": 5085
} | [
"javax.servlet.http.HttpServletRequest",
"org.craftercms.studio.api.v1.exception.ServiceLayerException"
] | import javax.servlet.http.HttpServletRequest; import org.craftercms.studio.api.v1.exception.ServiceLayerException; | import javax.servlet.http.*; import org.craftercms.studio.api.v1.exception.*; | [
"javax.servlet",
"org.craftercms.studio"
] | javax.servlet; org.craftercms.studio; | 1,301,778 |
private void releaseWriteLocksForClear(RegionEventImpl regionEvent,
Set<InternalDistributedMember> participants) {
ARMLockTestHook armLockTestHook = getRegionMap().getARMLockTestHook();
if (armLockTestHook != null) {
armLockTestHook.beforeRelease(this, regionEvent);
}
getVersionVector().... | void function(RegionEventImpl regionEvent, Set<InternalDistributedMember> participants) { ARMLockTestHook armLockTestHook = getRegionMap().getARMLockTestHook(); if (armLockTestHook != null) { armLockTestHook.beforeRelease(this, regionEvent); } getVersionVector().unlockForClear(getMyId()); DistributedClearOperation.rele... | /**
* releases the locks obtained in obtainWriteLocksForClear
*/ | releases the locks obtained in obtainWriteLocksForClear | releaseWriteLocksForClear | {
"repo_name": "prasi-in/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java",
"license": "apache-2.0",
"size": 146271
} | [
"java.util.Set",
"org.apache.geode.distributed.internal.membership.InternalDistributedMember",
"org.apache.geode.internal.cache.AbstractRegionMap"
] | import java.util.Set; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; import org.apache.geode.internal.cache.AbstractRegionMap; | import java.util.*; import org.apache.geode.distributed.internal.membership.*; import org.apache.geode.internal.cache.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 2,143,735 |
protected final void checkIfClosed()
throws SQLException
{
if (isClosed()) {
throw ExceptionFactory.getInstance().getSQLException(
SQLState.ALREADY_CLOSED, null, null,
new Object[]{ "Statement" });
}
} | final void function() throws SQLException { if (isClosed()) { throw ExceptionFactory.getInstance().getSQLException( SQLState.ALREADY_CLOSED, null, null, new Object[]{ STR }); } } | /**
* Checks if the statement is closed and throws an exception if it
* is.
*
* @exception SQLException if the statement is closed
*/ | Checks if the statement is closed and throws an exception if it is | checkIfClosed | {
"repo_name": "scnakandala/derby",
"path": "java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java",
"license": "apache-2.0",
"size": 21761
} | [
"java.sql.SQLException",
"org.apache.derby.iapi.reference.SQLState"
] | import java.sql.SQLException; import org.apache.derby.iapi.reference.SQLState; | import java.sql.*; import org.apache.derby.iapi.reference.*; | [
"java.sql",
"org.apache.derby"
] | java.sql; org.apache.derby; | 2,267,283 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.