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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@see org.hl7.rim.ActRelationship#setSequenceNumber
*/
public void setSequenceNumber(INT sequenceNumber) {
if(sequenceNumber instanceof org.hl7.hibernate.ClonableCollection)
sequenceNumber = ((org.hl7.hibernate.ClonableCollection<INT>) sequenceNumber).cloneHibernateCollectionIfNecessary();
_sequenceNum... | @see org.hl7.rim.ActRelationship#setSequenceNumber */ void function(INT sequenceNumber) { if(sequenceNumber instanceof org.hl7.hibernate.ClonableCollection) sequenceNumber = ((org.hl7.hibernate.ClonableCollection<INT>) sequenceNumber).cloneHibernateCollectionIfNecessary(); _sequenceNumber = sequenceNumber; } | /** Sets the property sequenceNumber.
@see org.hl7.rim.ActRelationship#setSequenceNumber
*/ | Sets the property sequenceNumber | setSequenceNumber | {
"repo_name": "markusgumbel/dshl7",
"path": "hl7-javasig/gencode/org/hl7/rim/impl/ActRelationshipImpl.java",
"license": "apache-2.0",
"size": 15289
} | [
"org.hl7.rim.ActRelationship"
] | import org.hl7.rim.ActRelationship; | import org.hl7.rim.*; | [
"org.hl7.rim"
] | org.hl7.rim; | 2,074,421 |
public static int getLookupDictionary(Context context, long did) {
openDBIfClosed(context);
Cursor cur = null;
try {
cur = mMetaDb.rawQuery("SELECT dictionary FROM customDictionary" + " WHERE did = " + did, null);
if (cur.moveToNext()) {
return cur.get... | static int function(Context context, long did) { openDBIfClosed(context); Cursor cur = null; try { cur = mMetaDb.rawQuery(STR + STR + did, null); if (cur.moveToNext()) { return cur.getInt(0); } else { return -1; } } catch (Exception e) { Timber.e(e, STR); return -1; } finally { if (cur != null && !cur.isClosed()) { cur... | /**
* Returns a custom dictionary associated to a deck
*
* @return integer number of dictionary, -1 if not set (standard dictionary will be used)
*/ | Returns a custom dictionary associated to a deck | getLookupDictionary | {
"repo_name": "leekyounghie/Anki-Android-develop",
"path": "AnkiDroid/src/main/java/com/ichi2/anki/MetaDB.java",
"license": "gpl-3.0",
"size": 23994
} | [
"android.content.Context",
"android.database.Cursor"
] | import android.content.Context; import android.database.Cursor; | import android.content.*; import android.database.*; | [
"android.content",
"android.database"
] | android.content; android.database; | 1,563,579 |
public void propertyChange(PropertyChangeEvent event) {
final String prop = event.getProperty();
// If the property is of any interest to us
if (prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED)
|| prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED)
|| prop.equals(Activator.DECORATORS_CHANGED)) {
postLabelEvent(... | void function(PropertyChangeEvent event) { final String prop = event.getProperty(); if (prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED) prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED) prop.equals(Activator.DECORATORS_CHANGED)) { postLabelEvent(); } else if (prop.equals(UIPreferences.THEME_UncommittedChangeBackgroundColor) pro... | /**
* Callback for IPropertyChangeListener events
*
* If any of the relevant preferences has been changed we refresh all
* decorations (all projects and their resources).
*
* @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/ | Callback for IPropertyChangeListener events If any of the relevant preferences has been changed we refresh all decorations (all projects and their resources) | propertyChange | {
"repo_name": "blizzy78/egit",
"path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java",
"license": "epl-1.0",
"size": 25118
} | [
"org.eclipse.egit.ui.Activator",
"org.eclipse.egit.ui.UIPreferences",
"org.eclipse.jface.util.PropertyChangeEvent",
"org.eclipse.team.ui.TeamUI"
] | import org.eclipse.egit.ui.Activator; import org.eclipse.egit.ui.UIPreferences; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.team.ui.TeamUI; | import org.eclipse.egit.ui.*; import org.eclipse.jface.util.*; import org.eclipse.team.ui.*; | [
"org.eclipse.egit",
"org.eclipse.jface",
"org.eclipse.team"
] | org.eclipse.egit; org.eclipse.jface; org.eclipse.team; | 2,052,168 |
public Object put(Object o,Object p)
{
return put((String) o,(PostfixMathCommandI) p);
}
| Object function(Object o,Object p) { return put((String) o,(PostfixMathCommandI) p); } | /** overrides the standard hashtable method.
* If the arguments are of the wrong type then throws
* ClassCastException
* RJM addition Oct 03
* TODO is Hashtable always index by Strings?
*/ | overrides the standard hashtable method. If the arguments are of the wrong type then throws ClassCastException RJM addition Oct 03 TODO is Hashtable always index by Strings | put | {
"repo_name": "Skyost/Heartbeat",
"path": "src/fr/skyost/heartbeat/jep/FunctionTable.java",
"license": "gpl-3.0",
"size": 1496
} | [
"fr.skyost.heartbeat.jep.functions.PostfixMathCommandI"
] | import fr.skyost.heartbeat.jep.functions.PostfixMathCommandI; | import fr.skyost.heartbeat.jep.functions.*; | [
"fr.skyost.heartbeat"
] | fr.skyost.heartbeat; | 1,348,712 |
private boolean pushHandleGps2Device() {
InputStream io = AbstractDevice.class.getResourceAsStream("handlePopBox.jar");
File dest = new File(FileUtils.getTempDirectory(), "handlePopBox.jar");
try {
FileUtils.copyInputStreamToFile(io, dest);
} catch (IOException e) {
e.printStackTrace();
... | boolean function() { InputStream io = AbstractDevice.class.getResourceAsStream(STR); File dest = new File(FileUtils.getTempDirectory(), STR); try { FileUtils.copyInputStreamToFile(io, dest); } catch (IOException e) { e.printStackTrace(); } CommandLine pushcommand = adbCommand(STR, dest.getAbsolutePath(), STR); String o... | /**
* Push handlePopBox.jar to android tmp folder
*
* @return push device successful or not
*/ | Push handlePopBox.jar to android tmp folder | pushHandleGps2Device | {
"repo_name": "cosysoft/device",
"path": "device-api/src/main/java/com/github/cosysoft/device/android/impl/AbstractDevice.java",
"license": "apache-2.0",
"size": 23930
} | [
"java.io.File",
"java.io.IOException",
"java.io.InputStream",
"org.apache.commons.exec.CommandLine",
"org.apache.commons.io.FileUtils"
] | import java.io.File; import java.io.IOException; import java.io.InputStream; import org.apache.commons.exec.CommandLine; import org.apache.commons.io.FileUtils; | import java.io.*; import org.apache.commons.exec.*; import org.apache.commons.io.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 26,419 |
boolean startJointAutoSpaceBattle(BattleInfo battle, String allyTag, Player allyPlayer, String enemyTag, Player enemyPlayer) {
Fleet f1 = findTaggedFleet(allyTag, allyPlayer);
Fleet f2 = findTaggedFleet(enemyTag, enemyPlayer);
if (battle.targetFleet != null && (battle.targetFleet == f1 || battle.targetFleet... | boolean startJointAutoSpaceBattle(BattleInfo battle, String allyTag, Player allyPlayer, String enemyTag, Player enemyPlayer) { Fleet f1 = findTaggedFleet(allyTag, allyPlayer); Fleet f2 = findTaggedFleet(enemyTag, enemyPlayer); if (battle.targetFleet != null && (battle.targetFleet == f1 battle.targetFleet == f2)) { if (... | /**
* Start a joint autobattle with an ally and enemy fleet.
* @param battle the battle info
* @param allyTag the ally fleet's tag
* @param allyPlayer the ally fleets owner
* @param enemyTag the enemy fleets tag
* @param enemyPlayer the enemy fleets owner
* @return true if the player attacked one o... | Start a joint autobattle with an ally and enemy fleet | startJointAutoSpaceBattle | {
"repo_name": "p-smith/open-ig",
"path": "src/hu/openig/scripting/missions/Mission.java",
"license": "lgpl-3.0",
"size": 30560
} | [
"hu.openig.model.BattleInfo",
"hu.openig.model.Fleet",
"hu.openig.model.Player"
] | import hu.openig.model.BattleInfo; import hu.openig.model.Fleet; import hu.openig.model.Player; | import hu.openig.model.*; | [
"hu.openig.model"
] | hu.openig.model; | 2,371,388 |
protected void putCasResponseAttributesIntoModel(final Map<String, Object> model,
final Map<String, Object> attributes,
final RegisteredService registeredService,
... | void function(final Map<String, Object> model, final Map<String, Object> attributes, final RegisteredService registeredService, final CasProtocolAttributesRenderer attributesRenderer) { LOGGER.trace(STR); val webApplicationService = getServiceFrom(model); val encodedAttributes = protocolAttributeEncoder.encodeAttribute... | /**
* Put cas response attributes into model.
*
* @param model the model
* @param attributes the attributes
* @param registeredService the registered service
* @param attributesRenderer the attributes renderer
*/ | Put cas response attributes into model | putCasResponseAttributesIntoModel | {
"repo_name": "apereo/cas",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/services/web/view/AbstractCasView.java",
"license": "apache-2.0",
"size": 10713
} | [
"java.util.Map",
"org.apereo.cas.CasProtocolConstants",
"org.apereo.cas.services.RegisteredService",
"org.apereo.cas.validation.CasProtocolAttributesRenderer"
] | import java.util.Map; import org.apereo.cas.CasProtocolConstants; import org.apereo.cas.services.RegisteredService; import org.apereo.cas.validation.CasProtocolAttributesRenderer; | import java.util.*; import org.apereo.cas.*; import org.apereo.cas.services.*; import org.apereo.cas.validation.*; | [
"java.util",
"org.apereo.cas"
] | java.util; org.apereo.cas; | 13,257 |
public void removeEntryCb(int pos, SnmpOid row, ObjectName name,
Object entry, SnmpMibTable meta)
throws SnmpStatusException; | void function(int pos, SnmpOid row, ObjectName name, Object entry, SnmpMibTable meta) throws SnmpStatusException; | /**
* This method is called by the SNMP runtime after a new entry
* has been removed from the table.
*
* If raised, SnmpStatusException will be ignored.
*
* <p><b><i>
* You should never need to use this method directly.
* </p></b></i>
*
**/ | This method is called by the SNMP runtime after a new entry has been removed from the table. If raised, SnmpStatusException will be ignored. You should never need to use this method directly. | removeEntryCb | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpTableCallbackHandler.java",
"license": "gpl-2.0",
"size": 2873
} | [
"com.sun.jmx.snmp.SnmpOid",
"com.sun.jmx.snmp.SnmpStatusException",
"com.sun.jmx.snmp.agent.SnmpMibTable",
"javax.management.ObjectName"
] | import com.sun.jmx.snmp.SnmpOid; import com.sun.jmx.snmp.SnmpStatusException; import com.sun.jmx.snmp.agent.SnmpMibTable; import javax.management.ObjectName; | import com.sun.jmx.snmp.*; import com.sun.jmx.snmp.agent.*; import javax.management.*; | [
"com.sun.jmx",
"javax.management"
] | com.sun.jmx; javax.management; | 2,209,990 |
public static String serializeRecordToJson(Record<byte[]> record) {
checkNotNull(record, "record can't be null");
JsonObject result = new JsonObject();
result.addProperty(PAYLOAD_FIELD, getEncoder().encodeToString(record.getValue()));
if (record.getProperties() != null) {
... | static String function(Record<byte[]> record) { checkNotNull(record, STR); JsonObject result = new JsonObject(); result.addProperty(PAYLOAD_FIELD, getEncoder().encodeToString(record.getValue())); if (record.getProperties() != null) { JsonObject properties = new JsonObject(); record.getProperties().entrySet() .forEach(e... | /**
* Serializes sink-record into json format. It encodes encryption-keys, encryption-param and payload in base64
* format so, it can be sent in json.
*
* @param record
* @return
*/ | Serializes sink-record into json format. It encodes encryption-keys, encryption-param and payload in base64 format so, it can be sent in json | serializeRecordToJson | {
"repo_name": "massakam/pulsar",
"path": "pulsar-io/kinesis/src/main/java/org/apache/pulsar/io/kinesis/Utils.java",
"license": "apache-2.0",
"size": 10386
} | [
"com.google.common.base.Preconditions",
"com.google.gson.JsonObject",
"java.util.Base64",
"java.util.Map",
"java.util.Optional",
"org.apache.pulsar.common.api.EncryptionContext",
"org.apache.pulsar.functions.api.Record",
"org.apache.pulsar.functions.source.RecordWithEncryptionContext"
] | import com.google.common.base.Preconditions; import com.google.gson.JsonObject; import java.util.Base64; import java.util.Map; import java.util.Optional; import org.apache.pulsar.common.api.EncryptionContext; import org.apache.pulsar.functions.api.Record; import org.apache.pulsar.functions.source.RecordWithEncryptionCo... | import com.google.common.base.*; import com.google.gson.*; import java.util.*; import org.apache.pulsar.common.api.*; import org.apache.pulsar.functions.api.*; import org.apache.pulsar.functions.source.*; | [
"com.google.common",
"com.google.gson",
"java.util",
"org.apache.pulsar"
] | com.google.common; com.google.gson; java.util; org.apache.pulsar; | 224,170 |
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean b)
{
super.addInformation(itemStack, player, info, b);
FluidStack fs = this.getFluid(itemStack);
if (fs != null)
{
... | @SuppressWarnings({ STR, STR }) void function(ItemStack itemStack, EntityPlayer player, List info, boolean b) { super.addInformation(itemStack, player, info, b); FluidStack fs = this.getFluid(itemStack); if (fs != null) { info.add(STR + FluidRegistry.getFluidName(fs) + STR + fs.amount + STR); } else { info.add(StatColl... | /**
* allows items to add custom lines of information to the mouseover description
*/ | allows items to add custom lines of information to the mouseover description | addInformation | {
"repo_name": "Foghrye4/ihl",
"path": "src/main/java/ihl/processing/metallurgy/Crucible.java",
"license": "gpl-3.0",
"size": 11248
} | [
"java.util.List",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.util.StatCollector",
"net.minecraftforge.fluids.FluidRegistry",
"net.minecraftforge.fluids.FluidStack"
] | import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; | import java.util.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraftforge.fluids.*; | [
"java.util",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraftforge.fluids"
] | java.util; net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraftforge.fluids; | 1,998,766 |
private void showWeatherDataView() {
mErrorMessageDisplay.setVisibility(View.INVISIBLE);
mRecyclerView.setVisibility(View.VISIBLE);
} | void function() { mErrorMessageDisplay.setVisibility(View.INVISIBLE); mRecyclerView.setVisibility(View.VISIBLE); } | /**
* This method will make the View for the weather data visible and
* hide the error message.
* <p>
* Since it is okay to redundantly set the visibility of a View, we don't
* need to check whether each view is currently visible or invisible.
*/ | This method will make the View for the weather data visible and hide the error message. Since it is okay to redundantly set the visibility of a View, we don't need to check whether each view is currently visible or invisible | showWeatherDataView | {
"repo_name": "3Heads6Arms/Sunshine",
"path": "S04.02-Exercise-DisplayDayForecast/app/src/main/java/com/example/android/sunshine/MainActivity.java",
"license": "apache-2.0",
"size": 8097
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,819,312 |
@Deployment
public static WebArchive deploy()
{
JavaArchive testJar = ShrinkWrap
.create(JavaArchive.class, "simpleMessageTest.jar")
.addPackage(SimpleMessageTest.class.getPackage())
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
re... | static WebArchive function() { JavaArchive testJar = ShrinkWrap .create(JavaArchive.class, STR) .addPackage(SimpleMessageTest.class.getPackage()) .addAsManifestResource(EmptyAsset.INSTANCE, STR); return ShrinkWrap .create(WebArchive.class, STR) .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive()) .addAsLibraries(te... | /**
* X TODO creating a WebArchive is only a workaround because JavaArchive
* cannot contain other archives.
*/ | X TODO creating a WebArchive is only a workaround because JavaArchive cannot contain other archives | deploy | {
"repo_name": "LightGuard/incubator-deltaspike",
"path": "deltaspike/core/impl/src/test/java/org/apache/deltaspike/test/core/api/message/SimpleMessageTest.java",
"license": "apache-2.0",
"size": 4350
} | [
"javax.enterprise.inject.spi.Extension",
"org.apache.deltaspike.core.impl.message.MessageBundleExtension",
"org.apache.deltaspike.test.util.ArchiveUtils",
"org.jboss.shrinkwrap.api.ShrinkWrap",
"org.jboss.shrinkwrap.api.asset.EmptyAsset",
"org.jboss.shrinkwrap.api.spec.JavaArchive",
"org.jboss.shrinkwra... | import javax.enterprise.inject.spi.Extension; import org.apache.deltaspike.core.impl.message.MessageBundleExtension; import org.apache.deltaspike.test.util.ArchiveUtils; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.JavaArchive; import... | import javax.enterprise.inject.spi.*; import org.apache.deltaspike.core.impl.message.*; import org.apache.deltaspike.test.util.*; import org.jboss.shrinkwrap.api.*; import org.jboss.shrinkwrap.api.asset.*; import org.jboss.shrinkwrap.api.spec.*; | [
"javax.enterprise",
"org.apache.deltaspike",
"org.jboss.shrinkwrap"
] | javax.enterprise; org.apache.deltaspike; org.jboss.shrinkwrap; | 710,449 |
void onCryptoError(CryptoException e); | void onCryptoError(CryptoException e); | /**
* Invoked when a decoder operation raises a {@link CryptoException}.
*
* @param e The corresponding exception.
*/ | Invoked when a decoder operation raises a <code>CryptoException</code> | onCryptoError | {
"repo_name": "reid-mcpherson/ExoPlayerDebug",
"path": "library/src/main/java/com/google/android/exoplayer/MediaCodecTrackRenderer.java",
"license": "apache-2.0",
"size": 47068
} | [
"android.media.MediaCodec"
] | import android.media.MediaCodec; | import android.media.*; | [
"android.media"
] | android.media; | 2,206,611 |
public static TrDDataSet wrap( double[] data, int[] qube ) {
if (qube.length == 0 ) {
return new TrDDataSet( 1, 1, 1, 1, 1, data );
} else if (qube.length == 1) {
return new TrDDataSet( 1, qube[0], 1, 1, 1, data );
} else if (qube.length == 2) {
return new... | static TrDDataSet function( double[] data, int[] qube ) { if (qube.length == 0 ) { return new TrDDataSet( 1, 1, 1, 1, 1, data ); } else if (qube.length == 1) { return new TrDDataSet( 1, qube[0], 1, 1, 1, data ); } else if (qube.length == 2) { return new TrDDataSet( 2, qube[0], qube[1], 1, 1, data ); } else if (qube.len... | /**
* Wraps an array from array of dimension sizes. The result will have
* rank qube.length().
* @param data array containing the data, with the last dimension contiguous in memory.
* @param qube array specifying the rank and size of each dimension
* @return DDataSet
*/ | Wraps an array from array of dimension sizes. The result will have rank qube.length() | wrap | {
"repo_name": "autoplot/app",
"path": "CdfJavaDataSource/src/org/autoplot/cdf/TrDDataSet.java",
"license": "gpl-2.0",
"size": 21525
} | [
"org.das2.qds.DataSetUtil"
] | import org.das2.qds.DataSetUtil; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 2,588,749 |
@Override
public final BoundType unmarshal(final Value identifier) {
return (identifier != null) ? Types.forCodeName(getCodeListClass(), identifier.value, true) : null;
} | final BoundType function(final Value identifier) { return (identifier != null) ? Types.forCodeName(getCodeListClass(), identifier.value, true) : null; } | /**
* Substitutes the adapter value read from an XML stream by the object which will
* contain the value. JAXB calls automatically this method at unmarshalling time.
*
* @param identifier the code space and identifier.
* @return a code list which represents the GML value.
*/ | Substitutes the adapter value read from an XML stream by the object which will contain the value. JAXB calls automatically this method at unmarshalling time | unmarshal | {
"repo_name": "apache/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/CodeListAdapter.java",
"license": "apache-2.0",
"size": 3812
} | [
"org.apache.sis.util.iso.Types"
] | import org.apache.sis.util.iso.Types; | import org.apache.sis.util.iso.*; | [
"org.apache.sis"
] | org.apache.sis; | 22,524 |
public GeoDistance geoDistance() {
return this.geoDistance;
}
/**
* The distance unit to use. Defaults to {@link org.elasticsearch.common.unit.DistanceUnit#METERS} | GeoDistance function() { return this.geoDistance; } /** * The distance unit to use. Defaults to {@link org.elasticsearch.common.unit.DistanceUnit#METERS} | /**
* Returns the geo distance type used to compute the distance.
*/ | Returns the geo distance type used to compute the distance | geoDistance | {
"repo_name": "yanjunh/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/sort/GeoDistanceSortBuilder.java",
"license": "apache-2.0",
"size": 26524
} | [
"org.elasticsearch.common.geo.GeoDistance",
"org.elasticsearch.common.unit.DistanceUnit"
] | import org.elasticsearch.common.geo.GeoDistance; import org.elasticsearch.common.unit.DistanceUnit; | import org.elasticsearch.common.geo.*; import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,745,749 |
public final Cancellable bulkAsync(BulkRequest bulkRequest, RequestOptions options, ActionListener<BulkResponse> listener) {
return performRequestAsyncAndParseEntity(bulkRequest, RequestConverters::bulk, options,
BulkResponse::fromXContent, listener, emptySet());
} | final Cancellable function(BulkRequest bulkRequest, RequestOptions options, ActionListener<BulkResponse> listener) { return performRequestAsyncAndParseEntity(bulkRequest, RequestConverters::bulk, options, BulkResponse::fromXContent, listener, emptySet()); } | /**
* Asynchronously executes a bulk request using the Bulk API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html">Bulk API on elastic.co</a>
* @param bulkRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#D... | Asynchronously executes a bulk request using the Bulk API. See Bulk API on elastic.co | bulkAsync | {
"repo_name": "uschindler/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java",
"license": "apache-2.0",
"size": 113795
} | [
"java.util.Collections",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.action.bulk.BulkRequest",
"org.elasticsearch.action.bulk.BulkResponse"
] | import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.bulk.BulkRequest; import org.elasticsearch.action.bulk.BulkResponse; | import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.action.bulk.*; | [
"java.util",
"org.elasticsearch.action"
] | java.util; org.elasticsearch.action; | 1,585,920 |
public void setSeriesOutlinePaintType(int series, PaintType paintType) {
setSeriesOutlinePaintType(series, paintType, true);
} | void function(int series, PaintType paintType) { setSeriesOutlinePaintType(series, paintType, true); } | /**
* Sets the paint used for a series outline and sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param series
* the series index (zero-based).
* @param paintType
* the paint (<code>null</code> permitted).
*
* @see #getSeriesO... | Sets the paint used for a series outline and sends a <code>RendererChangeEvent</code> to all registered listeners | setSeriesOutlinePaintType | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-3.0",
"size": 122597
} | [
"org.afree.graphics.PaintType"
] | import org.afree.graphics.PaintType; | import org.afree.graphics.*; | [
"org.afree.graphics"
] | org.afree.graphics; | 419,982 |
public static <E> Iterator<E> dropWhile(Iterator<E> iterator, Predicate<E> predicate) {
return new FilteringIterator<E>(iterator, new DropWhile<E>(predicate));
} | static <E> Iterator<E> function(Iterator<E> iterator, Predicate<E> predicate) { return new FilteringIterator<E>(iterator, new DropWhile<E>(predicate)); } | /**
* Creates an iterator yielding values from the source iterator up until the
* passed predicate doesn't match. E.g:
* <code>dropWhile([2, 4, 3, 6], isOdd) -> [2, 4]</code>
*
* @param <E> the iterator element type
* @param iterator the source iterator
* @param predicate the predicat... | Creates an iterator yielding values from the source iterator up until the passed predicate doesn't match. E.g: <code>dropWhile([2, 4, 3, 6], isOdd) -> [2, 4]</code> | dropWhile | {
"repo_name": "emaze/emaze-dysfunctional",
"path": "src/main/java/net/emaze/dysfunctional/Filtering.java",
"license": "bsd-3-clause",
"size": 15590
} | [
"java.util.Iterator",
"java.util.function.Predicate",
"net.emaze.dysfunctional.filtering.DropWhile",
"net.emaze.dysfunctional.filtering.FilteringIterator"
] | import java.util.Iterator; import java.util.function.Predicate; import net.emaze.dysfunctional.filtering.DropWhile; import net.emaze.dysfunctional.filtering.FilteringIterator; | import java.util.*; import java.util.function.*; import net.emaze.dysfunctional.filtering.*; | [
"java.util",
"net.emaze.dysfunctional"
] | java.util; net.emaze.dysfunctional; | 137,020 |
public List<DatePath> getInputFiles()
{
return Collections.unmodifiableList(inputFiles);
} | List<DatePath> function() { return Collections.unmodifiableList(inputFiles); } | /**
* Gets new input files that were processed. These are files that are within
* the desired date range.
*
* @return input files
*/ | Gets new input files that were processed. These are files that are within the desired date range | getInputFiles | {
"repo_name": "shaohua-zhang/incubator-datafu",
"path": "datafu-hourglass/src/main/java/datafu/hourglass/jobs/AbstractPartitionCollapsingIncrementalJob.java",
"license": "apache-2.0",
"size": 25584
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,535,162 |
@Test
public void testBadConfigurationIgnored() throws IOException,
InterruptedException, KeeperException {
File tmp = FileUtil.mktempdir();
FlumeConfiguration cfg = FlumeConfiguration.createTestableConfiguration();
cfg.set(FlumeConfiguration.MASTER_ZK_LOGDIR, tmp.getAbsolutePath());
cfg.set(F... | void function() throws IOException, InterruptedException, KeeperException { File tmp = FileUtil.mktempdir(); FlumeConfiguration cfg = FlumeConfiguration.createTestableConfiguration(); cfg.set(FlumeConfiguration.MASTER_ZK_LOGDIR, tmp.getAbsolutePath()); cfg.set(FlumeConfiguration.MASTER_ZK_SERVERS, STR); cfg.setInt(Flum... | /**
* Test that a bad configuration is correctly ignored. Bad configurations
* shouldn't necessarily happen, but if ZK dies in the middle of a write for
* some reason it's worth being defensive about this.
*/ | Test that a bad configuration is correctly ignored. Bad configurations shouldn't necessarily happen, but if ZK dies in the middle of a write for some reason it's worth being defensive about this | testBadConfigurationIgnored | {
"repo_name": "hammer/flume",
"path": "src/javatest/com/cloudera/flume/master/TestZKBackedConfigStore.java",
"license": "apache-2.0",
"size": 18329
} | [
"com.cloudera.flume.conf.FlumeConfiguration",
"com.cloudera.flume.conf.thrift.FlumeConfigData",
"com.cloudera.util.Clock",
"com.cloudera.util.FileUtil",
"java.io.File",
"java.io.IOException",
"org.apache.zookeeper.CreateMode",
"org.apache.zookeeper.KeeperException",
"org.apache.zookeeper.ZooDefs",
... | import com.cloudera.flume.conf.FlumeConfiguration; import com.cloudera.flume.conf.thrift.FlumeConfigData; import com.cloudera.util.Clock; import com.cloudera.util.FileUtil; import java.io.File; import java.io.IOException; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException; import org.ap... | import com.cloudera.flume.conf.*; import com.cloudera.flume.conf.thrift.*; import com.cloudera.util.*; import java.io.*; import org.apache.zookeeper.*; import org.apache.zookeeper.data.*; import org.junit.*; | [
"com.cloudera.flume",
"com.cloudera.util",
"java.io",
"org.apache.zookeeper",
"org.junit"
] | com.cloudera.flume; com.cloudera.util; java.io; org.apache.zookeeper; org.junit; | 1,011,606 |
@Theory(nullsAccepted = false)
public final void toStringNotNullOrEmpty(Object x) {
String string = x.toString();
Assert.assertNotNull(string);
Assert.assertFalse(string.isEmpty());
} | @Theory(nullsAccepted = false) final void function(Object x) { String string = x.toString(); Assert.assertNotNull(string); Assert.assertFalse(string.isEmpty()); } | /**
* Check {@link Object#toString()} provides sufficient description condition:
* {@link Object#toString()} never returns {@code null} or an empty string.
*
* @param x primary object instance.
*/ | Check <code>Object#toString()</code> provides sufficient description condition: <code>Object#toString()</code> never returns null or an empty string | toStringNotNullOrEmpty | {
"repo_name": "gwynlavin/jactors-junit",
"path": "src/main/java/org/jactors/junit/theory/ObjectTheory.java",
"license": "mit",
"size": 11071
} | [
"org.junit.Assert",
"org.junit.experimental.theories.Theory"
] | import org.junit.Assert; import org.junit.experimental.theories.Theory; | import org.junit.*; import org.junit.experimental.theories.*; | [
"org.junit",
"org.junit.experimental"
] | org.junit; org.junit.experimental; | 1,399,617 |
public boolean pad(int width) throws IOException; | boolean function(int width) throws IOException; | /**
* Check that the rest of the block has been padded with zeros.
*
* @param width
* The size in bits of the block to pad. This will typically be
* 8, 16, 32, 64, 128, 256, etc.
* @return true if the block was zero padded, or false if the the padding
* c... | Check that the rest of the block has been padded with zeros | pad | {
"repo_name": "Sixstring982/ggj2015",
"path": "src/org/json/zip/BitReader.java",
"license": "gpl-2.0",
"size": 1020
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,859,786 |
public void setContainerPartitionElementHLAPI(
PartitionElementHLAPI elem){
if(elem!=null)
item.setContainerPartitionElement((PartitionElement)elem.getContainedItem());
}
//setters/remover for lists.
| void function( PartitionElementHLAPI elem){ if(elem!=null) item.setContainerPartitionElement((PartitionElement)elem.getContainedItem()); } | /**
* set ContainerPartitionElement
*/ | set ContainerPartitionElement | setContainerPartitionElementHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/MakeListHLAPI.java",
"license": "epl-1.0",
"size": 113889
} | [
"fr.lip6.move.pnml.hlpn.partitions.PartitionElement",
"fr.lip6.move.pnml.hlpn.partitions.hlapi.PartitionElementHLAPI"
] | import fr.lip6.move.pnml.hlpn.partitions.PartitionElement; import fr.lip6.move.pnml.hlpn.partitions.hlapi.PartitionElementHLAPI; | import fr.lip6.move.pnml.hlpn.partitions.*; import fr.lip6.move.pnml.hlpn.partitions.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 123,511 |
public String stringify(StructuralVariation eVariation, String defTabs)
{
if (eVariation == null)
return null;
String tabs = defTabs + TAB;
StringBuilder result = new StringBuilder();
result.append(tabs + "StructuralVariation - variationId: " + eVariation.getVariationId() +
", count: " + eVariati... | String function(StructuralVariation eVariation, String defTabs) { if (eVariation == null) return null; String tabs = defTabs + TAB; StringBuilder result = new StringBuilder(); result.append(tabs + STR + eVariation.getVariationId() + STR + eVariation.getCount() + STR + eVariation.getFirstTimestamp() + STR + eVariation.g... | /**
* Method used to stringify an StructuralVariation.
* @param eVariation The StructuralVariation to be serialized.
* @param defTabs The number of tabs to apply to the serialization.
* @return A String containing a serialized StructuralVariation.
*/ | Method used to stringify an StructuralVariation | stringify | {
"repo_name": "catedrasaes-umu/NoSQLDataEngineering",
"path": "projects/es.um.nosql.s13e.datavisualization/src/data/utils/serializer/NoSQLSchemaSerializer.java",
"license": "mit",
"size": 9805
} | [
"es.um.nosql.s13e.NoSQLSchema"
] | import es.um.nosql.s13e.NoSQLSchema; | import es.um.nosql.s13e.*; | [
"es.um.nosql"
] | es.um.nosql; | 238,471 |
public void close() throws LoggerException {
try{
if (readPreparedStatement != null){
readPreparedStatement.close();
}
}catch (SQLException ex){
logger.error("Error Closing Connection: " + ex);
}
}
| void function() throws LoggerException { try{ if (readPreparedStatement != null){ readPreparedStatement.close(); } }catch (SQLException ex){ logger.error(STR + ex); } } | /**
* Close the PreparedStatement and DB Connection
* @throws SQLException
*/ | Close the PreparedStatement and DB Connection | close | {
"repo_name": "kef/hieos",
"path": "src/logbrowser/src/java/com/vangent/hieos/logbrowser/log/db/GenericTable.java",
"license": "apache-2.0",
"size": 7076
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 33,936 |
@WebMethod(operationName = "GetGeoIP")
@WebResult(name = "GeoIP", targetNamespace = "http://www.webservicex.net/", partName = "Body")
public GeoIP getGeoIP(
@WebParam(partName = "IPAddress", name = "IPAddress", targetNamespace = "")
java.lang.String ipAddress
); | @WebMethod(operationName = STR) @WebResult(name = "GeoIP", targetNamespace = STRIPAddressSTRIPAddressSTR") java.lang.String ipAddress ); | /**
* GeoIPService - GetGeoIP enables you to easily look up countries by IP addresses
*/ | GeoIPService - GetGeoIP enables you to easily look up countries by IP addresses | getGeoIP | {
"repo_name": "Xvozt/java_lessons",
"path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceHttpPost.java",
"license": "apache-2.0",
"size": 1271
} | [
"javax.jws.WebMethod",
"javax.jws.WebResult"
] | import javax.jws.WebMethod; import javax.jws.WebResult; | import javax.jws.*; | [
"javax.jws"
] | javax.jws; | 1,562,197 |
public void bind(Name name, Object obj)
throws NamingException {
bind(name.toString(), obj);
} | void function(Name name, Object obj) throws NamingException { bind(name.toString(), obj); } | /**
* Binds a name to an object. All intermediate contexts and the target
* context (that named by all but terminal atomic component of the name)
* must already exist.
*
* @param name the name to bind; may not be empty
* @param obj the object to bind; possibly null
* @exception Nam... | Binds a name to an object. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist | bind | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/BaseDirContext.java",
"license": "mit",
"size": 45878
} | [
"javax.naming.Name",
"javax.naming.NamingException"
] | import javax.naming.Name; import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 1,178,419 |
ByteBuffer compress(final ByteBuffer bin);
| ByteBuffer compress(final ByteBuffer bin); | /**
* Compresses data onto the provided ByteBuffer.
*
* @param bin
* The data. The data from the position to the limit will be
* compressed. The position will be advanced to the limit as a
* side effect.
*
* @return
* ... | Compresses data onto the provided ByteBuffer | compress | {
"repo_name": "smalyshev/blazegraph",
"path": "bigdata/src/java/com/bigdata/io/compression/IRecordCompressor.java",
"license": "gpl-2.0",
"size": 4505
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,196,818 |
public List<ColumnModel> getCurrentColumns(UserInfo user, String tableId, List<SelectColumn> selectColumns) throws DatastoreException, NotFoundException;
| List<ColumnModel> function(UserInfo user, String tableId, List<SelectColumn> selectColumns) throws DatastoreException, NotFoundException; | /**
* Build a column map for a table using the provided select columns.
* @param user
* @param tableId
* @param selectColumns
* @return
* @throws NotFoundException
* @throws DatastoreException
*/ | Build a column map for a table using the provided select columns | getCurrentColumns | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "services/repository-managers/src/main/java/org/sagebionetworks/repo/manager/table/ColumnModelManager.java",
"license": "apache-2.0",
"size": 5718
} | [
"java.util.List",
"org.sagebionetworks.repo.model.DatastoreException",
"org.sagebionetworks.repo.model.UserInfo",
"org.sagebionetworks.repo.model.table.ColumnModel",
"org.sagebionetworks.repo.model.table.SelectColumn",
"org.sagebionetworks.repo.web.NotFoundException"
] | import java.util.List; import org.sagebionetworks.repo.model.DatastoreException; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.model.table.ColumnModel; import org.sagebionetworks.repo.model.table.SelectColumn; import org.sagebionetworks.repo.web.NotFoundException; | import java.util.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.table.*; import org.sagebionetworks.repo.web.*; | [
"java.util",
"org.sagebionetworks.repo"
] | java.util; org.sagebionetworks.repo; | 1,014,359 |
public void onDateChanged(int oldDay, int oldMonth, int oldYear, int newDay, int newMonth, int newYear);
}
private OnDateChangedListener mOnDateChangedListener;
public DatePickerDialog(Context context) {
super(context, R.style.Material_App_Dialog_DatePicker_Light);
}
public DatePi... | void function(int oldDay, int oldMonth, int oldYear, int newDay, int newMonth, int newYear); } private OnDateChangedListener mOnDateChangedListener; public DatePickerDialog(Context context) { super(context, R.style.Material_App_Dialog_DatePicker_Light); } public DatePickerDialog(Context context, int style) { super(cont... | /**
* Called when the selected date is changed.
* @param oldDay The day value of old date.
* @param oldMonth The month value of old date.
* @param oldYear The year value of old date.
* @param newDay The day value of new date.
* @param newMonth The month value of new... | Called when the selected date is changed | onDateChanged | {
"repo_name": "rey5137/material",
"path": "material/src/main/java/com/rey/material/app/DatePickerDialog.java",
"license": "apache-2.0",
"size": 33076
} | [
"android.content.Context",
"com.rey.material.widget.DatePicker"
] | import android.content.Context; import com.rey.material.widget.DatePicker; | import android.content.*; import com.rey.material.widget.*; | [
"android.content",
"com.rey.material"
] | android.content; com.rey.material; | 440,599 |
protected void setMessage(final RedirectAttributes redirectAttributes, final String message) {
redirectAttributes.addFlashAttribute("message", String.format("%s.", message));
} | void function(final RedirectAttributes redirectAttributes, final String message) { redirectAttributes.addFlashAttribute(STR, String.format("%s.", message)); } | /**
* Set informational message in redirect attributes.
*
* @param redirectAttributes redirect attributes object.
* @param message message.
*/ | Set informational message in redirect attributes | setMessage | {
"repo_name": "lightstar/jobj4-clinic-web",
"path": "src/main/java/ru/lightstar/clinic/controller/ClinicController.java",
"license": "gpl-3.0",
"size": 7961
} | [
"org.springframework.web.servlet.mvc.support.RedirectAttributes"
] | import org.springframework.web.servlet.mvc.support.RedirectAttributes; | import org.springframework.web.servlet.mvc.support.*; | [
"org.springframework.web"
] | org.springframework.web; | 1,236,193 |
public void setPadding(RectangleInsets padding) {
this.padding = padding;
notifyListeners(new PlotChangeEvent(this));
}
| void function(RectangleInsets padding) { this.padding = padding; notifyListeners(new PlotChangeEvent(this)); } | /**
* Sets the padding for the thermometer.
*
* @param padding the padding.
*/ | Sets the padding for the thermometer | setPadding | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/plot/ThermometerPlot.java",
"license": "gpl-2.0",
"size": 48435
} | [
"org.jfree.chart.event.PlotChangeEvent",
"org.jfree.ui.RectangleInsets"
] | import org.jfree.chart.event.PlotChangeEvent; import org.jfree.ui.RectangleInsets; | import org.jfree.chart.event.*; import org.jfree.ui.*; | [
"org.jfree.chart",
"org.jfree.ui"
] | org.jfree.chart; org.jfree.ui; | 2,699,155 |
List<Note> syncDownloadNotesInBox(final Box box); | List<Note> syncDownloadNotesInBox(final Box box); | /**
* Download from backend the list of Notes contained in the box.
* Update the database with the obtained list.
*
* @param box The Box to synchronize with the database.
*/ | Download from backend the list of Notes contained in the box. Update the database with the obtained list | syncDownloadNotesInBox | {
"repo_name": "mapsquare/osm-contributor",
"path": "src/main/java/io/jawg/osmcontributor/rest/managers/SyncNoteManager.java",
"license": "gpl-3.0",
"size": 1581
} | [
"io.jawg.osmcontributor.model.entities.Note",
"io.jawg.osmcontributor.utils.Box",
"java.util.List"
] | import io.jawg.osmcontributor.model.entities.Note; import io.jawg.osmcontributor.utils.Box; import java.util.List; | import io.jawg.osmcontributor.model.entities.*; import io.jawg.osmcontributor.utils.*; import java.util.*; | [
"io.jawg.osmcontributor",
"java.util"
] | io.jawg.osmcontributor; java.util; | 1,052,507 |
public static String[] jsonArrayToStringArray(JSONArray array) {
if (array == null) {
return null;
}
String[] stringArray = new String[array.length()];
for (int i = 0; i < array.length(); i++) {
stringArray[i] = array.optString(i);
}
return str... | static String[] function(JSONArray array) { if (array == null) { return null; } String[] stringArray = new String[array.length()]; for (int i = 0; i < array.length(); i++) { stringArray[i] = array.optString(i); } return stringArray; } | /**
* Convert a JSONArray object to a String Array.
*
* @param array a JSONArray containing only Strings
* @return a String[] with all the items in the JSONArray
*/ | Convert a JSONArray object to a String Array | jsonArrayToStringArray | {
"repo_name": "parvez3019/apps-android-wikipedia",
"path": "app/src/main/java/org/wikipedia/Utils.java",
"license": "apache-2.0",
"size": 22084
} | [
"org.json.JSONArray"
] | import org.json.JSONArray; | import org.json.*; | [
"org.json"
] | org.json; | 148,853 |
public boolean removeChild(INodeDirectory parent, INode child,
int latestSnapshotId) throws QuotaExceededException {
// For a directory that is not a renamed node, if isInLatestSnapshot returns
// false, the directory is not in the latest snapshot, thus we do not need
// to record the removed child ... | boolean function(INodeDirectory parent, INode child, int latestSnapshotId) throws QuotaExceededException { ChildrenDiff diff = diffs.checkAndAddLatestSnapshotDiff(latestSnapshotId, parent).diff; UndoInfo<INode> undoInfo = diff.delete(child); final boolean removed = parent.removeChild(child); if (!removed && undoInfo !=... | /**
* Remove an inode from parent's children list. The caller of this method
* needs to make sure that parent is in the given snapshot "latest".
*/ | Remove an inode from parent's children list. The caller of this method needs to make sure that parent is in the given snapshot "latest" | removeChild | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/DirectoryWithSnapshotFeature.java",
"license": "apache-2.0",
"size": 30396
} | [
"org.apache.hadoop.hdfs.protocol.QuotaExceededException",
"org.apache.hadoop.hdfs.server.namenode.INode",
"org.apache.hadoop.hdfs.server.namenode.INodeDirectory",
"org.apache.hadoop.hdfs.util.Diff"
] | import org.apache.hadoop.hdfs.protocol.QuotaExceededException; import org.apache.hadoop.hdfs.server.namenode.INode; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; import org.apache.hadoop.hdfs.util.Diff; | import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 436,127 |
public boolean isScalarSubquery() {
Preconditions.checkState(isAnalyzed_);
if (!(this instanceof Subquery)) return false;
Subquery subq = (Subquery) this;
SelectStmt stmt = (SelectStmt) subq.getStatement();
return stmt.returnsSingleRow() && getType().isScalarType();
} | boolean function() { Preconditions.checkState(isAnalyzed_); if (!(this instanceof Subquery)) return false; Subquery subq = (Subquery) this; SelectStmt stmt = (SelectStmt) subq.getStatement(); return stmt.returnsSingleRow() && getType().isScalarType(); } | /**
* Return true if this expr is a scalar subquery.
*/ | Return true if this expr is a scalar subquery | isScalarSubquery | {
"repo_name": "cloudera/Impala",
"path": "fe/src/main/java/org/apache/impala/analysis/Expr.java",
"license": "apache-2.0",
"size": 61617
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,455,696 |
public JSONObject put(String key, @SuppressWarnings("rawtypes") Map value) throws JSONException {
this.put(key, new JSONObject(value));
return this;
} | JSONObject function(String key, @SuppressWarnings(STR) Map value) throws JSONException { this.put(key, new JSONObject(value)); return this; } | /**
* Put a key/value pair in the JSONObject, where the value will be a
* JSONObject which is produced from a Map.
*
* @param key
* A key string.
* @param value
* A Map value.
* @return this.
* @throws JSONException
*/ | Put a key/value pair in the JSONObject, where the value will be a JSONObject which is produced from a Map | put | {
"repo_name": "tasomaniac/floodlight-android-ui",
"path": "src/com/tasomaniac/floodlight/utils/JSONObject.java",
"license": "apache-2.0",
"size": 48476
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 37,745 |
private void checkedThreadSimpleTest(CheckedThread[] threads)
throws Exception {
// start all threads
for (CheckedThread t: threads) {
t.start();
}
// wait for thread completion and check exceptions
for (CheckedThread t: threads) {
t.sync();
}
}
// -------------------------------------------... | void function(CheckedThread[] threads) throws Exception { for (CheckedThread t: threads) { t.start(); } for (CheckedThread t: threads) { t.sync(); } } | /**
* Helper method to first start all threads and then wait for their completion.
*
* @param threads threads to use
* @throws Exception exceptions that are thrown from the threads
*/ | Helper method to first start all threads and then wait for their completion | checkedThreadSimpleTest | {
"repo_name": "zimmermatt/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCachePutTest.java",
"license": "apache-2.0",
"size": 32879
} | [
"org.apache.flink.core.testutils.CheckedThread"
] | import org.apache.flink.core.testutils.CheckedThread; | import org.apache.flink.core.testutils.*; | [
"org.apache.flink"
] | org.apache.flink; | 257,649 |
void readFully(byte[] buf, int readOffset, int amtToRead) throws IOException; | void readFully(byte[] buf, int readOffset, int amtToRead) throws IOException; | /**
* Read exactly the given amount of data, throwing an exception
* if EOF is reached before that amount
*/ | Read exactly the given amount of data, throwing an exception if EOF is reached before that amount | readFully | {
"repo_name": "jsrudani/HadoopHDFSProject",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/BlockReader.java",
"license": "apache-2.0",
"size": 3448
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,026,329 |
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
//call the base class to include system menus
boolean result = super.onCreateOptionsMenu(menu);
this.menu = menu;
MenuItem openFile = this.menu.add(LOADGROUP_ID,OPENFILE_ID,0,R.string.load); //Abrir fichero
... | boolean function(Menu menu) { boolean result = super.onCreateOptionsMenu(menu); this.menu = menu; MenuItem openFile = this.menu.add(LOADGROUP_ID,OPENFILE_ID,0,R.string.load); openFile.setIcon(android.R.drawable.ic_menu_add); MenuItem itemZoomOut = this.menu.add(ZOOMGROUP_ID,ZOOMOUT_ID,0,R.string.zoom_out); MenuItem ite... | /**
* Se ejecuta cuando se crea el menu
* @param menu
* @return Devuelve true
*/ | Se ejecuta cuando se crea el menu | onCreateOptionsMenu | {
"repo_name": "Nitijkatiyar/svg4mobile",
"path": "svg4mobile/src/com/grub/svg4mobile/Svg4mobile.java",
"license": "gpl-3.0",
"size": 12985
} | [
"android.view.Menu",
"android.view.MenuItem"
] | import android.view.Menu; import android.view.MenuItem; | import android.view.*; | [
"android.view"
] | android.view; | 743,974 |
private static int read(InputStream is) throws IOException {
int b = is.read();
if (b == -1) {
throw new EOFException();
}
return b;
} | static int function(InputStream is) throws IOException { int b = is.read(); if (b == -1) { throw new EOFException(); } return b; } | /**
* Simple wrapper around {@link java.io.InputStream#read()} that throws EOFException
* instead of returning -1.
*/ | Simple wrapper around <code>java.io.InputStream#read()</code> that throws EOFException instead of returning -1 | read | {
"repo_name": "mirai2015keitai/KuruchanGuide",
"path": "app/libs/volley/src/main/java/com/android/volley/toolbox/DiskBasedCache.java",
"license": "gpl-2.0",
"size": 18500
} | [
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.EOFException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 633,227 |
@Test
public void testFlush ()
{
// flush null stream
assertFalse (StreamHelper.flush ((Flushable) null).isSuccess ());
// flush stream with exception
assertFalse (StreamHelper.flush (new MockThrowingFlushable ()).isSuccess ());
// flush without exception
assertTrue (StreamHelper.flush (... | void function () { assertFalse (StreamHelper.flush ((Flushable) null).isSuccess ()); assertFalse (StreamHelper.flush (new MockThrowingFlushable ()).isSuccess ()); assertTrue (StreamHelper.flush (new MockFlushable ()).isSuccess ()); final MockCloseableWithState c = new MockCloseableWithState (); assertTrue (StreamHelper... | /**
* Test method flush
*/ | Test method flush | testFlush | {
"repo_name": "phax/ph-commons",
"path": "ph-commons/src/test/java/com/helger/commons/io/stream/StreamHelperTest.java",
"license": "apache-2.0",
"size": 17564
} | [
"java.io.FilterOutputStream",
"java.io.Flushable"
] | import java.io.FilterOutputStream; import java.io.Flushable; | import java.io.*; | [
"java.io"
] | java.io; | 6,301 |
public AccessPermission getPermission() {
return permission;
} | AccessPermission function() { return permission; } | /**
* Returns the access permission for the key.
*
* @return the access permission for the key
*/ | Returns the access permission for the key | getPermission | {
"repo_name": "korealerts1/gitblit",
"path": "src/main/java/com/gitblit/transport/ssh/SshKey.java",
"license": "apache-2.0",
"size": 5881
} | [
"com.gitblit.Constants"
] | import com.gitblit.Constants; | import com.gitblit.*; | [
"com.gitblit"
] | com.gitblit; | 1,426,459 |
@HEAD
public Response getApiDetails() throws RMapApiException {
Response response = getDiscoResponseManager().getDiSCOServiceHead();
return response;
} | Response function() throws RMapApiException { Response response = getDiscoResponseManager().getDiSCOServiceHead(); return response; } | /**
* HEAD /discos
* Returns DiSCO API information/link, and lists HTTP options.
*
* @return HTTP Response
* @throws RMapApiException the RMap API exception
*/ | HEAD /discos Returns DiSCO API information/link, and lists HTTP options | getApiDetails | {
"repo_name": "rmap-project/rmap",
"path": "api/src/main/java/info/rmapproject/api/service/DiSCOApiService.java",
"license": "apache-2.0",
"size": 13747
} | [
"info.rmapproject.api.exception.RMapApiException",
"javax.ws.rs.core.Response"
] | import info.rmapproject.api.exception.RMapApiException; import javax.ws.rs.core.Response; | import info.rmapproject.api.exception.*; import javax.ws.rs.core.*; | [
"info.rmapproject.api",
"javax.ws"
] | info.rmapproject.api; javax.ws; | 1,018,717 |
private void setPreferences() {
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
}
| void function() { mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); } | /**
* Fetches and sets the shared preferences.
*/ | Fetches and sets the shared preferences | setPreferences | {
"repo_name": "omgwtfgames/wrist-tweets",
"path": "src/com/sonyericsson/extras/liveview/plugins/AbstractPluginService.java",
"license": "mit",
"size": 13680
} | [
"android.preference.PreferenceManager"
] | import android.preference.PreferenceManager; | import android.preference.*; | [
"android.preference"
] | android.preference; | 2,177,432 |
@Test
@Transactional
public void testSubqueryViaFK() throws Exception {
Connection connection = DataSourceUtils.getConnection(dataSource);
SQLTemplates dialect = H2Templates.builder().quote().build();
QTestPerson testPerson = QTestPerson.testPerson;
QTestAdresse testAdresse ... | void function() throws Exception { Connection connection = DataSourceUtils.getConnection(dataSource); SQLTemplates dialect = H2Templates.builder().quote().build(); QTestPerson testPerson = QTestPerson.testPerson; QTestAdresse testAdresse = QTestAdresse.testAdresse; SQLQuery<Map<Long, List<Long>>> query = new SQLQuery<M... | /**
* <pre>
* select "TEST_PERSON"."SID_TEST_PERSON" from "TEST_PERSON" "TEST_PERSON"
* where ("TEST_PERSON"."SID_TEST_PERSON")
* in (select "TEST_ADRESSE"."SID_TEST_PERSON"
* from "TEST_ADRESSE" "TEST_ADRESSE"
* where "TEST_ADRESSE"."SID_TEST... | <code> select "TEST_PERSON"."SID_TEST_PERSON" from "TEST_PERSON" "TEST_PERSON" where ("TEST_PERSON"."SID_TEST_PERSON") in (select "TEST_ADRESSE"."SID_TEST_PERSON" from "TEST_ADRESSE" "TEST_ADRESSE" where "TEST_ADRESSE"."SID_TEST_PERSON" is not null) </code> | testSubqueryViaFK | {
"repo_name": "csc19601128/misc-examples",
"path": "querydsl/src/test/java/org/csc/phynixx/sqlquery/querydsl/H2DatabaseSQLTest.java",
"license": "apache-2.0",
"size": 33333
} | [
"com.querydsl.core.Tuple",
"com.querydsl.core.types.Projections",
"com.querydsl.sql.H2Templates",
"com.querydsl.sql.SQLQuery",
"com.querydsl.sql.SQLTemplates",
"java.sql.Connection",
"java.util.List",
"java.util.Map",
"org.csc.phynixx.sqlquery.querydsl.legacy.QTestAdresse",
"org.csc.phynixx.sqlque... | import com.querydsl.core.Tuple; import com.querydsl.core.types.Projections; import com.querydsl.sql.H2Templates; import com.querydsl.sql.SQLQuery; import com.querydsl.sql.SQLTemplates; import java.sql.Connection; import java.util.List; import java.util.Map; import org.csc.phynixx.sqlquery.querydsl.legacy.QTestAdresse; ... | import com.querydsl.core.*; import com.querydsl.core.types.*; import com.querydsl.sql.*; import java.sql.*; import java.util.*; import org.csc.phynixx.sqlquery.querydsl.legacy.*; import org.springframework.jdbc.datasource.*; | [
"com.querydsl.core",
"com.querydsl.sql",
"java.sql",
"java.util",
"org.csc.phynixx",
"org.springframework.jdbc"
] | com.querydsl.core; com.querydsl.sql; java.sql; java.util; org.csc.phynixx; org.springframework.jdbc; | 1,727,419 |
@Test
public void testSave() {
newVmInterface.setVmId(VM_ID);
newVmDevice.setId(new VmDeviceId(newVmInterface.getId(), VM_ID));
dao.save(newVmInterface);
vmDevicesDao.save(newVmDevice);
StatsDao.save(newVmInterface.getStatistics());
VmNetworkInterface savedInter... | void function() { newVmInterface.setVmId(VM_ID); newVmDevice.setId(new VmDeviceId(newVmInterface.getId(), VM_ID)); dao.save(newVmInterface); vmDevicesDao.save(newVmDevice); StatsDao.save(newVmInterface.getStatistics()); VmNetworkInterface savedInterface = dao.get(newVmInterface.getId()); assertNotNull(savedInterface); ... | /**
* Ensures that saving an interface works as expected.
*/ | Ensures that saving an interface works as expected | testSave | {
"repo_name": "derekhiggins/ovirt-engine",
"path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAOTest.java",
"license": "apache-2.0",
"size": 8337
} | [
"org.junit.Assert",
"org.ovirt.engine.core.common.businessentities.VmDeviceId",
"org.ovirt.engine.core.common.businessentities.VmNetworkInterface"
] | import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.VmDeviceId; import org.ovirt.engine.core.common.businessentities.VmNetworkInterface; | import org.junit.*; import org.ovirt.engine.core.common.businessentities.*; | [
"org.junit",
"org.ovirt.engine"
] | org.junit; org.ovirt.engine; | 716,282 |
public RedeliveryPolicy retriesExhaustedLogLevel(LoggingLevel retriesExhaustedLogLevel) {
setRetriesExhaustedLogLevel(retriesExhaustedLogLevel);
return this;
} | RedeliveryPolicy function(LoggingLevel retriesExhaustedLogLevel) { setRetriesExhaustedLogLevel(retriesExhaustedLogLevel); return this; } | /**
* Sets the logging level to use for log messages when retries have been exhausted.
*/ | Sets the logging level to use for log messages when retries have been exhausted | retriesExhaustedLogLevel | {
"repo_name": "pmoerenhout/camel",
"path": "core/camel-core-processor/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryPolicy.java",
"license": "apache-2.0",
"size": 27555
} | [
"org.apache.camel.LoggingLevel"
] | import org.apache.camel.LoggingLevel; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,502,930 |
public void write(int c) throws IOException {
ensureOpen();
if (bufferSize == 0) {
initOut();
out.write(c);
}
else {
if (nextChar >= bufferSize)
if (autoFlush)
flushBuffer();
else
... | void function(int c) throws IOException { ensureOpen(); if (bufferSize == 0) { initOut(); out.write(c); } else { if (nextChar >= bufferSize) if (autoFlush) flushBuffer(); else bufferOverflow(); cb[nextChar++] = (char) c; } } | /**
* Write a single character.
*/ | Write a single character | write | {
"repo_name": "devjin24/howtomcatworks",
"path": "bookrefer/jakarta-tomcat-5.0.18-src/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspWriterImpl.java",
"license": "apache-2.0",
"size": 20082
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,179,205 |
void overwriteModelProperties( Properties modelProperties, ModelBuildingRequest request ); | void overwriteModelProperties( Properties modelProperties, ModelBuildingRequest request ); | /**
* This method is responsible for examining the request and possibly overwrite of the valid properties in the model
*
* @param modelProperties
* @param request
*/ | This method is responsible for examining the request and possibly overwrite of the valid properties in the model | overwriteModelProperties | {
"repo_name": "apache/maven",
"path": "maven-model-builder/src/main/java/org/apache/maven/model/interpolation/ModelVersionProcessor.java",
"license": "apache-2.0",
"size": 1612
} | [
"java.util.Properties",
"org.apache.maven.model.building.ModelBuildingRequest"
] | import java.util.Properties; import org.apache.maven.model.building.ModelBuildingRequest; | import java.util.*; import org.apache.maven.model.building.*; | [
"java.util",
"org.apache.maven"
] | java.util; org.apache.maven; | 2,495,234 |
private List<HeaderRecordAndFileHeader<SAMProgramRecord>> translateIds(
final List<HeaderRecordAndFileHeader<SAMProgramRecord>> programGroups,
final Map<SAMFileHeader, Map<String, String>> idTranslationTable,
final boolean translatePpIds) {
//go through programGroups and... | List<HeaderRecordAndFileHeader<SAMProgramRecord>> function( final List<HeaderRecordAndFileHeader<SAMProgramRecord>> programGroups, final Map<SAMFileHeader, Map<String, String>> idTranslationTable, final boolean translatePpIds) { final List<HeaderRecordAndFileHeader<SAMProgramRecord>> result = new LinkedList<HeaderRecor... | /**
* Utility method that takes a list of program groups and remaps all their
* ids (including ppIds if requested) using the given idTranslationTable.
* <p/>
* NOTE: when remapping, this method creates new SAMProgramRecords and
* doesn't mutate any records in the programGroups list.
*
... | Utility method that takes a list of program groups and remaps all their ids (including ppIds if requested) using the given idTranslationTable. doesn't mutate any records in the programGroups list | translateIds | {
"repo_name": "xubo245/CloudSW",
"path": "src/main/java/htsjdk/samtools/SamFileHeaderMerger.java",
"license": "gpl-2.0",
"size": 38388
} | [
"java.util.LinkedList",
"java.util.List",
"java.util.Map"
] | import java.util.LinkedList; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,134,860 |
@Generated
@Selector("preferredDataSource")
public native AVAudioSessionDataSourceDescription preferredDataSource(); | @Selector(STR) native AVAudioSessionDataSourceDescription function(); | /**
* This property reflects the application's preferred data source for the Port. Will be nil if
* there are no selectable data sources or if no preference has been set.
*/ | This property reflects the application's preferred data source for the Port. Will be nil if there are no selectable data sources or if no preference has been set | preferredDataSource | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/avfaudio/AVAudioSessionPortDescription.java",
"license": "apache-2.0",
"size": 8788
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,657,700 |
public Builder icon(@DrawableRes int iconRes) {
this.icon = context.getResources().getDrawable(iconRes);
return this;
} | Builder function(@DrawableRes int iconRes) { this.icon = context.getResources().getDrawable(iconRes); return this; } | /**
* Set title for BottomSheet
*
* @param iconRes icon resource id for BottomSheet
* @return This Builder object to allow for chaining of calls to set methods
*/ | Set title for BottomSheet | icon | {
"repo_name": "stangls/omim",
"path": "android/3rd_party/BottomSheet/src/main/java/com/cocosw/bottomsheet/BottomSheet.java",
"license": "apache-2.0",
"size": 30622
} | [
"android.support.annotation.DrawableRes"
] | import android.support.annotation.DrawableRes; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 2,310,248 |
public void setPlaceholder(Element placeholder) {
m_placeholder = placeholder;
} | void function(Element placeholder) { m_placeholder = placeholder; } | /**
* Sets the placeholder element.<p>
*
* @param placeholder the placeholder element
*/ | Sets the placeholder element | setPlaceholder | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/dnd/CmsDNDHandler.java",
"license": "lgpl-2.1",
"size": 36514
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,478,056 |
public Query getUnsupportedQuery() {
return unsupportedQuery;
}
} | Query function() { return unsupportedQuery; } } | /**
* The actual Lucene query that was unsupported and caused this exception to be thrown.
*/ | The actual Lucene query that was unsupported and caused this exception to be thrown | getUnsupportedQuery | {
"repo_name": "ESamir/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/percolator/ExtractQueryTermsService.java",
"license": "apache-2.0",
"size": 9800
} | [
"org.apache.lucene.search.Query"
] | import org.apache.lucene.search.Query; | import org.apache.lucene.search.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,484,624 |
private void insertSMSCInput(SMSCInput inputDetails){
SqlSession session = sqlSessionFactory.openSession();
try {
session.insert("SMSCInput.insert", inputDetails);
session.commit();
} finally {
session.close();
}
} | void function(SMSCInput inputDetails){ SqlSession session = sqlSessionFactory.openSession(); try { session.insert(STR, inputDetails); session.commit(); } finally { session.close(); } } | /**
* Insert an instance of SMSCInput into the database.
* @param inputDetails the instance to be persisted.
*/ | Insert an instance of SMSCInput into the database | insertSMSCInput | {
"repo_name": "Inhealthcare/open-inhealthcare",
"path": "open-inhealthcare-core/src/main/java/uk/co/inhealthcare/open/smsc/messages/logging/DatabaseSMSCLoggingServiceImpl.java",
"license": "apache-2.0",
"size": 5056
} | [
"org.apache.ibatis.session.SqlSession"
] | import org.apache.ibatis.session.SqlSession; | import org.apache.ibatis.session.*; | [
"org.apache.ibatis"
] | org.apache.ibatis; | 483,256 |
@JsonInclude(Include.NON_NULL)
public String getFile() {
return file;
} | @JsonInclude(Include.NON_NULL) String function() { return file; } | /**
* Get file name
*
* @return file name
*/ | Get file name | getFile | {
"repo_name": "bd2kccd/ccd-annotations",
"path": "src/main/java/edu/pitt/dbmi/ccd/anno/data/AnnotationTargetResource.java",
"license": "lgpl-2.1",
"size": 4287
} | [
"com.fasterxml.jackson.annotation.JsonInclude"
] | import com.fasterxml.jackson.annotation.JsonInclude; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 234,397 |
public synchronized void reset() throws IOException {
throw new IOException("mark/reset not supported");
} | synchronized void function() throws IOException { throw new IOException(STR); } | /**
* Repositions this stream to the position at the time the <code>mark</code>
* method was last called on this input stream.
*
* <p>
* The method <code>reset</code> for class <code>InflaterInputStream</code>
* does nothing except throw an <code>IOException</code>.
*
* @exception IOException
* ... | Repositions this stream to the position at the time the <code>mark</code> method was last called on this input stream. The method <code>reset</code> for class <code>InflaterInputStream</code> does nothing except throw an <code>IOException</code> | reset | {
"repo_name": "zhangjunfang/eclipse-dir",
"path": "nspExt02/src/main/java/core/cn/newcapec/framework/core/utils/zipUtils/InflaterInputStream.java",
"license": "bsd-2-clause",
"size": 8071
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,601,672 |
private static Map<String, Object> updateKafkaProperties(
Map<String, Object> currentConfig,
Map<String, String> ignoredProperties,
Map<String, Object> updates) {
for (String key : updates.keySet()) {
checkArgument(
!ignoredProperties.containsKey(key),
"No need to conf... | static Map<String, Object> function( Map<String, Object> currentConfig, Map<String, String> ignoredProperties, Map<String, Object> updates) { for (String key : updates.keySet()) { checkArgument( !ignoredProperties.containsKey(key), STR, key, ignoredProperties.get(key)); } Map<String, Object> config = new HashMap<>(curr... | /**
* Returns a new config map which is merge of current config and updates. Verifies the updates do
* not includes ignored properties.
*/ | Returns a new config map which is merge of current config and updates. Verifies the updates do not includes ignored properties | updateKafkaProperties | {
"repo_name": "RyanSkraba/beam",
"path": "sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java",
"license": "apache-2.0",
"size": 74037
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.beam.sdk.transforms.PTransform",
"org.apache.beam.sdk.values.PCollection",
"org.apache.beam.sdk.values.PDone",
"org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions",
"org.apache.kafka.clients.producer.ProducerRecord"
] | import java.util.HashMap; import java.util.Map; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.PDone; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions; import org.apache.kafka.clients.producer.ProducerR... | import java.util.*; import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.values.*; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.*; import org.apache.kafka.clients.producer.*; | [
"java.util",
"org.apache.beam",
"org.apache.kafka"
] | java.util; org.apache.beam; org.apache.kafka; | 1,769,847 |
// This input method handles KeyEvent only.
if (!(event instanceof KeyEvent)) {
return;
}
KeyEvent e = (KeyEvent) event;
int eventID = event.getID();
boolean notInCompositionMode = buffer.length() == 0;
if (eventID == KeyEvent.KEY_PRESSED) {
// I... | if (!(event instanceof KeyEvent)) { return; } KeyEvent e = (KeyEvent) event; int eventID = event.getID(); boolean notInCompositionMode = buffer.length() == 0; if (eventID == KeyEvent.KEY_PRESSED) { if (notInCompositionMode) { return; } switch (e.getKeyCode()) { case KeyEvent.VK_LEFT: moveCaretLeft(); break; case KeyEve... | /**
* This is the input method's main routine. The composed text is stored
* in buffer.
*/ | This is the input method's main routine. The composed text is stored in buffer | dispatchEvent | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/demo/jfc/CodePointIM/com/sun/inputmethods/internal/codepointim/CodePointInputMethod.java",
"license": "mit",
"size": 15941
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,298,794 |
@SuppressWarnings("unchecked")
public void addThrowsAdvice(ThrowsAdvice<?> advice)
throws ClassNotFoundException {
List<Type> typeList = ReflectUtils.getAllGenericInterfaces(advice
.getClass(), true);
for (Type type : typeList) {
if (ReflectUtils.isCast(ParameterizedType.class, type)) {
P... | @SuppressWarnings(STR) void function(ThrowsAdvice<?> advice) throws ClassNotFoundException { List<Type> typeList = ReflectUtils.getAllGenericInterfaces(advice .getClass(), true); for (Type type : typeList) { if (ReflectUtils.isCast(ParameterizedType.class, type)) { ParameterizedType pType = (ParameterizedType) type; if... | /**
* Adds the throws advice.
*
* @param advice
* the advice
* @throws ClassNotFoundException
* the class not found exception
*/ | Adds the throws advice | addThrowsAdvice | {
"repo_name": "haint/jgentle",
"path": "src/org/jgentleframework/core/interceptor/ThrowsAdviceStackMethodInterceptor.java",
"license": "apache-2.0",
"size": 7772
} | [
"java.lang.reflect.ParameterizedType",
"java.lang.reflect.Type",
"java.util.List",
"org.jgentleframework.context.aop.advice.ThrowsAdvice",
"org.jgentleframework.utils.ReflectUtils"
] | import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List; import org.jgentleframework.context.aop.advice.ThrowsAdvice; import org.jgentleframework.utils.ReflectUtils; | import java.lang.reflect.*; import java.util.*; import org.jgentleframework.context.aop.advice.*; import org.jgentleframework.utils.*; | [
"java.lang",
"java.util",
"org.jgentleframework.context",
"org.jgentleframework.utils"
] | java.lang; java.util; org.jgentleframework.context; org.jgentleframework.utils; | 1,959,798 |
public static void cancelJob() {
JobManager.instance().cancelAllForTag(TAG);
} | static void function() { JobManager.instance().cancelAllForTag(TAG); } | /**
* Cancel this job.
*/ | Cancel this job | cancelJob | {
"repo_name": "BullshitPingu/Guide7",
"path": "java-app/app/src/main/java/de/be/thaw/util/job/jobs/UpdateScheduleJob.java",
"license": "apache-2.0",
"size": 5851
} | [
"com.evernote.android.job.JobManager"
] | import com.evernote.android.job.JobManager; | import com.evernote.android.job.*; | [
"com.evernote.android"
] | com.evernote.android; | 375,086 |
long getReplicaVisibleLength(final ExtendedBlock block) throws IOException; | long getReplicaVisibleLength(final ExtendedBlock block) throws IOException; | /**
* Get visible length of the specified replica.
*/ | Get visible length of the specified replica | getReplicaVisibleLength | {
"repo_name": "jonathangizmo/HadoopDistJ",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java",
"license": "mit",
"size": 15574
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,888,499 |
@GET
@Path("/{id}/tags")
@ApiOperation(
value = "Get the tags for a cluster",
notes = "Get the tags for the cluster with the supplied id.",
response = String.class,
responseContainer = "List")
@ApiResponses(value = {
@ApiResponse(
... | @Path(STR) @ApiOperation( value = STR, notes = STR, response = String.class, responseContainer = "List") @ApiResponses(value = { @ApiResponse( code = HttpURLConnection.HTTP_NOT_FOUND, message = STR ), @ApiResponse( code = HttpURLConnection.HTTP_PRECON_FAILED, message = STR ), @ApiResponse( code = HttpURLConnection.HTTP... | /**
* Get all the tags for a given cluster.
*
* @param id The id of the cluster to get the tags for. Not
* NULL/empty/blank.
* @return The active set of tags.
* @throws GenieException For any error
*/ | Get all the tags for a given cluster | getTagsForCluster | {
"repo_name": "rspieldenner/genie",
"path": "genie-server/src/main/java/com/netflix/genie/server/resources/ClusterConfigResource.java",
"license": "apache-2.0",
"size": 37763
} | [
"com.netflix.genie.common.exceptions.GenieException",
"com.wordnik.swagger.annotations.ApiOperation",
"com.wordnik.swagger.annotations.ApiParam",
"com.wordnik.swagger.annotations.ApiResponse",
"com.wordnik.swagger.annotations.ApiResponses",
"java.net.HttpURLConnection",
"java.util.List",
"java.util.Se... | import com.netflix.genie.common.exceptions.GenieException; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiResponse; import com.wordnik.swagger.annotations.ApiResponses; import java.net.HttpURLConnection; import java.util.Li... | import com.netflix.genie.common.exceptions.*; import com.wordnik.swagger.annotations.*; import java.net.*; import java.util.*; import javax.ws.rs.*; | [
"com.netflix.genie",
"com.wordnik.swagger",
"java.net",
"java.util",
"javax.ws"
] | com.netflix.genie; com.wordnik.swagger; java.net; java.util; javax.ws; | 803,866 |
public boolean requiresPriorRowState(Mutation m); | boolean function(Mutation m); | /**
* Determines whether or not we need to look up the old row to retrieve old row values for maintaining the index.
* @param m mutation being performed on the data table
* @return true if prior row state is required and false otherwise
*/ | Determines whether or not we need to look up the old row to retrieve old row values for maintaining the index | requiresPriorRowState | {
"repo_name": "ohadshacham/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/IndexMetaData.java",
"license": "apache-2.0",
"size": 1886
} | [
"org.apache.hadoop.hbase.client.Mutation"
] | import org.apache.hadoop.hbase.client.Mutation; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 333,460 |
private JPanel getBusyPanel() {
if (busyPanel == null) {
GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
gridBagConstraints4.gridx = 0;
gridBagConstraints4.insets = new Insets(2, 2, 2, 2);
gridBagConstraints4.fill = GridBagConstraints.HORIZO... | JPanel function() { if (busyPanel == null) { GridBagConstraints gridBagConstraints4 = new GridBagConstraints(); gridBagConstraints4.gridx = 0; gridBagConstraints4.insets = new Insets(2, 2, 2, 2); gridBagConstraints4.fill = GridBagConstraints.HORIZONTAL; gridBagConstraints4.weightx = 1.0D; gridBagConstraints4.gridy = 0;... | /**
* This method initializes busyPanel
*
* @return javax.swing.JPanel
*/ | This method initializes busyPanel | getBusyPanel | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/introduce/src/java/Portal/gov/nih/nci/cagrid/introduce/portal/updater/steps/DownloadsUpdatesStep.java",
"license": "bsd-3-clause",
"size": 17281
} | [
"java.awt.GridBagConstraints",
"java.awt.GridBagLayout",
"java.awt.Insets",
"javax.swing.JPanel"
] | import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,009,903 |
public List<String> getQueries() {
return queries;
} | List<String> function() { return queries; } | /**
* Getter method for the array of queries
*/ | Getter method for the array of queries | getQueries | {
"repo_name": "GoogleCloudPlatform/bigquery-utils",
"path": "tools/query_breakdown/src/main/java/com/google/bigquery/InputReader.java",
"license": "apache-2.0",
"size": 4633
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,104,292 |
private static String nodeDescription(ClusterNode node) {
return new SB(node.getClass().getSimpleName())
.a(" [id=").a(node.id())
.a(", consistentId=").a(node.consistentId())
.a(", isClient=").a(node.isClient())
.a(", ver=").a(node.version()).a(']')
... | static String function(ClusterNode node) { return new SB(node.getClass().getSimpleName()) .a(STR).a(node.id()) .a(STR).a(node.consistentId()) .a(STR).a(node.isClient()) .a(STR).a(node.version()).a(']') .toString(); } | /**
* Provides text descrition of a cluster node.
*
* @param node Node.
*/ | Provides text descrition of a cluster node | nodeDescription | {
"repo_name": "chandresh-pancholi/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 138014
} | [
"org.apache.ignite.cluster.ClusterNode"
] | import org.apache.ignite.cluster.ClusterNode; | import org.apache.ignite.cluster.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,203,919 |
@Adjacency(label = TRANSFORMED_TO, direction = Direction.OUT)
void addLinkToTransformedFile(LinkModel link); | @Adjacency(label = TRANSFORMED_TO, direction = Direction.OUT) void addLinkToTransformedFile(LinkModel link); | /**
* Add a link to a file that was created by transforming this file.
*/ | Add a link to a file that was created by transforming this file | addLinkToTransformedFile | {
"repo_name": "johnsteele/windup",
"path": "graph/api/src/main/java/org/jboss/windup/graph/model/resource/SourceFileModel.java",
"license": "epl-1.0",
"size": 1867
} | [
"org.apache.tinkerpop.gremlin.structure.Direction",
"org.jboss.windup.graph.Adjacency",
"org.jboss.windup.graph.model.LinkModel"
] | import org.apache.tinkerpop.gremlin.structure.Direction; import org.jboss.windup.graph.Adjacency; import org.jboss.windup.graph.model.LinkModel; | import org.apache.tinkerpop.gremlin.structure.*; import org.jboss.windup.graph.*; import org.jboss.windup.graph.model.*; | [
"org.apache.tinkerpop",
"org.jboss.windup"
] | org.apache.tinkerpop; org.jboss.windup; | 1,626,225 |
@Generated
@Selector("setCaption:")
public native void setCaption(String value); | @Selector(STR) native void function(String value); | /**
* Label for the button. Applies to kPDFWidgetPushButtonControl only.
* Used by annotations type(s): /Widget (field type(s): /Btn).
*/ | Label for the button. Applies to kPDFWidgetPushButtonControl only. Used by annotations type(s): /Widget (field type(s): /Btn) | setCaption | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/pdfkit/PDFAnnotation.java",
"license": "apache-2.0",
"size": 36415
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 574,339 |
@Test()
public void checkAddingExistingKey() {
final String key = "key_threw";
this.exception.expect(KeyAlreadyExistsException.class);
this.exception.expectMessage(
String.format(
"In scenario already exist key '%s'",
key
)
... | @Test() void function() { final String key = STR; this.exception.expect(KeyAlreadyExistsException.class); this.exception.expectMessage( String.format( STR, key ) ); new CxSimple( new MapOf<String, Object>( new MapEntry<>( key, "first" ) ) ).add(key, STR); } | /**
* Check adding existing key threw exception.
*/ | Check adding existing key threw exception | checkAddingExistingKey | {
"repo_name": "smallcreep/cucumber-seeds",
"path": "seeds-core/src/test/java/com/github/smallcreep/cucumber/seeds/context/CxSimpleTest.java",
"license": "mit",
"size": 4331
} | [
"javax.management.openmbean.KeyAlreadyExistsException",
"org.cactoos.map.MapEntry",
"org.cactoos.map.MapOf",
"org.junit.Test"
] | import javax.management.openmbean.KeyAlreadyExistsException; import org.cactoos.map.MapEntry; import org.cactoos.map.MapOf; import org.junit.Test; | import javax.management.openmbean.*; import org.cactoos.map.*; import org.junit.*; | [
"javax.management",
"org.cactoos.map",
"org.junit"
] | javax.management; org.cactoos.map; org.junit; | 522,403 |
public synchronized void addDocumentFilter(final DocumentFilter filter) {
Validate.notNull(filter, "Document filter can not be null");
filters.add(filter);
} | synchronized void function(final DocumentFilter filter) { Validate.notNull(filter, STR); filters.add(filter); } | /**
* Adds the document filter for notification when text is added.
*
* @param filter The document filter to add.
*/ | Adds the document filter for notification when text is added | addDocumentFilter | {
"repo_name": "yuchaosydney/kouchat",
"path": "src/main/java/net/usikkert/kouchat/ui/swing/DocumentFilterList.java",
"license": "gpl-3.0",
"size": 3566
} | [
"javax.swing.text.DocumentFilter",
"net.usikkert.kouchat.util.Validate"
] | import javax.swing.text.DocumentFilter; import net.usikkert.kouchat.util.Validate; | import javax.swing.text.*; import net.usikkert.kouchat.util.*; | [
"javax.swing",
"net.usikkert.kouchat"
] | javax.swing; net.usikkert.kouchat; | 2,862,804 |
Resource loadResource(final String path) {
return new ClassPathResource(path,
Thread.currentThread().getContextClassLoader());
} | Resource loadResource(final String path) { return new ClassPathResource(path, Thread.currentThread().getContextClassLoader()); } | /** Loads a resource from the specified classpath.
*
* @param path Resource path. Cannot be null or empty.
* @return A valid resource, never null.
*/ | Loads a resource from the specified classpath | loadResource | {
"repo_name": "seykron/webjars-utils",
"path": "spring-webjars/src/main/java/com/github/seykron/webjars/WebJarResource.java",
"license": "apache-2.0",
"size": 6703
} | [
"org.springframework.core.io.ClassPathResource",
"org.springframework.core.io.Resource"
] | import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; | import org.springframework.core.io.*; | [
"org.springframework.core"
] | org.springframework.core; | 707,184 |
void save(File dir, SnapshotFormat format) throws IOException; | void save(File dir, SnapshotFormat format) throws IOException; | /**
* Exports all regions in the cache to the specified directory. The cache entries in each region
* will be written to a separate file.
*
* @param dir the directory for writing the snapshots, will be created if necessary
* @param format the snapshot format
*
* @throws IOException error writing sn... | Exports all regions in the cache to the specified directory. The cache entries in each region will be written to a separate file | save | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/snapshot/CacheSnapshotService.java",
"license": "apache-2.0",
"size": 6329
} | [
"java.io.File",
"java.io.IOException",
"org.apache.geode.cache.snapshot.SnapshotOptions"
] | import java.io.File; import java.io.IOException; import org.apache.geode.cache.snapshot.SnapshotOptions; | import java.io.*; import org.apache.geode.cache.snapshot.*; | [
"java.io",
"org.apache.geode"
] | java.io; org.apache.geode; | 1,900,799 |
public Set<Object> getIdsToDelete() {
return idsToDelete;
} | Set<Object> function() { return idsToDelete; } | /**
* Returns the delete set.
*
* @return a Set
*/ | Returns the delete set | getIdsToDelete | {
"repo_name": "elsiklab/intermine",
"path": "intermine/objectstore/main/src/org/intermine/sql/writebatch/TableBatch.java",
"license": "lgpl-2.1",
"size": 8005
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,464,500 |
public String run(String scriptName, String argument) throws ResourceException, ScriptException {
Binding binding = new Binding();
binding.setVariable("arg", argument);
Object result = run(scriptName, binding);
return result == null ? "" : result.toString();
} | String function(String scriptName, String argument) throws ResourceException, ScriptException { Binding binding = new Binding(); binding.setVariable("arg", argument); Object result = run(scriptName, binding); return result == null ? "" : result.toString(); } | /**
* Run a script identified by name with a single argument.
*
* @param scriptName name of the script to run
* @param argument a single argument passed as a variable named <code>arg</code> in the binding
* @return a <code>toString()</code> representation of the result of the execution of the... | Run a script identified by name with a single argument | run | {
"repo_name": "komalsukhani/debian-groovy2",
"path": "src/main/groovy/util/GroovyScriptEngine.java",
"license": "apache-2.0",
"size": 27449
} | [
"groovy.lang.Binding"
] | import groovy.lang.Binding; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 2,335,230 |
public List<String> getAllDisplayName(); | List<String> function(); | /**
* Returns all <code>display-name</code> elements
* @return list of <code>display-name</code>
*/ | Returns all <code>display-name</code> elements | getAllDisplayName | {
"repo_name": "forge/javaee-descriptors",
"path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/facesconfig22/FacesConfigFlowDefinitionType.java",
"license": "epl-1.0",
"size": 19945
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 46,075 |
CamelEvent createCamelContextSuspendedEvent(CamelContext context); | CamelEvent createCamelContextSuspendedEvent(CamelContext context); | /**
* Creates an {@link CamelEvent} for Camel has been suspended successfully.
*
* @param context camel context
* @return the created event
*/ | Creates an <code>CamelEvent</code> for Camel has been suspended successfully | createCamelContextSuspendedEvent | {
"repo_name": "pax95/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/spi/EventFactory.java",
"license": "apache-2.0",
"size": 12684
} | [
"org.apache.camel.CamelContext"
] | import org.apache.camel.CamelContext; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 959,389 |
public Set<Table> closure(boolean directed) {
return closure(new HashSet<Table>(), new HashSet<Table>(), directed);
} | Set<Table> function(boolean directed) { return closure(new HashSet<Table>(), new HashSet<Table>(), directed); } | /**
* Gets the closure of the table.
*
* @param directed consider associations as directed?
*
* @return closure of the table (all tables associated (in-)direct with table)
*/ | Gets the closure of the table | closure | {
"repo_name": "Recombine/jailer",
"path": "src/main/net/sf/jailer/datamodel/Table.java",
"license": "apache-2.0",
"size": 17262
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 164,679 |
public static void applicationDidBecomeActive() {
ArrayList<Runnable> callbacks = null;
synchronized(instance.onActiveListeners) {
instance.isActive = true;
callbacks = new ArrayList<Runnable>(instance.onActiveListeners.size());
callbacks.addAll(instance.... | static void function() { ArrayList<Runnable> callbacks = null; synchronized(instance.onActiveListeners) { instance.isActive = true; callbacks = new ArrayList<Runnable>(instance.onActiveListeners.size()); callbacks.addAll(instance.onActiveListeners); instance.onActiveListeners.clear(); } for (Runnable callback : callbac... | /**
* Called as part of the transition from the background to the inactive state;
* here you can undo many of the changes made on entering the background.
*/ | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background | applicationDidBecomeActive | {
"repo_name": "JrmyDev/CodenameOne",
"path": "Ports/iOSPort/src/com/codename1/impl/ios/IOSImplementation.java",
"license": "gpl-2.0",
"size": 274683
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 858,980 |
AggregatedResults generateAggregatedResults(QueryContext federatedQueryContext); | AggregatedResults generateAggregatedResults(QueryContext federatedQueryContext); | /**
* Generate aggregated count histograms, broken down by different demographic
* categories.
*
* @param federatedQueryContext
* @param resultType
* @param intersectionIndex
* @return aggregated result object, holds multiple histograms (once per demographic
* category)
*/ | Generate aggregated count histograms, broken down by different demographic categories | generateAggregatedResults | {
"repo_name": "openfurther/further-open-core",
"path": "fqe/fqe-api/src/main/java/edu/utah/further/fqe/api/service/query/AggregationService.java",
"license": "apache-2.0",
"size": 3247
} | [
"edu.utah.further.fqe.api.ws.to.aggregate.AggregatedResults",
"edu.utah.further.fqe.ds.api.domain.QueryContext"
] | import edu.utah.further.fqe.api.ws.to.aggregate.AggregatedResults; import edu.utah.further.fqe.ds.api.domain.QueryContext; | import edu.utah.further.fqe.api.ws.to.aggregate.*; import edu.utah.further.fqe.ds.api.domain.*; | [
"edu.utah.further"
] | edu.utah.further; | 1,243,088 |
public ScaleInPolicy scaleInPolicy() {
return this.scaleInPolicy;
} | ScaleInPolicy function() { return this.scaleInPolicy; } | /**
* Get specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
*
* @return the scaleInPolicy value
*/ | Get specifies the scale-in policy that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in | scaleInPolicy | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2019_03_01/src/main/java/com/microsoft/azure/management/compute/v2019_03_01/implementation/VirtualMachineScaleSetInner.java",
"license": "mit",
"size": 16799
} | [
"com.microsoft.azure.management.compute.v2019_03_01.ScaleInPolicy"
] | import com.microsoft.azure.management.compute.v2019_03_01.ScaleInPolicy; | import com.microsoft.azure.management.compute.v2019_03_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,890,238 |
public Instance getMachine(String workspaceId, String machineId) throws NotFoundException {
EnvironmentHolder environment;
try (@SuppressWarnings("unused")
Unlocker u = stripedLocks.readLock(workspaceId)) {
environment = environments.get(workspaceId);
}
if (environment == null) {
t... | Instance function(String workspaceId, String machineId) throws NotFoundException { EnvironmentHolder environment; try (@SuppressWarnings(STR) Unlocker u = stripedLocks.readLock(workspaceId)) { environment = environments.get(workspaceId); } if (environment == null) { throw new EnvironmentNotRunningException( STR + works... | /**
* Returns specific machine from environment of specific workspace.
*
* @param workspaceId ID of workspace that owns environment machines
* @param machineId ID of requested machine
* @return requested machine
* @throws EnvironmentNotRunningException if environment is not running
* @throws NotFou... | Returns specific machine from environment of specific workspace | getMachine | {
"repo_name": "TypeFox/che",
"path": "wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/CheEnvironmentEngine.java",
"license": "epl-1.0",
"size": 57062
} | [
"java.lang.String",
"org.eclipse.che.api.core.NotFoundException",
"org.eclipse.che.api.environment.server.exception.EnvironmentNotRunningException",
"org.eclipse.che.api.machine.server.spi.Instance",
"org.eclipse.che.commons.lang.concurrent.Unlocker"
] | import java.lang.String; import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.environment.server.exception.EnvironmentNotRunningException; import org.eclipse.che.api.machine.server.spi.Instance; import org.eclipse.che.commons.lang.concurrent.Unlocker; | import java.lang.*; import org.eclipse.che.api.core.*; import org.eclipse.che.api.environment.server.exception.*; import org.eclipse.che.api.machine.server.spi.*; import org.eclipse.che.commons.lang.concurrent.*; | [
"java.lang",
"org.eclipse.che"
] | java.lang; org.eclipse.che; | 622,876 |
public static List<JVMOption> getOptionsWithRange(Predicate<String> acceptOrigin, String... additionalArgs) throws Exception {
return getOptions(true, acceptOrigin, additionalArgs);
} | static List<JVMOption> function(Predicate<String> acceptOrigin, String... additionalArgs) throws Exception { return getOptions(true, acceptOrigin, additionalArgs); } | /**
* Get JVM options with ranges as list. "acceptOrigin" predicate can be used
* to filter option origin.
*
* @param acceptOrigin predicate for option origins. Origins can be
* "product", "diagnostic" etc. Accept option only if acceptOrigin evaluates
* to true.
* @param additionalArg... | Get JVM options with ranges as list. "acceptOrigin" predicate can be used to filter option origin | getOptionsWithRange | {
"repo_name": "FauxFaux/jdk9-hotspot",
"path": "test/runtime/CommandLine/OptionsValidation/common/optionsvalidation/JVMOptionsUtils.java",
"license": "gpl-2.0",
"size": 19975
} | [
"java.util.List",
"java.util.function.Predicate"
] | import java.util.List; import java.util.function.Predicate; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 1,614,593 |
public JSONArray put(int index, Collection value) throws JSONException {
put(index, new JSONArray(value));
return this;
} | JSONArray function(int index, Collection value) throws JSONException { put(index, new JSONArray(value)); return this; } | /**
* Put a value in the JSONArray, where the value will be a
* JSONArray which is produced from a Collection.
* @param index The subscript.
* @param value A Collection value.
* @return this.
* @throws JSONException If the index is negative or if the value is
* not finite.
*... | Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection | put | {
"repo_name": "rcongiu/Hive-JSON-Serde",
"path": "json/src/main/java/org/openx/data/jsonserde/json/JSONArray.java",
"license": "bsd-3-clause",
"size": 29933
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 42,974 |
public void actionPerformed (ActionEvent e)
{
// don't requery if fieldValue and fieldName are empty
// return;
//
super.actionPerformed(e);
} // actionPerformed
| void function (ActionEvent e) { super.actionPerformed(e); } | /**
* Action Listner
*
* @param e event
*/ | Action Listner | actionPerformed | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/client/src/org/compiere/apps/search/InfoAssignment.java",
"license": "gpl-2.0",
"size": 10258
} | [
"java.awt.event.ActionEvent"
] | import java.awt.event.ActionEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,968,165 |
protected boolean restoreEdit(final Store s, final Cell cell) {
long kvSize = s.add(cell).getFirst();
if (this.rsAccounting != null) {
rsAccounting.addAndGetRegionReplayEditsSize(this.getRegionName(), kvSize);
}
return isFlushSize(this.addAndGetGlobalMemstoreSize(kvSize));
} | boolean function(final Store s, final Cell cell) { long kvSize = s.add(cell).getFirst(); if (this.rsAccounting != null) { rsAccounting.addAndGetRegionReplayEditsSize(this.getRegionName(), kvSize); } return isFlushSize(this.addAndGetGlobalMemstoreSize(kvSize)); } | /**
* Used by tests
* @param s Store to add edit too.
* @param cell Cell to add.
* @return True if we should flush.
*/ | Used by tests | restoreEdit | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java",
"license": "apache-2.0",
"size": 259731
} | [
"org.apache.hadoop.hbase.Cell"
] | import org.apache.hadoop.hbase.Cell; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 469,436 |
@SuppressWarnings({"unchecked", "deprecation"})
public static PartitionKey partitionKeyForPath(Dataset dataset, URI partitionPath) {
Preconditions.checkState(dataset.getDescriptor().isPartitioned(),
"Attempt to get a partition on a non-partitioned dataset (name:%s)",
dataset.getName());
Pre... | @SuppressWarnings({STR, STR}) static PartitionKey function(Dataset dataset, URI partitionPath) { Preconditions.checkState(dataset.getDescriptor().isPartitioned(), STR, dataset.getName()); Preconditions.checkArgument(dataset instanceof FileSystemDataset, STR); FileSystemDataset fsDataset = (FileSystemDataset) dataset; F... | /**
* Get a {@link org.kitesdk.data.spi.PartitionKey} corresponding to a partition's filesystem path
* represented as a {@link URI}. If the path is not a valid partition,
* then {@link IllegalArgumentException} is thrown. Note that the partition does not
* have to exist.
* @param dataset the filesystem d... | Get a <code>org.kitesdk.data.spi.PartitionKey</code> corresponding to a partition's filesystem path represented as a <code>URI</code>. If the path is not a valid partition, then <code>IllegalArgumentException</code> is thrown. Note that the partition does not have to exist | partitionKeyForPath | {
"repo_name": "whoschek/kite",
"path": "kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/filesystem/FileSystemDatasetRepository.java",
"license": "apache-2.0",
"size": 18063
} | [
"com.google.common.base.Preconditions",
"com.google.common.base.Splitter",
"com.google.common.collect.Iterables",
"com.google.common.collect.Lists",
"java.util.Iterator",
"java.util.List",
"org.apache.avro.Schema",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.kitesdk.data.D... | import com.google.common.base.Preconditions; import com.google.common.base.Splitter; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import java.util.Iterator; import java.util.List; import org.apache.avro.Schema; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Pa... | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.avro.*; import org.apache.hadoop.fs.*; import org.kitesdk.data.*; import org.kitesdk.data.spi.*; | [
"com.google.common",
"java.util",
"org.apache.avro",
"org.apache.hadoop",
"org.kitesdk.data"
] | com.google.common; java.util; org.apache.avro; org.apache.hadoop; org.kitesdk.data; | 1,783,316 |
public Date getDate() {
return date;
} | Date function() { return date; } | /**
* <p>Getter for the field <code>date</code>.</p>
*
* @return a java$util$Date object.
*/ | Getter for the field <code>date</code> | getDate | {
"repo_name": "roskens/opennms-pre-github",
"path": "opennms-webapp/src/main/java/org/opennms/web/inventory/InventoryWrapper.java",
"license": "agpl-3.0",
"size": 2772
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,232,662 |
private void openCamera() {
captureFileUri = Uri.fromFile(FilePathUtil.getOutputMediaFile());
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, captureFileUri);
startActivityForResult(intent, CAMERA_REQUEST_CODE);
} | void function() { captureFileUri = Uri.fromFile(FilePathUtil.getOutputMediaFile()); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, captureFileUri); startActivityForResult(intent, CAMERA_REQUEST_CODE); } | /**
* Start Camera activity
*/ | Start Camera activity | openCamera | {
"repo_name": "chrisvdweth/onespace",
"path": "android-application/app/src/main/java/com/sesame/onespace/fragments/ChatRoomFragment.java",
"license": "gpl-3.0",
"size": 31294
} | [
"android.content.Intent",
"android.net.Uri",
"android.provider.MediaStore",
"com.sesame.onespace.utils.FilePathUtil"
] | import android.content.Intent; import android.net.Uri; import android.provider.MediaStore; import com.sesame.onespace.utils.FilePathUtil; | import android.content.*; import android.net.*; import android.provider.*; import com.sesame.onespace.utils.*; | [
"android.content",
"android.net",
"android.provider",
"com.sesame.onespace"
] | android.content; android.net; android.provider; com.sesame.onespace; | 2,743,700 |
public Color getGlobalLight(){
return sun.getLight().cpy().add(moon.getLight());
} | Color function(){ return sun.getLight().cpy().add(moon.getLight()); } | /**
* Returns the sum of every light
* @return a color with a tone
*/ | Returns the sum of every light | getGlobalLight | {
"repo_name": "thtomate/W-E-f-a",
"path": "src/com/BombingGames/WurfelEngine/Core/LightEngine/LightEngine.java",
"license": "bsd-3-clause",
"size": 15618
} | [
"com.badlogic.gdx.graphics.Color"
] | import com.badlogic.gdx.graphics.Color; | import com.badlogic.gdx.graphics.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 552,497 |
T visitWhereClauseLabel(@NotNull wcpsParser.WhereClauseLabelContext ctx); | T visitWhereClauseLabel(@NotNull wcpsParser.WhereClauseLabelContext ctx); | /**
* Visit a parse tree produced by {@link wcpsParser#WhereClauseLabel}.
*
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>wcpsParser#WhereClauseLabel</code> | visitWhereClauseLabel | {
"repo_name": "diogo-andrade/DataHubSystem",
"path": "petascope/src/main/java/petascope/wcps2/parser/wcpsVisitor.java",
"license": "agpl-3.0",
"size": 28497
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,329,959 |
@Override
protected void internalTransform(Body arg0, String arg1,
@SuppressWarnings("rawtypes") Map arg2) {
SootMethod method;
Body body;
Chain<Unit> units;
Chain<Local> locals;
AnnotationStmtSwitch stmtSwitch;
Chain<SootField> fields;
Logger logger = L1Logger.getLogger();... | void function(Body arg0, String arg1, @SuppressWarnings(STR) Map arg2) { SootMethod method; Body body; Chain<Unit> units; Chain<Local> locals; AnnotationStmtSwitch stmtSwitch; Chain<SootField> fields; Logger logger = L1Logger.getLogger(); try { System.out.println(STR); L1Logger.setup(Level.ALL); } catch (IOException e)... | /**
* internalTransform is an internal soot method, which is called somewhere along the way.
* for us, it serves as an entry point to the instrumentation process
*/ | internalTransform is an internal soot method, which is called somewhere along the way. for us, it serves as an entry point to the instrumentation process | internalTransform | {
"repo_name": "mueller91/gradual-java",
"path": "DynamicAnalyzer/testing_external/src/main/java/analyzer/level1/BodyAnalyzer.java",
"license": "bsd-3-clause",
"size": 5166
} | [
"java.io.IOException",
"java.util.Iterator",
"java.util.Map",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.io.IOException; import java.util.Iterator; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; | import java.io.*; import java.util.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,908,988 |
Map<User, Object> map = new HashMap<>();
User user1 = new User("Test", 0, new GregorianCalendar(1980, 3, 12));
User user2 = new User("Test", 0, new GregorianCalendar(1980, 3, 12));
map.put(user1, new Object());
map.put(user2, new Object());
map.forEach((user, o) -> System.out.... | Map<User, Object> map = new HashMap<>(); User user1 = new User("Test", 0, new GregorianCalendar(1980, 3, 12)); User user2 = new User("Test", 0, new GregorianCalendar(1980, 3, 12)); map.put(user1, new Object()); map.put(user2, new Object()); map.forEach((user, o) -> System.out.println(user.toString())); System.out.print... | /**
* Testing addition same objects into map.
*/ | Testing addition same objects into map | whenAddUsersWithoutHashCodeAndEqualsShouldAddBoth | {
"repo_name": "GitKashis/mkubar",
"path": "chapter_005/src/test/ru/job4j/map/UserTest.java",
"license": "apache-2.0",
"size": 772
} | [
"java.util.GregorianCalendar",
"java.util.HashMap",
"java.util.Map",
"org.junit.Test"
] | import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Map; import org.junit.Test; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,680,258 |
private void configure() {
// Configures the document of the editor of this component
PlainDocument document = this.configureDocument();
// Configures the editor (ComboBoxEditor) of this component
configureEditor(document);
// Configures the text-edition-options popupmenu
configureOptionsEditionByMou... | void function() { PlainDocument document = this.configureDocument(); configureEditor(document); configureOptionsEditionByMouse(); } | /**
* Configures the component and some of its parts
*/ | Configures the component and some of its parts | configure | {
"repo_name": "iCarto/siga",
"path": "libUIComponent/src/org/gvsig/gui/beans/editabletextcomponent/EditableTextDecorator.java",
"license": "gpl-3.0",
"size": 18053
} | [
"javax.swing.text.PlainDocument"
] | import javax.swing.text.PlainDocument; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 2,244,884 |
public Invitation load(final InvitationId invitationId) throws DataOperationException, InvitationNotFoundException {
final Invitation invitation = this.invitationDao.load(invitationId);
if (invitation == null) {
throw new InvitationNotFoundException(invitationId);
}
return invitation;
} | Invitation function(final InvitationId invitationId) throws DataOperationException, InvitationNotFoundException { final Invitation invitation = this.invitationDao.load(invitationId); if (invitation == null) { throw new InvitationNotFoundException(invitationId); } return invitation; } | /**
* Loads an {@link Invitation} by it's ID.
*
* @param invitationId
* The ID to load, required.
* @return The matching invitation, if found. Will not return null.
* @throws DataOperationException
* If the query could not be executed.
* @throws InvitationNotFoundException
* ... | Loads an <code>Invitation</code> by it's ID | load | {
"repo_name": "efsavage/ajah",
"path": "ajah-user/src/main/java/com/ajah/user/invitation/data/InvitationManager.java",
"license": "apache-2.0",
"size": 8280
} | [
"com.ajah.spring.jdbc.err.DataOperationException",
"com.ajah.user.invitation.Invitation",
"com.ajah.user.invitation.InvitationId"
] | import com.ajah.spring.jdbc.err.DataOperationException; import com.ajah.user.invitation.Invitation; import com.ajah.user.invitation.InvitationId; | import com.ajah.spring.jdbc.err.*; import com.ajah.user.invitation.*; | [
"com.ajah.spring",
"com.ajah.user"
] | com.ajah.spring; com.ajah.user; | 2,478,798 |
void run(@NonNull V view);
}
private WeakReference<V> viewRef;
private boolean presenterDestroyed = false; | void run(@NonNull V view); } private WeakReference<V> viewRef; private boolean presenterDestroyed = false; | /**
* This method will be invoked to run the action. Implement this method to interact with the view.
* @param view The reference to the view. Not null.
*/ | This method will be invoked to run the action. Implement this method to interact with the view | run | {
"repo_name": "sockeqwe/mosby",
"path": "mvp/src/main/java/com/hannesdorfmann/mosby3/mvp/MvpBasePresenter.java",
"license": "apache-2.0",
"size": 5195
} | [
"android.support.annotation.NonNull",
"java.lang.ref.WeakReference"
] | import android.support.annotation.NonNull; import java.lang.ref.WeakReference; | import android.support.annotation.*; import java.lang.ref.*; | [
"android.support",
"java.lang"
] | android.support; java.lang; | 641,574 |
public static <T> Flux<T> applyOptionalTimeout(Flux<T> publisher, Duration timeout) {
return timeout == null
? publisher
: publisher.timeout(timeout);
}
/**
* Asserts that a value is not {@code null}.
*
* @param param Name of the parameter
* @param value ... | static <T> Flux<T> function(Flux<T> publisher, Duration timeout) { return timeout == null ? publisher : publisher.timeout(timeout); } /** * Asserts that a value is not {@code null}. * * @param param Name of the parameter * @param value Value of the parameter * @throws NullPointerException If {@code value} is {@code nul... | /**
* Applies a timeout to a publisher if the given timeout is not null.
*
* @param publisher Flux to apply optional timeout to.
* @param timeout Optional timeout.
* @param <T> Return type of the Flux.
* @return Flux with an applied timeout, if any.
*/ | Applies a timeout to a publisher if the given timeout is not null | applyOptionalTimeout | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/implementation/StorageImplUtils.java",
"license": "mit",
"size": 11010
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 600,928 |
@RequestMapping("/getFilteredCSWRecords.do")
public ModelAndView getFilteredCSWRecords(
@RequestParam(value = "key", required = false) String[] keys,
@RequestParam(value = "value", required = false) String[] values,
@RequestParam(value = "limit", required = false) Integer... | @RequestMapping(STR) ModelAndView function( @RequestParam(value = "key", required = false) String[] keys, @RequestParam(value = "value", required = false) String[] values, @RequestParam(value = "limit", required = false) Integer maxRecords, @RequestParam(value = "start", required = false, defaultValue = "1") Integer st... | /**
* Gets a list of CSWRecord view objects filtered by the specified values from all internal CSW's
*
* @param cswServiceId
* [Optional] The ID of a CSWService to query (if omitted ALL CSWServices will be queried)
* @param westBoundLongitude
* [Optional] Spati... | Gets a list of CSWRecord view objects filtered by the specified values from all internal CSW's | getFilteredCSWRecords | {
"repo_name": "yan073/AuScope-Portal",
"path": "src/main/java/org/auscope/portal/server/web/controllers/CSWFilterController.java",
"license": "lgpl-3.0",
"size": 22092
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"org.auscope.portal.core.services.csw.custom.CustomRegistryInt",
"org.auscope.portal.core.services.methodmakers.filter.csw.CSWGetDataRecordsFilter",
"org.auscope.portal.core.services.responses.csw.CSWGetRecordResponse",
"org.auscope.portal.co... | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.auscope.portal.core.services.csw.custom.CustomRegistryInt; import org.auscope.portal.core.services.methodmakers.filter.csw.CSWGetDataRecordsFilter; import org.auscope.portal.core.services.responses.csw.CSWGetRecordResponse; import o... | import java.util.*; import org.auscope.portal.core.services.csw.custom.*; import org.auscope.portal.core.services.methodmakers.filter.csw.*; import org.auscope.portal.core.services.responses.csw.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*; | [
"java.util",
"org.auscope.portal",
"org.springframework.web"
] | java.util; org.auscope.portal; org.springframework.web; | 205,663 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.