method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static Set<String> getSupportedUnits() {
final Set<String> res = new TreeSet<String>();
res.add(CM);
res.add(INCH);
res.add(POINT);
res.add(MM);
res.add(MW);
return res;
} | static Set<String> function() { final Set<String> res = new TreeSet<String>(); res.add(CM); res.add(INCH); res.add(POINT); res.add(MM); res.add(MW); return res; } | /**
* Gets als supported unit types.
*
* @return List of supported unit
*/ | Gets als supported unit types | getSupportedUnits | {
"repo_name": "mbhk/barcode4j",
"path": "barcode4j-light/src/main/java/org/krysalis/barcode4j/tools/Length.java",
"license": "apache-2.0",
"size": 7330
} | [
"java.util.Set",
"java.util.TreeSet"
] | import java.util.Set; import java.util.TreeSet; | import java.util.*; | [
"java.util"
] | java.util; | 313,754 |
try {
db.execSQL(Constant.DAO_QUERY_DROP_PHARMASECTION);
db.execSQL(Constant.DAO_QUERY_DROP_PHARMAFILE);
db.execSQL(Constant.DAO_QUERY_CREATE_TABLE_PHARMASECTION);
db.execSQL(Constant.DAO_QUERY_CREATE_TABLE_PHARMAFILE);
this.populatePharmaSection(db);
... | try { db.execSQL(Constant.DAO_QUERY_DROP_PHARMASECTION); db.execSQL(Constant.DAO_QUERY_DROP_PHARMAFILE); db.execSQL(Constant.DAO_QUERY_CREATE_TABLE_PHARMASECTION); db.execSQL(Constant.DAO_QUERY_CREATE_TABLE_PHARMAFILE); this.populatePharmaSection(db); this.populatePharmaFiles(db); } catch (android.database.SQLException... | /**
* Creates a empty database on the system and rewrites it with your own
* database.
* */ | Creates a empty database on the system and rewrites it with your own database | createDataBase | {
"repo_name": "gabriel-farache/pharmInternat",
"path": "app/src/main/java/com/gabi/pharminternat/dao/DAO.java",
"license": "agpl-3.0",
"size": 11107
} | [
"android.database.SQLException",
"com.gabi.pharminternat.utils.Constant"
] | import android.database.SQLException; import com.gabi.pharminternat.utils.Constant; | import android.database.*; import com.gabi.pharminternat.utils.*; | [
"android.database",
"com.gabi.pharminternat"
] | android.database; com.gabi.pharminternat; | 738,348 |
void endBranch(List<Execution> executions); | void endBranch(List<Execution> executions); | /**
* Persists the branch that ended to the DB
*
* @param executions finished branches
*/ | Persists the branch that ended to the DB | endBranch | {
"repo_name": "orius123/slite",
"path": "engine/orchestrator/score-orchestrator-api/src/main/java/org/openscore/orchestrator/services/SplitJoinService.java",
"license": "apache-2.0",
"size": 1775
} | [
"java.util.List",
"org.openscore.facade.entities.Execution"
] | import java.util.List; import org.openscore.facade.entities.Execution; | import java.util.*; import org.openscore.facade.entities.*; | [
"java.util",
"org.openscore.facade"
] | java.util; org.openscore.facade; | 2,123,048 |
private void loadData() {
DataManager dataManager = new DataManager(this);
dataManager.fetchFilesData();
}
//----------------------------------------------------------------------------------------------
//Storage Permissions handling
//-----------------------------------------------... | void function() { DataManager dataManager = new DataManager(this); dataManager.fetchFilesData(); } | /**
* Load data from files
*/ | Load data from files | loadData | {
"repo_name": "NayaneshGupte/Android-Simple-Demos",
"path": "SDCardImageLoader/app/src/main/java/in/nrg/sampleapps/sdcardimageloader/activities/MainActivity.java",
"license": "apache-2.0",
"size": 10579
} | [
"in.nrg.sampleapps.sdcardimageloader.manager.DataManager"
] | import in.nrg.sampleapps.sdcardimageloader.manager.DataManager; | import in.nrg.sampleapps.sdcardimageloader.manager.*; | [
"in.nrg.sampleapps"
] | in.nrg.sampleapps; | 1,952,564 |
public BufferedImage createImageFromTexture(int type, boolean includeROI)
{
switch (model.getState()) {
case LOADING_IMAGE:
case DISCARDED:
return null;
}
if (!ImViewerAgent.hasOpenGLSupport()) return null;
BufferedImage img = model.getBrowser().createImageFromTexture(type);
if (img == null) re... | BufferedImage function(int type, boolean includeROI) { switch (model.getState()) { case LOADING_IMAGE: case DISCARDED: return null; } if (!ImViewerAgent.hasOpenGLSupport()) return null; BufferedImage img = model.getBrowser().createImageFromTexture(type); if (img == null) return null; if (includeROI) { createImageWithRO... | /**
* Implemented as specified by the {@link ImViewer} interface.
* @see ImViewer#createImageFromTexture(int, boolean includeROI)
*/ | Implemented as specified by the <code>ImViewer</code> interface | createImageFromTexture | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerComponent.java",
"license": "gpl-2.0",
"size": 99557
} | [
"java.awt.image.BufferedImage",
"org.openmicroscopy.shoola.agents.imviewer.ImViewerAgent"
] | import java.awt.image.BufferedImage; import org.openmicroscopy.shoola.agents.imviewer.ImViewerAgent; | import java.awt.image.*; import org.openmicroscopy.shoola.agents.imviewer.*; | [
"java.awt",
"org.openmicroscopy.shoola"
] | java.awt; org.openmicroscopy.shoola; | 1,472,595 |
void removeConnection(@NonNull Long userId, @NonNull TGConnectionType type, @NonNull TGRequestCallback<Object> callback); | void removeConnection(@NonNull Long userId, @NonNull TGConnectionType type, @NonNull TGRequestCallback<Object> callback); | /**
* Remove(cancel) connection
*
* @param userId id of user the connection is made with
* @param type type of connection
* @param callback return callback
*/ | Remove(cancel) connection | removeConnection | {
"repo_name": "tapglue/android_sdk",
"path": "v1/tapglue-android-sdk/tapglue-android-sdk/src/main/java/com/tapglue/networking/TGRequests.java",
"license": "apache-2.0",
"size": 12785
} | [
"android.support.annotation.NonNull",
"com.tapglue.model.TGConnection",
"com.tapglue.networking.requests.TGRequestCallback"
] | import android.support.annotation.NonNull; import com.tapglue.model.TGConnection; import com.tapglue.networking.requests.TGRequestCallback; | import android.support.annotation.*; import com.tapglue.model.*; import com.tapglue.networking.requests.*; | [
"android.support",
"com.tapglue.model",
"com.tapglue.networking"
] | android.support; com.tapglue.model; com.tapglue.networking; | 1,005,729 |
static String cidFromCodePath(String fullCodePath) {
int eidx = fullCodePath.lastIndexOf("/");
String subStr1 = fullCodePath.substring(0, eidx);
int sidx = subStr1.lastIndexOf("/");
return subStr1.substring(sidx+1, eidx);
}
class SdInstallArgs extends InstallArgs {
s... | static String cidFromCodePath(String fullCodePath) { int eidx = fullCodePath.lastIndexOf("/"); String subStr1 = fullCodePath.substring(0, eidx); int sidx = subStr1.lastIndexOf("/"); return subStr1.substring(sidx+1, eidx); } class SdInstallArgs extends InstallArgs { static final String RES_FILE_NAME = STR; String cid; S... | /**
* Extract the MountService "container ID" from the full code path of an
* .apk.
*/ | Extract the MountService "container ID" from the full code path of an .apk | cidFromCodePath | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/services/java/com/android/server/pm/PackageManagerService.java",
"license": "gpl-3.0",
"size": 374037
} | [
"android.content.pm.PackageManager",
"android.net.Uri",
"com.android.internal.content.PackageHelper"
] | import android.content.pm.PackageManager; import android.net.Uri; import com.android.internal.content.PackageHelper; | import android.content.pm.*; import android.net.*; import com.android.internal.content.*; | [
"android.content",
"android.net",
"com.android.internal"
] | android.content; android.net; com.android.internal; | 1,703,788 |
public XMLDocument load(InputStream inputStream) throws IOException {
return load(inputStream, null, null);
} | XMLDocument function(InputStream inputStream) throws IOException { return load(inputStream, null, null); } | /**
* Creates and returns an XMLDocument from the inputStream. The InputStream
* will be closed after reading. By default does not perform XSD validation.
* Same as load(inputStream, null, null);
*
* @param inputStream
* specifies the InputStream to read from
* @return the new XMLDocument... | Creates and returns an XMLDocument from the inputStream. The InputStream will be closed after reading. By default does not perform XSD validation. Same as load(inputStream, null, null) | load | {
"repo_name": "plasma-framework/plasma",
"path": "plasma-core/src/main/java/org/plasma/sdo/helper/PlasmaXMLHelper.java",
"license": "apache-2.0",
"size": 19229
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,811,953 |
default void createNamespace(NamespaceDescriptor descriptor) throws IOException {
get(createNamespaceAsync(descriptor), getSyncWaitTimeout(), TimeUnit.MILLISECONDS);
} | default void createNamespace(NamespaceDescriptor descriptor) throws IOException { get(createNamespaceAsync(descriptor), getSyncWaitTimeout(), TimeUnit.MILLISECONDS); } | /**
* Create a new namespace. Blocks until namespace has been successfully created or an exception is
* thrown.
* @param descriptor descriptor which describes the new namespace.
* @throws IOException if a remote or network exception occurs
*/ | Create a new namespace. Blocks until namespace has been successfully created or an exception is thrown | createNamespace | {
"repo_name": "francisliu/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 106428
} | [
"java.io.IOException",
"java.util.concurrent.TimeUnit",
"org.apache.hadoop.hbase.NamespaceDescriptor",
"org.apache.hadoop.hbase.util.FutureUtils"
] | import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.hadoop.hbase.NamespaceDescriptor; import org.apache.hadoop.hbase.util.FutureUtils; | import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,803,676 |
BlockPos getBestRestaurant(final AbstractEntityCitizen citizen); | BlockPos getBestRestaurant(final AbstractEntityCitizen citizen); | /**
* Calculate a good cook for a certain citizen.
*
* @param citizen the citizen.
* @return the Position of it.
*/ | Calculate a good cook for a certain citizen | getBestRestaurant | {
"repo_name": "Minecolonies/minecolonies",
"path": "src/api/java/com/minecolonies/api/colony/managers/interfaces/IBuildingManager.java",
"license": "gpl-3.0",
"size": 8797
} | [
"com.minecolonies.api.entity.citizen.AbstractEntityCitizen",
"net.minecraft.util.math.BlockPos"
] | import com.minecolonies.api.entity.citizen.AbstractEntityCitizen; import net.minecraft.util.math.BlockPos; | import com.minecolonies.api.entity.citizen.*; import net.minecraft.util.math.*; | [
"com.minecolonies.api",
"net.minecraft.util"
] | com.minecolonies.api; net.minecraft.util; | 2,284,943 |
public static void assetDoubleAssociativeArray(AssociativeArray expResult, AssociativeArray result) {
for (Object key : result.keySet()) {
double v1 = expResult.getDouble(key);
double v2 = result.getDouble(key);
assertEquals(v1, v2, Constants.DOUBLE_ACCURACY_HIG... | static void function(AssociativeArray expResult, AssociativeArray result) { for (Object key : result.keySet()) { double v1 = expResult.getDouble(key); double v2 = result.getDouble(key); assertEquals(v1, v2, Constants.DOUBLE_ACCURACY_HIGH); } } | /**
* Assert method for AssociativeArray data structure which stores double values.
*
* @param expResult
* @param result
*/ | Assert method for AssociativeArray data structure which stores double values | assetDoubleAssociativeArray | {
"repo_name": "datumbox/datumbox-framework",
"path": "datumbox-framework-tests/src/main/java/com/datumbox/framework/tests/utilities/TestUtils.java",
"license": "apache-2.0",
"size": 2267
} | [
"com.datumbox.framework.common.dataobjects.AssociativeArray",
"com.datumbox.framework.tests.Constants",
"org.junit.Assert"
] | import com.datumbox.framework.common.dataobjects.AssociativeArray; import com.datumbox.framework.tests.Constants; import org.junit.Assert; | import com.datumbox.framework.common.dataobjects.*; import com.datumbox.framework.tests.*; import org.junit.*; | [
"com.datumbox.framework",
"org.junit"
] | com.datumbox.framework; org.junit; | 1,876,523 |
public Collection<LifecycleListener> getContextLifecycleListeners() {
return this.contextLifecycleListeners;
} | Collection<LifecycleListener> function() { return this.contextLifecycleListeners; } | /**
* Returns a mutable collection of the {@link LifecycleListener}s that will be applied
* to the Tomcat {@link Context} .
* @return the contextLifecycleListeners the listeners that will be applied
*/ | Returns a mutable collection of the <code>LifecycleListener</code>s that will be applied to the Tomcat <code>Context</code> | getContextLifecycleListeners | {
"repo_name": "jvz/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java",
"license": "apache-2.0",
"size": 30815
} | [
"java.util.Collection",
"org.apache.catalina.LifecycleListener"
] | import java.util.Collection; import org.apache.catalina.LifecycleListener; | import java.util.*; import org.apache.catalina.*; | [
"java.util",
"org.apache.catalina"
] | java.util; org.apache.catalina; | 70,026 |
public Missile getMissile() {
return missile;
} | Missile function() { return missile; } | /**
* Get the missile that can be fired by the user
*
* @return
*/ | Get the missile that can be fired by the user | getMissile | {
"repo_name": "wjsrobertson/j2menace",
"path": "AsteroidBelt/src/com/rattat/micro/game/aster/mvc/Model.java",
"license": "apache-2.0",
"size": 7959
} | [
"com.rattat.micro.game.aster.elements.Missile"
] | import com.rattat.micro.game.aster.elements.Missile; | import com.rattat.micro.game.aster.elements.*; | [
"com.rattat.micro"
] | com.rattat.micro; | 1,485,997 |
ServiceResponse<User> save(User user,
String password,
String newPassword,
String newPasswordConfirmation); | ServiceResponse<User> save(User user, String password, String newPassword, String newPasswordConfirmation); | /**
* Save user details
* @param user
* @return ServiceResponse<User>
*/ | Save user details | save | {
"repo_name": "KonkerLabs/konker-platform",
"path": "konker.registry.services.core/src/main/java/com/konkerlabs/platform/registry/business/services/api/UserService.java",
"license": "apache-2.0",
"size": 4466
} | [
"com.konkerlabs.platform.registry.business.model.User"
] | import com.konkerlabs.platform.registry.business.model.User; | import com.konkerlabs.platform.registry.business.model.*; | [
"com.konkerlabs.platform"
] | com.konkerlabs.platform; | 1,901,823 |
public static Element createNumberElement( final String name, final Rectangle2D bounds, final Color color,
final ElementAlignment alignment, final ElementAlignment valign, final FontDefinition font,
final String nullString, final NumberFormat format, final String field ) {
final NumberFieldElementFac... | static Element function( final String name, final Rectangle2D bounds, final Color color, final ElementAlignment alignment, final ElementAlignment valign, final FontDefinition font, final String nullString, final NumberFormat format, final String field ) { final NumberFieldElementFactory factory = new NumberFieldElement... | /**
* Creates a new TextElement containing a numeric filter structure.
*
* @param name
* the name of the new element.
* @param bounds
* the bounds of the new element.
* @param color
* the text color of this text element.
* @param alignment
* the horizont... | Creates a new TextElement containing a numeric filter structure | createNumberElement | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/elementfactory/NumberFieldElementFactory.java",
"license": "lgpl-2.1",
"size": 15173
} | [
"java.awt.Color",
"java.awt.geom.Rectangle2D",
"java.text.NumberFormat",
"org.pentaho.reporting.engine.classic.core.Element",
"org.pentaho.reporting.engine.classic.core.ElementAlignment",
"org.pentaho.reporting.engine.classic.core.style.FontDefinition"
] | import java.awt.Color; import java.awt.geom.Rectangle2D; import java.text.NumberFormat; import org.pentaho.reporting.engine.classic.core.Element; import org.pentaho.reporting.engine.classic.core.ElementAlignment; import org.pentaho.reporting.engine.classic.core.style.FontDefinition; | import java.awt.*; import java.awt.geom.*; import java.text.*; import org.pentaho.reporting.engine.classic.core.*; import org.pentaho.reporting.engine.classic.core.style.*; | [
"java.awt",
"java.text",
"org.pentaho.reporting"
] | java.awt; java.text; org.pentaho.reporting; | 1,706,505 |
IHASnapshotRequest newSnapshotRequest(); | IHASnapshotRequest newSnapshotRequest(); | /**
* Return a request for a snapshot using the configured parameters for this
* {@link ISnapshotPolicy}.
*/ | Return a request for a snapshot using the configured parameters for this <code>ISnapshotPolicy</code> | newSnapshotRequest | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "bigdata-jini/src/main/java/com/bigdata/journal/jini/ha/ISnapshotPolicy.java",
"license": "gpl-2.0",
"size": 2087
} | [
"com.bigdata.ha.msg.IHASnapshotRequest"
] | import com.bigdata.ha.msg.IHASnapshotRequest; | import com.bigdata.ha.msg.*; | [
"com.bigdata.ha"
] | com.bigdata.ha; | 2,013,468 |
public SystemData systemData() {
return this.systemData;
} | SystemData function() { return this.systemData; } | /**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/ | Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information | systemData | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/videoanalyzer/azure-resourcemanager-videoanalyzer/src/main/java/com/azure/resourcemanager/videoanalyzer/fluent/models/VideoEntityInner.java",
"license": "mit",
"size": 6573
} | [
"com.azure.core.management.SystemData"
] | import com.azure.core.management.SystemData; | import com.azure.core.management.*; | [
"com.azure.core"
] | com.azure.core; | 80,896 |
@Override
public OSerializableStream fromStream(final byte[] stream) throws OSerializationException {
final ODocument record = getRecord();
((ORecordId) record.getIdentity()).fromString(new String(stream));
return this;
} | OSerializableStream function(final byte[] stream) throws OSerializationException { final ODocument record = getRecord(); ((ORecordId) record.getIdentity()).fromString(new String(stream)); return this; } | /**
* (Blueprints Extension) Fills the Element from a byte[]
*
* @param stream
* byte array representation of the object
* @throws OSerializationException
*/ | (Blueprints Extension) Fills the Element from a byte[] | fromStream | {
"repo_name": "DiceHoldingsInc/orientdb",
"path": "graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientElement.java",
"license": "apache-2.0",
"size": 18826
} | [
"com.orientechnologies.orient.core.exception.OSerializationException",
"com.orientechnologies.orient.core.id.ORecordId",
"com.orientechnologies.orient.core.record.impl.ODocument",
"com.orientechnologies.orient.core.serialization.OSerializableStream"
] | import com.orientechnologies.orient.core.exception.OSerializationException; import com.orientechnologies.orient.core.id.ORecordId; import com.orientechnologies.orient.core.record.impl.ODocument; import com.orientechnologies.orient.core.serialization.OSerializableStream; | import com.orientechnologies.orient.core.exception.*; import com.orientechnologies.orient.core.id.*; import com.orientechnologies.orient.core.record.impl.*; import com.orientechnologies.orient.core.serialization.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 1,288,700 |
synchronized Token<BlockTokenIdentifier> getBlockToken() {
return getStreamer().getBlockToken();
} | synchronized Token<BlockTokenIdentifier> getBlockToken() { return getStreamer().getBlockToken(); } | /**
* Returns the access token currently used by streamer, for testing only
*/ | Returns the access token currently used by streamer, for testing only | getBlockToken | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSOutputStream.java",
"license": "apache-2.0",
"size": 41878
} | [
"org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier",
"org.apache.hadoop.security.token.Token"
] | import org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier; import org.apache.hadoop.security.token.Token; | import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.security.token.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 32,151 |
@Override
public void deleteAMImageEntries(
long companyId, AMImageConfigurationEntry amImageConfigurationEntry) {
amImageEntryPersistence.removeByC_C(
companyId, amImageConfigurationEntry.getUUID());
imageStorage.delete(companyId, amImageConfigurationEntry.getUUID());
} | void function( long companyId, AMImageConfigurationEntry amImageConfigurationEntry) { amImageEntryPersistence.removeByC_C( companyId, amImageConfigurationEntry.getUUID()); imageStorage.delete(companyId, amImageConfigurationEntry.getUUID()); } | /**
* Deletes all the adaptive media images generated for the configuration in
* the company. This method deletes both the adaptive media image entry from
* the database and the bytes from the file store.
*
* @param companyId the primary key of the company
* @param amImageConfigurationEntry the configuratio... | Deletes all the adaptive media images generated for the configuration in the company. This method deletes both the adaptive media image entry from the database and the bytes from the file store | deleteAMImageEntries | {
"repo_name": "patriciajeanperez/com-liferay-adaptive-media",
"path": "adaptive-media-image-service/src/main/java/com/liferay/adaptive/media/image/service/impl/AMImageEntryLocalServiceImpl.java",
"license": "lgpl-3.0",
"size": 11324
} | [
"com.liferay.adaptive.media.image.configuration.AMImageConfigurationEntry"
] | import com.liferay.adaptive.media.image.configuration.AMImageConfigurationEntry; | import com.liferay.adaptive.media.image.configuration.*; | [
"com.liferay.adaptive"
] | com.liferay.adaptive; | 1,588,308 |
Set<Fact> getSources() {
return sources;
} | Set<Fact> getSources() { return sources; } | /**
* Return the set of facts that implied this.
*/ | Return the set of facts that implied this | getSources | {
"repo_name": "isper3at/incubator-rya",
"path": "extras/rya.reasoning/src/main/java/mvm/rya/reasoning/Derivation.java",
"license": "apache-2.0",
"size": 10292
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,917,745 |
public sites_thematic findBythematicId(long thematicid)
throws NoSuchsites_thematicException, SystemException {
sites_thematic sites_thematic = fetchBythematicId(thematicid);
if (sites_thematic == null) {
StringBundler msg = new StringBundler(4);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("th... | sites_thematic function(long thematicid) throws NoSuchsites_thematicException, SystemException { sites_thematic sites_thematic = fetchBythematicId(thematicid); if (sites_thematic == null) { StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append(STR); msg.append(thematicid); msg.appen... | /**
* Returns the sites_thematic where thematicid = ? or throws a {@link com.iucn.whp.dbservice.NoSuchsites_thematicException} if it could not be found.
*
* @param thematicid the thematicid
* @return the matching sites_thematic
* @throws com.iucn.whp.dbservice.NoSuchsites_thematicException if a matching s... | Returns the sites_thematic where thematicid = ? or throws a <code>com.iucn.whp.dbservice.NoSuchsites_thematicException</code> if it could not be found | findBythematicId | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/sites_thematicPersistenceImpl.java",
"license": "gpl-2.0",
"size": 57069
} | [
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.StringBundler",
"com.liferay.portal.kernel.util.StringPool"
] | import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.StringBundler; import com.liferay.portal.kernel.util.StringPool; | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,726,716 |
private void paintCurrentValues(Graphics2D g, FontMetrics fontMetrics)
{
g.setColor(fontColor);
String s = ""+model.getStartValue();
g.drawString(s, startLabelRect.x, fontMetrics.getHeight());
//g.translate(startLabelRect.x, 0);
//paintHorizontalLabel(g, fontMetrics, model.getStartValue());
//g.translat... | void function(Graphics2D g, FontMetrics fontMetrics) { g.setColor(fontColor); String s = STR"+model.getEndValue(); g.drawString(s, startLabelRect.y, fontMetrics.getHeight()); } | /**
* Paints the current values.
*
* @param g The graphics context.
* @param fontMetrics Information on how to render the font.
*/ | Paints the current values | paintCurrentValues | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/slider/TwoKnobsSliderUI.java",
"license": "gpl-2.0",
"size": 22710
} | [
"java.awt.FontMetrics",
"java.awt.Graphics2D"
] | import java.awt.FontMetrics; import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,248,971 |
public void bootStrapNodes(String nodeList) throws UnknownHostException
{
ssProxy.loadAll(nodeList);
} | void function(String nodeList) throws UnknownHostException { ssProxy.loadAll(nodeList); } | /**
* Bootstrap the listed nodes with data
* @param nodeList a colon separated list of nodes to bootstrap
*/ | Bootstrap the listed nodes with data | bootStrapNodes | {
"repo_name": "sammyyu/Cassandra",
"path": "src/java/org/apache/cassandra/tools/NodeProbe.java",
"license": "apache-2.0",
"size": 21669
} | [
"java.net.UnknownHostException"
] | import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 1,077,911 |
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setPassword(password);
return;
}
}
throw new RuntimeException("No HTTP basic a... | void function(String password) { for (Authentication auth : authentications.values()) { if (auth instanceof HttpBasicAuth) { ((HttpBasicAuth) auth).setPassword(password); return; } } throw new RuntimeException(STR); } | /**
* Helper method to set password for the first HTTP basic authentication.
*
* @param password Password
*/ | Helper method to set password for the first HTTP basic authentication | setPassword | {
"repo_name": "SDU-Software-Engineering/opn",
"path": "ws/BankingJava/src/main/java/dk/sdu/mmmi/opn/swaggerbank/ApiClient.java",
"license": "gpl-3.0",
"size": 46058
} | [
"dk.sdu.mmmi.opn.swaggerbank.auth.Authentication",
"dk.sdu.mmmi.opn.swaggerbank.auth.HttpBasicAuth"
] | import dk.sdu.mmmi.opn.swaggerbank.auth.Authentication; import dk.sdu.mmmi.opn.swaggerbank.auth.HttpBasicAuth; | import dk.sdu.mmmi.opn.swaggerbank.auth.*; | [
"dk.sdu.mmmi"
] | dk.sdu.mmmi; | 2,083,657 |
public DatabaseConfig dataFiles(File... files) {
if (files != null && files.length != 0) {
var dataFiles = new File[files.length];
for (int i=0; i<files.length; i++) {
dataFiles[i] = files[i].getAbsoluteFile();
}
files = dataFiles;
}
... | DatabaseConfig function(File... files) { if (files != null && files.length != 0) { var dataFiles = new File[files.length]; for (int i=0; i<files.length; i++) { dataFiles[i] = files[i].getAbsoluteFile(); } files = dataFiles; } mLauncher.dataFiles(files); return this; } | /**
* Stripe the database data file across several files, expected to be on
* separate devices. The data files can refer to ordinary files or to raw
* block devices.
*/ | Stripe the database data file across several files, expected to be on separate devices. The data files can refer to ordinary files or to raw block devices | dataFiles | {
"repo_name": "cojen/Tupl",
"path": "src/main/java/org/cojen/tupl/DatabaseConfig.java",
"license": "agpl-3.0",
"size": 16275
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 135,766 |
@Test
public void testDecisionServiceParametersOrder() throws Exception {
final String decisionService = "DecisionService-1";
final String expected = loadResource("decision-service-three-inputs.xml");
final String xInputHref = "#_51D20318-4883-49DC-AE68-42131A20F8B3";
final Stri... | void function() throws Exception { final String decisionService = STR; final String expected = loadResource(STR); final String xInputHref = STR; final String yInputHref = STR; final String zInputHref = STR; assertDecisionServiceParametersOrder(expected, zInputHref, xInputHref, yInputHref); setContent(expected); decisio... | /**
* This test increases KOGITO-4265 coverage
* Input parameters order should be the same as in the Properties panel so in the DMN file
*/ | This test increases KOGITO-4265 coverage Input parameters order should be the same as in the Properties panel so in the DMN file | testDecisionServiceParametersOrder | {
"repo_name": "romartin/kie-wb-common",
"path": "kie-wb-common-dmn/kie-wb-common-dmn-webapp-kogito-runtime/src/test/java/org/kie/workbench/common/dmn/showcase/client/selenium/DMNDesignerKogitoSeleniumIT.java",
"license": "apache-2.0",
"size": 128641
} | [
"java.util.List",
"org.assertj.core.api.Assertions",
"org.kie.workbench.common.dmn.showcase.client.selenium.locator.DecisionNavigatorXPathLocator",
"org.kie.workbench.common.dmn.showcase.client.selenium.locator.PropertiesPanelXPathLocator",
"org.openqa.selenium.WebElement"
] | import java.util.List; import org.assertj.core.api.Assertions; import org.kie.workbench.common.dmn.showcase.client.selenium.locator.DecisionNavigatorXPathLocator; import org.kie.workbench.common.dmn.showcase.client.selenium.locator.PropertiesPanelXPathLocator; import org.openqa.selenium.WebElement; | import java.util.*; import org.assertj.core.api.*; import org.kie.workbench.common.dmn.showcase.client.selenium.locator.*; import org.openqa.selenium.*; | [
"java.util",
"org.assertj.core",
"org.kie.workbench",
"org.openqa.selenium"
] | java.util; org.assertj.core; org.kie.workbench; org.openqa.selenium; | 1,236,516 |
static Set<Method> detectMethods(final Class<?> inputClass, final String regEx, final int patternFlag) throws CouldNotPerformException {
try {
if (inputClass == null) {
assert false;
throw new NotAvailableException("Class object is null!");
}
... | static Set<Method> detectMethods(final Class<?> inputClass, final String regEx, final int patternFlag) throws CouldNotPerformException { try { if (inputClass == null) { assert false; throw new NotAvailableException(STR); } if (regEx == null) { assert false; throw new NotAvailableException(STR); } Set<Method> methods = ... | /**
* Method detects the methods of an object class by the input regular expression.
*
* @param inputClass is the class object, which contains the method.
* @param regEx is the regular expression, which should be matched with the method name.
* @param patternFlag is the flag to configure the ma... | Method detects the methods of an object class by the input regular expression | detectMethods | {
"repo_name": "openbase/bco.ontology.lib",
"path": "src/main/java/org/openbase/bco/ontology/lib/utility/ReflectionUtility.java",
"license": "lgpl-3.0",
"size": 7819
} | [
"java.lang.reflect.Method",
"java.util.HashSet",
"java.util.Set",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"org.openbase.jul.exception.CouldNotPerformException",
"org.openbase.jul.exception.NotAvailableException"
] | import java.lang.reflect.Method; import java.util.HashSet; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.openbase.jul.exception.CouldNotPerformException; import org.openbase.jul.exception.NotAvailableException; | import java.lang.reflect.*; import java.util.*; import java.util.regex.*; import org.openbase.jul.exception.*; | [
"java.lang",
"java.util",
"org.openbase.jul"
] | java.lang; java.util; org.openbase.jul; | 1,445,251 |
new File(TEST_DIR).mkdirs(); // Make sure data directory exists
conf = new Configuration();
conf.set("raid.config.file", CONFIG_FILE);
conf.set(RaidNode.RAID_LOCATION_KEY, "/destraid");
conf.setBoolean("raid.config.reload", true);
conf.setLong("raid.config.reload.interval", RELOAD_INTERVAL);
... | new File(TEST_DIR).mkdirs(); conf = new Configuration(); conf.set(STR, CONFIG_FILE); conf.set(RaidNode.RAID_LOCATION_KEY, STR); conf.setBoolean(STR, true); conf.setLong(STR, RELOAD_INTERVAL); conf.setLong(STR, 100 * 1000L); conf.set(STR, STR); if (local) { conf.set(STR, STR); } else { conf.set(STR, STR); } conf.set(STR... | /**
* create mapreduce and dfs clusters
*/ | create mapreduce and dfs clusters | createClusters | {
"repo_name": "jchen123/hadoop-20-warehouse-fix",
"path": "src/contrib/raid/src/test/org/apache/hadoop/raid/TestRaidNode.java",
"license": "apache-2.0",
"size": 25935
} | [
"java.io.File",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.apache.hadoop.mapred.MiniMRCluster"
] | import java.io.File; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.mapred.MiniMRCluster; | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.mapred.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,708,162 |
@SuppressWarnings("GoodTime") // should accept a java.time.LocalDateTime
public static long encodePacked64DatetimeMicros(LocalDateTime dateTime) {
checkValidDateTimeMillis(dateTime);
return (encodePacked64DatetimeSeconds(dateTime) << MICRO_LENGTH)
| (dateTime.getMillisOfSecond() * 1_000L);
} | @SuppressWarnings(STR) static long function(LocalDateTime dateTime) { checkValidDateTimeMillis(dateTime); return (encodePacked64DatetimeSeconds(dateTime) << MICRO_LENGTH) (dateTime.getMillisOfSecond() * 1_000L); } | /**
* Encodes {@code dateTime} as a 8-byte integer with microseconds precision.
*
* <p>Encoding is as the following:
*
* <pre>
* 6 5 4 3 2 1
* MSB 3210987654321098765432109876543210987654321098765432109876543210 LSB
* |--- year ---||m || D |... | Encodes dateTime as a 8-byte integer with microseconds precision. Encoding is as the following: <code> 6 5 4 3 2 1 MSB 3210987654321098765432109876543210987654321098765432109876543210 LSB |--- year ---||m || D || H || M || S ||-------micros-----| </code> | encodePacked64DatetimeMicros | {
"repo_name": "googleinterns/zetasql-fuzzing",
"path": "java/com/google/zetasql/CivilTimeEncoder.java",
"license": "apache-2.0",
"size": 29373
} | [
"org.joda.time.LocalDateTime"
] | import org.joda.time.LocalDateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 228,361 |
public static void removeByassessmentId(long assessmentid)
throws com.liferay.portal.kernel.exception.SystemException {
getPersistence().removeByassessmentId(assessmentid);
} | static void function(long assessmentid) throws com.liferay.portal.kernel.exception.SystemException { getPersistence().removeByassessmentId(assessmentid); } | /**
* Removes all the assessment_lang_versions where assessmentid = ? from the database.
*
* @param assessmentid the assessmentid
* @throws SystemException if a system exception occurred
*/ | Removes all the assessment_lang_versions where assessmentid = ? from the database | removeByassessmentId | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/persistence/assessment_lang_versionUtil.java",
"license": "gpl-2.0",
"size": 37777
} | [
"com.liferay.portal.kernel.exception.SystemException"
] | import com.liferay.portal.kernel.exception.SystemException; | import com.liferay.portal.kernel.exception.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 541,733 |
public String getServiceVersion() throws InvalidResourcePropertyException, ResourcePropertyRetrievalException {
ServiceMetadata sm = getServiceMetadata();
if (sm == null) {
return VERSION_UNKNOWN;
} else {
if (sm.getServiceDescription() != null) {
if (... | String function() throws InvalidResourcePropertyException, ResourcePropertyRetrievalException { ServiceMetadata sm = getServiceMetadata(); if (sm == null) { return VERSION_UNKNOWN; } else { if (sm.getServiceDescription() != null) { if (sm.getServiceDescription().getService() != null) { if (sm.getServiceDescription().ge... | /**
* This method returns the version of the Grid Service
*
* @return The version of the grid service.
* @throws InvalidResourcePropertyException
* @throws ResourcePropertyRetrievalException
*/ | This method returns the version of the Grid Service | getServiceVersion | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/dorian/src/org/cagrid/gaards/dorian/client/DorianBaseClient.java",
"license": "bsd-3-clause",
"size": 6372
} | [
"gov.nih.nci.cagrid.metadata.ServiceMetadata",
"gov.nih.nci.cagrid.metadata.exceptions.InvalidResourcePropertyException",
"gov.nih.nci.cagrid.metadata.exceptions.ResourcePropertyRetrievalException"
] | import gov.nih.nci.cagrid.metadata.ServiceMetadata; import gov.nih.nci.cagrid.metadata.exceptions.InvalidResourcePropertyException; import gov.nih.nci.cagrid.metadata.exceptions.ResourcePropertyRetrievalException; | import gov.nih.nci.cagrid.metadata.*; import gov.nih.nci.cagrid.metadata.exceptions.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 330,445 |
public static InflationSensitivity of(final MulticurveSensitivity multicurveSensitivity) {
ArgumentChecker.notNull(multicurveSensitivity, "multicurve sensitivity");
return new InflationSensitivity(multicurveSensitivity, new HashMap<String, List<DoublesPair>>());
} | static InflationSensitivity function(final MulticurveSensitivity multicurveSensitivity) { ArgumentChecker.notNull(multicurveSensitivity, STR); return new InflationSensitivity(multicurveSensitivity, new HashMap<String, List<DoublesPair>>()); } | /**
* Constructor from a multicurveSensitivity and a sensitivityPriceCurve. The maps are used directly.
* @param multicurveSensitivity The multicurveSensitivity.
* @return The sensitivity.
*/ | Constructor from a multicurveSensitivity and a sensitivityPriceCurve. The maps are used directly | of | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/sensitivity/inflation/InflationSensitivity.java",
"license": "apache-2.0",
"size": 10231
} | [
"com.opengamma.analytics.financial.provider.sensitivity.multicurve.MulticurveSensitivity",
"com.opengamma.util.ArgumentChecker",
"com.opengamma.util.tuple.DoublesPair",
"java.util.HashMap",
"java.util.List"
] | import com.opengamma.analytics.financial.provider.sensitivity.multicurve.MulticurveSensitivity; import com.opengamma.util.ArgumentChecker; import com.opengamma.util.tuple.DoublesPair; import java.util.HashMap; import java.util.List; | import com.opengamma.analytics.financial.provider.sensitivity.multicurve.*; import com.opengamma.util.*; import com.opengamma.util.tuple.*; import java.util.*; | [
"com.opengamma.analytics",
"com.opengamma.util",
"java.util"
] | com.opengamma.analytics; com.opengamma.util; java.util; | 2,886,545 |
private void revokeToken(final OAuth20RefreshToken token) {
revokeToken(token.getId());
token.getAccessTokens().forEach(item-> {
revokeToken(item);
});
} | void function(final OAuth20RefreshToken token) { revokeToken(token.getId()); token.getAccessTokens().forEach(item-> { revokeToken(item); }); } | /**
* Revoke the provided Refresh Token and it's related Access Tokens.
*
* @param token the token
* @return the model and view
*/ | Revoke the provided Refresh Token and it's related Access Tokens | revokeToken | {
"repo_name": "leleuj/cas",
"path": "support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20RevocationEndpointController.java",
"license": "apache-2.0",
"size": 7610
} | [
"org.apereo.cas.ticket.refreshtoken.OAuth20RefreshToken"
] | import org.apereo.cas.ticket.refreshtoken.OAuth20RefreshToken; | import org.apereo.cas.ticket.refreshtoken.*; | [
"org.apereo.cas"
] | org.apereo.cas; | 2,374,458 |
public static Intent getIntent(Context context, String moduleName) {
Intent intent = new Intent(context, GeneralContentModuleActivity.class);
Bundle extras = new Bundle();
extras.putString(BUNDLE_ARGUMENT_MODULE_NAME, moduleName);
intent.putExtras(extras);
return intent;
... | static Intent function(Context context, String moduleName) { Intent intent = new Intent(context, GeneralContentModuleActivity.class); Bundle extras = new Bundle(); extras.putString(BUNDLE_ARGUMENT_MODULE_NAME, moduleName); intent.putExtras(extras); return intent; } | /**
* Factory method to start new instance of this activity.
*
* @param context The context to start the activity.
* @param moduleName The module name.
* @return
*/ | Factory method to start new instance of this activity | getIntent | {
"repo_name": "mobgen/halo-android",
"path": "sdk-samples/halo-demo/src/main/java/com/mobgen/halo/android/app/ui/generalcontent/GeneralContentModuleActivity.java",
"license": "apache-2.0",
"size": 27984
} | [
"android.content.Context",
"android.content.Intent",
"android.os.Bundle"
] | import android.content.Context; import android.content.Intent; import android.os.Bundle; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 2,881,621 |
public static DataFrame dbfFile(final SQLContext sqlContext, final String path)
{
final DBFRelation relation = new DBFRelation(path, sqlContext);
return sqlContext.baseRelationToDataFrame(relation);
} | static DataFrame function(final SQLContext sqlContext, final String path) { final DBFRelation relation = new DBFRelation(path, sqlContext); return sqlContext.baseRelationToDataFrame(relation); } | /**
* Returns a Schema RDD for the given dbf path.
*/ | Returns a Schema RDD for the given dbf path | dbfFile | {
"repo_name": "punit-naik/spark-dbf",
"path": "src/main/java/com/esri/spark/dbf/DBFUtils.java",
"license": "apache-2.0",
"size": 510
} | [
"org.apache.spark.sql.DataFrame",
"org.apache.spark.sql.SQLContext"
] | import org.apache.spark.sql.DataFrame; import org.apache.spark.sql.SQLContext; | import org.apache.spark.sql.*; | [
"org.apache.spark"
] | org.apache.spark; | 260,348 |
PathSegment.NameSegment colPath = schemaPath.getUnIndexed().getRootSegment();
ColumnMetadata colMetadata = schema.metadata(colPath.getPath());
while (!colPath.isLastPath() && colMetadata != null) {
if (colMetadata.isDict()) {
colMetadata = ((DictColumnMetadata) colMetadata).valueColumnMetadata();
... | PathSegment.NameSegment colPath = schemaPath.getUnIndexed().getRootSegment(); ColumnMetadata colMetadata = schema.metadata(colPath.getPath()); while (!colPath.isLastPath() && colMetadata != null) { if (colMetadata.isDict()) { colMetadata = ((DictColumnMetadata) colMetadata).valueColumnMetadata(); break; } if (!colMetad... | /**
* Returns {@link ColumnMetadata} instance obtained from specified {@code TupleMetadata schema} which corresponds to
* the specified column schema path.
*
* @param schemaPath schema path of the column which should be obtained
* @param schema tuple schema where column should be searched
* @retur... | Returns <code>ColumnMetadata</code> instance obtained from specified TupleMetadata schema which corresponds to the specified column schema path | getColumnMetadata | {
"repo_name": "johnnywale/drill",
"path": "metastore/metastore-api/src/main/java/org/apache/drill/metastore/util/SchemaPathUtils.java",
"license": "apache-2.0",
"size": 9303
} | [
"org.apache.drill.common.expression.PathSegment",
"org.apache.drill.exec.record.metadata.ColumnMetadata",
"org.apache.drill.exec.record.metadata.DictColumnMetadata"
] | import org.apache.drill.common.expression.PathSegment; import org.apache.drill.exec.record.metadata.ColumnMetadata; import org.apache.drill.exec.record.metadata.DictColumnMetadata; | import org.apache.drill.common.expression.*; import org.apache.drill.exec.record.metadata.*; | [
"org.apache.drill"
] | org.apache.drill; | 1,805,125 |
public boolean run() throws IOException, YarnException {
LOG.info("Running Client");
yarnClient.start();
YarnClusterMetrics clusterMetrics = yarnClient.getYarnClusterMetrics();
LOG.info("Got Cluster metric info from ASM"
+ ", numNodeManagers=" + clusterMetrics.getNumNodeManagers());
Li... | boolean function() throws IOException, YarnException { LOG.info(STR); yarnClient.start(); YarnClusterMetrics clusterMetrics = yarnClient.getYarnClusterMetrics(); LOG.info(STR + STR + clusterMetrics.getNumNodeManagers()); List<NodeReport> clusterNodeReports = yarnClient.getNodeReports( NodeState.RUNNING); LOG.info(STR);... | /**
* Main run function for the client
* @return true if application completed successfully
* @throws IOException
* @throws YarnException
*/ | Main run function for the client | run | {
"repo_name": "starschema/yarn-hazelcast",
"path": "src/org/starschema/hadoop/yarn/applications/distributedshell/Client.java",
"license": "apache-2.0",
"size": 38757
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse",
"org.apache.hadoop.yarn.api.records.ApplicationId",
"org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext... | import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationResponse; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.Appli... | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.yarn.api.protocolrecords.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.client.api.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,678,209 |
public Builder withMembers(Collection<Address> members) {
response.members = Assert.notNull(members, "members");
return this;
} | Builder function(Collection<Address> members) { response.members = Assert.notNull(members, STR); return this; } | /**
* Sets the response members.
*
* @param members The response members.
* @return The response builder.
* @throws NullPointerException if {@code members} is null
*/ | Sets the response members | withMembers | {
"repo_name": "aruanruan/copycat",
"path": "protocol/src/main/java/net/kuujo/copycat/raft/protocol/response/KeepAliveResponse.java",
"license": "apache-2.0",
"size": 5130
} | [
"java.util.Collection",
"net.kuujo.copycat.io.transport.Address",
"net.kuujo.copycat.util.Assert"
] | import java.util.Collection; import net.kuujo.copycat.io.transport.Address; import net.kuujo.copycat.util.Assert; | import java.util.*; import net.kuujo.copycat.io.transport.*; import net.kuujo.copycat.util.*; | [
"java.util",
"net.kuujo.copycat"
] | java.util; net.kuujo.copycat; | 1,940,869 |
private static ColumnSchema getStrippedColumnSchema(ColumnSchema columnToClone) {
return new ColumnSchema.ColumnSchemaBuilder(columnToClone)
.key(false)
.build();
} | static ColumnSchema function(ColumnSchema columnToClone) { return new ColumnSchema.ColumnSchemaBuilder(columnToClone) .key(false) .build(); } | /**
* Sets isKey to false on the passed ColumnSchema.
* This allows out of order key columns in projections.
*
* TODO: Remove the need for this by handling server side.
*
* @return a new column schema
*/ | Sets isKey to false on the passed ColumnSchema. This allows out of order key columns in projections | getStrippedColumnSchema | {
"repo_name": "helifu/kudu",
"path": "java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java",
"license": "apache-2.0",
"size": 46367
} | [
"org.apache.kudu.ColumnSchema"
] | import org.apache.kudu.ColumnSchema; | import org.apache.kudu.*; | [
"org.apache.kudu"
] | org.apache.kudu; | 226,039 |
Stream<ParticleRendering> get();
| Stream<ParticleRendering> get(); | /**
* Get particles to be rendered.
*
* @return stream of particle rendering directives to be rendered.
*/ | Get particles to be rendered | get | {
"repo_name": "athrane/bassebombecraft",
"path": "src/main/java/bassebombecraft/client/event/rendering/particle/ParticleRenderingRepository.java",
"license": "gpl-3.0",
"size": 968
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 2,668,318 |
public Set<Locale> getAllowedLocales() {
return allowedLocales;
}
| Set<Locale> function() { return allowedLocales; } | /**
* Gets the current list of allowed locales.
*
* @return List<Locale> object with allowed Locales defined by the administrator
*/ | Gets the current list of allowed locales | getAllowedLocales | {
"repo_name": "Bhamni/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/impl/GlobalLocaleList.java",
"license": "mpl-2.0",
"size": 2421
} | [
"java.util.Locale",
"java.util.Set"
] | import java.util.Locale; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,895,794 |
public void setCoordSystemOrigin(float[] coordSystemOrigin) {
COSArray array = new COSArray();
array.setFloatArray(coordSystemOrigin);
this.getDictionary().setItem("O", array);
} | void function(float[] coordSystemOrigin) { COSArray array = new COSArray(); array.setFloatArray(coordSystemOrigin); this.getDictionary().setItem("O", array); } | /**
* This will set the origin of the coordinate system.
*
* @param coordSystemOrigin the origin
*/ | This will set the origin of the coordinate system | setCoordSystemOrigin | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/pdfbox/pdmodel/interactive/measurement/PDRectlinearMeasureDictionary.java",
"license": "gpl-2.0",
"size": 8024
} | [
"org.apache.pdfbox.cos.COSArray"
] | import org.apache.pdfbox.cos.COSArray; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 1,341,682 |
private boolean renameId(Aspect asp, String newId) {
if (isId(newId)) {
return false;
} else {
for (Attendee att : Application.getInstance().getAttendeeMgmt().getAttendees()) {
int index = -1;
if (att.getAspects() != null) {
index = att.getAspects().getAspectIds().indexOf(asp.getId())... | boolean function(Aspect asp, String newId) { if (isId(newId)) { return false; } else { for (Attendee att : Application.getInstance().getAttendeeMgmt().getAttendees()) { int index = -1; if (att.getAspects() != null) { index = att.getAspects().getAspectIds().indexOf(asp.getId()); } if (index != -1) { att.getAspects().get... | /**
* Renames the id of the given aspect.
*
* @param asp
* the asp
* @param newId
* the new id
*
* @return true, if rename id
*/ | Renames the id of the given aspect | renameId | {
"repo_name": "googol42/revager",
"path": "src/org/revager/app/AspectManagement.java",
"license": "gpl-3.0",
"size": 12147
} | [
"org.revager.app.model.schema.Aspect",
"org.revager.app.model.schema.Attendee"
] | import org.revager.app.model.schema.Aspect; import org.revager.app.model.schema.Attendee; | import org.revager.app.model.schema.*; | [
"org.revager.app"
] | org.revager.app; | 1,917,463 |
protected boolean initHelper(SessionState state)
{
logger.debug("initHelper()");
Mode mode;
if (getCaller(state) == Caller.EDITOR_INTEGRATION)
{
mode = (Mode) state.getAttribute(CitationHelper.STATE_HELPER_MODE);
if (mode == null)
{
if(logger.isDebugEnabled()) {
logger.debug("initHelp... | boolean function(SessionState state) { logger.debug(STR); Mode mode; if (getCaller(state) == Caller.EDITOR_INTEGRATION) { mode = (Mode) state.getAttribute(CitationHelper.STATE_HELPER_MODE); if (mode == null) { if(logger.isDebugEnabled()) { logger.debug(STR + Mode.NEW_RESOURCE); } setMode(state, Mode.NEW_RESOURCE); } if... | /**
* This method is called upon each Citations Helper request to properly
* initialize the Citations Helper in case of a null Mode. Returns true if
* succeeded, false otherwise
*
* @param state
*/ | This method is called upon each Citations Helper request to properly initialize the Citations Helper in case of a null Mode. Returns true if succeeded, false otherwise | initHelper | {
"repo_name": "hackbuteer59/sakai",
"path": "citations/citations-tool/tool/src/java/org/sakaiproject/citation/tool/CitationHelperAction.java",
"license": "apache-2.0",
"size": 185628
} | [
"org.sakaiproject.citation.api.CitationHelper",
"org.sakaiproject.content.api.ContentResource",
"org.sakaiproject.content.api.ResourceToolAction",
"org.sakaiproject.content.api.ResourceToolActionPipe",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.exception.ServerOverloadException",
"org.... | import org.sakaiproject.citation.api.CitationHelper; import org.sakaiproject.content.api.ContentResource; import org.sakaiproject.content.api.ResourceToolAction; import org.sakaiproject.content.api.ResourceToolActionPipe; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.exception.ServerOverloadEx... | import org.sakaiproject.citation.api.*; import org.sakaiproject.content.api.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.tool.api.*; | [
"org.sakaiproject.citation",
"org.sakaiproject.content",
"org.sakaiproject.event",
"org.sakaiproject.exception",
"org.sakaiproject.tool"
] | org.sakaiproject.citation; org.sakaiproject.content; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.tool; | 2,712,041 |
private TranLogConfiguration createCustomTranLogConfiguration(String recoveredServerIdentity, String logDir, boolean isPeerRecoverySupported) throws URISyntaxException {
if (tc.isEntryEnabled())
Tr.entry(tc, "createCustomTranLogConfiguration", new java.lang.Object[] { recoveredServerIdentity, lo... | TranLogConfiguration function(String recoveredServerIdentity, String logDir, boolean isPeerRecoverySupported) throws URISyntaxException { if (tc.isEntryEnabled()) Tr.entry(tc, STR, new java.lang.Object[] { recoveredServerIdentity, logDir, this }); TranLogConfiguration tlc = null; final java.util.Properties props = new ... | /**
* Creates a custom TranLogConfiguration object appropriate for storing transaction logs in an RDBMS or other custom repository.
*
* @param recoveredServerIdentity
* @param logDir
* @param isPeerRecoverySupported
* @return
* @throws URISyntaxException
*/ | Creates a custom TranLogConfiguration object appropriate for storing transaction logs in an RDBMS or other custom repository | createCustomTranLogConfiguration | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.tx.core/src/com/ibm/tx/jta/impl/TxRecoveryAgentImpl.java",
"license": "epl-1.0",
"size": 52367
} | [
"com.ibm.tx.jta.util.TranLogConfiguration",
"com.ibm.websphere.ras.Tr",
"java.net.URISyntaxException"
] | import com.ibm.tx.jta.util.TranLogConfiguration; import com.ibm.websphere.ras.Tr; import java.net.URISyntaxException; | import com.ibm.tx.jta.util.*; import com.ibm.websphere.ras.*; import java.net.*; | [
"com.ibm.tx",
"com.ibm.websphere",
"java.net"
] | com.ibm.tx; com.ibm.websphere; java.net; | 649,212 |
public @Nonnull VMScalingCapabilities withCPUScaling(int minAllowedCPU, int maxAllowedCPU, int cpuChangeIncrement){
this.minAllowedCPU = minAllowedCPU;
this.maxAllowedCPU = maxAllowedCPU;
this.cpuChangeIncrement = cpuChangeIncrement;
return this;
} | @Nonnull VMScalingCapabilities function(int minAllowedCPU, int maxAllowedCPU, int cpuChangeIncrement){ this.minAllowedCPU = minAllowedCPU; this.maxAllowedCPU = maxAllowedCPU; this.cpuChangeIncrement = cpuChangeIncrement; return this; } | /**
* Sets values for describing CPU scaling for clouds with contiguous products (should only be used for product size scaling
* and not for distinct product scaling)
* @param minAllowedCPU minimum allowed CPU count (-1 for unlimited, -2 for unknown)
* @param maxAllowedCPU maximum allowed CPU count ... | Sets values for describing CPU scaling for clouds with contiguous products (should only be used for product size scaling and not for distinct product scaling) | withCPUScaling | {
"repo_name": "dasein-cloud/dasein-cloud-core",
"path": "src/main/java/org/dasein/cloud/compute/VMScalingCapabilities.java",
"license": "apache-2.0",
"size": 7845
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,403,683 |
public void warning(SAXParseException exception) throws SAXException {
// nothing
} | void function(SAXParseException exception) throws SAXException { } | /**
* This method is called when a warning has occurred; this indicates
* that while no XML rules were broken, something appears to be
* incorrect or missing.
* The implementation of this method here is a "no op".
*
* @param exception <code>SAXParseException</code> that occurred.
* @t... | This method is called when a warning has occurred; this indicates that while no XML rules were broken, something appears to be incorrect or missing. The implementation of this method here is a "no op" | warning | {
"repo_name": "roboidstudio/embedded",
"path": "org.jdom/src/org/jdom/input/BuilderErrorHandler.java",
"license": "lgpl-2.1",
"size": 4591
} | [
"org.xml.sax.SAXException",
"org.xml.sax.SAXParseException"
] | import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 2,738,137 |
public Adapter createBasicReorientExpressionAdapter()
{
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link uk.ac.kcl.inf.robotics.rigidBodies.BasicReorientExpression <em>Basic Reorient Expression</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance... | Creates a new adapter for an object of class '<code>uk.ac.kcl.inf.robotics.rigidBodies.BasicReorientExpression Basic Reorient Expression</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createBasicReorientExpressionAdapter | {
"repo_name": "szschaler/RigidBodies",
"path": "uk.ac.kcl.inf.robotics.rigid_bodies/src-gen/uk/ac/kcl/inf/robotics/rigidBodies/util/RigidBodiesAdapterFactory.java",
"license": "mit",
"size": 41508
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,046,481 |
private void layoutColumns(int targetSpan)
{
// Set the spans to the preferred sizes. Determine the space
// that we have to adjust the sizes afterwards.
long sumPref = 0;
int n = columnRequirements.length;
for (int i = 0; i < n; i++)
{
SizeRequirements col = columnRequirements[i];... | void function(int targetSpan) { long sumPref = 0; int n = columnRequirements.length; for (int i = 0; i < n; i++) { SizeRequirements col = columnRequirements[i]; if (columnWidths[i] != null) columnSpans[i] = (int) columnWidths[i].getValue(targetSpan); else columnSpans[i] = col.preferred; sumPref += columnSpans[i]; } lon... | /**
* Lays out the columns.
*
* @param targetSpan the target span into which the table is laid out
*/ | Lays out the columns | layoutColumns | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/text/html/TableView.java",
"license": "gpl-2.0",
"size": 30516
} | [
"javax.swing.SizeRequirements"
] | import javax.swing.SizeRequirements; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,518,000 |
public List<MstDrugsNew> getDrugByID(int srNo) throws Exception
{
List<MstDrugsNew> drugs = null;
try
{
tx = session.beginTransaction();
drugs = session.createQuery("FROM MstDrugsNew as d where dSrNo ="+srNo).list();
tx.commit();
... | List<MstDrugsNew> function(int srNo) throws Exception { List<MstDrugsNew> drugs = null; try { tx = session.beginTransaction(); drugs = session.createQuery(STR+srNo).list(); tx.commit(); } catch(HibernateException e1) { if (tx!=null) { tx.rollback(); e1.printStackTrace(); throw e1; } else if(tx==null) { tx.rollback(); e... | /**
* Gives the Drug details of a particular Drug ID
* @author Vishwa
* @param srNo
* @return
* @throws Exception
*/ | Gives the Drug details of a particular Drug ID | getDrugByID | {
"repo_name": "SLIIT-FacultyOfComputing/Digital-Pulz-for-Hospitals",
"path": "HIS_Latest_Project_29-07-2016/Backend/NewWorkspace_2016/HIS_API/src/main/java/lib/driver/pharmacy/driver_class/DrugDBDriver.java",
"license": "apache-2.0",
"size": 36328
} | [
"java.util.List",
"org.hibernate.HibernateException"
] | import java.util.List; import org.hibernate.HibernateException; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 1,113,409 |
private FetchSourceContext normalizeFetchSourceContent(@Nullable FetchSourceContext context, @Nullable String[] gFields) {
if (context != null) {
return context;
}
if (gFields == null) {
return FetchSourceContext.FETCH_SOURCE;
}
for (String field : gFi... | FetchSourceContext function(@Nullable FetchSourceContext context, @Nullable String[] gFields) { if (context != null) { return context; } if (gFields == null) { return FetchSourceContext.FETCH_SOURCE; } for (String field : gFields) { if (SourceFieldMapper.NAME.equals(field)) { return FetchSourceContext.FETCH_SOURCE; } }... | /**
* decides what needs to be done based on the request input and always returns a valid non-null FetchSourceContext
*/ | decides what needs to be done based on the request input and always returns a valid non-null FetchSourceContext | normalizeFetchSourceContent | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/get/ShardGetService.java",
"license": "apache-2.0",
"size": 11711
} | [
"org.elasticsearch.core.Nullable",
"org.elasticsearch.index.mapper.SourceFieldMapper",
"org.elasticsearch.search.fetch.subphase.FetchSourceContext"
] | import org.elasticsearch.core.Nullable; import org.elasticsearch.index.mapper.SourceFieldMapper; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; | import org.elasticsearch.core.*; import org.elasticsearch.index.mapper.*; import org.elasticsearch.search.fetch.subphase.*; | [
"org.elasticsearch.core",
"org.elasticsearch.index",
"org.elasticsearch.search"
] | org.elasticsearch.core; org.elasticsearch.index; org.elasticsearch.search; | 1,537,165 |
Integer estimateValueSize(ComputedValue value); | Integer estimateValueSize(ComputedValue value); | /**
* Estimates the size of a value in bytes. If the value has been recently processed, the actual byte count of the Fudge encoding
* should be used. Other possibilities could be the average size of objects of that class.
*
* @param value the value to estimate
* @return the size in bytes, or null if no m... | Estimates the size of a value in bytes. If the value has been recently processed, the actual byte count of the Fudge encoding should be used. Other possibilities could be the average size of objects of that class | estimateValueSize | {
"repo_name": "McLeodMoores/starling",
"path": "projects/engine/src/main/java/com/opengamma/engine/cache/ViewComputationCache.java",
"license": "apache-2.0",
"size": 3872
} | [
"com.opengamma.engine.value.ComputedValue"
] | import com.opengamma.engine.value.ComputedValue; | import com.opengamma.engine.value.*; | [
"com.opengamma.engine"
] | com.opengamma.engine; | 824,577 |
public void setScripts(List<SCRIPT> extractScripts) {
this.extractScripts.clear();
this.extractScripts.addAll(extractScripts);
} | void function(List<SCRIPT> extractScripts) { this.extractScripts.clear(); this.extractScripts.addAll(extractScripts); } | /**
* Sets the scripts to use for the extraction
*
* @param extractScripts scripts to use
*/ | Sets the scripts to use for the extraction | setScripts | {
"repo_name": "narfindustries/autopsy",
"path": "KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/StringsTextExtractor.java",
"license": "apache-2.0",
"size": 21489
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,943,579 |
private IResource getLaunchableResource(IAdaptable adaptable)
{
// IJavaElement je = (IJavaElement) adaptable.getAdapter(IJavaElement.class);
// if (je != null) {
// return je.getResource();
// }
// TODO
return null;
} | IResource function(IAdaptable adaptable) { return null; } | /**
* Returns the resource containing the Java element associated with the given adaptable, or <code>null</code>.
*
* @param adaptable
* adaptable object
* @return containing resource or <code>null</code>
*/ | Returns the resource containing the Java element associated with the given adaptable, or <code>null</code> | getLaunchableResource | {
"repo_name": "jmcPereira/overture",
"path": "ide/debug/src/main/java/org/overture/ide/debug/ui/launchconfigurations/VdmLaunchShortcut.java",
"license": "gpl-3.0",
"size": 15663
} | [
"org.eclipse.core.resources.IResource",
"org.eclipse.core.runtime.IAdaptable"
] | import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,408,245 |
public static Set<Integer> getUsedPorts(TopologyInfo topology) {
Set<Integer> result = new HashSet<Integer>();
List<ExecutorSummary> executors = topology.get_executors();
for (int e = 0; e < executors.size(); e++) {
result.add(executors.get(e).get_port());
}
... | static Set<Integer> function(TopologyInfo topology) { Set<Integer> result = new HashSet<Integer>(); List<ExecutorSummary> executors = topology.get_executors(); for (int e = 0; e < executors.size(); e++) { result.add(executors.get(e).get_port()); } return result; } | /**
* Returns the ports used by a topology.
*
* @param topology the topology to return the ports for
* @return the used ports
*/ | Returns the ports used by a topology | getUsedPorts | {
"repo_name": "QualiMaster/Infrastructure",
"path": "StormCommons/src/eu/qualimaster/common/signal/ThriftConnection.java",
"license": "apache-2.0",
"size": 14564
} | [
"java.util.HashSet",
"java.util.List",
"java.util.Set"
] | import java.util.HashSet; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 487,815 |
@Override
public benefits findByPrimaryKey(Serializable primaryKey)
throws NoSuchModelException, SystemException {
return findByPrimaryKey(((Long)primaryKey).longValue());
} | benefits function(Serializable primaryKey) throws NoSuchModelException, SystemException { return findByPrimaryKey(((Long)primaryKey).longValue()); } | /**
* Returns the benefits with the primary key or throws a {@link com.liferay.portal.NoSuchModelException} if it could not be found.
*
* @param primaryKey the primary key of the benefits
* @return the benefits
* @throws com.liferay.portal.NoSuchModelException if a benefits with the primary key could not be f... | Returns the benefits with the primary key or throws a <code>com.liferay.portal.NoSuchModelException</code> if it could not be found | findByPrimaryKey | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/persistence/benefitsPersistenceImpl.java",
"license": "gpl-2.0",
"size": 60834
} | [
"com.liferay.portal.NoSuchModelException",
"com.liferay.portal.kernel.exception.SystemException",
"java.io.Serializable"
] | import com.liferay.portal.NoSuchModelException; import com.liferay.portal.kernel.exception.SystemException; import java.io.Serializable; | import com.liferay.portal.*; import com.liferay.portal.kernel.exception.*; import java.io.*; | [
"com.liferay.portal",
"java.io"
] | com.liferay.portal; java.io; | 245,390 |
@Test
public void testGeot6599() throws ShapefileException, IOException {
URL url = TestData.url(ShapefileDataStore.class, "mzvalues/building.shp");
ShapefileDataStore store = new ShapefileDataStore(url);
SimpleFeature feature = DataUtilities.first(store.getFeatureSource().getFeatures())... | void function() throws ShapefileException, IOException { URL url = TestData.url(ShapefileDataStore.class, STR); ShapefileDataStore store = new ShapefileDataStore(url); SimpleFeature feature = DataUtilities.first(store.getFeatureSource().getFeatures()); Double[][] expected = { {-72.7143910882242, 41.7223262507114, 0.0},... | /**
* GeoServer can't display PolygonZ shapefile
*
* @throws ShapefileException
* @throws IOException
*/ | GeoServer can't display PolygonZ shapefile | testGeot6599 | {
"repo_name": "geotools/geotools",
"path": "modules/plugin/shapefile/src/test/java/org/geotools/data/shapefile/shp/ZMHandlersTest.java",
"license": "lgpl-2.1",
"size": 20892
} | [
"java.io.IOException",
"org.geotools.data.DataUtilities",
"org.geotools.data.Query",
"org.geotools.data.shapefile.ShapefileDataStore",
"org.geotools.data.simple.SimpleFeatureIterator",
"org.geotools.geometry.jts.LiteCoordinateSequence",
"org.geotools.test.TestData",
"org.geotools.util.factory.Hints",
... | import java.io.IOException; import org.geotools.data.DataUtilities; import org.geotools.data.Query; import org.geotools.data.shapefile.ShapefileDataStore; import org.geotools.data.simple.SimpleFeatureIterator; import org.geotools.geometry.jts.LiteCoordinateSequence; import org.geotools.test.TestData; import org.geotool... | import java.io.*; import org.geotools.data.*; import org.geotools.data.shapefile.*; import org.geotools.data.simple.*; import org.geotools.geometry.jts.*; import org.geotools.test.*; import org.geotools.util.factory.*; import org.junit.*; import org.locationtech.jts.geom.*; import org.opengis.feature.simple.*; | [
"java.io",
"org.geotools.data",
"org.geotools.geometry",
"org.geotools.test",
"org.geotools.util",
"org.junit",
"org.locationtech.jts",
"org.opengis.feature"
] | java.io; org.geotools.data; org.geotools.geometry; org.geotools.test; org.geotools.util; org.junit; org.locationtech.jts; org.opengis.feature; | 121,483 |
public static void init() {
createOptimizationPlan();
BaselineCompiler.options.INVOCATION_COUNTERS = true;
}
private static OptimizationPlanElement[] _optPlan;
private static OptOptions _options; | static void function() { createOptimizationPlan(); BaselineCompiler.options.INVOCATION_COUNTERS = true; } private static OptimizationPlanElement[] _optPlan; private static OptOptions _options; | /**
* Initialize the recompilation strategy.
*
* Note: This uses the command line options to set up the
* optimization plans, so this must be run after the command line
* options are available.
*/ | Initialize the recompilation strategy. Note: This uses the command line options to set up the optimization plans, so this must be run after the command line options are available | init | {
"repo_name": "ut-osa/laminar",
"path": "jikesrvm-3.0.0/rvm/src/org/jikesrvm/adaptive/recompilation/InvocationCounts.java",
"license": "bsd-3-clause",
"size": 4549
} | [
"org.jikesrvm.compilers.baseline.BaselineCompiler",
"org.jikesrvm.compilers.opt.OptOptions",
"org.jikesrvm.compilers.opt.driver.OptimizationPlanElement"
] | import org.jikesrvm.compilers.baseline.BaselineCompiler; import org.jikesrvm.compilers.opt.OptOptions; import org.jikesrvm.compilers.opt.driver.OptimizationPlanElement; | import org.jikesrvm.compilers.baseline.*; import org.jikesrvm.compilers.opt.*; import org.jikesrvm.compilers.opt.driver.*; | [
"org.jikesrvm.compilers"
] | org.jikesrvm.compilers; | 1,525,589 |
public Nonce createNonce(Long userId) throws ObjectNotFoundException; | Nonce function(Long userId) throws ObjectNotFoundException; | /**
* Creates a nonce for the specified user.
*
* @param userId the ID of the user
* @return the new nonce
* @throws ObjectNotFoundException if the user could not be found
*/ | Creates a nonce for the specified user | createNonce | {
"repo_name": "andrewbissada/gss",
"path": "src/org/gss_project/gss/server/ejb/ExternalAPI.java",
"license": "gpl-3.0",
"size": 50977
} | [
"org.gss_project.gss.common.exceptions.ObjectNotFoundException",
"org.gss_project.gss.server.domain.Nonce"
] | import org.gss_project.gss.common.exceptions.ObjectNotFoundException; import org.gss_project.gss.server.domain.Nonce; | import org.gss_project.gss.common.exceptions.*; import org.gss_project.gss.server.domain.*; | [
"org.gss_project.gss"
] | org.gss_project.gss; | 2,344,026 |
public static Set<String> scan(URL[] classpathUrls, String annotationClassName) {
ArgumentChecker.notNull(annotationClassName, "annotationClassName");
Set<URL> urls = new HashSet<>(Arrays.asList(classpathUrls));
AnnotationReflector reflector = new AnnotationReflector(
null, urls, new TypeAnnotatio... | static Set<String> function(URL[] classpathUrls, String annotationClassName) { ArgumentChecker.notNull(annotationClassName, STR); Set<URL> urls = new HashSet<>(Arrays.asList(classpathUrls)); AnnotationReflector reflector = new AnnotationReflector( null, urls, new TypeAnnotationsScanner(), ClassNameAnnotationScannerUtil... | /**
* Scans the specified classpath for an annotation.
*
* @param classpathUrls the classpath, not null
* @param annotationClassName the annotation to find, not null
* @return the matching elements, not null
*/ | Scans the specified classpath for an annotation | scan | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Util/src/main/java/com/opengamma/util/annotation/ClassNameAnnotationScannerUtils.java",
"license": "apache-2.0",
"size": 2552
} | [
"com.opengamma.util.ArgumentChecker",
"java.util.Arrays",
"java.util.Collections",
"java.util.HashSet",
"java.util.Set",
"org.fudgemsg.AnnotationReflector",
"org.reflections.scanners.TypeAnnotationsScanner"
] | import com.opengamma.util.ArgumentChecker; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.fudgemsg.AnnotationReflector; import org.reflections.scanners.TypeAnnotationsScanner; | import com.opengamma.util.*; import java.util.*; import org.fudgemsg.*; import org.reflections.scanners.*; | [
"com.opengamma.util",
"java.util",
"org.fudgemsg",
"org.reflections.scanners"
] | com.opengamma.util; java.util; org.fudgemsg; org.reflections.scanners; | 7,321 |
@Test
public void withRectangularClip_negative() {
NGRectangle clip = createRectangle(20, 20, 70, 70);
rect.setClipNode(clip);
NodePath rootPath = getRenderRoot(root, 19, 20, 70, 70);
assertRenderRoot(root, rootPath);
} | void function() { NGRectangle clip = createRectangle(20, 20, 70, 70); rect.setClipNode(clip); NodePath rootPath = getRenderRoot(root, 19, 20, 70, 70); assertRenderRoot(root, rootPath); } | /**
* The negative test, where the clip is smaller than the dirty region
*/ | The negative test, where the clip is smaller than the dirty region | withRectangularClip_negative | {
"repo_name": "teamfx/openjfx-10-dev-rt",
"path": "modules/javafx.graphics/src/test/java/test/com/sun/javafx/sg/prism/RenderRootTest.java",
"license": "gpl-2.0",
"size": 15706
} | [
"com.sun.javafx.sg.prism.NGRectangle",
"com.sun.javafx.sg.prism.NodePath"
] | import com.sun.javafx.sg.prism.NGRectangle; import com.sun.javafx.sg.prism.NodePath; | import com.sun.javafx.sg.prism.*; | [
"com.sun.javafx"
] | com.sun.javafx; | 2,065,038 |
private void createStatusBar()
{
CheckList.this.accessibleLabel = new AccessibleLabel();
CheckList.this.accessibleLabel.setVisible(false);
StatusBar statusBar = new StatusBar();
statusBar.setVisible(false);
statusBar.add(CheckList.this.accessibleLabel);
add(statusBar, BorderLayout.CE... | void function() { CheckList.this.accessibleLabel = new AccessibleLabel(); CheckList.this.accessibleLabel.setVisible(false); StatusBar statusBar = new StatusBar(); statusBar.setVisible(false); statusBar.add(CheckList.this.accessibleLabel); add(statusBar, BorderLayout.CENTER); validate(); } | /**
* Creates the status bar that is required for JAWS to say the accessible
* label's text.
*/ | Creates the status bar that is required for JAWS to say the accessible label's text | createStatusBar | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/uitools/CheckList.java",
"license": "epl-1.0",
"size": 29290
} | [
"java.awt.BorderLayout"
] | import java.awt.BorderLayout; | import java.awt.*; | [
"java.awt"
] | java.awt; | 197,147 |
static boolean isProductionInteraction(Interaction interact, ModuleDefinition moduleDef,
SBOLDocument sbolDoc) {
if (interact.containsType(SystemsBiologyOntology.GENETIC_PRODUCTION) && interact.getParticipations().size() == 2) {
boolean hasPromoter = false;
boolean hasProduct = false;
for (Partici... | static boolean isProductionInteraction(Interaction interact, ModuleDefinition moduleDef, SBOLDocument sbolDoc) { if (interact.containsType(SystemsBiologyOntology.GENETIC_PRODUCTION) && interact.getParticipations().size() == 2) { boolean hasPromoter = false; boolean hasProduct = false; for (Participation partici : inter... | /**
* Determine if the given SBOL Interaction is a valid production interaction.
*
* @param interact - The SBOL Interaction to be determined if it is a valid production interaction.
* @param moduleDef - The SBOL ModuleDefinition that contains the given SBOL Interaction.
* @param sbolDoc - The SBOL Docum... | Determine if the given SBOL Interaction is a valid production interaction | isProductionInteraction | {
"repo_name": "MyersResearchGroup/iBioSim",
"path": "conversion/src/main/java/edu/utah/ece/async/ibiosim/conversion/SBOL2SBML.java",
"license": "apache-2.0",
"size": 84633
} | [
"org.sbolstandard.core2.FunctionalComponent",
"org.sbolstandard.core2.Interaction",
"org.sbolstandard.core2.ModuleDefinition",
"org.sbolstandard.core2.Participation",
"org.sbolstandard.core2.SBOLDocument",
"org.sbolstandard.core2.SystemsBiologyOntology"
] | import org.sbolstandard.core2.FunctionalComponent; import org.sbolstandard.core2.Interaction; import org.sbolstandard.core2.ModuleDefinition; import org.sbolstandard.core2.Participation; import org.sbolstandard.core2.SBOLDocument; import org.sbolstandard.core2.SystemsBiologyOntology; | import org.sbolstandard.core2.*; | [
"org.sbolstandard.core2"
] | org.sbolstandard.core2; | 382,339 |
log.info("TagsDirector initialization");
tagsMapByID.clear();
tagsMapByName.clear();
tags root = new tags("root", null, true, ROOT_TAG_ID, "root");
AddTagToHash(root);
AddChildren(root);
} | log.info(STR); tagsMapByID.clear(); tagsMapByName.clear(); tags root = new tags("root", null, true, ROOT_TAG_ID, "root"); AddTagToHash(root); AddChildren(root); } | /**
* In memory tree initialized during initialization
*/ | In memory tree initialized during initialization | init | {
"repo_name": "jbeecham/ovirt-engine",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/TagsDirector.java",
"license": "apache-2.0",
"size": 14974
} | [
"org.ovirt.engine.core.common.businessentities.tags"
] | import org.ovirt.engine.core.common.businessentities.tags; | import org.ovirt.engine.core.common.businessentities.tags.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 1,486,148 |
public static void convertPointsToHomogeneous(Mat src, Mat dst)
{
convertPointsToHomogeneous_0(src.nativeObj, dst.nativeObj);
return;
}
//
// C++: void correctMatches(Mat F, Mat points1, Mat points2, Mat& newPoints1, Mat& newPoints2)
// | static void function(Mat src, Mat dst) { convertPointsToHomogeneous_0(src.nativeObj, dst.nativeObj); return; } // | /**
* <p>Converts points from Euclidean to homogeneous space.</p>
*
* <p>The function converts points from Euclidean to homogeneous space by appending
* 1's to the tuple of point coordinates. That is, each point <code>(x1, x2,...,
* xn)</code> is converted to <code>(x1, x2,..., xn, 1)</code>.</p>
*
* @param src ... | Converts points from Euclidean to homogeneous space. The function converts points from Euclidean to homogeneous space by appending 1's to the tuple of point coordinates. That is, each point <code>(x1, x2,..., xn)</code> is converted to <code>(x1, x2,..., xn, 1)</code> | convertPointsToHomogeneous | {
"repo_name": "TechBooster/effective_android_sample",
"path": "chapter23/OpenCV Library - 2.4.6/src/org/opencv/calib3d/Calib3d.java",
"license": "apache-2.0",
"size": 163620
} | [
"org.opencv.core.Mat"
] | import org.opencv.core.Mat; | import org.opencv.core.*; | [
"org.opencv.core"
] | org.opencv.core; | 2,141,849 |
public boolean enter()
{
return Keyboard.isKeyDown(Keyboard.KEY_RETURN);
}
// public boolean backspace()
// {
// return Keyboard.isKeyDown(Keyboard.KEY_BACK);
// } | boolean function() { return Keyboard.isKeyDown(Keyboard.KEY_RETURN); } | /**
* Returns if enter is being pressed
*
* @return true if enter is being pressed
*/ | Returns if enter is being pressed | enter | {
"repo_name": "Craigspaz/Flying-Ferris-Wheel-Engine",
"path": "Tables/src/com/input/InputHandler.java",
"license": "bsd-3-clause",
"size": 6471
} | [
"org.lwjgl.input.Keyboard"
] | import org.lwjgl.input.Keyboard; | import org.lwjgl.input.*; | [
"org.lwjgl.input"
] | org.lwjgl.input; | 2,603,486 |
@CallSuper
protected void onBindView(View view) {
final TextView titleView = (TextView) view.findViewById(com.android.internal.R.id.title);
if (titleView != null) {
final CharSequence title = getTitle();
if (!TextUtils.isEmpty(title)) {
titleView.setText(t... | void function(View view) { final TextView titleView = (TextView) view.findViewById(com.android.internal.R.id.title); if (titleView != null) { final CharSequence title = getTitle(); if (!TextUtils.isEmpty(title)) { titleView.setText(title); titleView.setVisibility(View.VISIBLE); } else { titleView.setVisibility(View.GON... | /**
* Binds the created View to the data for this Preference.
* <p>
* This is a good place to grab references to custom Views in the layout and
* set properties on them.
* <p>
* Make sure to call through to the superclass's implementation.
*
* @param view The View that shows thi... | Binds the created View to the data for this Preference. This is a good place to grab references to custom Views in the layout and set properties on them. Make sure to call through to the superclass's implementation | onBindView | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "core/java/android/preference/Preference.java",
"license": "apache-2.0",
"size": 67187
} | [
"android.text.TextUtils",
"android.view.View",
"android.widget.ImageView",
"android.widget.TextView"
] | import android.text.TextUtils; import android.view.View; import android.widget.ImageView; import android.widget.TextView; | import android.text.*; import android.view.*; import android.widget.*; | [
"android.text",
"android.view",
"android.widget"
] | android.text; android.view; android.widget; | 1,918,565 |
public static Set<String> scan(String[] classpathElements, Class<?> annotationClass) {
ArgumentChecker.notNull(annotationClass, "annotationClass");
return scan(classpathElements, annotationClass.getName());
} | static Set<String> function(String[] classpathElements, Class<?> annotationClass) { ArgumentChecker.notNull(annotationClass, STR); return scan(classpathElements, annotationClass.getName()); } | /**
* Scans the specified classpath for an annotation.
*
* @param classpathElements the classpath, not null
* @param annotationClass the annotation to find, not null
* @return the matching elements, not null
*/ | Scans the specified classpath for an annotation | scan | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Util/src/main/java/com/opengamma/util/annotation/ClassNameAnnotationScannerUtils.java",
"license": "apache-2.0",
"size": 2552
} | [
"com.opengamma.util.ArgumentChecker",
"java.util.Set"
] | import com.opengamma.util.ArgumentChecker; import java.util.Set; | import com.opengamma.util.*; import java.util.*; | [
"com.opengamma.util",
"java.util"
] | com.opengamma.util; java.util; | 7,319 |
@Test
public void testInOutQueueProducer() throws Exception {
ExecutorService executor = Executors.newFixedThreadPool(2);
for (int i = 1; i <= 5000; i++) {
final int tempI = i;
Runnable worker = new Runnable() { | void function() throws Exception { ExecutorService executor = Executors.newFixedThreadPool(2); for (int i = 1; i <= 5000; i++) { final int tempI = i; Runnable worker = new Runnable() { | /**
* Test to verify that when using the consumer listener for the InOut
* producer we get the correct message back.
*
* @throws Exception
*/ | Test to verify that when using the consumer listener for the InOut producer we get the correct message back | testInOutQueueProducer | {
"repo_name": "objectiser/camel",
"path": "components/camel-sjms/src/test/java/org/apache/camel/component/sjms/producer/InOutQueueProducerAsyncLoadTest.java",
"license": "apache-2.0",
"size": 5384
} | [
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Executors"
] | import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,384,964 |
public Array<Actor> getActors () {
return root.children;
} | Array<Actor> function () { return root.children; } | /** Returns the root's child actors.
* @see Group#getChildren() */ | Returns the root's child actors | getActors | {
"repo_name": "toa5/libgdx",
"path": "gdx/src/com/badlogic/gdx/scenes/scene2d/Stage.java",
"license": "apache-2.0",
"size": 31839
} | [
"com.badlogic.gdx.utils.Array"
] | import com.badlogic.gdx.utils.Array; | import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 386,974 |
@Override
public Serializable getUserSetting( UserSettingKey key )
{
return getUserSetting( key, Optional.empty() ).orElse( null );
}
| Serializable function( UserSettingKey key ) { return getUserSetting( key, Optional.empty() ).orElse( null ); } | /**
* No transaction for this method, transaction is initiated in
* {@link getUserSettingOptional}.
*/ | No transaction for this method, transaction is initiated in <code>getUserSettingOptional</code> | getUserSetting | {
"repo_name": "jason-p-pickering/dhis2-core",
"path": "dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserSettingService.java",
"license": "bsd-3-clause",
"size": 11770
} | [
"java.io.Serializable",
"java.util.Optional"
] | import java.io.Serializable; import java.util.Optional; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,564,431 |
static Tuple<Long, Long> numberOfMultiparts(final long totalSize, final long partSize) {
if (partSize <= 0) {
throw new IllegalArgumentException("Part size must be greater than zero");
}
if ((totalSize == 0L) || (totalSize <= partSize)) {
return Tuple.tuple(1L, total... | static Tuple<Long, Long> numberOfMultiparts(final long totalSize, final long partSize) { if (partSize <= 0) { throw new IllegalArgumentException(STR); } if ((totalSize == 0L) (totalSize <= partSize)) { return Tuple.tuple(1L, totalSize); } final long parts = totalSize / partSize; final long remaining = totalSize % partS... | /**
* Returns the number parts of size of {@code partSize} needed to reach {@code totalSize},
* along with the size of the last (or unique) part.
*
* @param totalSize the total size
* @param partSize the part size
* @return a {@link Tuple} containing the number of parts to fill {@code tot... | Returns the number parts of size of partSize needed to reach totalSize, along with the size of the last (or unique) part | numberOfMultiparts | {
"repo_name": "gingerwizard/elasticsearch",
"path": "plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java",
"license": "apache-2.0",
"size": 23392
} | [
"org.elasticsearch.common.collect.Tuple"
] | import org.elasticsearch.common.collect.Tuple; | import org.elasticsearch.common.collect.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,718,776 |
public Collection<? extends Requirement> toRequirements() {
HashSet<Requirement> out = new HashSet<Requirement>();
out.add(missing);
for (Blame blamed : blames)
out.addAll(blamed.problem.toRequirements());
return out;
} | Collection<? extends Requirement> function() { HashSet<Requirement> out = new HashSet<Requirement>(); out.add(missing); for (Blame blamed : blames) out.addAll(blamed.problem.toRequirements()); return out; } | /**
* Recursively get all missing items as requirements
* @return a collection containing all missing requirements
*/ | Recursively get all missing items as requirements | toRequirements | {
"repo_name": "kvilhaugsvik/jfcpi",
"path": "DependencyHandler/src/com/kvilhaugsvik/dependency/MissingItemExplained.java",
"license": "gpl-2.0",
"size": 3643
} | [
"java.util.Collection",
"java.util.HashSet"
] | import java.util.Collection; import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,767,047 |
ExtendedResponse createExtendedResponse(String s, byte[] value, int i,
int i2) throws NamingException;
| ExtendedResponse createExtendedResponse(String s, byte[] value, int i, int i2) throws NamingException; | /**
* Returns a suitable <code>ExtendedResponse</code> object for this
* request. The method parameters provide the data obtained by the service
* provider from the LDAP server for this request.
*
* @param s
* the object identifier of the response control. May be null.
... | Returns a suitable <code>ExtendedResponse</code> object for this request. The method parameters provide the data obtained by the service provider from the LDAP server for this request | createExtendedResponse | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/jndi/src/main/java/javax/naming/ldap/ExtendedRequest.java",
"license": "gpl-2.0",
"size": 2575
} | [
"javax.naming.NamingException"
] | import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 318,335 |
public int columnByPaintX(double x) {
if (getOwner().getAlignmentModel() instanceof ConcatenatedAlignmentModel) {
throw new InternalError("not implemented"); //TODO Implement and consider that different alignment parts may have different token widths here.
}
else {
SizeManager sizeManager = getOwne... | int function(double x) { if (getOwner().getAlignmentModel() instanceof ConcatenatedAlignmentModel) { throw new InternalError(STR); } else { SizeManager sizeManager = getOwner().getSizeManager(); return Math.max(0, Math.min(sizeManager.getGlobalMaxSequenceLength(), (int)((x - sizeManager.getGlobalMaxLengthBeforeStart())... | /**
* Returns the column containing the specified x coordinate. If the coordinate lies behind the last column,
* the number of columns + 1 is returned.
*
* @param x the paint coordinate
* @return the alignment column
*/ | Returns the column containing the specified x coordinate. If the coordinate lies behind the last column, the number of columns + 1 is returned | columnByPaintX | {
"repo_name": "bioinfweb/LibrAlign",
"path": "main/info.bioinfweb.libralign.core/src/info/bioinfweb/libralign/alignmentarea/content/AlignmentContentArea.java",
"license": "lgpl-3.0",
"size": 23679
} | [
"info.bioinfweb.libralign.alignmentarea.SizeManager",
"info.bioinfweb.libralign.model.concatenated.ConcatenatedAlignmentModel"
] | import info.bioinfweb.libralign.alignmentarea.SizeManager; import info.bioinfweb.libralign.model.concatenated.ConcatenatedAlignmentModel; | import info.bioinfweb.libralign.alignmentarea.*; import info.bioinfweb.libralign.model.concatenated.*; | [
"info.bioinfweb.libralign"
] | info.bioinfweb.libralign; | 1,191,519 |
public void setIsUnofficial(String isUnofficial) {
if (StringUtils.hasText(isUnofficial)) {
this.isUnofficial=isUnofficial;
}
} | void function(String isUnofficial) { if (StringUtils.hasText(isUnofficial)) { this.isUnofficial=isUnofficial; } } | /**
* Sets the value of isUnofficial
* @param isUnofficial New value for isUnofficial
*/ | Sets the value of isUnofficial | setIsUnofficial | {
"repo_name": "joshforester/rdboard",
"path": "src/java/com/myrunning/leaderboard/model/CpVisit.java",
"license": "mit",
"size": 19376
} | [
"org.springframework.util.StringUtils"
] | import org.springframework.util.StringUtils; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 585,085 |
protected Put putAdd(Put put, ExampleQualifier qualifier, String value) {
put.add(qualifier.getFamily().getFamily().getBytes(), qualifier.getQualifer().getBytes(), value.getBytes());
return put;
} | Put function(Put put, ExampleQualifier qualifier, String value) { put.add(qualifier.getFamily().getFamily().getBytes(), qualifier.getQualifer().getBytes(), value.getBytes()); return put; } | /**
* Update the given <code>put</code> to include the given qualifier and
* String value
*/ | Update the given <code>put</code> to include the given qualifier and String value | putAdd | {
"repo_name": "benkn/Toolbox",
"path": "src/main/java/ben/kn/toolbox/dao/BaseHBaseDAO.java",
"license": "apache-2.0",
"size": 4787
} | [
"org.apache.hadoop.hbase.client.Put"
] | import org.apache.hadoop.hbase.client.Put; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 345,954 |
public static boolean isDeletedRow(Row row) {
return row.getValues() == null || row.getValues().size() == 0;
}
| static boolean function(Row row) { return row.getValues() == null row.getValues().size() == 0; } | /**
* Is this a deleted row?
*
* @param row
* @return
*/ | Is this a deleted row | isDeletedRow | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "lib/lib-table-cluster/src/main/java/org/sagebionetworks/table/cluster/utils/TableModelUtils.java",
"license": "apache-2.0",
"size": 50396
} | [
"org.sagebionetworks.repo.model.table.Row"
] | import org.sagebionetworks.repo.model.table.Row; | import org.sagebionetworks.repo.model.table.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 674,032 |
//-----------------------------------------------------------------------
public DoubleArray getWeights() {
return weights;
} | DoubleArray function() { return weights; } | /**
* Gets the weights.
* @return the value of the property, not null
*/ | Gets the weights | getWeights | {
"repo_name": "OpenGamma/Strata",
"path": "modules/math/src/main/java/com/opengamma/strata/math/impl/statistics/descriptive/QuantileResult.java",
"license": "apache-2.0",
"size": 10540
} | [
"com.opengamma.strata.collect.array.DoubleArray"
] | import com.opengamma.strata.collect.array.DoubleArray; | import com.opengamma.strata.collect.array.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 105,083 |
public KualiDecimal getCsfAmount() {
return csfAmount;
} | KualiDecimal function() { return csfAmount; } | /**
* Gets the csfAmount attribute.
*
* @return Returns the csfAmount
*/ | Gets the csfAmount attribute | getCsfAmount | {
"repo_name": "ua-eas/kfs-devops-automation-fork",
"path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/CalculatedSalaryFoundationTracker.java",
"license": "agpl-3.0",
"size": 16737
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,951,438 |
@Column(name = "description", length = 1024)
@Override
public String getDescription() {
return (String) get(5);
} | @Column(name = STR, length = 1024) String function() { return (String) get(5); } | /**
* Getter for <code>cattle.volume_template.description</code>.
*/ | Getter for <code>cattle.volume_template.description</code> | getDescription | {
"repo_name": "vincent99/cattle",
"path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/tables/records/VolumeTemplateRecord.java",
"license": "apache-2.0",
"size": 17532
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 182,143 |
@Test
public void testConfigureMissingPoolResource() throws Exception {
final OffHeapIdentifierRegistry registry = new OffHeapIdentifierRegistry();
registry.addResource("serverResource1", 32, MemoryUnit.MEGABYTES);
registry.addResource("defaultServerResource", 64, MemoryUnit.MEGABYTES);
final Ehcac... | void function() throws Exception { final OffHeapIdentifierRegistry registry = new OffHeapIdentifierRegistry(); registry.addResource(STR, 32, MemoryUnit.MEGABYTES); registry.addResource(STR, 64, MemoryUnit.MEGABYTES); final EhcacheActiveEntity activeEntity = new EhcacheActiveEntity(registry, ENTITY_ID, DEFAULT_MAPPER); ... | /**
* Ensure configuration fails when specifying non-existent resource.
*/ | Ensure configuration fails when specifying non-existent resource | testConfigureMissingPoolResource | {
"repo_name": "kedar031/ehcache3",
"path": "clustered/server/src/test/java/org/ehcache/clustered/server/EhcacheActiveEntityTest.java",
"license": "apache-2.0",
"size": 156891
} | [
"org.ehcache.clustered.common.internal.exceptions.ResourceConfigurationException",
"org.hamcrest.Matchers",
"org.junit.Assert",
"org.terracotta.entity.ClientDescriptor",
"org.terracotta.offheapstore.util.MemoryUnit"
] | import org.ehcache.clustered.common.internal.exceptions.ResourceConfigurationException; import org.hamcrest.Matchers; import org.junit.Assert; import org.terracotta.entity.ClientDescriptor; import org.terracotta.offheapstore.util.MemoryUnit; | import org.ehcache.clustered.common.internal.exceptions.*; import org.hamcrest.*; import org.junit.*; import org.terracotta.entity.*; import org.terracotta.offheapstore.util.*; | [
"org.ehcache.clustered",
"org.hamcrest",
"org.junit",
"org.terracotta.entity",
"org.terracotta.offheapstore"
] | org.ehcache.clustered; org.hamcrest; org.junit; org.terracotta.entity; org.terracotta.offheapstore; | 1,969,196 |
@Test
public void testEqualsBoundRange() {
final String range = "[1.0]";
assertTrue("range was expected to match", MavenVersionRangeParser.rangeAccepts(range, "1.0"));
assertFalse("range wasn't expected to match", MavenVersionRangeParser.rangeAccepts(range, "1.0.1"));
} | void function() { final String range = "[1.0]"; assertTrue(STR, MavenVersionRangeParser.rangeAccepts(range, "1.0")); assertFalse(STR, MavenVersionRangeParser.rangeAccepts(range, "1.0.1")); } | /**
* Tests the {@link MavenVersionRangeParser#rangeAccepts(String, String)} works correctly when a range of the form
* {@code [1.0]} is used to compare against some value.
*/ | Tests the <code>MavenVersionRangeParser#rangeAccepts(String, String)</code> works correctly when a range of the form [1.0] is used to compare against some value | testEqualsBoundRange | {
"repo_name": "jaikiran/ant-ivy",
"path": "test/java/org/apache/ivy/plugins/parser/m2/MavenVersionRangeParserTest.java",
"license": "apache-2.0",
"size": 9046
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,226,681 |
private void constructAnalysis()
{
// make sure is a compatible rule
String ruleClassName = CurrentProperties.getInstance()
.getRuleClassName();
Rule rule = ReflectionTool
.instantiateMinimalRuleFromClassName(ruleClassName);
String ruleDescription = rule.getDisplayName();
isCompatibleRule ... | void function() { String ruleClassName = CurrentProperties.getInstance() .getRuleClassName(); Rule rule = ReflectionTool .instantiateMinimalRuleFromClassName(ruleClassName); String ruleDescription = rule.getDisplayName(); isCompatibleRule = IntegerCellState.isCompatibleRule(ruleDescription); if (isCompatibleRule) { num... | /**
* Builds the analysis. Called by the constructor and the reset method.
*/ | Builds the analysis. Called by the constructor and the reset method | constructAnalysis | {
"repo_name": "KEOpenSource/CAExplorer",
"path": "cellularAutomata/analysis/PricingAnalysis.java",
"license": "apache-2.0",
"size": 37574
} | [
"java.awt.geom.Point2D",
"java.util.LinkedList"
] | import java.awt.geom.Point2D; import java.util.LinkedList; | import java.awt.geom.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 922,027 |
protected Map<Integer, Integer> getVmsToDatacentersMap() {
return vmsToDatacentersMap;
}
| Map<Integer, Integer> function() { return vmsToDatacentersMap; } | /**
* Gets the vms to datacenters map.
*
* @return the vms to datacenters map
*/ | Gets the vms to datacenters map | getVmsToDatacentersMap | {
"repo_name": "daitr-gu/scheduler_emulator_v2",
"path": "src/org/cloudbus/cloudsim/DatacenterBroker.java",
"license": "mit",
"size": 18568
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,459,447 |
protected boolean verifySnapshotsStatus(List<Snapshot> snapshots) {
for (Snapshot snapshot : snapshots) {
if (snapshot.getStatus() != SnapshotStatus.OK) {
return false;
}
}
return true;
} | boolean function(List<Snapshot> snapshots) { for (Snapshot snapshot : snapshots) { if (snapshot.getStatus() != SnapshotStatus.OK) { return false; } } return true; } | /**
* Returns true if all snapshots have a valid status to use in the OVF.
*/ | Returns true if all snapshots have a valid status to use in the OVF | verifySnapshotsStatus | {
"repo_name": "halober/ovirt-engine",
"path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java",
"license": "apache-2.0",
"size": 25610
} | [
"java.util.List",
"org.ovirt.engine.core.common.businessentities.Snapshot"
] | import java.util.List; import org.ovirt.engine.core.common.businessentities.Snapshot; | import java.util.*; import org.ovirt.engine.core.common.businessentities.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 1,314,221 |
public final MetaProperty<String> schemaVersion() {
return _schemaVersion;
} | final MetaProperty<String> function() { return _schemaVersion; } | /**
* The meta-property for the {@code schemaVersion} property.
* @return the meta-property, not null
*/ | The meta-property for the schemaVersion property | schemaVersion | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Master/src/main/java/com/opengamma/master/security/SecurityMetaDataResult.java",
"license": "apache-2.0",
"size": 8915
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 455,741 |
DirectCallNode createDirectCallNode(CallTarget target); | DirectCallNode createDirectCallNode(CallTarget target); | /**
* Creates a new runtime specific version of {@link DirectCallNode}.
*
* @param target the direct {@link CallTarget} to call
* @return the new call node
* @since 0.8 or earlier
*/ | Creates a new runtime specific version of <code>DirectCallNode</code> | createDirectCallNode | {
"repo_name": "smarr/Truffle",
"path": "truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleRuntime.java",
"license": "gpl-2.0",
"size": 9223
} | [
"com.oracle.truffle.api.nodes.DirectCallNode"
] | import com.oracle.truffle.api.nodes.DirectCallNode; | import com.oracle.truffle.api.nodes.*; | [
"com.oracle.truffle"
] | com.oracle.truffle; | 2,193,903 |
public MediaProxyService getMediaProxyService() {
return (MediaProxyService) modules.get(MediaProxyService.class);
}
| MediaProxyService function() { return (MediaProxyService) modules.get(MediaProxyService.class); } | /**
* Returns the <code>MediaProxyService</code> registered with this server. The
* <code>MediaProxyService</code> was registered with the server as a module while starting up
* the server.
*
* @return the <code>MediaProxyService</code> registered with this server.
*/ | Returns the <code>MediaProxyService</code> registered with this server. The <code>MediaProxyService</code> was registered with the server as a module while starting up the server | getMediaProxyService | {
"repo_name": "surevine/openfire-bespoke",
"path": "src/java/org/jivesoftware/openfire/XMPPServer.java",
"license": "gpl-2.0",
"size": 58285
} | [
"org.jivesoftware.openfire.mediaproxy.MediaProxyService"
] | import org.jivesoftware.openfire.mediaproxy.MediaProxyService; | import org.jivesoftware.openfire.mediaproxy.*; | [
"org.jivesoftware.openfire"
] | org.jivesoftware.openfire; | 630,930 |
@Test
@SmallTest
@Feature({"Preferences"})
public void testExportMenuItem() {
setPasswordSource(new SavedPasswordEntry("https://example.com", "test user", "password"));
ReauthenticationManager.setApiOverride(ReauthenticationManager.OverrideState.AVAILABLE);
ReauthenticationManag... | @Feature({STR}) void function() { setPasswordSource(new SavedPasswordEntry("https: ReauthenticationManager.setApiOverride(ReauthenticationManager.OverrideState.AVAILABLE); ReauthenticationManager.setScreenLockSetUpOverride( ReauthenticationManager.OverrideState.AVAILABLE); final SettingsActivity settingsActivity = mSet... | /**
* Check that the export menu item is included and hidden behind the overflow menu. Check that
* the menu displays the warning before letting the user export passwords.
*/ | Check that the export menu item is included and hidden behind the overflow menu. Check that the menu displays the warning before letting the user export passwords | testExportMenuItem | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsTest.java",
"license": "bsd-3-clause",
"size": 94005
} | [
"android.support.test.espresso.Espresso",
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.browser.settings.SettingsActivity"
] | import android.support.test.espresso.Espresso; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.settings.SettingsActivity; | import android.support.test.espresso.*; import org.chromium.base.test.util.*; import org.chromium.chrome.browser.settings.*; | [
"android.support",
"org.chromium.base",
"org.chromium.chrome"
] | android.support; org.chromium.base; org.chromium.chrome; | 2,031,405 |
public void update(ITupleReference tuple) throws HyracksDataException, IndexException; | void function(ITupleReference tuple) throws HyracksDataException, IndexException; | /**
* Updates the tuple in the index matching the given tuple with the new
* contents in the given tuple.
*
* @param tuple
* Tuple whose match in the index is to be update with the given
* tuples contents.
* @throws HyracksDataException
* If the ... | Updates the tuple in the index matching the given tuple with the new contents in the given tuple | update | {
"repo_name": "apache/incubator-asterixdb-hyracks",
"path": "hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IIndexAccessor.java",
"license": "apache-2.0",
"size": 4064
} | [
"org.apache.hyracks.api.exceptions.HyracksDataException",
"org.apache.hyracks.dataflow.common.data.accessors.ITupleReference"
] | import org.apache.hyracks.api.exceptions.HyracksDataException; import org.apache.hyracks.dataflow.common.data.accessors.ITupleReference; | import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.dataflow.common.data.accessors.*; | [
"org.apache.hyracks"
] | org.apache.hyracks; | 1,279,563 |
public static void updateTracingActiveNotification(float bufferUsagePercentage) {
assert (sTracingActiveNotificationBuilder != null);
Context context = ContextUtils.getApplicationContext();
// Don't update the notification if accessibility is enabled as this may interfere with
// se... | static void function(float bufferUsagePercentage) { assert (sTracingActiveNotificationBuilder != null); Context context = ContextUtils.getApplicationContext(); AccessibilityManager am = (AccessibilityManager) context.getSystemService(Context.ACCESSIBILITY_SERVICE); if (am.isEnabled() && am.isTouchExplorationEnabled()) ... | /**
* Update the tracing notification that is shown while a trace is being recorded with the
* current buffer utilization. Should only be called while the "tracing active" notification is
* shown.
*
* @param bufferUsagePercentage buffer utilization as float between 0 and 1.
*/ | Update the tracing notification that is shown while a trace is being recorded with the current buffer utilization. Should only be called while the "tracing active" notification is shown | updateTracingActiveNotification | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/tracing/TracingNotificationManager.java",
"license": "bsd-3-clause",
"size": 9901
} | [
"android.content.Context",
"android.view.accessibility.AccessibilityManager",
"org.chromium.base.ContextUtils"
] | import android.content.Context; import android.view.accessibility.AccessibilityManager; import org.chromium.base.ContextUtils; | import android.content.*; import android.view.accessibility.*; import org.chromium.base.*; | [
"android.content",
"android.view",
"org.chromium.base"
] | android.content; android.view; org.chromium.base; | 2,868,075 |
@Test
public final void fetchesHtmlUrl() throws Exception {
final Content content = Mockito.mock(Content.class);
// @checkstyle LineLength (1 line)
final String prop = "https://github.com/pengwynn/octokit/blob/master/README.md";
Mockito.doReturn(
Json.createObjectBuil... | final void function() throws Exception { final Content content = Mockito.mock(Content.class); final String prop = STRhtml_url", prop) .build() ).when(content).json(); MatcherAssert.assertThat( new Content.Smart(content).htmlUrl(), Matchers.is(new URL(prop)) ); } | /**
* Content.Smart can fetch html_url property from Content.
* @throws Exception If some problem inside
*/ | Content.Smart can fetch html_url property from Content | fetchesHtmlUrl | {
"repo_name": "cvrebert/typed-github",
"path": "src/test/java/com/jcabi/github/ContentTest.java",
"license": "bsd-3-clause",
"size": 8686
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.mockito.Mockito"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.mockito.Mockito; | import org.hamcrest.*; import org.mockito.*; | [
"org.hamcrest",
"org.mockito"
] | org.hamcrest; org.mockito; | 1,508,543 |
public static TypeId getTypeId(TypeDescriptor catalogType)
{
TypeDescriptorImpl tdi = (TypeDescriptorImpl) catalogType;
final int jdbcType = catalogType.getJDBCTypeId();
TypeId typeId = TypeId.getBuiltInTypeId(jdbcType);
if (typeId != null)
return typeId;
... | static TypeId function(TypeDescriptor catalogType) { TypeDescriptorImpl tdi = (TypeDescriptorImpl) catalogType; final int jdbcType = catalogType.getJDBCTypeId(); TypeId typeId = TypeId.getBuiltInTypeId(jdbcType); if (typeId != null) return typeId; if (jdbcType == Types.JAVA_OBJECT) { return new TypeId( StoredFormatIds.... | /**
* Get the TypeId (fundemental type information)
* for a catalog type.
* @param catalogType
* @return TypeId that represents the base type, null if not applicable.
*/ | Get the TypeId (fundemental type information) for a catalog type | getTypeId | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/TypeId.java",
"license": "apache-2.0",
"size": 77869
} | [
"com.pivotal.gemfirexd.internal.catalog.TypeDescriptor",
"com.pivotal.gemfirexd.internal.catalog.types.BaseTypeIdImpl",
"com.pivotal.gemfirexd.internal.catalog.types.TypeDescriptorImpl",
"com.pivotal.gemfirexd.internal.shared.common.StoredFormatIds",
"java.sql.Types"
] | import com.pivotal.gemfirexd.internal.catalog.TypeDescriptor; import com.pivotal.gemfirexd.internal.catalog.types.BaseTypeIdImpl; import com.pivotal.gemfirexd.internal.catalog.types.TypeDescriptorImpl; import com.pivotal.gemfirexd.internal.shared.common.StoredFormatIds; import java.sql.Types; | import com.pivotal.gemfirexd.internal.catalog.*; import com.pivotal.gemfirexd.internal.catalog.types.*; import com.pivotal.gemfirexd.internal.shared.common.*; import java.sql.*; | [
"com.pivotal.gemfirexd",
"java.sql"
] | com.pivotal.gemfirexd; java.sql; | 2,367,007 |
@PostConstruct
public void init() {
if (!validateConfiguration()) {
return;
}
try {
// Fetch CRL data synchronously and throw exception to abort if any fail
final Collection<X509CRL> results = this.fetcher.fetch(getResources());
ResourceCR... | void function() { if (!validateConfiguration()) { return; } try { final Collection<X509CRL> results = this.fetcher.fetch(getResources()); ResourceCRLRevocationChecker.this.addCrls(results); } catch (final Exception e) { throw Throwables.propagate(e); } final Runnable scheduledFetcher = () -> { try { final Collection<Re... | /**
* Initializes the process that periodically fetches CRL data.
*/ | Initializes the process that periodically fetches CRL data | init | {
"repo_name": "creamer/cas",
"path": "support/cas-server-support-x509/src/main/java/org/apereo/cas/adaptors/x509/authentication/revocation/checker/ResourceCRLRevocationChecker.java",
"license": "apache-2.0",
"size": 8266
} | [
"com.google.common.base.Throwables",
"java.util.Collection",
"java.util.concurrent.TimeUnit",
"org.springframework.core.io.Resource"
] | import com.google.common.base.Throwables; import java.util.Collection; import java.util.concurrent.TimeUnit; import org.springframework.core.io.Resource; | import com.google.common.base.*; import java.util.*; import java.util.concurrent.*; import org.springframework.core.io.*; | [
"com.google.common",
"java.util",
"org.springframework.core"
] | com.google.common; java.util; org.springframework.core; | 1,543,992 |
@Test
public void testPersistentClusterId() throws Exception {
isPersistenceEnabled = true;
IgniteEx ig0 = startGrid(0);
ig0.cluster().active(true);
UUID id0 = ig0.cluster().id();
stopAllGrids();
ig0 = startGrid(0);
assertEquals(id0, ig0.cluster().id... | void function() throws Exception { isPersistenceEnabled = true; IgniteEx ig0 = startGrid(0); ig0.cluster().active(true); UUID id0 = ig0.cluster().id(); stopAllGrids(); ig0 = startGrid(0); assertEquals(id0, ig0.cluster().id()); } | /**
* Verifies that in persistent-enabled cluster ID is not lost upon cluster restart.
*
* @throws Exception If failed.
*/ | Verifies that in persistent-enabled cluster ID is not lost upon cluster restart | testPersistentClusterId | {
"repo_name": "apache/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/cluster/IgniteClusterIdTagTest.java",
"license": "apache-2.0",
"size": 12974
} | [
"org.apache.ignite.internal.IgniteEx"
] | import org.apache.ignite.internal.IgniteEx; | import org.apache.ignite.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 385,544 |
default SesEndpointBuilder to(List<String> to) {
doSetProperty("to", to);
return this;
} | default SesEndpointBuilder to(List<String> to) { doSetProperty("to", to); return this; } | /**
* List of destination email address. Can be overriden with
* 'CamelAwsSesTo' header.
*
* The option is a: <code>java.util.List<java.lang.String></code>
* type.
*
* Group: producer
*/ | List of destination email address. Can be overriden with 'CamelAwsSesTo' header. The option is a: <code>java.util.List<java.lang.String></code> type. Group: producer | to | {
"repo_name": "adessaigne/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SesEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 15648
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 205,613 |
@Test
public void testComputeHashCode() {
assertEquals(idealIntKind.computeHashCode(),idealIntKind2.computeHashCode());
}
| void function() { assertEquals(idealIntKind.computeHashCode(),idealIntKind2.computeHashCode()); } | /**
* testing the hash code for two integer types
* they've to have the same hash code if they're identical
*/ | testing the hash code for two integer types they've to have the same hash code if they're identical | testComputeHashCode | {
"repo_name": "byu-vv-lab/sarl",
"path": "test/edu/udel/cis/vsl/sarl/type/common/SymbolicIntegerTypeTest.java",
"license": "gpl-3.0",
"size": 3677
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,527,353 |
public void readMessages(KafkaStream<String, StratioStreamingMessage> streams) throws ExecutionValidationException,
ExecutionException {
logger.info("Waiting a message...");
for (MessageAndMetadata stream : streams) {
StratioStreamingMessage theMessage = (StratioStre... | void function(KafkaStream<String, StratioStreamingMessage> streams) throws ExecutionValidationException, ExecutionException { logger.info(STR); for (MessageAndMetadata stream : streams) { StratioStreamingMessage theMessage = (StratioStreamingMessage) stream.message(); processMessage.processMessage(getRow(theMessage.get... | /**
* This method read a message.
*
* @param streams
* @throws ExecutionValidationException
* @throws ExecutionException
*/ | This method read a message | readMessages | {
"repo_name": "Stratio/stratio-connector-streaming",
"path": "connector-streaming/src/main/java/com/stratio/connector/streaming/core/engine/query/queryexecutor/StreamingQueryCreator.java",
"license": "apache-2.0",
"size": 7857
} | [
"com.stratio.connector.streaming.core.exception.ExecutionValidationException",
"com.stratio.crossdata.common.exceptions.ExecutionException",
"com.stratio.streaming.commons.messages.StratioStreamingMessage"
] | import com.stratio.connector.streaming.core.exception.ExecutionValidationException; import com.stratio.crossdata.common.exceptions.ExecutionException; import com.stratio.streaming.commons.messages.StratioStreamingMessage; | import com.stratio.connector.streaming.core.exception.*; import com.stratio.crossdata.common.exceptions.*; import com.stratio.streaming.commons.messages.*; | [
"com.stratio.connector",
"com.stratio.crossdata",
"com.stratio.streaming"
] | com.stratio.connector; com.stratio.crossdata; com.stratio.streaming; | 105,305 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.