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 EnumeratedConceptualDomainResource createEnumeratedConceptualDomain(
AdministrationRecordResource conceptualDomainAdministrationRecord,
String dimensionality,
StewardshipRelationshipResource administeredBy,
SubmissionRelationshipResource submittedBy,
RegistrationAuthorityResource registere... | EnumeratedConceptualDomainResource function( AdministrationRecordResource conceptualDomainAdministrationRecord, String dimensionality, StewardshipRelationshipResource administeredBy, SubmissionRelationshipResource submittedBy, RegistrationAuthorityResource registeredBy, AdministeredItemContextResource having) { if (con... | /**
* The method to create {@link EnumeratedConceptualDomainResource} on
* {@link Abbreviation}.
*
* @param conceptualDomainAdministrationRecord
* The AdministrationRecord for a
* {@link ConceptualDomainResource}.
* @param dimensionality
* Optional. An expressio... | The method to create <code>EnumeratedConceptualDomainResource</code> on <code>Abbreviation</code> | createEnumeratedConceptualDomain | {
"repo_name": "srdc/semanticMDR",
"path": "core/src/main/java/tr/com/srdc/mdr/core/model/MDRResourceFactory.java",
"license": "gpl-3.0",
"size": 101565
} | [
"com.hp.hpl.jena.enhanced.EnhGraph",
"com.hp.hpl.jena.graph.Node",
"tr.com.srdc.mdr.core.impl.ai.EnumeratedConceptualDomainImpl",
"tr.com.srdc.mdr.core.model.iso11179.EnumeratedConceptualDomainResource",
"tr.com.srdc.mdr.core.model.iso11179.composite.AdministeredItemContextResource",
"tr.com.srdc.mdr.core... | import com.hp.hpl.jena.enhanced.EnhGraph; import com.hp.hpl.jena.graph.Node; import tr.com.srdc.mdr.core.impl.ai.EnumeratedConceptualDomainImpl; import tr.com.srdc.mdr.core.model.iso11179.EnumeratedConceptualDomainResource; import tr.com.srdc.mdr.core.model.iso11179.composite.AdministeredItemContextResource; import tr.... | import com.hp.hpl.jena.enhanced.*; import com.hp.hpl.jena.graph.*; import tr.com.srdc.mdr.core.impl.ai.*; import tr.com.srdc.mdr.core.model.iso11179.*; import tr.com.srdc.mdr.core.model.iso11179.composite.*; | [
"com.hp.hpl",
"tr.com.srdc"
] | com.hp.hpl; tr.com.srdc; | 1,447,135 |
public static AbstractMessage.QOSType getQOSType(int qos) {
return AbstractMessage.QOSType.valueOf(qos);
} | static AbstractMessage.QOSType function(int qos) { return AbstractMessage.QOSType.valueOf(qos); } | /**
* Will convert between the types of the QOS to adhere to the conversion of both andes and mqtt protocol
*
* @param qos the quality of service level the message should be published/subscribed
* @return the level which is compliment by the mqtt library
*/ | Will convert between the types of the QOS to adhere to the conversion of both andes and mqtt protocol | getQOSType | {
"repo_name": "hemikak/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/mqtt/utils/MQTTUtils.java",
"license": "apache-2.0",
"size": 13437
} | [
"org.dna.mqtt.moquette.proto.messages.AbstractMessage"
] | import org.dna.mqtt.moquette.proto.messages.AbstractMessage; | import org.dna.mqtt.moquette.proto.messages.*; | [
"org.dna.mqtt"
] | org.dna.mqtt; | 2,145,674 |
@Override
protected ArrayList<String> calculatePossibleMoves( ChessGameBoard board )
{
ArrayList<String> northEastMoves = calculateNorthEastMoves( board, 1 );
ArrayList<String> northWestMoves = calculateNorthWestMoves( board, 1 );
ArrayList<String> southEastMoves = calculateSout... | ArrayList<String> function( ChessGameBoard board ) { ArrayList<String> northEastMoves = calculateNorthEastMoves( board, 1 ); ArrayList<String> northWestMoves = calculateNorthWestMoves( board, 1 ); ArrayList<String> southEastMoves = calculateSouthEastMoves( board, 1 ); ArrayList<String> southWestMoves = calculateSouthWe... | /**
* Calculates the possible moves for this piece. These are ALL the possible
* moves, including illegal (but at the same time valid) moves.
*
* @param board
* the game board to calculate moves on
* @return ArrayList<String> the moves
*/ | Calculates the possible moves for this piece. These are ALL the possible moves, including illegal (but at the same time valid) moves | calculatePossibleMoves | {
"repo_name": "bakatz/Chess",
"path": "src/King.java",
"license": "gpl-3.0",
"size": 3348
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,299,276 |
public static boolean isSupportedType(LogicalType type) {
// ordered by type root definition
switch (type.getTypeRoot()) {
case CHAR:
case VARCHAR:
case BOOLEAN:
case BINARY:
case VARBINARY:
case DECIMAL:
case TINYINT:
case SMALLINT:
case INTEGER:
case DATE:
case INTERVAL_YEAR_MO... | static boolean function(LogicalType type) { switch (type.getTypeRoot()) { case CHAR: case VARCHAR: case BOOLEAN: case BINARY: case VARBINARY: case DECIMAL: case TINYINT: case SMALLINT: case INTEGER: case DATE: case INTERVAL_YEAR_MONTH: case BIGINT: case INTERVAL_DAY_TIME: case FLOAT: case DOUBLE: return true; case TIME... | /**
* Checks whether the given {@link LogicalType} is supported in HBase connector.
*/ | Checks whether the given <code>LogicalType</code> is supported in HBase connector | isSupportedType | {
"repo_name": "darionyaphet/flink",
"path": "flink-connectors/flink-connector-hbase/src/main/java/org/apache/flink/connector/hbase/util/HBaseTypeUtils.java",
"license": "apache-2.0",
"size": 7047
} | [
"org.apache.flink.table.types.logical.LogicalType",
"org.apache.flink.table.types.logical.utils.LogicalTypeChecks"
] | import org.apache.flink.table.types.logical.LogicalType; import org.apache.flink.table.types.logical.utils.LogicalTypeChecks; | import org.apache.flink.table.types.logical.*; import org.apache.flink.table.types.logical.utils.*; | [
"org.apache.flink"
] | org.apache.flink; | 185,152 |
public void setAxisProperties(ColorBar colorBar) {
super.setAxisProperties(colorBar.getAxis());
colorBar.setColorPalette(this.currentPalette.getPalette());
colorBar.getColorPalette().setInverse(this.invertPalette); //dmo added
colorBar.getColorPalette().setStepped(this.stepPalette); ... | void function(ColorBar colorBar) { super.setAxisProperties(colorBar.getAxis()); colorBar.setColorPalette(this.currentPalette.getPalette()); colorBar.getColorPalette().setInverse(this.invertPalette); colorBar.getColorPalette().setStepped(this.stepPalette); } | /**
* Sets the properties of the specified axis to match the properties
* defined on this panel.
*
* @param colorBar the color bar.
*/ | Sets the properties of the specified axis to match the properties defined on this panel | setAxisProperties | {
"repo_name": "opensim-org/opensim-gui",
"path": "Gui/opensim/jfreechart/src/org/jfree/chart/editor/DefaultColorBarEditor.java",
"license": "apache-2.0",
"size": 8196
} | [
"org.jfree.chart.axis.ColorBar"
] | import org.jfree.chart.axis.ColorBar; | import org.jfree.chart.axis.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,473,989 |
public boolean createView(View view) throws IOException {
throw UserException.unsupportedError()
.message("Creating new view is not supported in schema [%s]", getSchemaPath())
.build(logger);
} | boolean function(View view) throws IOException { throw UserException.unsupportedError() .message(STR, getSchemaPath()) .build(logger); } | /**
* Create a new view given definition.
* @param view View info including name, definition etc.
* @return Returns true if an existing view is replaced with the given view. False otherwise.
* @throws IOException
*/ | Create a new view given definition | createView | {
"repo_name": "rchallapalli/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java",
"license": "apache-2.0",
"size": 9073
} | [
"java.io.IOException",
"org.apache.drill.common.exceptions.UserException",
"org.apache.drill.exec.dotdrill.View"
] | import java.io.IOException; import org.apache.drill.common.exceptions.UserException; import org.apache.drill.exec.dotdrill.View; | import java.io.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.dotdrill.*; | [
"java.io",
"org.apache.drill"
] | java.io; org.apache.drill; | 2,639,708 |
public static void sendUserMessage(User inSender, Files inBody, VObject inRecipient, String text, CCalendar inDeliveryDate, Palette inColorPal, boolean isStream) throws IllegalArgumentException {
MessageServices.sendUserMessage(Factories.MESSENGER.getByUser(inSender), new Body[] { new Body(inBody, inColorPal, isSt... | static void function(User inSender, Files inBody, VObject inRecipient, String text, CCalendar inDeliveryDate, Palette inColorPal, boolean isStream) throws IllegalArgumentException { MessageServices.sendUserMessage(Factories.MESSENGER.getByUser(inSender), new Body[] { new Body(inBody, inColorPal, isStream) }, Factories.... | /**
* Sends a message from a UserImpl to a VObjectImpl.
*
* @param inSender the UserImpl sending the message
* @param inBody the body of the message (mp3, chor, adp)
* @param inRecipient the VObjectImpl receiving the message
* @param text the text of the message
* @param inColorPal the color palette to b... | Sends a message from a UserImpl to a VObjectImpl | sendUserMessage | {
"repo_name": "sebastienhouzet/nabaztag-source-code",
"path": "server/OS/net/violet/platform/message/MessageServices.java",
"license": "mit",
"size": 22615
} | [
"net.violet.platform.datamodel.Files",
"net.violet.platform.datamodel.User",
"net.violet.platform.datamodel.VObject",
"net.violet.platform.datamodel.factories.Factories",
"net.violet.platform.dataobjects.MessageData",
"net.violet.platform.util.CCalendar",
"net.violet.platform.xmpp.JabberMessageFactory"
... | import net.violet.platform.datamodel.Files; import net.violet.platform.datamodel.User; import net.violet.platform.datamodel.VObject; import net.violet.platform.datamodel.factories.Factories; import net.violet.platform.dataobjects.MessageData; import net.violet.platform.util.CCalendar; import net.violet.platform.xmpp.Ja... | import net.violet.platform.datamodel.*; import net.violet.platform.datamodel.factories.*; import net.violet.platform.dataobjects.*; import net.violet.platform.util.*; import net.violet.platform.xmpp.*; | [
"net.violet.platform"
] | net.violet.platform; | 2,158,461 |
public void addCacheArchive(URI uri) {
ensureState(JobState.DEFINE);
DistributedCache.addCacheArchive(uri, conf);
} | void function(URI uri) { ensureState(JobState.DEFINE); DistributedCache.addCacheArchive(uri, conf); } | /**
* Add a archives to be localized
* @param uri The uri of the cache to be localized
*/ | Add a archives to be localized | addCacheArchive | {
"repo_name": "jaypatil/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java",
"license": "gpl-3.0",
"size": 50307
} | [
"org.apache.hadoop.mapreduce.filecache.DistributedCache"
] | import org.apache.hadoop.mapreduce.filecache.DistributedCache; | import org.apache.hadoop.mapreduce.filecache.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,811,542 |
private void setupActionBar() {
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
// Show the Up button in the action bar.
actionBar.setDisplayHomeAsUpEnabled(true);
}
} | void function() { ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayHomeAsUpEnabled(true); } } | /**
* Set up the {@link android.app.ActionBar}, if the API is available.
*/ | Set up the <code>android.app.ActionBar</code>, if the API is available | setupActionBar | {
"repo_name": "do9jhb/Part-DB-android",
"path": "app/src/main/java/jbtronics/part_db/SettingsActivity.java",
"license": "gpl-3.0",
"size": 9904
} | [
"android.support.v7.app.ActionBar"
] | import android.support.v7.app.ActionBar; | import android.support.v7.app.*; | [
"android.support"
] | android.support; | 2,878,771 |
public void setLineAuthorizer(AccountingLineAuthorizer lineAuthorizer) {
this.lineAuthorizer = lineAuthorizer;
} | void function(AccountingLineAuthorizer lineAuthorizer) { this.lineAuthorizer = lineAuthorizer; } | /**
* Sets the lineAuthorizer attribute value.
*
* @param lineAuthorizer The lineAuthorizer to set.
*/ | Sets the lineAuthorizer attribute value | setLineAuthorizer | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/sec/document/authorization/SecAccountingLineAuthorizer.java",
"license": "agpl-3.0",
"size": 5970
} | [
"org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizer"
] | import org.kuali.kfs.sys.document.authorization.AccountingLineAuthorizer; | import org.kuali.kfs.sys.document.authorization.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 470,505 |
public String getResponseBodyAsString() {
if (executedMethod == null) {
throwNotConnectedException();
}
String res = null;
try {
res = executedMethod.getResponseBodyAsString();
} catch (IOException e) {
throw new ServiceException(e);
... | String function() { if (executedMethod == null) { throwNotConnectedException(); } String res = null; try { res = executedMethod.getResponseBodyAsString(); } catch (IOException e) { throw new ServiceException(e); } finally { executedMethod.releaseConnection(); } return res; } | /**
* Return the response body, ensuring that the connection is closed
* upon completion.
* @return the response body body as the string
*/ | Return the response body, ensuring that the connection is closed upon completion | getResponseBodyAsString | {
"repo_name": "julie-sullivan/phytomine",
"path": "intermine/webservice/client/main/src/org/intermine/webservice/client/util/HttpConnection.java",
"license": "lgpl-2.1",
"size": 10879
} | [
"java.io.IOException",
"org.intermine.webservice.client.exceptions.ServiceException"
] | import java.io.IOException; import org.intermine.webservice.client.exceptions.ServiceException; | import java.io.*; import org.intermine.webservice.client.exceptions.*; | [
"java.io",
"org.intermine.webservice"
] | java.io; org.intermine.webservice; | 1,833,346 |
public StaffStatus getStaffStatus(StaffAttemptID staffId) {
return this.runningStaffs.get(staffId).getStatus();
}
| StaffStatus function(StaffAttemptID staffId) { return this.runningStaffs.get(staffId).getStatus(); } | /**
* Get StaffStatus.
* @param staffId StaffAttemptID
* @return StaffStatus
*/ | Get StaffStatus | getStaffStatus | {
"repo_name": "LiuJianan/Graduate-Graph",
"path": "src/java/com/chinamobile/bcbsp/workermanager/WorkerManager.java",
"license": "apache-2.0",
"size": 72981
} | [
"com.chinamobile.bcbsp.util.StaffAttemptID",
"com.chinamobile.bcbsp.util.StaffStatus"
] | import com.chinamobile.bcbsp.util.StaffAttemptID; import com.chinamobile.bcbsp.util.StaffStatus; | import com.chinamobile.bcbsp.util.*; | [
"com.chinamobile.bcbsp"
] | com.chinamobile.bcbsp; | 1,787,949 |
List<BatchInstance> getBatchInstanceByStatusList(List<BatchInstanceStatus> batchStatusList);
/**
* This API fetches batch instance on the basis of user name and the roles defined for that user name in the batch class.
*
* @param userRoles Set<String>
* @param batchInstanceIdentifier String
* @param curr... | List<BatchInstance> getBatchInstanceByStatusList(List<BatchInstanceStatus> batchStatusList); /** * This API fetches batch instance on the basis of user name and the roles defined for that user name in the batch class. * * @param userRoles Set<String> * @param batchInstanceIdentifier String * @param currentUserName Stri... | /**
* This API fetches all the batch instances on the basis of batch status list passed.
*
* @param batchStatusList List<{@link BatchInstanceStatus}>
* @return List<{@link BatchInstance}>
*/ | This API fetches all the batch instances on the basis of batch status list passed | getBatchInstanceByStatusList | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-data-access/src/main/java/com/ephesoft/dcma/da/dao/BatchInstanceDao.java",
"license": "agpl-3.0",
"size": 21511
} | [
"com.ephesoft.dcma.core.common.BatchInstanceStatus",
"com.ephesoft.dcma.core.common.EphesoftUser",
"com.ephesoft.dcma.da.domain.BatchInstance",
"java.util.List",
"java.util.Set"
] | import com.ephesoft.dcma.core.common.BatchInstanceStatus; import com.ephesoft.dcma.core.common.EphesoftUser; import com.ephesoft.dcma.da.domain.BatchInstance; import java.util.List; import java.util.Set; | import com.ephesoft.dcma.core.common.*; import com.ephesoft.dcma.da.domain.*; import java.util.*; | [
"com.ephesoft.dcma",
"java.util"
] | com.ephesoft.dcma; java.util; | 2,900,477 |
@POST
@Path(value = "/events/")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@ReturnType("java.lang.Void")
Response addEvent(
@FormParam("groupId") @DefaultValue(Constants.USERS_GROUP_ID) String groupId,
@FormParam("pid") String pid,
@... | @Path(value = STR) @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) @ReturnType(STR) Response addEvent( @FormParam(STR) @DefaultValue(Constants.USERS_GROUP_ID) String groupId, @FormParam("pid") String pid, @FormParam(STR) String eventType, @FormParam(STR) String category, @FormParam(STR) String detail... | /**
* Create a new event using the provider properties. Events added using the
* REST endpoint will have the trigger set to AuditEvent.TRIGGER.EXTERNAL.
*
* @summary Add a new audit event of a specific type and with the provided
* category.
*
* @param groupId The id of the grou... | Create a new event using the provider properties. Events added using the REST endpoint will have the trigger set to AuditEvent.TRIGGER.EXTERNAL | addEvent | {
"repo_name": "kit-data-manager/base",
"path": "RestInterfaces/AuditRestInterface/src/main/java/edu/kit/dama/rest/sharing/services/interfaces/IAuditService.java",
"license": "apache-2.0",
"size": 8276
} | [
"com.qmino.miredot.annotations.ReturnType",
"com.sun.jersey.api.core.HttpContext",
"edu.kit.dama.util.Constants",
"javax.ws.rs.DefaultValue",
"javax.ws.rs.FormParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import com.qmino.miredot.annotations.ReturnType; import com.sun.jersey.api.core.HttpContext; import edu.kit.dama.util.Constants; import javax.ws.rs.DefaultValue; import javax.ws.rs.FormParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import com.qmino.miredot.annotations.*; import com.sun.jersey.api.core.*; import edu.kit.dama.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.qmino.miredot",
"com.sun.jersey",
"edu.kit.dama",
"javax.ws"
] | com.qmino.miredot; com.sun.jersey; edu.kit.dama; javax.ws; | 881,999 |
@Generated
@Selector("linearAttenuation")
public native float linearAttenuation();
/**
* { 0.0, 0.0, 0.0, 1.0 } | @Selector(STR) native float function(); /** * { 0.0, 0.0, 0.0, 1.0 } | /**
* 1.0, 0.0, 0.0
*/ | 1.0, 0.0, 0.0 | linearAttenuation | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/glkit/GLKEffectPropertyLight.java",
"license": "apache-2.0",
"size": 9845
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 666,363 |
public ServiceFuture<Object> beginDeleteAsync(String resourceGroupName, String cacheName, final ServiceCallback<Object> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, cacheName), serviceCallback);
} | ServiceFuture<Object> function(String resourceGroupName, String cacheName, final ServiceCallback<Object> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, cacheName), serviceCallback); } | /**
* Schedules a Cache for deletion.
*
* @param resourceGroupName Target resource group.
* @param cacheName Name of cache.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validat... | Schedules a Cache for deletion | beginDeleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/CachesInner.java",
"license": "mit",
"size": 107334
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,116,339 |
@SideOnly(Side.CLIENT)
public void setInitialSpawnLocation()
{
if (this.worldInfo.getSpawnY() <= 0)
{
this.worldInfo.setSpawnY(this.getSeaLevel() + 1);
}
int i = this.worldInfo.getSpawnX();
int j = this.worldInfo.getSpawnZ();
int k = 0;
w... | @SideOnly(Side.CLIENT) void function() { if (this.worldInfo.getSpawnY() <= 0) { this.worldInfo.setSpawnY(this.getSeaLevel() + 1); } int i = this.worldInfo.getSpawnX(); int j = this.worldInfo.getSpawnZ(); int k = 0; while (this.getGroundAboveSeaLevel(new BlockPos(i, 0, j)).getMaterial() == Material.AIR) { i += this.rand... | /**
* Sets a new spawn location by finding an uncovered block at a random (x,z) location in the chunk.
*/ | Sets a new spawn location by finding an uncovered block at a random (x,z) location in the chunk | setInitialSpawnLocation | {
"repo_name": "danielyc/test-1.9.4",
"path": "build/tmp/recompileMc/sources/net/minecraft/world/WorldServer.java",
"license": "gpl-3.0",
"size": 54443
} | [
"net.minecraft.block.material.Material",
"net.minecraft.util.math.BlockPos",
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import net.minecraft.block.material.Material; import net.minecraft.util.math.BlockPos; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import net.minecraft.block.material.*; import net.minecraft.util.math.*; import net.minecraftforge.fml.relauncher.*; | [
"net.minecraft.block",
"net.minecraft.util",
"net.minecraftforge.fml"
] | net.minecraft.block; net.minecraft.util; net.minecraftforge.fml; | 2,563,664 |
public static int getSlotId(int subId) {
if (!isValidSubscriptionId(subId)) {
if (DBG) {
logd("[getSlotId]- fail");
}
}
int result = INVALID_SIM_SLOT_INDEX;
try {
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")... | static int function(int subId) { if (!isValidSubscriptionId(subId)) { if (DBG) { logd(STR); } } int result = INVALID_SIM_SLOT_INDEX; try { ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub")); if (iSub != null) { result = iSub.getSlotId(subId); } } catch (RemoteException ex) { } return result; } | /**
* Get slotId associated with the subscription.
* @return slotId as a positive integer or a negative value if an error either
* SIM_NOT_INSERTED or < 0 if an invalid slot index
* @hide
*/ | Get slotId associated with the subscription | getSlotId | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "telephony/java/android/telephony/SubscriptionManager.java",
"license": "apache-2.0",
"size": 43316
} | [
"android.os.RemoteException",
"android.os.ServiceManager",
"com.android.internal.telephony.ISub"
] | import android.os.RemoteException; import android.os.ServiceManager; import com.android.internal.telephony.ISub; | import android.os.*; import com.android.internal.telephony.*; | [
"android.os",
"com.android.internal"
] | android.os; com.android.internal; | 873,619 |
@Deprecated
public Chronology getChronolgy() {
return iChrono;
} | Chronology function() { return iChrono; } | /**
* Gets the chronology to use as an override.
*
* @return the chronology to use as an override
* @deprecated Use the method with the correct spelling
*/ | Gets the chronology to use as an override | getChronolgy | {
"repo_name": "0359xiaodong/joda-time-android",
"path": "library/src/org/joda/time/format/DateTimeFormatter.java",
"license": "apache-2.0",
"size": 38450
} | [
"org.joda.time.Chronology"
] | import org.joda.time.Chronology; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,879,252 |
private AttachContainerCmd executeAttachContainerRequest(DockerClient client, Message message) {
LOGGER.debug("Executing Docker Attach Container Request");
String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class);
Object... | AttachContainerCmd function(DockerClient client, Message message) { LOGGER.debug(STR); String containerId = DockerHelper.getProperty(DockerConstants.DOCKER_CONTAINER_ID, configuration, message, String.class); ObjectHelper.notNull(containerId, STR); AttachContainerCmd attachContainerCmd = client.attachContainerCmd(conta... | /**
* Produce a attach container request
*
* @param client
* @param message
* @return
*/ | Produce a attach container request | executeAttachContainerRequest | {
"repo_name": "ramonmaruko/camel",
"path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java",
"license": "apache-2.0",
"size": 51680
} | [
"com.github.dockerjava.api.DockerClient",
"com.github.dockerjava.api.command.AttachContainerCmd",
"org.apache.camel.Message",
"org.apache.camel.component.docker.DockerConstants",
"org.apache.camel.component.docker.DockerHelper",
"org.apache.camel.util.ObjectHelper"
] | import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.AttachContainerCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper; import org.apache.camel.util.ObjectHelper; | import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*; import org.apache.camel.util.*; | [
"com.github.dockerjava",
"org.apache.camel"
] | com.github.dockerjava; org.apache.camel; | 2,455,456 |
public void setActionOutputRoot(Path actionOutputRoot) {
Preconditions.checkNotNull(actionOutputRoot);
this.actionLogBufferPathGenerator = new ActionLogBufferPathGenerator(actionOutputRoot);
this.skyframeActionExecutor.setActionLogBufferPathGenerator(actionLogBufferPathGenerator);
} | void function(Path actionOutputRoot) { Preconditions.checkNotNull(actionOutputRoot); this.actionLogBufferPathGenerator = new ActionLogBufferPathGenerator(actionOutputRoot); this.skyframeActionExecutor.setActionLogBufferPathGenerator(actionLogBufferPathGenerator); } | /**
* Sets the path for action log buffers.
*/ | Sets the path for action log buffers | setActionOutputRoot | {
"repo_name": "variac/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java",
"license": "apache-2.0",
"size": 96878
} | [
"com.google.devtools.build.lib.actions.ActionLogBufferPathGenerator",
"com.google.devtools.build.lib.util.Preconditions",
"com.google.devtools.build.lib.vfs.Path"
] | import com.google.devtools.build.lib.actions.ActionLogBufferPathGenerator; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.lib.vfs.Path; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,383,830 |
public static Collection<VisorGridEvent> collectEvents(Ignite ignite, String evtOrderKey, String evtThrottleCntrKey,
boolean all, IgniteClosure<Event, VisorGridEvent> evtMapper) {
int[] evtTypes = all ? VISOR_ALL_EVTS : VISOR_NON_TASK_EVTS;
// Collect discovery events for Web Console.
... | static Collection<VisorGridEvent> function(Ignite ignite, String evtOrderKey, String evtThrottleCntrKey, boolean all, IgniteClosure<Event, VisorGridEvent> evtMapper) { int[] evtTypes = all ? VISOR_ALL_EVTS : VISOR_NON_TASK_EVTS; if (evtOrderKey.startsWith(STR)) evtTypes = concat(evtTypes, EVTS_DISCOVERY); return collec... | /**
* Grabs local events and detects if events was lost since last poll.
*
* @param ignite Target grid.
* @param evtOrderKey Unique key to take last order key from node local map.
* @param evtThrottleCntrKey Unique key to take throttle count from node local map.
* @param all If {@code true... | Grabs local events and detects if events was lost since last poll | collectEvents | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/visor/util/VisorTaskUtils.java",
"license": "apache-2.0",
"size": 41057
} | [
"java.util.Collection",
"org.apache.ignite.Ignite",
"org.apache.ignite.events.Event",
"org.apache.ignite.internal.visor.event.VisorGridEvent",
"org.apache.ignite.lang.IgniteClosure"
] | import java.util.Collection; import org.apache.ignite.Ignite; import org.apache.ignite.events.Event; import org.apache.ignite.internal.visor.event.VisorGridEvent; import org.apache.ignite.lang.IgniteClosure; | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.events.*; import org.apache.ignite.internal.visor.event.*; import org.apache.ignite.lang.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 177,044 |
public static String getExternalStorageState(String state)
{
if (TextUtils.isEmpty(state))
{
return UNKNOWN;
}
switch (state)
{
case Environment.MEDIA_BAD_REMOVAL://bad_removal
return "MEDIA_BAD_REMOVAL";
case Environme... | static String function(String state) { if (TextUtils.isEmpty(state)) { return UNKNOWN; } switch (state) { case Environment.MEDIA_BAD_REMOVAL: return STR; case Environment.MEDIA_CHECKING: return STR; case Environment.MEDIA_EJECTING: return STR; case Environment.MEDIA_MOUNTED: return STR; case Environment.MEDIA_MOUNTED_R... | /**
* Returns the current state of the storage device that provides the given path.
* @param state "getExternalStorageState()"
*/ | Returns the current state of the storage device that provides the given path | getExternalStorageState | {
"repo_name": "gitaiQAQ/SmsCodeHelper",
"path": "app/src/main/java/me/gitai/library/utils/AndroidUtils.java",
"license": "lgpl-3.0",
"size": 64107
} | [
"android.os.Environment",
"android.text.TextUtils"
] | import android.os.Environment; import android.text.TextUtils; | import android.os.*; import android.text.*; | [
"android.os",
"android.text"
] | android.os; android.text; | 2,750,769 |
static int getCoresFromFileString(@Nullable String str) {
if (str == null || !str.matches("0-[\\d]+$")) {
return DEVICEINFO_UNKNOWN;
}
return Integer.parseInt(str.substring(2)) + 1;
} | static int getCoresFromFileString(@Nullable String str) { if (str == null !str.matches(STR)) { return DEVICEINFO_UNKNOWN; } return Integer.parseInt(str.substring(2)) + 1; } | /**
* Converts from a CPU core information format to number of cores.
*
* @param str The CPU core information string, in the format of "0-N"
* @return The number of cores represented by this string
*/ | Converts from a CPU core information format to number of cores | getCoresFromFileString | {
"repo_name": "facebook/litho",
"path": "litho-core/src/main/java/com/facebook/litho/config/DeviceInfoUtils.java",
"license": "apache-2.0",
"size": 4907
} | [
"androidx.annotation.Nullable"
] | import androidx.annotation.Nullable; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 2,079,106 |
public void setButtonBarOption(List<String> buttonBar) {
m_buttonBarOption = buttonBar;
} | void function(List<String> buttonBar) { m_buttonBarOption = buttonBar; } | /**
* Sets the individual button bar configuration option.<p>
*
* @param buttonBar the individual button bar configuration option
*/ | Sets the individual button bar configuration option | setButtonBarOption | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/widgets/CmsHtmlWidgetOption.java",
"license": "lgpl-2.1",
"size": 47359
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,597,504 |
public Optional<String> getMiOpt() {
return getAnnotationStringOpt("MI");
} | Optional<String> function() { return getAnnotationStringOpt("MI"); } | /**
* Return an optional Type=Z value for the reserved key <code>MI</code>
* as a string.
*
* @return an optional Type=Z value for the reserved key <code>MI</code>
* as a string
*/ | Return an optional Type=Z value for the reserved key <code>MI</code> as a string | getMiOpt | {
"repo_name": "heuermh/dishevelled-bio",
"path": "alignment/src/main/java/org/dishevelled/bio/alignment/sam/SamRecord.java",
"license": "lgpl-3.0",
"size": 61001
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,145,466 |
public ServiceProfile[] getSupportedServiceProfiles()
{
return supportedServiceProfiles;
} | ServiceProfile[] function() { return supportedServiceProfiles; } | /**
* Get the supported service profiles.
*
* @return
* Supported service profiles.
*
* @since 2.12
*/ | Get the supported service profiles | getSupportedServiceProfiles | {
"repo_name": "authlete/authlete-java-common",
"path": "src/main/java/com/authlete/common/dto/Service.java",
"license": "apache-2.0",
"size": 222386
} | [
"com.authlete.common.types.ServiceProfile"
] | import com.authlete.common.types.ServiceProfile; | import com.authlete.common.types.*; | [
"com.authlete.common"
] | com.authlete.common; | 1,505,211 |
SelectBox selectBox = this.selectBox.get();
SelectBoxScrollablePanel selectionListPanel = this.selectionListPanel.get();
if (selectBox == null || selectionListPanel == null) {
return true;
}
if (selectBox.isCollapsed()) {
return false;
}
deltaSum += d... | SelectBox selectBox = this.selectBox.get(); SelectBoxScrollablePanel selectionListPanel = this.selectionListPanel.get(); if (selectBox == null selectionListPanel == null) { return true; } if (selectBox.isCollapsed()) { return false; } deltaSum += delta; if (deltaSum < 0.01d) { return false; } float buttonWidth = select... | /**
* This method used to update animated object. Called by animator every frame. Removed from animator and stops when this method returns true. <p> Returns
* true if animation is finished and could be removed from animator.
*
* @param delta delta time (from previous call).
*
* @return tru... | This method used to update animated object. Called by animator every frame. Removed from animator and stops when this method returns true. Returns true if animation is finished and could be removed from animator | animate | {
"repo_name": "LiquidEngine/legui",
"path": "src/main/java/org/liquidengine/legui/component/misc/animation/selectbox/SelectBoxAnimation.java",
"license": "bsd-3-clause",
"size": 2919
} | [
"org.joml.Vector2f",
"org.liquidengine.legui.component.SelectBox"
] | import org.joml.Vector2f; import org.liquidengine.legui.component.SelectBox; | import org.joml.*; import org.liquidengine.legui.component.*; | [
"org.joml",
"org.liquidengine.legui"
] | org.joml; org.liquidengine.legui; | 1,289,146 |
public File getFile(String dirsProp, String path)
throws IOException {
String[] dirs = getStrings(dirsProp);
int hashCode = path.hashCode();
for (int i = 0; i < dirs.length; i++) { // try each local dir
int index = (hashCode+i & Integer.MAX_VALUE) % dirs.length;
File file = new File(dirs[... | File function(String dirsProp, String path) throws IOException { String[] dirs = getStrings(dirsProp); int hashCode = path.hashCode(); for (int i = 0; i < dirs.length; i++) { int index = (hashCode+i & Integer.MAX_VALUE) % dirs.length; File file = new File(dirs[index], path); File dir = file.getParentFile(); if (dir.exi... | /**
* Get a local file name under a directory named in <i>dirsProp</i> with
* the given <i>path</i>. If <i>dirsProp</i> contains multiple directories,
* then one is chosen based on <i>path</i>'s hash code. If the selected
* directory does not exist, an attempt is made to create it.
*
* @param dirs... | Get a local file name under a directory named in dirsProp with the given path. If dirsProp contains multiple directories, then one is chosen based on path's hash code. If the selected directory does not exist, an attempt is made to create it | getFile | {
"repo_name": "pombredanne/brisk-hadoop-common",
"path": "src/core/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 47616
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 940,887 |
public int getRpsHardServiceLimit() {
return getInt(DistributedLogConfiguration.BKDL_RPS_HARD_SERVICE_LIMIT,
defaultConfig.getInt(DistributedLogConfiguration.BKDL_RPS_HARD_SERVICE_LIMIT,
DistributedLogConfiguration.BKDL_RPS_HARD_SERVICE_LIMIT_DEFAULT));
} | int function() { return getInt(DistributedLogConfiguration.BKDL_RPS_HARD_SERVICE_LIMIT, defaultConfig.getInt(DistributedLogConfiguration.BKDL_RPS_HARD_SERVICE_LIMIT, DistributedLogConfiguration.BKDL_RPS_HARD_SERVICE_LIMIT_DEFAULT)); } | /**
* An upper threshold requests per second limit on writes to the distributedlog proxy globally.
*
* @return Requests per second write limit
*/ | An upper threshold requests per second limit on writes to the distributedlog proxy globally | getRpsHardServiceLimit | {
"repo_name": "ivankelly/bookkeeper",
"path": "stream/distributedlog/core/src/main/java/org/apache/distributedlog/config/DynamicDistributedLogConfiguration.java",
"license": "apache-2.0",
"size": 17076
} | [
"org.apache.distributedlog.DistributedLogConfiguration"
] | import org.apache.distributedlog.DistributedLogConfiguration; | import org.apache.distributedlog.*; | [
"org.apache.distributedlog"
] | org.apache.distributedlog; | 127,783 |
@ServiceMethod(returns = ReturnType.SINGLE)
public OperationResultsGetResponse getWithResponse(String operationId, String location, Context context) {
return getWithResponseAsync(operationId, location, context).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) OperationResultsGetResponse function(String operationId, String location, Context context) { return getWithResponseAsync(operationId, location, context).block(); } | /**
* Gets the operation result for a resource.
*
* @param operationId The operationId parameter.
* @param location The location parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @th... | Gets the operation result for a resource | getWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/dataprotection/azure-resourcemanager-dataprotection/src/main/java/com/azure/resourcemanager/dataprotection/implementation/OperationResultsClientImpl.java",
"license": "mit",
"size": 9829
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context",
"com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.dataprotection.models.OperationResultsGetResponse; | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.dataprotection.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 726,413 |
public static String modifyURIPath(String uri, String newPath) {
try {
URI uriObj = new URI(uri);
return uriToString(URLUtils.modifyURIPath(uriObj, newPath));
}
catch (URISyntaxException e) {
try {
return (new NetworkInterfaceURI(uri)).modi... | static String function(String uri, String newPath) { try { URI uriObj = new URI(uri); return uriToString(URLUtils.modifyURIPath(uriObj, newPath)); } catch (URISyntaxException e) { try { return (new NetworkInterfaceURI(uri)).modifyURIPath(newPath); } catch (IllegalArgumentException ne) { throw new IllegalArgumentExcepti... | /**
* Helper method for modiffying the URI path
* @param uri
* @param newPath
* @return
*/ | Helper method for modiffying the URI path | modifyURIPath | {
"repo_name": "jfallows/gateway",
"path": "resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java",
"license": "apache-2.0",
"size": 20303
} | [
"java.net.URISyntaxException",
"org.kaazing.gateway.resource.address.URLUtils"
] | import java.net.URISyntaxException; import org.kaazing.gateway.resource.address.URLUtils; | import java.net.*; import org.kaazing.gateway.resource.address.*; | [
"java.net",
"org.kaazing.gateway"
] | java.net; org.kaazing.gateway; | 911,805 |
public Set<String> getParameterNames() {
if (info == null || info.parameters == null) {
return ImmutableSet.of();
}
return ImmutableSet.copyOf(info.parameters.keySet());
} | Set<String> function() { if (info == null info.parameters == null) { return ImmutableSet.of(); } return ImmutableSet.copyOf(info.parameters.keySet()); } | /**
* Returns the set of names of the defined parameters. The iteration order
* of the returned set is the order in which parameters are defined in the
* JSDoc, rather than the order in which the function declares them.
*
* @return the set of names of the defined parameters. The returned set is
* ... | Returns the set of names of the defined parameters. The iteration order of the returned set is the order in which parameters are defined in the JSDoc, rather than the order in which the function declares them | getParameterNames | {
"repo_name": "lgeorgieff/closure-compiler",
"path": "src/com/google/javascript/rhino/JSDocInfo.java",
"license": "apache-2.0",
"size": 55197
} | [
"com.google.common.collect.ImmutableSet",
"java.util.Set"
] | import com.google.common.collect.ImmutableSet; import java.util.Set; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,842,262 |
public void combine(CanonicalWeightedQuartetMap other, Map<Integer, Integer> translation, double scalingFactor) {
for (Quad q : other.keySet()) {
Quad translated = this.translateQuartet(q, translation);
this.quartetWeights.incrementWeight(translated, other.get(q) * scalingFactor);
... | void function(CanonicalWeightedQuartetMap other, Map<Integer, Integer> translation, double scalingFactor) { for (Quad q : other.keySet()) { Quad translated = this.translateQuartet(q, translation); this.quartetWeights.incrementWeight(translated, other.get(q) * scalingFactor); this.summer.incrementWeight(translated, scal... | /**
* note: this now simply computes a weighted sum. This is the part that may be done in any number of ways here,
* take weighted sum of every quartet where the quartet is nonzero
* @param other The other map of canonical weighted quartet to combine into this
* @param translation Translation map, w... | note: this now simply computes a weighted sum. This is the part that may be done in any number of ways here, take weighted sum of every quartet where the quartet is nonzero | combine | {
"repo_name": "maplesond/spectre",
"path": "core/src/main/java/uk/ac/uea/cmp/spectre/core/ds/quad/quartet/QuartetSystemCombiner.java",
"license": "gpl-3.0",
"size": 7653
} | [
"java.util.Map",
"uk.ac.uea.cmp.spectre.core.ds.quad.Quad"
] | import java.util.Map; import uk.ac.uea.cmp.spectre.core.ds.quad.Quad; | import java.util.*; import uk.ac.uea.cmp.spectre.core.ds.quad.*; | [
"java.util",
"uk.ac.uea"
] | java.util; uk.ac.uea; | 347,913 |
protected static void intializeTableInfo(final List<?> tableItems,
final Hashtable<String, ExpressResultsTableInfo> tables,
final Hashtable<String, ExpressResultsTableInfo> byIdHash,
... | static void function(final List<?> tableItems, final Hashtable<String, ExpressResultsTableInfo> tables, final Hashtable<String, ExpressResultsTableInfo> byIdHash, final Hashtable<String, List<ExpressResultsTableInfo>> joinIdToTableInfoHash, final boolean isExpressSearch, final ResourceBundle resBundle) { for (Iterator<... | /**
* Collects information about all the tables that will be processed for any search.
* @param tableItems the list of Elements to be processed
* @param tables the table info hash
*/ | Collects information about all the tables that will be processed for any search | intializeTableInfo | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/af/core/expresssearch/ExpressSearchConfigCache.java",
"license": "gpl-2.0",
"size": 12603
} | [
"java.util.ArrayList",
"java.util.Hashtable",
"java.util.Iterator",
"java.util.List",
"java.util.ResourceBundle",
"org.dom4j.Element"
] | import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.ResourceBundle; import org.dom4j.Element; | import java.util.*; import org.dom4j.*; | [
"java.util",
"org.dom4j"
] | java.util; org.dom4j; | 2,202,983 |
private int calculateLayoutHeight(int heightSize, int mode) {
mItemsLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
mItemsLayout.measure(
MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED),
MeasureSpec.makeMeasureSp... | int function(int heightSize, int mode) { mItemsLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); mItemsLayout.measure( MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED), MeasureSpec.makeMeasureSpec(heightSize, MeasureSpec.UNSPECIFIED) ); int height = mItemsLayout.getM... | /**
* Calculates control height and creates text layouts
* @param heightSize the input layout height
* @param mode the layout mode
* @return the calculated control height
*/ | Calculates control height and creates text layouts | calculateLayoutHeight | {
"repo_name": "scauwjh/iSCAU-Android",
"path": "libraries/wheelspinner/src/antistatic/spinnerwheel/WheelHorizontalView.java",
"license": "gpl-3.0",
"size": 12564
} | [
"android.view.ViewGroup"
] | import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 2,437,782 |
public PaymentDTOEx getPaymentInfo(Integer userId)
throws TaskException {
PaymentDTOEx retValue = new PaymentDTOEx();
PaymentInformationBL paymentInfoBL = new PaymentInformationBL();
try {
UserBL userBL = new UserBL(userId);
for(PaymentInformationDTO pa... | PaymentDTOEx function(Integer userId) throws TaskException { PaymentDTOEx retValue = new PaymentDTOEx(); PaymentInformationBL paymentInfoBL = new PaymentInformationBL(); try { UserBL userBL = new UserBL(userId); for(PaymentInformationDTO paymentInformation : userBL.getEntity().getPaymentInstruments()) { LOG.debug(STR, ... | /**
* Gets all the payment instruments of user and after verifying puts them in PaymentDTOEx
*/ | Gets all the payment instruments of user and after verifying puts them in PaymentDTOEx | getPaymentInfo | {
"repo_name": "WebDataConsulting/billing",
"path": "src/java/com/sapienter/jbilling/server/pluggableTask/BasicPaymentInfoTask.java",
"license": "agpl-3.0",
"size": 6298
} | [
"com.sapienter.jbilling.server.payment.PaymentDTOEx",
"com.sapienter.jbilling.server.payment.PaymentInformationBL",
"com.sapienter.jbilling.server.payment.db.PaymentInformationDTO",
"com.sapienter.jbilling.server.user.UserBL"
] | import com.sapienter.jbilling.server.payment.PaymentDTOEx; import com.sapienter.jbilling.server.payment.PaymentInformationBL; import com.sapienter.jbilling.server.payment.db.PaymentInformationDTO; import com.sapienter.jbilling.server.user.UserBL; | import com.sapienter.jbilling.server.payment.*; import com.sapienter.jbilling.server.payment.db.*; import com.sapienter.jbilling.server.user.*; | [
"com.sapienter.jbilling"
] | com.sapienter.jbilling; | 2,453,074 |
private void loadMrrel() throws Exception {
logInfo(" Load MRREL data");
String line = null;
int objectCt = 0;
final PushBackReader reader = readers.getReader(RrfReaders.Keys.MRREL);
final String fields[] = new String[16];
try {
while ((line = reader.readLine()) != null) {
Fiel... | void function() throws Exception { logInfo(STR); String line = null; int objectCt = 0; final PushBackReader reader = readers.getReader(RrfReaders.Keys.MRREL); final String fields[] = new String[16]; try { while ((line = reader.readLine()) != null) { FieldedStringTokenizer.split(line, " ", 16, fields); if (style == Styl... | /**
* Load MRREL.This is responsible for loading {@link Relationship}s.
*
* @throws Exception the exception
*/ | Load MRREL.This is responsible for loading <code>Relationship</code>s | loadMrrel | {
"repo_name": "WestCoastInformatics/UMLS-Terminology-Server",
"path": "jpa-services/src/main/java/com/wci/umls/server/jpa/algo/RrfLoaderAlgorithm.java",
"license": "apache-2.0",
"size": 136844
} | [
"com.wci.umls.server.helpers.ComponentInfo",
"com.wci.umls.server.helpers.FieldedStringTokenizer",
"com.wci.umls.server.jpa.ComponentInfoJpa",
"com.wci.umls.server.jpa.content.AtomRelationshipJpa",
"com.wci.umls.server.jpa.content.CodeRelationshipJpa",
"com.wci.umls.server.jpa.content.ComponentInfoRelatio... | import com.wci.umls.server.helpers.ComponentInfo; import com.wci.umls.server.helpers.FieldedStringTokenizer; import com.wci.umls.server.jpa.ComponentInfoJpa; import com.wci.umls.server.jpa.content.AtomRelationshipJpa; import com.wci.umls.server.jpa.content.CodeRelationshipJpa; import com.wci.umls.server.jpa.content.Com... | import com.wci.umls.server.helpers.*; import com.wci.umls.server.jpa.*; import com.wci.umls.server.jpa.content.*; import com.wci.umls.server.model.content.*; import com.wci.umls.server.model.meta.*; import com.wci.umls.server.services.*; import com.wci.umls.server.services.helpers.*; | [
"com.wci.umls"
] | com.wci.umls; | 2,243,526 |
public Observable<BluetoothGattCharacteristic> writeSensorId(byte[] sensorId) {
return write(sensorId, SERVICE_ON_BOARDING, CHARACTERISTIC_SENSOR_ID);
} | Observable<BluetoothGattCharacteristic> function(byte[] sensorId) { return write(sensorId, SERVICE_ON_BOARDING, CHARACTERISTIC_SENSOR_ID); } | /**
* Writes the sensorId characteristic to the associated remote device.
*
* @param sensorId A number represented in Bytes to be written the remote device
* @return Observable<BluetoothGattCharacteristic>, an observable of what is
* to be written to the device
*/ | Writes the sensorId characteristic to the associated remote device | writeSensorId | {
"repo_name": "relayr/android-sdk",
"path": "android-sdk/src/main/java/io/relayr/android/ble/service/OnBoardingService.java",
"license": "mit",
"size": 4852
} | [
"android.bluetooth.BluetoothGattCharacteristic"
] | import android.bluetooth.BluetoothGattCharacteristic; | import android.bluetooth.*; | [
"android.bluetooth"
] | android.bluetooth; | 1,635,556 |
public void write(byte []buf, int offset, int length, boolean isEnd)
throws IOException
{
if (_stream != null)
_stream.write(buf, offset, length, isEnd);
} | void function(byte []buf, int offset, int length, boolean isEnd) throws IOException { if (_stream != null) _stream.write(buf, offset, length, isEnd); } | /**
* Writes a buffer to the underlying stream.
*
* @param buffer the byte array to write.
* @param offset the offset into the byte array.
* @param length the number of bytes to write.
* @param isEnd true when the write is flushing a close.
*/ | Writes a buffer to the underlying stream | write | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/server/hmux/HmuxStreamWrapper.java",
"license": "gpl-2.0",
"size": 4848
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,211,457 |
public static File generateServiceInterfaceFile(File file, YangNode curNode, List<String> imports,
boolean isAttributePresent)
throws IOException {
JavaFileInfo javaFileInfo = ((JavaFileInfoContainer) curNode).getJavaFileInfo();
String className = getCapitalCase(javaFileInf... | static File function(File file, YangNode curNode, List<String> imports, boolean isAttributePresent) throws IOException { JavaFileInfo javaFileInfo = ((JavaFileInfoContainer) curNode).getJavaFileInfo(); String className = getCapitalCase(javaFileInfo.getJavaName()) + SERVICE_METHOD_STRING; initiateJavaFileGeneration(file... | /**
* Generates interface file for rpc.
*
* @param file generated file
* @param curNode current YANG node
* @param imports imports for file
* @param isAttributePresent is attribute present
* @return rpc class file
* @throws IOException when fails to generate class file
*/ | Generates interface file for rpc | generateServiceInterfaceFile | {
"repo_name": "Phaneendra-Huawei/demo",
"path": "utils/yangutils/src/main/java/org/onosproject/yangutils/translator/tojava/utils/JavaFileGenerator.java",
"license": "apache-2.0",
"size": 40221
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.onosproject.yangutils.datamodel.YangNode",
"org.onosproject.yangutils.translator.tojava.JavaFileInfo",
"org.onosproject.yangutils.translator.tojava.JavaFileInfoContainer",
"org.onosproject.yangutils.translator.tojava.... | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.onosproject.yangutils.datamodel.YangNode; import org.onosproject.yangutils.translator.tojava.JavaFileInfo; import org.onosproject.yangutils.translator.tojava.JavaFileInfoContainer; import org.onosproject.yangu... | import java.io.*; import java.util.*; import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.translator.tojava.*; import org.onosproject.yangutils.translator.tojava.javamodel.*; import org.onosproject.yangutils.translator.tojava.utils.*; import org.onosproject.yangutils.utils.io.impl.*; | [
"java.io",
"java.util",
"org.onosproject.yangutils"
] | java.io; java.util; org.onosproject.yangutils; | 1,863,357 |
@Test
public void TestNodeHandlerIConfNodeIResolverFactory() throws Exception {
IConfNode root = new ConfNode();
NodeHandler hdl = new NodeHandler(root, new LinkableResolverFactory());
hdl.addconf("test.init.param1", "Parameter-1");
hdl.addconf("test.init.param2", "Parameter-2");
hdl.addconf... | void function() throws Exception { IConfNode root = new ConfNode(); NodeHandler hdl = new NodeHandler(root, new LinkableResolverFactory()); hdl.addconf(STR, STR); hdl.addconf(STR, STR); hdl.addconf(STR, STR); hdl.addconf(STR, Protector.wrap(STR)); NodeParser parser = new NodeParser(new LinkableResolverFactory()); Visit... | /**
* Tests the edit functionality of the NodeHandler
*
* @throws Exception
*/ | Tests the edit functionality of the NodeHandler | TestNodeHandlerIConfNodeIResolverFactory | {
"repo_name": "nordapp/rest",
"path": "org.i3xx.util.ctree2/src/test/java/org/i3xx/util/ctree/impl/TNodeHandler.java",
"license": "apache-2.0",
"size": 2994
} | [
"org.i3xx.util.ctree.ConfNode",
"org.i3xx.util.ctree.IConfNode",
"org.i3xx.util.ctree.impl.LinkableResolverFactory",
"org.i3xx.util.ctree.impl.NodeHandler",
"org.i3xx.util.ctree.impl.NodeParser",
"org.i3xx.util.ctree.impl.Protector",
"org.i3xx.util.ctree.impl.VisitorWalker",
"org.i3xx.util.ctree.linke... | import org.i3xx.util.ctree.ConfNode; import org.i3xx.util.ctree.IConfNode; import org.i3xx.util.ctree.impl.LinkableResolverFactory; import org.i3xx.util.ctree.impl.NodeHandler; import org.i3xx.util.ctree.impl.NodeParser; import org.i3xx.util.ctree.impl.Protector; import org.i3xx.util.ctree.impl.VisitorWalker; import or... | import org.i3xx.util.ctree.*; import org.i3xx.util.ctree.impl.*; import org.i3xx.util.ctree.linker.*; import org.junit.*; | [
"org.i3xx.util",
"org.junit"
] | org.i3xx.util; org.junit; | 325,571 |
private void createGroups(Composite parent){
Group composite = new Group(parent, SWT.NONE);
composite.setText(Resources.getMessage("HierarchyWizardPageOrder.17")); //$NON-NLS-1$
composite.setLayout(SWTUtil.createGridLayout(1, false));
composite.setLayoutData(SWTUtil.createFillGri... | void function(Composite parent){ Group composite = new Group(parent, SWT.NONE); composite.setText(Resources.getMessage(STR)); composite.setLayout(SWTUtil.createGridLayout(1, false)); composite.setLayoutData(SWTUtil.createFillGridData()); editor = new HierarchyWizardEditor<T>(composite, (HierarchyWizardModelGrouping<T>)... | /**
* Create the grouping-part of the page.
*
* @param parent
*/ | Create the grouping-part of the page | createGroups | {
"repo_name": "jgaupp/arx",
"path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/HierarchyWizardPageOrder.java",
"license": "apache-2.0",
"size": 14608
} | [
"org.deidentifier.arx.gui.resources.Resources",
"org.deidentifier.arx.gui.view.SWTUtil",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Group"
] | import org.deidentifier.arx.gui.resources.Resources; import org.deidentifier.arx.gui.view.SWTUtil; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; | import org.deidentifier.arx.gui.resources.*; import org.deidentifier.arx.gui.view.*; import org.eclipse.swt.widgets.*; | [
"org.deidentifier.arx",
"org.eclipse.swt"
] | org.deidentifier.arx; org.eclipse.swt; | 1,238,635 |
private void checkDbStateFlags(Collection<String> ids, boolean expectLocallyCreated, boolean expectLocallyUpdated, boolean expectLocallyDeleted) throws JSONException {
QuerySpec smartStoreQuery = QuerySpec.buildSmartQuerySpec("SELECT {accounts:_soup} FROM {accounts} WHERE {accounts:Id} IN " + makeInClause(i... | void function(Collection<String> ids, boolean expectLocallyCreated, boolean expectLocallyUpdated, boolean expectLocallyDeleted) throws JSONException { QuerySpec smartStoreQuery = QuerySpec.buildSmartQuerySpec(STR + makeInClause(ids), ids.size()); JSONArray accountsFromDb = smartStore.query(smartStoreQuery, 0); for (int... | /**
* Check records state in db
* @param ids
* @param expectLocallyCreated true if records are expected to be marked as locally created
* @param expectLocallyUpdated true if records are expected to be marked as locally updated
* @param expectLocallyDeleted true if records are expected to be mar... | Check records state in db | checkDbStateFlags | {
"repo_name": "huminzhi/SalesforceMobileSDK-Android",
"path": "libs/test/SmartSyncTest/src/com/salesforce/androidsdk/smartsync/manager/SyncManagerTest.java",
"license": "apache-2.0",
"size": 57743
} | [
"com.salesforce.androidsdk.smartstore.store.QuerySpec",
"com.salesforce.androidsdk.smartsync.util.Constants",
"java.util.Collection",
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject"
] | import com.salesforce.androidsdk.smartstore.store.QuerySpec; import com.salesforce.androidsdk.smartsync.util.Constants; import java.util.Collection; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; | import com.salesforce.androidsdk.smartstore.store.*; import com.salesforce.androidsdk.smartsync.util.*; import java.util.*; import org.json.*; | [
"com.salesforce.androidsdk",
"java.util",
"org.json"
] | com.salesforce.androidsdk; java.util; org.json; | 2,502,212 |
public Optional<Double> hitRate() {
Optional<Long> requestCount = getRequestCount();
return requestCount.map(aLong -> (aLong == 0) ? 1.0 : (double) getHitCount().get() / aLong);
} | Optional<Double> function() { Optional<Long> requestCount = getRequestCount(); return requestCount.map(aLong -> (aLong == 0) ? 1.0 : (double) getHitCount().get() / aLong); } | /**
* Returns the ratio of cache requests which were hits. This is defined as {@code getHitCount() /
* requestCount}, or {@code 1.0} when {@code requestCount == 0}. Note that {@code hitRate +
* missRate =~ 1.0}.
*/ | Returns the ratio of cache requests which were hits. This is defined as getHitCount() requestCount, or 1.0 when requestCount == 0. Note that hitRate + missRate =~ 1.0 | hitRate | {
"repo_name": "brettwooldridge/buck",
"path": "src/com/facebook/buck/util/cache/AbstractCacheStats.java",
"license": "apache-2.0",
"size": 7175
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,630,664 |
public void addIP(IP ipToBeAdded) throws SQLException;
| void function(IP ipToBeAdded) throws SQLException; | /**
* An IP insertion is performed on the database.
* @param ipToBeAdded is the filled IP, ready to be inserted
* @throws SQLException
*/ | An IP insertion is performed on the database | addIP | {
"repo_name": "sandrosalvato94/System-Design-Project",
"path": "src/polito/sdp2017/Components/DBManager.java",
"license": "lgpl-3.0",
"size": 3194
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 944,641 |
ODataResponse existsEntityLink(GetEntityLinkCountUriInfo uriInfo, String contentType) throws ODataException; | ODataResponse existsEntityLink(GetEntityLinkCountUriInfo uriInfo, String contentType) throws ODataException; | /**
* Returns whether the target entity of a navigation property exists.
* @param uriInfo information about the request URI
* @param contentType the content type of the response
* @return an {@link ODataResponse} object
* @throws ODataException
*/ | Returns whether the target entity of a navigation property exists | existsEntityLink | {
"repo_name": "apache/olingo-odata2",
"path": "odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/processor/part/EntityLinkProcessor.java",
"license": "apache-2.0",
"size": 3291
} | [
"org.apache.olingo.odata2.api.exception.ODataException",
"org.apache.olingo.odata2.api.processor.ODataResponse",
"org.apache.olingo.odata2.api.uri.info.GetEntityLinkCountUriInfo"
] | import org.apache.olingo.odata2.api.exception.ODataException; import org.apache.olingo.odata2.api.processor.ODataResponse; import org.apache.olingo.odata2.api.uri.info.GetEntityLinkCountUriInfo; | import org.apache.olingo.odata2.api.exception.*; import org.apache.olingo.odata2.api.processor.*; import org.apache.olingo.odata2.api.uri.info.*; | [
"org.apache.olingo"
] | org.apache.olingo; | 2,140,087 |
private void prepareLanguages() {
List<String> languageNamesList = new ArrayList<>();
List<String> languageCodesList = new ArrayList<>();
List<Language> languages = getLanguagesSupportedByDevice();
for(Language language: languages) {
// Go through all languages and add t... | void function() { List<String> languageNamesList = new ArrayList<>(); List<String> languageCodesList = new ArrayList<>(); List<Language> languages = getLanguagesSupportedByDevice(); for(Language language: languages) { if(!languageCodesList.contains(language.getLocale().getLanguage())) { languageNamesList.add(language.g... | /**
* Prepares language summary and language codes list and adds them to list preference as pairs.
* Uses previously saved language if there is any, if not uses phone local as initial language.
* Adds preference changed listener and saves value chosen by user to shared preferences
* to remember late... | Prepares language summary and language codes list and adds them to list preference as pairs. Uses previously saved language if there is any, if not uses phone local as initial language. Adds preference changed listener and saves value chosen by user to shared preferences to remember later | prepareLanguages | {
"repo_name": "dbrant/apps-android-commons",
"path": "app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java",
"license": "apache-2.0",
"size": 7706
} | [
"fr.free.nrw.commons.upload.Language",
"java.util.ArrayList",
"java.util.List",
"java.util.Locale"
] | import fr.free.nrw.commons.upload.Language; import java.util.ArrayList; import java.util.List; import java.util.Locale; | import fr.free.nrw.commons.upload.*; import java.util.*; | [
"fr.free.nrw",
"java.util"
] | fr.free.nrw; java.util; | 1,645,824 |
MutatorOperation mutate(Mutator m, String key, long by, long def, int exp,
OperationCallback cb); | MutatorOperation mutate(Mutator m, String key, long by, long def, int exp, OperationCallback cb); | /**
* Create a mutator operation.
*
* @param m the mutator type
* @param key the mutatee key
* @param by the amount to increment or decrement
* @param def the default value
* @param exp expiration in case we need to default (0 if no default)
* @param cb the status callback
* @return the new m... | Create a mutator operation | mutate | {
"repo_name": "normanmaurer/java-memcached-client",
"path": "src/main/java/net/spy/memcached/OperationFactory.java",
"license": "mit",
"size": 11093
} | [
"net.spy.memcached.ops.Mutator",
"net.spy.memcached.ops.MutatorOperation",
"net.spy.memcached.ops.OperationCallback"
] | import net.spy.memcached.ops.Mutator; import net.spy.memcached.ops.MutatorOperation; import net.spy.memcached.ops.OperationCallback; | import net.spy.memcached.ops.*; | [
"net.spy.memcached"
] | net.spy.memcached; | 607,897 |
public void scan(JavaBackend javaBackend, List<String> gluePaths) {
for (String gluePath : gluePaths) {
for (Class<?> glueCodeClass : classFinder.getDescendants(Object.class, packageName(gluePath))) {
while (glueCodeClass != null && glueCodeClass != Object.class && !Utils.isInsta... | void function(JavaBackend javaBackend, List<String> gluePaths) { for (String gluePath : gluePaths) { for (Class<?> glueCodeClass : classFinder.getDescendants(Object.class, packageName(gluePath))) { while (glueCodeClass != null && glueCodeClass != Object.class && !Utils.isInstantiable(glueCodeClass)) { glueCodeClass = g... | /**
* Registers step definitions and hooks.
*
* @param javaBackend the backend where stepdefs and hooks will be registered
* @param gluePaths where to look
*/ | Registers step definitions and hooks | scan | {
"repo_name": "roman-grytsay/cucumber-rocky",
"path": "src/test/java/framework/manager/cucumber/runtime/java/MethodScanner.java",
"license": "mit",
"size": 4289
} | [
"java.lang.reflect.Method",
"java.util.List"
] | import java.lang.reflect.Method; import java.util.List; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,647,368 |
CompletableFuture<Boolean> containsEntry(K key, V value); | CompletableFuture<Boolean> containsEntry(K key, V value); | /**
* Returns true if this map contains at least one key-value pair with key
* and value specified.
* @return a future whose value will be true if there is a key-value pair
* with the specified key and value,
* false otherwise.
*/ | Returns true if this map contains at least one key-value pair with key and value specified | containsEntry | {
"repo_name": "lsinfo3/onos",
"path": "core/api/src/main/java/org/onosproject/store/service/AsyncConsistentMultimap.java",
"license": "apache-2.0",
"size": 8818
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 614,195 |
// annonymous credentials, don't sign
if ( credentials instanceof AnonymousAWSCredentials ) {
return;
}
AWSCredentials sanitizedCredentials = sanitizeCredentials(credentials);
SigningAlgorithm algorithm = SigningAlgorithm.HmacSHA256;
String nonce = UUID.randomUUID()... | if ( credentials instanceof AnonymousAWSCredentials ) { return; } AWSCredentials sanitizedCredentials = sanitizeCredentials(credentials); SigningAlgorithm algorithm = SigningAlgorithm.HmacSHA256; String nonce = UUID.randomUUID().toString(); String date = dateUtils.formatRfc822Date(new Date()); boolean isHttps = false; ... | /**
* Signs the specified request with the AWS3 signing protocol by using the
* AWS account credentials specified when this object was constructed and
* adding the required AWS3 headers to the request.
*
* @param request
* The request to sign.
*/ | Signs the specified request with the AWS3 signing protocol by using the AWS account credentials specified when this object was constructed and adding the required AWS3 headers to the request | sign | {
"repo_name": "SaiNadh001/aws-sdk-for-java",
"path": "src/main/java/com/amazonaws/auth/AWS3Signer.java",
"license": "apache-2.0",
"size": 8380
} | [
"com.amazonaws.AmazonClientException",
"com.amazonaws.util.HttpUtils",
"java.io.UnsupportedEncodingException",
"java.util.Date",
"java.util.UUID"
] | import com.amazonaws.AmazonClientException; import com.amazonaws.util.HttpUtils; import java.io.UnsupportedEncodingException; import java.util.Date; import java.util.UUID; | import com.amazonaws.*; import com.amazonaws.util.*; import java.io.*; import java.util.*; | [
"com.amazonaws",
"com.amazonaws.util",
"java.io",
"java.util"
] | com.amazonaws; com.amazonaws.util; java.io; java.util; | 1,127,550 |
public static Expression languageExpression(final String language, final String expression) {
return new ExpressionAdapter() {
private Expression expr;
private Predicate pred; | static Expression function(final String language, final String expression) { return new ExpressionAdapter() { private Expression expr; private Predicate pred; | /**
* Returns an expression for evaluating the expression/predicate using the given language
*
* @param expression the expression or predicate
* @return an expression object which will evaluate the expression/predicate using the given language
*/ | Returns an expression for evaluating the expression/predicate using the given language | languageExpression | {
"repo_name": "christophd/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/builder/ExpressionBuilder.java",
"license": "apache-2.0",
"size": 65509
} | [
"org.apache.camel.Expression",
"org.apache.camel.Predicate",
"org.apache.camel.support.ExpressionAdapter"
] | import org.apache.camel.Expression; import org.apache.camel.Predicate; import org.apache.camel.support.ExpressionAdapter; | import org.apache.camel.*; import org.apache.camel.support.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,015,013 |
protected static Key AESUnwrapWithPad(Key unwrappingKey, String wrappedKeyAlgorithm,
byte [] input, int offset, int length) throws InvalidKeyException {
if (! unwrappingKey.getAlgorithm().equals("AES")) {
throw new IllegalArgumentException("AES wrap must unwrap with with an AES key.");
}
AESWrapWithPad ... | static Key function(Key unwrappingKey, String wrappedKeyAlgorithm, byte [] input, int offset, int length) throws InvalidKeyException { if (! unwrappingKey.getAlgorithm().equals("AES")) { throw new IllegalArgumentException(STR); } AESWrapWithPad engine = new AESWrapWithPad(); if ((offset != 0) (length != input.length)) ... | /**
* Unwrap using AES. Do not use standard Cipher interface, as we need to use an alternate algorithm
* (see AESWrapWithPadEngine) that is not currently included in any signed provider. Once it
* is, we will drop this special-case code.
* @param unwrappingKey key to use to decrypt
* @param wrappedKeyAlgorith... | Unwrap using AES. Do not use standard Cipher interface, as we need to use an alternate algorithm (see AESWrapWithPadEngine) that is not currently included in any signed provider. Once it is, we will drop this special-case code | AESUnwrapWithPad | {
"repo_name": "MobileCloudNetworking/icnaas",
"path": "mcn-ccn-router/ccnx-0.8.2/javasrc/src/main/org/ccnx/ccn/io/content/WrappedKey.java",
"license": "apache-2.0",
"size": 30016
} | [
"java.security.InvalidKeyException",
"java.security.Key",
"java.security.NoSuchAlgorithmException",
"org.ccnx.ccn.impl.security.crypto.jce.AESWrapWithPad"
] | import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchAlgorithmException; import org.ccnx.ccn.impl.security.crypto.jce.AESWrapWithPad; | import java.security.*; import org.ccnx.ccn.impl.security.crypto.jce.*; | [
"java.security",
"org.ccnx.ccn"
] | java.security; org.ccnx.ccn; | 2,691,896 |
protected Resource[] locateBundles(String[] bundles) {
if (bundles == null) {
bundles = new String[0];
}
Resource[] res = new Resource[bundles.length];
for (int i = 0; i < bundles.length; i++) {
res[i] = locateBundle(bundles[i]);
}
return res;
}
/**
* {@inheritDoc}
| Resource[] function(String[] bundles) { if (bundles == null) { bundles = new String[0]; } Resource[] res = new Resource[bundles.length]; for (int i = 0; i < bundles.length; i++) { res[i] = locateBundle(bundles[i]); } return res; } /** * {@inheritDoc} | /**
* Locates the given bundle identifiers. Will delegate to
* {@link #locateBundle(String)}.
*
* @param bundles bundle identifiers
* @return an array of Spring resources for the given bundle indentifiers
*/ | Locates the given bundle identifiers. Will delegate to <code>#locateBundle(String)</code> | locateBundles | {
"repo_name": "eclipse/gemini.blueprint",
"path": "test-support/src/main/java/org/eclipse/gemini/blueprint/test/AbstractDependencyManagerTests.java",
"license": "apache-2.0",
"size": 11254
} | [
"org.springframework.core.io.Resource"
] | import org.springframework.core.io.Resource; | import org.springframework.core.io.*; | [
"org.springframework.core"
] | org.springframework.core; | 1,446,302 |
public static void writeInt(OutputStream output, int value, byte[] buf, int off, int len) throws IOException {
writeUInt(output, value & 0xFFFFFFFFL, buf, off, len);
} | static void function(OutputStream output, int value, byte[] buf, int off, int len) throws IOException { writeUInt(output, value & 0xFFFFFFFFL, buf, off, len); } | /**
* Writes a 32-bit value in network order (i.e., MSB 1st)
*
* @param output The {@link OutputStream} to write the value
* @param value The 32-bit value
* @param buf A work buffer to use - must have enough space to contain 4 bytes
* @param off The offset to write the value
* ... | Writes a 32-bit value in network order (i.e., MSB 1st) | writeInt | {
"repo_name": "ieure/mina-sshd",
"path": "sshd-core/src/main/java/org/apache/sshd/common/util/buffer/BufferUtils.java",
"license": "apache-2.0",
"size": 14446
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,756,437 |
public List<String> getDefaultValues(); | List<String> function(); | /**
* Get a list of default values for the associated parameter.
*
* @return list of default values for the associated parameter
*/ | Get a list of default values for the associated parameter | getDefaultValues | {
"repo_name": "Jasig/portlet-utils",
"path": "portlet-form-resources/src/main/java/org/jasig/portlet/form/parameter/MultiValuedParameterInput.java",
"license": "apache-2.0",
"size": 1570
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,833,060 |
public static Builder receive(Endpoint messageEndpoint) {
Builder builder = new Builder();
builder.endpoint(messageEndpoint);
return builder;
} | static Builder function(Endpoint messageEndpoint) { Builder builder = new Builder(); builder.endpoint(messageEndpoint); return builder; } | /**
* Fluent API action building entry method used in Java DSL.
*
* @param messageEndpoint
* @return
*/ | Fluent API action building entry method used in Java DSL | receive | {
"repo_name": "christophd/citrus",
"path": "core/citrus-base/src/main/java/com/consol/citrus/actions/ReceiveMessageAction.java",
"license": "apache-2.0",
"size": 34875
} | [
"com.consol.citrus.endpoint.Endpoint"
] | import com.consol.citrus.endpoint.Endpoint; | import com.consol.citrus.endpoint.*; | [
"com.consol.citrus"
] | com.consol.citrus; | 2,596,913 |
int updateByExampleSelective(@Param("record") Acttlr record, @Param("example") ActtlrExample example); | int updateByExampleSelective(@Param(STR) Acttlr record, @Param(STR) ActtlrExample example); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ACTTLR
*
* @mbggenerated Sun Nov 21 21:36:06 CST 2010
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table ACTTLR | updateByExampleSelective | {
"repo_name": "rongshang/fbi-cbs2",
"path": "common/main/java/cbs/repository/code/dao/ActtlrMapper.java",
"license": "unlicense",
"size": 1974
} | [
"org.apache.ibatis.annotations.Param"
] | import org.apache.ibatis.annotations.Param; | import org.apache.ibatis.annotations.*; | [
"org.apache.ibatis"
] | org.apache.ibatis; | 1,960,748 |
public boolean nullPlusNonNullIsNull() throws SQLException {
return true;
} | boolean function() throws SQLException { return true; } | /**
* Are concatenations between NULL and non-NULL values NULL? A JDBC
* compliant driver always returns true.
*
* @return true if so
* @throws SQLException
*/ | Are concatenations between NULL and non-NULL values NULL? A JDBC compliant driver always returns true | nullPlusNonNullIsNull | {
"repo_name": "slockhart/sql-app",
"path": "mysql-connector-java-5.1.34/src/com/mysql/jdbc/DatabaseMetaData.java",
"license": "gpl-2.0",
"size": 338367
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,031,999 |
public List<CharSequence> parts() {
return parts;
} | List<CharSequence> function() { return parts; } | /**
* Gets a read-only list of the parts of this message. Each part is either a
* {@link String} or a {@link PlaceholderReference}.
*/ | Gets a read-only list of the parts of this message. Each part is either a <code>String</code> or a <code>PlaceholderReference</code> | parts | {
"repo_name": "erichocean/js-symbolic-executor",
"path": "closure-compiler/src/com/google/javascript/jscomp/JsMessage.java",
"license": "apache-2.0",
"size": 18887
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,916,625 |
public FeatureCursor queryFeaturesForChunk(BoundingBox boundingBox,
Projection projection, int limit) {
return queryFeaturesForChunk(boundingBox, projection, getPkColumnName(),
limit);
} | FeatureCursor function(BoundingBox boundingBox, Projection projection, int limit) { return queryFeaturesForChunk(boundingBox, projection, getPkColumnName(), limit); } | /**
* Query for features within the bounding box in the provided projection
* ordered by id, starting at the offset and returning no more than the
* limit
*
* @param boundingBox bounding box
* @param projection projection
* @param limit chunk limit
* @return feature cursor... | Query for features within the bounding box in the provided projection ordered by id, starting at the offset and returning no more than the limit | queryFeaturesForChunk | {
"repo_name": "ngageoint/geopackage-android",
"path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java",
"license": "mit",
"size": 276322
} | [
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.features.user.FeatureCursor",
"mil.nga.proj.Projection"
] | import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureCursor; import mil.nga.proj.Projection; | import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*; | [
"mil.nga.geopackage",
"mil.nga.proj"
] | mil.nga.geopackage; mil.nga.proj; | 347,276 |
private ArrayList<TypedConstant> getConstsSortedByCountUse() {
int regSz = ssaMeth.getRegCount();
final HashMap<TypedConstant, Integer> countUses
= new HashMap<TypedConstant, Integer>();
final HashSet<TypedConstant> usedByLocal
= new HashSet<TypedCo... | ArrayList<TypedConstant> function() { int regSz = ssaMeth.getRegCount(); final HashMap<TypedConstant, Integer> countUses = new HashMap<TypedConstant, Integer>(); final HashSet<TypedConstant> usedByLocal = new HashSet<TypedConstant>(); for (int i = 0; i < regSz; i++) { SsaInsn insn = ssaMeth.getDefinitionForRegister(i);... | /**
* Gets all of the collectable constant values used in this method,
* sorted by most used first. Skips non-collectable consts, such as
* non-string object constants
*
* @return {@code non-null;} list of constants in most-to-least used order
*/ | Gets all of the collectable constant values used in this method, sorted by most used first. Skips non-collectable consts, such as non-string object constants | getConstsSortedByCountUse | {
"repo_name": "nikita36078/J2ME-Loader",
"path": "dexlib/src/main/java/com/android/dx/ssa/ConstCollector.java",
"license": "apache-2.0",
"size": 14049
} | [
"com.android.dx.rop.code.RegOps",
"com.android.dx.rop.code.RegisterSpec",
"com.android.dx.rop.cst.CstString",
"com.android.dx.rop.cst.TypedConstant",
"com.android.dx.rop.type.TypeBearer",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map"
] | import com.android.dx.rop.code.RegOps; import com.android.dx.rop.code.RegisterSpec; import com.android.dx.rop.cst.CstString; import com.android.dx.rop.cst.TypedConstant; import com.android.dx.rop.type.TypeBearer; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Map; | import com.android.dx.rop.code.*; import com.android.dx.rop.cst.*; import com.android.dx.rop.type.*; import java.util.*; | [
"com.android.dx",
"java.util"
] | com.android.dx; java.util; | 1,002,980 |
void init() throws JSecurityException; | void init() throws JSecurityException; | /**
* Initializes this object.
*
* @throws JSecurityException if an exception occurs during initialization.
*/ | Initializes this object | init | {
"repo_name": "apache/jsecurity",
"path": "src/org/jsecurity/util/Initializable.java",
"license": "apache-2.0",
"size": 1325
} | [
"org.jsecurity.JSecurityException"
] | import org.jsecurity.JSecurityException; | import org.jsecurity.*; | [
"org.jsecurity"
] | org.jsecurity; | 289,016 |
private void parseApiKey(String key, String value) throws ConfigurationException {
if (value == null) {
logger.warn("Weather apikey setting '{}' has no value. Check the binding config.", key);
return;
}
String provider = PropertyResolver.last(key);
ProviderNa... | void function(String key, String value) throws ConfigurationException { if (value == null) { logger.warn(STR, key); return; } String provider = PropertyResolver.last(key); ProviderName providerName = getProviderName(provider); ProviderConfig pConfig = providerConfigs.get(providerName); if (pConfig == null) { pConfig = ... | /**
* Parses the properties for a provider config.
*/ | Parses the properties for a provider config | parseApiKey | {
"repo_name": "idserda/openhab",
"path": "bundles/binding/org.openhab.binding.weather/src/main/java/org/openhab/binding/weather/internal/common/WeatherConfig.java",
"license": "epl-1.0",
"size": 10405
} | [
"org.apache.commons.lang.StringUtils",
"org.openhab.binding.weather.internal.model.ProviderName",
"org.openhab.binding.weather.internal.utils.PropertyResolver",
"org.osgi.service.cm.ConfigurationException"
] | import org.apache.commons.lang.StringUtils; import org.openhab.binding.weather.internal.model.ProviderName; import org.openhab.binding.weather.internal.utils.PropertyResolver; import org.osgi.service.cm.ConfigurationException; | import org.apache.commons.lang.*; import org.openhab.binding.weather.internal.model.*; import org.openhab.binding.weather.internal.utils.*; import org.osgi.service.cm.*; | [
"org.apache.commons",
"org.openhab.binding",
"org.osgi.service"
] | org.apache.commons; org.openhab.binding; org.osgi.service; | 2,560,862 |
public void stopManager(DiskInterface disk, DiskDeviceContext ctx)
throws QuotaManagerException
{
if(logger.isDebugEnabled())
{
logger.debug("Stop Quota Manager");
}
// Clear out the live usage details
synchronized (m_liveUsageLock)
{
m_liveUsage.clear()... | void function(DiskInterface disk, DiskDeviceContext ctx) throws QuotaManagerException { if(logger.isDebugEnabled()) { logger.debug(STR); } synchronized (m_liveUsageLock) { m_liveUsage.clear(); m_shutdown = true; } m_thread.interrupt(); } | /**
* Stop the quota manager
*
* @param disk DiskInterface
* @param ctx DiskDeviceContext
* @exception QuotaManagerException
*/ | Stop the quota manager | stopManager | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/filesys/repo/ContentQuotaManager.java",
"license": "lgpl-3.0",
"size": 16824
} | [
"org.alfresco.jlan.server.filesys.DiskDeviceContext",
"org.alfresco.jlan.server.filesys.DiskInterface",
"org.alfresco.jlan.server.filesys.quota.QuotaManagerException"
] | import org.alfresco.jlan.server.filesys.DiskDeviceContext; import org.alfresco.jlan.server.filesys.DiskInterface; import org.alfresco.jlan.server.filesys.quota.QuotaManagerException; | import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.server.filesys.quota.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 2,021,012 |
public static DivElement makeModifiedIconDiv(Css css, NodeMutationDto changedNode) {
return makeModifiedIconDiv(css, changedNode.getMutationType());
} | static DivElement function(Css css, NodeMutationDto changedNode) { return makeModifiedIconDiv(css, changedNode.getMutationType()); } | /**
* Sets the appropriate icon based on the type of changed file.
*/ | Sets the appropriate icon based on the type of changed file | makeModifiedIconDiv | {
"repo_name": "WeTheInternet/collide",
"path": "client/src/main/java/com/google/collide/client/diff/DiffCommon.java",
"license": "apache-2.0",
"size": 3421
} | [
"com.google.collide.dto.NodeMutationDto"
] | import com.google.collide.dto.NodeMutationDto; | import com.google.collide.dto.*; | [
"com.google.collide"
] | com.google.collide; | 379,967 |
IGridNode getGridNode( ForgeDirection dir ); | IGridNode getGridNode( ForgeDirection dir ); | /**
* get the grid node for a particular side of a block, you can return null,
* by returning a valid node later and calling updateState, you can join the
* Grid when your block is ready.
*
* @param dir feel free to ignore this, most blocks will use the same node
* for every side.
*
* @return... | get the grid node for a particular side of a block, you can return null, by returning a valid node later and calling updateState, you can join the Grid when your block is ready | getGridNode | {
"repo_name": "Samernieve/EnderIO",
"path": "src/api/java/appeng/api/networking/IGridHost.java",
"license": "unlicense",
"size": 2318
} | [
"net.minecraftforge.common.util.ForgeDirection"
] | import net.minecraftforge.common.util.ForgeDirection; | import net.minecraftforge.common.util.*; | [
"net.minecraftforge.common"
] | net.minecraftforge.common; | 580,127 |
public void setObject(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException {
synchronized (checkClosed().getConnectionMutex()) {
super.setObject(parameterIndex, JDBC42Helper.convertJavaTimeToJavaSql(x), translateAndCheckSqlType(targetSqlType), scaleOrLength... | void function(int parameterIndex, Object x, SQLType targetSqlType, int scaleOrLength) throws SQLException { synchronized (checkClosed().getConnectionMutex()) { super.setObject(parameterIndex, JDBC42Helper.convertJavaTimeToJavaSql(x), translateAndCheckSqlType(targetSqlType), scaleOrLength); } } | /**
* Support for java.sql.JDBCType/java.sql.SQLType.
* Support for java.time.LocalDate, java.time.LocalTime, java.time.LocalDateTime, java.time.OffsetTime and java.time.OffsetDateTime.
*
* @param parameterIndex
* @param x
* @param targetSqlType
* @param scaleOrLength
* @throws ... | Support for java.sql.JDBCType/java.sql.SQLType. Support for java.time.LocalDate, java.time.LocalTime, java.time.LocalDateTime, java.time.OffsetTime and java.time.OffsetDateTime | setObject | {
"repo_name": "seanbright/mysql-connector-j",
"path": "src/com/mysql/jdbc/JDBC42PreparedStatement.java",
"license": "gpl-2.0",
"size": 5192
} | [
"java.sql.SQLException",
"java.sql.SQLType"
] | import java.sql.SQLException; import java.sql.SQLType; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,524,355 |
@Override
public ResourceLocator getResourceLocator() {
return CVLMetamodelEditPlugin.INSTANCE;
} | ResourceLocator function() { return CVLMetamodelEditPlugin.INSTANCE; } | /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Return the resource locator for this item provider's resources. | getResourceLocator | {
"repo_name": "diverse-project/kcvl",
"path": "fr.inria.diverse.kcvl.metamodel.edit/src/main/java/org/omg/CVLMetamodelMaster/cvl/provider/ReplacementBoundaryElementItemProvider.java",
"license": "epl-1.0",
"size": 3044
} | [
"org.eclipse.emf.common.util.ResourceLocator"
] | import org.eclipse.emf.common.util.ResourceLocator; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,533,795 |
public void selectLineAndDelete(int numberOfLine) {
Actions action = actionsFactory.createAction(seleniumWebDriver);
setCursorToLine(numberOfLine);
typeTextIntoEditor(HOME.toString());
action.keyDown(SHIFT).perform();
typeTextIntoEditor(END.toString());
action.keyUp(SHIFT).perform();
typeT... | void function(int numberOfLine) { Actions action = actionsFactory.createAction(seleniumWebDriver); setCursorToLine(numberOfLine); typeTextIntoEditor(HOME.toString()); action.keyDown(SHIFT).perform(); typeTextIntoEditor(END.toString()); action.keyUp(SHIFT).perform(); typeTextIntoEditor(DELETE.toString()); loader.waitOnC... | /**
* Deletes line with specified {@code numberOfLine}.
*
* @param numberOfLine number of line which should be deleted
*/ | Deletes line with specified numberOfLine | selectLineAndDelete | {
"repo_name": "davidfestal/che",
"path": "selenium/che-selenium-test/src/main/java/org/eclipse/che/selenium/pageobject/CodenvyEditor.java",
"license": "epl-1.0",
"size": 90896
} | [
"org.openqa.selenium.Keys",
"org.openqa.selenium.interactions.Actions"
] | import org.openqa.selenium.Keys; import org.openqa.selenium.interactions.Actions; | import org.openqa.selenium.*; import org.openqa.selenium.interactions.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 162,913 |
protected void onUpdated(@NonNull Node oldOne, @NonNull Node newOne) {} | protected void onUpdated(@NonNull Node oldOne, @NonNull Node newOne) {} | /**
* Node is being created.
*/ | Node is being created | onCreated | {
"repo_name": "v1v/jenkins",
"path": "core/src/main/java/jenkins/model/NodeListener.java",
"license": "mit",
"size": 2989
} | [
"edu.umd.cs.findbugs.annotations.NonNull",
"hudson.model.Node"
] | import edu.umd.cs.findbugs.annotations.NonNull; import hudson.model.Node; | import edu.umd.cs.findbugs.annotations.*; import hudson.model.*; | [
"edu.umd.cs",
"hudson.model"
] | edu.umd.cs; hudson.model; | 2,128,445 |
public final void dispatchChangeFinished(ViewHolder item, boolean oldItem) {
onChangeFinished(item, oldItem);
dispatchAnimationFinished(item);
} | final void function(ViewHolder item, boolean oldItem) { onChangeFinished(item, oldItem); dispatchAnimationFinished(item); } | /**
* Method to be called by subclasses when a change animation is done.
*
* @param item The item which has been changed (this method must be called for
* each non-null ViewHolder passed into
* {@link #animateChange(ViewHolder, ViewHolder, int, int, int, int)}).... | Method to be called by subclasses when a change animation is done | dispatchChangeFinished | {
"repo_name": "amirlotfi/Nikagram",
"path": "app/src/main/java/ir/nikagram/messenger/support/widget/SimpleItemAnimator.java",
"license": "gpl-2.0",
"size": 19653
} | [
"ir.nikagram.messenger.support.widget.RecyclerView"
] | import ir.nikagram.messenger.support.widget.RecyclerView; | import ir.nikagram.messenger.support.widget.*; | [
"ir.nikagram.messenger"
] | ir.nikagram.messenger; | 1,467,544 |
private OutputFile genNativeSkeletons(XmlvmResource resource) {
Document doc = resource.getXmlvmDocument();
// The filename will be the name of the first class
String namespaceName = resource.getPackageName();
String className = resource.getName().replace('$', '_');
Stri... | OutputFile function(XmlvmResource resource) { Document doc = resource.getXmlvmDocument(); String namespaceName = resource.getPackageName(); String className = resource.getName().replace('$', '_'); String fileNameStem = (namespaceName + "." + className).replace('.', '_'); String headerFileName = fileNameStem + headerExt... | /**
* Generates C-source code skeletons for all native methods of a class. This
* method will be triggered by the --gen-native-skeletons option. vtable
* indices are correctly initialized for non-static native methods.
*
* @param resource
* Class for which skeletons are t... | Generates C-source code skeletons for all native methods of a class. This method will be triggered by the --gen-native-skeletons option. vtable indices are correctly initialized for non-static native methods | genNativeSkeletons | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/src/xmlvm/org/xmlvm/proc/out/COutputProcess.java",
"license": "gpl-2.0",
"size": 9814
} | [
"org.jdom.Document",
"org.xmlvm.proc.XmlvmResource",
"org.xmlvm.proc.XsltRunner"
] | import org.jdom.Document; import org.xmlvm.proc.XmlvmResource; import org.xmlvm.proc.XsltRunner; | import org.jdom.*; import org.xmlvm.proc.*; | [
"org.jdom",
"org.xmlvm.proc"
] | org.jdom; org.xmlvm.proc; | 1,777,218 |
@Override
public List<UserInfo> queryAllUserInfo(UUID roleId) {
Set<String> allRoleUser = queryAllUserByRole(roleId);
DataAccessSession das = DataAccessFactory.getInstance().getSysDas();
return das.queryAllUserInfo(allRoleUser.toArray(new String[0]),false);
}
| List<UserInfo> function(UUID roleId) { Set<String> allRoleUser = queryAllUserByRole(roleId); DataAccessSession das = DataAccessFactory.getInstance().getSysDas(); return das.queryAllUserInfo(allRoleUser.toArray(new String[0]),false); } | /**
* (non-Javadoc)
* <p> Title:queryAllUserInfo</p>
* <p> Description:TODO</p>
* @param roleId
* @return
* @see com.sogou.qadev.service.cynthia.bean.Flow#queryAllUserInfo(com.sogou.qadev.service.cynthia.bean.UUID)
*/ | (non-Javadoc) Title:queryAllUserInfo Description:TODO | queryAllUserInfo | {
"repo_name": "yioye/Cynthia",
"path": "src/main/java/com/sogou/qadev/service/cynthia/bean/impl/FlowImpl.java",
"license": "gpl-2.0",
"size": 46682
} | [
"com.sogou.qadev.service.cynthia.bean.UserInfo",
"com.sogou.qadev.service.cynthia.factory.DataAccessFactory",
"com.sogou.qadev.service.cynthia.service.DataAccessSession",
"java.util.List",
"java.util.Set"
] | import com.sogou.qadev.service.cynthia.bean.UserInfo; import com.sogou.qadev.service.cynthia.factory.DataAccessFactory; import com.sogou.qadev.service.cynthia.service.DataAccessSession; import java.util.List; import java.util.Set; | import com.sogou.qadev.service.cynthia.bean.*; import com.sogou.qadev.service.cynthia.factory.*; import com.sogou.qadev.service.cynthia.service.*; import java.util.*; | [
"com.sogou.qadev",
"java.util"
] | com.sogou.qadev; java.util; | 142,539 |
public List<String> getKuduKeyColumnNames() { return kuduKeyColumnNames_; } | public List<String> getKuduKeyColumnNames() { return kuduKeyColumnNames_; } | /**
* The number of nodes is not know ahead of time and will be updated during computeStats
* in the scan node.
*/ | The number of nodes is not know ahead of time and will be updated during computeStats in the scan node | getNumNodes | {
"repo_name": "kapilrastogi/Impala",
"path": "fe/src/main/java/com/cloudera/impala/catalog/KuduTable.java",
"license": "apache-2.0",
"size": 11231
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,096,599 |
private double entropyFeature( int id ){ //0 forma, 1 color....
double entropy = 0.0;
double total0 = 0.0;
double good0 = 0.0;
double total1 = 0.0;
double good1 = 0.0;
for ( Entry<Integer, Double> food1: food.entrySet() ) {
char[] code = (food1.getKey()+"").toCharArray();
double percent = food1.... | double function( int id ){ double entropy = 0.0; double total0 = 0.0; double good0 = 0.0; double total1 = 0.0; double good1 = 0.0; for ( Entry<Integer, Double> food1: food.entrySet() ) { char[] code = (food1.getKey()+"").toCharArray(); double percent = food1.getValue(); if(code[id] == '1'){ total1++; good1 += percent; ... | /**
* retorna la entropia de una caracteristica
* @param id id de cada caracteristica de la comida
* @return entropia de cada caracteristica
*/ | retorna la entropia de una caracteristica | entropyFeature | {
"repo_name": "UNiversalPRO/AgentProgram",
"path": "src/unalcol/agents/examples/labyrinth/multeseo/universalEater/EaterUniversalAgent.java",
"license": "gpl-2.0",
"size": 20632
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,756,886 |
@Override
public String requestDepositAddress(Currency currency, String... arguments) throws IOException {
if (currency.equals(Currency.BTC))
return getQuadrigaCxBitcoinDepositAddress().getDepositAddress();
else if (currency.equals(Currency.ETH))
return getQuadrigaCxEtherDepositAddress().getDepo... | String function(Currency currency, String... arguments) throws IOException { if (currency.equals(Currency.BTC)) return getQuadrigaCxBitcoinDepositAddress().getDepositAddress(); else if (currency.equals(Currency.ETH)) return getQuadrigaCxEtherDepositAddress().getDepositAddress(); else if (currency.equals(Currency.BCH)) ... | /**
* This returns the currently set deposit address. It will not generate a new address (ie.
* repeated calls will return the same address).
*/ | This returns the currently set deposit address. It will not generate a new address (ie. repeated calls will return the same address) | requestDepositAddress | {
"repo_name": "LeonidShamis/XChange",
"path": "xchange-quadrigacx/src/main/java/org/knowm/xchange/quadrigacx/service/QuadrigaCxAccountService.java",
"license": "mit",
"size": 3331
} | [
"java.io.IOException",
"org.knowm.xchange.currency.Currency"
] | import java.io.IOException; import org.knowm.xchange.currency.Currency; | import java.io.*; import org.knowm.xchange.currency.*; | [
"java.io",
"org.knowm.xchange"
] | java.io; org.knowm.xchange; | 2,391,617 |
public static void encodeRecursive(FacesContext context, UIComponent component)
throws IOException
{
if (!component.isRendered())
{
return;
}
component.encodeBegin(context);
if (component.getRendersChildren())
{
component.enco... | static void function(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } component.encodeBegin(context); if (component.getRendersChildren()) { component.encodeChildren(context); } else { Iterator iter = component.getChildren().iterator(); while (iter.hasNext()) { U... | /**
* Helper method for recursively encoding a component.
*
* @param context
* the given FacesContext
* @param component
* the UIComponent to render
* @throws IOException
*/ | Helper method for recursively encoding a component | encodeRecursive | {
"repo_name": "ouit0408/sakai",
"path": "jsf/jsf-widgets/src/java/org/sakaiproject/jsf/util/RendererUtil.java",
"license": "apache-2.0",
"size": 17889
} | [
"java.io.IOException",
"java.util.Iterator",
"javax.faces.component.UIComponent",
"javax.faces.context.FacesContext"
] | import java.io.IOException; import java.util.Iterator; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; | import java.io.*; import java.util.*; import javax.faces.component.*; import javax.faces.context.*; | [
"java.io",
"java.util",
"javax.faces"
] | java.io; java.util; javax.faces; | 1,647,226 |
private void setContentView(View view) {
mContentView = view;
} | void function(View view) { mContentView = view; } | /**
* Set up contentView which will be moved by user gesture
*
* @param view
*/ | Set up contentView which will be moved by user gesture | setContentView | {
"repo_name": "cowthan/Ayo2022",
"path": "ProjFringe/ayo-ui-view/src/main/java/org/ayo/layout/swipeback/SwipeBackLayout.java",
"license": "mit",
"size": 20790
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,457,921 |
public ITargetSelector getSelector() {
return this.selector;
} | ITargetSelector function() { return this.selector; } | /**
* Get the selector which selected this target
*/ | Get the selector which selected this target | getSelector | {
"repo_name": "SpongePowered/Mixin",
"path": "src/main/java/org/spongepowered/asm/mixin/injection/code/InjectorTarget.java",
"license": "mit",
"size": 5477
} | [
"org.spongepowered.asm.mixin.injection.selectors.ITargetSelector"
] | import org.spongepowered.asm.mixin.injection.selectors.ITargetSelector; | import org.spongepowered.asm.mixin.injection.selectors.*; | [
"org.spongepowered.asm"
] | org.spongepowered.asm; | 1,355,128 |
public static boolean isPlatform(String platform) {
String osName = System.getProperty("os.name").toLowerCase(Locale.US);
return osName.indexOf(platform.toLowerCase(Locale.US)) > -1;
} | static boolean function(String platform) { String osName = System.getProperty(STR).toLowerCase(Locale.US); return osName.indexOf(platform.toLowerCase(Locale.US)) > -1; } | /**
* Is this OS the given platform.
* <p/>
* Uses <tt>os.name</tt> from the system properties to determine the OS.
*
* @param platform such as Windows
* @return <tt>true</tt> if its that platform.
*/ | Is this OS the given platform. Uses os.name from the system properties to determine the OS | isPlatform | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "components/camel-testng/src/main/java/org/apache/camel/testng/TestSupport.java",
"license": "apache-2.0",
"size": 18466
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 830,469 |
public List<Element> getAllChildrenOfPackage(Element container){
List<Element> ownedElements = new LinkedList<Element>();
ownedElements.addAll(container.getOwnedElements());
List<Element> allElements = recursive(ownedElements);
return allElements;
}
| List<Element> function(Element container){ List<Element> ownedElements = new LinkedList<Element>(); ownedElements.addAll(container.getOwnedElements()); List<Element> allElements = recursive(ownedElements); return allElements; } | /**
* Gets the children elements of the container from model recursively.
* The the recursion won't be go through {@link Package}s.
* @param container - The root element of the recursion
* @return List of children with infinite deep
*/ | Gets the children elements of the container from model recursively. The the recursion won't be go through <code>Package</code>s | getAllChildrenOfPackage | {
"repo_name": "ELTE-Soft/txtUML",
"path": "dev/plugins/hu.elte.txtuml.export.papyrus/src/hu/elte/txtuml/export/papyrus/UMLModelManager.java",
"license": "epl-1.0",
"size": 4597
} | [
"java.util.LinkedList",
"java.util.List",
"org.eclipse.uml2.uml.Element"
] | import java.util.LinkedList; import java.util.List; import org.eclipse.uml2.uml.Element; | import java.util.*; import org.eclipse.uml2.uml.*; | [
"java.util",
"org.eclipse.uml2"
] | java.util; org.eclipse.uml2; | 2,164,770 |
@Override
public void cancelDelegationToken(Token<DelegationTokenIdentifier> token
) throws IOException,
InterruptedException {
String user = UserGroupInformation.getCurrentUser().getUserName();
secretManager.cancelToken(... | void function(Token<DelegationTokenIdentifier> token ) throws IOException, InterruptedException { String user = UserGroupInformation.getCurrentUser().getUserName(); secretManager.cancelToken(token, user); } | /**
* Discard a current delegation token.
*/ | Discard a current delegation token | cancelDelegationToken | {
"repo_name": "williamsentosa/hadoop-modified",
"path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java",
"license": "apache-2.0",
"size": 192030
} | [
"java.io.IOException",
"org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier",
"org.apache.hadoop.security.UserGroupInformation",
"org.apache.hadoop.security.token.Token"
] | import java.io.IOException; import org.apache.hadoop.mapreduce.security.token.delegation.DelegationTokenIdentifier; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.token.Token; | import java.io.*; import org.apache.hadoop.mapreduce.security.token.delegation.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security.token.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 10,020 |
private Map validateOpenAPIDefinition(String url, InputStream fileInputStream, Attachment fileDetail,
String apiDefinition, Boolean returnContent, Boolean isServiceAPI) throws APIManagementException {
//validate inputs
handleInvalidParams(fileInputStream, fi... | Map function(String url, InputStream fileInputStream, Attachment fileDetail, String apiDefinition, Boolean returnContent, Boolean isServiceAPI) throws APIManagementException { handleInvalidParams(fileInputStream, fileDetail, url, apiDefinition, isServiceAPI); OpenAPIDefinitionValidationResponseDTO responseDTO; APIDefin... | /**
* Validate the provided OpenAPI definition (via file or url) and return a Map with the validation response
* information.
*
* @param url OpenAPI definition url
* @param fileInputStream file as input stream
* @param apiDefinition Swagger API definition String
* @param returnContent... | Validate the provided OpenAPI definition (via file or url) and return a Map with the validation response information | validateOpenAPIDefinition | {
"repo_name": "uvindra/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/v1/impl/ApisApiServiceImpl.java",
"license": "apache-2.0",
"size": 274405
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.HashMap",
"java.util.Map",
"org.apache.commons.io.IOUtils",
"org.apache.cxf.jaxrs.ext.multipart.Attachment",
"org.wso2.carbon.apimgt.api.APIDefinitionValidationResponse",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.ap... | import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Map; import org.apache.commons.io.IOUtils; import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.wso2.carbon.apimgt.api.APIDefinitionValidationResponse; import org.wso2.carbon.apimgt.api.APIManagementException;... | import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.apache.cxf.jaxrs.ext.multipart.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.definitions.*; import org.wso2.carbon.apimgt.rest.api.common.*; import org.wso2.carbon.apimgt.rest.api.publisher.v1.common.mappings.*... | [
"java.io",
"java.util",
"org.apache.commons",
"org.apache.cxf",
"org.wso2.carbon"
] | java.io; java.util; org.apache.commons; org.apache.cxf; org.wso2.carbon; | 198,111 |
@Adjacency(label = EjbDeploymentDescriptorModel.EJB_ENTITY_BEAN, direction = Direction.IN)
public EjbDeploymentDescriptorModel getEjbDeploymentDescriptor(); | @Adjacency(label = EjbDeploymentDescriptorModel.EJB_ENTITY_BEAN, direction = Direction.IN) EjbDeploymentDescriptorModel function(); | /**
* References the Deployment Descriptor containing EJB.
*/ | References the Deployment Descriptor containing EJB | getEjbDeploymentDescriptor | {
"repo_name": "sgilda/windup",
"path": "rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/model/EjbEntityBeanModel.java",
"license": "epl-1.0",
"size": 3179
} | [
"com.tinkerpop.blueprints.Direction",
"com.tinkerpop.frames.Adjacency"
] | import com.tinkerpop.blueprints.Direction; import com.tinkerpop.frames.Adjacency; | import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.*; | [
"com.tinkerpop.blueprints",
"com.tinkerpop.frames"
] | com.tinkerpop.blueprints; com.tinkerpop.frames; | 1,331,581 |
Map.Entry<K, V> getAnchor(); | Map.Entry<K, V> getAnchor(); | /**
* Retrieve the anchor object which is the last value object on the previous page.
* <p>
* Note: This method will return `null` on the first page of the query result or if the predicate was not applied
* for the previous page number.
*
* @return Map.Entry the anchor object which is the ... | Retrieve the anchor object which is the last value object on the previous page. Note: This method will return `null` on the first page of the query result or if the predicate was not applied for the previous page number | getAnchor | {
"repo_name": "emre-aydin/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/query/PagingPredicate.java",
"license": "apache-2.0",
"size": 3821
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,401,565 |
public Rect getFramingRectInPreview() {
if (framingRectInPreview == null) {
Rect rect = new Rect(getFramingRect());
Point cameraResolution = configManager.getCameraResolution();
Point screenResolution = configManager.getScreenResolution();
rect.left = rect.left * cameraResolution.x / scree... | Rect function() { if (framingRectInPreview == null) { Rect rect = new Rect(getFramingRect()); Point cameraResolution = configManager.getCameraResolution(); Point screenResolution = configManager.getScreenResolution(); rect.left = rect.left * cameraResolution.x / screenResolution.x; rect.right = rect.right * cameraResol... | /**
* Like {@link #getFramingRect} but coordinates are in terms of the preview frame,
* not UI / screen.
*/ | Like <code>#getFramingRect</code> but coordinates are in terms of the preview frame, not UI / screen | getFramingRectInPreview | {
"repo_name": "mwaylabs/titanium-barcode",
"path": "src/com/mwaysolutions/barcode/camera/CameraManager.java",
"license": "apache-2.0",
"size": 10790
} | [
"android.graphics.Point",
"android.graphics.Rect"
] | import android.graphics.Point; import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 356,563 |
@Override
@SuppressWarnings("unused")
protected void initForm(final FormItemContainer formLayout, final Controller listener, final UserRequest ureq) {
this.setFormTitle("feed.edit.item");
this.setFormContextHelp(this.getClass().getPackage().getName(), "episode_form_help.html", "chelp.hover.e... | @SuppressWarnings(STR) void function(final FormItemContainer formLayout, final Controller listener, final UserRequest ureq) { this.setFormTitle(STR); this.setFormContextHelp(this.getClass().getPackage().getName(), STR, STR); title = uifactory.addTextElement("title", STR, 256, episode.getTitle(), this.flc); title.setMan... | /**
* org.olat.presentation.framework.control.Controller, org.olat.presentation.framework.UserRequest)
*/ | org.olat.presentation.framework.control.Controller, org.olat.presentation.framework.UserRequest) | initForm | {
"repo_name": "huihoo/olat",
"path": "OLAT-LMS/src/main/java/org/olat/presentation/webfeed/podcast/EpisodeFormController.java",
"license": "apache-2.0",
"size": 8733
} | [
"java.io.File",
"org.olat.lms.webfeed.FeedManager",
"org.olat.presentation.framework.core.UserRequest",
"org.olat.presentation.framework.core.components.form.flexible.FormItemContainer",
"org.olat.presentation.framework.core.components.form.flexible.impl.FormEvent",
"org.olat.presentation.framework.core.c... | import java.io.File; import org.olat.lms.webfeed.FeedManager; import org.olat.presentation.framework.core.UserRequest; import org.olat.presentation.framework.core.components.form.flexible.FormItemContainer; import org.olat.presentation.framework.core.components.form.flexible.impl.FormEvent; import org.olat.presentation... | import java.io.*; import org.olat.lms.webfeed.*; import org.olat.presentation.framework.core.*; import org.olat.presentation.framework.core.components.form.flexible.*; import org.olat.presentation.framework.core.components.form.flexible.impl.*; import org.olat.presentation.framework.core.components.form.flexible.impl.e... | [
"java.io",
"org.olat.lms",
"org.olat.presentation"
] | java.io; org.olat.lms; org.olat.presentation; | 2,622,876 |
void enterFieldAccess_lf_primary(@NotNull Java8Parser.FieldAccess_lf_primaryContext ctx); | void enterFieldAccess_lf_primary(@NotNull Java8Parser.FieldAccess_lf_primaryContext ctx); | /**
* Enter a parse tree produced by {@link Java8Parser#fieldAccess_lf_primary}.
*
* @param ctx the parse tree
*/ | Enter a parse tree produced by <code>Java8Parser#fieldAccess_lf_primary</code> | enterFieldAccess_lf_primary | {
"repo_name": "BigDaddy-Germany/WHOAMI",
"path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java",
"license": "mit",
"size": 97945
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 100,516 |
public void testNonSerializableResult(HttpServletRequest request, PrintWriter out) throws Exception {
NonSerializableTaskAndResult.resultOverride = null; // just in case any other test forgets to clean it up
TaskStatus<?> status = scheduler.schedule(new NonSerializableTaskAndResult(), 15, TimeUnit.... | void function(HttpServletRequest request, PrintWriter out) throws Exception { NonSerializableTaskAndResult.resultOverride = null; TaskStatus<?> status = scheduler.schedule(new NonSerializableTaskAndResult(), 15, TimeUnit.NANOSECONDS); for (long start = System.nanoTime(); !status.hasResult() && System.nanoTime() - start... | /**
* Schedule a task that returns a non-serializable result. Expect the TaskStatus to be returned successfully,
* but an error must occur when attempting to access the result.
*/ | Schedule a task that returns a non-serializable result. Expect the TaskStatus to be returned successfully, but an error must occur when attempting to access the result | testNonSerializableResult | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat_errorpaths/test-applications/persistenterrtest/src/web/PersistentErrorTestServlet.java",
"license": "epl-1.0",
"size": 67702
} | [
"com.ibm.websphere.concurrent.persistent.ResultNotSerializableException",
"com.ibm.websphere.concurrent.persistent.TaskStatus",
"java.io.NotSerializableException",
"java.io.PrintWriter",
"java.util.concurrent.TimeUnit",
"javax.servlet.http.HttpServletRequest"
] | import com.ibm.websphere.concurrent.persistent.ResultNotSerializableException; import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.NotSerializableException; import java.io.PrintWriter; import java.util.concurrent.TimeUnit; import javax.servlet.http.HttpServletRequest; | import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import java.util.concurrent.*; import javax.servlet.http.*; | [
"com.ibm.websphere",
"java.io",
"java.util",
"javax.servlet"
] | com.ibm.websphere; java.io; java.util; javax.servlet; | 2,838,150 |
public void testAddAll1() {
try {
ConcurrentLinkedDeque q = new ConcurrentLinkedDeque();
q.addAll(null);
shouldThrow();
} catch (NullPointerException success) {}
} | void function() { try { ConcurrentLinkedDeque q = new ConcurrentLinkedDeque(); q.addAll(null); shouldThrow(); } catch (NullPointerException success) {} } | /**
* addAll(null) throws NPE
*/ | addAll(null) throws NPE | testAddAll1 | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/ConcurrentLinkedDequeTest.java",
"license": "gpl-2.0",
"size": 26434
} | [
"java.util.concurrent.ConcurrentLinkedDeque"
] | import java.util.concurrent.ConcurrentLinkedDeque; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,196,733 |
public void setAnsComplianceClaimsService(
AnsComplianceClaimsService ansComplianceClaimsService) {
this.ansComplianceClaimsService = ansComplianceClaimsService;
} | void function( AnsComplianceClaimsService ansComplianceClaimsService) { this.ansComplianceClaimsService = ansComplianceClaimsService; } | /**
* SETTER for 'ANS compliance for finished instances grouped by operations'
* service layer, inyected by Spring Context.
*
* @param operationsByProcessService
* the hierarchy services.
*/ | SETTER for 'ANS compliance for finished instances grouped by operations' service layer, inyected by Spring Context | setAnsComplianceClaimsService | {
"repo_name": "joseluisillana/api-restful-spring-jersey",
"path": "erep-services/src/main/java/com/bbva/operationalreportingapi/rest/resources/ClaimsAnsComplianceResource.java",
"license": "gpl-2.0",
"size": 4967
} | [
"com.bbva.operationalreportingapi.rest.services.AnsComplianceClaimsService"
] | import com.bbva.operationalreportingapi.rest.services.AnsComplianceClaimsService; | import com.bbva.operationalreportingapi.rest.services.*; | [
"com.bbva.operationalreportingapi"
] | com.bbva.operationalreportingapi; | 900,257 |
public static void dump(File outputDirectory, String prefix) throws IOException
{
BufferedWriter br = new BufferedWriter(new FileWriter(new File(outputDirectory, prefix + "DebugMap.txt")));
if (disableUUIDMap_)
{
ConsoleUtil.println("UUID Debug map was disabled");
br.write("Note - the UUID debug feature... | static void function(File outputDirectory, String prefix) throws IOException { BufferedWriter br = new BufferedWriter(new FileWriter(new File(outputDirectory, prefix + STR))); if (disableUUIDMap_) { ConsoleUtil.println(STR); br.write(STR + System.getProperty(STR)); } for (Map.Entry<UUID, String> entry : masterUUIDMap_.... | /**
* Write out a debug file with all of the UUID - String mappings
*/ | Write out a debug file with all of the UUID - String mappings | dump | {
"repo_name": "Apelon-VA/term-convert-common-base",
"path": "src/main/java/gov/va/oia/terminology/converters/sharedUtils/stats/ConverterUUID.java",
"license": "apache-2.0",
"size": 6519
} | [
"gov.va.oia.terminology.converters.sharedUtils.ConsoleUtil",
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileWriter",
"java.io.IOException",
"java.util.Map"
] | import gov.va.oia.terminology.converters.sharedUtils.ConsoleUtil; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Map; | import gov.va.oia.terminology.converters.*; import java.io.*; import java.util.*; | [
"gov.va.oia",
"java.io",
"java.util"
] | gov.va.oia; java.io; java.util; | 943,090 |
private void startOfMarkup() throws IOException {
fMarkupDepth++;
final int ch = fEntityScanner.peekChar();
if (isValidNameStartChar(ch) || isValidNameStartHighSurrogate(ch)) {
setScannerState(SCANNER_STATE_START_ELEMENT_TAG);
} else {
... | void function() throws IOException { fMarkupDepth++; final int ch = fEntityScanner.peekChar(); if (isValidNameStartChar(ch) isValidNameStartHighSurrogate(ch)) { setScannerState(SCANNER_STATE_START_ELEMENT_TAG); } else { switch(ch){ case '?' :{ setScannerState(SCANNER_STATE_PI); fEntityScanner.skipChar(ch, null); break;... | /**
* decides the appropriate state of the parser
*/ | decides the appropriate state of the parser | startOfMarkup | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java",
"license": "gpl-2.0",
"size": 130138
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 575,664 |
// ------------------------------------------------------------------------
@EventHandler(ignoreCancelled = true)
protected void onEntityDamageByEntity(EntityDamageByEntityEvent event) {
if (event.getDamager() instanceof Firework &&
event.getDamager().getMetadata(META_KEY).size() != 0) ... | @EventHandler(ignoreCancelled = true) void function(EntityDamageByEntityEvent event) { if (event.getDamager() instanceof Firework && event.getDamager().getMetadata(META_KEY).size() != 0) { event.setCancelled(true); } } | /**
* Cancel damage to entities by firework entities that have been tagged with
* this plugin's metadata value.
*/ | Cancel damage to entities by firework entities that have been tagged with this plugin's metadata value | onEntityDamageByEntity | {
"repo_name": "totemo/LovedUp",
"path": "src/io/totemo/lovedup/LovedUp.java",
"license": "mit",
"size": 29952
} | [
"org.bukkit.entity.Firework",
"org.bukkit.event.EventHandler",
"org.bukkit.event.entity.EntityDamageByEntityEvent"
] | import org.bukkit.entity.Firework; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.EntityDamageByEntityEvent; | import org.bukkit.entity.*; import org.bukkit.event.*; import org.bukkit.event.entity.*; | [
"org.bukkit.entity",
"org.bukkit.event"
] | org.bukkit.entity; org.bukkit.event; | 2,413,653 |
public static void writePrimitiveLong(long value, DataOutput out) throws IOException {
InternalDataSerializer.checkOut(out);
if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
logger.trace(LogMarker.SERIALIZER, "Writing Long {}", value);
}
out.writeLong(value);
} | static void function(long value, DataOutput out) throws IOException { InternalDataSerializer.checkOut(out); if (logger.isTraceEnabled(LogMarker.SERIALIZER)) { logger.trace(LogMarker.SERIALIZER, STR, value); } out.writeLong(value); } | /**
* Writes a primitive <code>long</code> to a <code>DataOutput</code>.
*
* @throws IOException A problem occurs while writing to <code>out</code>
*
* @see DataOutput#writeLong
* @since GemFire 5.1
*/ | Writes a primitive <code>long</code> to a <code>DataOutput</code> | writePrimitiveLong | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/DataSerializer.java",
"license": "apache-2.0",
"size": 106864
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.geode.internal.InternalDataSerializer",
"org.apache.geode.internal.logging.log4j.LogMarker"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.geode.internal.InternalDataSerializer; import org.apache.geode.internal.logging.log4j.LogMarker; | import java.io.*; import org.apache.geode.internal.*; import org.apache.geode.internal.logging.log4j.*; | [
"java.io",
"org.apache.geode"
] | java.io; org.apache.geode; | 77,021 |
public List<PrescriptionBean> getPrescriptionsForPatient(long patientID) throws iTrustException {
PatientBean patient = patientDAO.getPatient(patientID);
if (loggedInMID == patientID) {
transDAO.logTransaction(TransactionType.VIEW_PRESCRIPTION_REPORT, loggedInMID);
return patientDAO.getPrescriptions(pa... | List<PrescriptionBean> function(long patientID) throws iTrustException { PatientBean patient = patientDAO.getPatient(patientID); if (loggedInMID == patientID) { transDAO.logTransaction(TransactionType.VIEW_PRESCRIPTION_REPORT, loggedInMID); return patientDAO.getPrescriptions(patientID); } List<String> toList = new Arra... | /**
* Returns all the prescriptions for a given patient
*
* @param patientID patient in question
* @return list of all the prescriptions for that patient
* @throws iTrustException
*/ | Returns all the prescriptions for a given patient | getPrescriptionsForPatient | {
"repo_name": "qynnine/JDiffOriginDemo",
"path": "examples/iTrust_v10/edu/ncsu/csc/itrust/action/ViewPrescriptionRecordsAction.java",
"license": "lgpl-2.1",
"size": 4486
} | [
"edu.ncsu.csc.itrust.Messages",
"edu.ncsu.csc.itrust.beans.Email",
"edu.ncsu.csc.itrust.beans.PatientBean",
"edu.ncsu.csc.itrust.beans.PersonnelBean",
"edu.ncsu.csc.itrust.beans.PrescriptionBean",
"edu.ncsu.csc.itrust.enums.TransactionType",
"java.util.ArrayList",
"java.util.List"
] | import edu.ncsu.csc.itrust.Messages; import edu.ncsu.csc.itrust.beans.Email; import edu.ncsu.csc.itrust.beans.PatientBean; import edu.ncsu.csc.itrust.beans.PersonnelBean; import edu.ncsu.csc.itrust.beans.PrescriptionBean; import edu.ncsu.csc.itrust.enums.TransactionType; import java.util.ArrayList; import java.util.Lis... | import edu.ncsu.csc.itrust.*; import edu.ncsu.csc.itrust.beans.*; import edu.ncsu.csc.itrust.enums.*; import java.util.*; | [
"edu.ncsu.csc",
"java.util"
] | edu.ncsu.csc; java.util; | 1,388,926 |
public static boolean isFeatureSupported(@NonNull @WebViewSupportFeature String feature) {
WebViewFeatureInternal webviewFeature = WebViewFeatureInternal.getFeature(feature);
return webviewFeature.isSupportedByFramework() || webviewFeature.isSupportedByWebView();
} | static boolean function(@NonNull @WebViewSupportFeature String feature) { WebViewFeatureInternal webviewFeature = WebViewFeatureInternal.getFeature(feature); return webviewFeature.isSupportedByFramework() webviewFeature.isSupportedByWebView(); } | /**
* Return whether a feature is supported at run-time. This depends on the Android version of the
* device and the WebView APK on the device.
*/ | Return whether a feature is supported at run-time. This depends on the Android version of the device and the WebView APK on the device | isFeatureSupported | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "webkit/src/main/java/androidx/webkit/WebViewFeature.java",
"license": "apache-2.0",
"size": 2277
} | [
"androidx.annotation.NonNull",
"androidx.webkit.internal.WebViewFeatureInternal"
] | import androidx.annotation.NonNull; import androidx.webkit.internal.WebViewFeatureInternal; | import androidx.annotation.*; import androidx.webkit.internal.*; | [
"androidx.annotation",
"androidx.webkit"
] | androidx.annotation; androidx.webkit; | 1,689,866 |
XSWildcardDecl traverseAnyAttribute(Element elmNode,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar) {
// General Attribute Checking for elmNode
Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc);
XSWildcardDecl wildcard = traverseWildcard... | XSWildcardDecl traverseAnyAttribute(Element elmNode, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { Object[] attrValues = fAttrChecker.checkAttributes(elmNode, false, schemaDoc); XSWildcardDecl wildcard = traverseWildcardDecl(elmNode, attrValues, schemaDoc, grammar); fAttrChecker.returnAttrArray(attrValues, schemaD... | /**
* Traverse <anyAttribute>
*
* @param elmNode
* @param schemaDoc
* @param grammar
* @return the wildcard node index
*/ | Traverse <anyAttribute> | traverseAnyAttribute | {
"repo_name": "itgeeker/jdk",
"path": "src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDWildcardTraverser.java",
"license": "apache-2.0",
"size": 7221
} | [
"com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar",
"com.sun.org.apache.xerces.internal.impl.xs.XSWildcardDecl",
"org.w3c.dom.Element"
] | import com.sun.org.apache.xerces.internal.impl.xs.SchemaGrammar; import com.sun.org.apache.xerces.internal.impl.xs.XSWildcardDecl; import org.w3c.dom.Element; | import com.sun.org.apache.xerces.internal.impl.xs.*; import org.w3c.dom.*; | [
"com.sun.org",
"org.w3c.dom"
] | com.sun.org; org.w3c.dom; | 2,012,702 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.