method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public List<RenameOpResult> unscheduleCompactionFileId(HoodieFileGroupId fgId, boolean skipValidation, boolean dryRun) throws Exception { HoodieTableMetaClient metaClient = new HoodieTableMetaClient(jsc.hadoopConfiguration(), basePath); List<Pair<HoodieLogFile, HoodieLogFile>> renameActions = ge...
List<RenameOpResult> function(HoodieFileGroupId fgId, boolean skipValidation, boolean dryRun) throws Exception { HoodieTableMetaClient metaClient = new HoodieTableMetaClient(jsc.hadoopConfiguration(), basePath); List<Pair<HoodieLogFile, HoodieLogFile>> renameActions = getRenamingActionsForUnschedulingCompactionForFileI...
/** * Remove a fileId from pending compaction. Removes the associated compaction operation and rename delta-files * that were generated for that file-id after the compaction operation was scheduled. * * This operation MUST be executed with compactions and writer turned OFF. * * @param fgId F...
Remove a fileId from pending compaction. Removes the associated compaction operation and rename delta-files that were generated for that file-id after the compaction operation was scheduled. This operation MUST be executed with compactions and writer turned OFF
unscheduleCompactionFileId
{ "repo_name": "vinothchandar/hoodie", "path": "hoodie-client/src/main/java/com/uber/hoodie/CompactionAdminClient.java", "license": "apache-2.0", "size": 27552 }
[ "com.google.common.base.Optional", "com.uber.hoodie.avro.model.HoodieCompactionOperation", "com.uber.hoodie.avro.model.HoodieCompactionPlan", "com.uber.hoodie.common.model.HoodieFileGroupId", "com.uber.hoodie.common.model.HoodieLogFile", "com.uber.hoodie.common.table.HoodieTableMetaClient", "com.uber.ho...
import com.google.common.base.Optional; import com.uber.hoodie.avro.model.HoodieCompactionOperation; import com.uber.hoodie.avro.model.HoodieCompactionPlan; import com.uber.hoodie.common.model.HoodieFileGroupId; import com.uber.hoodie.common.model.HoodieLogFile; import com.uber.hoodie.common.table.HoodieTableMetaClient...
import com.google.common.base.*; import com.uber.hoodie.avro.model.*; import com.uber.hoodie.common.model.*; import com.uber.hoodie.common.table.*; import com.uber.hoodie.common.table.timeline.*; import com.uber.hoodie.common.util.*; import com.uber.hoodie.common.util.collection.*; import java.util.*; import java.util....
[ "com.google.common", "com.uber.hoodie", "java.util", "org.apache.hadoop" ]
com.google.common; com.uber.hoodie; java.util; org.apache.hadoop;
2,129,961
@Generated @Selector("initWithDevice:isSecondarySourceFilter:") public native MPSCNNSubtractGradient initWithDeviceIsSecondarySourceFilter( @Mapped(ObjCObjectMapper.class) MTLDevice device, boolean isSecondarySourceFilter);
@Selector(STR) native MPSCNNSubtractGradient function( @Mapped(ObjCObjectMapper.class) MTLDevice device, boolean isSecondarySourceFilter);
/** * Initialize the subtraction gradient operator. * * @param device The device the filter will run on. * @param isSecondarySourceFilter A boolean indicating whether the arithmetic gradient * filter is operating on the primary or secondary source...
Initialize the subtraction gradient operator
initWithDeviceIsSecondarySourceFilter
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSCNNSubtractGradient.java", "license": "apache-2.0", "size": 6987 }
[ "org.moe.natj.general.ann.Mapped", "org.moe.natj.objc.ann.Selector", "org.moe.natj.objc.map.ObjCObjectMapper" ]
import org.moe.natj.general.ann.Mapped; import org.moe.natj.objc.ann.Selector; import org.moe.natj.objc.map.ObjCObjectMapper;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; import org.moe.natj.objc.map.*;
[ "org.moe.natj" ]
org.moe.natj;
459,023
EAttribute getAttributeCollectionInsertion_AddedValue();
EAttribute getAttributeCollectionInsertion_AddedValue();
/** * Returns the meta object for the attribute '{@link Changes.AttributeCollectionInsertion#getAddedValue <em>Added Value</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Added Value</em>'. * @see Changes.AttributeCollectionInsertion#getAddedValue() ...
Returns the meta object for the attribute '<code>Changes.AttributeCollectionInsertion#getAddedValue Added Value</code>'.
getAttributeCollectionInsertion_AddedValue
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.changes/src/Changes/ChangesPackage.java", "license": "mit", "size": 83724 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
255,770
public synchronized void parseCatalog(String mimeType, InputStream is) throws IOException, CatalogException { default_override = catalogManager.getPreferPublic(); catalogManager.debug.message(4, "Parse " + mimeType + " catalog on input stream"); CatalogReader reader = null; if (readerMap.contai...
synchronized void function(String mimeType, InputStream is) throws IOException, CatalogException { default_override = catalogManager.getPreferPublic(); catalogManager.debug.message(4, STR + mimeType + STR); CatalogReader reader = null; if (readerMap.containsKey(mimeType)) { int arrayPos = ((Integer) readerMap.get(mimeT...
/** * Parse a catalog file, augmenting internal data structures. * * <p>Catalogs retrieved over the net may have an associated MIME type. * The MIME type can be used to select an appropriate reader.</p> * * @param mimeType The MIME type of the catalog file. * @param is The InputStream from which th...
Parse a catalog file, augmenting internal data structures. Catalogs retrieved over the net may have an associated MIME type. The MIME type can be used to select an appropriate reader
parseCatalog
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xml/internal/resolver/Catalog.java", "license": "mit", "size": 75398 }
[ "com.sun.org.apache.xml.internal.resolver.readers.CatalogReader", "java.io.IOException", "java.io.InputStream" ]
import com.sun.org.apache.xml.internal.resolver.readers.CatalogReader; import java.io.IOException; import java.io.InputStream;
import com.sun.org.apache.xml.internal.resolver.readers.*; import java.io.*;
[ "com.sun.org", "java.io" ]
com.sun.org; java.io;
1,095,290
static CalculationJob blacklist(final FunctionBlacklistQuery query, final CalculationJob job) { if (query.isEmpty()) { return job; } final List<CalculationJobItem> originalItems = job.getJobItems(); final int size = originalItems.size(); for (int i = 0; i < size; i++) { CalculationJobI...
static CalculationJob blacklist(final FunctionBlacklistQuery query, final CalculationJob job) { if (query.isEmpty()) { return job; } final List<CalculationJobItem> originalItems = job.getJobItems(); final int size = originalItems.size(); for (int i = 0; i < size; i++) { CalculationJobItem item = originalItems.get(i); i...
/** * Replaces any blacklisted job items with no-op functions. This keeps the shape of the job the same and may allow continuation of dependent jobs that can * operate on missing inputs. * * @param query * the blacklist * @param job * the original calculation job * @return the...
Replaces any blacklisted job items with no-op functions. This keeps the shape of the job the same and may allow continuation of dependent jobs that can operate on missing inputs
blacklist
{ "repo_name": "McLeodMoores/starling", "path": "projects/engine/src/main/java/com/opengamma/engine/calcnode/RemoteNodeJobInvoker.java", "license": "apache-2.0", "size": 18011 }
[ "com.opengamma.engine.function.NoOpFunction", "com.opengamma.engine.function.blacklist.FunctionBlacklistQuery", "com.opengamma.engine.view.ExecutionLogMode", "java.util.ArrayList", "java.util.List" ]
import com.opengamma.engine.function.NoOpFunction; import com.opengamma.engine.function.blacklist.FunctionBlacklistQuery; import com.opengamma.engine.view.ExecutionLogMode; import java.util.ArrayList; import java.util.List;
import com.opengamma.engine.function.*; import com.opengamma.engine.function.blacklist.*; import com.opengamma.engine.view.*; import java.util.*;
[ "com.opengamma.engine", "java.util" ]
com.opengamma.engine; java.util;
2,139,212
@Test public void testGetUserNotificationSchemasByAppId() throws Exception { NotificationSchemaDto schemaDto = createNotificationSchema(null, NotificationTypeDto.USER); Assert.assertNotNull(schemaDto.getId()); LOG.debug("Create notification schema with id {}", schemaDto.getId()); ...
void function() throws Exception { NotificationSchemaDto schemaDto = createNotificationSchema(null, NotificationTypeDto.USER); Assert.assertNotNull(schemaDto.getId()); LOG.debug(STR, schemaDto.getId()); List<VersionDto> foundSchema = client.getUserNotificationSchemas(schemaDto.getApplicationId()); Assert.assertFalse(fo...
/** * Test get user notification schemas by app id. * * @throws Exception the exception */
Test get user notification schemas by app id
testGetUserNotificationSchemasByAppId
{ "repo_name": "abohomol/kaa", "path": "server/node/src/test/java/org/kaaproject/kaa/server/control/ControlServerNotificationSchemaIT.java", "license": "apache-2.0", "size": 4524 }
[ "java.util.List", "org.junit.Assert", "org.kaaproject.kaa.common.dto.NotificationSchemaDto", "org.kaaproject.kaa.common.dto.NotificationTypeDto", "org.kaaproject.kaa.common.dto.VersionDto" ]
import java.util.List; import org.junit.Assert; import org.kaaproject.kaa.common.dto.NotificationSchemaDto; import org.kaaproject.kaa.common.dto.NotificationTypeDto; import org.kaaproject.kaa.common.dto.VersionDto;
import java.util.*; import org.junit.*; import org.kaaproject.kaa.common.dto.*;
[ "java.util", "org.junit", "org.kaaproject.kaa" ]
java.util; org.junit; org.kaaproject.kaa;
376,266
@Override public List<String> resolve(GenericAttributeResolveRequest request) throws AttributeResolveException { List<String> result = new ArrayList<>(); try { Map<String, Object> config = getAppConfig(request.getSite(), MAPRFSResourceWebResource.MAPRFS_APPLICATION); ...
List<String> function(GenericAttributeResolveRequest request) throws AttributeResolveException { List<String> result = new ArrayList<>(); try { Map<String, Object> config = getAppConfig(request.getSite(), MAPRFSResourceWebResource.MAPRFS_APPLICATION); Configuration conf = convert(config); HDFSFileSystem fileSystem = ne...
/** * MAPRFS Resource Resolve API * * returns listOfPaths */
MAPRFS Resource Resolve API returns listOfPaths
resolve
{ "repo_name": "anyway1021/incubator-eagle", "path": "eagle-security/eagle-security-maprfs-web/src/main/java/org/apache/eagle/service/security/hdfs/resolver/MAPRFSResourceResolver.java", "license": "apache-2.0", "size": 6658 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.eagle.service.alert.resolver.AttributeResolveException", "org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException", "org.apache.eagle.service.alert.resolver.G...
import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.eagle.service.alert.resolver.AttributeResolveException; import org.apache.eagle.service.alert.resolver.BadAttributeResolveRequestException; import org.apache.eagle.s...
import java.util.*; import java.util.regex.*; import org.apache.eagle.service.alert.resolver.*; import org.apache.eagle.service.security.hdfs.*; import org.apache.eagle.service.security.hdfs.rest.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*;
[ "java.util", "org.apache.eagle", "org.apache.hadoop" ]
java.util; org.apache.eagle; org.apache.hadoop;
625,788
private List<TriangularFacet> createFacets(final Horizon horizon, final Vertex vTop) { List<TriangularFacet> newFacets = new ArrayList<>(); Vertex vLeft, vRight; // triangles 1 to n for (int i = 1; i < horizon.size(); i++) { vLeft = horizon.getVertex(i - 1); vRight = horizon.getVertex(i); Trian...
List<TriangularFacet> function(final Horizon horizon, final Vertex vTop) { List<TriangularFacet> newFacets = new ArrayList<>(); Vertex vLeft, vRight; for (int i = 1; i < horizon.size(); i++) { vLeft = horizon.getVertex(i - 1); vRight = horizon.getVertex(i); TriangularFacet f = new TriangularFacet(vRight, vTop, vLeft); ...
/** * Adds for each edge of the horizon and vTop a new facet. * * @param horizon facet of all facets seen from point vTop * @param vTop point which is added to the convex hull * @return new created facets */
Adds for each edge of the horizon and vTop a new facet
createFacets
{ "repo_name": "imagej/imagej-ops", "path": "src/main/java/net/imagej/ops/geom/geom3d/DefaultConvexHull3D.java", "license": "bsd-2-clause", "size": 18617 }
[ "java.util.ArrayList", "java.util.List", "net.imagej.ops.geom.geom3d.mesh.Horizon", "net.imagej.ops.geom.geom3d.mesh.TriangularFacet", "net.imagej.ops.geom.geom3d.mesh.Vertex" ]
import java.util.ArrayList; import java.util.List; import net.imagej.ops.geom.geom3d.mesh.Horizon; import net.imagej.ops.geom.geom3d.mesh.TriangularFacet; import net.imagej.ops.geom.geom3d.mesh.Vertex;
import java.util.*; import net.imagej.ops.geom.geom3d.mesh.*;
[ "java.util", "net.imagej.ops" ]
java.util; net.imagej.ops;
1,820,994
private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException { List<Class> classes = new ArrayList<>(); if (!directory.exists()) { return classes; } File[] files = directory.listFiles(); for (File file : files) { if (file.isDirectory()) { assert ...
static List<Class> function(File directory, String packageName) throws ClassNotFoundException { List<Class> classes = new ArrayList<>(); if (!directory.exists()) { return classes; } File[] files = directory.listFiles(); for (File file : files) { if (file.isDirectory()) { assert !file.getName().contains("."); classes.ad...
/** * Recursive method used to find all classes in a given directory and * subdirs. * * @param directory The base directory * @param packageName The package name for classes found inside the base * directory * @return The classes * @throws ClassNotFoundException */
Recursive method used to find all classes in a given directory and subdirs
findClasses
{ "repo_name": "derkaiserreich/structr", "path": "structr-ui/src/test/java/org/structr/web/common/StructrUiTest.java", "license": "gpl-3.0", "size": 18420 }
[ "java.io.File", "java.util.ArrayList", "java.util.List" ]
import java.io.File; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,249,650
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<RunCommandResultInner>, RunCommandResultInner> beginRunCommandAsync( String resourceGroupName, String vmScaleSetName, String instanceId, RunCommandInput parameters);
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<RunCommandResultInner>, RunCommandResultInner> beginRunCommandAsync( String resourceGroupName, String vmScaleSetName, String instanceId, RunCommandInput parameters);
/** * Run command on a virtual machine in a VM scale set. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param instanceId The instance ID of the virtual machine. * @param parameters Capture Virtual Machine parameters. ...
Run command on a virtual machine in a VM scale set
beginRunCommandAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetVMsClient.java", "license": "mit", "size": 89951 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.compute.fluent.models.RunCommandResultInner", "com.azure.resourcemanager.compute.models.RunCommandInput" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.compute.fluent.models.RunCommandResultInner; import com.azure.resourcemanager.compute.models.R...
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.compute.fluent.models.*; import com.azure.resourcemanager.compute.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,740,671
void removeAllocationId(ShardRouting shardRouting) { if (shardRouting.active()) { changes(shardRouting.shardId()).removedAllocationIds.add(shardRouting.allocationId().getId()); } }
void removeAllocationId(ShardRouting shardRouting) { if (shardRouting.active()) { changes(shardRouting.shardId()).removedAllocationIds.add(shardRouting.allocationId().getId()); } }
/** * Remove allocation id of this shard from the set of in-sync shard copies */
Remove allocation id of this shard from the set of in-sync shard copies
removeAllocationId
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/cluster/routing/allocation/IndexMetaDataUpdater.java", "license": "apache-2.0", "size": 19038 }
[ "org.elasticsearch.cluster.routing.ShardRouting" ]
import org.elasticsearch.cluster.routing.ShardRouting;
import org.elasticsearch.cluster.routing.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
701,254
public ImageIcon getCountryFlag(final Resolution resolution) { return CountryFlagManager.getImageFor(this, resolution); }
ImageIcon function(final Resolution resolution) { return CountryFlagManager.getImageFor(this, resolution); }
/** * Get country flag image * * @param resolution * @return image */
Get country flag image
getCountryFlag
{ "repo_name": "leolewis/openvisualtraceroute", "path": "org.leo.traceroute/src/org/leo/traceroute/core/geo/GeoPoint.java", "license": "lgpl-3.0", "size": 4505 }
[ "javax.swing.ImageIcon", "org.leo.traceroute.resources.CountryFlagManager" ]
import javax.swing.ImageIcon; import org.leo.traceroute.resources.CountryFlagManager;
import javax.swing.*; import org.leo.traceroute.resources.*;
[ "javax.swing", "org.leo.traceroute" ]
javax.swing; org.leo.traceroute;
2,485,407
@Test public void testT1RV5D1_T1LV1D5() { test_id = getTestId("T1RV5D1", "T1LV1D5", "16"); String src = selectTRVD("T1RV5D1"); String dest = selectTLVD("T1LV1D5"); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace();...
void function() { test_id = getTestId(STR, STR, "16"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(Failure2, chec...
/** * Perform the test for the given matrix column (T1RV5D1) and row (T1LV1D5). * */
Perform the test for the given matrix column (T1RV5D1) and row (T1LV1D5)
testT1RV5D1_T1LV1D5
{ "repo_name": "jason-rhodes/bridgepoint", "path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_10_Generics.java", "license": "apache-2.0", "size": 160978 }
[ "org.xtuml.bp.ui.graphics.editor.GraphicalEditor" ]
import org.xtuml.bp.ui.graphics.editor.GraphicalEditor;
import org.xtuml.bp.ui.graphics.editor.*;
[ "org.xtuml.bp" ]
org.xtuml.bp;
1,761,700
public ComposeableAdapterFactory getRootAdapterFactory() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); }
ComposeableAdapterFactory function() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); }
/** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the root adapter factory that contains this factory.
getRootAdapterFactory
{ "repo_name": "KAMP-Research/KAMP", "path": "bundles/Toometa/de.uka.ipd.sdq.dsexplore.qml.contract.edit/src/de/uka/ipd/sdq/dsexplore/qml/contract/provider/QMLContractItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 16428 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
920,262
public static void storeMessage(Message message) { Timber.d("Storing persistent message"); sStoredMessage = message; }
static void function(Message message) { Timber.d(STR); sStoredMessage = message; }
/** * Store a persistent message to static variable * @param message Message to store */
Store a persistent message to static variable
storeMessage
{ "repo_name": "StKotok/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/anki/dialogs/DialogHandler.java", "license": "gpl-3.0", "size": 6782 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
2,766,778
Map<String, String> findByLocale(String locale);
Map<String, String> findByLocale(String locale);
/** * Finds all the key/translation pair for a locale. * * @param locale requested locale * @return map of key, translation */
Finds all the key/translation pair for a locale
findByLocale
{ "repo_name": "kavi87/i18n-function", "path": "rest/src/main/java/org/seedstack/i18n/rest/internal/messages/MessageFinder.java", "license": "mpl-2.0", "size": 759 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,623,701
protected void setupEventWriter(JobId jobId, String forcedJobStateOnShutDown) throws IOException { if (stagingDirPath == null) { LOG.error("Log Directory is null, returning"); throw new IOException("Missing Log Directory for History"); } MetaInfo oldFi = fileMap.get(jobId); Configur...
void function(JobId jobId, String forcedJobStateOnShutDown) throws IOException { if (stagingDirPath == null) { LOG.error(STR); throw new IOException(STR); } MetaInfo oldFi = fileMap.get(jobId); Configuration conf = getConfig(); Path historyFile = JobHistoryUtils.getStagingJobHistoryFile( stagingDirPath, jobId, startCou...
/** * Create an event writer for the Job represented by the jobID. * Writes out the job configuration to the log directory. * This should be the first call to history for a job * * @param jobId the jobId. * @param forcedJobStateOnShutDown * @throws IOException */
Create an event writer for the Job represented by the jobID. Writes out the job configuration to the log directory. This should be the first call to history for a job
setupEventWriter
{ "repo_name": "tecknowledgeable/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/jobhistory/JobHistoryEventHandler.java", "license": "apache-2.0", "size": 55360 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.Path", "org.apache.hadoop.mapred.JobConf", "org.apache.hadoop.mapreduce.MRJobConfig", "org.apache.hadoop.mapreduce.v2.api.records.JobId", "org.apache.hadoop.mapreduce.v2.jobh...
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.mapreduce.v2.api.records.JobId; import org.apache.h...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapred.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.v2.api.records.*; import org.apache.hadoop.mapreduce.v2.jobhistory.*; import org.apache.hadoop.security.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
747,677
for (ConsoleLogFilter f : ConsoleLogFilter.all()) { try { os = f.decorateLogger(this,os); } catch (IOException|InterruptedException e) { LOGGER.log(Level.WARNING, "Failed to filter log with "+f, e); } } return os; } /** * ...
for (ConsoleLogFilter f : ConsoleLogFilter.all()) { try { os = f.decorateLogger(this,os); } catch (IOException InterruptedException e) { LOGGER.log(Level.WARNING, STR+f, e); } } return os; } /** * {@inheritDoc}
/** * Uses {@link ConsoleLogFilter} to decorate logger. */
Uses <code>ConsoleLogFilter</code> to decorate logger
decorate
{ "repo_name": "kzantow/jenkins", "path": "core/src/main/java/hudson/slaves/SlaveComputer.java", "license": "mit", "size": 32862 }
[ "hudson.console.ConsoleLogFilter", "java.io.IOException", "java.util.logging.Level" ]
import hudson.console.ConsoleLogFilter; import java.io.IOException; import java.util.logging.Level;
import hudson.console.*; import java.io.*; import java.util.logging.*;
[ "hudson.console", "java.io", "java.util" ]
hudson.console; java.io; java.util;
2,647,489
public OVXMatch getMatch(){ return this.ovxmatch; }
OVXMatch function(){ return this.ovxmatch; }
/** * Get the OVXMatch * * @return the ovxmatch */
Get the OVXMatch
getMatch
{ "repo_name": "byyu/ovxforl2", "path": "src/main/java/net/onrc/openvirtex/elements/datapath/EntryPair.java", "license": "apache-2.0", "size": 2848 }
[ "net.onrc.openvirtex.protocol.OVXMatch" ]
import net.onrc.openvirtex.protocol.OVXMatch;
import net.onrc.openvirtex.protocol.*;
[ "net.onrc.openvirtex" ]
net.onrc.openvirtex;
507,162
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.common.model.edit/src/org/eclipse/emf/emfstore/internal/common/model/provider/IdentifiableElementItemProvider.java", "license": "epl-1.0", "size": 5021 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
315,290
void parse(String[] tokens, Collection<Edge<LongWritable, DoubleWritable>> edges) { for (int n = 1; n < tokens.length; n++) { String[] parts = weightSeparator.split(tokens[n]); edges.add(EdgeFactory.create(new LongWritable(Long.parseLong(parts[0])), new DoubleWritabl...
void parse(String[] tokens, Collection<Edge<LongWritable, DoubleWritable>> edges) { for (int n = 1; n < tokens.length; n++) { String[] parts = weightSeparator.split(tokens[n]); edges.add(EdgeFactory.create(new LongWritable(Long.parseLong(parts[0])), new DoubleWritable(Double.parseDouble(parts[1])))); } }
/** * Parse a set of tokens into a map ID -> weight. * @param tokens The tokens to be parsed. * @param edges The map that will contain the result of the parsing. */
Parse a set of tokens into a map ID -> weight
parse
{ "repo_name": "basio/graph", "path": "giraph-examples/src/main/java/org/apache/giraph/examples/NormalizingLongDoubleDoubleTextInputFormat.java", "license": "apache-2.0", "size": 5059 }
[ "java.util.Collection", "org.apache.giraph.edge.Edge", "org.apache.giraph.edge.EdgeFactory", "org.apache.hadoop.io.DoubleWritable", "org.apache.hadoop.io.LongWritable" ]
import java.util.Collection; import org.apache.giraph.edge.Edge; import org.apache.giraph.edge.EdgeFactory; import org.apache.hadoop.io.DoubleWritable; import org.apache.hadoop.io.LongWritable;
import java.util.*; import org.apache.giraph.edge.*; import org.apache.hadoop.io.*;
[ "java.util", "org.apache.giraph", "org.apache.hadoop" ]
java.util; org.apache.giraph; org.apache.hadoop;
2,815,004
public Dataset getInstanceInfo(String iuid, boolean supplement) throws FinderException { InstanceLocal il = instanceHome.findBySopIuid(iuid); Dataset ds = il.getAttributes(supplement); SeriesLocal series = il.getSeries(); ds.putAll( series.getAttributes(supplement)); StudyLocal study = series.getStu...
Dataset function(String iuid, boolean supplement) throws FinderException { InstanceLocal il = instanceHome.findBySopIuid(iuid); Dataset ds = il.getAttributes(supplement); SeriesLocal series = il.getSeries(); ds.putAll( series.getAttributes(supplement)); StudyLocal study = series.getStudy(); ds.putAll( study.getAttribut...
/** * Get the Info of an instance. * <p> * Info means the Dataset with all attributes stored in DB for the instance * (instance, series, study and patient attributes) * * @ejb.interface-method * @ejb.transaction type="Required" */
Get the Info of an instance. Info means the Dataset with all attributes stored in DB for the instance (instance, series, study and patient attributes)
getInstanceInfo
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4jboss-all/tags/DCM4CHEE_2_10_9/dcm4jboss-ejb/src/java/org/dcm4chex/archive/ejb/session/ContentManagerBean.java", "license": "apache-2.0", "size": 25448 }
[ "javax.ejb.FinderException", "org.dcm4che.data.Dataset", "org.dcm4chex.archive.ejb.interfaces.InstanceLocal", "org.dcm4chex.archive.ejb.interfaces.SeriesLocal", "org.dcm4chex.archive.ejb.interfaces.StudyLocal" ]
import javax.ejb.FinderException; import org.dcm4che.data.Dataset; import org.dcm4chex.archive.ejb.interfaces.InstanceLocal; import org.dcm4chex.archive.ejb.interfaces.SeriesLocal; import org.dcm4chex.archive.ejb.interfaces.StudyLocal;
import javax.ejb.*; import org.dcm4che.data.*; import org.dcm4chex.archive.ejb.interfaces.*;
[ "javax.ejb", "org.dcm4che.data", "org.dcm4chex.archive" ]
javax.ejb; org.dcm4che.data; org.dcm4chex.archive;
851,246
//the name of the service proxy interface to access external service public String getServiceProxyName () { return StringUtils.upperInitialCharacter( m_serviceName) + "Proxy"; }
String function () { return StringUtils.upperInitialCharacter( m_serviceName) + "Proxy"; }
/*********************************************************************** * * service proxy interface to access external service * **********************************************************************/
service proxy interface to access external service
getServiceProxyName
{ "repo_name": "debabratahazra/DS", "path": "designstudio/components/service/core/com.odcgroup.service.gen.t24/src/main/java/com/odcgroup/service/gen/t24/internal/cpp/umlservice/UMLServiceCppDescriptor.java", "license": "epl-1.0", "size": 18846 }
[ "com.odcgroup.service.gen.t24.internal.utils.StringUtils" ]
import com.odcgroup.service.gen.t24.internal.utils.StringUtils;
import com.odcgroup.service.gen.t24.internal.utils.*;
[ "com.odcgroup.service" ]
com.odcgroup.service;
706,046
@Test(expected = IllegalArgumentException.class) public void testGetPropertyValueListBlankPropertyName(){ CollectionsUtil.getPropertyValueList(list, " "); }
@Test(expected = IllegalArgumentException.class) void function(){ CollectionsUtil.getPropertyValueList(list, " "); }
/** * Test get property value list blank property name. */
Test get property value list blank property name
testGetPropertyValueListBlankPropertyName
{ "repo_name": "venusdrogon/feilong-core", "path": "src/test/java/com/feilong/core/util/collectionsutiltest/GetPropertyValueListTest.java", "license": "apache-2.0", "size": 3145 }
[ "com.feilong.core.util.CollectionsUtil", "org.junit.Test" ]
import com.feilong.core.util.CollectionsUtil; import org.junit.Test;
import com.feilong.core.util.*; import org.junit.*;
[ "com.feilong.core", "org.junit" ]
com.feilong.core; org.junit;
751,465
protected void customDetailView(Component component) { detailLayout.replace(selectedDetailLayout, component); selectedDetailLayout = component; }
void function(Component component) { detailLayout.replace(selectedDetailLayout, component); selectedDetailLayout = component; }
/** * Fills the detail part of the screen with a custom component * * @param component the custom component that will serve as the detail view */
Fills the detail part of the screen with a custom component
customDetailView
{ "repo_name": "opencirclesolutions/dynamo", "path": "dynamo-frontend/src/main/java/com/ocs/dynamo/ui/composite/layout/BaseSplitLayout.java", "license": "apache-2.0", "size": 14744 }
[ "com.vaadin.flow.component.Component" ]
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.*;
[ "com.vaadin.flow" ]
com.vaadin.flow;
509,878
private void createButtonArea(final Composite parent) { Composite compositeButtons = new Composite(parent, SWT.NONE); compositeButtons.setLayout(new GridLayout()); GridData gd_compositeButtons = new GridData(SWT.FILL, SWT.FILL, false, true); gd_compositeButtons.verticalIndent = 10; compositeButtons.setL...
void function(final Composite parent) { Composite compositeButtons = new Composite(parent, SWT.NONE); compositeButtons.setLayout(new GridLayout()); GridData gd_compositeButtons = new GridData(SWT.FILL, SWT.FILL, false, true); gd_compositeButtons.verticalIndent = 10; compositeButtons.setLayoutData(gd_compositeButtons); ...
/** * create the vertical area for the three main buttons. * * @param parent * the parent composite */
create the vertical area for the three main buttons
createButtonArea
{ "repo_name": "jcryptool/crypto", "path": "org.jcryptool.visual.rsa/src/org/jcryptool/visual/rsa/ui/RSAComposite.java", "license": "epl-1.0", "size": 57175 }
[ "org.eclipse.swt.events.SelectionAdapter", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.layout.GridLayout", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Composite", "org.jcryptool.core.util.colors.ColorService", "org.jcryptool.visual.rsa.Messages" ]
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.jcryptool.core.util.colors.ColorService; import org.jcryptool.visual.rsa.Messages;
import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.jcryptool.core.util.colors.*; import org.jcryptool.visual.rsa.*;
[ "org.eclipse.swt", "org.jcryptool.core", "org.jcryptool.visual" ]
org.eclipse.swt; org.jcryptool.core; org.jcryptool.visual;
517,223
@EventHandler(priority = EventPriority.LOW, ignoreCancelled=true) public void EndCrystalDamage(final EntityDamageByEntityEvent e) { if (e.getEntity() == null || !IslandGuard.inWorld(e.getEntity())) { return; } if (!(e.getEntity() instanceof EnderCrystal)) { return...
@EventHandler(priority = EventPriority.LOW, ignoreCancelled=true) void function(final EntityDamageByEntityEvent e) { if (e.getEntity() == null !IslandGuard.inWorld(e.getEntity())) { return; } if (!(e.getEntity() instanceof EnderCrystal)) { return; } Player p = null; if (e.getDamager() instanceof Player) { p = (Player) ...
/** * Handle end crystal damage by visitors * @param e - event */
Handle end crystal damage by visitors
EndCrystalDamage
{ "repo_name": "tastybento/acidisland", "path": "src/com/wasteofplastic/acidisland/listeners/IslandGuard1_9.java", "license": "gpl-2.0", "size": 23581 }
[ "com.wasteofplastic.acidisland.Island", "com.wasteofplastic.acidisland.Settings", "com.wasteofplastic.acidisland.util.Util", "com.wasteofplastic.acidisland.util.VaultHelper", "org.bukkit.ChatColor", "org.bukkit.entity.EnderCrystal", "org.bukkit.entity.Player", "org.bukkit.entity.Projectile", "org.bu...
import com.wasteofplastic.acidisland.Island; import com.wasteofplastic.acidisland.Settings; import com.wasteofplastic.acidisland.util.Util; import com.wasteofplastic.acidisland.util.VaultHelper; import org.bukkit.ChatColor; import org.bukkit.entity.EnderCrystal; import org.bukkit.entity.Player; import org.bukkit.entity...
import com.wasteofplastic.acidisland.*; import com.wasteofplastic.acidisland.util.*; import org.bukkit.*; import org.bukkit.entity.*; import org.bukkit.event.*; import org.bukkit.event.entity.*; import org.bukkit.projectiles.*;
[ "com.wasteofplastic.acidisland", "org.bukkit", "org.bukkit.entity", "org.bukkit.event", "org.bukkit.projectiles" ]
com.wasteofplastic.acidisland; org.bukkit; org.bukkit.entity; org.bukkit.event; org.bukkit.projectiles;
962,216
public synchronized void unloadLibrary(String name) throws InvalidLibraryException { boolean found = false; for (Iterator<Library> i = currentLibraries.iterator(); i.hasNext();) { Library library = i.next(); if (library.getName().equals(name)) { found = true; i.remove(); library.dismiss(); ...
synchronized void function(String name) throws InvalidLibraryException { boolean found = false; for (Iterator<Library> i = currentLibraries.iterator(); i.hasNext();) { Library library = i.next(); if (library.getName().equals(name)) { found = true; i.remove(); library.dismiss(); primitiveManager.deletePrimitiveInfo(libr...
/** * Unloads a previously loaded library. * * @param name of the library to be unloaded * @throws InvalidLibraryException if name is not a valid loaded library */
Unloads a previously loaded library
unloadLibrary
{ "repo_name": "gpiancastelli/tuprolog-5", "path": "src/alice/tuprolog/LibraryManager.java", "license": "lgpl-2.1", "size": 5408 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,030,539
public int getStackInputVoltage() throws TimeoutException, NotConnectedException { byte options = 0; boolean isResponseExpected = getResponseExpected(FUNCTION_GET_STACK_INPUT_VOLTAGE); if(isResponseExpected) { options = 8; } ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_STACK_INPU...
int function() throws TimeoutException, NotConnectedException { byte options = 0; boolean isResponseExpected = getResponseExpected(FUNCTION_GET_STACK_INPUT_VOLTAGE); if(isResponseExpected) { options = 8; } ByteBuffer bb = ipcon.createRequestBuffer(uid, (byte)8, FUNCTION_GET_STACK_INPUT_VOLTAGE, options, (byte)(0)); byt...
/** * Returns the stack input voltage in mV. The stack input voltage is the * voltage that is supplied via the stack, i.e. it is given by a * Step-Down or Step-Up Power Supply. */
Returns the stack input voltage in mV. The stack input voltage is the voltage that is supplied via the stack, i.e. it is given by a Step-Down or Step-Up Power Supply
getStackInputVoltage
{ "repo_name": "ezeeb/pipes-tinkerforge", "path": "src/main/java/com/tinkerforge/BrickServo.java", "license": "apache-2.0", "size": 40034 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
762,540
public SubResource sslCertificate() { return this.sslCertificate; }
SubResource function() { return this.sslCertificate; }
/** * Get sSL certificate resource of an application gateway. * * @return the sslCertificate value */
Get sSL certificate resource of an application gateway
sslCertificate
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/ApplicationGatewayHttpListener.java", "license": "mit", "size": 9123 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,403,037
public final <T> void add(InputControl<T> input) { ((AbstractInputControl<T>)input).setGroupInput(true); super.add(input); parent.add(input); }
final <T> void function(InputControl<T> input) { ((AbstractInputControl<T>)input).setGroupInput(true); super.add(input); parent.add(input); }
/** * Adds the input to this input group and its parent form. */
Adds the input to this input group and its parent form
add
{ "repo_name": "grignaak/jReform", "path": "src/org/jreform/internal/GroupImpl.java", "license": "apache-2.0", "size": 3434 }
[ "org.jreform.InputControl" ]
import org.jreform.InputControl;
import org.jreform.*;
[ "org.jreform" ]
org.jreform;
981,292
protected String layersBuildResourcePath(HttpServletRequest request, String digest) throws ConfigurationException { return "/api/build/" + digest; }
String function(HttpServletRequest request, String digest) throws ConfigurationException { return STR + digest; }
/** * Return full URL link for a build resource. * * @param request - Request param, used to access path info. * @param digest - Resource identifier * @return Full URL for build resource * @throws MalformedURLException */
Return full URL link for a build resource
layersBuildResourcePath
{ "repo_name": "aguadev/aguadev", "path": "html/dojo-1.8.3/dwb/src/main/java/org/dtk/resources/Build.java", "license": "mit", "size": 18651 }
[ "javax.servlet.http.HttpServletRequest", "org.dtk.resources.exceptions.ConfigurationException" ]
import javax.servlet.http.HttpServletRequest; import org.dtk.resources.exceptions.ConfigurationException;
import javax.servlet.http.*; import org.dtk.resources.exceptions.*;
[ "javax.servlet", "org.dtk.resources" ]
javax.servlet; org.dtk.resources;
2,864,644
EReference getPhaseTapChanger_PhaseVariationCurve();
EReference getPhaseTapChanger_PhaseVariationCurve();
/** * Returns the meta object for the reference '{@link gluemodel.CIM.IEC61970.Wires.PhaseTapChanger#getPhaseVariationCurve <em>Phase Variation Curve</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Phase Variation Curve</em>'. * @see gluemodel.CIM.IEC...
Returns the meta object for the reference '<code>gluemodel.CIM.IEC61970.Wires.PhaseTapChanger#getPhaseVariationCurve Phase Variation Curve</code>'.
getPhaseTapChanger_PhaseVariationCurve
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Wires/WiresPackage.java", "license": "mit", "size": 669840 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
533,559
Row getRow(UUID uuid);
Row getRow(UUID uuid);
/** * Get row with uuid from table * * @param uuid UUID of requested row * @return Row with given UUID */
Get row with uuid from table
getRow
{ "repo_name": "altamiracorp/honeycomb", "path": "storage-engine-proxy/src/main/java/com/nearinfinity/honeycomb/Table.java", "license": "apache-2.0", "size": 4672 }
[ "com.nearinfinity.honeycomb.mysql.Row" ]
import com.nearinfinity.honeycomb.mysql.Row;
import com.nearinfinity.honeycomb.mysql.*;
[ "com.nearinfinity.honeycomb" ]
com.nearinfinity.honeycomb;
1,091,685
@RequestMapping(value="report/export", method=RequestMethod.POST) @ResponseStatus(HttpStatus.OK) public void exportReport(@RequestParam String reportName, @RequestBody ReportResponse response, @RequestParam ExportType exportType, HttpServletResponse httpServletResponse) throws IOException,...
@RequestMapping(value=STR, method=RequestMethod.POST) @ResponseStatus(HttpStatus.OK) void function(@RequestParam String reportName, @RequestBody ReportResponse response, @RequestParam ExportType exportType, HttpServletResponse httpServletResponse) throws IOException, ValidationException, OPMException { final String sig...
/** * <p> * Exports the report for the given response. * The concrete report to generate is identified by reportName parameter. * The contents are written to the output stream of response. * </p> * @param reportName the name of report to export. * @param response the response data ...
Exports the report for the given response. The concrete report to generate is identified by reportName parameter. The contents are written to the output stream of response.
exportReport
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/web/gov/opm/scrd/web/controllers/ReportController.java", "license": "apache-2.0", "size": 33708 }
[ "gov.opm.scrd.LoggingHelper", "gov.opm.scrd.entities.application.ReportRequest", "gov.opm.scrd.entities.application.ReportResponse", "gov.opm.scrd.services.ExportType", "gov.opm.scrd.services.OPMException", "gov.opm.scrd.services.ReportService", "java.io.IOException", "javax.servlet.http.HttpServletRe...
import gov.opm.scrd.LoggingHelper; import gov.opm.scrd.entities.application.ReportRequest; import gov.opm.scrd.entities.application.ReportResponse; import gov.opm.scrd.services.ExportType; import gov.opm.scrd.services.OPMException; import gov.opm.scrd.services.ReportService; import java.io.IOException; import javax.ser...
import gov.opm.scrd.*; import gov.opm.scrd.entities.application.*; import gov.opm.scrd.services.*; import java.io.*; import javax.servlet.http.*; import org.jboss.logging.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "gov.opm.scrd", "java.io", "javax.servlet", "org.jboss.logging", "org.springframework.http", "org.springframework.web" ]
gov.opm.scrd; java.io; javax.servlet; org.jboss.logging; org.springframework.http; org.springframework.web;
1,113,897
public void getContacts(ComposeActivity a) { try { ContactsTask task = new ContactsTask(user,password, a); task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); Log.d("MailFunctionality", "Reading reached"); } catch (Exception e) { e.printStackTrace(); } } private class Contact...
void function(ComposeActivity a) { try { ContactsTask task = new ContactsTask(user,password, a); task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); Log.d(STR, STR); } catch (Exception e) { e.printStackTrace(); } } private class ContactsTask extends AsyncTask<Void, Void, Void>{ private String user, password; privat...
/** * Starts the AsyncTask for getting contacts. Reference to activity is * needed in order to display/dismiss loading dialog. */
Starts the AsyncTask for getting contacts. Reference to activity is needed in order to display/dismiss loading dialog
getContacts
{ "repo_name": "britsman/MailMaster", "path": "M@ilMaster/src/TIG055st2014/mailmaster/HelpClasses/MailFunctionality.java", "license": "gpl-2.0", "size": 39090 }
[ "android.app.ProgressDialog", "android.os.AsyncTask", "java.util.TreeSet" ]
import android.app.ProgressDialog; import android.os.AsyncTask; import java.util.TreeSet;
import android.app.*; import android.os.*; import java.util.*;
[ "android.app", "android.os", "java.util" ]
android.app; android.os; java.util;
2,434,596
public void flush() { if(appIsStringBuilder) { reorderStart=str.length(); } else { try { app.append(str); str.setLength(0); reorderStart=0; } catch(IOException e) { ...
void function() { if(appIsStringBuilder) { reorderStart=str.length(); } else { try { app.append(str); str.setLength(0); reorderStart=0; } catch(IOException e) { throw new InternalError(e); } } lastCC=0; }
/** * Flushes from the intermediate StringBuilder to the Appendable, * if they are different objects. * Used after recomposition. * Must be called at the end when writing to a non-StringBuilder Appendable. */
Flushes from the intermediate StringBuilder to the Appendable, if they are different objects. Used after recomposition. Must be called at the end when writing to a non-StringBuilder Appendable
flush
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/jdk/internal/icu/impl/NormalizerImpl.java", "license": "apache-2.0", "size": 90233 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,809,294
public void removeAlias(String alias) throws Exception { StandardHost host = (StandardHost) this.resource; host.removeAlias(alias); }
void function(String alias) throws Exception { StandardHost host = (StandardHost) this.resource; host.removeAlias(alias); }
/** * Return the specified alias name from the aliases for this Host * * @param alias Alias name to be removed * @throws Exception if an MBean cannot be created or registered */
Return the specified alias name from the aliases for this Host
removeAlias
{ "repo_name": "NorthFacing/step-by-Java", "path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/catalina/mbeans/StandardHostMBean.java", "license": "gpl-2.0", "size": 6266 }
[ "org.apache.catalina.core.StandardHost" ]
import org.apache.catalina.core.StandardHost;
import org.apache.catalina.core.*;
[ "org.apache.catalina" ]
org.apache.catalina;
883,312
public void setEdgeWeights(Transformer<E, ? extends Number> edge_weights) { this.edge_weights = new DelegateToEdgeTransformer<V,E>(edge_weights); }
void function(Transformer<E, ? extends Number> edge_weights) { this.edge_weights = new DelegateToEdgeTransformer<V,E>(edge_weights); }
/** * Sets the Transformer that this instance uses to associate edge weights with each edge * @param edge_weights the Transformer to use to associate an edge weight with each edge * @see edu.uci.ics.jung.algorithms.scoring.util.UniformDegreeWeight */
Sets the Transformer that this instance uses to associate edge weights with each edge
setEdgeWeights
{ "repo_name": "xiaohanz/softcontroller", "path": "third-party/net.sf.jung2/src/main/java/edu/uci/ics/jung/algorithms/scoring/AbstractIterativeScorer.java", "license": "epl-1.0", "size": 11514 }
[ "edu.uci.ics.jung.algorithms.scoring.util.DelegateToEdgeTransformer", "org.apache.commons.collections15.Transformer" ]
import edu.uci.ics.jung.algorithms.scoring.util.DelegateToEdgeTransformer; import org.apache.commons.collections15.Transformer;
import edu.uci.ics.jung.algorithms.scoring.util.*; import org.apache.commons.collections15.*;
[ "edu.uci.ics", "org.apache.commons" ]
edu.uci.ics; org.apache.commons;
658,208
@Override public void rebalance(String topologyName, RebalanceOptions options) throws NotAliveException, TException, InvalidTopologyException { try { checkTopologyActive(data, topologyName, true); Integer wait_amt = null; String jsonConf = null; ...
void function(String topologyName, RebalanceOptions options) throws NotAliveException, TException, InvalidTopologyException { try { checkTopologyActive(data, topologyName, true); Integer wait_amt = null; String jsonConf = null; Boolean reassign = false; if (options != null) { if (options.is_set_wait_secs()) wait_amt = ...
/** * rebalance one topology * * @@@ rebalance options hasn't implements * * It is used to let workers wait several seconds to finish jobs * * @param topologyname String * @param options RebalanceOptions */
rebalance one topology
rebalance
{ "repo_name": "edwardchor/jstorm", "path": "jstorm-core/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java", "license": "apache-2.0", "size": 56644 }
[ "com.alibaba.jstorm.utils.JStormUtils", "java.util.Map", "org.apache.thrift.TException" ]
import com.alibaba.jstorm.utils.JStormUtils; import java.util.Map; import org.apache.thrift.TException;
import com.alibaba.jstorm.utils.*; import java.util.*; import org.apache.thrift.*;
[ "com.alibaba.jstorm", "java.util", "org.apache.thrift" ]
com.alibaba.jstorm; java.util; org.apache.thrift;
1,615,256
public static void rotateIfSneaking(EntityPlayer player) { if(player.isSneaking()) applySneakingRotation(); }
static void function(EntityPlayer player) { if(player.isSneaking()) applySneakingRotation(); }
/** * Rotates the render for a bauble correctly if the player is sneaking. * Use for renders under {@link RenderType#BODY}. */
Rotates the render for a bauble correctly if the player is sneaking. Use for renders under <code>RenderType#BODY</code>
rotateIfSneaking
{ "repo_name": "Alec-WAM/CrystalMod", "path": "src/api/java/baubles/api/render/IRenderBauble.java", "license": "mit", "size": 3843 }
[ "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
644,214
public final SelectionOverride getSelectionOverride(int rendererIndex, TrackGroupArray groups) { Map<TrackGroupArray, SelectionOverride> overrides = selectionOverrides.get(rendererIndex); return overrides != null ? overrides.get(groups) : null; }
final SelectionOverride function(int rendererIndex, TrackGroupArray groups) { Map<TrackGroupArray, SelectionOverride> overrides = selectionOverrides.get(rendererIndex); return overrides != null ? overrides.get(groups) : null; }
/** * Returns the override for the specified renderer and {@link TrackGroupArray}. * * @param rendererIndex The renderer index. * @param groups The {@link TrackGroupArray}. * @return The override, or null if no override exists. */
Returns the override for the specified renderer and <code>TrackGroupArray</code>
getSelectionOverride
{ "repo_name": "thermatk/Telegram-FOSS", "path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer2/trackselection/MappingTrackSelector.java", "license": "gpl-2.0", "size": 35848 }
[ "java.util.Map", "org.telegram.messenger.exoplayer2.source.TrackGroupArray" ]
import java.util.Map; import org.telegram.messenger.exoplayer2.source.TrackGroupArray;
import java.util.*; import org.telegram.messenger.exoplayer2.source.*;
[ "java.util", "org.telegram.messenger" ]
java.util; org.telegram.messenger;
752,292
public void test0411() throws JavaModelException { ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0411", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals("Wrong number of problems", 0, ((Comp...
void function() throws JavaModelException { ICompilationUnit sourceUnit = getCompilationUnit(STR , "src", STR, STR); ASTNode result = runConversion(getJLS8(), sourceUnit, true); assertEquals(STR, 0, ((CompilationUnit) result).getProblems().length); ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0); assertNot...
/** * Test for message on jdt-core-dev */
Test for message on jdt-core-dev
test0411
{ "repo_name": "Niky4000/UsefulUtils", "path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java", "license": "gpl-3.0", "size": 524511 }
[ "java.util.List", "org.eclipse.jdt.core.ICompilationUnit", "org.eclipse.jdt.core.JavaModelException", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.CompilationUnit", "org.eclipse.jdt.core.dom.Expression", "org.eclipse.jdt.core.dom.InfixExpression", "org.eclipse.jdt.core.dom.ReturnState...
import java.util.List; import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.InfixExpression; import org.eclipse.j...
import java.util.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.dom.*;
[ "java.util", "org.eclipse.jdt" ]
java.util; org.eclipse.jdt;
2,184,955
@Override public ApplicationId appId() { return this.appId; }
ApplicationId function() { return this.appId; }
/** * Returns application identifier that has created this group object. * * @return ApplicationId application identifier */
Returns application identifier that has created this group object
appId
{ "repo_name": "sdnwiselab/onos", "path": "core/api/src/main/java/org/onosproject/net/group/DefaultGroupDescription.java", "license": "apache-2.0", "size": 6714 }
[ "org.onosproject.core.ApplicationId" ]
import org.onosproject.core.ApplicationId;
import org.onosproject.core.*;
[ "org.onosproject.core" ]
org.onosproject.core;
2,859,793
public Set<String> getRelated() { return Collections.unmodifiableSet(new LinkedHashSet<>(getStringList("related"))); }
Set<String> function() { return Collections.unmodifiableSet(new LinkedHashSet<>(getStringList(STR))); }
/** * Returns the list of Twitter screen names to be suggested for following after a Tweet is posted. * * @return list of Twitter screen names */
Returns the list of Twitter screen names to be suggested for following after a Tweet is posted
getRelated
{ "repo_name": "mcollovati/vaadin-twitter-widgets", "path": "twitter-widgets-addon/src/main/java/org/vaadin/addon/twitter/AbstractWidget.java", "license": "apache-2.0", "size": 8291 }
[ "java.util.Collections", "java.util.LinkedHashSet", "java.util.Set" ]
import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,629,755
protected static long getWorkingTimeFromLastStartUntilNow( Collection<EventPair> eventPairs, long currentMillis) { // We examine all events to determine whether we have any incomplete events and also // to get the latest timestamp available (start or stop). long latestTimestamp = 0L; long earlie...
static long function( Collection<EventPair> eventPairs, long currentMillis) { long latestTimestamp = 0L; long earliestOngoingStart = Long.MAX_VALUE; boolean anyEventIsOngoing = false; for (EventPair pair : eventPairs) { if (pair.isOngoing()) { anyEventIsOngoing = true; if (pair.getStartTime() < earliestOngoingStart) { ...
/** * Takes a collection of start and finished events. If there are any events that have a start, but * no finished time, the collection is considered ongoing. * * @param eventPairs the collection of event starts/stops. * @param currentMillis the current time. * @return -1 if all events are completed,...
Takes a collection of start and finished events. If there are any events that have a start, but no finished time, the collection is considered ongoing
getWorkingTimeFromLastStartUntilNow
{ "repo_name": "shs96c/buck", "path": "src/com/facebook/buck/event/listener/AbstractConsoleEventBusListener.java", "license": "apache-2.0", "size": 36251 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
275,894
public LoadBalanceDefinition loadBalance(LoadBalancer loadBalancer) { LoadBalanceDefinition answer = new LoadBalanceDefinition(); addOutput(answer); return answer.loadBalance(loadBalancer); }
LoadBalanceDefinition function(LoadBalancer loadBalancer) { LoadBalanceDefinition answer = new LoadBalanceDefinition(); addOutput(answer); return answer.loadBalance(loadBalancer); }
/** * <a href="http://camel.apache.org/load-balancer.html">Load Balancer EIP:</a> * Creates a loadbalance * * @param loadBalancer a custom load balancer to use * @return the builder */
Creates a loadbalance
loadBalance
{ "repo_name": "kingargyle/turmeric-bot", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 115380 }
[ "org.apache.camel.processor.loadbalancer.LoadBalancer" ]
import org.apache.camel.processor.loadbalancer.LoadBalancer;
import org.apache.camel.processor.loadbalancer.*;
[ "org.apache.camel" ]
org.apache.camel;
2,811,514
Context getContext();
Context getContext();
/** * Gets the context for the phone, as set at initialization time. */
Gets the context for the phone, as set at initialization time
getContext
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/opt/telephony/src/java/com/android/internal/telephony/Phone.java", "license": "gpl-2.0", "size": 87022 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,805,898
public static Optional<String> getElementString(final String aElementSelector1, final String aElementSelector2, final Document aDocument) { Optional<String> result = getElementString(aElementSelector1, aDocument); if (!result.isPresent()) { result = get...
static Optional<String> function(final String aElementSelector1, final String aElementSelector2, final Document aDocument) { Optional<String> result = getElementString(aElementSelector1, aDocument); if (!result.isPresent()) { result = getElementString(aElementSelector2, aDocument); } return result; }
/** * Searches for the given selector if found it returns the text of the first * result. * * @param aElementSelector1 The selector for the searched element. * @param aElementSelector2 The selector for the searched element if * aElementSelector1 is not found * @param aDocum...
Searches for the given selector if found it returns the text of the first result
getElementString
{ "repo_name": "mediathekview/MServer", "path": "src/main/java/mServer/crawler/sender/base/HtmlDocumentUtils.java", "license": "gpl-3.0", "size": 3939 }
[ "java.util.Optional", "org.jsoup.nodes.Document" ]
import java.util.Optional; import org.jsoup.nodes.Document;
import java.util.*; import org.jsoup.nodes.*;
[ "java.util", "org.jsoup.nodes" ]
java.util; org.jsoup.nodes;
1,134,679
public static <T> PTransform<PCollection<T>, PCollection<Long>> globally() { return Combine.globally(new CountFn<T>()); }
static <T> PTransform<PCollection<T>, PCollection<Long>> function() { return Combine.globally(new CountFn<T>()); }
/** * Returns a {@link PTransform} that counts the number of elements in * its input {@link PCollection}. * * <p>Note: if the input collection uses a windowing strategy other than {@link GlobalWindows}, * use {@code Combine.globally(Count.<T>combineFn()).withoutDefaults()} instead. */
Returns a <code>PTransform</code> that counts the number of elements in its input <code>PCollection</code>. Note: if the input collection uses a windowing strategy other than <code>GlobalWindows</code>, use Combine.globally(Count.combineFn()).withoutDefaults() instead
globally
{ "repo_name": "dhalperi/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/Count.java", "license": "apache-2.0", "size": 6977 }
[ "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;
58,661
@Override public Container findChild(String name) { if (name == null) return (null); synchronized (children) { return children.get(name); } }
Container function(String name) { if (name == null) return (null); synchronized (children) { return children.get(name); } }
/** * Return the child Container, associated with this Container, with * the specified name (if any); otherwise, return <code>null</code> * * @param name Name of the child Container to be retrieved */
Return the child Container, associated with this Container, with the specified name (if any); otherwise, return <code>null</code>
findChild
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/core/ContainerBase.java", "license": "apache-2.0", "size": 45077 }
[ "org.apache.catalina.Container" ]
import org.apache.catalina.Container;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
846,057
public List<Output<TFloat32>> summaries() { return summaries; }
List<Output<TFloat32>> function() { return summaries; }
/** * Gets summaries. * * @return summaries. */
Gets summaries
summaries
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/estimator/BoostedTreesFlushQuantileSummaries.java", "license": "apache-2.0", "size": 4127 }
[ "java.util.List", "org.tensorflow.Output", "org.tensorflow.types.TFloat32" ]
import java.util.List; import org.tensorflow.Output; import org.tensorflow.types.TFloat32;
import java.util.*; import org.tensorflow.*; import org.tensorflow.types.*;
[ "java.util", "org.tensorflow", "org.tensorflow.types" ]
java.util; org.tensorflow; org.tensorflow.types;
753,684
private static boolean initUsesSharedLibraries(RuleContext ruleContext) { Iterable<? extends TransitiveInfoCollection> targets; // The deps attribute must exist for all rule types that use PyCommon, but not necessarily the // data attribute. if (ruleContext.attributes().has("data")) { targets = ...
static boolean function(RuleContext ruleContext) { Iterable<? extends TransitiveInfoCollection> targets; if (ruleContext.attributes().has("data")) { targets = Iterables.concat( ruleContext.getPrerequisites("deps"), ruleContext.getPrerequisites("data")); } else { targets = ruleContext.getPrerequisites("deps"); } for (Tr...
/** * Returns true if any of this target's {@code deps} or {@code data} deps has a shared library * file (e.g. a {@code .so}) in its transitive dependency closure. * * <p>For targets with the py provider, we consult the {@code uses_shared_libraries} field. For * targets without this provider, we look for...
Returns true if any of this target's deps or data deps has a shared library file (e.g. a .so) in its transitive dependency closure. For targets with the py provider, we consult the uses_shared_libraries field. For targets without this provider, we look for <code>CppFileTypes#SHARED_LIBRARY</code>-type files in the file...
initUsesSharedLibraries
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java", "license": "apache-2.0", "size": 43034 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.analysis.TransitiveInfoCollection", "net.starlark.java.eval.EvalException" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; import net.starlark.java.eval.EvalException;
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; import net.starlark.java.eval.*;
[ "com.google.common", "com.google.devtools", "net.starlark.java" ]
com.google.common; com.google.devtools; net.starlark.java;
873,382
public com.squareup.okhttp.Call pingAsync(final ApiCallback<PingResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
com.squareup.okhttp.Call function(final ApiCallback<PingResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
/** * The default API command (asynchronously) * The default API command * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */
The default API command (asynchronously) The default API command
pingAsync
{ "repo_name": "vladutbutnaru/java-phonecom-sdk", "path": "src/main/java/io/swagger/client/api/DefaultApi.java", "license": "apache-2.0", "size": 6201 }
[ "io.swagger.client.ApiCallback", "io.swagger.client.ApiException", "io.swagger.client.ProgressRequestBody", "io.swagger.client.ProgressResponseBody", "io.swagger.client.model.PingResponse" ]
import io.swagger.client.ApiCallback; import io.swagger.client.ApiException; import io.swagger.client.ProgressRequestBody; import io.swagger.client.ProgressResponseBody; import io.swagger.client.model.PingResponse;
import io.swagger.client.*; import io.swagger.client.model.*;
[ "io.swagger.client" ]
io.swagger.client;
1,274,347
public int compareTo(final BigFraction object) { BigInteger nOd = numerator.multiply(object.denominator); BigInteger dOn = denominator.multiply(object.numerator); return nOd.compareTo(dOn); }
int function(final BigFraction object) { BigInteger nOd = numerator.multiply(object.denominator); BigInteger dOn = denominator.multiply(object.numerator); return nOd.compareTo(dOn); }
/** * <p> * Compares this object to another based on size. * </p> * * @param object * the object to compare to, must not be <code>null</code>. * @return -1 if this is less than <tt>object</tt>, +1 if this is greater * than <tt>object</tt>, 0 if they are equal. ...
Compares this object to another based on size.
compareTo
{ "repo_name": "justinwm/astor", "path": "examples/math_76/src/main/java/org/apache/commons/math/fraction/BigFraction.java", "license": "gpl-2.0", "size": 37184 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,747,817
public Map<String, Object> getSourceAsMap() { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
Map<String, Object> function() { if (source == null) { return null; } if (sourceAsMap != null) { return sourceAsMap; } sourceAsMap = SourceLookup.sourceAsMap(source); return sourceAsMap; }
/** * The source of the document as a map (can be <tt>null</tt>). */
The source of the document as a map (can be null)
getSourceAsMap
{ "repo_name": "nezirus/elasticsearch", "path": "core/src/main/java/org/elasticsearch/search/SearchHit.java", "license": "apache-2.0", "size": 36070 }
[ "java.util.Map", "org.elasticsearch.search.lookup.SourceLookup" ]
import java.util.Map; import org.elasticsearch.search.lookup.SourceLookup;
import java.util.*; import org.elasticsearch.search.lookup.*;
[ "java.util", "org.elasticsearch.search" ]
java.util; org.elasticsearch.search;
1,470,536
@Test public void equalsAndHashCode() { final ComparisonExpression testExpression = new ComparisonExpression(EVALUABLE_EXPRESSION_FACTORY.getOne(), EVALUABLE_EXPRESSION_FACTORY.getOne()); assertThat(testExpression, hasDefaultEqualsProperties()); final ComparisonExpression equalOne = new ComparisonExpressi...
void function() { final ComparisonExpression testExpression = new ComparisonExpression(EVALUABLE_EXPRESSION_FACTORY.getOne(), EVALUABLE_EXPRESSION_FACTORY.getOne()); assertThat(testExpression, hasDefaultEqualsProperties()); final ComparisonExpression equalOne = new ComparisonExpression(EVALUABLE_EXPRESSION_FACTORY.getA...
/** * Test method for {@link ComparisonExpression#equals(java.lang.Object)}. Asserts * that: * * <ul> * * <li>Two expressions are equal exactly if they contain equal {@code smaller} and * {@code greater} expressions. * * <li>{@code hashCode} is implemented accordingly. * * </ul> */
Test method for <code>ComparisonExpression#equals(java.lang.Object)</code>. Asserts that: Two expressions are equal exactly if they contain equal smaller and greater expressions. hashCode is implemented accordingly.
equalsAndHashCode
{ "repo_name": "Beagle-PSE/Beagle", "path": "Core/src/test/java/de/uka/ipd/sdq/beagle/core/evaluableexpressions/ComparisonExpressionTest.java", "license": "epl-1.0", "size": 8544 }
[ "de.uka.ipd.sdq.beagle.core.testutil.EqualsMatcher", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import de.uka.ipd.sdq.beagle.core.testutil.EqualsMatcher; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import de.uka.ipd.sdq.beagle.core.testutil.*; import org.hamcrest.*;
[ "de.uka.ipd", "org.hamcrest" ]
de.uka.ipd; org.hamcrest;
281,551
LocalPoint getLocalLocation();
LocalPoint getLocalLocation();
/** * Gets the local location of the object. * * @return the local location */
Gets the local location of the object
getLocalLocation
{ "repo_name": "abelbriggs1/runelite", "path": "runelite-api/src/main/java/net/runelite/api/TileObject.java", "license": "bsd-2-clause", "size": 3612 }
[ "net.runelite.api.coords.LocalPoint" ]
import net.runelite.api.coords.LocalPoint;
import net.runelite.api.coords.*;
[ "net.runelite.api" ]
net.runelite.api;
391,398
EReference getDocumentRoot_PropertyName();
EReference getDocumentRoot_PropertyName();
/** * Returns the meta object for the containment reference '{@link net.opengis.wfs20.DocumentRoot#getPropertyName <em>Property Name</em>}'. <!-- * begin-user-doc --> <!-- end-user-doc --> * * @return the meta object for the containment reference '<em>Property Name</em>'. * @see net.opengis.wf...
Returns the meta object for the containment reference '<code>net.opengis.wfs20.DocumentRoot#getPropertyName Property Name</code>'.
getDocumentRoot_PropertyName
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wfs/src/net/opengis/wfs20/Wfs20Package.java", "license": "lgpl-2.1", "size": 404067 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,181,433
SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putString(key, value); return editor.commit(); }
SharedPreferences settings = context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE); SharedPreferences.Editor editor = settings.edit(); editor.putString(key, value); return editor.commit(); }
/** * put string preferences * * @param context * @param key The name of the preference to modify * @param value The new value for the preference * @return True if the new values were successfully written to persistent storage. */
put string preferences
putString
{ "repo_name": "yzzslow0/Ec2m", "path": "easycode/src/main/java/com/easycode/util/PreferencesUtils.java", "license": "apache-2.0", "size": 8566 }
[ "android.content.Context", "android.content.SharedPreferences" ]
import android.content.Context; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
1,763,110
protected void acceptUnknownVisitor(StateObjectVisitor visitor, Class<?> type, Class<?> parameterType) throws NoSuchMethodException, IllegalAccessException, ...
void function(StateObjectVisitor visitor, Class<?> type, Class<?> parameterType) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException{ try { Method visitMethod = type.getDeclaredMethod("visit", parameterType); visitMethod.setAccessible(true); visitMethod.invoke(visitor, this); } catch (NoSuch...
/** * The given {@link StateObjectVisitor} needs to visit this class but it is defined by a * third-party provider. This method will programmatically invoke the <b>visit</b> method defined * on the given visitor which signature should be. * * <div><code>{public|protected|private} void visit(Thi...
The given <code>StateObjectVisitor</code> needs to visit this class but it is defined by a third-party provider. This method will programmatically invoke the visit method defined on the given visitor which signature should be. <code>{public|protected|private} void visit(ThirdPartyStateObject stateObject)</code> or <cod...
acceptUnknownVisitor
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa.jpql/src/org/eclipse/persistence/jpa/jpql/tools/model/query/AbstractStateObject.java", "license": "epl-1.0", "size": 22504 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,158,166
public void show() { LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)mContentView.getLayoutParams(); lp.height = LayoutParams.WRAP_CONTENT; mContentView.setLayoutParams(lp); }
void function() { LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams)mContentView.getLayoutParams(); lp.height = LayoutParams.WRAP_CONTENT; mContentView.setLayoutParams(lp); }
/** * show footer */
show footer
show
{ "repo_name": "liwujun/xmpp", "path": "src/com/way/ui/xlistview/XListViewFooter.java", "license": "apache-2.0", "size": 3047 }
[ "android.widget.LinearLayout" ]
import android.widget.LinearLayout;
import android.widget.*;
[ "android.widget" ]
android.widget;
108,786
private DateList getDayVariants(final DateList dates) { if (getDayList().isEmpty()) { return dates; } DateList weekDayDates = new DateList(dates.getType(), dates.getTimeZone()); for (Iterator i = dates.iterator(); i.hasNext();) { Date date = (Date) i.nex...
DateList function(final DateList dates) { if (getDayList().isEmpty()) { return dates; } DateList weekDayDates = new DateList(dates.getType(), dates.getTimeZone()); for (Iterator i = dates.iterator(); i.hasNext();) { Date date = (Date) i.next(); for (Iterator j = getDayList().iterator(); j.hasNext();) { WeekDay weekDay ...
/** * Applies BYDAY rules specified in this Recur instance to the * specified date list. If no BYDAY rules are specified the * date list is returned unmodified. * @param dates * @return */
Applies BYDAY rules specified in this Recur instance to the specified date list. If no BYDAY rules are specified the date list is returned unmodified
getDayVariants
{ "repo_name": "henry4j/ical4j-0.9.20", "path": "source/net/fortuna/ical4j/model/Recur.java", "license": "bsd-3-clause", "size": 36430 }
[ "java.util.Calendar", "java.util.Iterator" ]
import java.util.Calendar; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,335,063
public TransferList getTransferList() { return tList; }
TransferList function() { return tList; }
/** * Gets the list of current transfers. * * @return The list of transfers. */
Gets the list of current transfers
getTransferList
{ "repo_name": "yuchaosydney/kouchat", "path": "src/main/java/net/usikkert/kouchat/misc/Controller.java", "license": "gpl-3.0", "size": 32190 }
[ "net.usikkert.kouchat.net.TransferList" ]
import net.usikkert.kouchat.net.TransferList;
import net.usikkert.kouchat.net.*;
[ "net.usikkert.kouchat" ]
net.usikkert.kouchat;
1,204,690
private void initCOSClient(Configuration conf) throws IOException { COSCredentialProviderList credentialProviderList = CosNUtils.createCosCredentialsProviderSet(conf); String region = conf.get(CosNConfigKeys.COSN_REGION_KEY); String endpointSuffix = conf.get( CosNConfigKeys.COSN_ENDPOINT_S...
void function(Configuration conf) throws IOException { COSCredentialProviderList credentialProviderList = CosNUtils.createCosCredentialsProviderSet(conf); String region = conf.get(CosNConfigKeys.COSN_REGION_KEY); String endpointSuffix = conf.get( CosNConfigKeys.COSN_ENDPOINT_SUFFIX_KEY); if (null == region && null == e...
/** * Initialize the client to access COS blob storage. * * @param conf Hadoop configuration with COS configuration options. * @throws IOException Initialize the COS client failed, * caused by incorrect options. */
Initialize the client to access COS blob storage
initCOSClient
{ "repo_name": "lukmajercak/hadoop", "path": "hadoop-cloud-storage-project/hadoop-cos/src/main/java/org/apache/hadoop/fs/cosn/CosNativeFileSystemStore.java", "license": "apache-2.0", "size": 29956 }
[ "com.qcloud.cos.COSClient", "com.qcloud.cos.ClientConfig", "com.qcloud.cos.auth.BasicCOSCredentials", "com.qcloud.cos.auth.COSCredentials", "com.qcloud.cos.region.Region", "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.cosn.auth.COSCredentialProviderList", "org....
import com.qcloud.cos.COSClient; import com.qcloud.cos.ClientConfig; import com.qcloud.cos.auth.BasicCOSCredentials; import com.qcloud.cos.auth.COSCredentials; import com.qcloud.cos.region.Region; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.cosn.auth.COSCredentia...
import com.qcloud.cos.*; import com.qcloud.cos.auth.*; import com.qcloud.cos.region.*; import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.cosn.auth.*; import org.apache.hadoop.util.*;
[ "com.qcloud.cos", "java.io", "org.apache.hadoop" ]
com.qcloud.cos; java.io; org.apache.hadoop;
207,120
public void testFailRetrieveAttributeByClassName() { try { MyDAOImpl.isTestForFail=true; DefaultBizLogic defaultBizLogic = new DefaultBizLogic(); Object object=defaultBizLogic.retrieveAttribute("abc".getClass(), Long.valueOf(0),"attributeName"); fail("Negative test case: Should throw Bi...
void function() { try { MyDAOImpl.isTestForFail=true; DefaultBizLogic defaultBizLogic = new DefaultBizLogic(); Object object=defaultBizLogic.retrieveAttribute("abc".getClass(), Long.valueOf(0),STR); fail(STR); } catch (BizLogicException exception) { assertTrue(STR,true); logger.fatal(exception.getMessage(),exception); ...
/** * Negative test for * Object retrieveAttribute(Class objClass, Long identifier, String attributeName). */
Negative test for Object retrieveAttribute(Class objClass, Long identifier, String attributeName)
testFailRetrieveAttributeByClassName
{ "repo_name": "NCIP/commons-module", "path": "software/washu-commons/src/test/java/edu/wustl/common/bizlogic/DefaultBizLogicTestCase.java", "license": "bsd-3-clause", "size": 31367 }
[ "edu.wustl.common.exception.BizLogicException", "edu.wustl.dao.MyDAOImpl" ]
import edu.wustl.common.exception.BizLogicException; import edu.wustl.dao.MyDAOImpl;
import edu.wustl.common.exception.*; import edu.wustl.dao.*;
[ "edu.wustl.common", "edu.wustl.dao" ]
edu.wustl.common; edu.wustl.dao;
792,511
public Comparator<RawComparable> getComparator() { return comparator; }
Comparator<RawComparable> function() { return comparator; }
/** * Get an instance of the RawComparator that is constructed based on the * string comparator representation. * * @return a Comparator that can compare RawComparable's. */
Get an instance of the RawComparator that is constructed based on the string comparator representation
getComparator
{ "repo_name": "koichi626/hadoop-gpu", "path": "hadoop-gpu-0.20.1/src/core/org/apache/hadoop/io/file/tfile/TFile.java", "license": "apache-2.0", "size": 74043 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
179,417
@Override public void start() { timerStart = new Date(); BlockingQueue<IVgiFeature> queue = new ArrayBlockingQueue<IVgiFeature>(queueSize); Thread[] producerThread = new Thread[numThreads]; for (int i=0; i<numThreads; i++) { producer = (settings.isReadQuadtree() && producerQuadtree != null) ?...
void function() { timerStart = new Date(); BlockingQueue<IVgiFeature> queue = new ArrayBlockingQueue<IVgiFeature>(queueSize); Thread[] producerThread = new Thread[numThreads]; for (int i=0; i<numThreads; i++) { producer = (settings.isReadQuadtree() && producerQuadtree != null) ? new VgiOperationPbfReaderQuadtreeImpl(se...
/** * Starts the pipeline. Create producers, lets them read the VGI operations, receives the data and sends the operations to a set of consumers */
Starts the pipeline. Create producers, lets them read the VGI operations, receives the data and sends the operations to a set of consumers
start
{ "repo_name": "SGroe/vgi-analytics-framework", "path": "src/main/java/at/salzburgresearch/vgi/vgianalyticsframework/activityanalysis/pipeline/impl/VgiPipelineImpl.java", "license": "apache-2.0", "size": 11871 }
[ "at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.model.vgi.IVgiFeature", "at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.persistence.impl.VgiOperationPbfReaderImpl", "at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.persistence.impl.VgiOperationPbfReaderQuadtreeImpl"...
import at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.model.vgi.IVgiFeature; import at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.persistence.impl.VgiOperationPbfReaderImpl; import at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.persistence.impl.VgiOperationPbfReaderQuadt...
import at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.model.vgi.*; import at.salzburgresearch.vgi.vgianalyticsframework.activityanalysis.persistence.impl.*; import java.util.*; import java.util.concurrent.*;
[ "at.salzburgresearch.vgi", "java.util" ]
at.salzburgresearch.vgi; java.util;
505,343
public boolean addFuture(GridDhtForceKeysFuture<?, ?> fut) { forceKeyFuts.put(fut.futureId(), fut); if (stopping) { fut.onDone(stopError()); return false; } return true; }
boolean function(GridDhtForceKeysFuture<?, ?> fut) { forceKeyFuts.put(fut.futureId(), fut); if (stopping) { fut.onDone(stopError()); return false; } return true; }
/** * Adds future to future map. * * @param fut Future to add. * @return {@code False} if node cache is stopping and future was completed with error. */
Adds future to future map
addFuture
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java", "license": "apache-2.0", "size": 48777 }
[ "org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysFuture" ]
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysFuture;
import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,687,534
final void loadCustomEvent(@NonNull Activity launcherActivity, @NonNull Map<String, Object> localExtras, @NonNull Map<String, String> serverExtras) { try { if (checkAndInitializeSdk(launcherActivity, localExtras, serverExtras)) { MoPubLifecycleManager.getI...
final void loadCustomEvent(@NonNull Activity launcherActivity, @NonNull Map<String, Object> localExtras, @NonNull Map<String, String> serverExtras) { try { if (checkAndInitializeSdk(launcherActivity, localExtras, serverExtras)) { MoPubLifecycleManager.getInstance(launcherActivity).addLifecycleListener(getLifecycleListe...
/** * The MoPub ad loading system calls this after MoPub indicates that this custom event should * be loaded. * * @param launcherActivity the "main activity" of the app. Useful for initializing sdks. * @param localExtras * @param serverExtras */
The MoPub ad loading system calls this after MoPub indicates that this custom event should be loaded
loadCustomEvent
{ "repo_name": "PorkyPixels/Cocos-Helper", "path": "External Cocos Helper Android Frameworks/Libs/MoPub/mopub-sdk/src/main/java/com/mopub/mobileads/CustomEventRewardedVideo.java", "license": "mit", "size": 4721 }
[ "android.app.Activity", "android.support.annotation.NonNull", "com.mopub.common.MoPubLifecycleManager", "com.mopub.common.logging.MoPubLog", "java.util.Map" ]
import android.app.Activity; import android.support.annotation.NonNull; import com.mopub.common.MoPubLifecycleManager; import com.mopub.common.logging.MoPubLog; import java.util.Map;
import android.app.*; import android.support.annotation.*; import com.mopub.common.*; import com.mopub.common.logging.*; import java.util.*;
[ "android.app", "android.support", "com.mopub.common", "java.util" ]
android.app; android.support; com.mopub.common; java.util;
1,513,185
protected void removeFromPortIpMap(IOFSwitch sw, long mac, short vlan) { if (vlan == (short) 0xffff) { vlan = 0; } Map<MacVlanPair,PortIpPair> swMap = macVlanToPortIpMap.get(sw); if (swMap != null) swMap.remove(new MacVlanPair(mac, vlan)); }
void function(IOFSwitch sw, long mac, short vlan) { if (vlan == (short) 0xffff) { vlan = 0; } Map<MacVlanPair,PortIpPair> swMap = macVlanToPortIpMap.get(sw); if (swMap != null) swMap.remove(new MacVlanPair(mac, vlan)); }
/** * Removes a host from the MAC/VLAN->SwitchPort/Ip mapping * @param sw The switch to remove the mapping from * @param mac The MAC address of the host to remove * @param vlan The VLAN that the host is on */
Removes a host from the MAC/VLAN->SwitchPort/Ip mapping
removeFromPortIpMap
{ "repo_name": "yeasy/lazyctrl", "path": "ccm/floodlight-lc/src/main/java/net/floodlightcontroller/dcm/DCM.java", "license": "apache-2.0", "size": 43840 }
[ "java.util.Map", "net.floodlightcontroller.core.IOFSwitch", "net.floodlightcontroller.core.types.MacVlanPair", "net.floodlightcontroller.core.types.PortIpPair" ]
import java.util.Map; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.core.types.MacVlanPair; import net.floodlightcontroller.core.types.PortIpPair;
import java.util.*; import net.floodlightcontroller.core.*; import net.floodlightcontroller.core.types.*;
[ "java.util", "net.floodlightcontroller.core" ]
java.util; net.floodlightcontroller.core;
166,983
public Path getInputDirectory() { try { assertDirCreated(inDir); } catch (IOException e) { LOGGER.error("Error during input directory creation: " + e.getMessage()); e.printStackTrace(); } return inDir; }
Path function() { try { assertDirCreated(inDir); } catch (IOException e) { LOGGER.error(STR + e.getMessage()); e.printStackTrace(); } return inDir; }
/** * Makes sure the input directory exists and returns it's path. * * @return the input directory Path * @see #assertDirCreated(Path) */
Makes sure the input directory exists and returns it's path
getInputDirectory
{ "repo_name": "sk413025/carcv", "path": "carcv-webapp/src/main/java/org/carcv/web/beans/StorageBean.java", "license": "apache-2.0", "size": 5796 }
[ "java.io.IOException", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,006,812
private static double nextValue(TreeSet<Double> tree, double value) { if (tree.higher(value) == null) return tree.first(); else return tree.higher(value); }
static double function(TreeSet<Double> tree, double value) { if (tree.higher(value) == null) return tree.first(); else return tree.higher(value); }
/** * Returns either the next value, or the first value of the tree if the * given value is the last one of the tree. */
Returns either the next value, or the first value of the tree if the given value is the last one of the tree
nextValue
{ "repo_name": "chardnett/eureka", "path": "src/math/geom2d/circulinear/CirculinearCurves2D.java", "license": "gpl-2.0", "size": 27043 }
[ "java.util.TreeSet" ]
import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
1,355,944
public static synchronized <BackendType extends Backend> BackendType init(Config<BackendType> config) { // if(initialized) throw new RuntimeException("Backend already initialized!"); logger.debug("Initializing... " + config); Guice.createInjector(config.getModule()); return injector....
static synchronized <BackendType extends Backend> BackendType function(Config<BackendType> config) { logger.debug(STR + config); Guice.createInjector(config.getModule()); return injector.getInstance(config.getModuleType()); }
/** * Initialization point for divide. Returns an instance of the Divide object. Only one instance may exist at a time. * @param config Configuration information for Divide. @see Config * @param <BackendType> Specific type of Backend to return, for extentions on the Backend class. * @return */
Initialization point for divide. Returns an instance of the Divide object. Only one instance may exist at a time
init
{ "repo_name": "HiddenStage/divide", "path": "Client/java-client/src/main/java/io/divide/client/Backend.java", "license": "apache-2.0", "size": 2692 }
[ "com.google.inject.Guice" ]
import com.google.inject.Guice;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
157,602
public static int getMaxClusterNodes() { return CacheFactory.getMaxClusterNodes(); }
static int function() { return CacheFactory.getMaxClusterNodes(); }
/** * Returns the maximum number of cluster members allowed. Both values 0 and 1 mean that clustering * is not available. However, a value of 1 means that it's a license problem rather than not having * the ability to do clustering as defined with value 0. * * @return the maximum number of clus...
Returns the maximum number of cluster members allowed. Both values 0 and 1 mean that clustering is not available. However, a value of 1 means that it's a license problem rather than not having the ability to do clustering as defined with value 0
getMaxClusterNodes
{ "repo_name": "saveendhiman/OpenfirePluginSample", "path": "openfiresource/src/org/jivesoftware/openfire/cluster/ClusterManager.java", "license": "apache-2.0", "size": 18506 }
[ "org.jivesoftware.util.cache.CacheFactory" ]
import org.jivesoftware.util.cache.CacheFactory;
import org.jivesoftware.util.cache.*;
[ "org.jivesoftware.util" ]
org.jivesoftware.util;
142,179
default AdvancedQuartzEndpointBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty("exchangePattern", exchangePattern); return this; }
default AdvancedQuartzEndpointBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; }
/** * Sets the exchange pattern when the consumer creates an exchange. * * The option is a: * &lt;code&gt;org.apache.camel.ExchangePattern&lt;/code&gt; type. * * Group: consumer (advanced) * * @param exchangePattern the value to set * @...
Sets the exchange pattern when the consumer creates an exchange. The option is a: &lt;code&gt;org.apache.camel.ExchangePattern&lt;/code&gt; type. Group: consumer (advanced)
exchangePattern
{ "repo_name": "pax95/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/QuartzEndpointBuilderFactory.java", "license": "apache-2.0", "size": 26763 }
[ "org.apache.camel.ExchangePattern" ]
import org.apache.camel.ExchangePattern;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,148,689
collectionUri = requestUri; if (collectionUri == null) { collectionUri = "/"; } List content; // readRequestContent(); try{ content = parseRequestContent(E_REBIND).getChildren(); segment = MethodUtil.getChildText(content, E_SEGMENT); ...
collectionUri = requestUri; if (collectionUri == null) { collectionUri = "/"; } List content; try{ content = parseRequestContent(E_REBIND).getChildren(); segment = MethodUtil.getChildText(content, E_SEGMENT); sourceUri = parseUri(MethodUtil.getChildUrl(content, E_HREF)); } catch (IOException e) { int statusCode = Webda...
/** * Parse WebDAV XML query. * * @exception WebdavException */
Parse WebDAV XML query
parseRequest
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/webdav/server/org/apache/slide/webdav/method/RebindMethod.java", "license": "apache-2.0", "size": 9265 }
[ "java.io.IOException", "java.util.List", "org.apache.slide.webdav.WebdavException", "org.apache.slide.webdav.util.WebdavStatus", "org.jdom.a.JDOMException" ]
import java.io.IOException; import java.util.List; import org.apache.slide.webdav.WebdavException; import org.apache.slide.webdav.util.WebdavStatus; import org.jdom.a.JDOMException;
import java.io.*; import java.util.*; import org.apache.slide.webdav.*; import org.apache.slide.webdav.util.*; import org.jdom.a.*;
[ "java.io", "java.util", "org.apache.slide", "org.jdom.a" ]
java.io; java.util; org.apache.slide; org.jdom.a;
2,226,454
public void setObjectValue(Object value) throws FormException { if (value instanceof ForeignPK) { ForeignPK pk = (ForeignPK) value; setNodePK(pk.getInstanceId() + "-" + pk.getId()); } else if (value == null) { setNodePK(null); } else { throw new FormException("ExplorerField.setObje...
void function(Object value) throws FormException { if (value instanceof ForeignPK) { ForeignPK pk = (ForeignPK) value; setNodePK(pk.getInstanceId() + "-" + pk.getId()); } else if (value == null) { setNodePK(null); } else { throw new FormException(STR, STR); } }
/** * Set node referenced by this field. */
Set node referenced by this field
setObjectValue
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/contribution/content/form/field/ExplorerField.java", "license": "agpl-3.0", "size": 8818 }
[ "org.silverpeas.core.ForeignPK", "org.silverpeas.core.contribution.content.form.FormException" ]
import org.silverpeas.core.ForeignPK; import org.silverpeas.core.contribution.content.form.FormException;
import org.silverpeas.core.*; import org.silverpeas.core.contribution.content.form.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
141,027
private FileEntry createFileEntry(final FileEntry parent, final File file) { final FileEntry entry = parent.newChildInstance(file); entry.refresh(file); final FileEntry[] children = doListFiles(file, entry); entry.setChildren(children); return entry; }
FileEntry function(final FileEntry parent, final File file) { final FileEntry entry = parent.newChildInstance(file); entry.refresh(file); final FileEntry[] children = doListFiles(file, entry); entry.setChildren(children); return entry; }
/** * Create a new file entry for the specified file. * * @param parent The parent file entry * @param file The file to create an entry for * @return A new file entry */
Create a new file entry for the specified file
createFileEntry
{ "repo_name": "Flole998/android", "path": "src/main/java/com/owncloud/android/services/observer/AdvancedFileAlterationObserver.java", "license": "gpl-2.0", "size": 13713 }
[ "java.io.File", "org.apache.commons.io.monitor.FileEntry" ]
import java.io.File; import org.apache.commons.io.monitor.FileEntry;
import java.io.*; import org.apache.commons.io.monitor.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,708,914
public Path getWorkspace() { return directories.getWorkspace(); }
Path function() { return directories.getWorkspace(); }
/** * Returns the working directory of the server. * * <p>This is often the first entry on the {@code --package_path}, but not always. * Callers should certainly not make this assumption. The Path returned may be null. */
Returns the working directory of the server. This is often the first entry on the --package_path, but not always. Callers should certainly not make this assumption. The Path returned may be null
getWorkspace
{ "repo_name": "spxtr/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeWorkspace.java", "license": "apache-2.0", "size": 12032 }
[ "com.google.devtools.build.lib.vfs.Path" ]
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
2,492,064
public MongoDBDatabaseGetPropertiesOptions options() { return this.options; }
MongoDBDatabaseGetPropertiesOptions function() { return this.options; }
/** * Get the options property: The options property. * * @return the options value. */
Get the options property: The options property
options
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/models/MongoDBDatabaseGetProperties.java", "license": "mit", "size": 2538 }
[ "com.azure.resourcemanager.cosmos.models.MongoDBDatabaseGetPropertiesOptions" ]
import com.azure.resourcemanager.cosmos.models.MongoDBDatabaseGetPropertiesOptions;
import com.azure.resourcemanager.cosmos.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,921,792
public static Document newDocument(InputSource inp) throws ParserConfigurationException, SAXException, IOException { DocumentBuilder db = null; try { db = getDocumentBuilder(); try { db.setEntityResolver(new DefaultEntityResolver()); } ...
static Document function(InputSource inp) throws ParserConfigurationException, SAXException, IOException { DocumentBuilder db = null; try { db = getDocumentBuilder(); try { db.setEntityResolver(new DefaultEntityResolver()); } catch (Throwable t) { log.debug(STR, t); } try { db.setErrorHandler(new XMLUtils.ParserErrorHa...
/** * Get a new Document read from the input source * @return Document * @throws ParserConfigurationException if construction problems occur * @throws SAXException if the document has xml sax problems * @throws IOException if i/o exceptions occur */
Get a new Document read from the input source
newDocument
{ "repo_name": "hugosato/apache-axis", "path": "src/org/apache/axis/utils/XMLUtils.java", "license": "apache-2.0", "size": 34551 }
[ "java.io.IOException", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "javax.xml", "org.w3c.dom", "org.xml.sax" ]
java.io; javax.xml; org.w3c.dom; org.xml.sax;
1,319,087
@Override public CacheConfig cacheConfig() { return this.cacheConfig; }
CacheConfig function() { return this.cacheConfig; }
/** * Returns the instance of {@link CacheConfig}. * * @return {@link CacheConfig} reference. */
Returns the instance of <code>CacheConfig</code>
cacheConfig
{ "repo_name": "dbisUnibas/cineast", "path": "cineast-runtime/src/main/java/org/vitrivr/cineast/standalone/config/IngestConfig.java", "license": "mit", "size": 12865 }
[ "org.vitrivr.cineast.core.config.CacheConfig" ]
import org.vitrivr.cineast.core.config.CacheConfig;
import org.vitrivr.cineast.core.config.*;
[ "org.vitrivr.cineast" ]
org.vitrivr.cineast;
1,926,030
public boolean hasPermOrConsole(CommandSender sender, String permission) { if (sender instanceof ProxiedPlayer) { return (config.isUseUUIDs() ? pm().getUser(((ProxiedPlayer) sender).getUniqueId()) : pm().getUser(sender.getName())).hasPerm(permission); } else if (new B...
boolean function(CommandSender sender, String permission) { if (sender instanceof ProxiedPlayer) { return (config.isUseUUIDs() ? pm().getUser(((ProxiedPlayer) sender).getUniqueId()) : pm().getUser(sender.getName())).hasPerm(permission); } else if (new BungeeSender(sender).isConsole()) { return true; } return false; }
/** * Checks if a user (or console) has a specific permission (globally). If sender is console this function return true. * * @param sender the command sender to check a permission for * @param permission the permission to check * @return the result of the permission check */
Checks if a user (or console) has a specific permission (globally). If sender is console this function return true
hasPermOrConsole
{ "repo_name": "BungeePEX/BungeePEX", "path": "src/main/java/com/xaosia/bungeepex/platform/bungee/utils/BungeePermissionsChecker.java", "license": "mit", "size": 11089 }
[ "net.md_5.bungee.api.CommandSender", "net.md_5.bungee.api.connection.ProxiedPlayer" ]
import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.*; import net.md_5.bungee.api.connection.*;
[ "net.md_5.bungee" ]
net.md_5.bungee;
1,811,916
Object retv = null; try { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Class<?> theFilterClass = Class.forName(className, true, classLoader); Constructor meth = theFilterClass.getDeclaredConstructor(argArray); meth.setAccessible(true);...
Object retv = null; try { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Class<?> theFilterClass = Class.forName(className, true, classLoader); Constructor meth = theFilterClass.getDeclaredConstructor(argArray); meth.setAccessible(true); retv = meth.newInstance(); } catch (Exception e) { thro...
/** * Create an instance of the given class * * @param className * the name of the class * @return a dynamically created instance of the given class */
Create an instance of the given class
createInstance
{ "repo_name": "dongpf/hadoop-0.19.1", "path": "src/mapred/org/apache/hadoop/mapred/lib/aggregate/UserDefinedValueAggregatorDescriptor.java", "license": "apache-2.0", "size": 4138 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
992,657
public interface OnMatrixChangedListener { void onMatrixChanged(RectF rect); }
interface OnMatrixChangedListener { void function(RectF rect); }
/** * Callback for when the Matrix displaying the Drawable has changed. This could be because * the View's bounds have changed, or the user has zoomed. * * @param rect - Rectangle displaying the Drawable's new bounds. */
Callback for when the Matrix displaying the Drawable has changed. This could be because the View's bounds have changed, or the user has zoomed
onMatrixChanged
{ "repo_name": "DNLDsht/LeafPic", "path": "photoview/src/main/java/uk/co/senab/photoview/PhotoViewAttacher.java", "license": "gpl-3.0", "size": 39745 }
[ "android.graphics.RectF" ]
import android.graphics.RectF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
68,021
void setNameStrategy(CamelContextNameStrategy nameStrategy);
void setNameStrategy(CamelContextNameStrategy nameStrategy);
/** * Sets a custom name strategy * * @param nameStrategy name strategy */
Sets a custom name strategy
setNameStrategy
{ "repo_name": "shuliangtao/apache-camel-2.13.0-src", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 47147 }
[ "org.apache.camel.spi.CamelContextNameStrategy" ]
import org.apache.camel.spi.CamelContextNameStrategy;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
1,214,611
public Object evalExpressionOnScriptlet(String language, String scriplet, String expression) throws BSFException { return manager.get().eval(language, scriplet, LINE_NO, COLUMN_NO, expression); }
Object function(String language, String scriplet, String expression) throws BSFException { return manager.get().eval(language, scriplet, LINE_NO, COLUMN_NO, expression); }
/** * Evaluates an expression on passed in scriplet * @param language * @param scriplet * @param expression * @return * @throws BSFException */
Evaluates an expression on passed in scriplet
evalExpressionOnScriptlet
{ "repo_name": "guhb/core", "path": "src/com/dotmarketing/scripting/util/BSFUtil.java", "license": "gpl-3.0", "size": 10463 }
[ "com.dotcms.repackage.org.apache.bsf.BSFException" ]
import com.dotcms.repackage.org.apache.bsf.BSFException;
import com.dotcms.repackage.org.apache.bsf.*;
[ "com.dotcms.repackage" ]
com.dotcms.repackage;
1,181,112
public Enumeration enumeratePermissions(SlideToken token, String object, boolean includeInherited) throws ServiceAccessException, ObjectNotFoundException { Uri objectUri = namespace.getUri(token, object); ...
Enumeration function(SlideToken token, String object, boolean includeInherited) throws ServiceAccessException, ObjectNotFoundException { Uri objectUri = namespace.getUri(token, object); if (!includeInherited) { return objectUri.getStore().enumeratePermissions(objectUri); } else { ObjectNode objectNode = objectUri.getSt...
/** * Enumerates permissions on an object. * * @param token Credentials token * @param object Object on which permission is granted * @exception ServiceAccessException DataSource access error * @exception ObjectNotFoundException Specified object was not found * in the DataSource ...
Enumerates permissions on an object
enumeratePermissions
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/share/org/apache/slide/security/SecurityImpl.java", "license": "apache-2.0", "size": 60874 }
[ "java.util.Enumeration", "java.util.Iterator", "java.util.Vector", "org.apache.slide.common.ServiceAccessException", "org.apache.slide.common.SlideToken", "org.apache.slide.common.Uri", "org.apache.slide.structure.ObjectNode", "org.apache.slide.structure.ObjectNotFoundException" ]
import java.util.Enumeration; import java.util.Iterator; import java.util.Vector; import org.apache.slide.common.ServiceAccessException; import org.apache.slide.common.SlideToken; import org.apache.slide.common.Uri; import org.apache.slide.structure.ObjectNode; import org.apache.slide.structure.ObjectNotFoundException;
import java.util.*; import org.apache.slide.common.*; import org.apache.slide.structure.*;
[ "java.util", "org.apache.slide" ]
java.util; org.apache.slide;
362,540
@Deployment public void testStartTimerEventSubProcessInParallelMultiInstanceSubProcessWithInterruptingBoundaryTimerEvent() { // start process instance ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("process"); // execute multiInstance loop number 1 // check if execution ...
void function() { ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(STR); ExecutionQuery executionQuery = runtimeService.createExecutionQuery().processInstanceId(processInstance.getId()); assertEquals(6, executionQuery.count()); TaskQuery taskQuery = taskService.createTaskQuery(); assertEquals(...
/** * test scenario: - start process instance with multiInstance parallel - * execute interrupting timer job of event subprocess - execute interrupting * timer boundary event of subprocess */
test scenario: - start process instance with multiInstance parallel - execute interrupting timer job of event subprocess - execute interrupting timer boundary event of subprocess
testStartTimerEventSubProcessInParallelMultiInstanceSubProcessWithInterruptingBoundaryTimerEvent
{ "repo_name": "xasx/camunda-bpm-platform", "path": "engine/src/test/java/org/camunda/bpm/engine/test/bpmn/event/timer/StartTimerEventTest.java", "license": "apache-2.0", "size": 59094 }
[ "org.camunda.bpm.engine.runtime.ExecutionQuery", "org.camunda.bpm.engine.runtime.JobQuery", "org.camunda.bpm.engine.runtime.ProcessInstance", "org.camunda.bpm.engine.task.TaskQuery" ]
import org.camunda.bpm.engine.runtime.ExecutionQuery; import org.camunda.bpm.engine.runtime.JobQuery; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.camunda.bpm.engine.task.TaskQuery;
import org.camunda.bpm.engine.runtime.*; import org.camunda.bpm.engine.task.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
1,523,581
static final TimeBasedRollStrategy findRollStrategy( final AppenderRollingProperties properties) { if (properties.getDatePattern() == null) { LogLog.error("null date pattern"); return ROLL_ERROR; } // Strip out quoted sections so that we may safely scan the undecorated // pattern for...
static final TimeBasedRollStrategy findRollStrategy( final AppenderRollingProperties properties) { if (properties.getDatePattern() == null) { LogLog.error(STR); return ROLL_ERROR; } final LocalizedDateFormatPatternHelper localizedDateFormatPatternHelper = new LocalizedDateFormatPatternHelper( properties.getDatePatternL...
/** * Checks each available roll strategy in turn, starting at the per-minute * strategy, next per-hour, and so on for increasing units of time until a * match is found. If no match is found, the error strategy is returned. * * @param properties * @return The appropriate roll strategy. */
Checks each available roll strategy in turn, starting at the per-minute strategy, next per-hour, and so on for increasing units of time until a match is found. If no match is found, the error strategy is returned
findRollStrategy
{ "repo_name": "foundation-runtime/logging", "path": "logging-log4j/src/main/java/com/cisco/oss/foundation/logging/appender/TimeBasedRollStrategy.java", "license": "apache-2.0", "size": 10602 }
[ "org.apache.log4j.helpers.LogLog" ]
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.helpers.*;
[ "org.apache.log4j" ]
org.apache.log4j;
408,110
public int read(byte []buffer, int offset, int length) throws IOException { int b = -1; if (isPartDone) return -1; int i = 0; while (i < length && (b = read()) >= 0) { boolean hasCr = false; if (b == '\r') { hasCr = true; b = read(); // XXX: Macintosh? ...
int function(byte []buffer, int offset, int length) throws IOException { int b = -1; if (isPartDone) return -1; int i = 0; while (i < length && (b = read()) >= 0) { boolean hasCr = false; if (b == '\r') { hasCr = true; b = read(); if (b != '\n') { buffer[offset + i++] = (byte) '\r'; peek[0] = (byte) b; peekOffset = 0; ...
/** * Reads from the multipart mime buffer. */
Reads from the multipart mime buffer
read
{ "repo_name": "christianchristensen/resin", "path": "modules/webutil/src/com/caucho/web/webmail/MboxStream.java", "license": "gpl-2.0", "size": 8438 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,628,942
@Test public void testDomEventsAreOutputComponentEvents() throws Exception { HashMap<String, String> events = new HashMap<>(); events.put("blur", "markup://ui:blur"); events.put("click", "markup://ui:click"); events.put("dblclick", "markup://ui:dblclick"); events.put("foc...
void function() throws Exception { HashMap<String, String> events = new HashMap<>(); events.put("blur", STRclick", STRdblclick", STRfocus", STRmousedown", STRmouseup", STRmousemove", STRmouseout", STRmouseover", STRkeydown", STRkeypress", STRkeyup", STRselectSTRmarkup: contextService.startContext(Mode.UTEST, Format.JSO...
/** * Verify that ui:output is registered to throw all the expected events. * Also verify that these events are component events. Very important that * these events be component events and not application event. * * @throws Exception */
Verify that ui:output is registered to throw all the expected events. Also verify that these events are component events. Very important that these events be component events and not application event
testDomEventsAreOutputComponentEvents
{ "repo_name": "forcedotcom/aura", "path": "aura-components/src/test/java/org/auraframework/components/ui/OutputComponentsTest.java", "license": "apache-2.0", "size": 6478 }
[ "java.util.HashMap", "java.util.Map", "org.auraframework.def.ComponentDef", "org.auraframework.def.EventType", "org.auraframework.def.RegisterEventDef", "org.auraframework.system.AuraContext" ]
import java.util.HashMap; import java.util.Map; import org.auraframework.def.ComponentDef; import org.auraframework.def.EventType; import org.auraframework.def.RegisterEventDef; import org.auraframework.system.AuraContext;
import java.util.*; import org.auraframework.def.*; import org.auraframework.system.*;
[ "java.util", "org.auraframework.def", "org.auraframework.system" ]
java.util; org.auraframework.def; org.auraframework.system;
1,557,436
public static refFrameType fromPerAligned(byte[] encodedBytes) { refFrameType result = new refFrameType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
static refFrameType function(byte[] encodedBytes) { refFrameType result = new refFrameType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; }
/** * Creates a new refFrameType from encoded stream. */
Creates a new refFrameType from encoded stream
fromPerAligned
{ "repo_name": "google/supl-client", "path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/GPS_MsrSetElement.java", "license": "apache-2.0", "size": 11428 }
[ "com.google.location.suplclient.asn1.base.BitStreamReader" ]
import com.google.location.suplclient.asn1.base.BitStreamReader;
import com.google.location.suplclient.asn1.base.*;
[ "com.google.location" ]
com.google.location;
2,865,622
public Entity getTouchingEntity() { return this.m_touchingEntity; }
Entity function() { return this.m_touchingEntity; }
/** * Entity that's touching the RemoteEntity * * @return entity */
Entity that's touching the RemoteEntity
getTouchingEntity
{ "repo_name": "MeRPG/EndHQ-Libraries", "path": "src/net/endhq/remoteentities/api/events/RemoteEntityTouchEvent.java", "license": "apache-2.0", "size": 845 }
[ "org.bukkit.entity.Entity" ]
import org.bukkit.entity.Entity;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
2,737,063
public static Bundle parseUrl(String url) { // hack to prevent MalformedURLException url = url.replace("weiboconnect", "http"); try { URL u = new URL(url); Bundle b = decodeUrl(u.getQuery()); b.putAll(decodeUrl(u.getRef())); return b; }...
static Bundle function(String url) { url = url.replace(STR, "http"); try { URL u = new URL(url); Bundle b = decodeUrl(u.getQuery()); b.putAll(decodeUrl(u.getRef())); return b; } catch (MalformedURLException e) { return new Bundle(); } }
/** * Parse a URL query and fragment parameters into a key-value bundle. */
Parse a URL query and fragment parameters into a key-value bundle
parseUrl
{ "repo_name": "Rachel-Ding/weiciyuan-for-eclipse", "path": "src/org/qii/weiciyuan/support/utils/Utility.java", "license": "gpl-3.0", "size": 45443 }
[ "android.os.Bundle", "java.net.MalformedURLException" ]
import android.os.Bundle; import java.net.MalformedURLException;
import android.os.*; import java.net.*;
[ "android.os", "java.net" ]
android.os; java.net;
2,000,001
@Test public void testResetDefaultInSetNonValidImage() throws Exception { EventContext ctx = newUserAndGroup("rwra--"); Image image = (Image) iUpdate.saveAndReturnObject(mmFactory .simpleImage()); // Image IRenderingSettingsPrx prx = factory.getRenderingSettingsSe...
void function() throws Exception { EventContext ctx = newUserAndGroup(STR); Image image = (Image) iUpdate.saveAndReturnObject(mmFactory .simpleImage()); IRenderingSettingsPrx prx = factory.getRenderingSettingsService(); List<Long> v = prx.resetDefaultsInSet(Image.class.getName(), Arrays.asList(image.getId().getValue())...
/** * Tests to apply the rendering settings to a collection of images. Tests * the <code>ApplySettingsToSet</code> method. * * @throws Exception * Thrown if an error occurred. */
Tests to apply the rendering settings to a collection of images. Tests the <code>ApplySettingsToSet</code> method
testResetDefaultInSetNonValidImage
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/RenderingSettingsServiceTest.java", "license": "gpl-2.0", "size": 67096 }
[ "java.util.Arrays", "java.util.List", "org.testng.Assert" ]
import java.util.Arrays; import java.util.List; import org.testng.Assert;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
2,878,703
@SuppressWarnings("unchecked") public void saveGamePlay() { JSONObject obj = new JSONObject(); FileWriter fileWriter; obj.put("x", Instances.player.getX()); obj.put("y", Instances.player.getY()); obj.put("name", Instances.player.getName()); obj.put("currentLife", Instances.player.getCurrentLife()); o...
@SuppressWarnings(STR) void function() { JSONObject obj = new JSONObject(); FileWriter fileWriter; obj.put("x", Instances.player.getX()); obj.put("y", Instances.player.getY()); obj.put("name", Instances.player.getName()); obj.put(STR, Instances.player.getCurrentLife()); obj.put(STR, Instances.player.getStrength()); obj...
/** * Saves the current game, including player position on map and player * stats. */
Saves the current game, including player position on map and player stats
saveGamePlay
{ "repo_name": "nealder/Adventure-of-Nealder", "path": "src/main/java/DAO/DAO.java", "license": "apache-2.0", "size": 4961 }
[ "java.io.File", "java.io.FileWriter", "java.io.IOException", "java.net.URISyntaxException", "org.json.simple.JSONObject" ]
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.net.URISyntaxException; import org.json.simple.JSONObject;
import java.io.*; import java.net.*; import org.json.simple.*;
[ "java.io", "java.net", "org.json.simple" ]
java.io; java.net; org.json.simple;
1,089,332
public static void displayPromptForId(List<File> fileList, int index) { System.out.print(numberedFileName(fileList, index)); System.out.print(" => "); }
static void function(List<File> fileList, int index) { System.out.print(numberedFileName(fileList, index)); System.out.print(STR); }
/** * Displays the text for prompting for the user for a display ID. * @param fileList File List * @param index File index to display in list (from 0) */
Displays the text for prompting for the user for a display ID
displayPromptForId
{ "repo_name": "samicemalone/swapf", "path": "src/swapf/Display.java", "license": "bsd-3-clause", "size": 4255 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,908,307
private static String buildJSonLineFromRow(Map<String, String> row) { String name = row.get("name"); String displayName = row.get("displayName"); String kind = row.get("kind"); boolean required = false; Object value = row.getOrDefault("required", "false"); if (value i...
static String function(Map<String, String> row) { String name = row.get("name"); String displayName = row.get(STR); String kind = row.get("kind"); boolean required = false; Object value = row.getOrDefault(STR, "false"); if (value instanceof Boolean) { required = (Boolean) value; } else if (value != null) { required = B...
/** * Builds a JSon line of the given row */
Builds a JSon line of the given row
buildJSonLineFromRow
{ "repo_name": "Thopap/camel", "path": "connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java", "license": "apache-2.0", "size": 28018 }
[ "java.util.Arrays", "java.util.LinkedHashSet", "java.util.List", "java.util.Map", "java.util.Set", "java.util.stream.Collectors", "org.apache.camel.maven.connector.util.JSonSchemaHelper" ]
import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import org.apache.camel.maven.connector.util.JSonSchemaHelper;
import java.util.*; import java.util.stream.*; import org.apache.camel.maven.connector.util.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
889,644