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 String getValue() {
return getValue(I18NHelper.defaultLanguage);
} | String function() { return getValue(I18NHelper.defaultLanguage); } | /**
* Returns the string value of this field : aka the node path.
*/ | Returns the string value of this field : aka the node path | getValue | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/contribution/content/form/field/ExplorerField.java",
"license": "agpl-3.0",
"size": 8818
} | [
"org.silverpeas.core.i18n.I18NHelper"
] | import org.silverpeas.core.i18n.I18NHelper; | import org.silverpeas.core.i18n.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 141,022 |
public static <T> TopResults<T> shortestPaths(FST<T> fst, FST.Arc<T> fromNode, T startOutput, Comparator<T> comparator, int topN,
boolean allowEmptyString) throws IOException {
// All paths are kept, so we can pass topN for
// maxQueueDepth and the pruning is ... | static <T> TopResults<T> function(FST<T> fst, FST.Arc<T> fromNode, T startOutput, Comparator<T> comparator, int topN, boolean allowEmptyString) throws IOException { TopNSearcher<T> searcher = new TopNSearcher<>(fst, topN, topN, comparator); searcher.addStartPaths(fromNode, startOutput, allowEmptyString, new IntsRefBuil... | /** Starting from node, find the top N min cost
* completions to a final node. */ | Starting from node, find the top N min cost | shortestPaths | {
"repo_name": "smartan/lucene",
"path": "src/main/java/org/apache/lucene/util/fst/Util.java",
"license": "apache-2.0",
"size": 33379
} | [
"java.io.IOException",
"java.util.Comparator",
"org.apache.lucene.util.IntsRefBuilder",
"org.apache.lucene.util.fst.FST"
] | import java.io.IOException; import java.util.Comparator; import org.apache.lucene.util.IntsRefBuilder; import org.apache.lucene.util.fst.FST; | import java.io.*; import java.util.*; import org.apache.lucene.util.*; import org.apache.lucene.util.fst.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 2,742,199 |
HighLowValue getDigitalState(); | HighLowValue getDigitalState(); | /**
* Returns the value of the '<em><b>Digital State</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Digital State</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
*
* @retur... | Returns the value of the 'Digital State' attribute. If the meaning of the 'Digital State' attribute isn't clear, there really should be more of a description here... | getDigitalState | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/DigitalActor.java",
"license": "epl-1.0",
"size": 2723
} | [
"org.openhab.binding.tinkerforge.internal.types.HighLowValue"
] | import org.openhab.binding.tinkerforge.internal.types.HighLowValue; | import org.openhab.binding.tinkerforge.internal.types.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 289,842 |
protected void synchronize(BroadPhase broadPhase, final Transform transform1, final Transform transform2){
if(m_proxy == null){
return;
}
// Compute an AABB that covers the swept shape (may miss some rotation effect).
// AABB aabb1 = tlaabb1.get();
// AABB aabb2 = tlaabb2.get();
//
// m_shape.com... | void function(BroadPhase broadPhase, final Transform transform1, final Transform transform2){ if(m_proxy == null){ return; } m_shape.computeAABB( pool1, transform1); m_shape.computeAABB( pool2, transform2); m_aabb.lowerBound.x = pool1.lowerBound.x < pool2.lowerBound.x ? pool1.lowerBound.x : pool2.lowerBound.x; m_aabb.l... | /**
* Internal method
* @param broadPhase
* @param xf1
* @param xf2
*/ | Internal method | synchronize | {
"repo_name": "dragome/dragome-examples",
"path": "dragome-jbox2d-examples/src/main/java/org/jbox2d/dynamics/Fixture.java",
"license": "gpl-3.0",
"size": 9872
} | [
"org.jbox2d.collision.broadphase.BroadPhase",
"org.jbox2d.common.Transform",
"org.jbox2d.common.Vec2"
] | import org.jbox2d.collision.broadphase.BroadPhase; import org.jbox2d.common.Transform; import org.jbox2d.common.Vec2; | import org.jbox2d.collision.broadphase.*; import org.jbox2d.common.*; | [
"org.jbox2d.collision",
"org.jbox2d.common"
] | org.jbox2d.collision; org.jbox2d.common; | 603,013 |
public static Date getShowReleaseDateTime(@NonNull Context context, @NonNull LocalTime time,
int weekDay, @Nullable String timeZone, @Nullable String country,
@Nullable String network) {
// determine show time zone (falls back to America/New_York)
ZoneId showTimeZone = getDat... | static Date function(@NonNull Context context, @NonNull LocalTime time, int weekDay, @Nullable String timeZone, @Nullable String country, @Nullable String network) { ZoneId showTimeZone = getDateTimeZone(timeZone); ZonedDateTime dateTime = getShowReleaseDateTime(time, weekDay, showTimeZone, country, network, Clock.syst... | /**
* Calculates the current release date time. Adjusts for time zone effects on release time, e.g.
* delays between time zones (e.g. in the United States) and DST. Adjusts for user-defined
* offset.
*
* @param time See {@link #getShowReleaseTime(int)}.
* @return The date is today or on th... | Calculates the current release date time. Adjusts for time zone effects on release time, e.g. delays between time zones (e.g. in the United States) and DST. Adjusts for user-defined offset | getShowReleaseDateTime | {
"repo_name": "TreyWiranta/ASV",
"path": "SeriesGuide/src/main/java/com/battlelancer/seriesguide/util/TimeTools.java",
"license": "unlicense",
"size": 22394
} | [
"android.content.Context",
"android.support.annotation.NonNull",
"android.support.annotation.Nullable",
"java.util.Date",
"org.threeten.bp.Clock",
"org.threeten.bp.LocalTime",
"org.threeten.bp.ZoneId",
"org.threeten.bp.ZonedDateTime"
] | import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.util.Date; import org.threeten.bp.Clock; import org.threeten.bp.LocalTime; import org.threeten.bp.ZoneId; import org.threeten.bp.ZonedDateTime; | import android.content.*; import android.support.annotation.*; import java.util.*; import org.threeten.bp.*; | [
"android.content",
"android.support",
"java.util",
"org.threeten.bp"
] | android.content; android.support; java.util; org.threeten.bp; | 331,719 |
@Nullable public IgfsIpcEndpointConfiguration getIpcEndpointConfiguration() {
return ipcEndpointCfg;
} | @Nullable IgfsIpcEndpointConfiguration function() { return ipcEndpointCfg; } | /**
* Gets IPC endpoint configuration.
* <p>
* Endpoint is needed for communication between IGFS and {@code IgniteHadoopFileSystem} shipped with <b>Ignite
* Hadoop Accelerator</b>.
*
* @return IPC endpoint configuration.
*/ | Gets IPC endpoint configuration. Endpoint is needed for communication between IGFS and IgniteHadoopFileSystem shipped with Ignite Hadoop Accelerator | getIpcEndpointConfiguration | {
"repo_name": "DoudTechData/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/configuration/FileSystemConfiguration.java",
"license": "apache-2.0",
"size": 34932
} | [
"org.apache.ignite.igfs.IgfsIpcEndpointConfiguration",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.igfs.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 725,633 |
public boolean disableNdefPush() {
try {
return sService.disableNdefPush();
} catch (RemoteException e) {
attemptDeadServiceRecovery(e);
return false;
}
}
/**
* Return true if the NDEF Push (Android Beam) feature is enabled.
* <p>This fu... | boolean function() { try { return sService.disableNdefPush(); } catch (RemoteException e) { attemptDeadServiceRecovery(e); return false; } } /** * Return true if the NDEF Push (Android Beam) feature is enabled. * <p>This function will return true only if both NFC is enabled, and the * NDEF Push feature is enabled. * <p... | /**
* Disable NDEF Push feature.
* <p>This API is for the Settings application.
* @hide
*/ | Disable NDEF Push feature. This API is for the Settings application | disableNdefPush | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/android/nfc/NfcAdapter.java",
"license": "apache-2.0",
"size": 53519
} | [
"android.app.Activity",
"android.os.RemoteException"
] | import android.app.Activity; import android.os.RemoteException; | import android.app.*; import android.os.*; | [
"android.app",
"android.os"
] | android.app; android.os; | 2,887,599 |
public void writePacketData(PacketBuffer buf) throws IOException
{
buf.writeVarIntToBuffer(this.entityId);
EntityDataManager.writeEntries(this.dataManagerEntries, buf);
} | void function(PacketBuffer buf) throws IOException { buf.writeVarIntToBuffer(this.entityId); EntityDataManager.writeEntries(this.dataManagerEntries, buf); } | /**
* Writes the raw packet data to the data stream.
*/ | Writes the raw packet data to the data stream | writePacketData | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/network/play/server/SPacketEntityMetadata.java",
"license": "gpl-3.0",
"size": 1965
} | [
"java.io.IOException",
"net.minecraft.network.PacketBuffer",
"net.minecraft.network.datasync.EntityDataManager"
] | import java.io.IOException; import net.minecraft.network.PacketBuffer; import net.minecraft.network.datasync.EntityDataManager; | import java.io.*; import net.minecraft.network.*; import net.minecraft.network.datasync.*; | [
"java.io",
"net.minecraft.network"
] | java.io; net.minecraft.network; | 1,676,642 |
public DataDictionaryService getDataDictionaryService() {
return dataDictionaryService;
} | DataDictionaryService function() { return dataDictionaryService; } | /**
* Gets the dataDictionaryService attribute.
* @return Returns the dataDictionaryService.
*/ | Gets the dataDictionaryService attribute | getDataDictionaryService | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/service/impl/NightlyOutServiceImpl.java",
"license": "agpl-3.0",
"size": 22982
} | [
"org.kuali.rice.kns.service.DataDictionaryService"
] | import org.kuali.rice.kns.service.DataDictionaryService; | import org.kuali.rice.kns.service.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,831,021 |
private void updateLocalData() {
if(!valueChanged)
return;
try {
VRMLFieldData fd = node.getFieldValue(fieldIndex);
if (fd == null)
return;
if (fd.numElements == 0) {
numElements = 0;
data = new double... | void function() { if(!valueChanged) return; try { VRMLFieldData fd = node.getFieldValue(fieldIndex); if (fd == null) return; if (fd.numElements == 0) { numElements = 0; data = new double[0]; } else super.setValue(fd.numElements, fd.doubleArrayValue); valueChanged = false; } catch(FieldException ife) { } } | /**
* Fetch the field from the core and update any values internally.
*/ | Fetch the field from the core and update any values internally | updateLocalData | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/web3d/vrml/scripting/jsai/JSAIMFTime.java",
"license": "gpl-2.0",
"size": 7945
} | [
"org.web3d.vrml.lang.FieldException",
"org.web3d.vrml.nodes.VRMLFieldData"
] | import org.web3d.vrml.lang.FieldException; import org.web3d.vrml.nodes.VRMLFieldData; | import org.web3d.vrml.lang.*; import org.web3d.vrml.nodes.*; | [
"org.web3d.vrml"
] | org.web3d.vrml; | 885,598 |
public static int getDaysBetween(java.util.Calendar d1, java.util.Calendar d2) {
if (d1.after(d2)) { // swap dates so that d1 is start and d2 is end
java.util.Calendar swap = d1;
d1 = d2;
d2 = swap;
}
int days = d2.get(java.util.Calendar.DAY_OF_YEAR)... | static int function(java.util.Calendar d1, java.util.Calendar d2) { if (d1.after(d2)) { java.util.Calendar swap = d1; d1 = d2; d2 = swap; } int days = d2.get(java.util.Calendar.DAY_OF_YEAR) - d1.get(java.util.Calendar.DAY_OF_YEAR); int y2 = d2.get(java.util.Calendar.YEAR); if (d1.get(java.util.Calendar.YEAR) != y2) { d... | /**
* http://www.jguru.com/forums/view.jsp?EID=489372
*
* Calculates the number of days between two calendar days in a manner which is independent of
* the Calendar type used.
*
* @param d1
* The first date.
* @param d2
* The second date.
... | HREF Calculates the number of days between two calendar days in a manner which is independent of the Calendar type used | getDaysBetween | {
"repo_name": "yangjiandong/sshapp",
"path": "application/pm/src/main/java/org/ssh/pm/utils/AppUtil.java",
"license": "apache-2.0",
"size": 39292
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,451,534 |
@SuppressWarnings("unchecked")
public Type to(Iterable<Endpoint> endpoints) {
for (Endpoint endpoint : endpoints) {
addOutput(new ToDefinition(endpoint));
}
return (Type) this;
} | @SuppressWarnings(STR) Type function(Iterable<Endpoint> endpoints) { for (Endpoint endpoint : endpoints) { addOutput(new ToDefinition(endpoint)); } return (Type) this; } | /**
* Sends the exchange to a list of endpoints
*
* @param endpoints list of endpoints to send to
* @return the builder
*/ | Sends the exchange to a list of endpoints | to | {
"repo_name": "gilfernandes/camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 165071
} | [
"org.apache.camel.Endpoint"
] | import org.apache.camel.Endpoint; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,369,407 |
public static <T> List<DSMorphism<T, T>> automorphisms(
final DelaneySymbol<T> ds)
{
final List<DSMorphism<T, T>> result =
new LinkedList<DSMorphism<T, T>>();
final Iterator<T> elms = ds.elements();
if (elms.hasNext()) {
final T first = elms.next();
... | static <T> List<DSMorphism<T, T>> function( final DelaneySymbol<T> ds) { final List<DSMorphism<T, T>> result = new LinkedList<DSMorphism<T, T>>(); final Iterator<T> elms = ds.elements(); if (elms.hasNext()) { final T first = elms.next(); result.add(new DSMorphism<T, T>(ds, ds, first, first)); while (elms.hasNext()) { f... | /**
* Computes all the automorphisms of a given Delaney Symbol.
*
* @param ds the input symbol.
* @return the list of all automorphisms of ds.
*/ | Computes all the automorphisms of a given Delaney Symbol | automorphisms | {
"repo_name": "odf/gavrog",
"path": "src/org/gavrog/joss/dsyms/basic/DSMorphism.java",
"license": "apache-2.0",
"size": 6948
} | [
"java.util.Iterator",
"java.util.LinkedList",
"java.util.List"
] | import java.util.Iterator; import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,872,735 |
public static void preserve(FileSystem targetFS, Path path,
CopyListingFileStatus srcFileStatus,
EnumSet<FileAttribute> attributes,
boolean preserveRawXattrs) throws IOException {
// strip out those attributes we don't need... | static void function(FileSystem targetFS, Path path, CopyListingFileStatus srcFileStatus, EnumSet<FileAttribute> attributes, boolean preserveRawXattrs) throws IOException { attributes.remove(FileAttribute.BLOCKSIZE); attributes.remove(FileAttribute.CHECKSUMTYPE); FileStatus targetFileStatus = attributes.isEmpty() ? nul... | /**
* Preserve attribute on file matching that of the file status being sent
* as argument. Barring the block size, all the other attributes are preserved
* by this function
*
* @param targetFS - File system
* @param path - Path that needs to preserve original file status
* @param srcFileStatus - O... | Preserve attribute on file matching that of the file status being sent as argument. Barring the block size, all the other attributes are preserved by this function | preserve | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java",
"license": "apache-2.0",
"size": 26119
} | [
"java.io.IOException",
"java.util.EnumSet",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.XAttr",
"org.apache.hadoop.fs.permission.AclEntry",
"org.apache.hadoop.tools.CopyListingFileStatus... | import java.io.IOException; import java.util.EnumSet; import java.util.List; import java.util.Map; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.XAttr; import org.apache.hadoop.fs.permission.AclEntry; import org.apache.hadoo... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.tools.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 765,579 |
public void setFile(File file) {
this.file = file;
} | void function(File file) { this.file = file; } | /**
* File to write to.
*
* @param file
* the file to write to, if not set, echo to standard Ivy logging
*/ | File to write to | setFile | {
"repo_name": "jaikiran/ant-ivy",
"path": "src/java/org/apache/ivy/plugins/trigger/LogTrigger.java",
"license": "apache-2.0",
"size": 4177
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,692,057 |
private Subscription subscribeSignsRx(Observable<ServerConnection> serverRx) {
return serverRx
.flatMap(connection -> connection.getSocketHandler().getSignsRx().distinct(), (connection, signs) -> {
return new Pair<ServerConnection, List<SignData>>(connection, signs);
... | Subscription function(Observable<ServerConnection> serverRx) { return serverRx .flatMap(connection -> connection.getSocketHandler().getSignsRx().distinct(), (connection, signs) -> { return new Pair<ServerConnection, List<SignData>>(connection, signs); }).subscribe(conectionSignPair -> { for (SignData sign : conectionSi... | /**
* Subscribe for sign updates
*
* @param serverRx server stream
* @return subscription for listening to sign events.
*/ | Subscribe for sign updates | subscribeSignsRx | {
"repo_name": "kwave/openhab2-addons",
"path": "addons/binding/org.openhab.binding.minecraft/src/main/java/org/openhab/binding/minecraft/discovery/MinecraftDiscoveryService.java",
"license": "epl-1.0",
"size": 7371
} | [
"java.util.List",
"org.openhab.binding.minecraft.handler.server.ServerConnection",
"org.openhab.binding.minecraft.message.data.SignData",
"org.openhab.binding.minecraft.util.Pair"
] | import java.util.List; import org.openhab.binding.minecraft.handler.server.ServerConnection; import org.openhab.binding.minecraft.message.data.SignData; import org.openhab.binding.minecraft.util.Pair; | import java.util.*; import org.openhab.binding.minecraft.handler.server.*; import org.openhab.binding.minecraft.message.data.*; import org.openhab.binding.minecraft.util.*; | [
"java.util",
"org.openhab.binding"
] | java.util; org.openhab.binding; | 2,375,168 |
void scanIntermediateDirectory() throws IOException {
if (UserGroupInformation.isSecurityEnabled()) {
UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab();
}
// TODO it would be great to limit how often this happens, except in the
// case where we are looking for a particular job.... | void scanIntermediateDirectory() throws IOException { if (UserGroupInformation.isSecurityEnabled()) { UserGroupInformation.getLoginUser().checkTGTAndReloginFromKeytab(); } List<FileStatus> userDirList = JobHistoryUtils.localGlobber( intermediateDoneDirFc, intermediateDoneDirPath, STRScanning intermediate dirs"); for (F... | /**
* Scans the intermediate directory to find user directories. Scans these for
* history files if the modification time for the directory has changed. Once
* it finds history files it starts the process of moving them to the done
* directory.
*
* @throws IOException
* if there was a e... | Scans the intermediate directory to find user directories. Scans these for history files if the modification time for the directory has changed. Once it finds history files it starts the process of moving them to the done directory | scanIntermediateDirectory | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java",
"license": "apache-2.0",
"size": 44453
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.mapreduce.v2.jobhistory.JobHistoryUtils",
"org.apache.hadoop.security.UserGroupInformation"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.mapreduce.v2.jobhistory.JobHistoryUtils; import org.apache.hadoop.security.UserGroupInformation; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.v2.jobhistory.*; import org.apache.hadoop.security.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,435,283 |
public void testEXPIRE_LOCAL_INVALIDATE() {
Operation op = Operation.EXPIRE_LOCAL_INVALIDATE;
assertFalse(op.isCreate());
assertFalse(op.isUpdate());
assertTrue(op.isInvalidate());
assertFalse(op.isDestroy());
assertFalse(op.isPutAll());
assertFalse(op.isRegionInvalidate());
assertFals... | void function() { Operation op = Operation.EXPIRE_LOCAL_INVALIDATE; assertFalse(op.isCreate()); assertFalse(op.isUpdate()); assertTrue(op.isInvalidate()); assertFalse(op.isDestroy()); assertFalse(op.isPutAll()); assertFalse(op.isRegionInvalidate()); assertFalse(op.isRegionDestroy()); assertFalse(op.isRegion()); assertT... | /**
* Check EXPIRE_LOCAL_INVALIDATE Operation.
*/ | Check EXPIRE_LOCAL_INVALIDATE Operation | testEXPIRE_LOCAL_INVALIDATE | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "tests/core/src/main/java/com/gemstone/gemfire/cache/OperationJUnitTest.java",
"license": "apache-2.0",
"size": 27941
} | [
"com.gemstone.gemfire.cache.Operation"
] | import com.gemstone.gemfire.cache.Operation; | import com.gemstone.gemfire.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,017,415 |
JavaPairRDD<MatchableEntity, MatchableEntity> citDocPairs = citIdDocPairs
.groupByKey()
.join(citations)
.flatMapToPair(docsWithCit -> {
MatchableEntity citation = docsWithCit._2._2;
... | JavaPairRDD<MatchableEntity, MatchableEntity> citDocPairs = citIdDocPairs .groupByKey() .join(citations) .flatMapToPair(docsWithCit -> { MatchableEntity citation = docsWithCit._2._2; Collection<EntityWithSimilarity> docsFiltered = calculateSimilarityAndLimitDocs(citation, docsWithCit._2._1); return docsFiltered.stream(... | /**
* Attaches citation into (citation_id, document) pairs.
* Additionally it limits produced (citation, document) pairs with
* the same citation to {@link #getSameCitationsLimit()} records.
* Method limits records based on number of mutual tokens.
*/ | Attaches citation into (citation_id, document) pairs. Additionally it limits produced (citation, document) pairs with the same citation to <code>#getSameCitationsLimit()</code> records. Method limits records based on number of mutual tokens | attachCitationsAndLimitDocs | {
"repo_name": "acz-icm/coansys",
"path": "citation-matching/citation-matching-core-code/src/main/java/pl/edu/icm/coansys/citations/CitationAttacherWithMatchedLimiter.java",
"license": "agpl-3.0",
"size": 5049
} | [
"java.util.Collection",
"java.util.stream.Collectors",
"org.apache.spark.api.java.JavaPairRDD",
"pl.edu.icm.coansys.citations.data.MatchableEntity"
] | import java.util.Collection; import java.util.stream.Collectors; import org.apache.spark.api.java.JavaPairRDD; import pl.edu.icm.coansys.citations.data.MatchableEntity; | import java.util.*; import java.util.stream.*; import org.apache.spark.api.java.*; import pl.edu.icm.coansys.citations.data.*; | [
"java.util",
"org.apache.spark",
"pl.edu.icm"
] | java.util; org.apache.spark; pl.edu.icm; | 2,438,130 |
@ReflectiveMethod(name = "b", types = {NMSWorld.class, NMSBlockPosition.class, NMSIBlockData.class, Random.class})
public void b(NMSWorld world, NMSBlockPosition blockPosition, NMSIBlockData iBlockData, Random random){
NMSWrapper.getInstance().exec(nmsObject, world, blockPosition, iBlockData, random);
... | @ReflectiveMethod(name = "b", types = {NMSWorld.class, NMSBlockPosition.class, NMSIBlockData.class, Random.class}) void function(NMSWorld world, NMSBlockPosition blockPosition, NMSIBlockData iBlockData, Random random){ NMSWrapper.getInstance().exec(nmsObject, world, blockPosition, iBlockData, random); } | /**
* TODO Find correct name
* @see net.minecraft.server.v1_9_R1.BlockSnowBlock#b(net.minecraft.server.v1_9_R1.World, net.minecraft.server.v1_9_R1.BlockPosition, net.minecraft.server.v1_9_R1.IBlockData, java.util.Random)
*/ | TODO Find correct name | b | {
"repo_name": "Vilsol/NMSWrapper",
"path": "src/main/java/me/vilsol/nmswrapper/wraps/unparsed/NMSBlockSnowBlock.java",
"license": "apache-2.0",
"size": 1735
} | [
"java.util.Random",
"me.vilsol.nmswrapper.NMSWrapper",
"me.vilsol.nmswrapper.reflections.ReflectiveMethod",
"me.vilsol.nmswrapper.wraps.NMSWorld"
] | import java.util.Random; import me.vilsol.nmswrapper.NMSWrapper; import me.vilsol.nmswrapper.reflections.ReflectiveMethod; import me.vilsol.nmswrapper.wraps.NMSWorld; | import java.util.*; import me.vilsol.nmswrapper.*; import me.vilsol.nmswrapper.reflections.*; import me.vilsol.nmswrapper.wraps.*; | [
"java.util",
"me.vilsol.nmswrapper"
] | java.util; me.vilsol.nmswrapper; | 19,925 |
public void run()
{
// The process will try to reconnect until the connection is established or
// the user cancel the reconnection process {@link Connection#disconnect()}
while (ReconnectionManager.this.isReconnectionAllowed())
{
// Wait 3 seconds before trying to reconne... | void function() { while (ReconnectionManager.this.isReconnectionAllowed()) { int remainingSeconds = numAttemps == 0 ? 0 : 3; while (ReconnectionManager.this.isReconnectionAllowed() && remainingSeconds > 0) { try { Thread.sleep(1000); remainingSeconds--; ReconnectionManager.this.notifyAttemptToReconnectIn(remainingSecon... | /**
* The process will try the reconnection until the connection succeed or the user
* cancell it
*/ | The process will try the reconnection until the connection succeed or the user cancell it | run | {
"repo_name": "jonathangerbaud/KlyphMessenger",
"path": "KlyphMessenger/src/com/abewy/android/apps/klyph/messenger/service/MessengerService.java",
"license": "mit",
"size": 41860
} | [
"android.util.Log",
"org.jivesoftware.smack.XMPPException"
] | import android.util.Log; import org.jivesoftware.smack.XMPPException; | import android.util.*; import org.jivesoftware.smack.*; | [
"android.util",
"org.jivesoftware.smack"
] | android.util; org.jivesoftware.smack; | 919,199 |
public static String getHostNameByNic() {
try {
for(Enumeration<NetworkInterface> nicEnum = NetworkInterface.getNetworkInterfaces(); nicEnum.hasMoreElements();) {
NetworkInterface nic = nicEnum.nextElement();
if(nic!=null && nic.isUp() && !nic.isLoopback()) {
for(Enumeration<InetAddress> nicAddr = ... | static String function() { try { for(Enumeration<NetworkInterface> nicEnum = NetworkInterface.getNetworkInterfaces(); nicEnum.hasMoreElements();) { NetworkInterface nic = nicEnum.nextElement(); if(nic!=null && nic.isUp() && !nic.isLoopback()) { for(Enumeration<InetAddress> nicAddr = nic.getInetAddresses(); nicAddr.hasM... | /**
* Iterates through the found NICs, extracting the host name if the NIC is not the loopback interface.
* The host name is extracted from the first address bound to the first matching NIC that does not
* have a canonical name that is an IP address.
* @return The host name or null if one was not found.
*/ | Iterates through the found NICs, extracting the host name if the NIC is not the loopback interface. The host name is extracted from the first address bound to the first matching NIC that does not have a canonical name that is an IP address | getHostNameByNic | {
"repo_name": "nickman/heliosutils",
"path": "src/main/java/com/heliosapm/utils/net/LocalHost.java",
"license": "apache-2.0",
"size": 5512
} | [
"java.net.InetAddress",
"java.net.NetworkInterface",
"java.util.Enumeration"
] | import java.net.InetAddress; import java.net.NetworkInterface; import java.util.Enumeration; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 291,630 |
public void setTitleColor(final ChatColor color) {
this.titleColor = color;
} | void function(final ChatColor color) { this.titleColor = color; } | /**
* Set the title color
*
* @param color
* Chat color
*/ | Set the title color | setTitleColor | {
"repo_name": "LinEvil/PlotSquared-Chinese",
"path": "src/main/java/com/intellectualcrafters/plot/titles/DefaultTitleManager.java",
"license": "gpl-3.0",
"size": 12487
} | [
"org.bukkit.ChatColor"
] | import org.bukkit.ChatColor; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 894,124 |
NamedParameters parameters = newNamedParameters();
return findOneByNamedQuery("suggestionBoxFromComponentInstance",
parameters.add("componentInstanceId", componentInstanceId));
} | NamedParameters parameters = newNamedParameters(); return findOneByNamedQuery(STR, parameters.add(STR, componentInstanceId)); } | /**
* Gets the suggestion box represented by the specified component instance identifier.
* @param componentInstanceId the component instance id associated to the required suggestion
* box.
* @return the suggestion box instance if exists, null otherwise.
*/ | Gets the suggestion box represented by the specified component instance identifier | getByComponentInstanceId | {
"repo_name": "CecileBONIN/Silverpeas-Components",
"path": "suggestion-box/suggestion-box-jar/src/main/java/org/silverpeas/components/suggestionbox/repository/SuggestionBoxRepository.java",
"license": "agpl-3.0",
"size": 2478
} | [
"org.silverpeas.persistence.repository.jpa.NamedParameters"
] | import org.silverpeas.persistence.repository.jpa.NamedParameters; | import org.silverpeas.persistence.repository.jpa.*; | [
"org.silverpeas.persistence"
] | org.silverpeas.persistence; | 2,662,201 |
public void testCommentsShowEqualsXml() {
String url = "himym";
Set<Comment> commentsXml = this.commentsXml.getComments(url);
Set<Comment> commentsXml2 = this.commentsXml.getComments(url);
assertEquals(commentsXml, commentsXml2);
} | void function() { String url = "himym"; Set<Comment> commentsXml = this.commentsXml.getComments(url); Set<Comment> commentsXml2 = this.commentsXml.getComments(url); assertEquals(commentsXml, commentsXml2); } | /**
* Test comments of a show equals xml
*/ | Test comments of a show equals xml | testCommentsShowEqualsXml | {
"repo_name": "kokotchY/betaseriesApi",
"path": "betaSeriesAPI/src/test/java/com/kokotchy/betaSeriesAPI/TestComments.java",
"license": "gpl-3.0",
"size": 5069
} | [
"com.kokotchy.betaSeriesAPI.model.Comment",
"java.util.Set"
] | import com.kokotchy.betaSeriesAPI.model.Comment; import java.util.Set; | import com.kokotchy.*; import java.util.*; | [
"com.kokotchy",
"java.util"
] | com.kokotchy; java.util; | 2,780,432 |
public Builder issue(Issue issue) {
return repo(createFromUrl(issue.getHtmlUrl())).add(EXTRA_ISSUE,
issue).add(EXTRA_ISSUE_NUMBER, issue.getNumber());
} | Builder function(Issue issue) { return repo(createFromUrl(issue.getHtmlUrl())).add(EXTRA_ISSUE, issue).add(EXTRA_ISSUE_NUMBER, issue.getNumber()); } | /**
* Add issue to intent being built up
*
* @param issue
* @return this builder
*/ | Add issue to intent being built up | issue | {
"repo_name": "ISkyLove/PocketHub",
"path": "app/src/main/java/com/github/pockethub/Intents.java",
"license": "apache-2.0",
"size": 9607
} | [
"org.eclipse.egit.github.core.Issue"
] | import org.eclipse.egit.github.core.Issue; | import org.eclipse.egit.github.core.*; | [
"org.eclipse.egit"
] | org.eclipse.egit; | 582,462 |
@Override
public boolean relative(int rowCount) throws SQLException {
try {
debugCodeCall("relative", rowCount);
checkClosed();
if (rowCount < 0) {
rowCount = result.getRowId() + rowCount + 1;
resetResult();
}
fo... | boolean function(int rowCount) throws SQLException { try { debugCodeCall(STR, rowCount); checkClosed(); if (rowCount < 0) { rowCount = result.getRowId() + rowCount + 1; resetResult(); } for (int i = 0; i < rowCount; i++) { if (!nextRow()) { return false; } } return isOnValidRow(); } catch (Exception e) { throw logAndCo... | /**
* Moves the current position to a specific row relative to the current row.
*
* @param rowCount 0 means don't do anything, 1 is the next row, -1 the
* previous. If the value is too large, the position is moved
* after the last row, if if the value is too small it is mo... | Moves the current position to a specific row relative to the current row | relative | {
"repo_name": "wizardofos/Protozoo",
"path": "extra/h2/src/main/java/org/h2/jdbc/JdbcResultSet.java",
"license": "mit",
"size": 120208
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,839,264 |
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
final Stylesheet stylesheet = classGen.getStylesheet();
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
final int current = methodGen.getLoca... | void function(ClassGenerator classGen, MethodGenerator methodGen) { final Stylesheet stylesheet = classGen.getStylesheet(); final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); final int current = methodGen.getLocalIndex(STR); il.append(classGen.loadTranslet... | /**
* Translate call-template. A parameter frame is pushed only if
* some template in the stylesheet uses parameters.
*/ | Translate call-template. A parameter frame is pushed only if some template in the stylesheet uses parameters | translate | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ApplyImports.java",
"license": "mit",
"size": 6413
} | [
"com.sun.org.apache.bcel.internal.generic.ConstantPoolGen",
"com.sun.org.apache.bcel.internal.generic.InstructionList",
"com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator",
"com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator"
] | import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; | import com.sun.org.apache.bcel.internal.generic.*; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.*; | [
"com.sun.org"
] | com.sun.org; | 227,209 |
protected boolean usesDiskStore(RegionAttributes regionAttributes) {
return !isProxy() && (getAttributes().getDataPolicy().withPersistence() || isOverflowEnabled());
} | boolean function(RegionAttributes regionAttributes) { return !isProxy() && (getAttributes().getDataPolicy().withPersistence() isOverflowEnabled()); } | /**
* Returns true if this region's config indicates that it will use a disk store. Added for bug
* 42055.
*/ | Returns true if this region's config indicates that it will use a disk store. Added for bug 42055 | usesDiskStore | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java",
"license": "apache-2.0",
"size": 428144
} | [
"org.apache.geode.cache.RegionAttributes"
] | import org.apache.geode.cache.RegionAttributes; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,883,727 |
public PlotDocument plotText(int x, int y, String text, int size, Color colour) {
addOp(new PlotText(x, y, text, size, colour));
return this;
}
| PlotDocument function(int x, int y, String text, int size, Color colour) { addOp(new PlotText(x, y, text, size, colour)); return this; } | /**
* Plot some text in the given colour
* @param x the x coord of the text (document coords)
* @param y the y coord of the text (document coords)
* @param text the text
* @param size the size of the text (points)
* @param colour the colour of the glyph
... | Plot some text in the given colour | plotText | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Samples/src/org/openquark/cal/samples/plotter/Plotter.java",
"license": "bsd-3-clause",
"size": 68230
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,879,804 |
@Override
public Object convert(final Class type, final Object value) {
// Deal with a null value
if (value == null) {
if (useDefault) {
return (defaultValue);
} else {
throw new ConversionException("No value specified");
}
... | Object function(final Class type, final Object value) { if (value == null) { if (useDefault) { return (defaultValue); } else { throw new ConversionException(STR); } } if (MODEL.getClass() == value.getClass()) { return (value); } if (strings.getClass() == value.getClass()) { try { final String[] values = (String[]) valu... | /**
* Convert the specified input object into an output object of the
* specified type.
*
* @param type Data type to which this value should be converted
* @param value The input value to be converted
* @return the converted value
*
* @throws ConversionException if conversion can... | Convert the specified input object into an output object of the specified type | convert | {
"repo_name": "yippeesoft/NotifyTools",
"path": "beanutils/src/main/java/org/apache/commons/beanutils/converters/LongArrayConverter.java",
"license": "apache-2.0",
"size": 4667
} | [
"java.util.List",
"org.apache.commons.beanutils.ConversionException"
] | import java.util.List; import org.apache.commons.beanutils.ConversionException; | import java.util.*; import org.apache.commons.beanutils.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,711,708 |
private Dialog createDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Allergien");
//builder.setMessage("");
// Use an EditText view to get user input.
final EditText input = new EditText(this);
input.setId(TEXT_Allergien);
... | Dialog function() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle(STR); final EditText input = new EditText(this); input.setId(TEXT_Allergien); builder.setView(input); builder.setPositiveButton(STR, new DialogInterface.OnClickListener() { | /**
* Create and return an example alert dialog with an edit text box.
*/ | Create and return an example alert dialog with an edit text box | createDialog | {
"repo_name": "wrk-fmd/CoCeCl",
"path": "app/src/main/java/it/fmd/cocecl/PatmanActivity.java",
"license": "gpl-3.0",
"size": 12237
} | [
"android.app.AlertDialog",
"android.app.Dialog",
"android.content.DialogInterface",
"android.widget.EditText"
] | import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.widget.EditText; | import android.app.*; import android.content.*; import android.widget.*; | [
"android.app",
"android.content",
"android.widget"
] | android.app; android.content; android.widget; | 948,837 |
@VisibleForTesting
private QualityInvoiceLine createQualityInvoiceLineDetail_RegularOrder(
final IQualityInspectionOrder productionOrder,
final BigDecimal overallAvgProducedQtyPerTU,
final String labelToUse)
{
//
// Extract parameters from regular manufacturing norder
final IQualityInspectionLinesCo... | QualityInvoiceLine function( final IQualityInspectionOrder productionOrder, final BigDecimal overallAvgProducedQtyPerTU, final String labelToUse) { final IQualityInspectionLinesCollection qualityInspectionLines = getQualityInspectionLinesCollection(); final IProductionMaterial currentRawProductionMaterial = productionO... | /**
* Creates and returns a single QualityInvoiceLine that references the given <code>productionOrder</code>.
* <p>
* Note: we also return a line if there is no QualityAdjustment to be invoiced, in order to keep track of every single regular PP_Order.
*
* @param productionOrder
* @param overallAvgProducedQt... | Creates and returns a single QualityInvoiceLine that references the given <code>productionOrder</code>. Note: we also return a line if there is no QualityAdjustment to be invoiced, in order to keep track of every single regular PP_Order | createQualityInvoiceLineDetail_RegularOrder | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.materialtracking/src/main/java/de/metas/materialtracking/ch/lagerkonf/invoicing/impl/QualityInvoiceLineGroupsBuilder.java",
"license": "gpl-2.0",
"size": 49930
} | [
"de.metas.materialtracking.IHandlingUnitsInfo",
"de.metas.materialtracking.IHandlingUnitsInfoWritableQty",
"de.metas.materialtracking.qualityBasedInvoicing.IProductionMaterial",
"de.metas.materialtracking.qualityBasedInvoicing.IQualityInspectionLine",
"de.metas.materialtracking.qualityBasedInvoicing.IQualit... | import de.metas.materialtracking.IHandlingUnitsInfo; import de.metas.materialtracking.IHandlingUnitsInfoWritableQty; import de.metas.materialtracking.qualityBasedInvoicing.IProductionMaterial; import de.metas.materialtracking.qualityBasedInvoicing.IQualityInspectionLine; import de.metas.materialtracking.qualityBasedInv... | import de.metas.materialtracking.*; import java.math.*; | [
"de.metas.materialtracking",
"java.math"
] | de.metas.materialtracking; java.math; | 1,317,757 |
public void testPurgeHar() throws Exception {
LOG.info("testPurgeHar started");
int harDelay = 0;
createClusters(true);
mySetup(1, 1, 5, harDelay);
Path dir = new Path("/user/dhruba/raidtest/");
Path destPath = new Path("/destraid/user/dhruba/raidtest");
Path file1 = new Path(dir + "/file"... | void function() throws Exception { LOG.info(STR); int harDelay = 0; createClusters(true); mySetup(1, 1, 5, harDelay); Path dir = new Path(STR); Path destPath = new Path(STR); Path file1 = new Path(dir + "/file"); RaidNode cnode = null; try { TestRaidNode.createOldFile(fileSys, file1, 1, 8, 8192L); LOG.info(STR); Config... | /**
* Create a file, wait for parity file to get HARed. Then modify the file,
* wait for the HAR to get purged.
*/ | Create a file, wait for parity file to get HARed. Then modify the file, wait for the HAR to get purged | testPurgeHar | {
"repo_name": "leonhong/hadoop-20-warehouse",
"path": "src/contrib/raid/src/test/org/apache/hadoop/raid/TestRaidPurge.java",
"license": "apache-2.0",
"size": 19504
} | [
"java.io.FileNotFoundException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.util.StringUtils"
] | import java.io.FileNotFoundException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.util.StringUtils; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,146,159 |
public static String getString(final JsonElement element, final String name, final String defaultValue) {
JsonElement child = getElement(element, name);
return isPrimitiveElement(child)? child.getAsString() : defaultValue;
} | static String function(final JsonElement element, final String name, final String defaultValue) { JsonElement child = getElement(element, name); return isPrimitiveElement(child)? child.getAsString() : defaultValue; } | /**
* Get the attribute specified by the given name as a string value.
*
* @param element the JSON object
* @param name the attribute name
* @param defaultValue the default value if the specified attribute does not exist
* @return the string value of the attribute
*/ | Get the attribute specified by the given name as a string value | getString | {
"repo_name": "dbi1463/spring-boot",
"path": "src/main/java/tw/example/util/JsonUtils.java",
"license": "mit",
"size": 4761
} | [
"com.google.gson.JsonElement"
] | import com.google.gson.JsonElement; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 350,868 |
protected static void verifyValue(Object key, Object obj1, Object obj2, int compareStrategy) {
if (obj1 instanceof BaseValueHolder) {
verifyMyValue(key, ((BaseValueHolder)obj1).myValue, obj2, EQUAL);
} else if (obj2 instanceof BaseValueHolder) {
verifyMyValue(key, ((BaseValueHolder)obj2).myValue, obj1... | static void function(Object key, Object obj1, Object obj2, int compareStrategy) { if (obj1 instanceof BaseValueHolder) { verifyMyValue(key, ((BaseValueHolder)obj1).myValue, obj2, EQUAL); } else if (obj2 instanceof BaseValueHolder) { verifyMyValue(key, ((BaseValueHolder)obj2).myValue, obj1, EQUAL); } else if (obj1 == nu... | /** Verify that the two given objects are equal, giving special consideration
* to instances of ValueHolder.
*
* @param key The key whose value we are checking.
* @param obj1 One object to compare.
* @param obj2 The other object to compare.
* @param compareStrategy Whether the compare is equals or equivalent (fo... | Verify that the two given objects are equal, giving special consideration to instances of ValueHolder | verifyValue | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/parReg/ParRegUtil.java",
"license": "apache-2.0",
"size": 58888
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 226,797 |
public void setHighRange(JRDataRange highRange)
{
Object old = this.highRange;
this.highRange = highRange;
getEventSupport().firePropertyChange(PROPERTY_HIGH_RANGE, old, this.highRange);
} | void function(JRDataRange highRange) { Object old = this.highRange; this.highRange = highRange; getEventSupport().firePropertyChange(PROPERTY_HIGH_RANGE, old, this.highRange); } | /**
* Specifies the high range of the thermometer.
*
* @param highRange the high range of the thermometer
*/ | Specifies the high range of the thermometer | setHighRange | {
"repo_name": "MHTaleb/Encologim",
"path": "lib/JasperReport/src/net/sf/jasperreports/charts/design/JRDesignThermometerPlot.java",
"license": "gpl-3.0",
"size": 5064
} | [
"net.sf.jasperreports.charts.JRDataRange"
] | import net.sf.jasperreports.charts.JRDataRange; | import net.sf.jasperreports.charts.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 738,307 |
public Date getStartTime() {
return startTime;
} | Date function() { return startTime; } | /**
* Retrieves the date/time at which the account this flag references will begin having a disabled status.
* This can be null if there is no start time set, meaning that the start time is immediate.
*
* @return The Date when the disabled status will start, or null for immediately.
*/ | Retrieves the date/time at which the account this flag references will begin having a disabled status. This can be null if there is no start time set, meaning that the start time is immediate | getStartTime | {
"repo_name": "fanjunwei/openfireSSO",
"path": "src/java/org/jivesoftware/openfire/lockout/LockOutFlag.java",
"license": "apache-2.0",
"size": 4724
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 985,273 |
static public final List<OOXML> values() {
return values;
}
| static final List<OOXML> function() { return values; } | /**
* Return all known instances in the order they were published.
*
* @return all known instances ordered.
* @see #compareTo(OOXML)
*/ | Return all known instances in the order they were published | values | {
"repo_name": "eric-lemesre/OpenConcerto",
"path": "OpenConcerto/src/org/openconcerto/openoffice/OOXML.java",
"license": "gpl-3.0",
"size": 21034
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,427,490 |
Preconditions.checkNotNull(name);
return name;
} | Preconditions.checkNotNull(name); return name; } | /**
* Returns the name of this function.
*
* <p>A subclass must override this function if a null name is given to this class's constructor.
*/ | Returns the name of this function. A subclass must override this function if a null name is given to this class's constructor | getName | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/BaseFunction.java",
"license": "apache-2.0",
"size": 25004
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,714,067 |
public void setVersion(VersionNumber newVersion);
| void function(VersionNumber newVersion); | /**
* This method sets a {@link VersionNumber} that is the version of this {@link OperatorLibrary}.
*/ | This method sets a <code>VersionNumber</code> that is the version of this <code>OperatorLibrary</code> | setVersion | {
"repo_name": "aborg0/rapidminer-vega",
"path": "src/com/rapidminer/operator/libraries/OperatorLibrary.java",
"license": "agpl-3.0",
"size": 5843
} | [
"com.rapidminer.gui.tools.VersionNumber"
] | import com.rapidminer.gui.tools.VersionNumber; | import com.rapidminer.gui.tools.*; | [
"com.rapidminer.gui"
] | com.rapidminer.gui; | 1,184,286 |
public void test(TestHarness harness)
{
// create instance of a class Double
Object o = Class.class;
// get a runtime class of an object "o"
Class c = o.getClass();
harness.check(c.isAssignableFrom(Class.class));
} | void function(TestHarness harness) { Object o = Class.class; Class c = o.getClass(); harness.check(c.isAssignableFrom(Class.class)); } | /**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/ | Runs the test using the specified harness | test | {
"repo_name": "niloc132/mauve-gwt",
"path": "src/main/java/gnu/testlet/java/lang/Class/classInfo/isAssignableFrom.java",
"license": "gpl-2.0",
"size": 1549
} | [
"gnu.testlet.TestHarness",
"java.lang.Class"
] | import gnu.testlet.TestHarness; import java.lang.Class; | import gnu.testlet.*; import java.lang.*; | [
"gnu.testlet",
"java.lang"
] | gnu.testlet; java.lang; | 996,049 |
JSONObject root = new JSONObject(buffer);
Set<String> rootKeySet = root.keySet();
JSONObject actorObject = root.getJSONObject(KEY_AGENT);
JSONObject assetObject = root.getJSONObject(KEY_ELEMENT);
Entity actor = new Entity(actorObject.getString(KEY_ID), actorObject.getString(KEY_... | JSONObject root = new JSONObject(buffer); Set<String> rootKeySet = root.keySet(); JSONObject actorObject = root.getJSONObject(KEY_AGENT); JSONObject assetObject = root.getJSONObject(KEY_ELEMENT); Entity actor = new Entity(actorObject.getString(KEY_ID), actorObject.getString(KEY_TYPE)); Entity asset = new Entity(assetOb... | /**
* Parses an event from an event buffer
*
* @param buffer JSON object
* @return An event, if successfully parsed
*/ | Parses an event from an event buffer | parse | {
"repo_name": "guidj/hale",
"path": "src/main/java/org/hale/commons/io/json/JsonEventParser.java",
"license": "apache-2.0",
"size": 2488
} | [
"java.util.Set",
"org.hale.commons.types.basic.Entity",
"org.hale.commons.types.basic.Event",
"org.json.JSONObject"
] | import java.util.Set; import org.hale.commons.types.basic.Entity; import org.hale.commons.types.basic.Event; import org.json.JSONObject; | import java.util.*; import org.hale.commons.types.basic.*; import org.json.*; | [
"java.util",
"org.hale.commons",
"org.json"
] | java.util; org.hale.commons; org.json; | 2,226,506 |
private static HttpURLConnection createConnection(UUID uuid) throws IOException {
HttpURLConnection connection = (HttpURLConnection) new URL(String.format(PROFILE_URL, uuid.toString().replaceAll("-", ""))).openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("C... | static HttpURLConnection function(UUID uuid) throws IOException { HttpURLConnection connection = (HttpURLConnection) new URL(String.format(PROFILE_URL, uuid.toString().replaceAll("-", STRGETSTRContent-TypeSTRapplication/json"); connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(true); r... | /**
* Gets an {@link HttpURLConnection} from a UUID.
*
* @param uuid
* the UUID
* @return the connection
* @throws IOException
* if an error occurs.
*/ | Gets an <code>HttpURLConnection</code> from a UUID | createConnection | {
"repo_name": "PonyvilleSquare/MCProfiler",
"path": "src/main/java/org/sweetiebelle/mcprofiler/NamesFetcher.java",
"license": "mit",
"size": 2070
} | [
"java.io.IOException",
"java.net.HttpURLConnection"
] | import java.io.IOException; import java.net.HttpURLConnection; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,781,731 |
private NrbInterface getNrbInterface() throws Exception {
return proxy.getNrbInterface();
} | NrbInterface function() throws Exception { return proxy.getNrbInterface(); } | /**
* Get the remote NrbInterface object
*
* @throws Exception
*/ | Get the remote NrbInterface object | getNrbInterface | {
"repo_name": "jmacauley/OpenDRAC",
"path": "Web/RequestHandler/src/main/java/com/nortel/appcore/app/drac/server/requesthandler/RequestHandler.java",
"license": "gpl-3.0",
"size": 65106
} | [
"com.nortel.appcore.app.drac.server.nrb.NrbInterface"
] | import com.nortel.appcore.app.drac.server.nrb.NrbInterface; | import com.nortel.appcore.app.drac.server.nrb.*; | [
"com.nortel.appcore"
] | com.nortel.appcore; | 566,447 |
@POST
@Path("submitflat")
@Produces("application/json")
JobIdData submitFlat(@HeaderParam("sessionid") String sessionId,
@FormParam("commandFileContent") String commandFileContent, @FormParam("jobName") String jobName,
@FormParam("selectionScriptContent") String selectionScriptCo... | @Path(STR) @Produces(STR) JobIdData submitFlat(@HeaderParam(STR) String sessionId, @FormParam(STR) String commandFileContent, @FormParam(STR) String jobName, @FormParam(STR) String selectionScriptContent, @FormParam(STR) String selectionScriptExtension) throws NotConnectedRestException, IOException, JobCreationRestExce... | /**
* Submit job using flat command file
*
* @param sessionId
* valid session id
* @param commandFileContent
* content of a command file: line separated native commands
* @param jobName
* name of the job to create
* @param selectionScriptCon... | Submit job using flat command file | submitFlat | {
"repo_name": "zeineb/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java",
"license": "agpl-3.0",
"size": 79398
} | [
"java.io.IOException",
"javax.ws.rs.FormParam",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.ow2.proactive_grid_cloud_portal.scheduler.dto.JobIdData",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.JobCreationRestException",
"org.ow2.proactive_grid_cloud_portal... | import java.io.IOException; import javax.ws.rs.FormParam; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.JobIdData; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.JobCreationRestException; import org.ow2.proa... | import java.io.*; import javax.ws.rs.*; import org.ow2.proactive_grid_cloud_portal.scheduler.dto.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*; | [
"java.io",
"javax.ws",
"org.ow2.proactive_grid_cloud_portal"
] | java.io; javax.ws; org.ow2.proactive_grid_cloud_portal; | 1,736,530 |
@Test
public void testWALCoprocessorLoaded() throws Exception {
// test to see whether the coprocessor is loaded or not.
FSHLog log = null;
try {
log = new FSHLog(fs, FSUtils.getRootDir(conf), dir.toString(),
HConstants.HREGION_OLDLOGDIR_NAME, conf, null, true, null, null);
WALCopr... | void function() throws Exception { FSHLog log = null; try { log = new FSHLog(fs, FSUtils.getRootDir(conf), dir.toString(), HConstants.HREGION_OLDLOGDIR_NAME, conf, null, true, null, null); WALCoprocessorHost host = log.getCoprocessorHost(); Coprocessor c = host.findCoprocessor(SampleRegionWALObserver.class.getName()); ... | /**
* A loaded WAL coprocessor won't break existing WAL test cases.
*/ | A loaded WAL coprocessor won't break existing WAL test cases | testWALCoprocessorLoaded | {
"repo_name": "amyvmiwei/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java",
"license": "apache-2.0",
"size": 19763
} | [
"org.apache.hadoop.hbase.Coprocessor",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver",
"org.apache.hadoop.hbase.util.FSUtils",
"org.junit.Assert"
] | import org.apache.hadoop.hbase.Coprocessor; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.coprocessor.SampleRegionWALObserver; import org.apache.hadoop.hbase.util.FSUtils; import org.junit.Assert; | import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 374,159 |
public void testCloning() {
StandardPieToolTipGenerator g1 = new StandardPieToolTipGenerator();
StandardPieToolTipGenerator g2 = null;
try {
g2 = (StandardPieToolTipGenerator) g1.clone();
}
catch (CloneNotSupportedException e) {
e.printStackTrace();
... | void function() { StandardPieToolTipGenerator g1 = new StandardPieToolTipGenerator(); StandardPieToolTipGenerator g2 = null; try { g2 = (StandardPieToolTipGenerator) g1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } assertTrue(g1 != g2); assertTrue(g1.getClass() == g2.getClass()); assertTrue(g... | /**
* Some checks for cloning.
*/ | Some checks for cloning | testCloning | {
"repo_name": "JSansalone/JFreeChart",
"path": "tests/org/jfree/chart/labels/junit/StandardPieToolTipGeneratorTests.java",
"license": "lgpl-2.1",
"size": 6836
} | [
"org.jfree.chart.labels.StandardPieToolTipGenerator"
] | import org.jfree.chart.labels.StandardPieToolTipGenerator; | import org.jfree.chart.labels.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 142,644 |
public static void setButtonCallback(final PointerButtonCallback cb) {
Assert.assertNotNull(cb);
JWLC.nativeHandler()
.wlc_set_pointer_button_cb(new pointer_button_callback() { | static void function(final PointerButtonCallback cb) { Assert.assertNotNull(cb); JWLC.nativeHandler() .wlc_set_pointer_button_cb(new pointer_button_callback() { | /**
* Sets the callback for pointer button click
*
* @param cb
*/ | Sets the callback for pointer button click | setButtonCallback | {
"repo_name": "Enerccio/jwlc",
"path": "src/main/java/cz/upol/inf/vanusanik/jwlc/Mouse.java",
"license": "mit",
"size": 4930
} | [
"cz.upol.inf.vanusanik.jwlc.wlc.callbacks.PointerButtonCallback"
] | import cz.upol.inf.vanusanik.jwlc.wlc.callbacks.PointerButtonCallback; | import cz.upol.inf.vanusanik.jwlc.wlc.callbacks.*; | [
"cz.upol.inf"
] | cz.upol.inf; | 1,204,304 |
@Name("nlopt_get_maxtime")
public static double nloptGetMaxtime(NloptLibrary.NloptOpt opt) {
return nloptGetMaxtime(Pointer.getPeer(opt));
} | @Name(STR) static double function(NloptLibrary.NloptOpt opt) { return nloptGetMaxtime(Pointer.getPeer(opt)); } | /**
* Original signature :
* <code>double nlopt_get_maxtime(const nlopt_opt)</code><br>
* <i>native declaration : line 273</i>
*/ | Original signature : <code>double nlopt_get_maxtime(const nlopt_opt)</code> native declaration : line 273 | nloptGetMaxtime | {
"repo_name": "epsilony/tb",
"path": "src/main/java/net/epsilony/tb/nlopt/NloptLibrary.java",
"license": "gpl-3.0",
"size": 47964
} | [
"org.bridj.Pointer",
"org.bridj.ann.Name"
] | import org.bridj.Pointer; import org.bridj.ann.Name; | import org.bridj.*; import org.bridj.ann.*; | [
"org.bridj",
"org.bridj.ann"
] | org.bridj; org.bridj.ann; | 1,717,571 |
public PrimitiveValue constVal()
{
if (presence() != CONSTANT)
{
throw new IllegalStateException("type is not of constant presence");
}
return constValue;
} | PrimitiveValue function() { if (presence() != CONSTANT) { throw new IllegalStateException(STR); } return constValue; } | /**
* The constant value of the type if specified
*
* @return value of the constant for this type
*/ | The constant value of the type if specified | constVal | {
"repo_name": "marksantos/simple-binary-encoding",
"path": "sbe-tool/src/main/java/uk/co/real_logic/sbe/xml/EncodedDataType.java",
"license": "apache-2.0",
"size": 12133
} | [
"uk.co.real_logic.sbe.PrimitiveValue"
] | import uk.co.real_logic.sbe.PrimitiveValue; | import uk.co.real_logic.sbe.*; | [
"uk.co.real_logic"
] | uk.co.real_logic; | 1,545,565 |
int updateByPrimaryKeySelective(Milestone record); | int updateByPrimaryKeySelective(Milestone record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table m_prj_milestone
*
* @mbggenerated Tue Sep 08 09:15:22 ICT 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table m_prj_milestone | updateByPrimaryKeySelective | {
"repo_name": "onlylin/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/project/dao/MilestoneMapper.java",
"license": "agpl-3.0",
"size": 5589
} | [
"com.esofthead.mycollab.module.project.domain.Milestone"
] | import com.esofthead.mycollab.module.project.domain.Milestone; | import com.esofthead.mycollab.module.project.domain.*; | [
"com.esofthead.mycollab"
] | com.esofthead.mycollab; | 322,269 |
public Set listIpRanges(User loggedInUser, String ksLabel) {
if (!loggedInUser.hasRole(RoleFactory.CONFIG_ADMIN)) {
throw new PermissionCheckFailureException();
}
KickstartData ksdata = lookupKsData(ksLabel, loggedInUser.getOrg());
return ksdata.getIps();
} | Set function(User loggedInUser, String ksLabel) { if (!loggedInUser.hasRole(RoleFactory.CONFIG_ADMIN)) { throw new PermissionCheckFailureException(); } KickstartData ksdata = lookupKsData(ksLabel, loggedInUser.getOrg()); return ksdata.getIps(); } | /**
* Lists all ip ranges for a kickstart profile.
* @param loggedInUser The current user
* @param ksLabel the label of the kickstart
* @return List of KickstartIpRange objects
*
* @xmlrpc.doc List all ip ranges for a kickstart profile.
* @xmlrpc.param #session_key()
* @xmlrpc.param #par... | Lists all ip ranges for a kickstart profile | listIpRanges | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java",
"license": "gpl-2.0",
"size": 65686
} | [
"com.redhat.rhn.domain.kickstart.KickstartData",
"com.redhat.rhn.domain.role.RoleFactory",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException",
"java.util.Set"
] | import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException; import java.util.Set; | import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.domain.role.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 2,355,779 |
if (throwable == null) {
throw new NullPointerException("Throwable is null");
}
List<Throwable> causes = new ArrayList<Throwable>();
causes.add(throwable);
Throwable cause = throwable.getCause();
while ((cause != null) && (!causes.contains(cause))) {
causes.add(cause);
cause = cause.getCau... | if (throwable == null) { throw new NullPointerException(STR); } List<Throwable> causes = new ArrayList<Throwable>(); causes.add(throwable); Throwable cause = throwable.getCause(); while ((cause != null) && (!causes.contains(cause))) { causes.add(cause); cause = cause.getCause(); } return causes; } | /**
* Returns the Throwable's cause chain as a list. The first entry is the Throwable followed by the cause chain.
* @param throwable The Throwable
* @return The Throwable and its cause chain
*/ | Returns the Throwable's cause chain as a list. The first entry is the Throwable followed by the cause chain | getCausalChain | {
"repo_name": "stackify/stackify-api-java",
"path": "src/main/java/com/stackify/api/common/lang/Throwables.java",
"license": "apache-2.0",
"size": 6166
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,641,668 |
@WebMethod(operationName = "GetGeoIPContext")
@WebResult(name = "GeoIP", targetNamespace = "http://www.webservicex.net/", partName = "Body")
public GeoIP getGeoIPContext(); | @WebMethod(operationName = STR) @WebResult(name = "GeoIP", targetNamespace = "http: GeoIP function(); | /**
* GeoIPService - GetGeoIPContext enables you to easily look up countries by Context
*/ | GeoIPService - GetGeoIPContext enables you to easily look up countries by Context | getGeoIPContext | {
"repo_name": "litkowiecdamian/java_course",
"path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceHttpPost.java",
"license": "apache-2.0",
"size": 1271
} | [
"javax.jws.WebMethod",
"javax.jws.WebResult"
] | import javax.jws.WebMethod; import javax.jws.WebResult; | import javax.jws.*; | [
"javax.jws"
] | javax.jws; | 1,488,255 |
protected final void updateBorderText(final String text) {
Preconditions.checkNotNull(text, "IE01842: Text argument can not be null");
m_titledBorder.setTitle(text);
updateUI();
} | final void function(final String text) { Preconditions.checkNotNull(text, STR); m_titledBorder.setTitle(text); updateUI(); } | /**
* Updates the border text of the component.
*
* @param text The new border text.
*/ | Updates the border text of the component | updateBorderText | {
"repo_name": "mayl8822/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Gui/FilterPanel/CTablePanel.java",
"license": "apache-2.0",
"size": 5990
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,196,929 |
public static final SecretKeyFactory getSecretKeyFactory(String algName)
throws NoSuchAlgorithmException {
return (SecretKeyFactory) getInstance(secretKeyFactories, algName);
} | static final SecretKeyFactory function(String algName) throws NoSuchAlgorithmException { return (SecretKeyFactory) getInstance(secretKeyFactories, algName); } | /**
* Return an instance of the specified secret key factory.
*
* @param algName
* the name of the secret key factory
* @return a new {@link SecretKeyFactory} object implementing the chosen
* algorithm
* @throws NoSuchAlgorithmException
* if the secret key factory cannot ... | Return an instance of the specified secret key factory | getSecretKeyFactory | {
"repo_name": "besom/bbossgroups-mvn",
"path": "bboss_security/src/main/java/de/flexiprovider/api/Registry.java",
"license": "apache-2.0",
"size": 26066
} | [
"de.flexiprovider.api.exceptions.NoSuchAlgorithmException",
"de.flexiprovider.api.keys.SecretKeyFactory"
] | import de.flexiprovider.api.exceptions.NoSuchAlgorithmException; import de.flexiprovider.api.keys.SecretKeyFactory; | import de.flexiprovider.api.exceptions.*; import de.flexiprovider.api.keys.*; | [
"de.flexiprovider.api"
] | de.flexiprovider.api; | 1,300,394 |
public void register(Object subscriber) {
Class<?> subscriberClass = subscriber.getClass();
List<SubscriberMethod> subscriberMethods = subscriberMethodFinder.findSubscriberMethods(subscriberClass);
synchronized (this) {
for (SubscriberMethod subscriberMethod : subscriberMethods) ... | void function(Object subscriber) { Class<?> subscriberClass = subscriber.getClass(); List<SubscriberMethod> subscriberMethods = subscriberMethodFinder.findSubscriberMethods(subscriberClass); synchronized (this) { for (SubscriberMethod subscriberMethod : subscriberMethods) { subscribe(subscriber, subscriberMethod); } } ... | /**
* Registers the given subscriber to receive events. Subscribers must call {@link #unregister(Object)} once they
* are no longer interested in receiving events.
* <p/>
* Subscribers have event handling methods that must be annotated by {@link Subscribe}.
* The {@link Subscribe} annotation al... | Registers the given subscriber to receive events. Subscribers must call <code>#unregister(Object)</code> once they are no longer interested in receiving events. Subscribers have event handling methods that must be annotated by <code>Subscribe</code>. The <code>Subscribe</code> annotation also allows configuration like ... | register | {
"repo_name": "openstreetview/android",
"path": "eventbus/src/main/java/org/greenrobot/eventbus/EventBus.java",
"license": "lgpl-3.0",
"size": 23186
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 494,057 |
@Override
public Object getValueAt(final int row, final int col) {
final List<String> r = data.get(row);
return r.get(col);
} | Object function(final int row, final int col) { final List<String> r = data.get(row); return r.get(col); } | /**
* Gets the valueAt attribute of the MyTableModel object
*
* @param row
* Description of the Parameter
* @param col
* Description of the Parameter
* @return The valueAt value
*/ | Gets the valueAt attribute of the MyTableModel object | getValueAt | {
"repo_name": "wilx/i613",
"path": "src/main/java/wilx/TeorieInformace.java",
"license": "bsd-2-clause",
"size": 16861
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 472,062 |
public synchronized void dispatch(ActionRequest request, ActionResponse response) throws ServletException, IOException, NotFoundException {
String pathInfo = request.getPathInfo();
int secondSlashIndex = pathInfo.indexOf("/", 1);
String actionPath = secondSlashIndex == -1 ? pathInfo : pathI... | synchronized void function(ActionRequest request, ActionResponse response) throws ServletException, IOException, NotFoundException { String pathInfo = request.getPathInfo(); int secondSlashIndex = pathInfo.indexOf("/", 1); String actionPath = secondSlashIndex == -1 ? pathInfo : pathInfo.substring(0, secondSlashIndex); ... | /**
* Dispatches a request to an action.
*
* @param request HTTP request.
* @param response HTTP response.
* @throws ServletException if the HTTP request cannot be handled.
* @throws IOException if an input or output error occurs while the servlet is handling the HTTP request.
* @thro... | Dispatches a request to an action | dispatch | {
"repo_name": "agapsys/action-dispatcher",
"path": "src/main/java/com/agapsys/rcf/ActionDispatcher.java",
"license": "apache-2.0",
"size": 8194
} | [
"com.agapsys.rcf.exceptions.NotFoundException",
"java.io.IOException",
"java.util.Map",
"javax.servlet.ServletException"
] | import com.agapsys.rcf.exceptions.NotFoundException; import java.io.IOException; import java.util.Map; import javax.servlet.ServletException; | import com.agapsys.rcf.exceptions.*; import java.io.*; import java.util.*; import javax.servlet.*; | [
"com.agapsys.rcf",
"java.io",
"java.util",
"javax.servlet"
] | com.agapsys.rcf; java.io; java.util; javax.servlet; | 2,581,251 |
private Iterable<? extends JSType> getTypeAlternatives(JSType type) {
if (type.isUnionType()) {
return type.getUnionMembers();
} else {
ObjectType objType = type.toMaybeObjectType();
FunctionType constructor = objType != null ? objType.getConstructor() : null;
if (constructor != null &... | Iterable<? extends JSType> function(JSType type) { if (type.isUnionType()) { return type.getUnionMembers(); } else { ObjectType objType = type.toMaybeObjectType(); FunctionType constructor = objType != null ? objType.getConstructor() : null; if (constructor != null && constructor.isInterface()) { List<JSType> list = ne... | /**
* Returns the alternatives if this is a type that represents multiple
* types, and null if not. Union and interface types can correspond to
* multiple other types.
*/ | Returns the alternatives if this is a type that represents multiple types, and null if not. Union and interface types can correspond to multiple other types | getTypeAlternatives | {
"repo_name": "tdelmas/closure-compiler",
"path": "src/com/google/javascript/jscomp/DisambiguateProperties.java",
"license": "apache-2.0",
"size": 34874
} | [
"com.google.javascript.rhino.jstype.FunctionType",
"com.google.javascript.rhino.jstype.JSType",
"com.google.javascript.rhino.jstype.ObjectType",
"java.util.ArrayList",
"java.util.List"
] | import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.JSType; import com.google.javascript.rhino.jstype.ObjectType; import java.util.ArrayList; import java.util.List; | import com.google.javascript.rhino.jstype.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 1,799,898 |
public void stopMonitorComm() {
WSServerManager.getInstance().stopAllServices();
}
/**
* Service to update the monitor database with the latest schedule request.
* The data from core schema will be inserted in PROCESS_REQUEST_SCHEDULE table
* of monitor schema.
*
* @param requestSchedule... | void function() { WSServerManager.getInstance().stopAllServices(); } /** * Service to update the monitor database with the latest schedule request. * The data from core schema will be inserted in PROCESS_REQUEST_SCHEDULE table * of monitor schema. * * @param requestScheduleVO * The reference of {@link CReqProcessReques... | /**
* Service to stop MONITOR-COMM services.
*/ | Service to stop MONITOR-COMM services | stopMonitorComm | {
"repo_name": "MastekLtd/JBEAM",
"path": "jbeam-core-components/jbeam-monitor-comm/src/main/java/com/stgmastek/monitor/comm/server/services/MonitorCommServicesImpl.java",
"license": "lgpl-3.0",
"size": 9723
} | [
"com.stgmastek.core.comm.client.CReqProcessRequestScheduleVO",
"com.stgmastek.monitor.comm.server.util.WSServerManager"
] | import com.stgmastek.core.comm.client.CReqProcessRequestScheduleVO; import com.stgmastek.monitor.comm.server.util.WSServerManager; | import com.stgmastek.core.comm.client.*; import com.stgmastek.monitor.comm.server.util.*; | [
"com.stgmastek.core",
"com.stgmastek.monitor"
] | com.stgmastek.core; com.stgmastek.monitor; | 1,493,139 |
public TextConstruct getRights(); | TextConstruct function(); | /**
* Gets the rights associated with this entry or feed. Forwards to
* {@link BaseEntry#getRights()} or {@link Source#getRights()}.
*
* @return the rights of the data item.
*/ | Gets the rights associated with this entry or feed. Forwards to <code>BaseEntry#getRights()</code> or <code>Source#getRights()</code> | getRights | {
"repo_name": "vanta/gdata-java-client",
"path": "java/src/com/google/gdata/data/photos/AtomData.java",
"license": "apache-2.0",
"size": 4847
} | [
"com.google.gdata.data.TextConstruct"
] | import com.google.gdata.data.TextConstruct; | import com.google.gdata.data.*; | [
"com.google.gdata"
] | com.google.gdata; | 1,324,822 |
public Date getEndDate() {
return endDate;
} | Date function() { return endDate; } | /**
* Gets the end date/time object for the transformation.
*
* @return Returns the endDate.
*/ | Gets the end date/time object for the transformation | getEndDate | {
"repo_name": "denisprotopopov/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 196543
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 652,619 |
public Read<T> withHosts(List<String> hosts) {
checkArgument(hosts != null, "CassandraIO.read().withHosts(hosts) called with null hosts");
checkArgument(!hosts.isEmpty(), "CassandraIO.read().withHosts(hosts) called with empty "
+ "hosts list");
return builder().setHosts(hosts).build();
... | Read<T> function(List<String> hosts) { checkArgument(hosts != null, STR); checkArgument(!hosts.isEmpty(), STR + STR); return builder().setHosts(hosts).build(); } | /**
* Specify the hosts of the Apache Cassandra instances.
*/ | Specify the hosts of the Apache Cassandra instances | withHosts | {
"repo_name": "eljefe6a/incubator-beam",
"path": "sdks/java/io/cassandra/src/main/java/org/apache/beam/sdk/io/cassandra/CassandraIO.java",
"license": "apache-2.0",
"size": 18941
} | [
"com.google.common.base.Preconditions",
"java.util.List"
] | import com.google.common.base.Preconditions; import java.util.List; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 218,493 |
private void initStaticResourcesProductionFilter(ServletContext servletContext, EnumSet<DispatcherType> disps) {
log.debug("Registering static resources production Filter");
FilterRegistration.Dynamic resourcesFilter = servletContext
.addFilter("staticResourcesProductionFilter", new StaticResourcesPr... | void function(ServletContext servletContext, EnumSet<DispatcherType> disps) { log.debug(STR); FilterRegistration.Dynamic resourcesFilter = servletContext .addFilter(STR, new StaticResourcesProductionFilter()); resourcesFilter.addMappingForUrlPatterns(disps, true, STR); resourcesFilter.addMappingForUrlPatterns(disps, tr... | /**
* Initializes the static resources production Filter.
*/ | Initializes the static resources production Filter | initStaticResourcesProductionFilter | {
"repo_name": "meek0/agate",
"path": "agate-webapp/src/main/java/org/obiba/agate/config/WebConfiguration.java",
"license": "gpl-3.0",
"size": 11137
} | [
"java.util.EnumSet",
"javax.servlet.DispatcherType",
"javax.servlet.FilterRegistration",
"javax.servlet.ServletContext",
"org.obiba.agate.web.filter.StaticResourcesProductionFilter"
] | import java.util.EnumSet; import javax.servlet.DispatcherType; import javax.servlet.FilterRegistration; import javax.servlet.ServletContext; import org.obiba.agate.web.filter.StaticResourcesProductionFilter; | import java.util.*; import javax.servlet.*; import org.obiba.agate.web.filter.*; | [
"java.util",
"javax.servlet",
"org.obiba.agate"
] | java.util; javax.servlet; org.obiba.agate; | 1,299,579 |
public void excludeSpecialFolders(LocalSearch search) {
excludeSpecialFolder(search, getTrashFolderName());
excludeSpecialFolder(search, getDraftsFolderName());
excludeSpecialFolder(search, getSpamFolderName());
excludeSpecialFolder(search, getOutboxFolderName());
excludeSpec... | void function(LocalSearch search) { excludeSpecialFolder(search, getTrashFolderName()); excludeSpecialFolder(search, getDraftsFolderName()); excludeSpecialFolder(search, getSpamFolderName()); excludeSpecialFolder(search, getOutboxFolderName()); excludeSpecialFolder(search, getSentFolderName()); excludeSpecialFolder(sea... | /**
* Modify the supplied {@link LocalSearch} instance to exclude special folders.
*
* <p>
* Currently the following folders are excluded:
* <ul>
* <li>Trash</li>
* <li>Drafts</li>
* <li>Spam</li>
* <li>Outbox</li>
* <li>Sent</li>
* </ul>
* The Inbox... | Modify the supplied <code>LocalSearch</code> instance to exclude special folders. Currently the following folders are excluded: Trash Drafts Spam Outbox Sent The Inbox will always be included even if one of the special folders is configured to point to the Inbox. | excludeSpecialFolders | {
"repo_name": "439teamwork/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/Account.java",
"license": "bsd-3-clause",
"size": 70930
} | [
"com.fsck.k9.search.LocalSearch",
"com.fsck.k9.search.SearchSpecification"
] | import com.fsck.k9.search.LocalSearch; import com.fsck.k9.search.SearchSpecification; | import com.fsck.k9.search.*; | [
"com.fsck.k9"
] | com.fsck.k9; | 572,178 |
String setFlag(RequestContext requestContext, Credential credential);
| String setFlag(RequestContext requestContext, Credential credential); | /**(
* Set the flowscope Flag to contain the interrupt requested in the param
*/ | ( Set the flowscope Flag to contain the interrupt requested in the param | setFlag | {
"repo_name": "ConnCollege/cas-5",
"path": "src/main/java/edu/conncoll/cas/interrupts/web/flow/ConncollInterruptsRepository.java",
"license": "apache-2.0",
"size": 2278
} | [
"org.apereo.cas.authentication.Credential",
"org.springframework.webflow.execution.RequestContext"
] | import org.apereo.cas.authentication.Credential; import org.springframework.webflow.execution.RequestContext; | import org.apereo.cas.authentication.*; import org.springframework.webflow.execution.*; | [
"org.apereo.cas",
"org.springframework.webflow"
] | org.apereo.cas; org.springframework.webflow; | 2,662,359 |
private Export export;
@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY )
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
@Basic( optional = true )
@JoinColumn(name = "export_id", nullable = true )
public Export getExport() {
r... | Export export; @ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY ) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE}) @Basic( optional = true ) @JoinColumn(name = STR, nullable = true ) public Export function() { return this.export; } | /**
* Return the value associated with the column: export.
* @return A Export object (this.export)
*/ | Return the value associated with the column: export | getExport | {
"repo_name": "servinglynk/hmis-lynk-open-source",
"path": "hmis-model-v2014/src/main/java/com/servinglynk/hmis/warehouse/model/v2014/Medicalassistance.java",
"license": "mpl-2.0",
"size": 12580
} | [
"javax.persistence.Basic",
"javax.persistence.CascadeType",
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne"
] | import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,467,826 |
public GeoBoundingBoxQueryBuilder setCorners(String topLeft, String bottomRight) {
return setCorners(GeoPoint.fromGeohash(topLeft), GeoPoint.fromGeohash(bottomRight));
} | GeoBoundingBoxQueryBuilder function(String topLeft, String bottomRight) { return setCorners(GeoPoint.fromGeohash(topLeft), GeoPoint.fromGeohash(bottomRight)); } | /**
* Adds points.
* @param topLeft topLeft point to add as geohash.
* @param bottomRight bottomRight point to add as geohash.
* */ | Adds points | setCorners | {
"repo_name": "nknize/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/query/GeoBoundingBoxQueryBuilder.java",
"license": "apache-2.0",
"size": 18292
} | [
"org.elasticsearch.common.geo.GeoPoint"
] | import org.elasticsearch.common.geo.GeoPoint; | import org.elasticsearch.common.geo.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,466,423 |
private void initModulesArgs(Map<String, String> resultBundlePathMapping, List<String> args,
List<JoinableResourceBundle> bundles, Map<String, JoinableResourceBundle> bundleMap, String modules,
List<String> depModulesArgs, List<String> globalBundleDependencies) {
// Define Jawr root module
// The JAWR_ROO... | void function(Map<String, String> resultBundlePathMapping, List<String> args, List<JoinableResourceBundle> bundles, Map<String, JoinableResourceBundle> bundleMap, String modules, List<String> depModulesArgs, List<String> globalBundleDependencies) { args.add(JS_ARG); args.add(JAWR_ROOT_MODULE_JS); args.add(MODULE_ARG); ... | /**
* Initialize the modules arguments
*
* @param resultBundlePathMapping
* the map for the result bundle path
* @param args
* the arguments
* @param bundles
* the list of bundles
* @param bundleMap
* the bundle map
* @param modules
* the m... | Initialize the modules arguments | initModulesArgs | {
"repo_name": "davidwebster48/jawr-main-repo",
"path": "jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/global/postprocessor/google/closure/ClosureGlobalPostProcessor.java",
"license": "apache-2.0",
"size": 26492
} | [
"java.util.Arrays",
"java.util.List",
"java.util.Map",
"net.jawr.web.exception.BundlingProcessException",
"net.jawr.web.resource.bundle.JoinableResourceBundle",
"net.jawr.web.util.StringUtils"
] | import java.util.Arrays; import java.util.List; import java.util.Map; import net.jawr.web.exception.BundlingProcessException; import net.jawr.web.resource.bundle.JoinableResourceBundle; import net.jawr.web.util.StringUtils; | import java.util.*; import net.jawr.web.exception.*; import net.jawr.web.resource.bundle.*; import net.jawr.web.util.*; | [
"java.util",
"net.jawr.web"
] | java.util; net.jawr.web; | 2,000,347 |
public TurnBasedMatch getTurnBasedMatch() {
if (!mGoogleApiClient.isConnected()) {
Log.w(TAG,
"Warning: getTurnBasedMatch() should only be called when signed in, "
+ "that is, after getting onSignInSuceeded()");
}
return mTurnBasedMatch;
} | TurnBasedMatch function() { if (!mGoogleApiClient.isConnected()) { Log.w(TAG, STR + STR); } return mTurnBasedMatch; } | /**
* Returns the tbmp match received through an invitation notification. This
* should be called from your GameHelperListener's
*
* @link{GameHelperListener#onSignInSucceeded method, to check if there's a
* match available.
* @return The match, or null if n... | Returns the tbmp match received through an invitation notification. This should be called from your GameHelperListener's | getTurnBasedMatch | {
"repo_name": "alcacoop/it.alcacoop.backgammon",
"path": "android/src/it/alcacoop/backgammon/gservice/GServiceGameHelper.java",
"license": "gpl-3.0",
"size": 36691
} | [
"android.util.Log",
"com.google.android.gms.games.multiplayer.turnbased.TurnBasedMatch"
] | import android.util.Log; import com.google.android.gms.games.multiplayer.turnbased.TurnBasedMatch; | import android.util.*; import com.google.android.gms.games.multiplayer.turnbased.*; | [
"android.util",
"com.google.android"
] | android.util; com.google.android; | 159,600 |
public void refresh() {
Vector vec = cache.getKeysInCache();
int s = vec.size();
Vector cld = new Vector();
for(int iter = 0 ; iter < s ; iter++) {
Object key = vec.elementAt(iter);
Object val = cache.get(key);
if(val != null && val instanceof Clou... | void function() { Vector vec = cache.getKeysInCache(); int s = vec.size(); Vector cld = new Vector(); for(int iter = 0 ; iter < s ; iter++) { Object key = vec.elementAt(iter); Object val = cache.get(key); if(val != null && val instanceof CloudObject) { cld.addElement((CloudObject)val); } } if(cld.size() > 0) { CloudObj... | /**
* Refreshes the list from the server, this method blocks the EDT until
* completion.
*/ | Refreshes the list from the server, this method blocks the EDT until completion | refresh | {
"repo_name": "JrmyDev/CodenameOne",
"path": "CodenameOne/src/com/codename1/cloud/CloudListModel.java",
"license": "gpl-2.0",
"size": 15934
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,886,737 |
protected String getAllContent(CmsObject cms, String path) throws Exception {
// get the extension (should be .css or .js)
String ext = cms.getRequestContext().getUri().substring(cms.getRequestContext().getUri().lastIndexOf('.'));
// retrieve the actual files to process
List<CmsRes... | String function(CmsObject cms, String path) throws Exception { String ext = cms.getRequestContext().getUri().substring(cms.getRequestContext().getUri().lastIndexOf('.')); List<CmsResource> resources = resolveResource(cms, path, ext); if (resources.isEmpty()) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_WARN_N... | /**
* Returns the content of all files of the given path with the 'right' extension.<p>
*
* @param cms the cms context
* @param path the path to process, can be a folder
*
* @return the content of all files
*
* @throws Exception if something goes wrong
*/ | Returns the content of all files of the given path with the 'right' extension | getAllContent | {
"repo_name": "gallardo/alkacon-oamp",
"path": "com.alkacon.opencms.weboptimization/src/com/alkacon/opencms/weboptimization/CmsOptimizationBean.java",
"license": "gpl-3.0",
"size": 16437
} | [
"java.util.Iterator",
"java.util.List",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsResource"
] | import java.util.Iterator; import java.util.List; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; | import java.util.*; import org.opencms.file.*; | [
"java.util",
"org.opencms.file"
] | java.util; org.opencms.file; | 756,493 |
public int size() {
int size = 0;
for (List<V> value : map.values()) {
size += value.size();
}
return size;
} | int function() { int size = 0; for (List<V> value : map.values()) { size += value.size(); } return size; } | /**
* Returns the number of values in the map.
* @return the number of values
*/ | Returns the number of values in the map | size | {
"repo_name": "hongnguyenpro/ez-vcard",
"path": "src/main/java/ezvcard/util/ListMultimap.java",
"license": "bsd-2-clause",
"size": 7544
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 560,097 |
Pair<Collection<String>, Collection<JobId>> removeDeadNodes() throws HyracksException; | Pair<Collection<String>, Collection<JobId>> removeDeadNodes() throws HyracksException; | /**
* Removes all nodes that are considered "dead", i.e., which run out of heartbeats.
*
* @return all dead nodes and their impacted jobs.
* @throws HyracksException
* when any IP address given in the dead nodes is not valid
*/ | Removes all nodes that are considered "dead", i.e., which run out of heartbeats | removeDeadNodes | {
"repo_name": "waans11/incubator-asterixdb",
"path": "hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/cluster/INodeManager.java",
"license": "apache-2.0",
"size": 3692
} | [
"java.util.Collection",
"org.apache.commons.lang3.tuple.Pair",
"org.apache.hyracks.api.exceptions.HyracksException",
"org.apache.hyracks.api.job.JobId"
] | import java.util.Collection; import org.apache.commons.lang3.tuple.Pair; import org.apache.hyracks.api.exceptions.HyracksException; import org.apache.hyracks.api.job.JobId; | import java.util.*; import org.apache.commons.lang3.tuple.*; import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.api.job.*; | [
"java.util",
"org.apache.commons",
"org.apache.hyracks"
] | java.util; org.apache.commons; org.apache.hyracks; | 1,995,782 |
EAttribute getTag_Documentation(); | EAttribute getTag_Documentation(); | /**
* Returns the meta object for the attribute '{@link com.dbdesigner.model.relationaldatabase.Tag#getDocumentation <em>Documentation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Documentation</em>'.
* @see com.dbdesigner.model.relationaldatabase.... | Returns the meta object for the attribute '<code>com.dbdesigner.model.relationaldatabase.Tag#getDocumentation Documentation</code>'. | getTag_Documentation | {
"repo_name": "cadorca/rdb-designer",
"path": "com.dbdesigner.design/src/com/dbdesigner/model/relationaldatabase/RelationalDatabasePackage.java",
"license": "mit",
"size": 40573
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,208,883 |
private String getStringFromOptions(Map<Selector, Selector> options) {
StringBuilder sb = new StringBuilder("{");
Iterator<Map.Entry<Selector, Selector>> entryIt = options.entrySet().iterator();
Map.Entry<Selector, Selector> e;
while (entryIt.hasNext()) {
e = entryIt.next... | String function(Map<Selector, Selector> options) { StringBuilder sb = new StringBuilder("{"); Iterator<Map.Entry<Selector, Selector>> entryIt = options.entrySet().iterator(); Map.Entry<Selector, Selector> e; while (entryIt.hasNext()) { e = entryIt.next(); sb.append(e.getKey()).append(STR).append(e.getValue()); if (entr... | /**
* Transform the options of the attach connector to a String.
* @param options The map of options.
* @return A String.
*/ | Transform the options of the attach connector to a String | getStringFromOptions | {
"repo_name": "ccaballe/crossdata",
"path": "crossdata-core/src/main/java/com/stratio/crossdata/core/statements/AttachConnectorStatement.java",
"license": "apache-2.0",
"size": 5342
} | [
"com.stratio.crossdata.common.statements.structures.Selector",
"java.util.Iterator",
"java.util.Map"
] | import com.stratio.crossdata.common.statements.structures.Selector; import java.util.Iterator; import java.util.Map; | import com.stratio.crossdata.common.statements.structures.*; import java.util.*; | [
"com.stratio.crossdata",
"java.util"
] | com.stratio.crossdata; java.util; | 1,525,842 |
@Test()
public void testConstructor3WithEmptyLists()
throws Exception
{
Date d = new Date();
LeaveLockdownModeTask t =
new LeaveLockdownModeTask("foo", d, Collections.<String>emptyList(),
FailedDependencyAction.DISABLE,
... | @Test() void function() throws Exception { Date d = new Date(); LeaveLockdownModeTask t = new LeaveLockdownModeTask("foo", d, Collections.<String>emptyList(), FailedDependencyAction.DISABLE, Collections.<String>emptyList(), Collections.<String>emptyList()); assertNotNull(t); assertNull(t.getTaskEntry()); assertNotNull(... | /**
* Tests the third constructor with non-{@code null} but empty lists.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the third constructor with non-null but empty lists | testConstructor3WithEmptyLists | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/tasks/LeaveLockdownModeTaskTestCase.java",
"license": "gpl-2.0",
"size": 21108
} | [
"java.util.Collections",
"java.util.Date",
"org.testng.annotations.Test"
] | import java.util.Collections; import java.util.Date; import org.testng.annotations.Test; | import java.util.*; import org.testng.annotations.*; | [
"java.util",
"org.testng.annotations"
] | java.util; org.testng.annotations; | 773,546 |
public static Properties snapshot() {
Properties sysProps = (Properties)System.getProperties().clone();
Iterator<Map.Entry<Object, Object>> iter = sysProps.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = iter.next();
if (!(entry.getValue() instanc... | static Properties function() { Properties sysProps = (Properties)System.getProperties().clone(); Iterator<Map.Entry<Object, Object>> iter = sysProps.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = iter.next(); if (!(entry.getValue() instanceof String) !(entry.getKey() instanceof String)) iter.remove()... | /**
* Gets snapshot of system properties.
* Snapshot could be used for thread safe iteration over system properties.
* Non-string properties are removed before return.
*
* @return Snapshot of system properties.
*/ | Gets snapshot of system properties. Snapshot could be used for thread safe iteration over system properties. Non-string properties are removed before return | snapshot | {
"repo_name": "wmz7year/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java",
"license": "apache-2.0",
"size": 41646
} | [
"java.util.Iterator",
"java.util.Map",
"java.util.Properties"
] | import java.util.Iterator; import java.util.Map; import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,785,792 |
@Override()
public java.lang.Class getJavaClass(
) {
return org.chocolate_milk.model.types.ListDisplayModTypeType.class;
} | @Override() java.lang.Class function( ) { return org.chocolate_milk.model.types.ListDisplayModTypeType.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "galleon1/chocolate-milk",
"path": "src/org/chocolate_milk/model/types/descriptors/ListDisplayModTypeTypeDescriptor.java",
"license": "lgpl-3.0",
"size": 3470
} | [
"org.chocolate_milk.model.types.ListDisplayModTypeType"
] | import org.chocolate_milk.model.types.ListDisplayModTypeType; | import org.chocolate_milk.model.types.*; | [
"org.chocolate_milk.model"
] | org.chocolate_milk.model; | 1,509,423 |
public void validateSummaryOfCashflow(ValidationContext context) {
MessageContext messageContext = context.getMessageContext();
if (this.variableInstallmentsAllowed) {
prevalidateDueDateIsNonNull(messageContext);
prevalidateActualPaymentDateIsNonNull(messageContext);
... | void function(ValidationContext context) { MessageContext messageContext = context.getMessageContext(); if (this.variableInstallmentsAllowed) { prevalidateDueDateIsNonNull(messageContext); prevalidateActualPaymentDateIsNonNull(messageContext); prevalidateTotalIsNonNull(messageContext); prevalidateAmountPaidIsNonNull(me... | /**
* validateXXXX is invoked on transition from state
*/ | validateXXXX is invoked on transition from state | validateSummaryOfCashflow | {
"repo_name": "jpodeszwik/mifos",
"path": "userInterface/src/main/java/org/mifos/clientportfolio/loan/ui/CashFlowSummaryFormBean.java",
"license": "apache-2.0",
"size": 34618
} | [
"java.math.BigDecimal",
"java.util.ArrayList",
"java.util.List",
"org.joda.time.DateTime",
"org.joda.time.LocalDate",
"org.mifos.dto.domain.LoanCreationInstallmentDto",
"org.mifos.dto.screen.LoanInstallmentsDto",
"org.mifos.dto.screen.LoanScheduleDto",
"org.mifos.platform.validations.ErrorEntry",
... | import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.mifos.dto.domain.LoanCreationInstallmentDto; import org.mifos.dto.screen.LoanInstallmentsDto; import org.mifos.dto.screen.LoanScheduleDto; import org.mifos.platform.v... | import java.math.*; import java.util.*; import org.joda.time.*; import org.mifos.dto.domain.*; import org.mifos.dto.screen.*; import org.mifos.platform.validations.*; import org.springframework.binding.message.*; import org.springframework.binding.validation.*; | [
"java.math",
"java.util",
"org.joda.time",
"org.mifos.dto",
"org.mifos.platform",
"org.springframework.binding"
] | java.math; java.util; org.joda.time; org.mifos.dto; org.mifos.platform; org.springframework.binding; | 1,638,960 |
@Test
public void test510DrakeAssignAccountDummyMagenta() throws Exception {
final String TEST_NAME = "test510DrakeAssignAccountDummyMagenta";
displayTestTitle(TEST_NAME);
// GIVEN
Task task = createTask(TEST_NAME);
OperationResult result = task.getResult();
PrismObjec... | void function() throws Exception { final String TEST_NAME = STR; displayTestTitle(TEST_NAME); Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); PrismObject<UserType> userDrake = PrismTestUtil.parseObject(USER_DRAKE_FILE); userDrake.asObjectable().setDescription(DESCRIPTION_RUM); userDrake.as... | /**
* Conflict on quote attribute
*/ | Conflict on quote attribute | test510DrakeAssignAccountDummyMagenta | {
"repo_name": "arnost-starosta/midpoint",
"path": "model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestIteration.java",
"license": "apache-2.0",
"size": 105434
} | [
"com.evolveum.midpoint.prism.PrismObject",
"com.evolveum.midpoint.prism.delta.ChangeType",
"com.evolveum.midpoint.prism.delta.ObjectDelta",
"com.evolveum.midpoint.prism.util.PrismAsserts",
"com.evolveum.midpoint.prism.util.PrismTestUtil",
"com.evolveum.midpoint.schema.result.OperationResult",
"com.evolv... | import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.prism.delta.ChangeType; import com.evolveum.midpoint.prism.delta.ObjectDelta; import com.evolveum.midpoint.prism.util.PrismAsserts; import com.evolveum.midpoint.prism.util.PrismTestUtil; import com.evolveum.midpoint.schema.result.OperationResu... | import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; import com.evolveum.midpoint.prism.util.*; import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.task.api.*; import com.evolveum.midpoint.test.*; import com.evolveum.midpoint.test.util.*; import com.evolveum.midpoint.... | [
"com.evolveum.midpoint",
"java.util"
] | com.evolveum.midpoint; java.util; | 1,920,301 |
boolean performCommit(long numberOfMessagesSinceLastCommit, long timeSinceLastCommit, TimeUnit timeUnit); | boolean performCommit(long numberOfMessagesSinceLastCommit, long timeSinceLastCommit, TimeUnit timeUnit); | /**
* Determine if a commit of the offsets should be performed.
*
* @param numberOfMessagesSinceLastCommit the number of messages that have been received from the connector since last
* the offsets were last committed; never negative
* @param timeSinceLastCommit the time that has el... | Determine if a commit of the offsets should be performed | performCommit | {
"repo_name": "adsr/debezium",
"path": "debezium-embedded/src/main/java/io/debezium/embedded/OffsetCommitPolicy.java",
"license": "apache-2.0",
"size": 3314
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,655,650 |
private static String getString(String key, Object s1) {
return DomainEditorPlugin.INSTANCE.getString(key, new Object [] { s1 });
} | static String function(String key, Object s1) { return DomainEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); } | /**
* This looks up a string in plugin.properties, making a substitution.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This looks up a string in plugin.properties, making a substitution. | getString | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/workerguidance/presentation/WorkerguidanceEditor.java",
"license": "epl-1.0",
"size": 57557
} | [
"de.dfki.iui.basys.model.domain.order.presentation.DomainEditorPlugin"
] | import de.dfki.iui.basys.model.domain.order.presentation.DomainEditorPlugin; | import de.dfki.iui.basys.model.domain.order.presentation.*; | [
"de.dfki.iui"
] | de.dfki.iui; | 1,429,485 |
final BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(bean);
final JsonObject result = new JsonObject();
for (final PropertyDescriptor desc : wrapper.getPropertyDescriptors()) {
if (desc.getReadMethod() == null || desc.getWriteMethod() == null) {
continue... | final BeanWrapper wrapper = PropertyAccessorFactory.forBeanPropertyAccess(bean); final JsonObject result = new JsonObject(); for (final PropertyDescriptor desc : wrapper.getPropertyDescriptors()) { if (desc.getReadMethod() == null desc.getWriteMethod() == null) { continue; } try { result.add(desc.getDisplayName(), GSON... | /**
* Returns the values for all bean properties that are writable.
*
* @param bean the bean to get the properties for
* @return a map from property name to property value
*/ | Returns the values for all bean properties that are writable | getWritableProperties | {
"repo_name": "jeffgdotorg/opennms",
"path": "features/telemetry/shell/src/main/java/org/opennms/netmgt/telemetry/shell/Utils.java",
"license": "gpl-2.0",
"size": 3318
} | [
"com.google.common.base.Throwables",
"com.google.gson.JsonObject",
"java.beans.PropertyDescriptor",
"java.lang.reflect.InvocationTargetException",
"org.springframework.beans.BeanWrapper",
"org.springframework.beans.PropertyAccessorFactory"
] | import com.google.common.base.Throwables; import com.google.gson.JsonObject; import java.beans.PropertyDescriptor; import java.lang.reflect.InvocationTargetException; import org.springframework.beans.BeanWrapper; import org.springframework.beans.PropertyAccessorFactory; | import com.google.common.base.*; import com.google.gson.*; import java.beans.*; import java.lang.reflect.*; import org.springframework.beans.*; | [
"com.google.common",
"com.google.gson",
"java.beans",
"java.lang",
"org.springframework.beans"
] | com.google.common; com.google.gson; java.beans; java.lang; org.springframework.beans; | 610,563 |
@Test
public void testListStateAddAllNull() throws Exception {
AbstractKeyedStateBackend<String> keyedBackend = createKeyedBackend(StringSerializer.INSTANCE);
final ListStateDescriptor<Long> stateDescr = new ListStateDescriptor<>("my-state", Long.class);
try {
ListState<Long> state =
keyedBackend.get... | void function() throws Exception { AbstractKeyedStateBackend<String> keyedBackend = createKeyedBackend(StringSerializer.INSTANCE); final ListStateDescriptor<Long> stateDescr = new ListStateDescriptor<>(STR, Long.class); try { ListState<Long> state = keyedBackend.getPartitionedState( VoidNamespace.INSTANCE, VoidNamespac... | /**
* This test verifies that all ListState implementations are consistent in not allowing
* {@link ListState#addAll(List)} to be called with {@code null}.
*/ | This test verifies that all ListState implementations are consistent in not allowing <code>ListState#addAll(List)</code> to be called with null | testListStateAddAllNull | {
"repo_name": "sunjincheng121/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java",
"license": "apache-2.0",
"size": 158222
} | [
"org.apache.flink.api.common.state.ListState",
"org.apache.flink.api.common.state.ListStateDescriptor",
"org.apache.flink.api.common.typeutils.base.StringSerializer",
"org.junit.Assert"
] | import org.apache.flink.api.common.state.ListState; import org.apache.flink.api.common.state.ListStateDescriptor; import org.apache.flink.api.common.typeutils.base.StringSerializer; import org.junit.Assert; | import org.apache.flink.api.common.state.*; import org.apache.flink.api.common.typeutils.base.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 1,444,248 |
public static Action makePyExtraActionPseudoAction(
ActionOwner owner,
List<Artifact> sources,
NestedSet<Artifact> dependencies,
Artifact output) {
PythonInfo info =
PythonInfo.newBuilder()
.addAllSourceFile(Artifact.toExecPaths(sources))
.addAllDepFile(Art... | static Action function( ActionOwner owner, List<Artifact> sources, NestedSet<Artifact> dependencies, Artifact output) { PythonInfo info = PythonInfo.newBuilder() .addAllSourceFile(Artifact.toExecPaths(sources)) .addAllDepFile(Artifact.toExecPaths(dependencies.toList())) .build(); return new PyPseudoAction( owner, Neste... | /**
* Creates a {@link PseudoAction} that is only used for providing information to the blaze
* extra_action feature.
*/ | Creates a <code>PseudoAction</code> that is only used for providing information to the blaze extra_action feature | makePyExtraActionPseudoAction | {
"repo_name": "davidzchen/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java",
"license": "apache-2.0",
"size": 44514
} | [
"com.google.common.collect.ImmutableList",
"com.google.devtools.build.lib.actions.Action",
"com.google.devtools.build.lib.actions.ActionOwner",
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.actions.extra.ExtraActionInfo",
"com.google.devtools.build.lib.actions.extra.Pyth... | import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.ActionOwner; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.extra.ExtraActionInfo; import com.google.devtools.build.lib.a... | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.actions.extra.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.skyframe.serialization.autocodec.*; import com.google.protobuf.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"com.google.protobuf",
"java.util"
] | com.google.common; com.google.devtools; com.google.protobuf; java.util; | 1,278,245 |
public void setTimeStyle(FormatStyle timeStyle) {
this.factories.get(Type.TIME).setTimeStyle(timeStyle);
} | void function(FormatStyle timeStyle) { this.factories.get(Type.TIME).setTimeStyle(timeStyle); } | /**
* Set the default format style of {@link java.time.LocalTime} objects.
* Default is {@link java.time.format.FormatStyle#SHORT}.
*/ | Set the default format style of <code>java.time.LocalTime</code> objects. Default is <code>java.time.format.FormatStyle#SHORT</code> | setTimeStyle | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/spring/org/springframework/format/datetime/standard/DateTimeFormatterRegistrar.java",
"license": "gpl-2.0",
"size": 7962
} | [
"java.time.format.FormatStyle"
] | import java.time.format.FormatStyle; | import java.time.format.*; | [
"java.time"
] | java.time; | 608,202 |
public void newStreamingSource( String sourcename, URL url,
String identifier, boolean toLoop,
SimpleVector jPCTposition )
{
newStreamingSource( sourcename, url, identifier, toLoop, jPCTposition,
SoundSy... | void function( String sourcename, URL url, String identifier, boolean toLoop, SimpleVector jPCTposition ) { newStreamingSource( sourcename, url, identifier, toLoop, jPCTposition, SoundSystemConfig.getDefaultAttenuation() ); } | /**
* Creates a new streaming non-priority source at the specified position.
* Default values are used for attenuation.
* @param sourcename A unique identifier for this source. Two sources may not use the same sourcename.
* @param url URL handle to the sound file to stream at this source.
* @param identifier File... | Creates a new streaming non-priority source at the specified position. Default values are used for attenuation | newStreamingSource | {
"repo_name": "rekh127/Catacomb-Snatch-Reloaded",
"path": "paulscodesrc/paulscode/sound/SoundSystemJPCT.java",
"license": "mit",
"size": 154879
} | [
"com.threed.jpct.SimpleVector"
] | import com.threed.jpct.SimpleVector; | import com.threed.jpct.*; | [
"com.threed.jpct"
] | com.threed.jpct; | 2,032,484 |
protected static final void register(MetricRegistry registry, Monitorable... monitorables) {
for (Monitorable monitorable : monitorables) {
monitorable.register(registry);
}
} | static final void function(MetricRegistry registry, Monitorable... monitorables) { for (Monitorable monitorable : monitorables) { monitorable.register(registry); } } | /**
* Register the specified set of components in the specified order.
*
* @param monitorables the components to monitor
*/ | Register the specified set of components in the specified order | register | {
"repo_name": "blerer/horizondb",
"path": "src/main/java/io/horizondb/db/AbstractComponent.java",
"license": "apache-2.0",
"size": 6025
} | [
"com.codahale.metrics.MetricRegistry",
"io.horizondb.db.metrics.Monitorable"
] | import com.codahale.metrics.MetricRegistry; import io.horizondb.db.metrics.Monitorable; | import com.codahale.metrics.*; import io.horizondb.db.metrics.*; | [
"com.codahale.metrics",
"io.horizondb.db"
] | com.codahale.metrics; io.horizondb.db; | 2,893,622 |
@NonNull
public T setCacheGuid(@NonNull final String cacheGuid) {
this.cacheGuid = cacheGuid;
return (T) this;
} | T function(@NonNull final String cacheGuid) { this.cacheGuid = cacheGuid; return (T) this; } | /**
* Set {@link LogEntry} spotted cache Guid.
*
* @param cacheGuid The cache guid
*/ | Set <code>LogEntry</code> spotted cache Guid | setCacheGuid | {
"repo_name": "S-Bartfast/cgeo",
"path": "main/src/cgeo/geocaching/log/LogEntry.java",
"license": "apache-2.0",
"size": 15546
} | [
"androidx.annotation.NonNull"
] | import androidx.annotation.NonNull; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 616,064 |
LOG.info("commiting the changes");
return getSolrClient().updateXML(AnuenueCommandConstants.COMMIT_COMMAND);
} | LOG.info(STR); return getSolrClient().updateXML(AnuenueCommandConstants.COMMIT_COMMAND); } | /**
* run command.
*
* @return result of command
* @throws IOException in case of IO error
*/ | run command | runCommand | {
"repo_name": "haruyama/Anuenue",
"path": "src/java/core/org/unigram/anuenue/client/command/CommitCommand.java",
"license": "apache-2.0",
"size": 1999
} | [
"org.unigram.anuenue.client.AnuenueCommandConstants"
] | import org.unigram.anuenue.client.AnuenueCommandConstants; | import org.unigram.anuenue.client.*; | [
"org.unigram.anuenue"
] | org.unigram.anuenue; | 2,468,724 |
private static PageComposition parsePageComposition(ParsableBitArray data, int length) {
int timeoutSecs = data.readBits(8);
int version = data.readBits(4);
int state = data.readBits(2);
data.skipBits(2);
int remainingLength = length - 2;
SparseArray<PageRegion> regions = new SparseArray<>();... | static PageComposition function(ParsableBitArray data, int length) { int timeoutSecs = data.readBits(8); int version = data.readBits(4); int state = data.readBits(2); data.skipBits(2); int remainingLength = length - 2; SparseArray<PageRegion> regions = new SparseArray<>(); while (remainingLength > 0) { int regionId = d... | /**
* Parses a page composition segment, as defined by ETSI EN 300 743 7.2.2.
*/ | Parses a page composition segment, as defined by ETSI EN 300 743 7.2.2 | parsePageComposition | {
"repo_name": "CzBiX/Telegram",
"path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/text/dvb/DvbParser.java",
"license": "gpl-2.0",
"size": 37292
} | [
"android.util.SparseArray",
"com.google.android.exoplayer2.util.ParsableBitArray"
] | import android.util.SparseArray; import com.google.android.exoplayer2.util.ParsableBitArray; | import android.util.*; import com.google.android.exoplayer2.util.*; | [
"android.util",
"com.google.android"
] | android.util; com.google.android; | 2,547,851 |
protected boolean isSplitable(FileSystem fs, Path filename) {
return true;
} | boolean function(FileSystem fs, Path filename) { return true; } | /**
* Is the given filename splitable? Usually, true, but if the file is
* stream compressed, it will not be.
*
* <code>FileInputFormat</code> implementations can override this and return
* <code>false</code> to ensure that individual input files are never split-up
* so that {@link Mapper}s process e... | Is the given filename splitable? Usually, true, but if the file is stream compressed, it will not be. <code>FileInputFormat</code> implementations can override this and return <code>false</code> to ensure that individual input files are never split-up so that <code>Mapper</code>s process entire files | isSplitable | {
"repo_name": "Reidddddd/mo-hadoop2.6.0",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/FileInputFormat.java",
"license": "apache-2.0",
"size": 26289
} | [
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,209,600 |
public CelestialBody getBody() {
return body;
} | CelestialBody function() { return body; } | /** Get third body.
* @return third body
*/ | Get third body | getBody | {
"repo_name": "attatrol/Orekit",
"path": "src/main/java/org/orekit/propagation/semianalytical/dsst/forces/DSSTThirdBody.java",
"license": "apache-2.0",
"size": 75992
} | [
"org.orekit.bodies.CelestialBody"
] | import org.orekit.bodies.CelestialBody; | import org.orekit.bodies.*; | [
"org.orekit.bodies"
] | org.orekit.bodies; | 2,017,592 |
public static <T> T fromJsonString(String json, Class<T> instanceClass) throws IOException {
return objectMapper.readValue(json, instanceClass);
} | static <T> T function(String json, Class<T> instanceClass) throws IOException { return objectMapper.readValue(json, instanceClass); } | /**
* Converts a given string representation of a JSON data to instance of a class
* @param <T> The generic type to create an instance of
* @return The instance of T with the specified values in the JSON string
*/ | Converts a given string representation of a JSON data to instance of a class | fromJsonString | {
"repo_name": "CS2103JAN2017-T16-B2/main",
"path": "src/main/java/seedu/address/commons/util/JsonUtil.java",
"license": "mit",
"size": 5498
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,802,091 |
private List<Position> getStartingPositions(String category, int offset, int length)
throws BadPositionCategoryException {
List<Position> positions = fPositions.get(category);
if (positions == null)
throw new BadPositionCategoryException();
int indexStart = computeIn... | List<Position> function(String category, int offset, int length) throws BadPositionCategoryException { List<Position> positions = fPositions.get(category); if (positions == null) throw new BadPositionCategoryException(); int indexStart = computeIndexInPositionList(positions, offset, true); int indexEnd = computeIndexIn... | /**
* A list of positions in the given category with an offset inside the given region. The order of the positions is arbitrary.
*
* @param category
* the position category
* @param offset
* the offset of the region
* @param length
* the length of the regi... | A list of positions in the given category with an offset inside the given region. The order of the positions is arbitrary | getStartingPositions | {
"repo_name": "evidolob/che",
"path": "plugins/plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/jdt/text/AbstractDocument.java",
"license": "epl-1.0",
"size": 57921
} | [
"java.util.List",
"org.eclipse.che.ide.api.editor.text.BadPositionCategoryException",
"org.eclipse.che.ide.api.editor.text.Position"
] | import java.util.List; import org.eclipse.che.ide.api.editor.text.BadPositionCategoryException; import org.eclipse.che.ide.api.editor.text.Position; | import java.util.*; import org.eclipse.che.ide.api.editor.text.*; | [
"java.util",
"org.eclipse.che"
] | java.util; org.eclipse.che; | 84,239 |
public final MetaProperty<BundleManager> bundleManager() {
return _bundleManager;
} | final MetaProperty<BundleManager> function() { return _bundleManager; } | /**
* The meta-property for the {@code bundleManager} property.
* @return the meta-property, not null
*/ | The meta-property for the bundleManager property | bundleManager | {
"repo_name": "McLeodMoores/starling",
"path": "projects/web/src/main/java/com/opengamma/web/bundle/WebBundlesData.java",
"license": "apache-2.0",
"size": 18801
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,177,257 |
@Deprecated
public static void forEach(String string, CharProcedure procedure)
{
StringIterate.forEachChar(string, procedure);
} | static void function(String string, CharProcedure procedure) { StringIterate.forEachChar(string, procedure); } | /**
* For each character in the {@code string}, execute the {@link CharProcedure}.
*
* @deprecated since 7.0. Use {@link #forEachChar(String, CharProcedure)} instead.
*/ | For each character in the string, execute the <code>CharProcedure</code> | forEach | {
"repo_name": "bhav0904/eclipse-collections",
"path": "eclipse-collections/src/main/java/org/eclipse/collections/impl/utility/StringIterate.java",
"license": "bsd-3-clause",
"size": 43992
} | [
"org.eclipse.collections.api.block.procedure.primitive.CharProcedure"
] | import org.eclipse.collections.api.block.procedure.primitive.CharProcedure; | import org.eclipse.collections.api.block.procedure.primitive.*; | [
"org.eclipse.collections"
] | org.eclipse.collections; | 2,227,496 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.