method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void deleteRecord(String tableName, HashMap<String, Object> condition) { if (!_deleteRecord(tableName, condition)) throw new InternalServerErrorException( "Database record delete failed"); }
void function(String tableName, HashMap<String, Object> condition) { if (!_deleteRecord(tableName, condition)) throw new InternalServerErrorException( STR); }
/** * API for deleting records from DB table. * * @param tableName * table name to be deleted * @param condition * condition record to be deleted */
API for deleting records from DB table
deleteRecord
{ "repo_name": "heejin-kim/TizenRT", "path": "external/iotivity/iotivity_1.2-rel/cloud/resourcedirectory/src/main/java/org/iotivity/cloud/rdserver/db/DBManager.java", "license": "apache-2.0", "size": 8067 }
[ "java.util.HashMap", "org.iotivity.cloud.base.exception.ServerException" ]
import java.util.HashMap; import org.iotivity.cloud.base.exception.ServerException;
import java.util.*; import org.iotivity.cloud.base.exception.*;
[ "java.util", "org.iotivity.cloud" ]
java.util; org.iotivity.cloud;
2,279,562
public void restore(final Player player) { if (!backup) return; if (player == null) return; player.setCompassTarget(compass); if (bed != null) player.setBedSpawnLocation(bed); player.setTotalExperience(experience); player.setFoodLevel(foodlevel); player.setGameMode(gamemode); player.setHeal...
void function(final Player player) { if (!backup) return; if (player == null) return; player.setCompassTarget(compass); if (bed != null) player.setBedSpawnLocation(bed); player.setTotalExperience(experience); player.setFoodLevel(foodlevel); player.setGameMode(gamemode); player.setHealth(Math.min(Math.max(0, health), pl...
/** * Restore player's data from the backup.<br> * This method does nothing if no backup is created.<br> * This method does nothing if player is null. * * @param player * The player this backup should be applied to. */
Restore player's data from the backup. This method does nothing if no backup is created. This method does nothing if player is null
restore
{ "repo_name": "ST-DDT/CrazyCore", "path": "src/main/java/de/st_ddt/crazyutil/PlayerSaver.java", "license": "apache-2.0", "size": 9155 }
[ "org.bukkit.entity.Player", "org.bukkit.inventory.PlayerInventory" ]
import org.bukkit.entity.Player; import org.bukkit.inventory.PlayerInventory;
import org.bukkit.entity.*; import org.bukkit.inventory.*;
[ "org.bukkit.entity", "org.bukkit.inventory" ]
org.bukkit.entity; org.bukkit.inventory;
466,087
public void setSensitivity(Context context, float sensitivity) { float s = Math.max(0f, Math.min(1.0f, sensitivity)); ViewConfiguration viewConfiguration = ViewConfiguration.get(context); mTouchSlop = (int) (viewConfiguration.getScaledTouchSlop() * (1 / s)); }
void function(Context context, float sensitivity) { float s = Math.max(0f, Math.min(1.0f, sensitivity)); ViewConfiguration viewConfiguration = ViewConfiguration.get(context); mTouchSlop = (int) (viewConfiguration.getScaledTouchSlop() * (1 / s)); }
/** * Sets the sensitivity of the dragger. * * @param context The application context. * @param sensitivity value between 0 and 1, the final value for touchSlop = * ViewConfiguration.getScaledTouchSlop * (1 / s); */
Sets the sensitivity of the dragger
setSensitivity
{ "repo_name": "yjp999/SMSCollectionTask", "path": "src/com/cloudyang/swipebacklayout/ViewDragHelper.java", "license": "apache-2.0", "size": 62195 }
[ "android.content.Context", "android.view.ViewConfiguration" ]
import android.content.Context; import android.view.ViewConfiguration;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
2,311,177
public void setOnCompletionExceptionHandler(ExceptionHandler onCompletionExceptionHandler) { this.onCompletionExceptionHandler = onCompletionExceptionHandler; }
void function(ExceptionHandler onCompletionExceptionHandler) { this.onCompletionExceptionHandler = onCompletionExceptionHandler; }
/** * To use a custom {@link org.apache.camel.spi.ExceptionHandler} to handle * any thrown exceptions that happens during the file on completion process * where the consumer does either a commit or rollback. The default * implementation will log any exception at WARN level and ignore. */
To use a custom <code>org.apache.camel.spi.ExceptionHandler</code> to handle any thrown exceptions that happens during the file on completion process where the consumer does either a commit or rollback. The default implementation will log any exception at WARN level and ignore
setOnCompletionExceptionHandler
{ "repo_name": "DariusX/camel", "path": "components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java", "license": "apache-2.0", "size": 100960 }
[ "org.apache.camel.spi.ExceptionHandler" ]
import org.apache.camel.spi.ExceptionHandler;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
757,178
@Test public void testDecodeMaxInteger() { final byte[] data = VariableLengthEncodingTest.asByteArray(0xFF, 0xFF, 0xFF, 0xFF, 0x07); final int expected = Integer.MAX_VALUE; final int actual = this.decodeInt(data); Assert.assertEquals(expected, actual); }
void function() { final byte[] data = VariableLengthEncodingTest.asByteArray(0xFF, 0xFF, 0xFF, 0xFF, 0x07); final int expected = Integer.MAX_VALUE; final int actual = this.decodeInt(data); Assert.assertEquals(expected, actual); }
/** * Tests decoding MAX_INTEGER. */
Tests decoding MAX_INTEGER
testDecodeMaxInteger
{ "repo_name": "leadwire-apm/leadwire-javaagent", "path": "leadwire-common/test/kieker/test/common/util/dataformat/VariableLengthEncodingTest.java", "license": "apache-2.0", "size": 4359 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,942,437
public void put( String key, Document document ) { database.put(key, document); }
void function( String key, Document document ) { database.put(key, document); }
/** * Store the supplied document and metadata at the given key. * * @param key the key or identifier for the document * @param document the document that is to be stored * @see SchematicDb#put(String, org.infinispan.schematic.document.Document) */
Store the supplied document and metadata at the given key
put
{ "repo_name": "stemig62/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/LocalDocumentStore.java", "license": "apache-2.0", "size": 16336 }
[ "org.infinispan.schematic.document.Document" ]
import org.infinispan.schematic.document.Document;
import org.infinispan.schematic.document.*;
[ "org.infinispan.schematic" ]
org.infinispan.schematic;
1,712,346
public ASN1Encodable getName() { return (ASN1Encodable)name; } public DistributionPointName( ASN1TaggedObject obj) { this.type = obj.getTagNo(); if (type == 0) { this.name = GeneralNames.getInstance(obj, false); } e...
ASN1Encodable function() { return (ASN1Encodable)name; } public DistributionPointName( ASN1TaggedObject obj) { this.type = obj.getTagNo(); if (type == 0) { this.name = GeneralNames.getInstance(obj, false); } else { this.name = ASN1Set.getInstance(obj, false); } }
/** * Return the tagged object inside the distribution point name. * * @return the underlying choice item. */
Return the tagged object inside the distribution point name
getName
{ "repo_name": "barmstrong/bitcoin-android", "path": "src/com/google/bitcoin/bouncycastle/asn1/x509/DistributionPointName.java", "license": "apache-2.0", "size": 3814 }
[ "com.google.bitcoin.bouncycastle.asn1.ASN1Encodable", "com.google.bitcoin.bouncycastle.asn1.ASN1Set", "com.google.bitcoin.bouncycastle.asn1.ASN1TaggedObject" ]
import com.google.bitcoin.bouncycastle.asn1.ASN1Encodable; import com.google.bitcoin.bouncycastle.asn1.ASN1Set; import com.google.bitcoin.bouncycastle.asn1.ASN1TaggedObject;
import com.google.bitcoin.bouncycastle.asn1.*;
[ "com.google.bitcoin" ]
com.google.bitcoin;
1,735,740
@Operation(desc = "Send the message corresponding to the given messageID to this queue's Dead Letter Address", impact = MBeanOperationInfo.ACTION) boolean sendMessageToDeadLetterAddress(@Parameter(name = "messageID", desc = "A message ID") long messageID) throws Exception;
@Operation(desc = STR, impact = MBeanOperationInfo.ACTION) boolean sendMessageToDeadLetterAddress(@Parameter(name = STR, desc = STR) long messageID) throws Exception;
/** * Sends the message corresponding to the specified message ID to this queue's dead letter address. * * @return {@code true} if the message was sent to the dead letter address, {@code false} else */
Sends the message corresponding to the specified message ID to this queue's dead letter address
sendMessageToDeadLetterAddress
{ "repo_name": "d0k1/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java", "license": "apache-2.0", "size": 22193 }
[ "javax.management.MBeanOperationInfo" ]
import javax.management.MBeanOperationInfo;
import javax.management.*;
[ "javax.management" ]
javax.management;
2,848,362
@Test public void redirectsAndRemovesCookie() throws IOException { final Take take = new TkReturn(new TkEmpty()); final String destination = "/return/to"; MatcherAssert.assertThat( take.act( new RqWithHeader( new RqFake(), ...
void function() throws IOException { final Take take = new TkReturn(new TkEmpty()); final String destination = STR; MatcherAssert.assertThat( take.act( new RqWithHeader( new RqFake(), String.format( STR, URLEncoder.encode( destination, Charset.defaultCharset().name() ) ) ) ).head(), Matchers.contains( STR, String.forma...
/** * TkReturn can redirect to return location * and remove a return cookie. * @throws IOException If some problem inside */
TkReturn can redirect to return location and remove a return cookie
redirectsAndRemovesCookie
{ "repo_name": "antonini/takes", "path": "src/test/java/org/takes/facets/ret/TkReturnTest.java", "license": "mit", "size": 2610 }
[ "java.io.IOException", "java.net.URLEncoder", "java.nio.charset.Charset", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.takes.Take", "org.takes.rq.RqFake", "org.takes.rq.RqWithHeader", "org.takes.tk.TkEmpty" ]
import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.Charset; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.takes.Take; import org.takes.rq.RqFake; import org.takes.rq.RqWithHeader; import org.takes.tk.TkEmpty;
import java.io.*; import java.net.*; import java.nio.charset.*; import org.hamcrest.*; import org.takes.*; import org.takes.rq.*; import org.takes.tk.*;
[ "java.io", "java.net", "java.nio", "org.hamcrest", "org.takes", "org.takes.rq", "org.takes.tk" ]
java.io; java.net; java.nio; org.hamcrest; org.takes; org.takes.rq; org.takes.tk;
1,033,869
@Test public void testHostName() throws Exception { hostNameTlv.setHostName(hostName); result = hostNameTlv.hostName(); assertThat(result, is(hostName)); }
void function() throws Exception { hostNameTlv.setHostName(hostName); result = hostNameTlv.hostName(); assertThat(result, is(hostName)); }
/** * Tests hostName() getter method. */
Tests hostName() getter method
testHostName
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/isis/isisio/src/test/java/org/onosproject/isis/io/isispacket/tlv/HostNameTlvTest.java", "license": "apache-2.0", "size": 2980 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
2,737,522
public static ims.RefMan.domain.objects.CatsReferral extractCatsReferral(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.CatsReferralWithRTTDateVo valueObject) { return extractCatsReferral(domainFactory, valueObject, new HashMap()); }
static ims.RefMan.domain.objects.CatsReferral function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.CatsReferralWithRTTDateVo valueObject) { return extractCatsReferral(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractCatsReferral
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/refman/vo/domain/CatsReferralWithRTTDateVoAssembler.java", "license": "agpl-3.0", "size": 20579 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
728,055
public static void cancelWork(ImageView imageView) { final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView); if (bitmapWorkerTask != null) { bitmapWorkerTask.cancel(true); if (BuildConfig.DEBUG) { final Object bitmapData = bitmapWorkerTask.mData; Log.d(TAG, "cance...
static void function(ImageView imageView) { final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView); if (bitmapWorkerTask != null) { bitmapWorkerTask.cancel(true); if (BuildConfig.DEBUG) { final Object bitmapData = bitmapWorkerTask.mData; Log.d(TAG, STR + bitmapData); } } }
/** * Cancels any pending work attached to the provided ImageView. * * @param imageView */
Cancels any pending work attached to the provided ImageView
cancelWork
{ "repo_name": "snailee/QGallery", "path": "src/com/example/android/displayingbitmaps/util/ImageWorker.java", "license": "apache-2.0", "size": 16483 }
[ "android.widget.ImageView", "com.example.android.common.logger.Log", "kr.qgallery.BuildConfig" ]
import android.widget.ImageView; import com.example.android.common.logger.Log; import kr.qgallery.BuildConfig;
import android.widget.*; import com.example.android.common.logger.*; import kr.qgallery.*;
[ "android.widget", "com.example.android", "kr.qgallery" ]
android.widget; com.example.android; kr.qgallery;
1,481,940
public static void assertXpathValuesNotEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException { assertXpathValuesNotEqual(contro...
static void function(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException { assertXpathValuesNotEqual(controlXpath, testXpath, XMLUnit.buildControlDocument(inXMLString)); }
/** * Assert that the evaluation of two Xpaths in the same XML string are * NOT equal * @param controlXpath * @param testXpath * @param inXMLString * @throws SAXException * @throws IOException */
Assert that the evaluation of two Xpaths in the same XML string are NOT equal
assertXpathValuesNotEqual
{ "repo_name": "xmlunit/xmlunit", "path": "xmlunit-legacy/src/main/java/org/custommonkey/xmlunit/XMLAssert.java", "license": "apache-2.0", "size": 47140 }
[ "java.io.IOException", "org.custommonkey.xmlunit.exceptions.XpathException", "org.xml.sax.SAXException" ]
import java.io.IOException; import org.custommonkey.xmlunit.exceptions.XpathException; import org.xml.sax.SAXException;
import java.io.*; import org.custommonkey.xmlunit.exceptions.*; import org.xml.sax.*;
[ "java.io", "org.custommonkey.xmlunit", "org.xml.sax" ]
java.io; org.custommonkey.xmlunit; org.xml.sax;
314,460
public UserModel setCustomWelcomeScreenViewed(Date customWelcomeScreenViewed) { this.customWelcomeScreenViewed = customWelcomeScreenViewed; return this; } public String getCompany() { return company; }
UserModel function(Date customWelcomeScreenViewed) { this.customWelcomeScreenViewed = customWelcomeScreenViewed; return this; } public String getCompany() { return company; }
/** * Sets the customWelcomeScreenViewed date * * @param customWelcomeScreenViewed the new customWelcomeScreenViewed date * @return the UserModel */
Sets the customWelcomeScreenViewed date
setCustomWelcomeScreenViewed
{ "repo_name": "smartsheet-platform/smartsheet-java-sdk", "path": "src/main/java/com/smartsheet/api/models/UserModel.java", "license": "apache-2.0", "size": 10466 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,046,139
public void validateSchemas(SchemaElement[] schemas) { // validate the schemas and report any problems TreeWalker wlkr = new TreeWalker(m_validationContext, m_validationContext); s_logger.debug("Beginning schema prevalidation pass"); m_validationContext.clearTraversed(); ...
void function(SchemaElement[] schemas) { TreeWalker wlkr = new TreeWalker(m_validationContext, m_validationContext); s_logger.debug(STR); m_validationContext.clearTraversed(); s_logger.debug(STR); for (int i = 0; i < schemas.length; i++) { wlkr.walkSchema(schemas[i], new PrevalidationVisitor(m_validationContext)); s_lo...
/** * Validate the schemas. * * @param schemas schemas to be validated */
Validate the schemas
validateSchemas
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/src/org/jibx/schema/codegen/Refactory.java", "license": "bsd-3-clause", "size": 36253 }
[ "org.jibx.schema.TreeWalker", "org.jibx.schema.elements.SchemaElement", "org.jibx.schema.validation.NameMergeVisitor", "org.jibx.schema.validation.NameRegistrationVisitor", "org.jibx.schema.validation.PrevalidationVisitor", "org.jibx.schema.validation.ValidationVisitor" ]
import org.jibx.schema.TreeWalker; import org.jibx.schema.elements.SchemaElement; import org.jibx.schema.validation.NameMergeVisitor; import org.jibx.schema.validation.NameRegistrationVisitor; import org.jibx.schema.validation.PrevalidationVisitor; import org.jibx.schema.validation.ValidationVisitor;
import org.jibx.schema.*; import org.jibx.schema.elements.*; import org.jibx.schema.validation.*;
[ "org.jibx.schema" ]
org.jibx.schema;
18,187
EReference getOccurrence_VsmElement();
EReference getOccurrence_VsmElement();
/** * Returns the meta object for the reference '{@link org.eclipse.sirius.queryrewriter.Occurrence#getVsmElement <em>Vsm Element</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Vsm Element</em>'. * @see org.eclipse.sirius.queryrewriter.Occurrence#get...
Returns the meta object for the reference '<code>org.eclipse.sirius.queryrewriter.Occurrence#getVsmElement Vsm Element</code>'.
getOccurrence_VsmElement
{ "repo_name": "cbrun/sirius-query-rewriter", "path": "org.eclipse.sirius.queryrewriter/src-gen/org/eclipse/sirius/queryrewriter/QueryrewriterPackage.java", "license": "epl-1.0", "size": 28889 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,140,999
public ServiceFuture<Void> createAsync(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(faceListId, createOptionalParameter), serviceCallback); }
ServiceFuture<Void> function(String faceListId, CreateFaceListsOptionalParameter createOptionalParameter, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(faceListId, createOptionalParameter), serviceCallback); }
/** * Create an empty face list. Up to 64 face lists are allowed to exist in one subscription. * * @param faceListId Id referencing a particular face list. * @param createOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback...
Create an empty face list. Up to 64 face lists are allowed to exist in one subscription
createAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java", "license": "mit", "size": 58127 }
[ "com.microsoft.azure.cognitiveservices.vision.faceapi.models.CreateFaceListsOptionalParameter", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.CreateFaceListsOptionalParameter; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,493,090
void addOfferings(Collection<String> offerings);
void addOfferings(Collection<String> offerings);
/** * Add the specified offerings. * * @param offerings * the offerings */
Add the specified offerings
addOfferings
{ "repo_name": "nuest/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/WritableContentCache.java", "license": "gpl-2.0", "size": 46330 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,630,731
private MCRCondition<Void> buildConditions(String field, String oper, String value) { if (field.contains(",")) { // Multiple fields in one condition, combine with OR StringTokenizer st = new StringTokenizer(field, ", "); MCROrCondition<Void> oc = new MCROrCondition<>(); w...
MCRCondition<Void> function(String field, String oper, String value) { if (field.contains(",")) { StringTokenizer st = new StringTokenizer(field, STR); MCROrCondition<Void> oc = new MCROrCondition<>(); while (st.hasMoreTokens()) { oc.addChild(buildConditions(st.nextToken(), oper, value)); } return oc; } else if (field....
/** * Builds a new MCRCondition from parsed elements * * @param field * one or more field names, separated by comma * @param oper * the condition operator * @param value * the condition value * @return */
Builds a new MCRCondition from parsed elements
buildConditions
{ "repo_name": "MyCoRe-Org/mycore", "path": "mycore-base/src/main/java/org/mycore/services/fieldquery/MCRQueryParser.java", "license": "gpl-3.0", "size": 11942 }
[ "java.util.StringTokenizer", "org.mycore.parsers.bool.MCRAndCondition", "org.mycore.parsers.bool.MCRCondition", "org.mycore.parsers.bool.MCROrCondition" ]
import java.util.StringTokenizer; import org.mycore.parsers.bool.MCRAndCondition; import org.mycore.parsers.bool.MCRCondition; import org.mycore.parsers.bool.MCROrCondition;
import java.util.*; import org.mycore.parsers.bool.*;
[ "java.util", "org.mycore.parsers" ]
java.util; org.mycore.parsers;
647,023
@Override protected void onStartLoading() { super.onStartLoading(); // handle if directory does not exist. Fall back to root. if (mCurrentPath == null || !mCurrentPath.isDirectory()) { mCurrentPath = getRoot(); ...
void function() { super.onStartLoading(); if (mCurrentPath == null !mCurrentPath.isDirectory()) { mCurrentPath = getRoot(); } fileObserver = new FileObserver(mCurrentPath.getPath(), FileObserver.CREATE FileObserver.DELETE FileObserver.MOVED_FROM FileObserver.MOVED_TO ) {
/** * Handles a request to start the Loader. */
Handles a request to start the Loader
onStartLoading
{ "repo_name": "mpv-android/mpv-android", "path": "app/src/main/java/is/xyz/filepicker/FilePickerFragment.java", "license": "mit", "size": 10909 }
[ "android.os.FileObserver" ]
import android.os.FileObserver;
import android.os.*;
[ "android.os" ]
android.os;
1,649,397
private List<ISpeedTestListener> initErrorListener(final SpeedTestError error) throws NoSuchFieldException, IllegalAccessException { mWaiter = new Waiter(); final List<ISpeedTestListener> listenerList = new ArrayList<>();
List<ISpeedTestListener> function(final SpeedTestError error) throws NoSuchFieldException, IllegalAccessException { mWaiter = new Waiter(); final List<ISpeedTestListener> listenerList = new ArrayList<>();
/** * An initialization for all error callback test suite. * * @param error type of error to catch */
An initialization for all error callback test suite
initErrorListener
{ "repo_name": "bertrandmartel/speed-test-lib", "path": "jspeedtest/src/test/java/fr/bmartel/speedtest/test/SpeedTestErrorTest.java", "license": "mit", "size": 15110 }
[ "fr.bmartel.speedtest.inter.ISpeedTestListener", "fr.bmartel.speedtest.model.SpeedTestError", "java.util.ArrayList", "java.util.List", "net.jodah.concurrentunit.Waiter" ]
import fr.bmartel.speedtest.inter.ISpeedTestListener; import fr.bmartel.speedtest.model.SpeedTestError; import java.util.ArrayList; import java.util.List; import net.jodah.concurrentunit.Waiter;
import fr.bmartel.speedtest.inter.*; import fr.bmartel.speedtest.model.*; import java.util.*; import net.jodah.concurrentunit.*;
[ "fr.bmartel.speedtest", "java.util", "net.jodah.concurrentunit" ]
fr.bmartel.speedtest; java.util; net.jodah.concurrentunit;
1,685,417
protected static int calculateMultiBlockPlantDrops(BlockState blockState) { Block block = blockState.getBlock(); Material blockType = blockState.getType(); int dropAmount = mcMMO.getPlaceStore().isTrue(block) ? 0 : 1; if (blockType == Material.CHORUS_PLANT) { dropAmount ...
static int function(BlockState blockState) { Block block = blockState.getBlock(); Material blockType = blockState.getType(); int dropAmount = mcMMO.getPlaceStore().isTrue(block) ? 0 : 1; if (blockType == Material.CHORUS_PLANT) { dropAmount = 1; if (block.getRelative(BlockFace.DOWN, 1).getType() == Material.ENDER_STONE)...
/** * Calculate the drop amounts for multi block plants based on the blocks * relative to them. * * @param blockState * The {@link BlockState} of the bottom block of the plant * @return the number of bonus drops to award from the blocks in this plant */
Calculate the drop amounts for multi block plants based on the blocks relative to them
calculateMultiBlockPlantDrops
{ "repo_name": "EvilOlaf/mcMMO", "path": "src/main/java/com/gmail/nossr50/skills/herbalism/Herbalism.java", "license": "agpl-3.0", "size": 6473 }
[ "java.util.HashSet", "org.bukkit.Material", "org.bukkit.block.Block", "org.bukkit.block.BlockFace", "org.bukkit.block.BlockState" ]
import java.util.HashSet; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState;
import java.util.*; import org.bukkit.*; import org.bukkit.block.*;
[ "java.util", "org.bukkit", "org.bukkit.block" ]
java.util; org.bukkit; org.bukkit.block;
693,884
public void attemptLogin() { if (mAuthTask != null) { return; } // Reset errors. mEmailView.setError(null); mPasswordView.setError(null); // Store values at the time of the login attempt. String email = mEmailView.getText().toString(); St...
void function() { if (mAuthTask != null) { return; } mEmailView.setError(null); mPasswordView.setError(null); String email = mEmailView.getText().toString(); String password = mPasswordView.getText().toString(); boolean cancel = false; View focusView = null; if (!TextUtils.isEmpty(password) && !isPasswordValid(password...
/** * Attempts to sign in or register the account specified by the login form. * If there are form errors (invalid email, missing fields, etc.), the * errors are presented and no actual login attempt is made. */
Attempts to sign in or register the account specified by the login form. If there are form errors (invalid email, missing fields, etc.), the errors are presented and no actual login attempt is made
attemptLogin
{ "repo_name": "dobre-robert-marius/dmi", "path": "app/src/main/java/droid/nucleo/moduleintegrations/app/activities/LoginActivity.java", "license": "mit", "size": 10474 }
[ "android.text.TextUtils", "android.view.View" ]
import android.text.TextUtils; import android.view.View;
import android.text.*; import android.view.*;
[ "android.text", "android.view" ]
android.text; android.view;
34,820
void addFailureListener(FailureListener listener);
void addFailureListener(FailureListener listener);
/** * add a failure listener. * <p> * The listener will be called in the event of connection failure. * * @param listener the listener */
add a failure listener. The listener will be called in the event of connection failure
addFailureListener
{ "repo_name": "wildfly/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java", "license": "apache-2.0", "size": 5093 }
[ "org.apache.activemq.artemis.core.remoting.FailureListener" ]
import org.apache.activemq.artemis.core.remoting.FailureListener;
import org.apache.activemq.artemis.core.remoting.*;
[ "org.apache.activemq" ]
org.apache.activemq;
672,402
public static String getHopDAG(MLContext mlCtx, Script script, ArrayList<Integer> lines, SparkConf newConf, boolean performHOPRewrites, boolean withSubgraph) { SparkConf oldConf = mlCtx.getSparkSession().sparkContext().getConf(); SparkExecutionContext.SparkClusterConfig systemmlConf = SparkExecutionContext.ge...
static String function(MLContext mlCtx, Script script, ArrayList<Integer> lines, SparkConf newConf, boolean performHOPRewrites, boolean withSubgraph) { SparkConf oldConf = mlCtx.getSparkSession().sparkContext().getConf(); SparkExecutionContext.SparkClusterConfig systemmlConf = SparkExecutionContext.getSparkClusterConfi...
/** * Get HOP DAG in dot format for a DML or PYDML Script. * * @param mlCtx * MLContext object. * @param script * The DML or PYDML Script object to execute. * @param lines * Only display the hops that have begin and end line number * equals to the given inte...
Get HOP DAG in dot format for a DML or PYDML Script
getHopDAG
{ "repo_name": "nakul02/incubator-systemml", "path": "src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java", "license": "apache-2.0", "size": 41140 }
[ "java.util.ArrayList", "java.util.Date", "org.apache.spark.SparkConf", "org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext", "org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer" ]
import java.util.ArrayList; import java.util.Date; import org.apache.spark.SparkConf; import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext; import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
import java.util.*; import org.apache.spark.*; import org.apache.sysml.runtime.controlprogram.context.*; import org.apache.sysml.runtime.controlprogram.parfor.stat.*;
[ "java.util", "org.apache.spark", "org.apache.sysml" ]
java.util; org.apache.spark; org.apache.sysml;
2,915,385
EntityType getTargetType(); interface Pre extends ConstructEntityEvent, Cancellable {} interface Post extends ConstructEntityEvent, TargetEntityEvent {}
EntityType getTargetType(); interface Pre extends ConstructEntityEvent, Cancellable {} interface Post extends ConstructEntityEvent, TargetEntityEvent {}
/** * Gets the {@link EntityType} of the target {@link Entity} that is going to be * constructed. * * @return The target entity type */
Gets the <code>EntityType</code> of the target <code>Entity</code> that is going to be constructed
getTargetType
{ "repo_name": "JBYoshi/SpongeAPI", "path": "src/main/java/org/spongepowered/api/event/entity/ConstructEntityEvent.java", "license": "mit", "size": 2697 }
[ "org.spongepowered.api.entity.EntityType", "org.spongepowered.api.event.Cancellable" ]
import org.spongepowered.api.entity.EntityType; import org.spongepowered.api.event.Cancellable;
import org.spongepowered.api.entity.*; import org.spongepowered.api.event.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
2,303,633
public LegendItem getLegendItem(int datasetIndex, int series) { LegendItem result = null; XYPlot plot = getPlot(); if (plot == null) { return null; } XYDataset dataset = plot.getDataset(datasetIndex); if (dataset != null) { if (getItemVisible(...
LegendItem function(int datasetIndex, int series) { LegendItem result = null; XYPlot plot = getPlot(); if (plot == null) { return null; } XYDataset dataset = plot.getDataset(datasetIndex); if (dataset != null) { if (getItemVisible(series, 0)) { String label = getLegendItemLabelGenerator().generateLabel( dataset, series...
/** * Returns a legend item for the specified series. The default method * is overridden so that the legend displays circles for all series. * * @param datasetIndex the dataset index (zero-based). * @param series the series index (zero-based). * * @return A legend item for the seri...
Returns a legend item for the specified series. The default method is overridden so that the legend displays circles for all series
getLegendItem
{ "repo_name": "JSansalone/JFreeChart", "path": "source/org/jfree/chart/renderer/xy/XYBubbleRenderer.java", "license": "lgpl-2.1", "size": 14644 }
[ "java.awt.Paint", "java.awt.Shape", "java.awt.Stroke", "org.jfree.chart.LegendItem", "org.jfree.chart.plot.XYPlot", "org.jfree.data.xy.XYDataset" ]
import java.awt.Paint; import java.awt.Shape; import java.awt.Stroke; import org.jfree.chart.LegendItem; import org.jfree.chart.plot.XYPlot; import org.jfree.data.xy.XYDataset;
import java.awt.*; import org.jfree.chart.*; import org.jfree.chart.plot.*; import org.jfree.data.xy.*;
[ "java.awt", "org.jfree.chart", "org.jfree.data" ]
java.awt; org.jfree.chart; org.jfree.data;
941,398
public InsituRecord[] getValuesFor(String parameterName, GeoPos position) { final int columnIndex = getIndexForParameter(parameterName); final Iterable<Record> records = recordSource.getRecords(); final List<InsituRecord> parameterRecords = new ArrayList<InsituRecord>(); for (Record ...
InsituRecord[] function(String parameterName, GeoPos position) { final int columnIndex = getIndexForParameter(parameterName); final Iterable<Record> records = recordSource.getRecords(); final List<InsituRecord> parameterRecords = new ArrayList<InsituRecord>(); for (Record record : records) { final GeoPos pos = record.g...
/** * Returns an array of {@link InsituRecord}s for the given variable name and the given {@link GeoPos}. * @param parameterName the variable name to get the records for * @param position the position to get the records for * @return an array of in-situ records */
Returns an array of <code>InsituRecord</code>s for the given variable name and the given <code>GeoPos</code>
getValuesFor
{ "repo_name": "seadas/beam", "path": "beam-time-series-tool/src/main/java/org/esa/beam/timeseries/core/insitu/InsituSource.java", "license": "gpl-3.0", "size": 5388 }
[ "java.util.ArrayList", "java.util.Date", "java.util.List", "org.esa.beam.framework.datamodel.GeoPos", "org.esa.beam.timeseries.core.insitu.csv.InsituRecord" ]
import java.util.ArrayList; import java.util.Date; import java.util.List; import org.esa.beam.framework.datamodel.GeoPos; import org.esa.beam.timeseries.core.insitu.csv.InsituRecord;
import java.util.*; import org.esa.beam.framework.datamodel.*; import org.esa.beam.timeseries.core.insitu.csv.*;
[ "java.util", "org.esa.beam" ]
java.util; org.esa.beam;
1,080,640
public CountDownLatch getLocationInventoriesAsync(String productCode, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.LocationInventoryCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmi...
CountDownLatch function(String productCode, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields, AsyncCallback<com.mozu.api.contracts.productadmin.LocationInventoryCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.LocationInventoryCollection> c...
/** * Retrieves all locations for which a product has inventory defined and displays the inventory definition properties of each location. * <p><pre><code> * LocationInventory locationinventory = new LocationInventory(); * CountDownLatch latch = locationinventory.getLocationInventories( productCode, startIndex...
Retrieves all locations for which a product has inventory defined and displays the inventory definition properties of each location. <code><code> LocationInventory locationinventory = new LocationInventory(); CountDownLatch latch = locationinventory.getLocationInventories( productCode, startIndex, pageSize, sortBy, fil...
getLocationInventoriesAsync
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/catalog/admin/products/LocationInventoryResource.java", "license": "mit", "size": 22955 }
[ "com.mozu.api.AsyncCallback", "com.mozu.api.MozuClient", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
553,582
@Test public void testMultipleObtrude() throws Exception { BlockableIncrementFunction increment = new BlockableIncrementFunction("testMultipleObtrude", null, null); CompletableFuture<Integer> cf1 = defaultManagedExecutor.supplyAsync(() -> 80); cf1.obtrudeValue(90); CompletableF...
void function() throws Exception { BlockableIncrementFunction increment = new BlockableIncrementFunction(STR, null, null); CompletableFuture<Integer> cf1 = defaultManagedExecutor.supplyAsync(() -> 80); cf1.obtrudeValue(90); CompletableFuture<Integer> cf2 = cf1.thenApplyAsync(increment); assertEquals(Integer.valueOf(91)...
/** * General test of obtruding values and exceptions. */
General test of obtruding values and exceptions
testMultipleObtrude
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.concurrent.mp_fat/test-applications/MPConcurrentApp/src/concurrent/mp/fat/web/MPConcurrentTestServlet.java", "license": "epl-1.0", "size": 276303 }
[ "java.util.concurrent.CancellationException", "java.util.concurrent.CompletableFuture", "java.util.concurrent.ExecutionException", "java.util.concurrent.TimeUnit", "org.junit.Assert" ]
import java.util.concurrent.CancellationException; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import org.junit.Assert;
import java.util.concurrent.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
895,156
public static CMSArticle getCache(ScriptHandle handle, int id) { if (handle.getCache().contains(CacheGroup.ARTICLE, id)) { return (CMSArticle) handle.getCache().get(CacheGroup.ARTICLE, id); } return null; }
static CMSArticle function(ScriptHandle handle, int id) { if (handle.getCache().contains(CacheGroup.ARTICLE, id)) { return (CMSArticle) handle.getCache().get(CacheGroup.ARTICLE, id); } return null; }
/** * Returns the CMSArticle object by the given id if found, returns {@code null} if no cache was found. * * @param handle the script handle * @param id the id of the article * @return CMSArticle object if cache was found, {@code null} if no cache was found */
Returns the CMSArticle object by the given id if found, returns null if no cache was found
getCache
{ "repo_name": "craftfire/Bifrost", "path": "src/main/java/com/craftfire/bifrost/classes/cms/CMSArticle.java", "license": "lgpl-3.0", "size": 12825 }
[ "com.craftfire.bifrost.classes.general.ScriptHandle", "com.craftfire.bifrost.enums.CacheGroup" ]
import com.craftfire.bifrost.classes.general.ScriptHandle; import com.craftfire.bifrost.enums.CacheGroup;
import com.craftfire.bifrost.classes.general.*; import com.craftfire.bifrost.enums.*;
[ "com.craftfire.bifrost" ]
com.craftfire.bifrost;
384,141
public void mountEntity(Entity entityIn) { super.mountEntity(entityIn); if (entityIn instanceof EntityMinecart) { this.mc.getSoundHandler().playSound(new MovingSoundMinecartRiding(this, (EntityMinecart)entityIn)); } }
void function(Entity entityIn) { super.mountEntity(entityIn); if (entityIn instanceof EntityMinecart) { this.mc.getSoundHandler().playSound(new MovingSoundMinecartRiding(this, (EntityMinecart)entityIn)); } }
/** * Called when a player mounts an entity. e.g. mounts a pig, mounts a boat. */
Called when a player mounts an entity. e.g. mounts a pig, mounts a boat
mountEntity
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/client/entity/EntityPlayerSP.java", "license": "lgpl-2.1", "size": 30523 }
[ "net.minecraft.client.audio.MovingSoundMinecartRiding", "net.minecraft.entity.Entity", "net.minecraft.entity.item.EntityMinecart" ]
import net.minecraft.client.audio.MovingSoundMinecartRiding; import net.minecraft.entity.Entity; import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.client.audio.*; import net.minecraft.entity.*; import net.minecraft.entity.item.*;
[ "net.minecraft.client", "net.minecraft.entity" ]
net.minecraft.client; net.minecraft.entity;
2,746,189
public V put(R row, C column, V value) { Map<C, V> rowdata = super.get(row); if(rowdata == null) { rowdata = Maps.newLinkedHashMap(); super.put(row, rowdata); } rowLength = Math.max(row.toString().length(), rowLength); int current = columns.containsKey...
V function(R row, C column, V value) { Map<C, V> rowdata = super.get(row); if(rowdata == null) { rowdata = Maps.newLinkedHashMap(); super.put(row, rowdata); } rowLength = Math.max(row.toString().length(), rowLength); int current = columns.containsKey(column) ? columns.get(column) : 0; columns.put(column, Math.max(curre...
/** * Insert {@code value} under {@code column} in {@code row}. * * @param row * @param column * @param value * @return the previous value located at the intersection of {@code row} and * {@code column} or {@code null} if one did not previously exist. */
Insert value under column in row
put
{ "repo_name": "bigtreeljc/concourse", "path": "concourse-driver-java/src/main/java/org/cinchapi/concourse/util/PrettyLinkedTableMap.java", "license": "apache-2.0", "size": 5781 }
[ "com.google.common.collect.Maps", "java.util.Map" ]
import com.google.common.collect.Maps; import java.util.Map;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
529,474
public static char[] ts2String(Timeseries series, Alphabet alphabet, int alphabetSize) throws TSException { double[] cuts=null; cuts = alphabet.getCuts(alphabetSize); char[] res = new char[series.size()]; for (int i = 0; i < series.size(); i++) { res[i] = num2char(series.elementAt(i).va...
static char[] function(Timeseries series, Alphabet alphabet, int alphabetSize) throws TSException { double[] cuts=null; cuts = alphabet.getCuts(alphabetSize); char[] res = new char[series.size()]; for (int i = 0; i < series.size(); i++) { res[i] = num2char(series.elementAt(i).value(), cuts); } return res; }
/** * Converts a timeseries into the string using alphabet cuts. * * @param series The timeseries to convert. * @param alphabet The alphabet to use. * @param alphabetSize The alphabet size. * @return Symbolic (SAX) representation of timeseries. * @throws TSException if error occurs. */
Converts a timeseries into the string using alphabet cuts
ts2String
{ "repo_name": "ItGql/SparkIsax", "path": "src/cn/edu/fudan/mmdb/timeseries/TSUtils.java", "license": "mit", "size": 28576 }
[ "cn.edu.fudan.mmdb.sax.alphabet.Alphabet" ]
import cn.edu.fudan.mmdb.sax.alphabet.Alphabet;
import cn.edu.fudan.mmdb.sax.alphabet.*;
[ "cn.edu.fudan" ]
cn.edu.fudan;
929,925
public static UTMPoint LLtoUTM(LatLonPoint llpoint, UTMPoint utmpoint) { return LLtoUTM(llpoint, Ellipsoid.WGS_84, utmpoint); }
static UTMPoint function(LatLonPoint llpoint, UTMPoint utmpoint) { return LLtoUTM(llpoint, Ellipsoid.WGS_84, utmpoint); }
/** * Converts a LatLonPoint to a UTM Point. * * @param llpoint the LatLonPoint to convert. * @param utmpoint a UTMPoint to put the results in. If it's null, * a UTMPoint will be allocated. * @return UTMPoint, or null if something bad happened. If a * UTMPoint was pass...
Converts a LatLonPoint to a UTM Point
LLtoUTM
{ "repo_name": "ta-apps/GpsPrune", "path": "src/com/bbn/openmap/proj/coords/UTMPoint.java", "license": "gpl-2.0", "size": 20632 }
[ "com.bbn.openmap.LatLonPoint", "com.bbn.openmap.proj.Ellipsoid" ]
import com.bbn.openmap.LatLonPoint; import com.bbn.openmap.proj.Ellipsoid;
import com.bbn.openmap.*; import com.bbn.openmap.proj.*;
[ "com.bbn.openmap" ]
com.bbn.openmap;
719,986
EReference getSequence_Animations();
EReference getSequence_Animations();
/** * Returns the meta object for the containment reference list '{@link dk.dtu.se2.animation.Sequence#getAnimations <em>Animations</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Animations</em>'. * @see dk.dtu.se2.animation.Sequence...
Returns the meta object for the containment reference list '<code>dk.dtu.se2.animation.Sequence#getAnimations Animations</code>'.
getSequence_Animations
{ "repo_name": "albertfdp/petrinet", "path": "src/dk.dtu.se2.animation/src/dk/dtu/se2/animation/AnimationPackage.java", "license": "mit", "size": 12159 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,572,355
public void setMemoryIndex(Individual i, int index) { memoryIndex.put(i, index); }
void function(Individual i, int index) { memoryIndex.put(i, index); }
/** * Used for some potential change rule... * * @param index */
Used for some potential change rule..
setMemoryIndex
{ "repo_name": "zet-evacuation/evacuation-cellular-automaton", "path": "src/main/java/org/zet/cellularautomaton/algorithm/rule/ChangePotentialInsufficientAdvancementRule.java", "license": "gpl-2.0", "size": 6811 }
[ "org.zet.cellularautomaton.Individual" ]
import org.zet.cellularautomaton.Individual;
import org.zet.cellularautomaton.*;
[ "org.zet.cellularautomaton" ]
org.zet.cellularautomaton;
1,518,353
@Basic @Column(name = "PERSON_REFERENCE_ID") public String getPersonReferenceId() { return personReferenceId; }
@Column(name = STR) String function() { return personReferenceId; }
/** * Gets the person reference id. * * @return the person reference id */
Gets the person reference id
getPersonReferenceId
{ "repo_name": "Hack23/cia", "path": "model.external.riksdagen.dokumentstatus.impl/src/main/java/com/hack23/cia/model/external/riksdagen/dokumentstatus/impl/DocumentPersonReferenceData.java", "license": "apache-2.0", "size": 7564 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,695
private void testLeaderReinstatement() { testLog.info("testLeaderReinstatement starting"); killActor(leaderActor); leaderActor = newTestRaftActor(leaderId, peerAddresses, leaderConfigParams); leaderActor.underlyingActor().waitForRecoveryComplete(); leaderContext = leaderA...
void function() { testLog.info(STR); killActor(leaderActor); leaderActor = newTestRaftActor(leaderId, peerAddresses, leaderConfigParams); leaderActor.underlyingActor().waitForRecoveryComplete(); leaderContext = leaderActor.underlyingActor().getRaftActorContext(); assertEquals(STR, currentTerm, leaderContext.getReplicat...
/** * Kill the leader actor, reinstate it and verify the recovered journal. */
Kill the leader actor, reinstate it and verify the recovered journal
testLeaderReinstatement
{ "repo_name": "Sushma7785/OpenDayLight-Load-Balancer", "path": "opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicationAndSnapshotsIntegrationTest.java", "license": "epl-1.0", "size": 24462 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
889,768
final LinkedHashMap<K, V> newMap = new LinkedHashMap<K, V>(initialCapacity, loadFactor, false); newMap.putAll(this.map); return newMap; }
final LinkedHashMap<K, V> newMap = new LinkedHashMap<K, V>(initialCapacity, loadFactor, false); newMap.putAll(this.map); return newMap; }
/** * Not synchronized: return a copy of the internal map. * @return */
Not synchronized: return a copy of the internal map
copyMap
{ "repo_name": "MyPictures/NoCheatPlus", "path": "NCPCommons/src/main/java/fr/neatmonster/nocheatplus/utilities/ds/LinkedHashMapCOW.java", "license": "gpl-3.0", "size": 3921 }
[ "java.util.LinkedHashMap" ]
import java.util.LinkedHashMap;
import java.util.*;
[ "java.util" ]
java.util;
379,636
public ServiceCall<Map<String, Map<String, String>>> getDictionaryItemNullAsync(final ServiceCallback<Map<String, Map<String, String>>> serviceCallback) { return ServiceCall.fromResponse(getDictionaryItemNullWithServiceResponseAsync(), serviceCallback); }
ServiceCall<Map<String, Map<String, String>>> function(final ServiceCallback<Map<String, Map<String, String>>> serviceCallback) { return ServiceCall.fromResponse(getDictionaryItemNullWithServiceResponseAsync(), serviceCallback); }
/** * Get an dictionaries of dictionaries of type &lt;string, string&gt; with value {"0": {"1": "one", "2": "two", "3": "three"}, "1": null, "2": {"7": "seven", "8": "eight", "9": "nine"}}. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the ...
Get an dictionaries of dictionaries of type &lt;string, string&gt; with value {"0": {"1": "one", "2": "two", "3": "three"}, "1": null, "2": {"7": "seven", "8": "eight", "9": "nine"}}
getDictionaryItemNullAsync
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 210563 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback", "java.util.Map" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
2,119,964
public String getSaveSearchStyle() { SearchConfig cfg = extractRequestContext().getCatalogConfiguration().getSearchConfig(); int nMax = cfg.getMaxSavedSearches(); if (this.savedSearches.size() >= nMax) { return "display: none;"; } else { return ""; } } /** * Gets the result records as lis...
String function() { SearchConfig cfg = extractRequestContext().getCatalogConfiguration().getSearchConfig(); int nMax = cfg.getMaxSavedSearches(); if (this.savedSearches.size() >= nMax) { return STR; } else { return ""; } } /** * Gets the result records as list data model. * @return the result records as list model (nev...
/** * Gets the style attribute for the save search control. * @return the style */
Gets the style attribute for the save search control
getSaveSearchStyle
{ "repo_name": "usgin/usgin-geoportal", "path": "src/com/esri/gpt/control/search/SearchController.java", "license": "apache-2.0", "size": 31836 }
[ "com.esri.gpt.catalog.search.SearchConfig" ]
import com.esri.gpt.catalog.search.SearchConfig;
import com.esri.gpt.catalog.search.*;
[ "com.esri.gpt" ]
com.esri.gpt;
2,330,325
public interface HostCall { @Nullable Object dispatch() throws BundlerException; }
interface HostCall { Object function() throws BundlerException; }
/** * Dispatches the call and returns its outcome if any. * * @return the response from the app for the host call, or {@code null} if there is * nothing to return */
Dispatches the call and returns its outcome if any
dispatch
{ "repo_name": "AndroidX/androidx", "path": "car/app/app/src/main/java/androidx/car/app/utils/RemoteUtils.java", "license": "apache-2.0", "size": 14298 }
[ "androidx.car.app.serialization.BundlerException" ]
import androidx.car.app.serialization.BundlerException;
import androidx.car.app.serialization.*;
[ "androidx.car" ]
androidx.car;
743,932
public void testRebalanceAllReplicasBeingMigrated() { currentCluster = ServerTestUtils.getLocalCluster(4, new int[][] { { 0, 4 }, { 2, 3 }, { 1, 5 }, {} }); targetCluster = ServerTestUtils.getLocalCluster(4, new int[][] { { 4 }, { 2, 3 }, { 1, 5 }, { 0 } }); ...
void function() { currentCluster = ServerTestUtils.getLocalCluster(4, new int[][] { { 0, 4 }, { 2, 3 }, { 1, 5 }, {} }); targetCluster = ServerTestUtils.getLocalCluster(4, new int[][] { { 4 }, { 2, 3 }, { 1, 5 }, { 0 } }); List<RebalancePartitionsInfo> orderedRebalancePartitionInfoList = createOrderedClusterTransition(...
/** * Issue 288 */
Issue 288
testRebalanceAllReplicasBeingMigrated
{ "repo_name": "we7/voldemort", "path": "test/unit/voldemort/client/rebalance/RebalanceClusterPlanTest.java", "license": "apache-2.0", "size": 51828 }
[ "com.google.common.collect.Lists", "com.google.common.collect.Maps", "java.util.Arrays", "java.util.HashMap", "java.util.List" ]
import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.util.Arrays; import java.util.HashMap; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,623,428
public final List<Potion> getTopShelf() { return Collections.unmodifiableList(this.topShelf); }
final List<Potion> function() { return Collections.unmodifiableList(this.topShelf); }
/** * Get a read-only list of all the items on the top shelf * * @return The top shelf potions */
Get a read-only list of all the items on the top shelf
getTopShelf
{ "repo_name": "jasonwee/videoOnCloud", "path": "src/java/play/learn/java/design/flyweight/AlchemistShop.java", "license": "apache-2.0", "size": 1945 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,215,664
public boolean isInRecurrence(Calendar current, boolean debug) { Calendar myCurrent = (Calendar)current.clone(); // Do all calculations in GMT. Keep other parameters consistent. myCurrent.clear(Calendar.ZONE_OFFSET); myCurrent.clear(Calendar.DST_OFFSET); myCurrent.setTimeZone(TimeZone.getTimeZone...
boolean function(Calendar current, boolean debug) { Calendar myCurrent = (Calendar)current.clone(); myCurrent.clear(Calendar.ZONE_OFFSET); myCurrent.clear(Calendar.DST_OFFSET); myCurrent.setTimeZone(TimeZone.getTimeZone("GMT")); myCurrent.setMinimalDaysInFirstWeek(4); myCurrent.setFirstDayOfWeek(dtStart.getFirstDayOfWe...
/** * Method isInRecurrence * * * @param current * @param debug * * @return boolean * */
Method isInRecurrence
isInRecurrence
{ "repo_name": "zhiqinghuang/core", "path": "src/com/liferay/util/cal/Recurrence.java", "license": "gpl-3.0", "size": 25528 }
[ "com.dotmarketing.util.Logger", "java.util.Calendar", "java.util.TimeZone" ]
import com.dotmarketing.util.Logger; import java.util.Calendar; import java.util.TimeZone;
import com.dotmarketing.util.*; import java.util.*;
[ "com.dotmarketing.util", "java.util" ]
com.dotmarketing.util; java.util;
2,408,495
public SecurityTokenReference getSecurityTokenReference() { return secRef; }
SecurityTokenReference function() { return secRef; }
/** * Get the SecurityTokenReference to be used in the KeyInfo element. */
Get the SecurityTokenReference to be used in the KeyInfo element
getSecurityTokenReference
{ "repo_name": "fatfredyy/wss4j-ecc", "path": "src/main/java/org/apache/ws/security/message/WSSecSignature.java", "license": "apache-2.0", "size": 31511 }
[ "org.apache.ws.security.message.token.SecurityTokenReference" ]
import org.apache.ws.security.message.token.SecurityTokenReference;
import org.apache.ws.security.message.token.*;
[ "org.apache.ws" ]
org.apache.ws;
2,573,251
@Basic(init = @Expression("null")) public final Integer getPersistenceVersion() { return $persistenceVersion; }
@Basic(init = @Expression("null")) final Integer function() { return $persistenceVersion; }
/** * Note that there is no setter for the persistence version. This is controlled by * "magic processes" like JPA, that can write into private fields. The developer * should never set the persistence version. */
Note that there is no setter for the persistence version. This is controlled by "magic processes" like JPA, that can write into private fields. The developer should never set the persistence version
getPersistenceVersion
{ "repo_name": "jandppw/ppwcode-recovered-from-google-code", "path": "java/vernacular/persistence/dev/d20090109-1230/src/main/java/org/ppwcode/vernacular/persistence_III/jpa/AbstractIntegerIdIntegerVersionedPersistentBean.java", "license": "apache-2.0", "size": 3649 }
[ "org.toryt.annotations_I.Basic", "org.toryt.annotations_I.Expression" ]
import org.toryt.annotations_I.Basic; import org.toryt.annotations_I.Expression;
import org.toryt.*;
[ "org.toryt" ]
org.toryt;
616,971
public NetworkInterfaceInner withIpConfigurations(List<NetworkInterfaceIPConfigurationInner> ipConfigurations) { this.ipConfigurations = ipConfigurations; return this; }
NetworkInterfaceInner function(List<NetworkInterfaceIPConfigurationInner> ipConfigurations) { this.ipConfigurations = ipConfigurations; return this; }
/** * Set a list of IPConfigurations of the network interface. * * @param ipConfigurations the ipConfigurations value to set * @return the NetworkInterfaceInner object itself. */
Set a list of IPConfigurations of the network interface
withIpConfigurations
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/NetworkInterfaceInner.java", "license": "mit", "size": 9525 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
651,342
private Point translatePointToTabPanel(int srcx, int srcy, Point dest) { Point vpp = tabScroller.viewport.getLocation(); Point viewp = tabScroller.viewport.getViewPosition(); dest.x = srcx + vpp.x + viewp.x; dest.y = srcy + vpp.y + viewp.y; return dest; } // BasicTabbedPaneUI methods // Tab ...
Point function(int srcx, int srcy, Point dest) { Point vpp = tabScroller.viewport.getLocation(); Point viewp = tabScroller.viewport.getViewPosition(); dest.x = srcx + vpp.x + viewp.x; dest.y = srcy + vpp.y + viewp.y; return dest; }
/** * Returns a point which is translated from the specified point in the * JTabbedPane's coordinate space to the coordinate space of the * ScrollableTabPanel. This is used for SCROLL_TAB_LAYOUT ONLY. */
Returns a point which is translated from the specified point in the JTabbedPane's coordinate space to the coordinate space of the ScrollableTabPanel. This is used for SCROLL_TAB_LAYOUT ONLY
translatePointToTabPanel
{ "repo_name": "NCIP/cacore-sdk", "path": "RestGen/src/gov/nih/nci/restgen/ui/main/CloseTabPaneUI.java", "license": "bsd-3-clause", "size": 47410 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
645,509
public T addPageFooter(ComponentBuilder<?, ?> ...components) { Validate.notNull(components, "components must not be null"); Validate.noNullElements(components, "components must not contains null component"); for (ComponentBuilder<?, ?> component : components) { getObject().getPageFooterBand().addComponent(c...
T function(ComponentBuilder<?, ?> ...components) { Validate.notNull(components, STR); Validate.noNullElements(components, STR); for (ComponentBuilder<?, ?> component : components) { getObject().getPageFooterBand().addComponent(component.build()); } return (T) this; }
/** * Adds components to the page footer band. * The band is printed on each page at the bottom of the page. * * @param components the page footer components * @return a report builder */
Adds components to the page footer band. The band is printed on each page at the bottom of the page
addPageFooter
{ "repo_name": "robcowell/dynamicreports", "path": "dynamicreports-core/src/main/java/net/sf/dynamicreports/report/builder/ReportBuilder.java", "license": "lgpl-3.0", "size": 61004 }
[ "net.sf.dynamicreports.report.builder.component.ComponentBuilder", "org.apache.commons.lang3.Validate" ]
import net.sf.dynamicreports.report.builder.component.ComponentBuilder; import org.apache.commons.lang3.Validate;
import net.sf.dynamicreports.report.builder.component.*; import org.apache.commons.lang3.*;
[ "net.sf.dynamicreports", "org.apache.commons" ]
net.sf.dynamicreports; org.apache.commons;
2,876,401
private void writeMetaData (Trait t) { if (!t.hasMetadata()) return; for (Metadata mid : t.getMetadata()) { List<String> entries = new Vector<String>(); String[] keys = mid.getKeys(); for (int i = 0; i < keys.length; ++i) { ...
void function (Trait t) { if (!t.hasMetadata()) return; for (Metadata mid : t.getMetadata()) { List<String> entries = new Vector<String>(); String[] keys = mid.getKeys(); for (int i = 0; i < keys.length; ++i) { String key = keys[i]; String value = mid.getValues()[i]; if (key == null key.length() == 0) entries.add("\"ST...
/** * Write out the metadata for a given Trait */
Write out the metadata for a given Trait
writeMetaData
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/abc/print/ABCDumpVisitor.java", "license": "apache-2.0", "size": 36770 }
[ "java.util.List", "java.util.Vector", "org.apache.flex.abc.semantics.Metadata", "org.apache.flex.abc.semantics.Trait" ]
import java.util.List; import java.util.Vector; import org.apache.flex.abc.semantics.Metadata; import org.apache.flex.abc.semantics.Trait;
import java.util.*; import org.apache.flex.abc.semantics.*;
[ "java.util", "org.apache.flex" ]
java.util; org.apache.flex;
1,897,408
@Test public void testCreateTableWithBinarySplitsFile5() throws IOException, AccumuloSecurityException, TableNotFoundException, AccumuloException { String splitsFile = System.getProperty("user.dir") + "/target/splitFile"; try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()...
void function() throws IOException, AccumuloSecurityException, TableNotFoundException, AccumuloException { String splitsFile = System.getProperty(STR) + STR; try (AccumuloClient client = Accumulo.newClient().from(getClientProps()).build()) { generateSplitsFile(splitsFile, 100, 32, true, true, true, false, true); Sorted...
/** * Use shell to create a table with a supplied file containing splits. * * The splits will be contained in a file, sorted and encoded with a blank line and no repeats. */
Use shell to create a table with a supplied file containing splits. The splits will be contained in a file, sorted and encoded with a blank line and no repeats
testCreateTableWithBinarySplitsFile5
{ "repo_name": "phrocker/accumulo-1", "path": "test/src/main/java/org/apache/accumulo/test/ShellServerIT.java", "license": "apache-2.0", "size": 117010 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Paths", "java.util.Collection", "java.util.SortedSet", "java.util.TreeSet", "org.apache.accumulo.core.client.Accumulo", "org.apache.accumulo.core.client.AccumuloClient", "org.apache.accumulo.core.client.AccumuloException", "org.apache.ac...
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.Collection; import java.util.SortedSet; import java.util.TreeSet; import org.apache.accumulo.core.client.Accumulo; import org.apache.accumulo.core.client.AccumuloClient; import org.apache.accumulo.core.client.AccumuloEx...
import java.io.*; import java.nio.file.*; import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.hadoop.io.*; import org.junit.*;
[ "java.io", "java.nio", "java.util", "org.apache.accumulo", "org.apache.hadoop", "org.junit" ]
java.io; java.nio; java.util; org.apache.accumulo; org.apache.hadoop; org.junit;
2,259,908
private void putByte(BitOutputStreamTree output) throws IOException { if (this.codeBytesGenerated >= 0) { output.writeBits(this.tempByteBuffer, 8, BitStreamConstants.ORDERING_LEFTMOST_FIRST); } this.codeBytesGenerated++; }
void function(BitOutputStreamTree output) throws IOException { if (this.codeBytesGenerated >= 0) { output.writeBits(this.tempByteBuffer, 8, BitStreamConstants.ORDERING_LEFTMOST_FIRST); } this.codeBytesGenerated++; }
/** * Output and log the current byte buffer * @throws IOException */
Output and log the current byte buffer
putByte
{ "repo_name": "Daniel-BG/Jypec", "path": "src/com/jypec/ebc/mq/MQArithmeticCoder.java", "license": "gpl-3.0", "size": 6308 }
[ "com.jypec.util.bits.BitOutputStreamTree", "com.jypec.util.bits.BitStreamConstants", "java.io.IOException" ]
import com.jypec.util.bits.BitOutputStreamTree; import com.jypec.util.bits.BitStreamConstants; import java.io.IOException;
import com.jypec.util.bits.*; import java.io.*;
[ "com.jypec.util", "java.io" ]
com.jypec.util; java.io;
1,209,234
@Override public URL getResource(String name) throws MalformedURLException { if (webappRoot == null) { return null; } URL result = null; if (name.startsWith("/")) { name = name.substring(1); } File f = new File(webappRoot, name); if (f.exists()) { result = f.toURI().toURL(); } ...
URL function(String name) throws MalformedURLException { if (webappRoot == null) { return null; } URL result = null; if (name.startsWith("/")) { name = name.substring(1); } File f = new File(webappRoot, name); if (f.exists()) { result = f.toURI().toURL(); } if (result == null) { result = getClass().getClassLoader().get...
/** * Get the URL for a particular resource that is relative to the web app root directory. * * @param name * The name of the resource to get * @return The resource, or null if resource not found * @throws MalformedURLException * If the URL is invalid */
Get the URL for a particular resource that is relative to the web app root directory
getResource
{ "repo_name": "AlienQueen/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/protocol/http/mock/MockServletContext.java", "license": "apache-2.0", "size": 18355 }
[ "java.io.File", "java.net.MalformedURLException" ]
import java.io.File; import java.net.MalformedURLException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,153,043
public List<AppdefEntityID> batchCheckControlPermissions(int sessionId, AppdefEntityID[] entities) throws AppdefEntityNotFoundException, PermissionException, SessionNotFoundException, SessionTimeoutException { AuthzSubject subject = sessionManager.getSubject(sessionId); return controlManage...
List<AppdefEntityID> function(int sessionId, AppdefEntityID[] entities) throws AppdefEntityNotFoundException, PermissionException, SessionNotFoundException, SessionTimeoutException { AuthzSubject subject = sessionManager.getSubject(sessionId); return controlManager.batchCheckControlPermissions(subject, entities); }
/** * Accept an array of appdef entity Ids and verify control permission on * each entity for specified subject. Return an array containing the set or * subset of entities where subject has control authorization. * * @return List of entities that are control authorized. */
Accept an array of appdef entity Ids and verify control permission on each entity for specified subject. Return an array containing the set or subset of entities where subject has control authorization
batchCheckControlPermissions
{ "repo_name": "cc14514/hq6", "path": "hq-server/src/main/java/org/hyperic/hq/bizapp/server/session/ControlBossImpl.java", "license": "unlicense", "size": 22025 }
[ "java.util.List", "org.hyperic.hq.appdef.shared.AppdefEntityID", "org.hyperic.hq.appdef.shared.AppdefEntityNotFoundException", "org.hyperic.hq.auth.shared.SessionNotFoundException", "org.hyperic.hq.auth.shared.SessionTimeoutException", "org.hyperic.hq.authz.server.session.AuthzSubject", "org.hyperic.hq....
import java.util.List; import org.hyperic.hq.appdef.shared.AppdefEntityID; import org.hyperic.hq.appdef.shared.AppdefEntityNotFoundException; import org.hyperic.hq.auth.shared.SessionNotFoundException; import org.hyperic.hq.auth.shared.SessionTimeoutException; import org.hyperic.hq.authz.server.session.AuthzSubject; im...
import java.util.*; import org.hyperic.hq.appdef.shared.*; import org.hyperic.hq.auth.shared.*; import org.hyperic.hq.authz.server.session.*; import org.hyperic.hq.authz.shared.*;
[ "java.util", "org.hyperic.hq" ]
java.util; org.hyperic.hq;
992,291
private static Connection getConnection() { try { Connection con = DBUtil.makeConnection(DB_NAME); return con; } catch (Exception e) { throw new JobDomainPeasRuntimeException( "JobDomainPeasDAO.getConnection()", SilverpeasException.ERROR, "root.EX_CONNECTION_OPEN_FAILED"...
static Connection function() { try { Connection con = DBUtil.makeConnection(DB_NAME); return con; } catch (Exception e) { throw new JobDomainPeasRuntimeException( STR, SilverpeasException.ERROR, STR, STR + DB_NAME, e); } }
/** * Method declaration * @return * @see */
Method declaration
getConnection
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "web-core/src/main/java/com/silverpeas/jobDomainPeas/JobDomainPeasDAO.java", "license": "agpl-3.0", "size": 12492 }
[ "com.stratelia.webactiv.util.DBUtil", "com.stratelia.webactiv.util.exception.SilverpeasException", "java.sql.Connection" ]
import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.exception.SilverpeasException; import java.sql.Connection;
import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.exception.*; import java.sql.*;
[ "com.stratelia.webactiv", "java.sql" ]
com.stratelia.webactiv; java.sql;
2,437,019
public BeanDefinitionHolder decorate(Node source, BeanDefinitionHolder holder, ParserContext context) { String beanName = holder.getBeanName(); BeanDefinitionRegistry registry = context.getRegistry(); register...
BeanDefinitionHolder function(Node source, BeanDefinitionHolder holder, ParserContext context) { String beanName = holder.getBeanName(); BeanDefinitionRegistry registry = context.getRegistry(); registerPerformanceMonitor(beanName, registry); registerInterceptor(source, beanName, registry); return holder; }
/** * Method called by Spring when it encounters the custom jrugged:methods * attribute. Registers the performance monitor and interceptor. */
Method called by Spring when it encounters the custom jrugged:methods attribute. Registers the performance monitor and interceptor
decorate
{ "repo_name": "Comcast/jrugged", "path": "jrugged-spring/src/main/java/org/fishwife/jrugged/spring/config/MonitorMethodInterceptorDefinitionDecorator.java", "license": "apache-2.0", "size": 5527 }
[ "org.springframework.beans.factory.config.BeanDefinitionHolder", "org.springframework.beans.factory.support.BeanDefinitionRegistry", "org.springframework.beans.factory.xml.ParserContext", "org.w3c.dom.Node" ]
import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.xml.ParserContext; import org.w3c.dom.Node;
import org.springframework.beans.factory.config.*; import org.springframework.beans.factory.support.*; import org.springframework.beans.factory.xml.*; import org.w3c.dom.*;
[ "org.springframework.beans", "org.w3c.dom" ]
org.springframework.beans; org.w3c.dom;
496,838
ObjectStream<Parse> parseSamples = ParserTestUtil.openTestTrainingData(); HeadRules headRules = ParserTestUtil.createTestHeadRules(); ParserModel model = Parser.train("en", parseSamples, headRules, 100, 0); opennlp.tools.parser.Parser parser = ParserFactory.create(model); // TODO: ...
ObjectStream<Parse> parseSamples = ParserTestUtil.openTestTrainingData(); HeadRules headRules = ParserTestUtil.createTestHeadRules(); ParserModel model = Parser.train("en", parseSamples, headRules, 100, 0); opennlp.tools.parser.Parser parser = ParserFactory.create(model); ByteArrayOutputStream outArray = new ByteArrayO...
/** * Verify that training and tagging does not cause * runtime problems. */
Verify that training and tagging does not cause runtime problems
testChunkingParserTraining
{ "repo_name": "SowaLabs/OpenNLP", "path": "opennlp-tools/src/test/java/opennlp/tools/parser/chunking/ParserTest.java", "license": "apache-2.0", "size": 2292 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,639,343
String getFileContents( Workspace workspace, String path, File file ) throws Exception { FileNode fileNode = new FileNode(workspace, path, file); HttpClientConnection connection = connect(workspace.getServer(), fileNode.getFileContentsUrl(), Re...
String getFileContents( Workspace workspace, String path, File file ) throws Exception { FileNode fileNode = new FileNode(workspace, path, file); HttpClientConnection connection = connect(workspace.getServer(), fileNode.getFileContentsUrl(), RequestMethod.GET); int responseCode = connection.getResponseCode(); if (respo...
/** * Note: Currently used for testing only. * * @param workspace the workspace where the file is published * @param path the path in the workspace where the file is published * @param file the file whose workspace contents are being requested * @return the base 64 encoded file contents o...
Note: Currently used for testing only
getFileContents
{ "repo_name": "flownclouds/modeshape", "path": "web/modeshape-web-jcr-rest-client/src/main/java/org/modeshape/web/jcr/rest/client/json/JsonRestClient.java", "license": "apache-2.0", "size": 44089 }
[ "java.io.File", "java.net.HttpURLConnection", "org.modeshape.web.jcr.rest.client.domain.Workspace", "org.modeshape.web.jcr.rest.client.http.HttpClientConnection", "org.modeshape.web.jcr.rest.client.json.IJsonConstants" ]
import java.io.File; import java.net.HttpURLConnection; import org.modeshape.web.jcr.rest.client.domain.Workspace; import org.modeshape.web.jcr.rest.client.http.HttpClientConnection; import org.modeshape.web.jcr.rest.client.json.IJsonConstants;
import java.io.*; import java.net.*; import org.modeshape.web.jcr.rest.client.domain.*; import org.modeshape.web.jcr.rest.client.http.*; import org.modeshape.web.jcr.rest.client.json.*;
[ "java.io", "java.net", "org.modeshape.web" ]
java.io; java.net; org.modeshape.web;
2,755,959
public void testClone() { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); final int size = rnd.nextInt(4); final Map map = impl.emptyMap(); for (int i = 0; i < size; i++) map.put(impl.makeKey(i), impl.makeValue(i)); final Map clone = cloneableClone(map)...
void function() { final ThreadLocalRandom rnd = ThreadLocalRandom.current(); final int size = rnd.nextInt(4); final Map map = impl.emptyMap(); for (int i = 0; i < size; i++) map.put(impl.makeKey(i), impl.makeValue(i)); final Map clone = cloneableClone(map); if (clone == null) return; assertEquals(size, map.size()); ass...
/** * 8222930: ConcurrentSkipListMap.clone() shares size variable between original and clone */
8222930: ConcurrentSkipListMap.clone() shares size variable between original and clone
testClone
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/MapTest.java", "license": "gpl-2.0", "size": 11795 }
[ "java.util.Map", "java.util.concurrent.ThreadLocalRandom" ]
import java.util.Map; import java.util.concurrent.ThreadLocalRandom;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
251,589
RtfExternalGraphic newImage () throws IOException;
RtfExternalGraphic newImage () throws IOException;
/** * Creates a new image on external graphic base. * @return RtfExternalGraphic for the new image * @exception IOException On error */
Creates a new image on external graphic base
newImage
{ "repo_name": "spepping/fop-cs", "path": "src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfExternalGraphicContainer.java", "license": "apache-2.0", "size": 1479 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
358,589
DrawbackBill selectByPrimaryKey(String id);
DrawbackBill selectByPrimaryKey(String id);
/** * This method was generated by MyBatis Generator. This method corresponds to the database table drawback_bill * @mbggenerated Mon Dec 07 22:17:15 CST 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table drawback_bill
selectByPrimaryKey
{ "repo_name": "smartgear/timeholder", "path": "trymvc/src/main/java/com/toy/data/generate/DrawbackBillMapper.java", "license": "mit", "size": 2764 }
[ "com.toy.model.generate.DrawbackBill" ]
import com.toy.model.generate.DrawbackBill;
import com.toy.model.generate.*;
[ "com.toy.model" ]
com.toy.model;
986,692
public Object findAttribute(String beanName, PageContext pageContext) { Object attribute = getAttribute(beanName); if (attribute == null) { attribute = pageContext.findAttribute(beanName); } return attribute; }
Object function(String beanName, PageContext pageContext) { Object attribute = getAttribute(beanName); if (attribute == null) { attribute = pageContext.findAttribute(beanName); } return attribute; }
/** * Find object in one of the contexts. * Order : component then pageContext.findAttribute() * @param beanName Name of the bean to find. * @param pageContext Page context. * @return Requested bean or <code>null</code> if not found. */
Find object in one of the contexts. Order : component then pageContext.findAttribute()
findAttribute
{ "repo_name": "codelibs/cl-struts", "path": "src/share/org/apache/struts/tiles/ComponentContext.java", "license": "apache-2.0", "size": 5982 }
[ "javax.servlet.jsp.PageContext" ]
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
437,485
Entity[] getEntities();
Entity[] getEntities();
/** * Get a list of all entities in the chunk. * * @return The entities. */
Get a list of all entities in the chunk
getEntities
{ "repo_name": "GlowstonePlusPlus/Glowkit", "path": "src/main/java/org/bukkit/Chunk.java", "license": "gpl-3.0", "size": 3034 }
[ "org.bukkit.entity.Entity" ]
import org.bukkit.entity.Entity;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
935,501
public boolean equals(Vec2 v, double epsilon) { if (epsilon != 0.0) { return DoubleMath.fuzzyEquals(x, v.x, epsilon) && DoubleMath.fuzzyEquals(y, v.y, epsilon); } return x == v.x && y == v.y; }
boolean function(Vec2 v, double epsilon) { if (epsilon != 0.0) { return DoubleMath.fuzzyEquals(x, v.x, epsilon) && DoubleMath.fuzzyEquals(y, v.y, epsilon); } return x == v.x && y == v.y; }
/** * Fuzzy compares this vector with another factor. Differences no greater than {@code epsilon} are treated as equal. */
Fuzzy compares this vector with another factor. Differences no greater than epsilon are treated as equal
equals
{ "repo_name": "anonl/nvlist", "path": "api/src/main/java/nl/weeaboo/vn/math/Vec2.java", "license": "apache-2.0", "size": 2941 }
[ "com.google.common.math.DoubleMath" ]
import com.google.common.math.DoubleMath;
import com.google.common.math.*;
[ "com.google.common" ]
com.google.common;
2,010,715
EList<Transition> getOutgoingTransition();
EList<Transition> getOutgoingTransition();
/** * Returns the value of the '<em><b>Outgoing Transition</b></em>' containment reference list. * The list contents are of type {@link simplefsm.Transition}. * It is bidirectional and its opposite is '{@link simplefsm.Transition#getSource <em>Source</em>}'. * <!-- begin-user-doc --> * <p> * If the meaning ...
Returns the value of the 'Outgoing Transition' containment reference list. The list contents are of type <code>simplefsm.Transition</code>. It is bidirectional and its opposite is '<code>simplefsm.Transition#getSource Source</code>'. If the meaning of the 'Outgoing Transition' containment reference list isn't clear, th...
getOutgoingTransition
{ "repo_name": "diverse-project/melange", "path": "examples/fr.inria.diverse.melange.examples.metamodels.simplefsm/src/main/java/simplefsm/State.java", "license": "epl-1.0", "size": 4034 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
326,349
protected byte[] serializeDeltaRequest(DeltaSession session, DeltaRequest deltaRequest) throws IOException { session.lock(); try { return deltaRequest.serialize(); } finally { session.unlock(); } }
byte[] function(DeltaSession session, DeltaRequest deltaRequest) throws IOException { session.lock(); try { return deltaRequest.serialize(); } finally { session.unlock(); } }
/** * serialize DeltaRequest * @see DeltaRequest#writeExternal(java.io.ObjectOutput) * * @param deltaRequest * @return serialized delta request * @throws IOException */
serialize DeltaRequest
serializeDeltaRequest
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/ha/session/DeltaManager.java", "license": "apache-2.0", "size": 58482 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,351,598
@ReactMethod public void findSubviewIn( final int reactTag, final ReadableArray point, final Callback callback) { mUIImplementation.findSubviewIn( reactTag, Math.round(PixelUtil.toPixelFromDIP(point.getDouble(0))), Math.round(PixelUtil.toPixelFromDIP(point.getDouble(1))...
void function( final int reactTag, final ReadableArray point, final Callback callback) { mUIImplementation.findSubviewIn( reactTag, Math.round(PixelUtil.toPixelFromDIP(point.getDouble(0))), Math.round(PixelUtil.toPixelFromDIP(point.getDouble(1))), callback); }
/** * Find the touch target child native view in the supplied root view hierarchy, given a react * target location. * * This method is currently used only by Element Inspector DevTool. * * @param reactTag the tag of the root view to traverse * @param point an array containing both X and Y target l...
Find the touch target child native view in the supplied root view hierarchy, given a react target location. This method is currently used only by Element Inspector DevTool
findSubviewIn
{ "repo_name": "Emilios1995/react-native", "path": "ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java", "license": "bsd-3-clause", "size": 18782 }
[ "com.facebook.react.bridge.Callback", "com.facebook.react.bridge.ReadableArray" ]
import com.facebook.react.bridge.Callback; import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.*;
[ "com.facebook.react" ]
com.facebook.react;
2,530,860
public static void applyProperties(Object configuration, Map<String, String> properties, String namingStrategy) { for (Map.Entry<String, String> property : properties.entrySet()) { String key = property.getKey(); if (!CAMEL_CASE.equals(namingStrategy)) { key = convertToCamelCase(key, namingStr...
static void function(Object configuration, Map<String, String> properties, String namingStrategy) { for (Map.Entry<String, String> property : properties.entrySet()) { String key = property.getKey(); if (!CAMEL_CASE.equals(namingStrategy)) { key = convertToCamelCase(key, namingStrategy); } applyProperty(configuration, k...
/** * Sets an objects fields via reflection from String values. * Depending on the field's type the respective values are converted to int or boolean. * This method allows to specify a property naming strategy, i.e., if a property is written in * <code>camelCase</code>, <code>kebab-case</code>, or <code>sna...
Sets an objects fields via reflection from String values. Depending on the field's type the respective values are converted to int or boolean. This method allows to specify a property naming strategy, i.e., if a property is written in <code>camelCase</code>, <code>kebab-case</code>, or <code>snake_case</code>
applyProperties
{ "repo_name": "langfr/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/container/impl/metadata/PropertyHelper.java", "license": "apache-2.0", "size": 6218 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,505,267
if (isInitialized()) { return new ByteArrayInputStream(getData()); } else { return getResourceStream(); } }
if (isInitialized()) { return new ByteArrayInputStream(getData()); } else { return getResourceStream(); } }
/** * Gets the contents of the Resource as an InputStream. * * @return The contents of the Resource. * * @throws IOException */
Gets the contents of the Resource as an InputStream
getInputStream
{ "repo_name": "narrative-technologies/epublib", "path": "epublib-core/src/main/java/nl/siegmann/epublib/domain/LazyResource.java", "license": "lgpl-3.0", "size": 4378 }
[ "java.io.ByteArrayInputStream" ]
import java.io.ByteArrayInputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,464,349
public static String uploadWindTunnelPersona(String host, String user, String password, String repositoryFolder, PersonaProperties properties, PersonaDevice device, PersonaSettings settings) throws UnsupportedEncodingException, MalformedURLException, IOException { ...
static String function(String host, String user, String password, String repositoryFolder, PersonaProperties properties, PersonaDevice device, PersonaSettings settings) throws UnsupportedEncodingException, MalformedURLException, IOException { if (repositoryFolder == null) { throw new RuntimeException(STR); } String per...
/** * Example: * PersonaProperties properties = new PersonaProperties("Pedro", "This is Pedro's profile", "PUBLIC:personas/Perdo.jpg"); * PersonaDevice device = new PersonaDevice(); * device.setModel("iPhone-5S"); * PersonaSettings settings = new PersonaSettings(null, "Boston", "landscape", "4G...
Example: PersonaDevice device = new PersonaDevice(); device.setModel("iPhone-5S"); PersonaSettings settings = new PersonaSettings(null, "Boston", "landscape", "4G LTE Advanced Good", "Waze,YouTube"); capabilities.setCapability(WindTunnelUtils.WIND_TUNNEL_PERSONA_KEY_CAPABILITY, repositoryKey)
uploadWindTunnelPersona
{ "repo_name": "kumar-pulabaigari/Selenium-Cucumber-ExtentReport", "path": "automationDigital/src/test/java/com/hom/automationDigital/commonFunctions/perfectoCloud/WindTunnelUtils.java", "license": "mit", "size": 15068 }
[ "java.io.IOException", "java.io.UnsupportedEncodingException", "java.net.MalformedURLException" ]
import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,425,314
public MicrosoftGraphGroupInner withTransitiveMembers(List<MicrosoftGraphDirectoryObjectInner> transitiveMembers) { this.transitiveMembers = transitiveMembers; return this; }
MicrosoftGraphGroupInner function(List<MicrosoftGraphDirectoryObjectInner> transitiveMembers) { this.transitiveMembers = transitiveMembers; return this; }
/** * Set the transitiveMembers property: The transitiveMembers property. * * @param transitiveMembers the transitiveMembers value to set. * @return the MicrosoftGraphGroupInner object itself. */
Set the transitiveMembers property: The transitiveMembers property
withTransitiveMembers
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphGroupInner.java", "license": "mit", "size": 74957 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,780,073
@Nonnull public static String getExtension (@Nullable final File aFile) { return aFile == null ? "" : getExtension (aFile.getName ()); }
static String function (@Nullable final File aFile) { return aFile == null ? "" : getExtension (aFile.getName ()); }
/** * Get the extension of the passed file. * * @param aFile * The file to extract the extension from. May be <code>null</code>. * @return An empty string if no extension was found, the extension without * the leading dot otherwise. Never <code>null</code>. * @see #getExtension(Strin...
Get the extension of the passed file
getExtension
{ "repo_name": "phax/ph-commons", "path": "ph-commons/src/main/java/com/helger/commons/io/file/FilenameHelper.java", "license": "apache-2.0", "size": 47631 }
[ "java.io.File", "javax.annotation.Nullable" ]
import java.io.File; import javax.annotation.Nullable;
import java.io.*; import javax.annotation.*;
[ "java.io", "javax.annotation" ]
java.io; javax.annotation;
1,815,585
public int getSortOrderAsInt() { return SortOrder.ASC.equals( sortOrder ) ? -1 : SortOrder.DESC.equals( sortOrder ) ? 1 : 0; }
int function() { return SortOrder.ASC.equals( sortOrder ) ? -1 : SortOrder.DESC.equals( sortOrder ) ? 1 : 0; }
/** * Returns a negative integer in case of ascending sort order, a positive in * case of descending sort order and 0 in case of no sort order. */
Returns a negative integer in case of ascending sort order, a positive in case of descending sort order and 0 in case of no sort order
getSortOrderAsInt
{ "repo_name": "uonafya/jphes-core", "path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java", "license": "bsd-3-clause", "size": 27869 }
[ "org.hisp.dhis.analytics.SortOrder" ]
import org.hisp.dhis.analytics.SortOrder;
import org.hisp.dhis.analytics.*;
[ "org.hisp.dhis" ]
org.hisp.dhis;
934,607
void sendPushNoti() { Push push = new Push.NotificationBuilder() .setChannel("testChannel") .setTitle("Test Notification") .setMessage("Hello? this is for test!") .build(); push.sendInBackground(); }
void sendPushNoti() { Push push = new Push.NotificationBuilder() .setChannel(STR) .setTitle(STR) .setMessage(STR) .build(); push.sendInBackground(); }
/** * Send push test message. */
Send push test message
sendPushNoti
{ "repo_name": "haruio/haru-sdk-android", "path": "test/src/main/java/com/haru/test/MainActivity.java", "license": "mit", "size": 5228 }
[ "com.haru.push.Push" ]
import com.haru.push.Push;
import com.haru.push.*;
[ "com.haru.push" ]
com.haru.push;
1,367,198
public void dialog(Context context, String action, DialogListener listener) { dialog(context, action, new Bundle(), listener); }
void function(Context context, String action, DialogListener listener) { dialog(context, action, new Bundle(), listener); }
/** * Generate a UI dialog for the request action in the given Android context. * * Note that this method is asynchronous and the callback will be invoked in * the original calling thread (not in a background thread). * * @param context * The Android context in which we wil...
Generate a UI dialog for the request action in the given Android context. Note that this method is asynchronous and the callback will be invoked in the original calling thread (not in a background thread)
dialog
{ "repo_name": "blackgun/CCSocialNetwork", "path": "3rdParty/Android/facebook-facebook-android-sdk-525f851/facebook/src/com/facebook/android/Facebook.java", "license": "lgpl-3.0", "size": 46705 }
[ "android.content.Context", "android.os.Bundle" ]
import android.content.Context; import android.os.Bundle;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
199,768
protected void actionPerformed(GuiButton button) throws IOException { if (button.id == 0) { this.cancel = true; if (this.networkManager != null) { this.networkManager.closeChannel(new TextComponentString("Aborted")); } ...
void function(GuiButton button) throws IOException { if (button.id == 0) { this.cancel = true; if (this.networkManager != null) { this.networkManager.closeChannel(new TextComponentString(STR)); } this.mc.displayGuiScreen(this.previousGuiScreen); } }
/** * Called by the controls from the buttonList when activated. (Mouse pressed for buttons) */
Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
actionPerformed
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/client/multiplayer/GuiConnecting.java", "license": "lgpl-2.1", "size": 6885 }
[ "java.io.IOException", "net.minecraft.client.gui.GuiButton", "net.minecraft.util.text.TextComponentString" ]
import java.io.IOException; import net.minecraft.client.gui.GuiButton; import net.minecraft.util.text.TextComponentString;
import java.io.*; import net.minecraft.client.gui.*; import net.minecraft.util.text.*;
[ "java.io", "net.minecraft.client", "net.minecraft.util" ]
java.io; net.minecraft.client; net.minecraft.util;
2,484,350
public void add(ResourceCollection res) { resourceCollections.add(res); }
void function(ResourceCollection res) { resourceCollections.add(res); }
/** * Add a collection of resources to archive. * @param res a resource collection to archive. * @since Ant 1.7 */
Add a collection of resources to archive
add
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/taskdefs/Tar.java", "license": "gpl-2.0", "size": 34170 }
[ "org.apache.tools.ant.types.ResourceCollection" ]
import org.apache.tools.ant.types.ResourceCollection;
import org.apache.tools.ant.types.*;
[ "org.apache.tools" ]
org.apache.tools;
2,404,342
@Requirement(reference = "Requirement 10", text = "A GeoPackage SHALL include a gpkg_spatial_ref_sys table per clause 1.1.2.1.1 Table Definition, Table Spatial Ref Sys Table Definition and Table gpkg_spatial_ref_sys Table Definition SQL.") public void requirement10() throws AssertionError,...
@Requirement(reference = STR, text = STR) void function() throws AssertionError, SQLException { if(this.hasSpatialReferenceSystemTable) { this.verifyTable(CoreVerifier.SpatialReferenceSystemDefinition); } else { throw new AssertionError(String.format(STR, GeoPackageCore.SpatialRefSysTableName), Severity.Error); } } /**...
/** * Requirement 10 * * <blockquote> * A GeoPackage SHALL include a {@code gpkg_spatial_ref_sys} table per clause 1.1.2.1.1 * <a href="http://www.geopackage.org/spec/#spatial_ref_sys_data_table_definition">Table Definition</a>, * Table <a href="http://www.geopackage.org/spec/#gpkg_spatial...
Requirement 10 A GeoPackage SHALL include a gpkg_spatial_ref_sys table per clause 1.1.2.1.1 Table Definition, Table Spatial Ref Sys Table Definition and Table gpkg_spatial_ref_sys Table Definition SQL.
requirement10
{ "repo_name": "GitHubRGI/swagd", "path": "GeoPackage/src/main/java/com/rgi/geopackage/core/CoreVerifier.java", "license": "mit", "size": 36587 }
[ "com.rgi.geopackage.verification.AssertionError", "com.rgi.geopackage.verification.Requirement", "com.rgi.geopackage.verification.Severity", "java.sql.SQLException" ]
import com.rgi.geopackage.verification.AssertionError; import com.rgi.geopackage.verification.Requirement; import com.rgi.geopackage.verification.Severity; import java.sql.SQLException;
import com.rgi.geopackage.verification.*; import java.sql.*;
[ "com.rgi.geopackage", "java.sql" ]
com.rgi.geopackage; java.sql;
2,472,428
private ModelAndView generateSuccessView(final Assertion assertion, final String proxyIou, final WebApplicationService service, final TicketGrantingTicket proxyGrantingTicket) { final ModelAndView success = new ModelA...
ModelAndView function(final Assertion assertion, final String proxyIou, final WebApplicationService service, final TicketGrantingTicket proxyGrantingTicket) { final ModelAndView success = new ModelAndView(this.successView); success.addObject(CasViewConstants.MODEL_ATTRIBUTE_NAME_ASSERTION, assertion); success.addObject...
/** * Generate the success view. The result will contain the assertion and the proxy iou. * * @param assertion the assertion * @param proxyIou the proxy iou * @param service the validated service * @param proxyGrantingTicket the proxy granting ticket * @return the model and view, poin...
Generate the success view. The result will contain the assertion and the proxy iou
generateSuccessView
{ "repo_name": "eBaoTech/cas", "path": "cas-server-webapp-support/src/main/java/org/jasig/cas/web/ServiceValidateController.java", "license": "apache-2.0", "size": 17011 }
[ "java.util.Map", "org.jasig.cas.authentication.principal.WebApplicationService", "org.jasig.cas.ticket.TicketGrantingTicket", "org.jasig.cas.validation.Assertion", "org.jasig.cas.web.view.CasViewConstants", "org.springframework.web.servlet.ModelAndView" ]
import java.util.Map; import org.jasig.cas.authentication.principal.WebApplicationService; import org.jasig.cas.ticket.TicketGrantingTicket; import org.jasig.cas.validation.Assertion; import org.jasig.cas.web.view.CasViewConstants; import org.springframework.web.servlet.ModelAndView;
import java.util.*; import org.jasig.cas.authentication.principal.*; import org.jasig.cas.ticket.*; import org.jasig.cas.validation.*; import org.jasig.cas.web.view.*; import org.springframework.web.servlet.*;
[ "java.util", "org.jasig.cas", "org.springframework.web" ]
java.util; org.jasig.cas; org.springframework.web;
1,317,053
public void setSoundVolume(int lastParam) { Dispatch.call(this, "SoundVolume", new Variant(lastParam)); }
void function(int lastParam) { Dispatch.call(this, STR, new Variant(lastParam)); }
/** * Wrapper for calling the ActiveX-Method with input-parameter(s). * * @param lastParam an input-parameter of type int */
Wrapper for calling the ActiveX-Method with input-parameter(s)
setSoundVolume
{ "repo_name": "cpesch/MetaMusic", "path": "itunes-com-library/src/main/java/slash/metamusic/itunes/com/binding/IiTunes.java", "license": "gpl-2.0", "size": 26278 }
[ "com.jacob.com.Dispatch", "com.jacob.com.Variant" ]
import com.jacob.com.Dispatch; import com.jacob.com.Variant;
import com.jacob.com.*;
[ "com.jacob.com" ]
com.jacob.com;
2,189,323
public void deleteCertificates() { LocalKeyStore localKeyStore = LocalKeyStore.getInstance(); Uri uri = Uri.parse(getStoreUri()); localKeyStore.deleteCertificate(uri.getHost(), uri.getPort()); uri = Uri.parse(getTransportUri()); localKeyStore.deleteCertificate(uri.getHost(),...
void function() { LocalKeyStore localKeyStore = LocalKeyStore.getInstance(); Uri uri = Uri.parse(getStoreUri()); localKeyStore.deleteCertificate(uri.getHost(), uri.getPort()); uri = Uri.parse(getTransportUri()); localKeyStore.deleteCertificate(uri.getHost(), uri.getPort()); }
/** * Examine the settings for the account and attempt to delete (possibly non-existent) * certificates for the incoming and outgoing servers. */
Examine the settings for the account and attempt to delete (possibly non-existent) certificates for the incoming and outgoing servers
deleteCertificates
{ "repo_name": "rtreffer/openpgp-k-9", "path": "src/com/fsck/k9/Account.java", "license": "bsd-3-clause", "size": 73001 }
[ "android.net.Uri", "com.fsck.k9.security.LocalKeyStore" ]
import android.net.Uri; import com.fsck.k9.security.LocalKeyStore;
import android.net.*; import com.fsck.k9.security.*;
[ "android.net", "com.fsck.k9" ]
android.net; com.fsck.k9;
2,556,017
public String process(String options, boolean overlay) throws Exception { SubProcess actor; SubProcess runActor; String result; String[] list; int i; AbstractContainerManager manager; List<DataContainer> runInput; List<DataContainer> runOutput; Class[] flowClasses; ...
String function(String options, boolean overlay) throws Exception { SubProcess actor; SubProcess runActor; String result; String[] list; int i; AbstractContainerManager manager; List<DataContainer> runInput; List<DataContainer> runOutput; Class[] flowClasses; MessageCollection errors; manager = getDataContainerPanel()....
/** * Processes the options. * * @param options additional/optional options for the action * @param overlay whether to overlay the data * @return null if no error, otherwise error message * @throws Exception if something goes wrong */
Processes the options
process
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/scripting/AbstractFlowScriptlet.java", "license": "gpl-3.0", "size": 5275 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,460,424
return handlerManager.addHandler(ToolbarActionHandler.TYPE, handler); }
return handlerManager.addHandler(ToolbarActionHandler.TYPE, handler); }
/** * Add toolbar action handler. * * @param handler action handler * @return handler registration */
Add toolbar action handler
addToolbarActionHandler
{ "repo_name": "olivermay/geomajas", "path": "face/geomajas-face-gwt/client/src/main/java/org/geomajas/gwt/client/action/ToolbarBaseAction.java", "license": "agpl-3.0", "size": 5375 }
[ "org.geomajas.gwt.client.action.event.ToolbarActionHandler" ]
import org.geomajas.gwt.client.action.event.ToolbarActionHandler;
import org.geomajas.gwt.client.action.event.*;
[ "org.geomajas.gwt" ]
org.geomajas.gwt;
2,678,849
@Override public void indexAllCommentsOnPublication(final String resourceType, final WAPrimaryKey pk) { List<Comment> vComments = getCommentDAO().getAllCommentsByForeignKey(resourceType, new ForeignPK(pk)); for (Comment comment : vComments) { createIndex(comment); } }
void function(final String resourceType, final WAPrimaryKey pk) { List<Comment> vComments = getCommentDAO().getAllCommentsByForeignKey(resourceType, new ForeignPK(pk)); for (Comment comment : vComments) { createIndex(comment); } }
/** * Indexes all the comments on the publication identified by the resource type and the specified * identifier. If no such publication exists with the specified identifier, then a * CommentRuntimeException is thrown. * @param resourceType the type of the commented publication. * @param pk the identifie...
Indexes all the comments on the publication identified by the resource type and the specified identifier. If no such publication exists with the specified identifier, then a CommentRuntimeException is thrown
indexAllCommentsOnPublication
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "ejb-core/comment/src/main/java/com/silverpeas/comment/service/DefaultCommentService.java", "license": "agpl-3.0", "size": 17252 }
[ "com.silverpeas.comment.model.Comment", "com.silverpeas.util.ForeignPK", "com.stratelia.webactiv.util.WAPrimaryKey", "java.util.List" ]
import com.silverpeas.comment.model.Comment; import com.silverpeas.util.ForeignPK; import com.stratelia.webactiv.util.WAPrimaryKey; import java.util.List;
import com.silverpeas.comment.model.*; import com.silverpeas.util.*; import com.stratelia.webactiv.util.*; import java.util.*;
[ "com.silverpeas.comment", "com.silverpeas.util", "com.stratelia.webactiv", "java.util" ]
com.silverpeas.comment; com.silverpeas.util; com.stratelia.webactiv; java.util;
1,479,361
public ResponseBasedOriginErrorDetectionParameters withHttpErrorRanges( List<HttpErrorRangeParameters> httpErrorRanges) { this.httpErrorRanges = httpErrorRanges; return this; }
ResponseBasedOriginErrorDetectionParameters function( List<HttpErrorRangeParameters> httpErrorRanges) { this.httpErrorRanges = httpErrorRanges; return this; }
/** * Set the httpErrorRanges property: The list of Http status code ranges that are considered as server errors for * origin and it is marked as unhealthy. * * @param httpErrorRanges the httpErrorRanges value to set. * @return the ResponseBasedOriginErrorDetectionParameters object itself. ...
Set the httpErrorRanges property: The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy
withHttpErrorRanges
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/models/ResponseBasedOriginErrorDetectionParameters.java", "license": "mit", "size": 4655 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,768,864
@Test public void testIntSortedDescendingPagedList(){ List<Customer> customers = customerDao.listPage(1, 2, "customerNr", false); assertEquals(2, customers.size()); assertEquals(3, customers.get(0).getCustomerNr().intValue()); assertEquals(2, customers.get(1).getCustomerNr().intV...
void function(){ List<Customer> customers = customerDao.listPage(1, 2, STR, false); assertEquals(2, customers.size()); assertEquals(3, customers.get(0).getCustomerNr().intValue()); assertEquals(2, customers.get(1).getCustomerNr().intValue()); }
/** * Tests method for {@link CustomerDao#listPage(int, int, String, boolean)}. */
Tests method for <code>CustomerDao#listPage(int, int, String, boolean)</code>
testIntSortedDescendingPagedList
{ "repo_name": "mendix/Mendix-Core", "path": "Patched/maven-eclipse-plugin-2.7/src/test/resources/projects/project-40/src/main/java/Examples/RecordShop-ExampleProject/RecordShop-businessdomain/src/test/java/org/company/recordshop/bd/data/DaoListTests.java", "license": "epl-1.0", "size": 4349 }
[ "java.util.List", "org.company.recordshop.bd.domain.Customer", "org.junit.Assert" ]
import java.util.List; import org.company.recordshop.bd.domain.Customer; import org.junit.Assert;
import java.util.*; import org.company.recordshop.bd.domain.*; import org.junit.*;
[ "java.util", "org.company.recordshop", "org.junit" ]
java.util; org.company.recordshop; org.junit;
2,261,175
public DatabaseMeta createAndRunDatabaseWizard(Shell shell, PropsUI props, List<DatabaseMeta> databases) { DatabaseMeta newDBInfo = new DatabaseMeta(); final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases); final Creat...
DatabaseMeta function(Shell shell, PropsUI props, List<DatabaseMeta> databases) { DatabaseMeta newDBInfo = new DatabaseMeta(); final CreateDatabaseWizardPage1 page1 = new CreateDatabaseWizardPage1("1", props, newDBInfo, databases); final CreateDatabaseWizardPageInformix pageifx = new CreateDatabaseWizardPageInformix("i...
/** * Shows a wizard that creates a new database connection... * @param shell * @param props * @param databases * @return DatabaseMeta when finished or null when canceled */
Shows a wizard that creates a new database connection..
createAndRunDatabaseWizard
{ "repo_name": "yintaoxue/read-open-source-code", "path": "kettle4.3/src/org/pentaho/di/ui/core/database/wizard/CreateDatabaseWizard.java", "license": "apache-2.0", "size": 4945 }
[ "java.util.List", "org.eclipse.swt.widgets.Shell", "org.pentaho.di.core.database.DatabaseMeta", "org.pentaho.di.ui.core.PropsUI", "org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage1", "org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2", "org.pentaho.di.ui.core.database.wizar...
import java.util.List; import org.eclipse.swt.widgets.Shell; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.ui.core.PropsUI; import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage1; import org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2; import org.pentaho.di.ui...
import java.util.*; import org.eclipse.swt.widgets.*; import org.pentaho.di.core.database.*; import org.pentaho.di.ui.core.*; import org.pentaho.di.ui.core.database.wizard.*;
[ "java.util", "org.eclipse.swt", "org.pentaho.di" ]
java.util; org.eclipse.swt; org.pentaho.di;
960,340
public FsFile getFsFileFromServerFile(File serverFile) throws IOException { final FsFile fullFsFile = new FsFile(serverFile); final FsFile childFsFile = fullFsFile.getPathFrom(this.baseDirFsFile); if (childFsFile == null) throw new IllegalArgumentException("server files must be w...
FsFile function(File serverFile) throws IOException { final FsFile fullFsFile = new FsFile(serverFile); final FsFile childFsFile = fullFsFile.getPathFrom(this.baseDirFsFile); if (childFsFile == null) throw new IllegalArgumentException(STR); return childFsFile; }
/** * Given a server-local {@link File}, returns the corresponding repository path. * Must be executed server-side. * @param serverFile a server-local {@link File} within the repository * @return the corresponding repository path * @throws IOException if the absolute path of the {@link File} co...
Given a server-local <code>File</code>, returns the corresponding repository path. Must be executed server-side
getFsFileFromServerFile
{ "repo_name": "simleo/openmicroscopy", "path": "components/blitz/src/ome/services/blitz/repo/path/ServerFilePathTransformer.java", "license": "gpl-2.0", "size": 4252 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,619,172
@Override public void fromData(DataInput in, DeserializationContext context) throws IOException, ClassNotFoundException { this.eventID = (EventID) context.getDeserializer().readObject(in); Object key = context.getDeserializer().readObject(in); Object value = context.getDeserializer().readObject(in...
void function(DataInput in, DeserializationContext context) throws IOException, ClassNotFoundException { this.eventID = (EventID) context.getDeserializer().readObject(in); Object key = context.getDeserializer().readObject(in); Object value = context.getDeserializer().readObject(in); this.keyInfo = new KeyInfo(key, valu...
/** * Reads the contents of this message from the given input. */
Reads the contents of this message from the given input
fromData
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java", "license": "apache-2.0", "size": 99239 }
[ "java.io.DataInput", "java.io.IOException", "org.apache.geode.DataSerializer", "org.apache.geode.cache.Operation", "org.apache.geode.distributed.DistributedMember", "org.apache.geode.distributed.internal.InternalDistributedSystem", "org.apache.geode.internal.Assert", "org.apache.geode.internal.DSFIDFa...
import java.io.DataInput; import java.io.IOException; import org.apache.geode.DataSerializer; import org.apache.geode.cache.Operation; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.internal.Assert; import org.apache...
import java.io.*; import org.apache.geode.*; import org.apache.geode.cache.*; import org.apache.geode.distributed.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.internal.*; import org.apache.geode.internal.cache.tier.sockets.*; import org.apache.geode.internal.cache.tx.*; import org.apache.g...
[ "java.io", "org.apache.geode" ]
java.io; org.apache.geode;
67,281
public static OSDConfig[] createMultipleOSDConfigs(int number) throws IOException { return createMultipleOSDConfigs(number, 0); }
static OSDConfig[] function(int number) throws IOException { return createMultipleOSDConfigs(number, 0); }
/** * * Creates multiple OSD configs starting at offset 0. * */
Creates multiple OSD configs starting at offset 0
createMultipleOSDConfigs
{ "repo_name": "rbaerzib/xtreemfs", "path": "java/servers/test/org/xtreemfs/test/SetupUtils.java", "license": "bsd-3-clause", "size": 20576 }
[ "java.io.IOException", "org.xtreemfs.osd.OSDConfig" ]
import java.io.IOException; import org.xtreemfs.osd.OSDConfig;
import java.io.*; import org.xtreemfs.osd.*;
[ "java.io", "org.xtreemfs.osd" ]
java.io; org.xtreemfs.osd;
1,437,699
private void gameQuestionsActionPerformed() { boolean answeredCompletely; if (game.getCurrentQuestion() != null) { answeredCompletely = game.getCurrentQuestion().wasAnswered(); if (!answeredCompletely && (JOptionPane.showConfirmDialog(this, "Question was n...
void function() { boolean answeredCompletely; if (game.getCurrentQuestion() != null) { answeredCompletely = game.getCurrentQuestion().wasAnswered(); if (!answeredCompletely && (JOptionPane.showConfirmDialog(this, STR, STR, JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)) { setNextQue...
/** * Calls setNextQuestion if all answers were shown, else asks for approval. */
Calls setNextQuestion if all answers were shown, else asks for approval
gameQuestionsActionPerformed
{ "repo_name": "fsi-hska/erstiduell", "path": "src/info/hska/erstiduell/view/ControllerWindow.java", "license": "mit", "size": 28434 }
[ "javax.swing.JOptionPane" ]
import javax.swing.JOptionPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,526,428
public void setResponseData(final String response, final String encoding) { responseDataAsString = null; String encodeUsing = encoding != null? encoding : DEFAULT_CHARSET; try { responseData = response.getBytes(encodeUsing); setDataEncoding(encodeUsing); } cat...
void function(final String response, final String encoding) { responseDataAsString = null; String encodeUsing = encoding != null? encoding : DEFAULT_CHARSET; try { responseData = response.getBytes(encodeUsing); setDataEncoding(encodeUsing); } catch (UnsupportedEncodingException e) { log.warn(STR+encodeUsing+ STR+DEFAUL...
/** * Sets the encoding and responseData attributes of the SampleResult object. * * @param response the new responseData value (String) * @param encoding the encoding to set and then use (if null, use platform default) * */
Sets the encoding and responseData attributes of the SampleResult object
setResponseData
{ "repo_name": "ubikloadpack/jmeter", "path": "src/core/org/apache/jmeter/samplers/SampleResult.java", "license": "apache-2.0", "size": 47636 }
[ "java.io.UnsupportedEncodingException", "java.nio.charset.Charset" ]
import java.io.UnsupportedEncodingException; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,409,679
public final void setProgressPercentFormat(NumberFormat format) { mBuilder.progressPercentFormat = format; setProgress(getCurrentProgress()); // invalidates display }
final void function(NumberFormat format) { mBuilder.progressPercentFormat = format; setProgress(getCurrentProgress()); }
/** * Change the format of the small text showing the percentage of progress. * The default is NumberFormat.getPercentageInstance(). */
Change the format of the small text showing the percentage of progress. The default is NumberFormat.getPercentageInstance()
setProgressPercentFormat
{ "repo_name": "playerchenhe/material-dialogs", "path": "core/src/main/java/com/afollestad/materialdialogs/MaterialDialog.java", "license": "mit", "size": 75115 }
[ "java.text.NumberFormat" ]
import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,363,976
protected List<String> getSatisfiedSentriesInExecutionTree(List<String> sentryIds, Map<String, List<CmmnSentryPart>> allSentries) { List<String> result = new ArrayList<String>(); if (sentryIds != null) { for (String sentryId : sentryIds) { List<CmmnSentryPart> sentryParts = allSentries.get(sen...
List<String> function(List<String> sentryIds, Map<String, List<CmmnSentryPart>> allSentries) { List<String> result = new ArrayList<String>(); if (sentryIds != null) { for (String sentryId : sentryIds) { List<CmmnSentryPart> sentryParts = allSentries.get(sentryId); if (isSentryPartsSatisfied(sentryId, sentryParts)) { re...
/** * Checks for each given sentry id in the execution tree whether the corresponding * sentry is satisfied. */
Checks for each given sentry id in the execution tree whether the corresponding sentry is satisfied
getSatisfiedSentriesInExecutionTree
{ "repo_name": "subhrajyotim/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/cmmn/execution/CmmnExecution.java", "license": "apache-2.0", "size": 40970 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,955,456
private void pruneUnreferencedFileInData(RestResponse artifactoryResponse) { BasicStatusHolder statusHolder = new BasicStatusHolder(); storageService.pruneUnreferencedFileInDataStore(statusHolder); if (statusHolder.isError()) { artifactoryResponse.error("Pruning unreferenced data...
void function(RestResponse artifactoryResponse) { BasicStatusHolder statusHolder = new BasicStatusHolder(); storageService.pruneUnreferencedFileInDataStore(statusHolder); if (statusHolder.isError()) { artifactoryResponse.error(STR + statusHolder.getLastError().getMessage() + "."); } else { artifactoryResponse.info( STR...
/** * prune Unreferenced FileIn Data * * @param artifactoryResponse */
prune Unreferenced FileIn Data
pruneUnreferencedFileInData
{ "repo_name": "alancnet/artifactory", "path": "web/rest-ui/src/main/java/org/artifactory/ui/rest/service/admin/advanced/maintenance/PruneUnReferenceDataService.java", "license": "apache-2.0", "size": 1752 }
[ "org.artifactory.api.common.BasicStatusHolder", "org.artifactory.rest.common.service.RestResponse" ]
import org.artifactory.api.common.BasicStatusHolder; import org.artifactory.rest.common.service.RestResponse;
import org.artifactory.api.common.*; import org.artifactory.rest.common.service.*;
[ "org.artifactory.api", "org.artifactory.rest" ]
org.artifactory.api; org.artifactory.rest;
2,381,687
boolean isAcceptableSolution(List<Action> actions, Object goal);
boolean isAcceptableSolution(List<Action> actions, Object goal);
/** * This method is only called if GoalTest.isGoalState() returns true. * * @param actions * the list of actions to get to the goal state. * * @param goal * the goal the list of actions will reach. * * @return true if the solution is acceptable, false otherwise, which * ...
This method is only called if GoalTest.isGoalState() returns true
isAcceptableSolution
{ "repo_name": "eckucukoglu/river-crossing-puzzle-solver", "path": "solver/SolutionChecker.java", "license": "gpl-2.0", "size": 1042 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,654,007
public String init(NamedList<?> config, SolrCore core) { LOG.info("init: " + config); // read the config name = config.get(NAME) != null ? (String) config.get(NAME) : DEFAULT_DICT_NAME; sourceLocation = (String) config.get(LOCATION); lookupImpl = (String) config.get(LOOKUP_IMPL); ...
String function(NamedList<?> config, SolrCore core) { LOG.info(STR + config); name = config.get(NAME) != null ? (String) config.get(NAME) : DEFAULT_DICT_NAME; sourceLocation = (String) config.get(LOCATION); lookupImpl = (String) config.get(LOOKUP_IMPL); dictionaryImpl = (String) config.get(DICTIONARY_IMPL); String stor...
/** * Uses the <code>config</code> and the <code>core</code> to initialize the underlying * Lucene suggester * */
Uses the <code>config</code> and the <code>core</code> to initialize the underlying Lucene suggester
init
{ "repo_name": "q474818917/solr-5.2.0", "path": "solr/core/src/java/org/apache/solr/spelling/suggest/SolrSuggester.java", "license": "apache-2.0", "size": 8531 }
[ "org.apache.solr.common.util.NamedList", "org.apache.solr.core.SolrCore" ]
import org.apache.solr.common.util.NamedList; import org.apache.solr.core.SolrCore;
import org.apache.solr.common.util.*; import org.apache.solr.core.*;
[ "org.apache.solr" ]
org.apache.solr;
1,090,329
@Nullable public static <T extends Parcelable> SparseArray<T> optSparseParcelableArray(@Nullable Bundle bundle, @Nullable String key, @Nullable SparseArray<T> fallback) { if (bundle == null) { return fallback; } return bundle.getSparseParcelableArray(key); }
static <T extends Parcelable> SparseArray<T> function(@Nullable Bundle bundle, @Nullable String key, @Nullable SparseArray<T> fallback) { if (bundle == null) { return fallback; } return bundle.getSparseParcelableArray(key); }
/** * Returns a optional {@link android.util.SparseArray} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.SparseArray}. * The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. * @param bundle a bundle. If the b...
Returns a optional <code>android.util.SparseArray</code> value. In other words, returns the value mapped by key if it exists and is a <code>android.util.SparseArray</code>. The bundle argument is allowed to be null. If the bundle is null, this method returns null
optSparseParcelableArray
{ "repo_name": "nohana/Amalgam", "path": "amalgam/src/main/java/com/amalgam/os/BundleUtils.java", "license": "apache-2.0", "size": 55053 }
[ "android.os.Bundle", "android.os.Parcelable", "android.support.annotation.Nullable", "android.util.SparseArray" ]
import android.os.Bundle; import android.os.Parcelable; import android.support.annotation.Nullable; import android.util.SparseArray;
import android.os.*; import android.support.annotation.*; import android.util.*;
[ "android.os", "android.support", "android.util" ]
android.os; android.support; android.util;
1,168,829