method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static Key createPrimaryKey(String ccIdseq)
{
return new Key(new Object[] {ccIdseq});
} | static Key function(String ccIdseq) { return new Key(new Object[] {ccIdseq}); } | /**
*
* Creates a Key object based on given key constituents
*/ | Creates a Key object based on given key constituents | createPrimaryKey | {
"repo_name": "CBIIT/cadsr-util",
"path": "cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/bc4j/ComponentConceptsExtImpl.java",
"license": "bsd-3-clause",
"size": 7455
} | [
"oracle.jbo.Key"
] | import oracle.jbo.Key; | import oracle.jbo.*; | [
"oracle.jbo"
] | oracle.jbo; | 2,309,893 |
public void removeSelectionChangedListener(ISelectionChangedListener listener) {
selectionChangedListeners.remove(listener);
} | void function(ISelectionChangedListener listener) { selectionChangedListeners.remove(listener); } | /**
* This implements {@link org.eclipse.jface.viewers.ISelectionProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This implements <code>org.eclipse.jface.viewers.ISelectionProvider</code>. | removeSelectionChangedListener | {
"repo_name": "ObeoNetwork/EAST-ADL-Designer",
"path": "plugins/org.obeonetwork.dsl.eastadl.editor/src/org/obeonetwork/dsl/east_adl/requirements/presentation/RequirementsEditor.java",
"license": "epl-1.0",
"size": 56816
} | [
"org.eclipse.jface.viewers.ISelectionChangedListener"
] | import org.eclipse.jface.viewers.ISelectionChangedListener; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 813,958 |
@CrossOrigin("*")
@RequestMapping(value = "/name/{name}", method = RequestMethod.GET)
public FYTCUser getUserByName(@PathVariable("name") final String name) {
logger.info("WebService getUser [name : " + name + "]");
return service.getUser(name);
}
| @CrossOrigin("*") @RequestMapping(value = STR, method = RequestMethod.GET) FYTCUser function(@PathVariable("name") final String name) { logger.info(STR + name + "]"); return service.getUser(name); } | /**
* Method to find a user
*
* @param id
* the id of the user we want to get
* @return The user founded
*/ | Method to find a user | getUserByName | {
"repo_name": "FEMMLille/findYourTrashCan",
"path": "findyourtrashcan-api/src/main/java/fr/femm/findyourtrashcan/controller/FYTCUserController.java",
"license": "mit",
"size": 2008
} | [
"fr.femm.findyourtrashcan.data.FYTCUser",
"org.springframework.web.bind.annotation.CrossOrigin",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import fr.femm.findyourtrashcan.data.FYTCUser; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; | import fr.femm.findyourtrashcan.data.*; import org.springframework.web.bind.annotation.*; | [
"fr.femm.findyourtrashcan",
"org.springframework.web"
] | fr.femm.findyourtrashcan; org.springframework.web; | 1,371,486 |
public synchronized void setWidgetsEditable(final boolean isEditable) {
if (LOG.isDebugEnabled()) {
LOG.debug("Setze Widgets editable: " + isEditable);
}
if (!EventQueue.isDispatchThread()) {
EventQueue.invokeLater(new Runnable() { | synchronized void function(final boolean isEditable) { if (LOG.isDebugEnabled()) { LOG.debug(STR + isEditable); } if (!EventQueue.isDispatchThread()) { EventQueue.invokeLater(new Runnable() { | /**
* ToDo --> no double code see BelisBroker or use Framework.
*
* @param isEditable DOCUMENT ME!
*/ | ToDo --> no double code see BelisBroker or use Framework | setWidgetsEditable | {
"repo_name": "cismet/belis-client",
"path": "src/main/java/de/cismet/belis/broker/BelisBroker.java",
"license": "gpl-3.0",
"size": 138018
} | [
"java.awt.EventQueue"
] | import java.awt.EventQueue; | import java.awt.*; | [
"java.awt"
] | java.awt; | 69,551 |
Rule GraceNote() {
return Sequence(Pitch(),
OptionalS(NoteLength())
).label(GraceNote);
}
| Rule GraceNote() { return Sequence(Pitch(), OptionalS(NoteLength()) ).label(GraceNote); } | /**
* as note, but without tie
*
* grace-note ::= pitch [note-length]
*/ | as note, but without tie grace-note ::= pitch [note-length] | GraceNote | {
"repo_name": "Sciss/abc4j",
"path": "abc/src/main/java/abc/parser/AbcGrammar.java",
"license": "lgpl-3.0",
"size": 72845
} | [
"org.parboiled.Rule"
] | import org.parboiled.Rule; | import org.parboiled.*; | [
"org.parboiled"
] | org.parboiled; | 735,969 |
protected void shutdown(String databaseName, String dir)
throws SQLException {
DataSource ds = JDBCDataSource.getDataSource(
obtainDbName(databaseName, dir));
JDBCDataSource.shutdownDatabase(ds);
} | void function(String databaseName, String dir) throws SQLException { DataSource ds = JDBCDataSource.getDataSource( obtainDbName(databaseName, dir)); JDBCDataSource.shutdownDatabase(ds); } | /**
* Shutdown the database, specified by the database name and prefix.
*
* @param databaseName the name of the database
* @param dir sub-directory prefix for the database
*/ | Shutdown the database, specified by the database name and prefix | shutdown | {
"repo_name": "viaper/DBPlus",
"path": "DerbyHodgepodge/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java",
"license": "apache-2.0",
"size": 26433
} | [
"java.sql.SQLException",
"javax.sql.DataSource",
"org.apache.derbyTesting.junit.JDBCDataSource"
] | import java.sql.SQLException; import javax.sql.DataSource; import org.apache.derbyTesting.junit.JDBCDataSource; | import java.sql.*; import javax.sql.*; import org.apache.*; | [
"java.sql",
"javax.sql",
"org.apache"
] | java.sql; javax.sql; org.apache; | 31,292 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ResourceSkuInner> list(Context context) {
return new PagedIterable<>(listAsync(context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ResourceSkuInner> function(Context context) { return new PagedIterable<>(listAsync(context)); } | /**
* Get the list of StorageCache.Cache SKUs available to this subscription.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
... | Get the list of StorageCache.Cache SKUs available to this subscription | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storagecache/azure-resourcemanager-storagecache/src/main/java/com/azure/resourcemanager/storagecache/implementation/SkusClientImpl.java",
"license": "mit",
"size": 13280
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.storagecache.fluent.models.ResourceSkuInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.storagecache.fluent.models.ResourceSkuInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storagecache.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 835,414 |
public void cleanupStorage() throws IOException {
this.fConf.deleteLocalFiles();
}
// Object on wait which MapEventsFetcherThread is going to wait.
private Object waitingOn = new Object();
private class MapEventsFetcherThread extends Thread { | void function() throws IOException { this.fConf.deleteLocalFiles(); } private Object waitingOn = new Object(); private class MapEventsFetcherThread extends Thread { | /**
* Removes all contents of temporary storage. Called upon
* startup, to remove any leftovers from previous run.
*/ | Removes all contents of temporary storage. Called upon startup, to remove any leftovers from previous run | cleanupStorage | {
"repo_name": "zyguan/HDFS-503-on-0.20.2",
"path": "src/mapred/org/apache/hadoop/mapred/TaskTracker.java",
"license": "apache-2.0",
"size": 112048
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 448,461 |
// ----------------------------------------------------------
public URI getResolvedTransportWithoutPassword(IStringEncoder encoder)
throws SubmissionTargetException
{
String uriString = resolveParameters(assignment.getTransport(),
encoder, true);
try
{
... | URI function(IStringEncoder encoder) throws SubmissionTargetException { String uriString = resolveParameters(assignment.getTransport(), encoder, true); try { return new URI(uriString); } catch (URISyntaxException e) { throw new SubmissionTargetException(e); } } | /**
* Gets a URI that represents the transport to use for submitting the
* package, once any parameter placeholders have been resolved, while also
* protecting the user's password from being displayed. This method is
* useful for logging.
*
* @param encoder the encoder to use to enco... | Gets a URI that represents the transport to use for submitting the package, once any parameter placeholders have been resolved, while also protecting the user's password from being displayed. This method is useful for logging | getResolvedTransportWithoutPassword | {
"repo_name": "web-cat/electronic-submitter",
"path": "src/org/webcat/submitter/SubmissionManifest.java",
"license": "gpl-2.0",
"size": 17582
} | [
"java.net.URISyntaxException"
] | import java.net.URISyntaxException; | import java.net.*; | [
"java.net"
] | java.net; | 2,268,282 |
public void deleteHabit(String id) {
for (Habit habit : habitList) {
if (habit.getElasticId().equals(id)) {
habitList.remove(habit);
break;
}
}
saveToDisk();
} | void function(String id) { for (Habit habit : habitList) { if (habit.getElasticId().equals(id)) { habitList.remove(habit); break; } } saveToDisk(); } | /**
* Remove the habit from in memory list synchronously, then save
* to disk async.
* @param id the id of the habit to delete
*/ | Remove the habit from in memory list synchronously, then save to disk async | deleteHabit | {
"repo_name": "CMPUT301F17T21/StylePoints",
"path": "HabitTracker/app/src/main/java/com/stylepoints/habittracker/repository/local/HabitJsonSource.java",
"license": "apache-2.0",
"size": 7574
} | [
"com.stylepoints.habittracker.model.Habit"
] | import com.stylepoints.habittracker.model.Habit; | import com.stylepoints.habittracker.model.*; | [
"com.stylepoints.habittracker"
] | com.stylepoints.habittracker; | 621,937 |
public TypeBinding checkFieldAccess(BlockScope scope) {
if (this.delegateThis == null) {
return super.checkFieldAccess(scope);
}
FieldBinding fieldBinding = (FieldBinding) this.binding;
this.bits &= ~RestrictiveFlagMASK; // clear bits
this.bits |= Binding.FIELD;
if (!fieldBinding.isStatic()) {
// must check ... | TypeBinding function(BlockScope scope) { if (this.delegateThis == null) { return super.checkFieldAccess(scope); } FieldBinding fieldBinding = (FieldBinding) this.binding; this.bits &= ~RestrictiveFlagMASK; this.bits = Binding.FIELD; if (!fieldBinding.isStatic()) { if (this.evaluationContext.isStatic) { scope.problemRep... | /**
* Check and/or redirect the field access to the delegate receiver if any
*/ | Check and/or redirect the field access to the delegate receiver if any | checkFieldAccess | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jdt.core/src/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java",
"license": "epl-1.0",
"size": 28283
} | [
"org.eclipse.jdt.internal.compiler.impl.Constant",
"org.eclipse.jdt.internal.compiler.lookup.Binding",
"org.eclipse.jdt.internal.compiler.lookup.BlockScope",
"org.eclipse.jdt.internal.compiler.lookup.FieldBinding",
"org.eclipse.jdt.internal.compiler.lookup.TypeBinding"
] | import org.eclipse.jdt.internal.compiler.impl.Constant; import org.eclipse.jdt.internal.compiler.lookup.Binding; import org.eclipse.jdt.internal.compiler.lookup.BlockScope; import org.eclipse.jdt.internal.compiler.lookup.FieldBinding; import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; | import org.eclipse.jdt.internal.compiler.impl.*; import org.eclipse.jdt.internal.compiler.lookup.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,826,672 |
@Generated
@Selector("sourceImageFeatureChannels")
@NUInt
public native long sourceImageFeatureChannels(); | @Selector(STR) native long function(); | /**
* [@property] sourceImageFeatureChannels
* <p>
* The number of feature channels per pixel in the input image to forward convolution which is used here as secondarySource.
* This is same as dataSource.descriptor.inputFeatureChannels. This is also the number of feature channels in destinatin ima... | [@property] sourceImageFeatureChannels The number of feature channels per pixel in the input image to forward convolution which is used here as secondarySource. This is same as dataSource.descriptor.inputFeatureChannels. This is also the number of feature channels in destinatin image here i.e. gradient with respect to ... | sourceImageFeatureChannels | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/metalperformanceshaders/MPSCNNConvolutionGradient.java",
"license": "apache-2.0",
"size": 21824
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,855,122 |
public Set<PK> getAllIDs(); | Set<PK> function(); | /**
* Ritorna la collezione di ID relativi alle entity.
*
* @return
*/ | Ritorna la collezione di ID relativi alle entity | getAllIDs | {
"repo_name": "svaponi/mir-commons",
"path": "mir-commons-base-model/src/main/java/it/miriade/commons/model/dao/GenericDao.java",
"license": "gpl-3.0",
"size": 7632
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,449,668 |
List<SkyValue> getOrderedValues(Iterable<? extends SkyKey> depKeys) throws InterruptedException; | List<SkyValue> getOrderedValues(Iterable<? extends SkyKey> depKeys) throws InterruptedException; | /**
* Similar to getValues, but instead of returning a {@code Map<SkyKey, SkyValue>}, returns a
* {@code List<SkyValue>} in the order of the input {@code Iterable<SkyKey>}. b/172462551
*/ | Similar to getValues, but instead of returning a Map, returns a List in the order of the input Iterable. b/172462551 | getOrderedValues | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/skyframe/SkyFunction.java",
"license": "apache-2.0",
"size": 22644
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,173,441 |
final WorkQueue registerWorker(ForkJoinWorkerThread wt) {
UncaughtExceptionHandler handler; WorkQueue[] ws; int s, ps;
wt.setDaemon(true);
if ((handler = ueh) != null)
wt.setUncaughtExceptionHandler(handler);
do {} while (!U.compareAndSwapInt(this, INDEXSEED, s = indexSee... | final WorkQueue registerWorker(ForkJoinWorkerThread wt) { UncaughtExceptionHandler handler; WorkQueue[] ws; int s, ps; wt.setDaemon(true); if ((handler = ueh) != null) wt.setUncaughtExceptionHandler(handler); do {} while (!U.compareAndSwapInt(this, INDEXSEED, s = indexSeed, s += SEED_INCREMENT) s == 0); WorkQueue w = n... | /**
* Callback from ForkJoinWorkerThread to establish and record its
* WorkQueue. To avoid scanning bias due to packing entries in
* front of the workQueues array, we treat the array as a simple
* power-of-two hash table using per-thread seed as hash,
* expanding as needed.
*
* @param... | Callback from ForkJoinWorkerThread to establish and record its WorkQueue. To avoid scanning bias due to packing entries in front of the workQueues array, we treat the array as a simple power-of-two hash table using per-thread seed as hash, expanding as needed | registerWorker | {
"repo_name": "exercitussolus/yolo",
"path": "src/main/java/jsr166e/ForkJoinPool.java",
"license": "agpl-3.0",
"size": 144676
} | [
"java.lang.Thread",
"java.util.Arrays"
] | import java.lang.Thread; import java.util.Arrays; | import java.lang.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,401,498 |
private SegmentIdWithShardSpec getAppendableSegment(final DateTime timestamp, final String sequenceName)
{
synchronized (segments) {
final SegmentsForSequence segmentsForSequence = segments.get(sequenceName);
if (segmentsForSequence == null) {
return null;
}
final Map.Entry<Lon... | SegmentIdWithShardSpec function(final DateTime timestamp, final String sequenceName) { synchronized (segments) { final SegmentsForSequence segmentsForSequence = segments.get(sequenceName); if (segmentsForSequence == null) { return null; } final Map.Entry<Long, SegmentsOfInterval> candidateEntry = segmentsForSequence.fl... | /**
* Find a segment in the {@link SegmentState#APPENDING} state for the given timestamp and sequenceName.
*/ | Find a segment in the <code>SegmentState#APPENDING</code> state for the given timestamp and sequenceName | getAppendableSegment | {
"repo_name": "michaelschiff/druid",
"path": "server/src/main/java/org/apache/druid/segment/realtime/appenderator/BaseAppenderatorDriver.java",
"license": "apache-2.0",
"size": 27067
} | [
"java.util.Map",
"org.joda.time.DateTime"
] | import java.util.Map; import org.joda.time.DateTime; | import java.util.*; import org.joda.time.*; | [
"java.util",
"org.joda.time"
] | java.util; org.joda.time; | 2,560,371 |
final void getText(CharTermAttribute t) {
t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
}
MusicbrainzTokenizerImpl(java.io.Reader in) {
this.zzReader = in;
}
MusicbrainzTokenizerImpl(java.io.InputStream in) {
this(new java.io.InputStreamReader
(in, java.nio.charset... | final void getText(CharTermAttribute t) { t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); } MusicbrainzTokenizerImpl(java.io.Reader in) { this.zzReader = in; } MusicbrainzTokenizerImpl(java.io.InputStream in) { this(new java.io.InputStreamReader (in, java.nio.charset.Charset.forName("UTF-8"))); } | /**
* Fills TermAttribute with the current token text.
*/ | Fills TermAttribute with the current token text | getText | {
"repo_name": "metabrainz/mb-solrquerywriter",
"path": "mb-solr/src/main/java/org/musicbrainz/search/analysis/MusicbrainzTokenizerImpl.java",
"license": "bsd-3-clause",
"size": 22579
} | [
"org.apache.lucene.analysis.tokenattributes.CharTermAttribute"
] | import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; | import org.apache.lucene.analysis.tokenattributes.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 2,885,971 |
@Override
public String[] getOrderedProperties() {
return new String[] {
KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR,
KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE,
KFSPropertyConstants.ORGANIZATION_CODE,
KFSPropertyConstants.TRANSMISSI... | String[] function() { return new String[] { KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, KFSPropertyConstants.ORGANIZATION_CODE, KFSPropertyConstants.TRANSMISSION_DATE, KFSPropertyConstants.COLLECTOR_BATCH_RECORD_TYPE, KFSPropertyConstants.TRAILER_RECORD_FIRST_EMPTY_FIELD, K... | /**
* Returns the fields to be parsed from a String, in order, to form a CollectorBatch
* @see org.kuali.kfs.sys.businessobject.BusinessObjectStringParserFieldUtils#getOrderedProperties()
*/ | Returns the fields to be parsed from a String, in order, to form a CollectorBatch | getOrderedProperties | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/gl/batch/CollectorBatchTrailerRecordFieldUtil.java",
"license": "agpl-3.0",
"size": 2456
} | [
"org.kuali.kfs.sys.KFSPropertyConstants"
] | import org.kuali.kfs.sys.KFSPropertyConstants; | import org.kuali.kfs.sys.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,467,161 |
@Deprecated
public DirContext getResources() {
return context.getResources();
}
// ------------------------------------------------- ServletContext Methods | DirContext function() { return context.getResources(); } | /**
* Return the resources object that is mapped to a specified path.
* The path must begin with a "/" and is interpreted as relative to the
* current context root.
*/ | Return the resources object that is mapped to a specified path. The path must begin with a "/" and is interpreted as relative to the current context root | getResources | {
"repo_name": "thanple/tomcatsrc",
"path": "java/org/apache/catalina/core/ApplicationContext.java",
"license": "apache-2.0",
"size": 57473
} | [
"javax.naming.directory.DirContext"
] | import javax.naming.directory.DirContext; | import javax.naming.directory.*; | [
"javax.naming"
] | javax.naming; | 965,179 |
@DELETE
@Produces(MediaType.APPLICATION_JSON)
@Path("/{resId}")
public void deleteResource(@PathParam("workgroupId") final Long workgroupId,
@PathParam("resId") final Long resId); | @Produces(MediaType.APPLICATION_JSON) @Path(STR) void function(@PathParam(STR) final Long workgroupId, @PathParam("resId") final Long resId); | /**
* Undeploy the service.
*/ | Undeploy the service | deleteResource | {
"repo_name": "pon-prisma/PrismaDemo",
"path": "BusinessLayer/src/main/java/it/prisma/businesslayer/bizws/paas/services/biaas/BIaaSWS.java",
"license": "apache-2.0",
"size": 1824
} | [
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType"
] | import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; | import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 2,563,994 |
@JsonSetter("resultCount")
public void setResultCount (int value) {
this.resultCount = value;
}
| @JsonSetter(STR) void function (int value) { this.resultCount = value; } | /** SETTER
* The total amount of voice URIs found
*/ | SETTER The total amount of voice URIs found | setResultCount | {
"repo_name": "voxbone/voxapi-client-java",
"path": "APIv3SandboxLib/src/com/voxbone/sandbox/models/VoiceUriListModel.java",
"license": "mit",
"size": 1192
} | [
"com.fasterxml.jackson.annotation.JsonSetter"
] | import com.fasterxml.jackson.annotation.JsonSetter; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,953,743 |
public static double[][] getObservedTransformedToCameraFrame() throws NotConvergedException, IOException {
double[][] coordsI = getObservedFeaturesInAllImages();
double[] kRadial = getRadialDistortionR2R4();
double[][] intr = getIntrinsicCameraMatrix();
boo... | static double[][] function() throws NotConvergedException, IOException { double[][] coordsI = getObservedFeaturesInAllImages(); double[] kRadial = getRadialDistortionR2R4(); double[][] intr = getIntrinsicCameraMatrix(); boolean useR2R4 = true; double[][] coordsIC = MatrixUtil.zeros(coordsI.length, coordsI[0].length); d... | /**
* transform the observed to camera coordinates.
radial distortion is removed.
* @return
* @throws NotConvergedException
*/ | transform the observed to camera coordinates | getObservedTransformedToCameraFrame | {
"repo_name": "nking/curvature-scale-space-corners-and-transformations",
"path": "tests/algorithms/imageProcessing/transform/NeurochemistryBookData.java",
"license": "mit",
"size": 21548
} | [
"java.io.IOException",
"no.uib.cipr.matrix.NotConvergedException"
] | import java.io.IOException; import no.uib.cipr.matrix.NotConvergedException; | import java.io.*; import no.uib.cipr.matrix.*; | [
"java.io",
"no.uib.cipr"
] | java.io; no.uib.cipr; | 203,573 |
@Override
public URL findResource(final String name) {
if (log.isDebugEnabled())
log.debug(" findResource(" + name + ")");
URL url = null;
String path = nameToPath(name);
ResourceEntry entry = resourceEntries.get(path);
if (entry == null) {
... | URL function(final String name) { if (log.isDebugEnabled()) log.debug(STR + name + ")"); URL url = null; String path = nameToPath(name); ResourceEntry entry = resourceEntries.get(path); if (entry == null) { if (securityManager != null) { PrivilegedAction<ResourceEntry> dp = new PrivilegedFindResourceByName(name, path);... | /**
* Find the specified resource in our local repository, and return a
* <code>URL</code> referring to it, or <code>null</code> if this resource
* cannot be found.
*
* @param name Name of the resource to be found
*/ | Find the specified resource in our local repository, and return a <code>URL</code> referring to it, or <code>null</code> if this resource cannot be found | findResource | {
"repo_name": "wenzhucjy/tomcat_source",
"path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/loader/WebappClassLoader.java",
"license": "apache-2.0",
"size": 105055
} | [
"java.security.AccessController",
"java.security.PrivilegedAction"
] | import java.security.AccessController; import java.security.PrivilegedAction; | import java.security.*; | [
"java.security"
] | java.security; | 2,113,176 |
@Override
@XmlElement(name = "function")
public OnLineFunction getFunction() {
return function;
} | @XmlElement(name = STR) OnLineFunction function() { return function; } | /**
* Returns the code for function performed by the online resource.
*
* @return Function performed by the online resource, or {@code null}.
*/ | Returns the code for function performed by the online resource | getFunction | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultOnlineResource.java",
"license": "apache-2.0",
"size": 10957
} | [
"javax.xml.bind.annotation.XmlElement",
"org.opengis.metadata.citation.OnLineFunction"
] | import javax.xml.bind.annotation.XmlElement; import org.opengis.metadata.citation.OnLineFunction; | import javax.xml.bind.annotation.*; import org.opengis.metadata.citation.*; | [
"javax.xml",
"org.opengis.metadata"
] | javax.xml; org.opengis.metadata; | 1,283,198 |
public void setTabStopBottomAssistiveText(String bottomMessage) {
Roles.getNoteRole().setAriaLabelProperty(bottomTabStop, bottomMessage);
} | void function(String bottomMessage) { Roles.getNoteRole().setAriaLabelProperty(bottomTabStop, bottomMessage); } | /**
* Sets the message that is provided to users of assistive devices when the
* user reaches the bottom of the window when leaving a window with the tab
* key is prevented.
* <p>
* This message is not visible on the screen.
*
* @param bottomMessage
* String provided ... | Sets the message that is provided to users of assistive devices when the user reaches the bottom of the window when leaving a window with the tab key is prevented. This message is not visible on the screen | setTabStopBottomAssistiveText | {
"repo_name": "jdahlstrom/vaadin.react",
"path": "client/src/main/java/com/vaadin/client/ui/VWindow.java",
"license": "apache-2.0",
"size": 52036
} | [
"com.google.gwt.aria.client.Roles"
] | import com.google.gwt.aria.client.Roles; | import com.google.gwt.aria.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,417,517 |
private void drawTranslatedRenderedImage(RenderedImage img,
Rectangle region,
int i2uTransX,
int i2uTransY) {
// Cache tile grid info
int tileGridXOffset = img.getTi... | void function(RenderedImage img, Rectangle region, int i2uTransX, int i2uTransY) { int tileGridXOffset = img.getTileGridXOffset(); int tileGridYOffset = img.getTileGridYOffset(); int tileWidth = img.getTileWidth(); int tileHeight = img.getTileHeight(); int minTileX = getTileIndex(region.x, tileGridXOffset, tileWidth); ... | /**
* Draw a portion of a RenderedImage tile-by-tile with a given
* integer image to user space translation. The user to
* device transform must also be an integer translation.
*/ | Draw a portion of a RenderedImage tile-by-tile with a given integer image to user space translation. The user to device transform must also be an integer translation | drawTranslatedRenderedImage | {
"repo_name": "md-5/jdk10",
"path": "src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java",
"license": "gpl-2.0",
"size": 138110
} | [
"java.awt.Rectangle",
"java.awt.image.BufferedImage",
"java.awt.image.ColorModel",
"java.awt.image.Raster",
"java.awt.image.RenderedImage",
"java.awt.image.WritableRaster"
] | import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.Raster; import java.awt.image.RenderedImage; import java.awt.image.WritableRaster; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,861,494 |
public synchronized String getInfo() throws IOException{
// _GET_INFO = 80 ' Response: "information on version robot, etc" 10 80
// En algunos casos la F2 altera el primer caracter recibido desde el S2
// cuando se hacen dos invocaciones sucesivas a este método
// Esperar unos 100ms... | synchronized String function() throws IOException{ byte[] packet = makeS2Packet( 80 ); sendS2Command( packet, 0 ); return getLineResponse( 128 ); } | /***
* Obtiene desde el S2 un String descriptivo del robot
*
* @return el string informativo del S2
* @throws IOException
*/ | Obtiene desde el S2 un String descriptivo del robot | getInfo | {
"repo_name": "titos-carrasco/Scribbler2-Java",
"path": "src/rcr/scribbler2/robot/Scribbler2.java",
"license": "mit",
"size": 41850
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 175,139 |
@ApiModelProperty(value = "Contains a URI for an endpoint that you can use to retrieve the envelope or envelopes.")
public String getEnvelopeUri() {
return envelopeUri;
} | @ApiModelProperty(value = STR) String function() { return envelopeUri; } | /**
* Contains a URI for an endpoint that you can use to retrieve the envelope or envelopes..
* @return envelopeUri
**/ | Contains a URI for an endpoint that you can use to retrieve the envelope or envelopes. | getEnvelopeUri | {
"repo_name": "docusign/docusign-java-client",
"path": "src/main/java/com/docusign/esign/model/FolderItemV2.java",
"license": "mit",
"size": 17577
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,864,084 |
public ServiceFuture<Void> beginRotateClusterCertificatesAsync(String resourceGroupName, String resourceName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginRotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String resourceName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginRotateClusterCertificatesWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); } | /**
* Rotate certificates of a managed cluster.
* Rotate certificates of a managed cluster.
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param serviceCallback the async ServiceCallback to handle successful a... | Rotate certificates of a managed cluster. Rotate certificates of a managed cluster | beginRotateClusterCertificatesAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/ManagedClustersInner.java",
"license": "mit",
"size": 155942
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,050,533 |
public static String format(String pattern, Map<String, Object> arguments) {
MessageFormat temp = new MessageFormat(pattern);
return temp.format(arguments);
} | static String function(String pattern, Map<String, Object> arguments) { MessageFormat temp = new MessageFormat(pattern); return temp.format(arguments); } | /**
* Creates a MessageFormat with the given pattern and uses it to
* format the given arguments. The pattern must identifyarguments
* by name instead of by number.
* <p>
* @throws IllegalArgumentException if the pattern is invalid
* @throws IllegalArgumentException if a value in the
... | Creates a MessageFormat with the given pattern and uses it to format the given arguments. The pattern must identifyarguments by name instead of by number. | format | {
"repo_name": "Miracle121/quickdic-dictionary.dictionary",
"path": "jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/MessageFormat.java",
"license": "apache-2.0",
"size": 113006
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,406,282 |
public boolean doLogin() {
isLoggedIn = false; // reset login flag
if (httpClient == null) {
httpClient = new HttpClient();
}
final String url = "http://" + hostname + ":" + port + "/fsapi/CREATE_SESSION?pin=" + pin;
logger.trace("opening URL:" + url);
... | boolean function() { isLoggedIn = false; if (httpClient == null) { httpClient = new HttpClient(); } final String url = STRopening URL:STRMethod failed: STRlogin response: STRlogin successfulSTRParsing response failedSTRFatal protocol violation: {}STRFatal transport error: {}", ioe.toString()); } finally { method.releas... | /**
* Perform login/establish a new session. Uses the PIN number and when successful saves the assigned sessionID for
* future requests.
*
* @return <code>true</code> if login was successful; <code>false</code> otherwise.
*/ | Perform login/establish a new session. Uses the PIN number and when successful saves the assigned sessionID for future requests | doLogin | {
"repo_name": "openhab/openhab",
"path": "bundles/binding/org.openhab.binding.frontiersiliconradio/src/main/java/org/openhab/binding/frontiersiliconradio/internal/FrontierSiliconRadioConnection.java",
"license": "epl-1.0",
"size": 7319
} | [
"org.apache.commons.httpclient.HttpClient"
] | import org.apache.commons.httpclient.HttpClient; | import org.apache.commons.httpclient.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,341,017 |
@Override
public void startTable(List<String> titles) {
StringBuilder ele = new StringBuilder();
ele.append("<table>\n<thead>\n\t<tr>\n");
for(String title : titles) {
ele.append("\t\t<th>").append(title).append("</th>\n");
}
ele.append("\t</tr>\n</the... | void function(List<String> titles) { StringBuilder ele = new StringBuilder(); ele.append(STR); for(String title : titles) { ele.append(STR).append(title).append(STR); } ele.append(STR); try { out.write(ele.toString()); } catch (IOException ex) { logger.log(Level.SEVERE, STR, ex); } } | /**
* Start a new table with the given column titles.
* @param titles column titles
*/ | Start a new table with the given column titles | startTable | {
"repo_name": "kefir-/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/ReportHTML.java",
"license": "apache-2.0",
"size": 42038
} | [
"java.io.IOException",
"java.util.List",
"java.util.logging.Level"
] | import java.io.IOException; import java.util.List; import java.util.logging.Level; | import java.io.*; import java.util.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,085,687 |
@Override
public GroupDetails loadGroupByGroupname(String groupname) throws UsernameNotFoundException, DataAccessException {
throw new UsernameNotFoundException(groupname);
} | GroupDetails function(String groupname) throws UsernameNotFoundException, DataAccessException { throw new UsernameNotFoundException(groupname); } | /**
* This implementation doesn't support groups.
*/ | This implementation doesn't support groups | loadGroupByGroupname | {
"repo_name": "dariver/jenkins",
"path": "core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java",
"license": "mit",
"size": 29340
} | [
"org.acegisecurity.userdetails.UsernameNotFoundException",
"org.springframework.dao.DataAccessException"
] | import org.acegisecurity.userdetails.UsernameNotFoundException; import org.springframework.dao.DataAccessException; | import org.acegisecurity.userdetails.*; import org.springframework.dao.*; | [
"org.acegisecurity.userdetails",
"org.springframework.dao"
] | org.acegisecurity.userdetails; org.springframework.dao; | 520,297 |
private static void printMetadataEntry(GoogleBaseEntry entry) {
MetadataEntryExtension metadata = entry.getGoogleBaseMetadata();
AttributeHistogram attributeHistogram = metadata.getAttributeHistogram();
System.out.println(attributeHistogram.getAttributeName() +
" (" + attributeHistogram.getAttrib... | static void function(GoogleBaseEntry entry) { MetadataEntryExtension metadata = entry.getGoogleBaseMetadata(); AttributeHistogram attributeHistogram = metadata.getAttributeHistogram(); System.out.println(attributeHistogram.getAttributeName() + STR + attributeHistogram.getAttributeType().getName() + STR + STR + attribut... | /**
* Prints a few relevant attributes and the values of the attribute histogram
* of a metadata GoogleBaseEntry item.
*
* @param entry a Google Base data API metadata entry
*/ | Prints a few relevant attributes and the values of the attribute histogram of a metadata GoogleBaseEntry item | printMetadataEntry | {
"repo_name": "vanta/gdata-java-client",
"path": "java/sample/gbase/cmdline/MetadataExample.java",
"license": "apache-2.0",
"size": 3928
} | [
"com.google.api.gbase.client.AttributeHistogram",
"com.google.api.gbase.client.GoogleBaseEntry",
"com.google.api.gbase.client.MetadataEntryExtension"
] | import com.google.api.gbase.client.AttributeHistogram; import com.google.api.gbase.client.GoogleBaseEntry; import com.google.api.gbase.client.MetadataEntryExtension; | import com.google.api.gbase.client.*; | [
"com.google.api"
] | com.google.api; | 2,694,101 |
protected static String getLocation(Target target, boolean relative) {
Location location = target.getLocation();
return relative
? location.print(target.getPackage().getPackageDirectory().asFragment(),
target.getPackage().getNameFragment())
: location.print();
} | static String function(Target target, boolean relative) { Location location = target.getLocation(); return relative ? location.print(target.getPackage().getPackageDirectory().asFragment(), target.getPackage().getNameFragment()) : location.print(); } | /**
* Returns the target location, eventually stripping out the workspace path to obtain a relative
* target (stable across machines / workspaces).
*
* @param target The target to extract location from.
* @param relative Whether to return a relative path or not.
* @return the target location
*/ | Returns the target location, eventually stripping out the workspace path to obtain a relative target (stable across machines / workspaces) | getLocation | {
"repo_name": "bitemyapp/bazel",
"path": "src/main/java/com/google/devtools/build/lib/query2/output/OutputFormatter.java",
"license": "apache-2.0",
"size": 17979
} | [
"com.google.devtools.build.lib.events.Location",
"com.google.devtools.build.lib.packages.Target"
] | import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.packages.Target; | import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.packages.*; | [
"com.google.devtools"
] | com.google.devtools; | 504,005 |
@Test
public void testExecutionFailureWithFallbackImplementedButDisabled() {
TestHystrixCommand<Boolean> commandEnabled = new KnownFailureTestCommandWithFallback(new TestCircuitBreaker(), true);
try {
assertEquals(false, commandEnabled.execute());
} catch (Exception e) {
... | void function() { TestHystrixCommand<Boolean> commandEnabled = new KnownFailureTestCommandWithFallback(new TestCircuitBreaker(), true); try { assertEquals(false, commandEnabled.execute()); } catch (Exception e) { e.printStackTrace(); fail(STR); } TestHystrixCommand<Boolean> commandDisabled = new KnownFailureTestCommand... | /**
* Test a command execution that fails but has a fallback.
*/ | Test a command execution that fails but has a fallback | testExecutionFailureWithFallbackImplementedButDisabled | {
"repo_name": "manwithharmonica/Hystrix",
"path": "hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTest.java",
"license": "apache-2.0",
"size": 265467
} | [
"com.netflix.hystrix.HystrixCircuitBreakerTest",
"com.netflix.hystrix.util.HystrixRollingNumberEvent",
"org.junit.Assert"
] | import com.netflix.hystrix.HystrixCircuitBreakerTest; import com.netflix.hystrix.util.HystrixRollingNumberEvent; import org.junit.Assert; | import com.netflix.hystrix.*; import com.netflix.hystrix.util.*; import org.junit.*; | [
"com.netflix.hystrix",
"org.junit"
] | com.netflix.hystrix; org.junit; | 920,223 |
public MOrderLine createLine(MProduct product, BigDecimal QtyOrdered,
BigDecimal PriceActual) {
if (!getDocStatus().equals("DR") )
return null;
//add new line or increase qty
// catch Exceptions at order.getLines()
int numLines = 0;
MOrderLine[] lines = null;
try
{
lines = getLines(null,... | MOrderLine function(MProduct product, BigDecimal QtyOrdered, BigDecimal PriceActual) { if (!getDocStatus().equals("DR") ) return null; int numLines = 0; MOrderLine[] lines = null; try { lines = getLines(null,"Line"); numLines = lines.length; for (int i = 0; i < numLines; i++) { if (lines[i].getM_Product_ID() == product... | /**
* Create new Line
*
* @return line or null
*/ | Create new Line | createLine | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/client/src/main/java-legacy/org/compiere/pos/PosOrderModel.java",
"license": "gpl-2.0",
"size": 13488
} | [
"java.math.BigDecimal",
"org.compiere.model.MOrderLine",
"org.compiere.model.MProduct",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.model.MOrderLine; import org.compiere.model.MProduct; import org.compiere.util.Env; | import java.math.*; import org.compiere.model.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.model",
"org.compiere.util"
] | java.math; org.compiere.model; org.compiere.util; | 400,673 |
private static void recursiveParseProperties(Process process, Stream xml,
Store store, String path, int type, Properties properties, int depth) throws IOException {
String target;
String[] names;
Connector.parseProperties(process, xml, store, path, type, prope... | static void function(Process process, Stream xml, Store store, String path, int type, Properties properties, int depth) throws IOException { String target; String[] names; Connector.parseProperties(process, xml, store, path, type, properties); if (depth <= 0) return; names = store.getChildrenNames(path); if (names != n... | /**
* Geht für PROPFIND rekursiv durch alle Verzeichnisse.
* @param path aktueller Pfad
* @param process Process
* @param xml XML Datenstrom
* @param store Store
* @param type PROPFIND Typ
* @param properties Properties
* @par... | Geht für PROPFIND rekursiv durch alle Verzeichnisse | recursiveParseProperties | {
"repo_name": "seanox/webdav",
"path": "sources/com/seanox/webdav/Connector.java",
"license": "gpl-2.0",
"size": 86927
} | [
"com.seanox.module.http.Process",
"com.seanox.webdav.storage.Store",
"com.seanox.xml.Stream",
"java.io.IOException"
] | import com.seanox.module.http.Process; import com.seanox.webdav.storage.Store; import com.seanox.xml.Stream; import java.io.IOException; | import com.seanox.module.http.*; import com.seanox.webdav.storage.*; import com.seanox.xml.*; import java.io.*; | [
"com.seanox.module",
"com.seanox.webdav",
"com.seanox.xml",
"java.io"
] | com.seanox.module; com.seanox.webdav; com.seanox.xml; java.io; | 1,901,226 |
public static TickUnitSource createStandardDateTickUnits(TimeZone zone,
Locale locale) {
ParamChecks.nullNotPermitted(zone, "zone");
ParamChecks.nullNotPermitted(locale, "locale");
TickUnits units = new TickUnits();
// date formatters
DateFormat f1 = new SimpleD... | static TickUnitSource function(TimeZone zone, Locale locale) { ParamChecks.nullNotPermitted(zone, "zone"); ParamChecks.nullNotPermitted(locale, STR); TickUnits units = new TickUnits(); DateFormat f1 = new SimpleDateFormat(STR, locale); DateFormat f2 = new SimpleDateFormat(STR, locale); DateFormat f3 = new SimpleDateFor... | /**
* Returns a collection of standard date tick units. This collection will
* be used by default, but you are free to create your own collection if
* you want to (see the
* {@link ValueAxis#setStandardTickUnits(TickUnitSource)} method inherited
* from the {@link ValueAxis} class).
*
... | Returns a collection of standard date tick units. This collection will be used by default, but you are free to create your own collection if you want to (see the <code>ValueAxis#setStandardTickUnits(TickUnitSource)</code> method inherited from the <code>ValueAxis</code> class) | createStandardDateTickUnits | {
"repo_name": "Epsilon2/Memetic-Algorithm-for-TSP",
"path": "jfreechart-1.0.16/source/org/jfree/chart/axis/DateAxis.java",
"license": "mit",
"size": 73527
} | [
"java.text.DateFormat",
"java.text.SimpleDateFormat",
"java.util.Locale",
"java.util.TimeZone",
"org.jfree.chart.util.ParamChecks"
] | import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Locale; import java.util.TimeZone; import org.jfree.chart.util.ParamChecks; | import java.text.*; import java.util.*; import org.jfree.chart.util.*; | [
"java.text",
"java.util",
"org.jfree.chart"
] | java.text; java.util; org.jfree.chart; | 238,311 |
public LocalDateTime getFinishedAt() {
return finishedAt;
} | LocalDateTime function() { return finishedAt; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ASYNC_PROCESS.FINISHED_AT
*
* @return the value of ASYNC_PROCESS.FINISHED_AT
*
* @mbggenerated
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column ASYNC_PROCESS.FINISHED_AT | getFinishedAt | {
"repo_name": "agwlvssainokuni/springapp",
"path": "common/src/generated/java/cherry/common/db/gen/dto/AsyncProcess.java",
"license": "apache-2.0",
"size": 16723
} | [
"org.joda.time.LocalDateTime"
] | import org.joda.time.LocalDateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,511,336 |
String envName = null;
// Assert that all of the primitive field types are injected
// correctly from the Environment Entries.
assertEquals(testpoint + (testpoint > 9 ? " --> " : " ---> ") +
"char field is T : " + ivchar,
I_CHAR.charValue(), ivchar);
... | String envName = null; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivchar, I_CHAR.charValue(), ivchar); ++testpoint; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivbyte, I_BYTE.byteValue(), ivbyte); ++testpoint; assertEquals(testpoint + (testpoint > 9 ? STR : STR) + STR + ivshort, I_SHO... | /**
* Verify Environment Injection (field or method) occurred properly.
**/ | Verify Environment Injection (field or method) occurred properly | verifyEnvInjection | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.injection_fat/test-applications/EJB3INJSMBean.jar/src/com/ibm/ws/ejbcontainer/injection/mix/ejb/BasicSFEnvInjectPrimFldBean.java",
"license": "epl-1.0",
"size": 19401
} | [
"javax.naming.Context",
"javax.naming.InitialContext",
"org.junit.Assert"
] | import javax.naming.Context; import javax.naming.InitialContext; import org.junit.Assert; | import javax.naming.*; import org.junit.*; | [
"javax.naming",
"org.junit"
] | javax.naming; org.junit; | 1,895,286 |
public void mouseMoved(MouseEvent event); | void function(MouseEvent event); | /**
* Called when the mouse is moved.
* @param event The event object.
*/ | Called when the mouse is moved | mouseMoved | {
"repo_name": "Pugduddly/enderX",
"path": "src/main/java/xyz/pugduddly/enderX/ui/Desktop.java",
"license": "gpl-2.0",
"size": 3335
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 615,145 |
public static boolean removeAll(Collection self, Object[] items) {
Collection pickFrom = new TreeSet(new NumberAwareComparator());
pickFrom.addAll(Arrays.asList(items));
return self.removeAll(pickFrom);
} | static boolean function(Collection self, Object[] items) { Collection pickFrom = new TreeSet(new NumberAwareComparator()); pickFrom.addAll(Arrays.asList(items)); return self.removeAll(pickFrom); } | /**
* Modifies this collection by removing its elements that are contained
* within the specified object array.
*
* See also <code>findAll</code> and <code>grep</code> when wanting to produce a new list
* containing items which don't match some criteria while leaving the original collection unc... | Modifies this collection by removing its elements that are contained within the specified object array. See also <code>findAll</code> and <code>grep</code> when wanting to produce a new list containing items which don't match some criteria while leaving the original collection unchanged | removeAll | {
"repo_name": "apache/incubator-groovy",
"path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 703151
} | [
"java.util.Arrays",
"java.util.Collection",
"java.util.TreeSet"
] | import java.util.Arrays; import java.util.Collection; import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,620,542 |
public static CFileSystem getLocalFileSystem(File base) throws IOException
{
return new ClaynFileSystem(base);
} | static CFileSystem function(File base) throws IOException { return new ClaynFileSystem(base); } | /**
* Creates a new CFileSystem that operates on the local file system using
* the given directory as root directory.
*
* @param base the root for the CFileSystem
* @return a new CFileSystem with the given file as root
* @throws IOException if an I/O Exception occures
* @since 0.1
... | Creates a new CFileSystem that operates on the local file system using the given directory as root directory | getLocalFileSystem | {
"repo_name": "Clayn/cfs-impl",
"path": "src/main/java/net/bplaced/clayn/cfs/impl/ClaynFileSystems.java",
"license": "gpl-3.0",
"size": 2126
} | [
"java.io.File",
"java.io.IOException",
"net.bplaced.clayn.cfs.CFileSystem",
"net.bplaced.clayn.cfs.impl.local.ClaynFileSystem"
] | import java.io.File; import java.io.IOException; import net.bplaced.clayn.cfs.CFileSystem; import net.bplaced.clayn.cfs.impl.local.ClaynFileSystem; | import java.io.*; import net.bplaced.clayn.cfs.*; import net.bplaced.clayn.cfs.impl.local.*; | [
"java.io",
"net.bplaced.clayn"
] | java.io; net.bplaced.clayn; | 958,080 |
public static void addFsResourcesToMap(Map<String, LocalResource> map,
GiraphConfiguration giraphConf, ApplicationId appId) throws IOException {
FileSystem fs = FileSystem.get(giraphConf);
Path baseDir = YarnUtils.getFsCachePath(fs, appId);
boolean coreJarFound = false;
for (String fileName : gira... | static void function(Map<String, LocalResource> map, GiraphConfiguration giraphConf, ApplicationId appId) throws IOException { FileSystem fs = FileSystem.get(giraphConf); Path baseDir = YarnUtils.getFsCachePath(fs, appId); boolean coreJarFound = false; for (String fileName : giraphConf.getYarnLibJars().split(",")) { if... | /**
* Populates the LocalResources list with the HDFS paths listed in
* the conf under GiraphConstants.GIRAPH_YARN_LIBJARS, and the
* GiraphConfiguration for this job. Also adds the Giraph default application
* jar as determined by GiraphYarnClient.GIRAPH_CLIENT_JAR constant.
* @param map the LocalResour... | Populates the LocalResources list with the HDFS paths listed in the conf under GiraphConstants.GIRAPH_YARN_LIBJARS, and the GiraphConfiguration for this job. Also adds the Giraph default application jar as determined by GiraphYarnClient.GIRAPH_CLIENT_JAR constant | addFsResourcesToMap | {
"repo_name": "zfighter/giraph-research",
"path": "giraph-core/target/munged/munged/main/org/apache/giraph/yarn/YarnUtils.java",
"license": "apache-2.0",
"size": 10084
} | [
"java.io.IOException",
"java.util.Map",
"org.apache.giraph.conf.GiraphConfiguration",
"org.apache.giraph.conf.GiraphConstants",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.yarn.api.records.ApplicationId",
"org.apache.hadoop.yarn.api.records.LocalResource"
] | import java.io.IOException; import java.util.Map; import org.apache.giraph.conf.GiraphConfiguration; import org.apache.giraph.conf.GiraphConstants; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records... | import java.io.*; import java.util.*; import org.apache.giraph.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.yarn.api.records.*; | [
"java.io",
"java.util",
"org.apache.giraph",
"org.apache.hadoop"
] | java.io; java.util; org.apache.giraph; org.apache.hadoop; | 632,727 |
@RequirePOST
public HttpResponse doCompleteInstall() throws IOException, ServletException {
completeSetup();
return HttpResponses.okJSON();
} | HttpResponse function() throws IOException, ServletException { completeSetup(); return HttpResponses.okJSON(); } | /**
* Remove the setupWizard filter, ensure all updates are written to disk, etc
*/ | Remove the setupWizard filter, ensure all updates are written to disk, etc | doCompleteInstall | {
"repo_name": "aldaris/jenkins",
"path": "core/src/main/java/jenkins/install/SetupWizard.java",
"license": "mit",
"size": 26693
} | [
"hudson.util.HttpResponses",
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.HttpResponse"
] | import hudson.util.HttpResponses; import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.HttpResponse; | import hudson.util.*; import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"hudson.util",
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | hudson.util; java.io; javax.servlet; org.kohsuke.stapler; | 2,424,893 |
public UserFilter getFilter() {
return filter;
} | UserFilter function() { return filter; } | /**
* Get the user filter.
*
* @return the filter
*/ | Get the user filter | getFilter | {
"repo_name": "geomajas/geomajas-project-server",
"path": "plugin/staticsecurity/staticsecurity/src/main/java/org/geomajas/plugin/staticsecurity/command/dto/GetUsersRequest.java",
"license": "agpl-3.0",
"size": 1455
} | [
"org.geomajas.plugin.staticsecurity.security.dto.UserFilter"
] | import org.geomajas.plugin.staticsecurity.security.dto.UserFilter; | import org.geomajas.plugin.staticsecurity.security.dto.*; | [
"org.geomajas.plugin"
] | org.geomajas.plugin; | 1,328,060 |
@JsonInclude( JsonInclude.Include.NON_NULL )
public String getUrl() {
return url;
} | @JsonInclude( JsonInclude.Include.NON_NULL ) String function() { return url; } | /**
* Gets url.
*
* @return the url
*/ | Gets url | getUrl | {
"repo_name": "tenable/Tenable.io-SDK-for-Java",
"path": "src/main/java/com/tenable/io/core/utilities/models/LogInstance.java",
"license": "mit",
"size": 6192
} | [
"com.fasterxml.jackson.annotation.JsonInclude"
] | import com.fasterxml.jackson.annotation.JsonInclude; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,197,602 |
protected void setWeightGross(final List<I_M_HU> hus, final BigDecimal grossWeight)
{
//
for (final I_M_HU hu : hus)
{
final IAttributeStorage attributeStorageTradingUnit = attributeStorageFactory.getAttributeStorage(hu);
attributeStorageTradingUnit.setValue(attr_WeightGross, grossWeight);
}
} | void function(final List<I_M_HU> hus, final BigDecimal grossWeight) { { final IAttributeStorage attributeStorageTradingUnit = attributeStorageFactory.getAttributeStorage(hu); attributeStorageTradingUnit.setValue(attr_WeightGross, grossWeight); } } | /**
* Sets WeightGross to given HUs.
*
* Please note that WeightGross will be propagated and WeightNet will be also calculated (Net = Gross - Tare - TareAdjust).
*
* @param hus
* @param grossWeight
*/ | Sets WeightGross to given HUs. Please note that WeightGross will be propagated and WeightNet will be also calculated (Net = Gross - Tare - TareAdjust) | setWeightGross | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.handlingunits.base/src/test/java/de/metas/handlingunits/AbstractHUTestWithSampling.java",
"license": "gpl-2.0",
"size": 15232
} | [
"de.metas.handlingunits.attribute.storage.IAttributeStorage",
"java.math.BigDecimal",
"java.util.List"
] | import de.metas.handlingunits.attribute.storage.IAttributeStorage; import java.math.BigDecimal; import java.util.List; | import de.metas.handlingunits.attribute.storage.*; import java.math.*; import java.util.*; | [
"de.metas.handlingunits",
"java.math",
"java.util"
] | de.metas.handlingunits; java.math; java.util; | 1,202,069 |
LevelConstraint getTimestampTSAGeneralNameContentMatch(); | LevelConstraint getTimestampTSAGeneralNameContentMatch(); | /**
* Indicates if the timestamp's TSTInfo.tsa field's value matches the timestamp's issuer distinguishing name
* when present
*
* @return {@code LevelConstraint} if TSAGeneralNameContentMatch for a given context element is present
* in the constraint file, null otherwise.
*/ | Indicates if the timestamp's TSTInfo.tsa field's value matches the timestamp's issuer distinguishing name when present | getTimestampTSAGeneralNameContentMatch | {
"repo_name": "esig/dss",
"path": "dss-policy-jaxb/src/main/java/eu/europa/esig/dss/policy/ValidationPolicy.java",
"license": "lgpl-2.1",
"size": 47405
} | [
"eu.europa.esig.dss.policy.jaxb.LevelConstraint"
] | import eu.europa.esig.dss.policy.jaxb.LevelConstraint; | import eu.europa.esig.dss.policy.jaxb.*; | [
"eu.europa.esig"
] | eu.europa.esig; | 590,012 |
public double getSelectivity(Triple triple);
| double function(Triple triple); | /**
* Return the selectivity of the triple
*
* @param triple
* @return double
*/ | Return the selectivity of the triple | getSelectivity | {
"repo_name": "tekrei/ARQ-ACO",
"path": "src/stocker/probability/Probability.java",
"license": "apache-2.0",
"size": 4806
} | [
"com.hp.hpl.jena.graph.Triple"
] | import com.hp.hpl.jena.graph.Triple; | import com.hp.hpl.jena.graph.*; | [
"com.hp.hpl"
] | com.hp.hpl; | 2,252,822 |
public void relocate(int oldPosition, int newPosition, ByteBuffer oldBuffer, ByteBuffer newBuffer)
{
createNewUnion(newBuffer, newPosition, true);
Int2ObjectMap<Union> unionMap = unions.get(oldBuffer);
if (unionMap != null) {
unionMap.remove(oldPosition);
if (unionMap.isEmpty()) {
un... | void function(int oldPosition, int newPosition, ByteBuffer oldBuffer, ByteBuffer newBuffer) { createNewUnion(newBuffer, newPosition, true); Int2ObjectMap<Union> unionMap = unions.get(oldBuffer); if (unionMap != null) { unionMap.remove(oldPosition); if (unionMap.isEmpty()) { unions.remove(oldBuffer); memCache.remove(old... | /**
* Helper for implementing {@link org.apache.druid.query.aggregation.BufferAggregator#relocate} and
* {@link org.apache.druid.query.aggregation.VectorAggregator#relocate}.
*/ | Helper for implementing <code>org.apache.druid.query.aggregation.BufferAggregator#relocate</code> and <code>org.apache.druid.query.aggregation.VectorAggregator#relocate</code> | relocate | {
"repo_name": "monetate/druid",
"path": "extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchBufferAggregatorHelper.java",
"license": "apache-2.0",
"size": 5034
} | [
"it.unimi.dsi.fastutil.ints.Int2ObjectMap",
"java.nio.ByteBuffer",
"org.apache.datasketches.theta.Union"
] | import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import java.nio.ByteBuffer; import org.apache.datasketches.theta.Union; | import it.unimi.dsi.fastutil.ints.*; import java.nio.*; import org.apache.datasketches.theta.*; | [
"it.unimi.dsi",
"java.nio",
"org.apache.datasketches"
] | it.unimi.dsi; java.nio; org.apache.datasketches; | 837,477 |
private void updateAppAggregatesFromHostMetric(TimelineClusterMetric clusterMetric,
String hostname, Double metricValue) {
if (aggregateClusterMetrics == null) {
LOG.error("Aggregation requested without init call.");
return;
}
TimelineMetricMe... | void function(TimelineClusterMetric clusterMetric, String hostname, Double metricValue) { if (aggregateClusterMetrics == null) { LOG.error(STR); return; } TimelineMetricMetadataKey appKey = new TimelineMetricMetadataKey(clusterMetric.getMetricName(), HOST_APP_ID); Set<String> apps = hostedAppsMap.get(hostname); for (St... | /**
* Build a cluster app metric from a host metric
*/ | Build a cluster app metric from a host metric | updateAppAggregatesFromHostMetric | {
"repo_name": "arenadata/ambari",
"path": "ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricAppAggregator.java",
"license": "apache-2.0",
"size": 7876
} | [
"java.util.Set",
"org.apache.hadoop.metrics2.sink.timeline.TimelineMetricMetadata",
"org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricsFilter",
"org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.TimelineMetricMetadataKey"
] | import java.util.Set; import org.apache.hadoop.metrics2.sink.timeline.TimelineMetricMetadata; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.TimelineMetricsFilter; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.TimelineMetricMetadataKey; | import java.util.*; import org.apache.hadoop.metrics2.sink.timeline.*; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.*; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.discovery.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,456,372 |
public Adapter createBusinessConceptAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link iso20022.BusinessConcept <em>Business Concept</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-... | Creates a new adapter for an object of class '<code>iso20022.BusinessConcept Business Concept</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createBusinessConceptAdapter | {
"repo_name": "ISO20022ArchitectForum/sample-code-public",
"path": "DLT/Corda/ISO20022Generated/src/iso20022/util/Iso20022AdapterFactory.java",
"license": "apache-2.0",
"size": 55827
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 781,702 |
@Override
public WikiPage getRootWikiPage(String ownerId, ObjectType ownerType)
throws SynapseException {
ValidateArgument.required(ownerId, "ownerId");
ValidateArgument.required(ownerType, "ownerType");
String uri = createWikiURL(ownerId, ownerType);
return getJSONEntity(getRepoEndpoint(), uri, WikiPage... | WikiPage function(String ownerId, ObjectType ownerType) throws SynapseException { ValidateArgument.required(ownerId, STR); ValidateArgument.required(ownerType, STR); String uri = createWikiURL(ownerId, ownerType); return getJSONEntity(getRepoEndpoint(), uri, WikiPage.class); } | /**
* Get a the root WikiPage for a given owner.
*
* @param ownerId
* @param ownerType
* @return
* @throws SynapseException
*/ | Get a the root WikiPage for a given owner | getRootWikiPage | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java",
"license": "apache-2.0",
"size": 223652
} | [
"org.sagebionetworks.client.exceptions.SynapseException",
"org.sagebionetworks.repo.model.ObjectType",
"org.sagebionetworks.repo.model.wiki.WikiPage",
"org.sagebionetworks.util.ValidateArgument"
] | import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.ObjectType; import org.sagebionetworks.repo.model.wiki.WikiPage; import org.sagebionetworks.util.ValidateArgument; | import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.wiki.*; import org.sagebionetworks.util.*; | [
"org.sagebionetworks.client",
"org.sagebionetworks.repo",
"org.sagebionetworks.util"
] | org.sagebionetworks.client; org.sagebionetworks.repo; org.sagebionetworks.util; | 1,581,456 |
private void setProperty(String key, String value) {
Properties properties = getProperties();
properties.setProperty(key, value);
propertiesChanged = true;
} | void function(String key, String value) { Properties properties = getProperties(); properties.setProperty(key, value); propertiesChanged = true; } | /**
* We maintain a set of bnd properties in the cache directory.
*
* @param key The key for the property
* @param value The value for the property
*/ | We maintain a set of bnd properties in the cache directory | setProperty | {
"repo_name": "joansmith/bnd",
"path": "biz.aQute.bndlib/src/aQute/bnd/maven/support/MavenEntry.java",
"license": "apache-2.0",
"size": 8888
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,563,079 |
@Override
public Iterator iterator() {
return new Iterator<E>() {
private final Iterator<E> backingIt = backingSet.iterator();
private E lastElement; | Iterator function() { return new Iterator<E>() { private final Iterator<E> backingIt = backingSet.iterator(); private E lastElement; | /**
* Returns an iterator over the elements in this set.
* If the iterator's <code>remove()</code> method is called then the
* registered observers are called as well.
*
* @see java.util.Set in JDK API documentation
* @return an iterator over the elements in this set
*/ | Returns an iterator over the elements in this set. If the iterator's <code>remove()</code> method is called then the registered observers are called as well | iterator | {
"repo_name": "loveyoupeng/rt",
"path": "modules/base/src/main/java/com/sun/javafx/collections/ObservableSetWrapper.java",
"license": "gpl-2.0",
"size": 11924
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,481,966 |
public void setMaxMinProb(String param) {
double max = -1.0;
double min = -1.0;
HashMap<String, Double> tempMap = new HashMap<>();
if (param.equals("unigram")) {
if (unigramLM.isEmpty()) {
return;
}
for (Entry<String, Integer> entry... | void function(String param) { double max = -1.0; double min = -1.0; HashMap<String, Double> tempMap = new HashMap<>(); if (param.equals(STR)) { if (unigramLM.isEmpty()) { return; } for (Entry<String, Integer> entry : unigramLM.entrySet()) { double prob = getProbabilityUnigram(entry.getKey()); tempMap.put(entry.getKey()... | /**
* Set the Maximum and Minimum probability of the language model.
*
* @param param either unigram or bigram or trigram or fourgram
*/ | Set the Maximum and Minimum probability of the language model | setMaxMinProb | {
"repo_name": "wasiahmad/AOL-Query-Log-Analysis",
"path": "src/language model based query topic analysis/src/edu/virginia/cs/model/LanguageModel.java",
"license": "mit",
"size": 20434
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,546,614 |
public void setFoodCategories(ArrayList<String> foodCategories) {
this.foodCategories = foodCategories;
} | void function(ArrayList<String> foodCategories) { this.foodCategories = foodCategories; } | /**
* This method sets the categories this food belongs to. A food item may belong to multiple categories.
* @param foodCategories the foodCategories to set
*/ | This method sets the categories this food belongs to. A food item may belong to multiple categories | setFoodCategories | {
"repo_name": "Kramermp/FoodMood",
"path": "FoodMood - Mobile/src/foodprofile/model/Food.java",
"license": "unlicense",
"size": 4977
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,440,342 |
ActionFuture<SyncedFlushResponse> syncedFlush(SyncedFlushRequest request); | ActionFuture<SyncedFlushResponse> syncedFlush(SyncedFlushRequest request); | /**
* Explicitly sync flush one or more indices (write sync id to shards for faster recovery).
*
* @param request The sync flush request
* @return A result future
* @see org.elasticsearch.client.Requests#syncedFlushRequest(String...)
*/ | Explicitly sync flush one or more indices (write sync id to shards for faster recovery) | syncedFlush | {
"repo_name": "qwerty4030/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java",
"license": "apache-2.0",
"size": 31749
} | [
"org.elasticsearch.action.ActionFuture",
"org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest",
"org.elasticsearch.action.admin.indices.flush.SyncedFlushResponse"
] | import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest; import org.elasticsearch.action.admin.indices.flush.SyncedFlushResponse; | import org.elasticsearch.action.*; import org.elasticsearch.action.admin.indices.flush.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,787,198 |
public void setDateFormat(String format, Locale locale) {
this.formatter = DateTimeFormatter.ofPattern(format == null ? "dd/MMM/yyyy:HH:mm:ss Z" : format).withLocale(locale == null ? Locale.getDefault() : locale);
} | void function(String format, Locale locale) { this.formatter = DateTimeFormatter.ofPattern(format == null ? STR : format).withLocale(locale == null ? Locale.getDefault() : locale); } | /**
* Nastavljanje formata za parsanje datuma.
* Ce je vhodni parameter <code>format</code> null, se nastavi format na prevzeti format.
* Ce je vhodni parameter <code>locale</code> null, se nastavi lokalnost na prevzeti format.
*
* @param format Format datuma
* @param localeString Niz, ki pove v kater... | Nastavljanje formata za parsanje datuma. Ce je vhodni parameter <code>format</code> null, se nastavi format na prevzeti format. Ce je vhodni parameter <code>locale</code> null, se nastavi lokalnost na prevzeti format | setDateFormat | {
"repo_name": "kb2623/spletne-seje",
"path": "src/main/java/org/sessionization/parser/NCSAWebLogParser.java",
"license": "gpl-3.0",
"size": 2108
} | [
"java.time.format.DateTimeFormatter",
"java.util.Locale"
] | import java.time.format.DateTimeFormatter; import java.util.Locale; | import java.time.format.*; import java.util.*; | [
"java.time",
"java.util"
] | java.time; java.util; | 2,778,172 |
public static int getSize(final Object iObject) {
if (iObject == null)
return 0;
if (!isMultiValue(iObject))
return 0;
if (iObject instanceof Collection<?>)
return ((Collection<Object>) iObject).size();
if (iObject instanceof Map<?, ?>)
return ((Map<?, Object>) iObj... | static int function(final Object iObject) { if (iObject == null) return 0; if (!isMultiValue(iObject)) return 0; if (iObject instanceof Collection<?>) return ((Collection<Object>) iObject).size(); if (iObject instanceof Map<?, ?>) return ((Map<?, Object>) iObject).size(); if (iObject.getClass().isArray()) return Array.... | /**
* Returns the size of the multi-value object
*
* @param iObject
* Multi-value object (array, collection or map)
* @return the size of the multi value object
*/ | Returns the size of the multi-value object | getSize | {
"repo_name": "nengxu/OrientDB",
"path": "commons/src/main/java/com/orientechnologies/common/collection/OMultiValue.java",
"license": "apache-2.0",
"size": 9534
} | [
"java.lang.reflect.Array",
"java.util.Collection",
"java.util.Map"
] | import java.lang.reflect.Array; import java.util.Collection; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,221,669 |
public final void stopConfused(L2Effect effect)
{
if (effect == null)
{
stopEffects(L2Effect.EffectType.CONFUSION);
}
else
{
removeEffect(effect);
}
setIsConfused(false);
getAI().notifyEvent(CtrlEvent.EVT_THINK, null);
updateAbnormalEffect();
}
| final void function(L2Effect effect) { if (effect == null) { stopEffects(L2Effect.EffectType.CONFUSION); } else { removeEffect(effect); } setIsConfused(false); getAI().notifyEvent(CtrlEvent.EVT_THINK, null); updateAbnormalEffect(); } | /**
* Stop a specified/all Confused abnormal L2Effect.<BR>
* <BR>
* <B><U> Actions</U> :</B><BR>
* <BR>
* <li>Delete a specified/all (if effect=null) Confused abnormal L2Effect from L2Character and update client magic icone</li> <li>Set the abnormal effect flag _confused to False</li> <li>Notify the L2Ch... | Stop a specified/all Confused abnormal L2Effect. Actions : Delete a specified/all (if effect=null) Confused abnormal L2Effect from L2Character and update client magic icone Set the abnormal effect flag _confused to False Notify the L2Character AI Send Server->Client UserInfo/CharInfo packet | stopConfused | {
"repo_name": "oonym/l2InterludeServer",
"path": "L2J_Server/java/net/sf/l2j/gameserver/model/L2Character.java",
"license": "gpl-2.0",
"size": 231634
} | [
"net.sf.l2j.gameserver.ai.CtrlEvent"
] | import net.sf.l2j.gameserver.ai.CtrlEvent; | import net.sf.l2j.gameserver.ai.*; | [
"net.sf.l2j"
] | net.sf.l2j; | 1,958,089 |
void stepOut(@NotNull String id, @NotNull AsyncRequestCallback<Void> callback); | void stepOut(@NotNull String id, @NotNull AsyncRequestCallback<Void> callback); | /**
* Do step return.
*
* @param id
* @param callback
*/ | Do step return | stepOut | {
"repo_name": "dhuebner/che",
"path": "plugins/plugin-java/che-plugin-java-ext-debugger-java-client/src/main/java/org/eclipse/che/ide/ext/java/jdi/client/debug/DebuggerServiceClient.java",
"license": "epl-1.0",
"size": 4312
} | [
"javax.validation.constraints.NotNull",
"org.eclipse.che.ide.rest.AsyncRequestCallback"
] | import javax.validation.constraints.NotNull; import org.eclipse.che.ide.rest.AsyncRequestCallback; | import javax.validation.constraints.*; import org.eclipse.che.ide.rest.*; | [
"javax.validation",
"org.eclipse.che"
] | javax.validation; org.eclipse.che; | 87,436 |
public Employee getEmployeeById(final Long id) {
return employeeRepository.findOne(id);
} | Employee function(final Long id) { return employeeRepository.findOne(id); } | /**
* Get employee object by id
*
* @param id
* @return Employee Object
*/ | Get employee object by id | getEmployeeById | {
"repo_name": "egovernments/egov-playground",
"path": "eGov/egov/egov-eis/src/main/java/org/egov/eis/service/EmployeeService.java",
"license": "gpl-3.0",
"size": 22363
} | [
"org.egov.eis.entity.Employee"
] | import org.egov.eis.entity.Employee; | import org.egov.eis.entity.*; | [
"org.egov.eis"
] | org.egov.eis; | 439,425 |
public void storeCalendar(Calendar calendar, List<Event> events) throws WebicalException;
public void removeCalendar(Calendar calendar)throws WebicalException; | void storeCalendar(Calendar calendar, List<Event> events) throws WebicalException; public void function(Calendar calendar)throws WebicalException; | /**
* Removes a Calendar
* @param calendar the calendar to remove
* @throws WebicalException
*/ | Removes a Calendar | removeCalendar | {
"repo_name": "tectronics/webical",
"path": "webical-core/src/main/java/org/webical/manager/CalendarManager.java",
"license": "gpl-3.0",
"size": 2926
} | [
"java.util.List",
"org.webical.Calendar",
"org.webical.Event"
] | import java.util.List; import org.webical.Calendar; import org.webical.Event; | import java.util.*; import org.webical.*; | [
"java.util",
"org.webical"
] | java.util; org.webical; | 659,889 |
private PauseContainerCmd executePauseContainerRequest(DockerClient client, Message message) {
LOGGER.debug("Executing Docker Pause Container Request");
String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class);
ObjectHelper.n... | PauseContainerCmd function(DockerClient client, Message message) { LOGGER.debug(STR); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class); ObjectHelper.notNull(containerId, STR); PauseContainerCmd pauseContainerCmd = client.pauseContainerCmd(container... | /**
* Produces a pause container request
*
* @param client
* @param message
* @return
*/ | Produces a pause container request | executePauseContainerRequest | {
"repo_name": "sabre1041/camel",
"path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java",
"license": "apache-2.0",
"size": 38109
} | [
"com.github.dockerjava.api.DockerClient",
"com.github.dockerjava.api.command.PauseContainerCmd",
"org.apache.camel.Message",
"org.apache.camel.component.docker.DockerConstants",
"org.apache.camel.component.docker.DockerHelper",
"org.apache.camel.util.ObjectHelper"
] | import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.PauseContainerCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper; import org.apache.camel.util.ObjectHelper; | import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*; import org.apache.camel.util.*; | [
"com.github.dockerjava",
"org.apache.camel"
] | com.github.dockerjava; org.apache.camel; | 1,336,281 |
@GET
@Path("/{id:[0-9][0-9]*}")
@Produces(MediaType.APPLICATION_JSON)
public PostComment lookupPostById(@PathParam("id") long id) {
PostComment postComment = repository.findById(id);
if (postComment == null) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
return postComment;
... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) PostComment function(@PathParam("id") long id) { PostComment postComment = repository.findById(id); if (postComment == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } return postComment; } | /**
* Lookup post by id.
*
* @param id the id
* @return the post comment
*/ | Lookup post by id | lookupPostById | {
"repo_name": "uaijug/chronos",
"path": "src/main/java/br/com/uaijug/chronos/blog/resources/PostCommentResource.java",
"license": "gpl-3.0",
"size": 6089
} | [
"br.com.uaijug.chronos.blog.model.PostComment",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import br.com.uaijug.chronos.blog.model.PostComment; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import br.com.uaijug.chronos.blog.model.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"br.com.uaijug",
"javax.ws"
] | br.com.uaijug; javax.ws; | 1,128,265 |
public ArrayList<Trophy> getTrophies() {
return trophies;
}
// ===================================================
@SerializedName("total_gallery_comments")
private int commentCount;
@SerializedName("total_gallery_favorites")
private int favoriteCount;
@SerializedName("total_gallery_submissions")
private ... | ArrayList<Trophy> function() { return trophies; } @SerializedName(STR) private int commentCount; @SerializedName(STR) private int favoriteCount; @SerializedName(STR) private int submissionCount; private ArrayList<Trophy> trophies; | /**
* A list of the trophies the user has earned
* @return the trophies
*/ | A list of the trophies the user has earned | getTrophies | {
"repo_name": "kskelm/baringo",
"path": "src/main/java/com/github/kskelm/baringo/model/gallery/GalleryProfile.java",
"license": "apache-2.0",
"size": 1523
} | [
"com.github.kskelm.baringo.model.Trophy",
"com.google.gson.annotations.SerializedName",
"java.util.ArrayList"
] | import com.github.kskelm.baringo.model.Trophy; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; | import com.github.kskelm.baringo.model.*; import com.google.gson.annotations.*; import java.util.*; | [
"com.github.kskelm",
"com.google.gson",
"java.util"
] | com.github.kskelm; com.google.gson; java.util; | 1,346,843 |
protected ScriptDocValues.Longs docFieldLongs(String field) {
return (ScriptDocValues.Longs) doc().get(field);
} | ScriptDocValues.Longs function(String field) { return (ScriptDocValues.Longs) doc().get(field); } | /**
* Returns field data long (integers) access for the provided field.
*/ | Returns field data long (integers) access for the provided field | docFieldLongs | {
"repo_name": "andrewvc/elasticsearch",
"path": "src/main/java/org/elasticsearch/script/AbstractSearchScript.java",
"license": "apache-2.0",
"size": 4226
} | [
"org.elasticsearch.index.fielddata.ScriptDocValues"
] | import org.elasticsearch.index.fielddata.ScriptDocValues; | import org.elasticsearch.index.fielddata.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 2,884,633 |
@FIXVersion(introduced="4.2")
@TagNumRef(tagNum=TagNum.TradSesCloseTime)
public Date getTradSesCloseTime() {
return tradSesCloseTime;
} | @FIXVersion(introduced="4.2") @TagNumRef(tagNum=TagNum.TradSesCloseTime) Date function() { return tradSesCloseTime; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getTradSesCloseTime | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/TradingSessionStatusMsg.java",
"license": "gpl-3.0",
"size": 30000
} | [
"java.util.Date",
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import java.util.Date; import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import java.util.*; import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"java.util",
"net.hades.fix"
] | java.util; net.hades.fix; | 1,701,179 |
public static String getDefaultsPackageContent(
Iterable<Class<? extends FragmentOptions>> options, InvocationPolicy invocationPolicy) {
return getDefaultsPackageContent(BuildOptions.createDefaults(options, invocationPolicy));
} | static String function( Iterable<Class<? extends FragmentOptions>> options, InvocationPolicy invocationPolicy) { return getDefaultsPackageContent(BuildOptions.createDefaults(options, invocationPolicy)); } | /**
* Returns the defaults package for the default settings.
*/ | Returns the defaults package for the default settings | getDefaultsPackageContent | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/config/DefaultsPackage.java",
"license": "apache-2.0",
"size": 6378
} | [
"com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass"
] | import com.google.devtools.build.lib.runtime.proto.InvocationPolicyOuterClass; | import com.google.devtools.build.lib.runtime.proto.*; | [
"com.google.devtools"
] | com.google.devtools; | 961,039 |
@Override public void enterSre(@NotNull PoCoParser.SreContext ctx) { } | @Override public void enterSre(@NotNull PoCoParser.SreContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitMap | {
"repo_name": "Corjuh/PoCo-Compiler",
"path": "src/com/poco/PoCoParser/PoCoParserBaseListener.java",
"license": "lgpl-2.1",
"size": 18510
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,869,406 |
@Override
protected void initInternal() {
super.initInternal();
try {
this.getConnection();
} catch (LifecycleException le) {
throw new RuntimeException(le);
}
}
/**
* {@inheritDoc}
| void function() { super.initInternal(); try { this.getConnection(); } catch (LifecycleException le) { throw new RuntimeException(le); } } /** * {@inheritDoc} | /**
* Initialize this Store by connecting to the MongoDB using the
* configuration parameters supplied.
*/ | Initialize this Store by connecting to the MongoDB using the configuration parameters supplied | initInternal | {
"repo_name": "HBRGTech/mongo-session-manager",
"path": "mongo-session-store/src/main/java/org/hbr/session/store/MongoStore.java",
"license": "apache-2.0",
"size": 23210
} | [
"org.apache.catalina.LifecycleException"
] | import org.apache.catalina.LifecycleException; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,640,980 |
public static String getBrokerListFromZookeeper(final CuratorFramework curator, Optional<String> path_override, final ObjectMapper mapper) throws Exception {
final String path = path_override.orElse("/brokers/ids");
final List<String> brokers = curator.getChildren().forPath(path);
return brokers.stream()
.m... | static String function(final CuratorFramework curator, Optional<String> path_override, final ObjectMapper mapper) throws Exception { final String path = path_override.orElse(STR); final List<String> brokers = curator.getChildren().forPath(path); return brokers.stream() .map(Lambdas.wrap_u(broker_node -> new String(cura... | /** Generates a connection string by reading ZooKeeper
* @param curator
* @param path_override
* @return
* @throws Exception
*/ | Generates a connection string by reading ZooKeeper | getBrokerListFromZookeeper | {
"repo_name": "robgil/Aleph2",
"path": "aleph2_core_distributed_services_library/src/com/ikanow/aleph2/distributed_services/utils/KafkaUtils.java",
"license": "apache-2.0",
"size": 12527
} | [
"com.fasterxml.jackson.databind.ObjectMapper",
"com.ikanow.aleph2.data_model.utils.Lambdas",
"java.util.List",
"java.util.Optional",
"java.util.stream.Collectors",
"org.apache.curator.framework.CuratorFramework"
] | import com.fasterxml.jackson.databind.ObjectMapper; import com.ikanow.aleph2.data_model.utils.Lambdas; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import org.apache.curator.framework.CuratorFramework; | import com.fasterxml.jackson.databind.*; import com.ikanow.aleph2.data_model.utils.*; import java.util.*; import java.util.stream.*; import org.apache.curator.framework.*; | [
"com.fasterxml.jackson",
"com.ikanow.aleph2",
"java.util",
"org.apache.curator"
] | com.fasterxml.jackson; com.ikanow.aleph2; java.util; org.apache.curator; | 2,553,191 |
private ApiResult<Object> handle(Status status, ApiResult<Object> apiResult) {
String message = status.getMessage().toString(getCurrentUserLocale());
apiResult.setMessage(message);
apiResult.setErrors(new ArrayList<ApiResultError>());
for (Reason reason : status.getErrors()) {
... | ApiResult<Object> function(Status status, ApiResult<Object> apiResult) { String message = status.getMessage().toString(getCurrentUserLocale()); apiResult.setMessage(message); apiResult.setErrors(new ArrayList<ApiResultError>()); for (Reason reason : status.getErrors()) { ApiResultError error = new ApiResultError(); err... | /**
* Subclass can override this method to add more detailed information to the response via the
* api result. This implementation will write the message of the exception as message of the api
* result.
*
* @param status
* The status to handle.
* @param apiResult
... | Subclass can override this method to add more detailed information to the response via the api result. This implementation will write the message of the exception as message of the api result | handle | {
"repo_name": "Communote/communote-server",
"path": "communote/plugins/rest-api/2.4/implementation/src/main/java/com/communote/plugins/api/rest/v24/service/exception/mapper/CommunoteExceptionMapper.java",
"license": "apache-2.0",
"size": 6432
} | [
"com.communote.plugins.api.rest.v24.to.ApiResult",
"com.communote.plugins.api.rest.v24.to.ApiResultError",
"com.communote.server.core.exception.Reason",
"com.communote.server.core.exception.Status",
"java.util.ArrayList"
] | import com.communote.plugins.api.rest.v24.to.ApiResult; import com.communote.plugins.api.rest.v24.to.ApiResultError; import com.communote.server.core.exception.Reason; import com.communote.server.core.exception.Status; import java.util.ArrayList; | import com.communote.plugins.api.rest.v24.to.*; import com.communote.server.core.exception.*; import java.util.*; | [
"com.communote.plugins",
"com.communote.server",
"java.util"
] | com.communote.plugins; com.communote.server; java.util; | 2,854,989 |
public Date getValueDate() {
return valueDate;
} | Date function() { return valueDate; } | /**
* Return the date value this column should be set to.
* @see #setValue(String)
*/ | Return the date value this column should be set to | getValueDate | {
"repo_name": "ivaylo5ev/liquibase",
"path": "liquibase-core/src/main/java/liquibase/change/ColumnConfig.java",
"license": "apache-2.0",
"size": 32532
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,963,875 |
static void addPath(Permissions policy, String configurationName, Path path, String permissions) {
// paths may not exist yet, this also checks accessibility
try {
ensureDirectoryExists(path);
} catch (IOException e) {
throw new IllegalStateException("Unable to access... | static void addPath(Permissions policy, String configurationName, Path path, String permissions) { try { ensureDirectoryExists(path); } catch (IOException e) { throw new IllegalStateException(STR + configurationName + STR + path + ")", e); } policy.add(new FilePermission(path.toString(), permissions)); policy.add(new F... | /**
* Add access to path (and all files underneath it); this also creates the directory if it does not exist.
*
* @param policy current policy to add permissions to
* @param configurationName the configuration name associated with the path (for error messages only)
* @param path ... | Add access to path (and all files underneath it); this also creates the directory if it does not exist | addPath | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/bootstrap/Security.java",
"license": "apache-2.0",
"size": 24605
} | [
"java.io.FilePermission",
"java.io.IOException",
"java.nio.file.Path",
"java.security.Permissions"
] | import java.io.FilePermission; import java.io.IOException; import java.nio.file.Path; import java.security.Permissions; | import java.io.*; import java.nio.file.*; import java.security.*; | [
"java.io",
"java.nio",
"java.security"
] | java.io; java.nio; java.security; | 1,872,448 |
@ApiModelProperty(required = true, value = "reprocessing_efficiency number")
public Float getReprocessingEfficiency() {
return reprocessingEfficiency;
} | @ApiModelProperty(required = true, value = STR) Float function() { return reprocessingEfficiency; } | /**
* reprocessing_efficiency number
*
* @return reprocessingEfficiency
**/ | reprocessing_efficiency number | getReprocessingEfficiency | {
"repo_name": "burberius/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/StationResponse.java",
"license": "apache-2.0",
"size": 14717
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,448,778 |
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer)
{
return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
}
| IBlockState function(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()); } | /**
* Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
* IBlockstate
*/ | Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate | getStateForPlacement | {
"repo_name": "SparkyTheFox/Sparkys-Mod-1.11.2-1.4.0-Alpha-SourceCode",
"path": "common/mod/sparkyfox/servermod/block/adventure/BlockRuinsDoorPillar3.java",
"license": "lgpl-3.0",
"size": 4407
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.block.state.*; import net.minecraft.entity.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.block",
"net.minecraft.entity",
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.block; net.minecraft.entity; net.minecraft.util; net.minecraft.world; | 853,660 |
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setBoolean("Angry", this.isAngry());
} | void function(NBTTagCompound par1NBTTagCompound) { super.writeEntityToNBT(par1NBTTagCompound); par1NBTTagCompound.setBoolean("Angry", this.isAngry()); } | /**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/ | (abstract) Protected helper method to write subclass entity data to NBT | writeEntityToNBT | {
"repo_name": "immediately/rancraftPeng172p",
"path": "java/rancraftPenguins/EntityPenguin.java",
"license": "gpl-3.0",
"size": 21829
} | [
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 2,073,606 |
public final BlockView buildBlockViewTree(Block block, BlockGroup parentGroup,
ConnectionManager connectionManager,
BlockTouchHandler touchHandler) {
BlockView blockView = getView(block);
if (blockView != null) {
... | final BlockView function(Block block, BlockGroup parentGroup, ConnectionManager connectionManager, BlockTouchHandler touchHandler) { BlockView blockView = getView(block); if (blockView != null) { throw new IllegalStateException(STR); } List<InputView> inputViews = buildInputViews(block, connectionManager, touchHandler)... | /**
* Called to construct the complete hierarchy of views representing a {@link Block} and its
* subcomponents, added to {@code parentGroup}.
*
* @param block The root block to generate a view for.
* @param parentGroup T
* @param connectionManager The {@link ConnectionManager} to update wh... | Called to construct the complete hierarchy of views representing a <code>Block</code> and its subcomponents, added to parentGroup | buildBlockViewTree | {
"repo_name": "Axe-Ishmael/Blockly",
"path": "src/blocklylib-core/src/main/java/com/google/blockly/android/ui/BlockViewFactory.java",
"license": "apache-2.0",
"size": 22967
} | [
"android.view.View",
"com.google.blockly.android.control.ConnectionManager",
"com.google.blockly.model.Block",
"java.lang.ref.WeakReference",
"java.util.List"
] | import android.view.View; import com.google.blockly.android.control.ConnectionManager; import com.google.blockly.model.Block; import java.lang.ref.WeakReference; import java.util.List; | import android.view.*; import com.google.blockly.android.control.*; import com.google.blockly.model.*; import java.lang.ref.*; import java.util.*; | [
"android.view",
"com.google.blockly",
"java.lang",
"java.util"
] | android.view; com.google.blockly; java.lang; java.util; | 2,774,150 |
public boolean execute() {
StopWatch stopWatch = new StopWatch();
stopWatch.start("NominalActivityClosingStep");
Date varTransactionDate;
try {
DateFormat transactionDateFormat = new SimpleDateFormat(TRANSACTION_DATE_FORMAT... | boolean function() { StopWatch stopWatch = new StopWatch(); stopWatch.start(STR); Date varTransactionDate; try { DateFormat transactionDateFormat = new SimpleDateFormat(TRANSACTION_DATE_FORMAT_STRING); varTransactionDate = new Date(transactionDateFormat.parse(getParameterService().getParameterValueAsString(KfsParameter... | /**
* Runs the nominal activity process, including retrieving system parameters for the process, creating the origin entry group
* for output origin entries, and generating reports based on the run
* @return true if the step completed successfully, false if otherwise
... | Runs the nominal activity process, including retrieving system parameters for the process, creating the origin entry group for output origin entries, and generating reports based on the run | execute | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/gl/batch/NominalActivityClosingStep.java",
"license": "apache-2.0",
"size": 4827
} | [
"java.sql.Date",
"java.text.DateFormat",
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.HashMap",
"java.util.Map",
"org.kuali.kfs.gl.GeneralLedgerConstants",
"org.kuali.kfs.sys.service.impl.KfsParameterConstants",
"org.springframework.util.StopWatch"
] | import java.sql.Date; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; import org.kuali.kfs.gl.GeneralLedgerConstants; import org.kuali.kfs.sys.service.impl.KfsParameterConstants; import org.springframework.util.StopWatch; | import java.sql.*; import java.text.*; import java.util.*; import org.kuali.kfs.gl.*; import org.kuali.kfs.sys.service.impl.*; import org.springframework.util.*; | [
"java.sql",
"java.text",
"java.util",
"org.kuali.kfs",
"org.springframework.util"
] | java.sql; java.text; java.util; org.kuali.kfs; org.springframework.util; | 317,657 |
protected boolean match(Context context, long downloadId, Uri uri) {
if (uri != null && uri.getPath().startsWith(FileUtils.getExternal(context, null).getAbsolutePath())) {
return true;
}
return false;
} | boolean function(Context context, long downloadId, Uri uri) { if (uri != null && uri.getPath().startsWith(FileUtils.getExternal(context, null).getAbsolutePath())) { return true; } return false; } | /**
* Whether the download is start by your application
*
* @param context Context
* @param downloadId download id
* @param uri the download destination location
*
* @return true if the download is start by your application
*/ | Whether the download is start by your application | match | {
"repo_name": "Jamling/AFDemo",
"path": "library/src/cn/ieclipse/af/app/AfDownloadReceiver.java",
"license": "apache-2.0",
"size": 2132
} | [
"android.content.Context",
"android.net.Uri",
"cn.ieclipse.af.util.FileUtils"
] | import android.content.Context; import android.net.Uri; import cn.ieclipse.af.util.FileUtils; | import android.content.*; import android.net.*; import cn.ieclipse.af.util.*; | [
"android.content",
"android.net",
"cn.ieclipse.af"
] | android.content; android.net; cn.ieclipse.af; | 1,363,405 |
void addSubjectChange(Room room, String message, JID senderJid, String senderNickname, Date time); | void addSubjectChange(Room room, String message, JID senderJid, String senderNickname, Date time); | /**
* Adds subject changes to log/history.
*
* @param room
* @param message
* @param senderJid
* @param senderNickname
* @param time
*/ | Adds subject changes to log/history | addSubjectChange | {
"repo_name": "getintouchapp/tigase-muc",
"path": "src/main/java/tigase/muc/logger/MucLogger.java",
"license": "agpl-3.0",
"size": 1959
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,513,965 |
public void removeFrdParameterRule19List(List<FrdParameterRule19> frdParameterRule19List); | void function(List<FrdParameterRule19> frdParameterRule19List); | /**
* removeFrdParameterRule19List - removes a list of FrdParameterRule19
*
* @param frdParameterRule19List
*/ | removeFrdParameterRule19List - removes a list of FrdParameterRule19 | removeFrdParameterRule19List | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/FrdParameterRule19SessionEJBRemote.java",
"license": "apache-2.0",
"size": 2780
} | [
"com.gdn.venice.persistence.FrdParameterRule19",
"java.util.List"
] | import com.gdn.venice.persistence.FrdParameterRule19; import java.util.List; | import com.gdn.venice.persistence.*; import java.util.*; | [
"com.gdn.venice",
"java.util"
] | com.gdn.venice; java.util; | 1,984,137 |
public static String buildScientificName(String scientificName, String authorship, String genericName, String genus,
String specificEpithet, String infraspecificEpithet) {
String sciname = ClassificationUtils.clean(scientificName);
if (sciname == null) {
// han... | static String function(String scientificName, String authorship, String genericName, String genus, String specificEpithet, String infraspecificEpithet) { String sciname = ClassificationUtils.clean(scientificName); if (sciname == null) { ParsedName pn = new ParsedName(); if (!StringUtils.isBlank(genericName)) { pn.setGe... | /**
* Assembles the most complete scientific name based on full and individual name parts.
* @param scientificName the full scientific name
* @param genericName see GbifTerm.genericName
* @param genus see DwcTerm.genus
* @param specificEpithet see DwcTerm.specificEpithet
* @param infraspecificEpithet ... | Assembles the most complete scientific name based on full and individual name parts | buildScientificName | {
"repo_name": "gbif/occurrence",
"path": "occurrence-processor/src/main/java/org/gbif/occurrence/processor/interpreting/TaxonomyInterpreter.java",
"license": "apache-2.0",
"size": 15636
} | [
"com.google.common.base.Strings",
"org.apache.commons.lang3.StringUtils",
"org.gbif.api.model.checklistbank.ParsedName",
"org.gbif.common.parsers.utils.ClassificationUtils"
] | import com.google.common.base.Strings; import org.apache.commons.lang3.StringUtils; import org.gbif.api.model.checklistbank.ParsedName; import org.gbif.common.parsers.utils.ClassificationUtils; | import com.google.common.base.*; import org.apache.commons.lang3.*; import org.gbif.api.model.checklistbank.*; import org.gbif.common.parsers.utils.*; | [
"com.google.common",
"org.apache.commons",
"org.gbif.api",
"org.gbif.common"
] | com.google.common; org.apache.commons; org.gbif.api; org.gbif.common; | 2,441,983 |
public void setDataTransformation(double[] transform) {
assert transform != null;
this.transform = Arrays.copyOf(transform, 16);
} | void function(double[] transform) { assert transform != null; this.transform = Arrays.copyOf(transform, 16); } | /**
* Set the transformation of the data.
*/ | Set the transformation of the data | setDataTransformation | {
"repo_name": "SensorsINI/jaer",
"path": "src/net/sf/jaer/util/chart/Category.java",
"license": "lgpl-2.1",
"size": 3561
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,472,790 |
Function getFunction(WorkbookSettings ws)
{
if (function == null)
{
function = Function.getFunction(functionString, ws);
}
return function;
} | Function getFunction(WorkbookSettings ws) { if (function == null) { function = Function.getFunction(functionString, ws); } return function; } | /**
* Accessor for the function
*
* @param ws the workbook settings
* @return the function
*/ | Accessor for the function | getFunction | {
"repo_name": "stefandmn/AREasy",
"path": "src/java/org/areasy/common/parser/excel/biff/formula/StringFunction.java",
"license": "lgpl-3.0",
"size": 1725
} | [
"org.areasy.common.parser.excel.WorkbookSettings"
] | import org.areasy.common.parser.excel.WorkbookSettings; | import org.areasy.common.parser.excel.*; | [
"org.areasy.common"
] | org.areasy.common; | 2,198,848 |
protected EObject createInitialModel() {
EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(cityobjectgroupPackage);
EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = cityobjectgroupFactory.create(eClass);
rootO... | EObject function() { EClass eClass = ExtendedMetaData.INSTANCE.getDocumentRoot(cityobjectgroupPackage); EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(initialObjectCreationPage.getInitialObjectName()); EObject rootObject = cityobjectgroupFactory.create(eClass); rootObject.eSet(eStructuralFeature, ... | /**
* Create a new model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Create a new model. | createInitialModel | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.editor/src/net/opengis/citygml/cityobjectgroup/presentation/CityobjectgroupModelWizard.java",
"license": "apache-2.0",
"size": 18675
} | [
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.emf.ecore.EStructuralFeature",
"org.eclipse.emf.ecore.util.EcoreUtil",
"org.eclipse.emf.ecore.util.ExtendedMetaData"
] | import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.ExtendedMetaData; | import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,470,437 |
public OutputStream getOutputStream(); | OutputStream function(); | /**
* Gets the output stream.
*
* @return An output stream.
*/ | Gets the output stream | getOutputStream | {
"repo_name": "Cantal0p3/Networking-Aircasting",
"path": "src/main/java/ioio/lib/api/Uart.java",
"license": "gpl-3.0",
"size": 4090
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,415,934 |
public static @NotNull <V> Map<String, V> createCanonicalFilePathLinkedMap() {
return new Object2ObjectLinkedOpenCustomHashMap<>(FILE_PATH_HASH_STRATEGY);
} | static @NotNull <V> Map<String, V> function() { return new Object2ObjectLinkedOpenCustomHashMap<>(FILE_PATH_HASH_STRATEGY); } | /**
* Create linked map with canonicalized key hash strategy.
*/ | Create linked map with canonicalized key hash strategy | createCanonicalFilePathLinkedMap | {
"repo_name": "GunoH/intellij-community",
"path": "platform/util/collections/src/com/intellij/util/containers/FileCollectionFactory.java",
"license": "apache-2.0",
"size": 4087
} | [
"it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap",
"java.util.Map",
"org.jetbrains.annotations.NotNull"
] | import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap; import java.util.Map; import org.jetbrains.annotations.NotNull; | import it.unimi.dsi.fastutil.objects.*; import java.util.*; import org.jetbrains.annotations.*; | [
"it.unimi.dsi",
"java.util",
"org.jetbrains.annotations"
] | it.unimi.dsi; java.util; org.jetbrains.annotations; | 2,367,630 |
public void setParsers(Map<MediaType, Parser> parsers) {
this.parsers = new ArrayList<Parser>(parsers.size());
for (Map.Entry<MediaType, Parser> entry : parsers.entrySet()) {
this.parsers.add(ParserDecorator.withTypes(
entry.getValue(), Collections.singleton(entry.get... | void function(Map<MediaType, Parser> parsers) { this.parsers = new ArrayList<Parser>(parsers.size()); for (Map.Entry<MediaType, Parser> entry : parsers.entrySet()) { this.parsers.add(ParserDecorator.withTypes( entry.getValue(), Collections.singleton(entry.getKey()))); } } | /**
* Sets the component parsers.
*
* @param parsers component parsers, keyed by media type
*/ | Sets the component parsers | setParsers | {
"repo_name": "zamattiac/tika",
"path": "tika-core/src/main/java/org/apache/tika/parser/CompositeParser.java",
"license": "apache-2.0",
"size": 10686
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.Map",
"org.apache.tika.mime.MediaType"
] | import java.util.ArrayList; import java.util.Collections; import java.util.Map; import org.apache.tika.mime.MediaType; | import java.util.*; import org.apache.tika.mime.*; | [
"java.util",
"org.apache.tika"
] | java.util; org.apache.tika; | 2,034,216 |
ImmutableList<String> getStartupCommand(); | ImmutableList<String> getStartupCommand(); | /**
* Command that is used to start the worker job, e.g. "my_hashing_tool". It is expected that this
* tool will be able to act as a worker process (communicate using specific protocol, accept jobs,
* etc.)
*/ | Command that is used to start the worker job, e.g. "my_hashing_tool". It is expected that this tool will be able to act as a worker process (communicate using specific protocol, accept jobs, etc.) | getStartupCommand | {
"repo_name": "nguyentruongtho/buck",
"path": "src/com/facebook/buck/worker/WorkerProcessParams.java",
"license": "apache-2.0",
"size": 2423
} | [
"com.google.common.collect.ImmutableList"
] | import com.google.common.collect.ImmutableList; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 842,244 |
@Test
public void test_setHistoryPayment() {
Boolean value = true;
instance.setHistoryPayment(value);
assertEquals("'setHistoryPayment' should be correct.",
value, TestsHelper.getField(instance, "historyPayment"));
} | void function() { Boolean value = true; instance.setHistoryPayment(value); assertEquals(STR, value, TestsHelper.getField(instance, STR)); } | /**
* <p>
* Accuracy test for the method <code>setHistoryPayment(Boolean historyPayment)</code>.<br>
* The value should be properly set.
* </p>
*
* @since 1.2 (OPM - Data Migration - Entities Update Module Assembly 1.0)
*/ | Accuracy test for the method <code>setHistoryPayment(Boolean historyPayment)</code>. The value should be properly set. | test_setHistoryPayment | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/FACES/src/java/tests/gov/opm/scrd/entities/application/PaymentUnitTests.java",
"license": "apache-2.0",
"size": 46209
} | [
"gov.opm.scrd.TestsHelper",
"org.junit.Assert"
] | import gov.opm.scrd.TestsHelper; import org.junit.Assert; | import gov.opm.scrd.*; import org.junit.*; | [
"gov.opm.scrd",
"org.junit"
] | gov.opm.scrd; org.junit; | 696,321 |
public Point getLocation(I_Element element) {
return new Point();
} | Point function(I_Element element) { return new Point(); } | /**
* Gets the location.
*
* @param element the element
*
* @return the location
*/ | Gets the location | getLocation | {
"repo_name": "ptgrogan/spacenet",
"path": "src/main/java/edu/mit/spacenet/gui/visualization/ElementLayer.java",
"license": "apache-2.0",
"size": 4763
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,108,469 |
public Vector getVelocity(); | Vector function(); | /**
* Gets this entity's current velocity
*
* @return Current travelling velocity of this entity
*/ | Gets this entity's current velocity | getVelocity | {
"repo_name": "dentmaged/Bukkit",
"path": "src/main/java/org/bukkit/entity/Entity.java",
"license": "gpl-3.0",
"size": 9451
} | [
"org.bukkit.util.Vector"
] | import org.bukkit.util.Vector; | import org.bukkit.util.*; | [
"org.bukkit.util"
] | org.bukkit.util; | 1,856,885 |
@Override
public void modifyText(ModifyEvent e) {
validatePageAndSetComplete();
}
});
// On default disable the 'finish' button
setPageComplete(false);
// Required to avoid an error in the system
setControl(getWidgetContainer());
nameText.setFocus();
LOGGER.info("createLoc... | void function(ModifyEvent e) { validatePageAndSetComplete(); } }); setPageComplete(false); setControl(getWidgetContainer()); nameText.setFocus(); LOGGER.info(STR); createLocationTree(); LOGGER.info(STR); } | /**
* Disables the 'finish' button depending on the name-validation
*
* @param e
* key(board) event
*/ | Disables the 'finish' button depending on the name-validation | modifyText | {
"repo_name": "franzbecker/test-editor",
"path": "ui/org.testeditor.ui/src/org/testeditor/ui/wizardpages/AbstractTestStructureWizardPage.java",
"license": "epl-1.0",
"size": 12300
} | [
"org.eclipse.swt.events.ModifyEvent"
] | import org.eclipse.swt.events.ModifyEvent; | import org.eclipse.swt.events.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,975,761 |
public final void log(Logger logger, Level level, Throwable t,final String message)
{
StringBuilder sb = new StringBuilder();
sb.append(message).append(": ");
if (t != null) {
getStackTrace(t, sb);
}
if(Level.SEVERE.equals(level.toString()))
logger.error(sb.toString());
els... | final void function(Logger logger, Level level, Throwable t,final String message) { StringBuilder sb = new StringBuilder(); sb.append(message).append(STR); if (t != null) { getStackTrace(t, sb); } if(Level.SEVERE.equals(level.toString())) logger.error(sb.toString()); else logger.info(sb.toString()); } | /**
* Log the given message and exception to the provided logger.
*
* @param logger
* the {@link Logger} to log the message to
* @param level
* the {@link Level} to use for logging the message
* @param t
* the exception whose backtrace is to be logged; can be null in
... | Log the given message and exception to the provided logger | log | {
"repo_name": "iisi-nj/GemFireLite",
"path": "Gemlite-bundle/Gemlite-runtime/src/main/java/gemlite/core/internal/db/AsyncEventHelper.java",
"license": "apache-2.0",
"size": 24505
} | [
"java.util.logging.Level",
"org.apache.logging.log4j.Logger"
] | import java.util.logging.Level; import org.apache.logging.log4j.Logger; | import java.util.logging.*; import org.apache.logging.log4j.*; | [
"java.util",
"org.apache.logging"
] | java.util; org.apache.logging; | 2,348,360 |
public static DocumentBuilderFactory newStrictDocumentBuilderFactory() throws ParserConfigurationException {
DocumentBuilderFactory factory = newdocumentBuilderFactory();
factory.setFeature(APACHE_DISALLOW_DOCTYPE_DECL, true);
return factory;
} | static DocumentBuilderFactory function() throws ParserConfigurationException { DocumentBuilderFactory factory = newdocumentBuilderFactory(); factory.setFeature(APACHE_DISALLOW_DOCTYPE_DECL, true); return factory; } | /**
* A stricter version of {@link #documentBuilderFactory} which will throw an exception when encountering a doctype
* declaration. Unfortunately this is probably not suitable for many use cases.
*/ | A stricter version of <code>#documentBuilderFactory</code> which will throw an exception when encountering a doctype declaration. Unfortunately this is probably not suitable for many use cases | newStrictDocumentBuilderFactory | {
"repo_name": "sonatype/nexus-public",
"path": "components/nexus-common/src/main/java/org/sonatype/nexus/common/io/SafeXml.java",
"license": "epl-1.0",
"size": 5127
} | [
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException"
] | import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; | import javax.xml.parsers.*; | [
"javax.xml"
] | javax.xml; | 1,717,226 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.