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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@BeforeClass
public static void initStaticData() throws Exception
{
overrideDefaults();
readData();
dumpJVMInfo();
controller = ControllerFactory.createPooling();
} | static void function() throws Exception { overrideDefaults(); readData(); dumpJVMInfo(); controller = ControllerFactory.createPooling(); } | /**
* Initialize static data.
*/ | Initialize static data | initStaticData | {
"repo_name": "MjAbuz/carrot2",
"path": "applications/carrot2-benchmarks/src-test/org/carrot2/core/benchmarks/memtime/MemTimeBenchmark.java",
"license": "bsd-3-clause",
"size": 10241
} | [
"org.carrot2.core.ControllerFactory"
] | import org.carrot2.core.ControllerFactory; | import org.carrot2.core.*; | [
"org.carrot2.core"
] | org.carrot2.core; | 391,450 |
private MessageToUser createMessageWithThrottle(UserInfo userInfo, String subject, String fileHandleId, Set<String> recipients, String inReplyTo) throws InterruptedException, NotFoundException {
assertNotNull(userInfo);
MessageToUser dto = new MessageToUser();
// Note: ID is auto generated
// Note: Create... | MessageToUser function(UserInfo userInfo, String subject, String fileHandleId, Set<String> recipients, String inReplyTo) throws InterruptedException, NotFoundException { assertNotNull(userInfo); MessageToUser dto = new MessageToUser(); dto.setFileHandleId(fileHandleId); dto.setSubject(subject); dto.setRecipients(recipi... | /**
* Creates a message row
*/ | Creates a message row | createMessageWithThrottle | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "services/repository-managers/src/test/java/org/sagebionetworks/repo/manager/MessageManagerImplTest.java",
"license": "apache-2.0",
"size": 38168
} | [
"java.util.Set",
"org.junit.jupiter.api.Assertions",
"org.sagebionetworks.repo.model.UserInfo",
"org.sagebionetworks.repo.model.message.MessageToUser",
"org.sagebionetworks.repo.web.NotFoundException"
] | import java.util.Set; import org.junit.jupiter.api.Assertions; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.model.message.MessageToUser; import org.sagebionetworks.repo.web.NotFoundException; | import java.util.*; import org.junit.jupiter.api.*; import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.message.*; import org.sagebionetworks.repo.web.*; | [
"java.util",
"org.junit.jupiter",
"org.sagebionetworks.repo"
] | java.util; org.junit.jupiter; org.sagebionetworks.repo; | 166,762 |
public static INDArrayIndex[] adjustIndices(int[] originalShape, INDArrayIndex... indexes) {
if (Shape.isVector(originalShape) && indexes.length == 1)
return indexes;
if (indexes.length < originalShape.length)
indexes = fillIn(originalShape, indexes);
if (indexes.len... | static INDArrayIndex[] function(int[] originalShape, INDArrayIndex... indexes) { if (Shape.isVector(originalShape) && indexes.length == 1) return indexes; if (indexes.length < originalShape.length) indexes = fillIn(originalShape, indexes); if (indexes.length > originalShape.length) { INDArrayIndex[] ret = new INDArrayI... | /**
* Prunes indices of greater length than the shape
* and fills in missing indices if there are any
*
* @param originalShape the original shape to adjust to
* @param indexes the indexes to adjust
* @return the adjusted indices
*/ | Prunes indices of greater length than the shape and fills in missing indices if there are any | adjustIndices | {
"repo_name": "huitseeker/nd4j",
"path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/indexing/Indices.java",
"license": "apache-2.0",
"size": 17620
} | [
"org.nd4j.linalg.api.shape.Shape"
] | import org.nd4j.linalg.api.shape.Shape; | import org.nd4j.linalg.api.shape.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 1,519,406 |
Point3i getOffset();
/**
* Get the material to place at the specified relative coordinates. Should
* only be invoked for coordinates for which {@link #getMask(int, int, int)} | Point3i getOffset(); /** * Get the material to place at the specified relative coordinates. Should * only be invoked for coordinates for which {@link #getMask(int, int, int)} | /**
* Get the offset to apply to this object when placing it. In other words
* these are the reverse of the coordinates of the "anchor" block of this
* object.
*
* <p>This is a convenience method which must return the same as invoking
* <code>getAttribute(ATTRIBUTE_OFFSET)</code>. See
... | Get the offset to apply to this object when placing it. In other words these are the reverse of the coordinates of the "anchor" block of this object. This is a convenience method which must return the same as invoking <code>getAttribute(ATTRIBUTE_OFFSET)</code>. See <code>#getAttribute(String, Serializable)</code> and ... | getOffset | {
"repo_name": "frogocomics/WorldPainter",
"path": "WorldPainter/WPCore/src/main/java/org/pepsoft/worldpainter/objects/WPObject.java",
"license": "gpl-3.0",
"size": 9235
} | [
"javax.vecmath.Point3i"
] | import javax.vecmath.Point3i; | import javax.vecmath.*; | [
"javax.vecmath"
] | javax.vecmath; | 2,499,075 |
public void scrollTo (float x, float y, float width, float height, boolean centerHorizontal, boolean centerVertical) {
float amountX = this.amountX;
if (centerHorizontal) {
amountX = x - areaWidth / 2 + width / 2;
} else {
if (x + width > amountX + areaWidth) amountX = x + width - areaWidth;
if (x < a... | void function (float x, float y, float width, float height, boolean centerHorizontal, boolean centerVertical) { float amountX = this.amountX; if (centerHorizontal) { amountX = x - areaWidth / 2 + width / 2; } else { if (x + width > amountX + areaWidth) amountX = x + width - areaWidth; if (x < amountX) amountX = x; } sc... | /** Sets the scroll offset so the specified rectangle is fully in view, and optionally centered vertically and/or horizontally,
* if possible. Coordinates are in the scroll pane widget's coordinate system. */ | Sets the scroll offset so the specified rectangle is fully in view, and optionally centered vertically and/or horizontally | scrollTo | {
"repo_name": "srpepperoni/libGDX",
"path": "gdx/src/com/badlogic/gdx/scenes/scene2d/ui/ScrollPane.java",
"license": "apache-2.0",
"size": 36261
} | [
"com.badlogic.gdx.math.MathUtils"
] | import com.badlogic.gdx.math.MathUtils; | import com.badlogic.gdx.math.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,033,104 |
@ApiModelProperty(
required = true,
value =
"volume id used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md")
public String getVolumeID() {
return volumeID;
} | @ApiModelProperty( required = true, value = "volume id used to identify the volume in cinder. More info: https: String function() { return volumeID; } | /**
* volume id used to identify the volume in cinder. More info:
* https://examples.k8s.io/mysql-cinder-pd/README.md
*
* @return volumeID
*/ | volume id used to identify the volume in cinder. More info: HREF | getVolumeID | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1CinderPersistentVolumeSource.java",
"license": "apache-2.0",
"size": 6233
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,193,847 |
@Override
public String getAddColumnStatement( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc,
String pk, boolean semicolon ) {
return "ALTER TABLE " + tablename + " ADD " + getFieldDefinition( v, tk, pk, use_autoinc, true, false );
} | String function( String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon ) { return STR + tablename + STR + getFieldDefinition( v, tk, pk, use_autoinc, true, false ); } | /**
* Generates the SQL statement to add a column to the specified table
*
* @param tablename
* The table to add
* @param v
* The column defined as a value
* @param tk
* the name of the technical key field
* @param use_autoinc
* whether or not this field... | Generates the SQL statement to add a column to the specified table | getAddColumnStatement | {
"repo_name": "alina-ipatina/pentaho-kettle",
"path": "core/src/org/pentaho/di/core/database/ExtenDBDatabaseMeta.java",
"license": "apache-2.0",
"size": 8154
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 383,350 |
public EncounterType saveEncounterType(EncounterType encounterType);
| EncounterType function(EncounterType encounterType); | /**
* Save an Encounter Type
*
* @param encounterType
*/ | Save an Encounter Type | saveEncounterType | {
"repo_name": "sintjuri/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/db/EncounterDAO.java",
"license": "mpl-2.0",
"size": 8662
} | [
"org.openmrs.EncounterType"
] | import org.openmrs.EncounterType; | import org.openmrs.*; | [
"org.openmrs"
] | org.openmrs; | 475,316 |
@Test(expected = IllegalArgumentException.class)
public void testUpdateSubnetWithNullId() {
final Subnet testSubnet = NeutronSubnet.builder()
.networkId(NETWORK_ID)
.cidr("192.168.0.0/24")
.build();
target.updateSubnet(testSubnet);
} | @Test(expected = IllegalArgumentException.class) void function() { final Subnet testSubnet = NeutronSubnet.builder() .networkId(NETWORK_ID) .cidr(STR) .build(); target.updateSubnet(testSubnet); } | /**
* Tests if updating a subnet with null ID fails with an exception.
*/ | Tests if updating a subnet with null ID fails with an exception | testUpdateSubnetWithNullId | {
"repo_name": "oplinkoms/onos",
"path": "apps/openstacknetworking/app/src/test/java/org/onosproject/openstacknetworking/impl/OpenstackNetworkManagerTest.java",
"license": "apache-2.0",
"size": 25526
} | [
"org.junit.Test",
"org.openstack4j.model.network.Subnet",
"org.openstack4j.openstack.networking.domain.NeutronSubnet"
] | import org.junit.Test; import org.openstack4j.model.network.Subnet; import org.openstack4j.openstack.networking.domain.NeutronSubnet; | import org.junit.*; import org.openstack4j.model.network.*; import org.openstack4j.openstack.networking.domain.*; | [
"org.junit",
"org.openstack4j.model",
"org.openstack4j.openstack"
] | org.junit; org.openstack4j.model; org.openstack4j.openstack; | 834,652 |
public void addStaticLinkToBreadcrumb(String linkName, int linkWeight) {
NavigationHelper nh = BeanUtils.getNavigationHelper(); // TODO
addStaticLinkToBreadcrumb(linkName, nh.getCurrentPrettyUrl(), linkWeight);
} | void function(String linkName, int linkWeight) { NavigationHelper nh = BeanUtils.getNavigationHelper(); addStaticLinkToBreadcrumb(linkName, nh.getCurrentPrettyUrl(), linkWeight); } | /**
* Adds a link to the breadcrumbs using the current PrettyURL. Can be called from XHTML.
*
* @param linkName a {@link java.lang.String} object.
* @param linkWeight a int.
*/ | Adds a link to the breadcrumbs using the current PrettyURL. Can be called from XHTML | addStaticLinkToBreadcrumb | {
"repo_name": "intranda/goobi-viewer-core",
"path": "goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/BreadcrumbBean.java",
"license": "gpl-2.0",
"size": 24161
} | [
"io.goobi.viewer.managedbeans.utils.BeanUtils"
] | import io.goobi.viewer.managedbeans.utils.BeanUtils; | import io.goobi.viewer.managedbeans.utils.*; | [
"io.goobi.viewer"
] | io.goobi.viewer; | 2,135,851 |
public static String convertSerializableToString(Serializable obj) {
ByteArrayOutputStream baos = null;
ObjectOutputStream oos = null;
try {
baos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(baos);
oos.writeObject(obj);
return n... | static String function(Serializable obj) { ByteArrayOutputStream baos = null; ObjectOutputStream oos = null; try { baos = new ByteArrayOutputStream(); oos = new ObjectOutputStream(baos); oos.writeObject(obj); return new String(baos.toByteArray()); } catch (IOException e) { return null; } finally { closeQuietly(baos, oo... | /**
* Helper method to write a serializable object into a String.
* @param obj the Serializable object
* @return a String representation of obj.
*/ | Helper method to write a serializable object into a String | convertSerializableToString | {
"repo_name": "seema-at-box/box-android-sdk",
"path": "box-content-sdk/src/main/java/com/box/androidsdk/content/utils/SdkUtils.java",
"license": "apache-2.0",
"size": 29044
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.ObjectOutputStream",
"java.io.Serializable"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 638,910 |
public static void Write (String nFile){
int i, j;
String contents;
contents = "\n\n";
contents+= "--------------------------------------------\n";
contents+= "| Semantics for the continuous variables |\n";
contents+= "--------------------------------------------\n"... | static void function (String nFile){ int i, j; String contents; contents = "\n\n"; contents+= STR; contents+= STR; contents+= STR; for (i=0; i<StCalculate.num_vars; i++) { if (StCalculate.var[i].continua==true) { contents+= STR + i + "\n"; for (j=0; j<StCalculate.var[i].n_etiq; j++) { contents+= STR + j + STR + StCalcu... | /**
* <p>
* This method writes the semantics of the linguistic variables at the file specified
* </p>
* @param nFile Fichero to write Semantics
**/ | This method writes the semantics of the linguistic variables at the file specified | Write | {
"repo_name": "SCI2SUGR/KEEL",
"path": "src/keel/Algorithms/Subgroup_Discovery/NMEEFSD/Calculate/Semantics.java",
"license": "gpl-3.0",
"size": 4323
} | [
"org.core.Files"
] | import org.core.Files; | import org.core.*; | [
"org.core"
] | org.core; | 1,169,723 |
Map<DatanodeStorage, BlockListAsLongs> getBlockReports(String bpid); | Map<DatanodeStorage, BlockListAsLongs> getBlockReports(String bpid); | /**
* Returns one block report per volume.
* @param bpid Block Pool Id
* @return - a map of DatanodeStorage to block report for the volume.
*/ | Returns one block report per volume | getBlockReports | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java",
"license": "apache-2.0",
"size": 22838
} | [
"java.util.Map",
"org.apache.hadoop.hdfs.protocol.BlockListAsLongs",
"org.apache.hadoop.hdfs.server.protocol.DatanodeStorage"
] | import java.util.Map; import org.apache.hadoop.hdfs.protocol.BlockListAsLongs; import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.protocol.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,646,475 |
protected void popTilesContext()
{
ComponentContext context = (ComponentContext)this.contextStack.pop();
ComponentContext.setContext(context, this.request);
}
| void function() { ComponentContext context = (ComponentContext)this.contextStack.pop(); ComponentContext.setContext(context, this.request); } | /**
* Pops the tiles sub-context off the context-stack after the lower level
* tiles have been rendered.
*/ | Pops the tiles sub-context off the context-stack after the lower level tiles have been rendered | popTilesContext | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/org/apache/velocity/tools/struts/TilesTool.java",
"license": "gpl-3.0",
"size": 17371
} | [
"com.dotcms.repackage.org.apache.struts.tiles.ComponentContext"
] | import com.dotcms.repackage.org.apache.struts.tiles.ComponentContext; | import com.dotcms.repackage.org.apache.struts.tiles.*; | [
"com.dotcms.repackage"
] | com.dotcms.repackage; | 1,633,689 |
private void addResponse(BasicOCSPRespBuilder responseBuilder, Req request) throws OCSPException{
CertificateID certificateID = request.getCertID();
// Build Extensions
Extensions extensions = new Extensions(new Extension[]{});
Extensions requestExtensions = request.getSingleRequest... | void function(BasicOCSPRespBuilder responseBuilder, Req request) throws OCSPException{ CertificateID certificateID = request.getCertID(); Extensions extensions = new Extensions(new Extension[]{}); Extensions requestExtensions = request.getSingleRequestExtensions(); if (requestExtensions != null) { Extension nonceExtens... | /**
* Adds response for specific cert OCSP request
*
* @param responseBuilder The builder containing the full response
* @param request The specific cert request
*/ | Adds response for specific cert OCSP request | addResponse | {
"repo_name": "wdawson/revoker",
"path": "src/main/java/wdawson/samples/revoker/resources/OCSPResponderResource.java",
"license": "apache-2.0",
"size": 16988
} | [
"org.bouncycastle.asn1.ocsp.OCSPObjectIdentifiers",
"org.bouncycastle.asn1.x509.Extension",
"org.bouncycastle.asn1.x509.Extensions",
"org.bouncycastle.cert.ocsp.BasicOCSPRespBuilder",
"org.bouncycastle.cert.ocsp.CertificateID",
"org.bouncycastle.cert.ocsp.OCSPException",
"org.bouncycastle.cert.ocsp.Req"... | import org.bouncycastle.asn1.ocsp.OCSPObjectIdentifiers; import org.bouncycastle.asn1.x509.Extension; import org.bouncycastle.asn1.x509.Extensions; import org.bouncycastle.cert.ocsp.BasicOCSPRespBuilder; import org.bouncycastle.cert.ocsp.CertificateID; import org.bouncycastle.cert.ocsp.OCSPException; import org.bouncyc... | import org.bouncycastle.asn1.ocsp.*; import org.bouncycastle.asn1.x509.*; import org.bouncycastle.cert.ocsp.*; import org.joda.time.*; | [
"org.bouncycastle.asn1",
"org.bouncycastle.cert",
"org.joda.time"
] | org.bouncycastle.asn1; org.bouncycastle.cert; org.joda.time; | 1,353,832 |
final Object res;
final EObject eObject = IdeMappingUtils.adapt(selected, EObject.class);
if (eObject instanceof DSemanticDecorator) {
res = ((DSemanticDecorator)eObject).getTarget();
} else {
res = null;
}
return res;
} | final Object res; final EObject eObject = IdeMappingUtils.adapt(selected, EObject.class); if (eObject instanceof DSemanticDecorator) { res = ((DSemanticDecorator)eObject).getTarget(); } else { res = null; } return res; } | /**
* Gets the {@link DSemanticDecorator#getTarget() semantic element} from the given selected {@link Object}
* .
*
* @param selected
* the selected {@link Object}
* @return the {@link DSemanticDecorator#getTarget() semantic element} from the given selected
* {@link Object} if any, <co... | Gets the <code>DSemanticDecorator#getTarget() semantic element</code> from the given selected <code>Object</code> | getSemanticElementFromSelectedObject | {
"repo_name": "ModelWriter/Source",
"path": "plugins/org.eclipse.mylyn.docs.intent.mapping.sirius.ide.ui/src/org/eclipse/mylyn/docs/intent/mapping/sirius/ide/ui/command/SiriusMappingUtils.java",
"license": "epl-1.0",
"size": 1686
} | [
"org.eclipse.emf.ecore.EObject",
"org.eclipse.mylyn.docs.intent.mapping.ide.IdeMappingUtils",
"org.eclipse.sirius.viewpoint.DSemanticDecorator"
] | import org.eclipse.emf.ecore.EObject; import org.eclipse.mylyn.docs.intent.mapping.ide.IdeMappingUtils; import org.eclipse.sirius.viewpoint.DSemanticDecorator; | import org.eclipse.emf.ecore.*; import org.eclipse.mylyn.docs.intent.mapping.ide.*; import org.eclipse.sirius.viewpoint.*; | [
"org.eclipse.emf",
"org.eclipse.mylyn",
"org.eclipse.sirius"
] | org.eclipse.emf; org.eclipse.mylyn; org.eclipse.sirius; | 1,677,193 |
protected String getPrefix() throws ConfigurationException {
if (null != prefix) {
return prefix;
} else {
throw new ConfigurationException("No prefix (not even default \"\") is associated with the "
+ "configuration element \"" + getName() + "\" at " + ge... | String function() throws ConfigurationException { if (null != prefix) { return prefix; } else { throw new ConfigurationException(STR\STR + STRSTR\STR + getLocation()); } } | /**
* Returns the prefix of the namespace
*/ | Returns the prefix of the namespace | getPrefix | {
"repo_name": "baboune/compass",
"path": "src/main/src/org/compass/core/util/config/PlainConfigurationHelper.java",
"license": "apache-2.0",
"size": 14139
} | [
"org.compass.core.config.ConfigurationException"
] | import org.compass.core.config.ConfigurationException; | import org.compass.core.config.*; | [
"org.compass.core"
] | org.compass.core; | 565,724 |
public void fireTreeWillExpand(TreePath path) throws ExpandVetoException
{
TreeExpansionEvent event = new TreeExpansionEvent(this, path);
TreeWillExpandListener[] listeners = getTreeWillExpandListeners();
for (int index = 0; index < listeners.length; ++index)
listeners[index].treeWillExpand(event... | void function(TreePath path) throws ExpandVetoException { TreeExpansionEvent event = new TreeExpansionEvent(this, path); TreeWillExpandListener[] listeners = getTreeWillExpandListeners(); for (int index = 0; index < listeners.length; ++index) listeners[index].treeWillExpand(event); } | /**
* Notifies all listeners that the tree will expand.
*
* @param path the path to the node that will expand
*/ | Notifies all listeners that the tree will expand | fireTreeWillExpand | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/JTree.java",
"license": "gpl-2.0",
"size": 83318
} | [
"javax.swing.event.TreeExpansionEvent",
"javax.swing.event.TreeWillExpandListener",
"javax.swing.tree.ExpandVetoException",
"javax.swing.tree.TreePath"
] | import javax.swing.event.TreeExpansionEvent; import javax.swing.event.TreeWillExpandListener; import javax.swing.tree.ExpandVetoException; import javax.swing.tree.TreePath; | import javax.swing.event.*; import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 2,075,669 |
public List<String> getMRes() {
return mRes;
} | List<String> function() { return mRes; } | /**
* Get the list of resource for the contact.
* @return the mRes
*/ | Get the list of resource for the contact | getMRes | {
"repo_name": "abmobilesoftware/TxtFeedbackStaffAndroidApp",
"path": "src/com/beem/project/beem/service/Contact.java",
"license": "gpl-3.0",
"size": 11430
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,846,905 |
public final ActionMode.Callback getCustomSelectionActionModeCallback() {
return getView().getCustomSelectionActionModeCallback();
} | final ActionMode.Callback function() { return getView().getCustomSelectionActionModeCallback(); } | /**
* Retrieves the value set in {@link #setCustomSelectionActionModeCallback}. Default is null.
*
* @return The current custom selection callback.
*/ | Retrieves the value set in <code>#setCustomSelectionActionModeCallback</code>. Default is null | getCustomSelectionActionModeCallback | {
"repo_name": "michael-rapp/AndroidMaterialValidation",
"path": "library/src/main/java/de/mrapp/android/validation/EditText.java",
"license": "apache-2.0",
"size": 89149
} | [
"android.view.ActionMode"
] | import android.view.ActionMode; | import android.view.*; | [
"android.view"
] | android.view; | 2,803,965 |
static Set<HTableDescriptor> updateRootWithNewRegionInfo(
final MasterServices masterServices)
throws IOException {
MigratingVisitor v = new MigratingVisitor(masterServices);
MetaReader.fullScan(masterServices.getCatalogTracker(), v, null, true);
return v.htds;
}
static class MigratingVisi... | static Set<HTableDescriptor> updateRootWithNewRegionInfo( final MasterServices masterServices) throws IOException { MigratingVisitor v = new MigratingVisitor(masterServices); MetaReader.fullScan(masterServices.getCatalogTracker(), v, null, true); return v.htds; } static class MigratingVisitor implements Visitor { priva... | /**
* Update the ROOT with new HRI. (HRI with no HTD)
* @param masterServices
* @return List of table descriptors
* @throws IOException
*/ | Update the ROOT with new HRI. (HRI with no HTD) | updateRootWithNewRegionInfo | {
"repo_name": "zqxjjj/NobidaBase",
"path": "target/hbase-0.94.9/hbase-0.94.9/src/main/java/org/apache/hadoop/hbase/catalog/MetaMigrationRemovingHTD.java",
"license": "apache-2.0",
"size": 10453
} | [
"java.io.IOException",
"java.util.HashSet",
"java.util.Set",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.catalog.MetaReader",
"org.apache.hadoop.hbase.master.MasterServices"
] | import java.io.IOException; import java.util.HashSet; import java.util.Set; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.catalog.MetaReader; import org.apache.hadoop.hbase.master.MasterServices; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.catalog.*; import org.apache.hadoop.hbase.master.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 556,194 |
public StackFrameDump dumpStackFrame() throws DebuggerStateException, DebuggerException {
StackFrameDump dump = DtoFactory.getInstance().createDto(StackFrameDump.class);
boolean existInformation = true;
JdiLocalVariable[] variables = new JdiLocalVariable[0];
try {
variab... | StackFrameDump function() throws DebuggerStateException, DebuggerException { StackFrameDump dump = DtoFactory.getInstance().createDto(StackFrameDump.class); boolean existInformation = true; JdiLocalVariable[] variables = new JdiLocalVariable[0]; try { variables = getCurrentFrame().getLocalVariables(); } catch (Debugger... | /**
* Get dump of fields and local variable of current object and current frame.
*
* @return dump of current stack frame
* @throws DebuggerStateException
* when target JVM is not suspended
* @throws DebuggerException
* when any other errors occur when try to access the... | Get dump of fields and local variable of current object and current frame | dumpStackFrame | {
"repo_name": "codenvy/che-plugins",
"path": "plugin-java/che-plugin-java-ext-debugger-java-server/src/main/java/org/eclipse/che/ide/ext/java/jdi/server/Debugger.java",
"license": "epl-1.0",
"size": 36874
} | [
"java.util.Arrays",
"java.util.Collections",
"org.eclipse.che.dto.server.DtoFactory",
"org.eclipse.che.ide.ext.java.jdi.shared.Field",
"org.eclipse.che.ide.ext.java.jdi.shared.StackFrameDump",
"org.eclipse.che.ide.ext.java.jdi.shared.Variable",
"org.eclipse.che.ide.ext.java.jdi.shared.VariablePath"
] | import java.util.Arrays; import java.util.Collections; import org.eclipse.che.dto.server.DtoFactory; import org.eclipse.che.ide.ext.java.jdi.shared.Field; import org.eclipse.che.ide.ext.java.jdi.shared.StackFrameDump; import org.eclipse.che.ide.ext.java.jdi.shared.Variable; import org.eclipse.che.ide.ext.java.jdi.share... | import java.util.*; import org.eclipse.che.dto.server.*; import org.eclipse.che.ide.ext.java.jdi.shared.*; | [
"java.util",
"org.eclipse.che"
] | java.util; org.eclipse.che; | 1,775,077 |
Collection<Feature> getSubFeatures(CoreFeature feature); | Collection<Feature> getSubFeatures(CoreFeature feature); | /**
* Return all the sub features of this menu for the specified CoreFeature.
*
* @param feature The core feature.
*
* @return A Collection containing all the sub features of this core feature.
*/ | Return all the sub features of this menu for the specified CoreFeature | getSubFeatures | {
"repo_name": "wichtounet/jtheque-core",
"path": "jtheque-features/src/main/java/org/jtheque/features/Menu.java",
"license": "apache-2.0",
"size": 1459
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,783,377 |
public long copyScreen(String userId, long projectId, String targetFormFileId, String fileId) {
List<String> sourceFiles = storageIo.getProjectSourceFiles(userId, projectId);
if (!sourceFiles.contains(fileId)) {
storageIo.addSourceFilesToProject(userId, projectId, false, fileId);
}
return storag... | long function(String userId, long projectId, String targetFormFileId, String fileId) { List<String> sourceFiles = storageIo.getProjectSourceFiles(userId, projectId); if (!sourceFiles.contains(fileId)) { storageIo.addSourceFilesToProject(userId, projectId, false, fileId); } return storageIo.uploadRawFileForce(projectId,... | /**
* Adds a new screen to the given project.
*
* @param userId the user id
* @param projectId project ID
* @param fileId ID of file to delete
* @return modification date for project
*/ | Adds a new screen to the given project | copyScreen | {
"repo_name": "mit-dig/punya",
"path": "appinventor/appengine/src/com/google/appinventor/server/project/CommonProjectService.java",
"license": "apache-2.0",
"size": 12239
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,302,010 |
public static void systemCallSoundFmodChannelSetPriority(
int channelID, int priority,
Wrapper<ReturnCode> outReturnCode, Wrapper<SoundReturnCode> outSoundReturnCode, Wrapper<FmodResult> outFmodResult
){
List<Parameter> params = new ArrayList<>();
params.add(Parameter.cr... | static void function( int channelID, int priority, Wrapper<ReturnCode> outReturnCode, Wrapper<SoundReturnCode> outSoundReturnCode, Wrapper<FmodResult> outFmodResult ){ List<Parameter> params = new ArrayList<>(); params.add(Parameter.createInt(channelID)); params.add(Parameter.createInt(priority)); QAMessage response = ... | /**
* Sets the priority value of a given channel
* @param channelID The given channels id
* @param priority Priority value
* @param outReturnCode General Return Code
* @param outSoundReturnCode Sound Return Code
* @param outFmodResult Fmod Result
*/ | Sets the priority value of a given channel | systemCallSoundFmodChannelSetPriority | {
"repo_name": "Silveryard/BaseSystem",
"path": "Libraries/App/Java/AppSDK/src/main/java/de/silveryard/basesystem/sdk/kernel/sound/FmodChannel.java",
"license": "mit",
"size": 23930
} | [
"de.silveryard.basesystem.sdk.kernel.Kernel",
"de.silveryard.basesystem.sdk.kernel.ReturnCode",
"de.silveryard.basesystem.sdk.kernel.Wrapper",
"de.silveryard.transport.Parameter",
"de.silveryard.transport.highlevelprotocols.qa.QAMessage",
"java.util.ArrayList",
"java.util.List"
] | import de.silveryard.basesystem.sdk.kernel.Kernel; import de.silveryard.basesystem.sdk.kernel.ReturnCode; import de.silveryard.basesystem.sdk.kernel.Wrapper; import de.silveryard.transport.Parameter; import de.silveryard.transport.highlevelprotocols.qa.QAMessage; import java.util.ArrayList; import java.util.List; | import de.silveryard.basesystem.sdk.kernel.*; import de.silveryard.transport.*; import de.silveryard.transport.highlevelprotocols.qa.*; import java.util.*; | [
"de.silveryard.basesystem",
"de.silveryard.transport",
"java.util"
] | de.silveryard.basesystem; de.silveryard.transport; java.util; | 2,723,969 |
void configureConnectionInformation(String namenodeHost, String namenodePort, String jobtrackerHost,
String jobtrackerPort, Configuration conf, List<String> logMessages) throws Exception; | void configureConnectionInformation(String namenodeHost, String namenodePort, String jobtrackerHost, String jobtrackerPort, Configuration conf, List<String> logMessages) throws Exception; | /**
* Setup the config object based on the supplied information with
* respect to the specific distribution
*
* @param namenodeHost
* @param namenodePort
* @param jobtrackerHost
* @param jobtrackerPort
* @param conf Configuration to update
* @param logMessages Any basic log messages that sho... | Setup the config object based on the supplied information with respect to the specific distribution | configureConnectionInformation | {
"repo_name": "mtseu/pentaho-hadoop-shims",
"path": "api/src/org/pentaho/hadoop/shim/spi/HadoopShim.java",
"license": "apache-2.0",
"size": 7001
} | [
"java.util.List",
"org.pentaho.hadoop.shim.api.Configuration"
] | import java.util.List; import org.pentaho.hadoop.shim.api.Configuration; | import java.util.*; import org.pentaho.hadoop.shim.api.*; | [
"java.util",
"org.pentaho.hadoop"
] | java.util; org.pentaho.hadoop; | 2,634,976 |
public Point2D onRectangle(Rectangle2D rectangle) {
return this == CENTER ? new Point2D.Double(rectangle.getCenterX(), rectangle.getCenterY())
: new Point2D.Double(rectangle.getCenterX() + xOff * rectangle.getWidth(), rectangle.getCenterY() + yOff * rectangle.getHeight());
} | Point2D function(Rectangle2D rectangle) { return this == CENTER ? new Point2D.Double(rectangle.getCenterX(), rectangle.getCenterY()) : new Point2D.Double(rectangle.getCenterX() + xOff * rectangle.getWidth(), rectangle.getCenterY() + yOff * rectangle.getHeight()); } | /**
* Returns the absolute location of an anchor point on a rectangle of given size.
* @param rectangle the rectangle
* @return anchor point location
*/ | Returns the absolute location of an anchor point on a rectangle of given size | onRectangle | {
"repo_name": "triathematician/blaisemath",
"path": "blaise-common/src/main/java/com/googlecode/blaisemath/primitive/Anchor.java",
"license": "apache-2.0",
"size": 5640
} | [
"java.awt.geom.Point2D",
"java.awt.geom.Rectangle2D"
] | import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,741,421 |
public ContainerCreateHeaders withLastModified(OffsetDateTime lastModified) {
if (lastModified == null) {
this.lastModified = null;
} else {
this.lastModified = new DateTimeRfc1123(lastModified);
}
return this;
} | ContainerCreateHeaders function(OffsetDateTime lastModified) { if (lastModified == null) { this.lastModified = null; } else { this.lastModified = new DateTimeRfc1123(lastModified); } return this; } | /**
* Set the lastModified value.
*
* @param lastModified the lastModified value to set.
* @return the ContainerCreateHeaders object itself.
*/ | Set the lastModified value | withLastModified | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/models/ContainerCreateHeaders.java",
"license": "mit",
"size": 4527
} | [
"com.microsoft.rest.v2.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.microsoft.rest.v2.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.microsoft.rest.v2.*; import java.time.*; | [
"com.microsoft.rest",
"java.time"
] | com.microsoft.rest; java.time; | 2,109,528 |
@Test(timeout = 120000)
public void testSetXAttr() throws Exception {
FileSystem.mkdirs(fs, path, FsPermission.createImmutable((short)0750));
fs.setXAttr(path, name1, value1, EnumSet.of(XAttrSetFlag.CREATE,
XAttrSetFlag.REPLACE));
Map<String, byte[]> xattrs = fs.getXAttrs(path);
As... | @Test(timeout = 120000) void function() throws Exception { FileSystem.mkdirs(fs, path, FsPermission.createImmutable((short)0750)); fs.setXAttr(path, name1, value1, EnumSet.of(XAttrSetFlag.CREATE, XAttrSetFlag.REPLACE)); Map<String, byte[]> xattrs = fs.getXAttrs(path); Assert.assertEquals(xattrs.size(), 1); Assert.asser... | /**
* Tests for setting xattr
* 1. Set xattr with XAttrSetFlag.CREATE|XAttrSetFlag.REPLACE flag.
* 2. Set xattr with illegal name.
* 3. Set xattr without XAttrSetFlag.
* 4. Set xattr and total number exceeds max limit.
* 5. Set xattr and name is too long.
* 6. Set xattr and value is too long.
*/ | Tests for setting xattr 1. Set xattr with XAttrSetFlag.CREATE|XAttrSetFlag.REPLACE flag. 2. Set xattr with illegal name. 3. Set xattr without XAttrSetFlag. 4. Set xattr and total number exceeds max limit. 5. Set xattr and name is too long. 6. Set xattr and value is too long | testSetXAttr | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/FSXAttrBaseTest.java",
"license": "apache-2.0",
"size": 36115
} | [
"java.io.IOException",
"java.util.EnumSet",
"java.util.Map",
"org.apache.hadoop.HadoopIllegalArgumentException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.XAttrSetFlag",
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.ipc.RemoteException",
"org.apache.hadoop.test.Ge... | import java.io.IOException; import java.util.EnumSet; import java.util.Map; import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.XAttrSetFlag; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.ipc.RemoteException; import... | import java.io.*; import java.util.*; import org.apache.hadoop.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.test.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 1,826,538 |
public ExecRow getNextRowCore() throws StandardException {
if( isXplainOnlyMode() )
return null;
if ( isOpen ) {
if ( ! next ) {
next = true;
if (SanityManager.DEBUG)
SanityManager.ASSERT(! cursor.isClosed(), "cursor closed");
ExecRow cursorRow = cursor.getCurrentRow();
... | ExecRow function() throws StandardException { if( isXplainOnlyMode() ) return null; if ( isOpen ) { if ( ! next ) { next = true; if (SanityManager.DEBUG) SanityManager.ASSERT(! cursor.isClosed(), STR); ExecRow cursorRow = cursor.getCurrentRow(); if (cursorRow == null) { throw StandardException.newException(SQLState.NO_... | /**
* If open and not returned yet, returns the row.
*
* @exception StandardException thrown on failure.
*/ | If open and not returned yet, returns the row | getNextRowCore | {
"repo_name": "trejkaz/derby",
"path": "java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java",
"license": "apache-2.0",
"size": 9962
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.reference.SQLState",
"org.apache.derby.iapi.sql.execute.ExecRow",
"org.apache.derby.shared.common.sanity.SanityManager"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.reference.SQLState; import org.apache.derby.iapi.sql.execute.ExecRow; import org.apache.derby.shared.common.sanity.SanityManager; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.reference.*; import org.apache.derby.iapi.sql.execute.*; import org.apache.derby.shared.common.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 448,037 |
public static void setBeanInstances(Vector beanInstances,
JComponent container) {
reset(container);
if (container != null) {
for (int i = 0; i < beanInstances.size(); i++) {
Object bean = ((BeanInstance)beanInstances.elementAt(i)).getBean();
if (Beans.isInstanceOf(bean, JComponent.clas... | static void function(Vector beanInstances, JComponent container) { reset(container); if (container != null) { for (int i = 0; i < beanInstances.size(); i++) { Object bean = ((BeanInstance)beanInstances.elementAt(i)).getBean(); if (Beans.isInstanceOf(bean, JComponent.class)) { container.add((JComponent)bean); } } contai... | /**
* Describe <code>setBeanInstances</code> method here.
*
* @param beanInstances a <code>Vector</code> value
* @param container a <code>JComponent</code> value
*/ | Describe <code>setBeanInstances</code> method here | setBeanInstances | {
"repo_name": "paolopavan/cfr",
"path": "src/weka/gui/BEANS/BeanInstance.java",
"license": "gpl-3.0",
"size": 11247
} | [
"java.beans.Beans",
"java.util.Vector",
"javax.swing.JComponent"
] | import java.beans.Beans; import java.util.Vector; import javax.swing.JComponent; | import java.beans.*; import java.util.*; import javax.swing.*; | [
"java.beans",
"java.util",
"javax.swing"
] | java.beans; java.util; javax.swing; | 1,787,659 |
int delete(String id) throws SQLException; | int delete(String id) throws SQLException; | /**
* Executes a mapped SQL DELETE statement.
* Delete returns the number of rows effected.
* <p/>
* This overload assumes no parameter is needed.
*
* @param id The name of the statement to execute.
* @return The number of rows effected.
* @throws java.sql.SQLExcepti... | Executes a mapped SQL DELETE statement. Delete returns the number of rows effected. This overload assumes no parameter is needed | delete | {
"repo_name": "mashuai/Open-Source-Research",
"path": "iBATIS/src/com/ibatis/sqlmap/client/SqlMapExecutor.java",
"license": "apache-2.0",
"size": 15752
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 775,398 |
protected void testScan(String start, String stop, String last)
throws IOException, InterruptedException, ClassNotFoundException {
String jobName = "Scan" + (start != null ? start.toUpperCase() : "Empty")
+ "To" + (stop != null ? stop.toUpperCase() : "Empty");
LOG.info("Before map/reduce startup... | void function(String start, String stop, String last) throws IOException, InterruptedException, ClassNotFoundException { String jobName = "Scan" + (start != null ? start.toUpperCase() : "Empty") + "To" + (stop != null ? stop.toUpperCase() : "Empty"); LOG.info(STR + jobName); Configuration c = new Configuration(TEST_UTI... | /**
* Tests a MR scan using specific start and stop rows.
*
* @throws IOException
* @throws ClassNotFoundException
* @throws InterruptedException
*/ | Tests a MR scan using specific start and stop rows | testScan | {
"repo_name": "JichengSong/hbase",
"path": "src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSnapshotInputFormatScan.java",
"license": "apache-2.0",
"size": 7009
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,300,789 |
public Map<String, Map<String, String>> getGroupMap() {
return _configGroupMap;
} | Map<String, Map<String, String>> function() { return _configGroupMap; } | /**
* Gets the map of config groups by short key.
*
* @return the map, not null
*/ | Gets the map of config groups by short key | getGroupMap | {
"repo_name": "McLeodMoores/starling",
"path": "projects/web/src/main/java/com/opengamma/web/config/ConfigTypesProvider.java",
"license": "apache-2.0",
"size": 4877
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,822,957 |
public ClntIdent getClientID() {
return clientID;
} | ClntIdent function() { return clientID; } | /**
* client ID. Works only for read_attribute(s), write_attribute(s), write_read_attribute(s), command_inout and IDL
* >=4 and when request is not performed by the polling threads.
*
* @return the client id
*/ | client ID. Works only for read_attribute(s), write_attribute(s), write_read_attribute(s), command_inout and IDL >=4 and when request is not performed by the polling threads | getClientID | {
"repo_name": "tango-controls/JTango",
"path": "server/src/main/java/org/tango/server/InvocationContext.java",
"license": "lgpl-3.0",
"size": 5926
} | [
"fr.esrf.Tango"
] | import fr.esrf.Tango; | import fr.esrf.*; | [
"fr.esrf"
] | fr.esrf; | 1,817,875 |
public ArrayList<TextView> clickInRecyclerView(int line) {
return clickInRecyclerView(line, 0, 0, false, 0);
}
| ArrayList<TextView> function(int line) { return clickInRecyclerView(line, 0, 0, false, 0); } | /**
* Clicks on a certain list line and returns the {@link TextView}s that
* the list line is showing. Will use the first list it finds.
*
* @param line the line that should be clicked
* @return a {@code List} of the {@code TextView}s located in the list line
*/ | Clicks on a certain list line and returns the <code>TextView</code>s that the list line is showing. Will use the first list it finds | clickInRecyclerView | {
"repo_name": "RobotiumTech/robotium",
"path": "robotium-solo/src/main/java/com/robotium/solo/Clicker.java",
"license": "apache-2.0",
"size": 21594
} | [
"android.widget.TextView",
"java.util.ArrayList"
] | import android.widget.TextView; import java.util.ArrayList; | import android.widget.*; import java.util.*; | [
"android.widget",
"java.util"
] | android.widget; java.util; | 1,423,713 |
ImmutableList<StoreFile> close() throws IOException {
this.lock.writeLock().lock();
try {
ImmutableList<StoreFile> result = storefiles;
// Clear so metrics doesn't find them.
storefiles = ImmutableList.of();
if (!result.isEmpty()) {
// initialize the thread pool for closing s... | ImmutableList<StoreFile> close() throws IOException { this.lock.writeLock().lock(); try { ImmutableList<StoreFile> result = storefiles; storefiles = ImmutableList.of(); if (!result.isEmpty()) { ThreadPoolExecutor storeFileCloserThreadPool = this.region .getStoreFileOpenAndCloseThreadPool(STR + this.family.getNameAsStri... | /**
* Close all the readers
*
* We don't need to worry about subsequent requests because the HRegion holds
* a write lock that will prevent any more reads or writes.
*
* @throws IOException
*/ | Close all the readers We don't need to worry about subsequent requests because the HRegion holds a write lock that will prevent any more reads or writes | close | {
"repo_name": "indi60/hbase-pmc",
"path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java",
"license": "apache-2.0",
"size": 86038
} | [
"com.google.common.collect.ImmutableList",
"java.io.IOException",
"java.util.concurrent.ThreadPoolExecutor"
] | import com.google.common.collect.ImmutableList; import java.io.IOException; import java.util.concurrent.ThreadPoolExecutor; | import com.google.common.collect.*; import java.io.*; import java.util.concurrent.*; | [
"com.google.common",
"java.io",
"java.util"
] | com.google.common; java.io; java.util; | 2,700,463 |
@ResponseStatus(HttpStatus.NOT_FOUND)
@ExceptionHandler(ServerRequestNotSupported.class)
@ResponseBody
public static ApiMessageResponse handleServerRequestNotSupported(
final ServerRequestNotSupported ex) {
return new ApiMessageResponse("Server does not support request");
} | @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler(ServerRequestNotSupported.class) static ApiMessageResponse function( final ServerRequestNotSupported ex) { return new ApiMessageResponse(STR); } | /**
* ServerRequestNotSupported handler.
* @param ex ServerRequestNotSupported
* @return ApiStringResponse
*/ | ServerRequestNotSupported handler | handleServerRequestNotSupported | {
"repo_name": "formkiq/formkiq-server",
"path": "core/src/main/java/com/formkiq/core/api/ErrorHandlingController.java",
"license": "apache-2.0",
"size": 16517
} | [
"com.formkiq.core.service.ServerRequestNotSupported",
"com.formkiq.core.service.dto.ApiMessageResponse",
"org.springframework.http.HttpStatus",
"org.springframework.web.bind.annotation.ExceptionHandler",
"org.springframework.web.bind.annotation.ResponseStatus"
] | import com.formkiq.core.service.ServerRequestNotSupported; import com.formkiq.core.service.dto.ApiMessageResponse; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseStatus; | import com.formkiq.core.service.*; import com.formkiq.core.service.dto.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"com.formkiq.core",
"org.springframework.http",
"org.springframework.web"
] | com.formkiq.core; org.springframework.http; org.springframework.web; | 2,702,285 |
@CheckForNull
V refresh(K key, int hash, CacheLoader<? super K, V> loader, boolean checkTime) {
final LoadingValueReference<K, V> loadingValueReference =
insertLoadingValueReference(key, hash, checkTime);
if (loadingValueReference == null) {
return null;
}
ListenableFu... | V refresh(K key, int hash, CacheLoader<? super K, V> loader, boolean checkTime) { final LoadingValueReference<K, V> loadingValueReference = insertLoadingValueReference(key, hash, checkTime); if (loadingValueReference == null) { return null; } ListenableFuture<V> result = loadAsync(key, hash, loadingValueReference, load... | /**
* Refreshes the value associated with {@code key}, unless another thread is already doing so.
* Returns the newly refreshed value associated with {@code key} if it was refreshed inline, or
* {@code null} if another thread is performing the refresh or if an error occurs during
* refresh.
*/ | Refreshes the value associated with key, unless another thread is already doing so. Returns the newly refreshed value associated with key if it was refreshed inline, or null if another thread is performing the refresh or if an error occurs during refresh | refresh | {
"repo_name": "mosoft521/guava",
"path": "android/guava/src/com/google/common/cache/LocalCache.java",
"license": "apache-2.0",
"size": 146176
} | [
"com.google.common.util.concurrent.ListenableFuture",
"com.google.common.util.concurrent.Uninterruptibles"
] | import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.Uninterruptibles; | import com.google.common.util.concurrent.*; | [
"com.google.common"
] | com.google.common; | 1,066,683 |
Map<String, Throwable> getFailures(); | Map<String, Throwable> getFailures(); | /**
* Gets the authentication failure map.
*
* @return Non -null authentication failure map.
*/ | Gets the authentication failure map | getFailures | {
"repo_name": "pdrados/cas",
"path": "api/cas-server-core-api-authentication/src/main/java/org/apereo/cas/authentication/AuthenticationBuilder.java",
"license": "apache-2.0",
"size": 6310
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 431,308 |
@Override
public BInputPort connectTo(BOperatorInvocation receivingBop, boolean functional,
BInputPort input) {
// We go through the JavaFunctional code to ensure
// that we correctly add the dependent jars into the
// class path of the operator.
if (functional)
... | BInputPort function(BOperatorInvocation receivingBop, boolean functional, BInputPort input) { if (functional) return JavaFunctional.connectTo(this, output(), getTupleType(), receivingBop, input); return receivingBop.inputFrom(output, input); } | /**
* Connect this stream to a downstream operator. If input is null then a new
* input port will be created, otherwise it will be used to connect to this
* stream. Returns input or the new port if input was null.
*/ | Connect this stream to a downstream operator. If input is null then a new input port will be created, otherwise it will be used to connect to this stream. Returns input or the new port if input was null | connectTo | {
"repo_name": "ibmkendrick/streamsx.topology",
"path": "java/src/com/ibm/streamsx/topology/internal/core/StreamImpl.java",
"license": "apache-2.0",
"size": 25456
} | [
"com.ibm.streamsx.topology.builder.BInputPort",
"com.ibm.streamsx.topology.builder.BOperatorInvocation"
] | import com.ibm.streamsx.topology.builder.BInputPort; import com.ibm.streamsx.topology.builder.BOperatorInvocation; | import com.ibm.streamsx.topology.builder.*; | [
"com.ibm.streamsx"
] | com.ibm.streamsx; | 1,557,944 |
public ProfileInner withEnabledState(State enabledState) {
this.enabledState = enabledState;
return this;
} | ProfileInner function(State enabledState) { this.enabledState = enabledState; return this; } | /**
* Set the enabledState property: The state of the Experiment.
*
* @param enabledState the enabledState value to set.
* @return the ProfileInner object itself.
*/ | Set the enabledState property: The state of the Experiment | withEnabledState | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/frontdoor/azure-resourcemanager-frontdoor/src/main/java/com/azure/resourcemanager/frontdoor/fluent/models/ProfileInner.java",
"license": "mit",
"size": 3172
} | [
"com.azure.resourcemanager.frontdoor.models.State"
] | import com.azure.resourcemanager.frontdoor.models.State; | import com.azure.resourcemanager.frontdoor.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,098,526 |
@Test
public void testInvalidBypassRules() throws Exception {
String[] invalidBypassRules = {
null,
"", // empty
"http://", // no valid host/port
"20:example.com", // bad port
"example.com:-20" // bad port
};
... | void function() throws Exception { String[] invalidBypassRules = { null, STRhttp: STR, STR }; for (String bypassRule : invalidBypassRules) { try { setProxyOverrideSync(new ProxyConfig.Builder() .addBypassRule(bypassRule).build()); fail(STR + bypassRule); } catch (IllegalArgumentException e) { } } } | /**
* This test should have an equivalent in CTS when this is implemented in the framework.
*/ | This test should have an equivalent in CTS when this is implemented in the framework | testInvalidBypassRules | {
"repo_name": "AndroidX/androidx",
"path": "webkit/webkit/src/androidTest/java/androidx/webkit/ProxyControllerTest.java",
"license": "apache-2.0",
"size": 12169
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,544,821 |
private void onActionMenuAbout() {
AlertDialog.Builder actionAbout = new AlertDialog.Builder(this);
LayoutInflater layoutInflater = this.getLayoutInflater();
actionAbout.setView(layoutInflater.inflate(R.layout.dialog_about, null))
.setTitle(R.string.app_name)
... | void function() { AlertDialog.Builder actionAbout = new AlertDialog.Builder(this); LayoutInflater layoutInflater = this.getLayoutInflater(); actionAbout.setView(layoutInflater.inflate(R.layout.dialog_about, null)) .setTitle(R.string.app_name) .create() .show(); } | /**
* Create dialog about app
*/ | Create dialog about app | onActionMenuAbout | {
"repo_name": "mogsev/CurrencyConvertor",
"path": "app/src/main/java/com/mogsev/currencyconvertor/MainActivity.java",
"license": "apache-2.0",
"size": 3413
} | [
"android.app.AlertDialog",
"android.view.LayoutInflater"
] | import android.app.AlertDialog; import android.view.LayoutInflater; | import android.app.*; import android.view.*; | [
"android.app",
"android.view"
] | android.app; android.view; | 751,722 |
public List<String> parseStatements(String sqlScript) {
List<SqlScriptStatement> scriptStatements = getSqlScriptStatements(sqlScript);
List<String> statements = new ArrayList<String>();
for (SqlScriptStatement scriptStatement : scriptStatements) {
statements.add(scriptStatement.getStatemen... | List<String> function(String sqlScript) { List<SqlScriptStatement> scriptStatements = getSqlScriptStatements(sqlScript); List<String> statements = new ArrayList<String>(); for (SqlScriptStatement scriptStatement : scriptStatements) { statements.add(scriptStatement.getStatement()); } return statements; } | /**
* Parse all possible statements from the provided SQL script.
*
* @param sqlScript Raw SQL Script to be parsed into executable statements.
* @return List of parsed SQL statements to be executed separately.
*/ | Parse all possible statements from the provided SQL script | parseStatements | {
"repo_name": "jjeb/kettle-trunk",
"path": "db/src/org/pentaho/di/core/database/BaseDatabaseMeta.java",
"license": "apache-2.0",
"size": 63985
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,327,944 |
EReference getTableRowStart_End(); | EReference getTableRowStart_End(); | /**
* Returns the meta object for the reference '{@link org.lunifera.doc.dsl.doccompiler.TableRowStart#getEnd <em>End</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>End</em>'.
* @see org.lunifera.doc.dsl.doccompiler.TableRowStart#getEnd()
* @see #g... | Returns the meta object for the reference '<code>org.lunifera.doc.dsl.doccompiler.TableRowStart#getEnd End</code>'. | getTableRowStart_End | {
"repo_name": "lunifera/lunifera-doc",
"path": "org.lunifera.doc.dsl.semantic/src/org/lunifera/doc/dsl/doccompiler/DocCompilerPackage.java",
"license": "epl-1.0",
"size": 267430
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 428,079 |
private void fillLevelTreeMap(Map<String, LevelTree> rightsMap, XWikiDocument preferences,
List<String> levelsToMatch, boolean global, boolean direct, XWikiContext context) throws XWikiException
{
List<String> levelInherited = null;
if (levelsToMatch == null) {
levelInherited... | void function(Map<String, LevelTree> rightsMap, XWikiDocument preferences, List<String> levelsToMatch, boolean global, boolean direct, XWikiContext context) throws XWikiException { List<String> levelInherited = null; if (levelsToMatch == null) { levelInherited = new ArrayList<String>(); } if (!preferences.isNew()) { St... | /**
* Fill the {@link LevelTree} {@link Map}.
*
* @param rightsMap the {@link LevelTree} {@link Map} to fill.
* @param preferences the document containing rights preferences.
* @param levelsToMatch the levels names to check ("view", "edit", etc.).
* @param global indicate it is global rig... | Fill the <code>LevelTree</code> <code>Map</code> | fillLevelTreeMap | {
"repo_name": "xwiki-labs/sankoreorg",
"path": "xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/plugin/rightsmanager/RightsManager.java",
"license": "lgpl-2.1",
"size": 50867
} | [
"com.xpn.xwiki.XWikiContext",
"com.xpn.xwiki.XWikiException",
"com.xpn.xwiki.doc.XWikiDocument",
"com.xpn.xwiki.objects.BaseObject",
"com.xpn.xwiki.plugin.rightsmanager.utils.LevelTree",
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.objects.BaseObject; import com.xpn.xwiki.plugin.rightsmanager.utils.LevelTree; import java.util.ArrayList; import java.util.List; import java.util.Map; | import com.xpn.xwiki.*; import com.xpn.xwiki.doc.*; import com.xpn.xwiki.objects.*; import com.xpn.xwiki.plugin.rightsmanager.utils.*; import java.util.*; | [
"com.xpn.xwiki",
"java.util"
] | com.xpn.xwiki; java.util; | 1,106,627 |
@Override
public final Align getAlign() {
return getValue(Property.ALIGN, Align.values(), defaultOptions.getAlign());
}
| final Align function() { return getValue(Property.ALIGN, Align.values(), defaultOptions.getAlign()); } | /**
* Returns the position of the label relative to the anchor point position and orientation.
*
* @return the position of the label relative to the anchor point position and orientation.
*/ | Returns the position of the label relative to the anchor point position and orientation | getAlign | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/datalabels/LabelItem.java",
"license": "apache-2.0",
"size": 61828
} | [
"org.pepstock.charba.client.datalabels.enums.Align"
] | import org.pepstock.charba.client.datalabels.enums.Align; | import org.pepstock.charba.client.datalabels.enums.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 429,095 |
public HashSet<String> getEphemerals(long sessionId) {
return dataTree.getEphemerals(sessionId);
} | HashSet<String> function(long sessionId) { return dataTree.getEphemerals(sessionId); } | /**
* the paths for ephemeral session id
* @param sessionId the session id for which paths match to
* @return the paths for a session id
*/ | the paths for ephemeral session id | getEphemerals | {
"repo_name": "sdw2330976/zookeeper-3.3.4-source",
"path": "zookeeper-release-3.3.4/src/java/main/org/apache/zookeeper/server/ZKDatabase.java",
"license": "apache-2.0",
"size": 16076
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 37,837 |
private String addDefaultProfile() {
String profile = System.getProperty("spring.profiles.active");
if (profile != null) {
log.info("Running with Spring profile(s) : {}", profile);
return profile;
}
log.warn("No Spring profile configured, running with default... | String function() { String profile = System.getProperty(STR); if (profile != null) { log.info(STR, profile); return profile; } log.warn(STR); return Constants.SPRING_PROFILE_DEVELOPMENT; } | /**
* Set a default profile if it has not been set.
* <p/>
* <p>
* Please use -Dspring.profiles.active=dev
* </p>
*/ | Set a default profile if it has not been set. Please use -Dspring.profiles.active=dev | addDefaultProfile | {
"repo_name": "MarcoCeccarini/teknoservice",
"path": "src/main/java/org/mce/teknoservice/ApplicationWebXml.java",
"license": "mit",
"size": 1316
} | [
"org.mce.teknoservice.config.Constants"
] | import org.mce.teknoservice.config.Constants; | import org.mce.teknoservice.config.*; | [
"org.mce.teknoservice"
] | org.mce.teknoservice; | 2,628,833 |
@Test
public void testNumberOfFields() {
List<Field> fields = IndexTestUtils.getFields(INDEX_NO_DESCRIPTION.getClass());
assertEquals(15, fields.size());
fields = IndexTestUtils.getFields(INDEX_WITH_DESCRIPTION.getClass());
assertEquals(15, fields.size());
} | void function() { List<Field> fields = IndexTestUtils.getFields(INDEX_NO_DESCRIPTION.getClass()); assertEquals(15, fields.size()); fields = IndexTestUtils.getFields(INDEX_WITH_DESCRIPTION.getClass()); assertEquals(15, fields.size()); } | /**
* Tests the number of fields in the index. Will pick up additions / removals.
*/ | Tests the number of fields in the index. Will pick up additions / removals | testNumberOfFields | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-FinancialTypes/src/test/java/com/opengamma/financial/security/index/EquityIndexTest.java",
"license": "apache-2.0",
"size": 3552
} | [
"java.lang.reflect.Field",
"java.util.List",
"org.testng.AssertJUnit"
] | import java.lang.reflect.Field; import java.util.List; import org.testng.AssertJUnit; | import java.lang.reflect.*; import java.util.*; import org.testng.*; | [
"java.lang",
"java.util",
"org.testng"
] | java.lang; java.util; org.testng; | 1,707,736 |
public static List<SBuildType> getOwnBuildTypes(SProject project) {
try {
return project.getOwnBuildTypes();
} catch (NoSuchMethodError ex){
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getBuildTypes();
}
} | static List<SBuildType> function(SProject project) { try { return project.getOwnBuildTypes(); } catch (NoSuchMethodError ex){ LOGGER.log(Level.INFO,ex.getMessage(),ex); return project.getBuildTypes(); } } | /**
* Finds builds that belong the referenced project. Uses new method getOwnBuildTypes() if available.
* Does not find builds in sub-projects.
* @param project
* @return List of BuildTypes corresponding to what is configured in the project.
*/ | Finds builds that belong the referenced project. Uses new method getOwnBuildTypes() if available. Does not find builds in sub-projects | getOwnBuildTypes | {
"repo_name": "PeteGoo/tcSlackBuildNotifier",
"path": "tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/TeamCityIdResolver.java",
"license": "mit",
"size": 4030
} | [
"java.util.List",
"java.util.logging.Level"
] | import java.util.List; import java.util.logging.Level; | import java.util.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 397,676 |
public void refresh() {
final String json = JsonUtil.load(JsonUtil.MARQUES_PAGE_PATH);
final Gson gson = Constantes.GSON;
listMarquesPage.clear();
@SuppressWarnings("unchecked")
final List<MarquePage> marquesPages = gson.fromJson(json, List.class);
if (marquesPages != null) {
listMarquesPage.ad... | void function() { final String json = JsonUtil.load(JsonUtil.MARQUES_PAGE_PATH); final Gson gson = Constantes.GSON; listMarquesPage.clear(); @SuppressWarnings(STR) final List<MarquePage> marquesPages = gson.fromJson(json, List.class); if (marquesPages != null) { listMarquesPage.addAll(marquesPages); } } | /**
* Permet de raffraichir les donnees
*/ | Permet de raffraichir les donnees | refresh | {
"repo_name": "Mastersnes/AEFerrets",
"path": "src/main/java/bdd/MarquesPageDAO.java",
"license": "apache-2.0",
"size": 1136
} | [
"com.google.gson.Gson",
"java.util.List"
] | import com.google.gson.Gson; import java.util.List; | import com.google.gson.*; import java.util.*; | [
"com.google.gson",
"java.util"
] | com.google.gson; java.util; | 202,182 |
public Insets getEdgeInsets() {
return edgeInsets;
} | Insets function() { return edgeInsets; } | /**
* Get the bounds insets
*
* @return the bounds insets
*/ | Get the bounds insets | getEdgeInsets | {
"repo_name": "JonathanGeoffroy/RoundTripModeler",
"path": "src/main/java/opl/modeler/panels/ComponentMover.java",
"license": "gpl-2.0",
"size": 8960
} | [
"java.awt.Insets"
] | import java.awt.Insets; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,894,166 |
@Transactional(readOnly = true)
public PlatformType findPlatformTypeByName(String type) throws PlatformNotFoundException {
PlatformType ptype = platformTypeDAO.findByName(type);
if (ptype == null) {
throw new PlatformNotFoundException(type);
}
return ptype;
} | @Transactional(readOnly = true) PlatformType function(String type) throws PlatformNotFoundException { PlatformType ptype = platformTypeDAO.findByName(type); if (ptype == null) { throw new PlatformNotFoundException(type); } return ptype; } | /**
* Find a platform type by name
*
* @param type - name of the platform type
* @return platformTypeValue
*
*/ | Find a platform type by name | findPlatformTypeByName | {
"repo_name": "cc14514/hq6",
"path": "hq-server/src/main/java/org/hyperic/hq/appdef/server/session/PlatformManagerImpl.java",
"license": "unlicense",
"size": 81973
} | [
"org.hyperic.hq.appdef.shared.PlatformNotFoundException",
"org.springframework.transaction.annotation.Transactional"
] | import org.hyperic.hq.appdef.shared.PlatformNotFoundException; import org.springframework.transaction.annotation.Transactional; | import org.hyperic.hq.appdef.shared.*; import org.springframework.transaction.annotation.*; | [
"org.hyperic.hq",
"org.springframework.transaction"
] | org.hyperic.hq; org.springframework.transaction; | 1,155,705 |
public void checkUserLogIn(final String mail, final String password) {
AsyncHttpClient client = new AsyncHttpClient();
RequestParams params = new RequestParams();
params.put("email", mail);
params.put("password", password);
Log.i("LOGIN check", mail);
//lock screen ... | void function(final String mail, final String password) { AsyncHttpClient client = new AsyncHttpClient(); RequestParams params = new RequestParams(); params.put("email", mail); params.put(STR, password); Log.i(STR, mail); int currentOrientation = getResources().getConfiguration().orientation; if (currentOrientation == ... | /**
* check if user is already register in remote database
*/ | check if user is already register in remote database | checkUserLogIn | {
"repo_name": "kikitsa/csd-Thesis",
"path": "app/src/main/java/kiki__000/walkingstoursapp/LogIn.java",
"license": "mit",
"size": 7960
} | [
"android.content.pm.ActivityInfo",
"android.content.res.Configuration",
"android.util.Log",
"com.loopj.android.http.AsyncHttpClient",
"com.loopj.android.http.RequestParams"
] | import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.util.Log; import com.loopj.android.http.AsyncHttpClient; import com.loopj.android.http.RequestParams; | import android.content.pm.*; import android.content.res.*; import android.util.*; import com.loopj.android.http.*; | [
"android.content",
"android.util",
"com.loopj.android"
] | android.content; android.util; com.loopj.android; | 2,873,842 |
@Test
public void testSurplusResourcesAreBufferedUnderAnyHost() throws Exception {
containerAllocator.requestResources(new HashMap<String, String>() {
{
put("0", "abc");
put("1", "xyz");
}
});
assertNotNull(requestState.getResourcesOnAHost("abc"));
assertEquals(0, reques... | void function() throws Exception { containerAllocator.requestResources(new HashMap<String, String>() { { put("0", "abc"); put("1", "xyz"); } }); assertNotNull(requestState.getResourcesOnAHost("abc")); assertEquals(0, requestState.getResourcesOnAHost("abc").size()); assertNotNull(requestState.getResourcesOnAHost("xyz"))... | /**
* Test that extra resources are buffered under ANY_HOST
*/ | Test that extra resources are buffered under ANY_HOST | testSurplusResourcesAreBufferedUnderAnyHost | {
"repo_name": "fredji97/samza",
"path": "samza-core/src/test/java/org/apache/samza/clustermanager/TestHostAwareContainerAllocator.java",
"license": "apache-2.0",
"size": 18638
} | [
"java.util.HashMap",
"org.junit.Assert"
] | import java.util.HashMap; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 983,981 |
@Test
public void testWithoutZKServer() throws Exception {
try {
new ActiveStandbyElector("127.0.0.1", 2000, ZK_PARENT_NAME,
Ids.OPEN_ACL_UNSAFE, Collections.<ZKAuthInfo> emptyList(), mockApp);
Assert.fail("Did not throw zookeeper connection loss exceptions!");
} catch (KeeperException... | void function() throws Exception { try { new ActiveStandbyElector(STR, 2000, ZK_PARENT_NAME, Ids.OPEN_ACL_UNSAFE, Collections.<ZKAuthInfo> emptyList(), mockApp); Assert.fail(STR); } catch (KeeperException ke) { GenericTestUtils.assertExceptionContains( STR, ke); } } | /**
* verify the zookeeper connection establishment
*/ | verify the zookeeper connection establishment | testWithoutZKServer | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ha/TestActiveStandbyElector.java",
"license": "apache-2.0",
"size": 27834
} | [
"java.util.Collections",
"org.apache.hadoop.test.GenericTestUtils",
"org.apache.hadoop.util.ZKUtil",
"org.apache.zookeeper.KeeperException",
"org.apache.zookeeper.ZooDefs",
"org.junit.Assert"
] | import java.util.Collections; import org.apache.hadoop.test.GenericTestUtils; import org.apache.hadoop.util.ZKUtil; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.ZooDefs; import org.junit.Assert; | import java.util.*; import org.apache.hadoop.test.*; import org.apache.hadoop.util.*; import org.apache.zookeeper.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.apache.zookeeper",
"org.junit"
] | java.util; org.apache.hadoop; org.apache.zookeeper; org.junit; | 1,957,714 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<AgentPoolInner>> getWithResponseAsync(
String resourceGroupName, String resourceName, String agentPoolName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalA... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<AgentPoolInner>> function( String resourceGroupName, String resourceName, String agentPoolName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .erro... | /**
* Gets the details of the agent pool by managed cluster and resource group.
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param agentPoolName The name of the agent pool.
* @throws IllegalArgumentException... | Gets the details of the agent pool by managed cluster and resource group | getWithResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/AgentPoolsClientImpl.java",
"license": "mit",
"size": 70622
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.containerservice.fluent.models.AgentPoolInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.containerservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 587,642 |
public static void rmdir( File dir ) {
if( dir != null ) {
for( File file : JAVA.iterable( dir.listFiles() ) ) {
if( file.isDirectory() ) {
rmdir( file );
}
else {
file.delete();
}
}
dir.delete();
}
} | static void function( File dir ) { if( dir != null ) { for( File file : JAVA.iterable( dir.listFiles() ) ) { if( file.isDirectory() ) { rmdir( file ); } else { file.delete(); } } dir.delete(); } } | /**
* Delete directory and all files and subdirectories
*
* @param dir Directory to delete
*
*/ | Delete directory and all files and subdirectories | rmdir | {
"repo_name": "elelpublic/tablestream",
"path": "src/main/java/com/infodesire/commons/FILE.java",
"license": "lgpl-2.1",
"size": 3208
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,254,420 |
public char getNextOpt() throws ParseException
{
if (mArgNum >= mArgs.length) return EndOfOpts;
int offset = 1;
mVal = null;
try {
String arg = mArgs[mArgNum];
// If it doesn't start with a dash, we'll assume we've reached the end of the
// arguments. We need to decrement mArgN... | char function() throws ParseException { if (mArgNum >= mArgs.length) return EndOfOpts; int offset = 1; mVal = null; try { String arg = mArgs[mArgNum]; if (arg.charAt(0) != '-') { mArgNum--; return EndOfOpts; } for (int i = 1; i < arg.length() && arg.charAt(i) == '-'; i++) offset++; if (offset == arg.length()) return En... | /**
* Get the next option.
* @return The short designator for the next argument. If there are no more arguments
* than the special designator CmdLineParser.EndOfOpts will be returned.
* @throws ParseException if an unknown option is found or an option that
* expects a value does not have one or a value that does ... | Get the next option | getNextOpt | {
"repo_name": "billywatson/pig",
"path": "src/org/apache/pig/tools/cmdline/CmdLineParser.java",
"license": "apache-2.0",
"size": 7155
} | [
"java.lang.AssertionError",
"java.text.ParseException"
] | import java.lang.AssertionError; import java.text.ParseException; | import java.lang.*; import java.text.*; | [
"java.lang",
"java.text"
] | java.lang; java.text; | 862,782 |
@Override
@Generated(value = "com.sun.tools.xjc.Driver", date = "2014-09-19T03:09:39-06:00", comment = "JAXB RI v2.2.6")
public String toString() {
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE);
} | @Generated(value = STR, date = STR, comment = STR) String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "angecab10/travelport-uapi-tutorial",
"path": "src/com/travelport/schema/hotel_v29_0/RatesAndDates.java",
"license": "gpl-3.0",
"size": 7004
} | [
"javax.annotation.Generated",
"org.apache.commons.lang.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import javax.annotation.Generated; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import javax.annotation.*; import org.apache.commons.lang.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"javax.annotation",
"org.apache.commons",
"org.apache.cxf"
] | javax.annotation; org.apache.commons; org.apache.cxf; | 1,880,515 |
public void setSignalNames (List<String> signalNames)
{
this.signalNames = signalNames;
} | void function (List<String> signalNames) { this.signalNames = signalNames; } | /**
* Metoda postavlja novi set imena signala
*
* @param signalNames Nove set imena signala
*/ | Metoda postavlja novi set imena signala | setSignalNames | {
"repo_name": "mbezjak/vhdllab",
"path": "vhdllab-client/src/main/java/hr/fer/zemris/vhdllab/applets/simulations/SignalNamesPanel.java",
"license": "apache-2.0",
"size": 12209
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 24,093 |
public String[] getAttributes(String name, AttributeHeader header, int rowid)
throws Exception
{
String[] result = null;
String query = String.format("SELECT %s FROM \"%s\" WHERE ROWID=?",
header.getComaNameColumns(true, false), name);
Stmt stmt = db.... | String[] function(String name, AttributeHeader header, int rowid) throws Exception { String[] result = null; String query = String.format(STR%s\STR, header.getComaNameColumns(true, false), name); Stmt stmt = db.prepare(query); stmt.bind(1, rowid); if(stmt.step()) { int count = header.getCountColumns(); result = new Str... | /**
* get attributes of one object
* @param name
* @param header
* @param rowid
* @return
* @throws Exception
*/ | get attributes of one object | getAttributes | {
"repo_name": "Jules-/terraingis",
"path": "src/TerrainGIS/src/cz/kalcik/vojta/terraingis/io/SpatiaLiteIO.java",
"license": "gpl-3.0",
"size": 28193
} | [
"cz.kalcik.vojta.terraingis.layer.AttributeHeader"
] | import cz.kalcik.vojta.terraingis.layer.AttributeHeader; | import cz.kalcik.vojta.terraingis.layer.*; | [
"cz.kalcik.vojta"
] | cz.kalcik.vojta; | 1,406,447 |
private void createTreeLibsControlTab() {
Composite parent;
GridData gd;
TabItem tabItem = new TabItem(tabFolder, SWT.None);
tabItem.setText("Libraries");
tabItem.setImage(imageSystemLibRoot);
Composite composite = new Composite(tabFolder, SWT.None);
parent =... | void function() { Composite parent; GridData gd; TabItem tabItem = new TabItem(tabFolder, SWT.None); tabItem.setText(STR); tabItem.setImage(imageSystemLibRoot); Composite composite = new Composite(tabFolder, SWT.None); parent = composite; composite.setLayout(new GridLayout(2, false)); Label l1 = new Label(parent, SWT.N... | /**
* Creates tab to show the pythonpath (libraries)
*/ | Creates tab to show the pythonpath (libraries) | createTreeLibsControlTab | {
"repo_name": "RandallDW/Aruba_plugin",
"path": "plugins/org.python.pydev/src/org/python/pydev/ui/pythonpathconf/AbstractInterpreterEditor.java",
"license": "epl-1.0",
"size": 44153
} | [
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.Label",
"org.eclipse.swt.widgets.TabItem"
] | import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.TabItem; | import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 913,752 |
private static boolean isCodecUsableDecoder(MediaCodecInfo info, String name,
boolean secureDecodersExplicit) {
if (info.isEncoder() || (!secureDecodersExplicit && name.endsWith(".secure"))) {
return false;
}
// Work around broken audio decoders.
if (Util.SDK_INT < 21
&& ("CIPAACD... | static boolean function(MediaCodecInfo info, String name, boolean secureDecodersExplicit) { if (info.isEncoder() (!secureDecodersExplicit && name.endsWith(STR))) { return false; } if (Util.SDK_INT < 21 && (STR.equals(name) STR.equals(name) STR.equals(name) STR.equals(name) STR.equals(name))) { return false; } if (Util.... | /**
* Returns whether the specified codec is usable for decoding on the current device.
*/ | Returns whether the specified codec is usable for decoding on the current device | isCodecUsableDecoder | {
"repo_name": "DigitalLabApp/Gramy",
"path": "Telegram-master/TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/MediaCodecUtil.java",
"license": "gpl-2.0",
"size": 19636
} | [
"android.media.MediaCodecInfo",
"org.telegram.messenger.exoplayer.util.Util"
] | import android.media.MediaCodecInfo; import org.telegram.messenger.exoplayer.util.Util; | import android.media.*; import org.telegram.messenger.exoplayer.util.*; | [
"android.media",
"org.telegram.messenger"
] | android.media; org.telegram.messenger; | 2,109,146 |
@Test
public void updateAll() throws Exception {
if (normaltblTableName.startsWith("ob")) {
// ob不支持批量更新
return;
}
String sql = "UPDATE " + normaltblTableName
+ " SET id=?,gmt_create=?,gmt_timestamp=?,gmt_datetime=?,name=?,floatCol=?";
... | void function() throws Exception { if (normaltblTableName.startsWith("ob")) { return; } String sql = STR + normaltblTableName + STR; List<List<Object>> params = new ArrayList(); for (int i = 0; i < 50; i++) { List<Object> param = new ArrayList<Object>(); param.add(9999); param.add(gmtDay); param.add(gmt); param.add(gmt... | /**
* update all records
*
* @author zhuoxue
* @since 5.0.1
*/ | update all records | updateAll | {
"repo_name": "xloye/tddl5",
"path": "tddl-qatest/src/test/java/com/taobao/tddl/qatest/matrix/basecrud/BatchUpdateTest.java",
"license": "apache-2.0",
"size": 8491
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,392,678 |
public List getSectionXmlList(Assessment assessmentXml)
{
List nodeList = assessmentXml.selectNodes("//section");
List sectionXmlList = new ArrayList();
// now convert our list of Nodes to a list of section xml
for (int i = 0; i < nodeList.size(); i++)
{
try
{
Node node = (N... | List function(Assessment assessmentXml) { List nodeList = assessmentXml.selectNodes(" List sectionXmlList = new ArrayList(); for (int i = 0; i < nodeList.size(); i++) { try { Node node = (Node) nodeList.get(i); Document sectionDoc = XmlUtil.createDocument(); Node importNode = sectionDoc.importNode(node, true); sectionD... | /**
* Look up a List of Section XML from Assessment Xml
* @return a List of Section XML objects
*/ | Look up a List of Section XML from Assessment Xml | getSectionXmlList | {
"repo_name": "ktakacs/sakai",
"path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/helper/ExtractionHelper.java",
"license": "apache-2.0",
"size": 113505
} | [
"java.util.ArrayList",
"java.util.List",
"org.sakaiproject.tool.assessment.qti.asi.Assessment",
"org.sakaiproject.tool.assessment.qti.asi.Section",
"org.sakaiproject.tool.assessment.qti.util.XmlUtil",
"org.w3c.dom.DOMException",
"org.w3c.dom.Document",
"org.w3c.dom.Node"
] | import java.util.ArrayList; import java.util.List; import org.sakaiproject.tool.assessment.qti.asi.Assessment; import org.sakaiproject.tool.assessment.qti.asi.Section; import org.sakaiproject.tool.assessment.qti.util.XmlUtil; import org.w3c.dom.DOMException; import org.w3c.dom.Document; import org.w3c.dom.Node; | import java.util.*; import org.sakaiproject.tool.assessment.qti.asi.*; import org.sakaiproject.tool.assessment.qti.util.*; import org.w3c.dom.*; | [
"java.util",
"org.sakaiproject.tool",
"org.w3c.dom"
] | java.util; org.sakaiproject.tool; org.w3c.dom; | 699,197 |
void releaseContextualSearchContentViewCore();
}
/**
* The delegate that is responsible for promoting a {@link ContentViewCore} to a {@link Tab} | void releaseContextualSearchContentViewCore(); } /** * The delegate that is responsible for promoting a {@link ContentViewCore} to a {@link Tab} | /**
* Releases the {@code ContentViewCore} associated to the Contextual Search Panel.
*/ | Releases the ContentViewCore associated to the Contextual Search Panel | releaseContextualSearchContentViewCore | {
"repo_name": "Pluto-tv/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java",
"license": "bsd-3-clause",
"size": 57913
} | [
"org.chromium.chrome.browser.tab.Tab",
"org.chromium.content.browser.ContentViewCore"
] | import org.chromium.chrome.browser.tab.Tab; import org.chromium.content.browser.ContentViewCore; | import org.chromium.chrome.browser.tab.*; import org.chromium.content.browser.*; | [
"org.chromium.chrome",
"org.chromium.content"
] | org.chromium.chrome; org.chromium.content; | 2,801,051 |
protected void assertHeavyHitterPresent(String heavyHitterOpCode) {
Set<String> heavyHitterOpCodes = Statistics.getCPHeavyHitterOpCodes();
Assert.assertTrue(heavyHitterOpCodes.contains(heavyHitterOpCode));
}
/**
* Runs a program on the CPU
*
* @param spark a valid {@link SparkSession} | void function(String heavyHitterOpCode) { Set<String> heavyHitterOpCodes = Statistics.getCPHeavyHitterOpCodes(); Assert.assertTrue(heavyHitterOpCodes.contains(heavyHitterOpCode)); } /** * Runs a program on the CPU * * @param spark a valid {@link SparkSession} | /**
* asserts that the expected op was executed
*
* @param heavyHitterOpCode opcode of the heavy hitter for the unary op
*/ | asserts that the expected op was executed | assertHeavyHitterPresent | {
"repo_name": "asurve/arvind-sysml2",
"path": "src/test/java/org/apache/sysml/test/gpu/GPUTests.java",
"license": "apache-2.0",
"size": 12954
} | [
"java.util.Set",
"org.apache.spark.sql.SparkSession",
"org.apache.sysml.utils.Statistics",
"org.junit.Assert"
] | import java.util.Set; import org.apache.spark.sql.SparkSession; import org.apache.sysml.utils.Statistics; import org.junit.Assert; | import java.util.*; import org.apache.spark.sql.*; import org.apache.sysml.utils.*; import org.junit.*; | [
"java.util",
"org.apache.spark",
"org.apache.sysml",
"org.junit"
] | java.util; org.apache.spark; org.apache.sysml; org.junit; | 419,249 |
@Test
public void testCacheTTLMatcherAttribute() throws Exception {
final IvySettings settings = new IvySettings();
settings.setBaseDir(new File("test/base/dir"));
final XmlSettingsParser parser = new XmlSettingsParser(settings);
parser.parse(XmlSettingsParserTest.class.getResour... | void function() throws Exception { final IvySettings settings = new IvySettings(); settings.setBaseDir(new File(STR)); final XmlSettingsParser parser = new XmlSettingsParser(settings); parser.parse(XmlSettingsParserTest.class.getResource(STR)); final DefaultRepositoryCacheManager cacheManager = (DefaultRepositoryCacheM... | /**
* Test case for IVY-1495.
* <code><ttl></code> containing the <code>matcher</code> attribute,
* in an ivy settings file, must work as expected.
*
* @throws Exception if something goes wrong
* @see <a href="https://issues.apache.org/jira/browse/IVY-1495">IVY-1495</a>
*/ | Test case for IVY-1495. <code><ttl></code> containing the <code>matcher</code> attribute, in an ivy settings file, must work as expected | testCacheTTLMatcherAttribute | {
"repo_name": "apache/ant-ivy",
"path": "test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java",
"license": "apache-2.0",
"size": 37820
} | [
"java.io.File",
"org.apache.ivy.core.cache.DefaultRepositoryCacheManager",
"org.apache.ivy.core.module.id.ModuleId",
"org.apache.ivy.core.module.id.ModuleRevisionId",
"org.junit.Assert"
] | import java.io.File; import org.apache.ivy.core.cache.DefaultRepositoryCacheManager; import org.apache.ivy.core.module.id.ModuleId; import org.apache.ivy.core.module.id.ModuleRevisionId; import org.junit.Assert; | import java.io.*; import org.apache.ivy.core.cache.*; import org.apache.ivy.core.module.id.*; import org.junit.*; | [
"java.io",
"org.apache.ivy",
"org.junit"
] | java.io; org.apache.ivy; org.junit; | 2,868,540 |
protected Match createMatchFromPacket(IOFSwitch sw, OFPort inPort, FloodlightContext cntx) {
// The packet in match will only contain the port number.
// We need to add in specifics for the hosts we're routing between.
Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTE... | Match function(IOFSwitch sw, OFPort inPort, FloodlightContext cntx) { Ethernet eth = IFloodlightProviderService.bcStore.get(cntx, IFloodlightProviderService.CONTEXT_PI_PAYLOAD); VlanVid vlan = VlanVid.ofVlan(eth.getVlanID()); MacAddress srcMac = eth.getSourceMACAddress(); MacAddress dstMac = eth.getDestinationMACAddres... | /**
* Instead of using the Firewall's routing decision Match, which might be as general
* as "in_port" and inadvertently Match packets erroneously, construct a more
* specific Match based on the deserialized OFPacketIn's payload, which has been
* placed in the FloodlightContext already by the Controller.
*
... | Instead of using the Firewall's routing decision Match, which might be as general as "in_port" and inadvertently Match packets erroneously, construct a more specific Match based on the deserialized OFPacketIn's payload, which has been placed in the FloodlightContext already by the Controller | createMatchFromPacket | {
"repo_name": "Pengfei-Lu/floodlight",
"path": "src/main/java/net/floodlightcontroller/forwarding/Forwarding.java",
"license": "apache-2.0",
"size": 22534
} | [
"net.floodlightcontroller.core.FloodlightContext",
"net.floodlightcontroller.core.IFloodlightProviderService",
"net.floodlightcontroller.core.IOFSwitch",
"net.floodlightcontroller.packet.Ethernet",
"net.floodlightcontroller.packet.IPv4",
"net.floodlightcontroller.packet.IPv6",
"org.projectfloodlight.ope... | import net.floodlightcontroller.core.FloodlightContext; import net.floodlightcontroller.core.IFloodlightProviderService; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.packet.Ethernet; import net.floodlightcontroller.packet.IPv4; import net.floodlightcontroller.packet.IPv6; import org.p... | import net.floodlightcontroller.core.*; import net.floodlightcontroller.packet.*; import org.projectfloodlight.openflow.protocol.match.*; import org.projectfloodlight.openflow.types.*; | [
"net.floodlightcontroller.core",
"net.floodlightcontroller.packet",
"org.projectfloodlight.openflow"
] | net.floodlightcontroller.core; net.floodlightcontroller.packet; org.projectfloodlight.openflow; | 1,707,678 |
protected boolean isTreeHandleEventType(MouseEvent e) {
switch (e.getID()) {
case MouseEvent.MOUSE_CLICKED:
case MouseEvent.MOUSE_PRESSED:
case MouseEvent.MOUSE_RELEASED:
return !e.isPopupTrigger();
}
return false;
} | boolean function(MouseEvent e) { switch (e.getID()) { case MouseEvent.MOUSE_CLICKED: case MouseEvent.MOUSE_PRESSED: case MouseEvent.MOUSE_RELEASED: return !e.isPopupTrigger(); } return false; } | /**
* Filter to find mouse events that are candidates for node expansion/
* collapse. MOUSE_PRESSED and MOUSE_RELEASED are used by default UIs.
* MOUSE_CLICKED is included as it may be used by a custom UI.
*
* @param e the currently dispatching mouse event
* @retur... | Filter to find mouse events that are candidates for node expansion collapse. MOUSE_PRESSED and MOUSE_RELEASED are used by default UIs. MOUSE_CLICKED is included as it may be used by a custom UI | isTreeHandleEventType | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/main/java/org/jdesktop/swingx/JXTreeTable.java",
"license": "lgpl-2.1",
"size": 132592
} | [
"java.awt.event.MouseEvent"
] | import java.awt.event.MouseEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 2,617,207 |
protected void addStepPerformanceSnapShot() {
if ( stepPerformanceSnapShots == null ) {
return; // Race condition somewhere?
}
boolean pausedAndNotEmpty = isPaused() && !stepPerformanceSnapShots.isEmpty();
boolean stoppedAndNotEmpty = isStopped() && !stepPerformanceSnapShots.isEmpty();
if... | void function() { if ( stepPerformanceSnapShots == null ) { return; } boolean pausedAndNotEmpty = isPaused() && !stepPerformanceSnapShots.isEmpty(); boolean stoppedAndNotEmpty = isStopped() && !stepPerformanceSnapShots.isEmpty(); if ( transMeta.isCapturingStepPerformanceSnapShots() && !pausedAndNotEmpty && !stoppedAndN... | /**
* Adds a step performance snapshot.
*/ | Adds a step performance snapshot | addStepPerformanceSnapShot | {
"repo_name": "tmcsantos/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199612
} | [
"java.util.ArrayList",
"java.util.Date",
"java.util.List",
"org.pentaho.di.trans.performance.StepPerformanceSnapShot",
"org.pentaho.di.trans.step.StepInterface",
"org.pentaho.di.trans.step.StepMeta"
] | import java.util.ArrayList; import java.util.Date; import java.util.List; import org.pentaho.di.trans.performance.StepPerformanceSnapShot; import org.pentaho.di.trans.step.StepInterface; import org.pentaho.di.trans.step.StepMeta; | import java.util.*; import org.pentaho.di.trans.performance.*; import org.pentaho.di.trans.step.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 1,157,849 |
public void _testUpdateLoadedWithImplicitDependency() throws Exception {
AuraContext context = Aura.getContextService().startContext(Mode.PROD, Format.JSON,
Authentication.AUTHENTICATED,
laxSecurityApp);
DefDescriptor<?> depDesc = addSourceAutoCleanup(ComponentDef.cla... | void function() throws Exception { AuraContext context = Aura.getContextService().startContext(Mode.PROD, Format.JSON, Authentication.AUTHENTICATED, laxSecurityApp); DefDescriptor<?> depDesc = addSourceAutoCleanup(ComponentDef.class, String.format(baseComponentTag, STRSTRSTR<%s/>STRParent should not be loaded initially... | /**
* Dependencies should be added to loaded set during updateLoaded.
*/ | Dependencies should be added to loaded set during updateLoaded | _testUpdateLoadedWithImplicitDependency | {
"repo_name": "TribeMedia/aura",
"path": "aura-integration-test/src/test/java/org/auraframework/integration/test/service/DefinitionServiceImplTest.java",
"license": "apache-2.0",
"size": 42712
} | [
"org.auraframework.Aura",
"org.auraframework.def.ComponentDef",
"org.auraframework.def.DefDescriptor",
"org.auraframework.system.AuraContext"
] | import org.auraframework.Aura; import org.auraframework.def.ComponentDef; import org.auraframework.def.DefDescriptor; import org.auraframework.system.AuraContext; | import org.auraframework.*; import org.auraframework.def.*; import org.auraframework.system.*; | [
"org.auraframework",
"org.auraframework.def",
"org.auraframework.system"
] | org.auraframework; org.auraframework.def; org.auraframework.system; | 2,260,707 |
public static UTMCoordinate MGRSToUTM(String mgrutm) {
MGRSCoordConverter cnv = new MGRSCoordConverter();
UTMCoord utm = cnv.convertMGRSToUTM(mgrutm, defaultUTMZones);
if(utm == null) return null;
int half = (int) Math.pow(10, (5 - utm.getMGRS().precision)) / 2;
Precision prec = new Precision();
prec.set... | static UTMCoordinate function(String mgrutm) { MGRSCoordConverter cnv = new MGRSCoordConverter(); UTMCoord utm = cnv.convertMGRSToUTM(mgrutm, defaultUTMZones); if(utm == null) return null; int half = (int) Math.pow(10, (5 - utm.getMGRS().precision)) / 2; Precision prec = new Precision(); prec.setSquare(half * 2); retur... | /**
* Converts a MGRS string to the center point UTM coordinates and respective precision.
* @param mgrutm
* @return
*/ | Converts a MGRS string to the center point UTM coordinates and respective precision | MGRSToUTM | {
"repo_name": "miguel-porto/flora-on-server",
"path": "webadmin/src/main/java/pt/floraon/geometry/CoordinateConversion.java",
"license": "gpl-2.0",
"size": 14755
} | [
"pt.floraon.geometry.mgrs.MGRSCoordConverter",
"pt.floraon.geometry.mgrs.UTMCoord"
] | import pt.floraon.geometry.mgrs.MGRSCoordConverter; import pt.floraon.geometry.mgrs.UTMCoord; | import pt.floraon.geometry.mgrs.*; | [
"pt.floraon.geometry"
] | pt.floraon.geometry; | 2,752,483 |
int eatWhitespace()
throws IOException
{
int ch;
while (!isEOS(ch = _readStream.read())) {
if (!isWhitespace(ch)) {
_readStream.unread();
break;
}
}
return ch;
} | int eatWhitespace() throws IOException { int ch; while (!isEOS(ch = _readStream.read())) { if (!isWhitespace(ch)) { _readStream.unread(); break; } } return ch; } | /**
* Eat whitespace characters out of readStream
*
* @return the first non-whitespace character (which
* is still in the _readStream), or -1 if end of stream encountered.
*/ | Eat whitespace characters out of readStream | eatWhitespace | {
"repo_name": "dlitz/resin",
"path": "resin-doc/examples/custom-protocol/src/example/Parser.java",
"license": "gpl-2.0",
"size": 3128
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,002,175 |
public static Optional<Object> getData(OfflinePlayer player, String name) {
if (save.containsKey(player.getName())) {
return Optional.ofNullable(save.get(player.getName()).getOrDefault(name, null));
}
return Optional.empty();
}
| static Optional<Object> function(OfflinePlayer player, String name) { if (save.containsKey(player.getName())) { return Optional.ofNullable(save.get(player.getName()).getOrDefault(name, null)); } return Optional.empty(); } | /**
* Returns the data with the key <code>name</code> from <code>player</code>'s HashMap.
*
* @param player the player to check.
* @param name the key to grab.
*/ | Returns the data with the key <code>name</code> from <code>player</code>'s HashMap | getData | {
"repo_name": "bog500/SecurityBOG",
"path": "mc.securitybog/src/mc/securitybog/JUtility.java",
"license": "gpl-3.0",
"size": 5157
} | [
"java.util.Optional",
"org.bukkit.OfflinePlayer"
] | import java.util.Optional; import org.bukkit.OfflinePlayer; | import java.util.*; import org.bukkit.*; | [
"java.util",
"org.bukkit"
] | java.util; org.bukkit; | 2,900,424 |
@Test
public void testConvertScopeSetToScopeList() {
ScopeListDTO scopeListDTO = RestAPIStoreUtils.convertScopeSetToScopeList(null);
Assert.assertNull("Scope list was returned for a scope set of null", scopeListDTO);
Set<Scope> scopeSet = new LinkedHashSet<>();
scopeListDTO = Re... | void function() { ScopeListDTO scopeListDTO = RestAPIStoreUtils.convertScopeSetToScopeList(null); Assert.assertNull(STR, scopeListDTO); Set<Scope> scopeSet = new LinkedHashSet<>(); scopeListDTO = RestAPIStoreUtils.convertScopeSetToScopeList(scopeSet); Assert.assertNotNull(STR, scopeListDTO); Assert.assertEquals(STR, sc... | /**
* This method tests the behaviour of convertScopeSetToScopeList, under various conditions.
*/ | This method tests the behaviour of convertScopeSetToScopeList, under various conditions | testConvertScopeSetToScopeList | {
"repo_name": "nuwand/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/test/java/org/wso2/carbon/apimgt/rest/api/store/utils/RestAPIStoreUtilsTestCase.java",
"license": "apache-2.0",
"size": 9811
} | [
"java.util.LinkedHashSet",
"java.util.Set",
"org.junit.Assert",
"org.wso2.carbon.apimgt.api.model.Scope",
"org.wso2.carbon.apimgt.rest.api.store.dto.ScopeListDTO"
] | import java.util.LinkedHashSet; import java.util.Set; import org.junit.Assert; import org.wso2.carbon.apimgt.api.model.Scope; import org.wso2.carbon.apimgt.rest.api.store.dto.ScopeListDTO; | import java.util.*; import org.junit.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.rest.api.store.dto.*; | [
"java.util",
"org.junit",
"org.wso2.carbon"
] | java.util; org.junit; org.wso2.carbon; | 77,390 |
public ContentHandler getStub4TesttoolContentHandler(ContentHandler handler, Properties properties) throws IOException, TransformerConfigurationException {
if (Boolean.parseBoolean(properties.getProperty(ConfigurationUtils.STUB4TESTTOOL_CONFIGURATION_KEY,"false"))) {
Resource xslt = Resource.getResource(Configu... | ContentHandler function(ContentHandler handler, Properties properties) throws IOException, TransformerConfigurationException { if (Boolean.parseBoolean(properties.getProperty(ConfigurationUtils.STUB4TESTTOOL_CONFIGURATION_KEY,"false"))) { Resource xslt = Resource.getResource(ConfigurationUtils.STUB4TESTTOOL_XSLT); Tran... | /**
* Get the contenthandler to stub configurations
* If stubbing is disabled, the input ContentHandler is returned as-is
*/ | Get the contenthandler to stub configurations If stubbing is disabled, the input ContentHandler is returned as-is | getStub4TesttoolContentHandler | {
"repo_name": "ibissource/iaf",
"path": "core/src/main/java/nl/nn/adapterframework/configuration/ConfigurationDigester.java",
"license": "apache-2.0",
"size": 12942
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"java.util.Properties",
"javax.xml.transform.TransformerConfigurationException",
"nl.nn.adapterframework.core.Resource",
"nl.nn.adapterframework.util.TransformerPool",
"nl.nn.adapterframework.util.XmlUtils",
"nl.nn.adapterframework.xml.Tra... | import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Properties; import javax.xml.transform.TransformerConfigurationException; import nl.nn.adapterframework.core.Resource; import nl.nn.adapterframework.util.TransformerPool; import nl.nn.adapterframework.util.XmlUtils; import nl.n... | import java.io.*; import java.util.*; import javax.xml.transform.*; import nl.nn.adapterframework.core.*; import nl.nn.adapterframework.util.*; import nl.nn.adapterframework.xml.*; import org.xml.sax.*; | [
"java.io",
"java.util",
"javax.xml",
"nl.nn.adapterframework",
"org.xml.sax"
] | java.io; java.util; javax.xml; nl.nn.adapterframework; org.xml.sax; | 1,781,251 |
public static String getNamenodeLifelineAddr(final Configuration conf,
String nsId, String nnId) {
if (nsId == null) {
nsId = getOnlyNameServiceIdOrNull(conf);
}
String lifelineAddrKey = DFSUtilClient.concatSuffixes(
DFSConfigKeys.DFS_NAMENODE_LIFELINE_RPC_ADDRESS_KEY, nsId, nnId);
... | static String function(final Configuration conf, String nsId, String nnId) { if (nsId == null) { nsId = getOnlyNameServiceIdOrNull(conf); } String lifelineAddrKey = DFSUtilClient.concatSuffixes( DFSConfigKeys.DFS_NAMENODE_LIFELINE_RPC_ADDRESS_KEY, nsId, nnId); return conf.get(lifelineAddrKey); } | /**
* Map a logical namenode ID to its lifeline address. Use the given
* nameservice if specified, or the configured one if none is given.
*
* @param conf Configuration
* @param nsId which nameservice nnId is a part of, optional
* @param nnId the namenode ID to get the service addr for
* @return t... | Map a logical namenode ID to its lifeline address. Use the given nameservice if specified, or the configured one if none is given | getNamenodeLifelineAddr | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java",
"license": "apache-2.0",
"size": 63202
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,642,326 |
IAddress getAddress(); | IAddress getAddress(); | /**
* Returns the start address of the basic block.
*
* @return The start address of the basic block.
*/ | Returns the start address of the basic block | getAddress | {
"repo_name": "chubbymaggie/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/INaviBasicBlock.java",
"license": "apache-2.0",
"size": 1384
} | [
"com.google.security.zynamics.zylib.disassembly.IAddress"
] | import com.google.security.zynamics.zylib.disassembly.IAddress; | import com.google.security.zynamics.zylib.disassembly.*; | [
"com.google.security"
] | com.google.security; | 2,391,573 |
InputStream getTenantTheme(int tenantId) throws APIManagementException; | InputStream getTenantTheme(int tenantId) throws APIManagementException; | /**
* Retrieves a tenant theme from the database
*
* @param tenantId tenant ID of user
* @return content of the tenant theme
* @throws APIManagementException if an error occurs when retrieving a tenant theme from the database
*/ | Retrieves a tenant theme from the database | getTenantTheme | {
"repo_name": "ruks/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIAdmin.java",
"license": "apache-2.0",
"size": 18053
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,533,045 |
private static Logger log = LoggerFactory.getLogger(MultiWindowSumKeyValTest.class);
@SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testNodeProcessing() throws InterruptedException
{
MultiWindowSumKeyVal<String, Integer> oper = new MultiWindowSumKeyVal<String, Integer>();
Collector... | static Logger log = LoggerFactory.getLogger(MultiWindowSumKeyValTest.class); @SuppressWarnings({ STR, STR }) public void function() throws InterruptedException { MultiWindowSumKeyVal<String, Integer> oper = new MultiWindowSumKeyVal<String, Integer>(); CollectorTestSink swinSink = new CollectorTestSink(); oper.sum.setSi... | /**
* Test functional logic
*/ | Test functional logic | testNodeProcessing | {
"repo_name": "siyuanh/apex-malhar",
"path": "library/src/test/java/com/datatorrent/lib/multiwindow/MultiWindowSumKeyValTest.java",
"license": "apache-2.0",
"size": 2280
} | [
"com.datatorrent.lib.testbench.CollectorTestSink",
"com.datatorrent.lib.util.KeyValPair",
"org.junit.Assert",
"org.slf4j.Logger",
"org.slf4j.LoggerFactory"
] | import com.datatorrent.lib.testbench.CollectorTestSink; import com.datatorrent.lib.util.KeyValPair; import org.junit.Assert; import org.slf4j.Logger; import org.slf4j.LoggerFactory; | import com.datatorrent.lib.testbench.*; import com.datatorrent.lib.util.*; import org.junit.*; import org.slf4j.*; | [
"com.datatorrent.lib",
"org.junit",
"org.slf4j"
] | com.datatorrent.lib; org.junit; org.slf4j; | 2,425,258 |
public List symmetryOperators() {
final List res = new ArrayList();
for (final Iterator iter = symmetries().iterator(); iter.hasNext();) {
res.add(((Morphism) iter.next()).getAffineOperator());
}
return res;
} | List function() { final List res = new ArrayList(); for (final Iterator iter = symmetries().iterator(); iter.hasNext();) { res.add(((Morphism) iter.next()).getAffineOperator()); } return res; } | /**
* Determines the affine operators associated to the periodic automorphisms
* of this periodic graph.
*
* @return the list of operators.
*/ | Determines the affine operators associated to the periodic automorphisms of this periodic graph | symmetryOperators | {
"repo_name": "BackupTheBerlios/gavrog",
"path": "src/org/gavrog/joss/pgraphs/basic/PeriodicGraph.java",
"license": "apache-2.0",
"size": 79927
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 334,614 |
public void performWeaving() throws URISyntaxException,MalformedURLException,IOException{
preProcess();
process();
} | void function() throws URISyntaxException,MalformedURLException,IOException{ preProcess(); process(); } | /**
* This method performs weaving function on the class individually from the specified source.
*/ | This method performs weaving function on the class individually from the specified source | performWeaving | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/tools/weaving/jpa/StaticWeaveProcessor.java",
"license": "epl-1.0",
"size": 16687
} | [
"java.io.IOException",
"java.net.MalformedURLException",
"java.net.URISyntaxException"
] | import java.io.IOException; import java.net.MalformedURLException; import java.net.URISyntaxException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,373,362 |
private static String sanitizeUrl(final String url) {
final Matcher m = NON_PRINTABLE.matcher(url);
final StringBuffer sb = new StringBuffer(url.length());
boolean hasNonPrintable = false;
while (m.find()) {
m.appendReplacement(sb, " ");
hasNonPrintable = true... | static String function(final String url) { final Matcher m = NON_PRINTABLE.matcher(url); final StringBuffer sb = new StringBuffer(url.length()); boolean hasNonPrintable = false; while (m.find()) { m.appendReplacement(sb, " "); hasNonPrintable = true; } m.appendTail(sb); if (hasNonPrintable) { LOGGER.warn(STR, url); } r... | /**
* Sanitize a URL provided by a relying party by normalizing non-printable
* ASCII character sequences into spaces. This functionality protects
* against CRLF attacks and other similar attacks using invisible characters
* that could be abused to trick user agents.
*
* @param url URL ... | Sanitize a URL provided by a relying party by normalizing non-printable ASCII character sequences into spaces. This functionality protects against CRLF attacks and other similar attacks using invisible characters that could be abused to trick user agents | sanitizeUrl | {
"repo_name": "gabedwrds/cas",
"path": "core/cas-server-core-services/src/main/java/org/apereo/cas/authentication/principal/DefaultResponse.java",
"license": "apache-2.0",
"size": 4412
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 921,951 |
default Optional<O> owner() {
return this.executor().map(GoalExecutor::owner);
} | default Optional<O> owner() { return this.executor().map(GoalExecutor::owner); } | /**
* Gets the {@link Agent} that owns this goal, if any.
*
* @return The owner or {@link Optional#empty()} if not present
*/ | Gets the <code>Agent</code> that owns this goal, if any | owner | {
"repo_name": "SpongePowered/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/entity/ai/goal/Goal.java",
"license": "mit",
"size": 4002
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 2,525,113 |
@Override
public Trace currentRpcTraceObject() {
final Trace trace = threadLocalBinder.get();
if (trace == null) {
return null;
}
return trace;
} | Trace function() { final Trace trace = threadLocalBinder.get(); if (trace == null) { return null; } return trace; } | /**
* Return Trace object without validating
* @return
*/ | Return Trace object without validating | currentRpcTraceObject | {
"repo_name": "philipz/pinpoint",
"path": "profiler/src/main/java/com/navercorp/pinpoint/profiler/context/ThreadLocalTraceFactory.java",
"license": "apache-2.0",
"size": 6524
} | [
"com.navercorp.pinpoint.bootstrap.context.Trace"
] | import com.navercorp.pinpoint.bootstrap.context.Trace; | import com.navercorp.pinpoint.bootstrap.context.*; | [
"com.navercorp.pinpoint"
] | com.navercorp.pinpoint; | 2,173,993 |
public Map<String, Map<MetricType, Long>> aggregate() {
Map<String, Map<MetricType, Long>> publishedMetrics = new HashMap<>();
for (Entry<String, MutationMetric> entry : tableMutationMetric.entrySet()) {
String tableName = entry.getKey();
MutationMetric metric = entry.getValu... | Map<String, Map<MetricType, Long>> function() { Map<String, Map<MetricType, Long>> publishedMetrics = new HashMap<>(); for (Entry<String, MutationMetric> entry : tableMutationMetric.entrySet()) { String tableName = entry.getKey(); MutationMetric metric = entry.getValue(); Map<MetricType, Long> publishedMetricsForTable ... | /**
* Publish the metrics to wherever you want them published. The internal state is cleared out after every publish.
* @return map of table name -> list of pair of (metric name, metric value)
*/ | Publish the metrics to wherever you want them published. The internal state is cleared out after every publish | aggregate | {
"repo_name": "ohadshacham/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/monitoring/MutationMetricQueue.java",
"license": "apache-2.0",
"size": 6086
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 939,426 |
@Test
public void testTrackNodeMultipleTimes() {
final NodeKeyResolver<ImmutableNode> resolver = createResolver();
model.trackNode(selector, resolver);
model.trackNode(selector, resolver);
model.untrackNode(selector);
assertNotNull("No tracked node", model.getTrackedNode(... | void function() { final NodeKeyResolver<ImmutableNode> resolver = createResolver(); model.trackNode(selector, resolver); model.trackNode(selector, resolver); model.untrackNode(selector); assertNotNull(STR, model.getTrackedNode(selector)); } | /**
* Tests whether a single node can be tracked multiple times.
*/ | Tests whether a single node can be tracked multiple times | testTrackNodeMultipleTimes | {
"repo_name": "apache/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/tree/TestInMemoryNodeModelTrackedNodes.java",
"license": "apache-2.0",
"size": 34423
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 832,456 |
private static int getNnz(CSRPointer inPointer, int rl, int ru) {
int[] rlPtr = { -1 }; int[] ruPtr = { -1 };
cudaMemcpy(Pointer.to(rlPtr), inPointer.rowPtr.withByteOffset(rl*Sizeof.INT), Sizeof.INT, cudaMemcpyDeviceToHost);
cudaMemcpy(Pointer.to(ruPtr), inPointer.rowPtr.withByteOffset((ru+1)*Sizeof.INT), Size... | static int function(CSRPointer inPointer, int rl, int ru) { int[] rlPtr = { -1 }; int[] ruPtr = { -1 }; cudaMemcpy(Pointer.to(rlPtr), inPointer.rowPtr.withByteOffset(rl*Sizeof.INT), Sizeof.INT, cudaMemcpyDeviceToHost); cudaMemcpy(Pointer.to(ruPtr), inPointer.rowPtr.withByteOffset((ru+1)*Sizeof.INT), Sizeof.INT, cudaMem... | /**
* Returns the number of non-zeroes in the given range of rows
*
* @param inPointer input CSR pointer
* @param rl lower row index (inclusive and zero-based)
* @param ru upper row index (inclusive and zero-based)
* @return number of non-zeroes
*/ | Returns the number of non-zeroes in the given range of rows | getNnz | {
"repo_name": "niketanpansare/systemml",
"path": "src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixCUDA.java",
"license": "apache-2.0",
"size": 119941
} | [
"org.apache.sysml.runtime.instructions.gpu.context.CSRPointer"
] | import org.apache.sysml.runtime.instructions.gpu.context.CSRPointer; | import org.apache.sysml.runtime.instructions.gpu.context.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 2,599,553 |
@SuppressWarnings("UnusedParameters")
public void onAddStarting(ViewHolder item) {
} | @SuppressWarnings(STR) void function(ViewHolder item) { } | /**
* Called when an add animation is being started on the given ViewHolder.
* The default implementation does nothing. Subclasses may wish to override
* this method to handle any ViewHolder-specific operations linked to animation
* lifecycles.
*
* @param item The ViewHolder being animated... | Called when an add animation is being started on the given ViewHolder. The default implementation does nothing. Subclasses may wish to override this method to handle any ViewHolder-specific operations linked to animation lifecycles | onAddStarting | {
"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,551 |
protected void setSynonymsFrom(final UserThesaurusHolder userThesaurus) throws ThesaurusException {
for (PdcPositionValueEntity pdcPositionValue : values) {
pdcPositionValue.setSynonyms(userThesaurus.getSynonymsOf(pdcPositionValue));
}
} | void function(final UserThesaurusHolder userThesaurus) throws ThesaurusException { for (PdcPositionValueEntity pdcPositionValue : values) { pdcPositionValue.setSynonyms(userThesaurus.getSynonymsOf(pdcPositionValue)); } } | /**
* Sets the synonyms for each value of this position from the specified thesaurus.
* @param userThesaurus a user thesaurus from which synonyms can be get.
* @throws ThesaurusException if an error occurs while getting the synonyms of this position's
* values.
*/ | Sets the synonyms for each value of this position from the specified thesaurus | setSynonymsFrom | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "web-core/src/main/java/com/silverpeas/pdc/web/PdcPositionEntity.java",
"license": "agpl-3.0",
"size": 10246
} | [
"com.silverpeas.thesaurus.ThesaurusException"
] | import com.silverpeas.thesaurus.ThesaurusException; | import com.silverpeas.thesaurus.*; | [
"com.silverpeas.thesaurus"
] | com.silverpeas.thesaurus; | 1,533,974 |
protected void sendSubscriptionNotif(PDCSubscription subscription,
List<String> spaceAndInstanceNames, String componentId,
SilverContentInterface silverContent,
int fromUserId) throws NotificationManagerException {
final int userID = subscription.getOwnerId();
final String subscr... | void function(PDCSubscription subscription, List<String> spaceAndInstanceNames, String componentId, SilverContentInterface silverContent, int fromUserId) throws NotificationManagerException { final int userID = subscription.getOwnerId(); final String subscriptionName = subscription.getName(); final java.util.Date class... | /**
* Sends a notification when subscription criterias math a new content classified
*/ | Sends a notification when subscription criterias math a new content classified | sendSubscriptionNotif | {
"repo_name": "stephaneperry/Silverpeas-Core",
"path": "ejb-core/pdc/src/main/java/com/silverpeas/pdcSubscription/ejb/PdcSubscriptionBmEJB.java",
"license": "agpl-3.0",
"size": 26945
} | [
"com.silverpeas.pdcSubscription.model.PDCSubscription",
"com.stratelia.silverpeas.contentManager.SilverContentInterface",
"com.stratelia.silverpeas.notificationManager.NotificationManagerException",
"java.util.List"
] | import com.silverpeas.pdcSubscription.model.PDCSubscription; import com.stratelia.silverpeas.contentManager.SilverContentInterface; import com.stratelia.silverpeas.notificationManager.NotificationManagerException; import java.util.List; | import com.silverpeas.*; import com.stratelia.silverpeas.*; import java.util.*; | [
"com.silverpeas",
"com.stratelia.silverpeas",
"java.util"
] | com.silverpeas; com.stratelia.silverpeas; java.util; | 654,400 |
public void save(final String iClusterName) {
checkIfAttached();
graph.setCurrentGraphInThreadLocal();
if (rawElement instanceof ODocument)
if (iClusterName != null)
rawElement = ((ODocument) rawElement).save(iClusterName);
else
rawElement = ((ODocument) rawElement).save();
... | void function(final String iClusterName) { checkIfAttached(); graph.setCurrentGraphInThreadLocal(); if (rawElement instanceof ODocument) if (iClusterName != null) rawElement = ((ODocument) rawElement).save(iClusterName); else rawElement = ((ODocument) rawElement).save(); } | /**
* (Blueprints Extension) Saves current element to a particular cluster. You don't need to call save() unless you're working
* against Temporary Vertices.
*
* @param iClusterName
* Cluster name or null to use the default "E"
*/ | (Blueprints Extension) Saves current element to a particular cluster. You don't need to call save() unless you're working against Temporary Vertices | save | {
"repo_name": "DiceHoldingsInc/orientdb",
"path": "graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientElement.java",
"license": "apache-2.0",
"size": 18826
} | [
"com.orientechnologies.orient.core.record.impl.ODocument"
] | import com.orientechnologies.orient.core.record.impl.ODocument; | import com.orientechnologies.orient.core.record.impl.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 1,288,698 |
@WebMethod(operationName = "GetRecordingJobState", action = "http://www.onvif.org/ver10/recording/wsdl/GetRecordingJobState")
@RequestWrapper(localName = "GetRecordingJobState", targetNamespace = "http://www.onvif.org/ver10/recording/wsdl", className = "org.onvif.ver10.recording.wsdl.GetRecordingJobState")
... | @WebMethod(operationName = STR, action = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GetRecordingJobStateResponseSTRhttp: @WebResult(name = "StateSTRhttp: org.onvif.ver10.schema.RecordingJobStateInformation function( @WebParam(name = "JobTokenSTRhttp: java.lang.String ... | /**
* GetRecordingJobState returns the state of a recording job. It includes an
* aggregated state,
* and state for each track of the recording job.
*
*/ | GetRecordingJobState returns the state of a recording job. It includes an aggregated state, and state for each track of the recording job | getRecordingJobState | {
"repo_name": "fpompermaier/onvif",
"path": "onvif-ws-client/src/main/java/org/onvif/ver10/recording/wsdl/RecordingPort.java",
"license": "apache-2.0",
"size": 24757
} | [
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.RequestWrapper",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 2,744,319 |
public String formatMessage(Locale locale, String key, Object[] arguments)
throws MissingResourceException {
if (fResourceBundle == null || locale != fLocale) {
if (locale != null) {
fResourceBundle = SecuritySupport.getResourceBundle("com.sun.org.apache.xerces.internal.... | String function(Locale locale, String key, Object[] arguments) throws MissingResourceException { if (fResourceBundle == null locale != fLocale) { if (locale != null) { fResourceBundle = SecuritySupport.getResourceBundle(STR, locale); fLocale = locale; } if (fResourceBundle == null) fResourceBundle = SecuritySupport.get... | /**
* Formats a message with the specified arguments using the given
* locale information.
*
* @param locale The locale of the message.
* @param key The message key.
* @param arguments The message replacement text arguments. The order
* of the arguments must ... | Formats a message with the specified arguments using the given locale information | formatMessage | {
"repo_name": "FauxFaux/jdk9-jaxp",
"path": "src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessageFormatter_ko.java",
"license": "gpl-2.0",
"size": 4137
} | [
"com.sun.org.apache.xerces.internal.utils.SecuritySupport",
"java.util.Locale",
"java.util.MissingResourceException"
] | import com.sun.org.apache.xerces.internal.utils.SecuritySupport; import java.util.Locale; import java.util.MissingResourceException; | import com.sun.org.apache.xerces.internal.utils.*; import java.util.*; | [
"com.sun.org",
"java.util"
] | com.sun.org; java.util; | 1,898,360 |
private void updateHeadKey(long destroyedKey) throws CacheException {
this.headKey = inc(destroyedKey);
if (logger.isTraceEnabled()) {
logger.trace("{}: Incremented HEAD_KEY for region {} to {}", this, this.region.getName(), this.headKey);
}
} | void function(long destroyedKey) throws CacheException { this.headKey = inc(destroyedKey); if (logger.isTraceEnabled()) { logger.trace(STR, this, this.region.getName(), this.headKey); } } | /**
* Increments the value of the head key by one.
*
* @throws CacheException
*/ | Increments the value of the head key by one | updateHeadKey | {
"repo_name": "kidaa/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java",
"license": "apache-2.0",
"size": 45928
} | [
"com.gemstone.gemfire.cache.CacheException"
] | import com.gemstone.gemfire.cache.CacheException; | import com.gemstone.gemfire.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,613,898 |
public Interactive open(OnCommandResultListener onCommandResultListener) {
return new Interactive(this, onCommandResultListener);
}
}
public static class Interactive {
private final Handler handler;
private final boolean autoHandler;
private final String... | Interactive function(OnCommandResultListener onCommandResultListener) { return new Interactive(this, onCommandResultListener); } } static class Interactive { private final Handler handler; private final boolean autoHandler; private final String shell; private final boolean wantSTDERR; private final List<Command> comman... | /**
* Construct a {@link Shell.Interactive} instance, try to start the
* shell, and call onCommandResultListener to report success or failure
*
* @param onCommandResultListener Callback to return shell open status
*/ | Construct a <code>Shell.Interactive</code> instance, try to start the shell, and call onCommandResultListener to report success or failure | open | {
"repo_name": "aravindsagar/EasyLock",
"path": "libsuperuser/src/eu/chainfire/libsuperuser/Shell.java",
"license": "apache-2.0",
"size": 66888
} | [
"android.os.Handler",
"android.os.Looper",
"eu.chainfire.libsuperuser.StreamGobbler",
"java.io.DataOutputStream",
"java.util.List",
"java.util.Map",
"java.util.concurrent.ScheduledThreadPoolExecutor"
] | import android.os.Handler; import android.os.Looper; import eu.chainfire.libsuperuser.StreamGobbler; import java.io.DataOutputStream; import java.util.List; import java.util.Map; import java.util.concurrent.ScheduledThreadPoolExecutor; | import android.os.*; import eu.chainfire.libsuperuser.*; import java.io.*; import java.util.*; import java.util.concurrent.*; | [
"android.os",
"eu.chainfire.libsuperuser",
"java.io",
"java.util"
] | android.os; eu.chainfire.libsuperuser; java.io; java.util; | 2,862,036 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.