method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static double round(double x, int scale, int roundingMethod) {
try {
final double rounded = (new BigDecimal(Double.toString(x))
.setScale(scale, roundingMethod))
.doubleValue();
// MATH-1089: negative values rounded to zero should r... | static double function(double x, int scale, int roundingMethod) { try { final double rounded = (new BigDecimal(Double.toString(x)) .setScale(scale, roundingMethod)) .doubleValue(); return rounded == POSITIVE_ZERO ? POSITIVE_ZERO * x : rounded; } catch (NumberFormatException ex) { if (Double.isInfinite(x)) { return x; }... | /**
* Rounds the given value to the specified number of decimal places. The
* value is rounded using the given method which is any method defined in
* {@link BigDecimal}. If {@code x} is infinite or {@code NaN}, then the
* value of {@code x} is returned unchanged, regardless of the other
*... | Rounds the given value to the specified number of decimal places. The value is rounded using the given method which is any method defined in <code>BigDecimal</code>. If x is infinite or NaN, then the value of x is returned unchanged, regardless of the other parameters | round | {
"repo_name": "halkosajtarevic/mybon-rksv",
"path": "src/main/java/io/github/mybon/rksv/domain/Receipt.java",
"license": "gpl-3.0",
"size": 7465
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,851,921 |
public WSEndpointReference getFaultTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) {
if (faultTo != null) {
return faultTo;
}
if (av == null) {
throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION());
}
Header h = ... | WSEndpointReference function(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { if (faultTo != null) { return faultTo; } if (av == null) { throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); } Header h = getFirstHeader(av.faultToTag, true, sv); if (h != null) { try { faultTo = h.rea... | /**
* Returns the value of WS-Addressing <code>FaultTo</code> header. The <code>version</code>
* identifies the WS-Addressing version and the header returned is targeted at
* the current implicit role. Caches the value for subsequent invocation.
* Duplicate <code>FaultTo</code> headers are detected ... | Returns the value of WS-Addressing <code>FaultTo</code> header. The <code>version</code> identifies the WS-Addressing version and the header returned is targeted at the current implicit role. Caches the value for subsequent invocation. Duplicate <code>FaultTo</code> headers are detected earlier | getFaultTo | {
"repo_name": "axDev-JDK/jaxws",
"path": "src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java",
"license": "gpl-2.0",
"size": 35569
} | [
"com.sun.istack.internal.NotNull",
"com.sun.xml.internal.ws.api.SOAPVersion",
"com.sun.xml.internal.ws.api.addressing.AddressingVersion",
"com.sun.xml.internal.ws.api.addressing.WSEndpointReference",
"com.sun.xml.internal.ws.resources.AddressingMessages",
"javax.xml.stream.XMLStreamException",
"javax.xm... | import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; import com.sun.xml.internal.ws.resources.AddressingMessages; import javax.xml.stream.XMLStreamExcept... | import com.sun.istack.internal.*; import com.sun.xml.internal.ws.api.*; import com.sun.xml.internal.ws.api.addressing.*; import com.sun.xml.internal.ws.resources.*; import javax.xml.stream.*; import javax.xml.ws.*; | [
"com.sun.istack",
"com.sun.xml",
"javax.xml"
] | com.sun.istack; com.sun.xml; javax.xml; | 2,505,520 |
@Test
public void getTopPrograms_limited()
throws TskCoreException, NoServiceProviderException,
TranslationException, SleuthkitCaseProviderException {
int countRequested = 10;
for (int returnedCount : new int[]{1, 9, 10, 11}) {
long dataSourceId = 1L;
... | void function() throws TskCoreException, NoServiceProviderException, TranslationException, SleuthkitCaseProviderException { int countRequested = 10; for (int returnedCount : new int[]{1, 9, 10, 11}) { long dataSourceId = 1L; DataSource dataSource = TskMockUtils.getDataSource(dataSourceId); List<BlackboardArtifact> retu... | /**
* Ensure that UserActivitySummary.getTopPrograms properly limits results
* (if no run count and no run date, then no limit).
*
* @throws TskCoreException
* @throws NoServiceProviderException
* @throws TranslationException
* @throws SleuthkitCaseProviderException
*/ | Ensure that UserActivitySummary.getTopPrograms properly limits results (if no run count and no run date, then no limit) | getTopPrograms_limited | {
"repo_name": "eugene7646/autopsy",
"path": "Core/test/unit/src/org/sleuthkit/autopsy/datasourcesummary/datamodel/UserActivitySummaryTest.java",
"license": "apache-2.0",
"size": 62228
} | [
"java.util.List",
"java.util.stream.Collectors",
"java.util.stream.IntStream",
"org.apache.commons.lang3.tuple.Pair",
"org.junit.Assert",
"org.sleuthkit.autopsy.datasourcesummary.datamodel.DataSourceSummaryMockUtils",
"org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider",
"org.sleu... | import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; import org.apache.commons.lang3.tuple.Pair; import org.junit.Assert; import org.sleuthkit.autopsy.datasourcesummary.datamodel.DataSourceSummaryMockUtils; import org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCasePr... | import java.util.*; import java.util.stream.*; import org.apache.commons.lang3.tuple.*; import org.junit.*; import org.sleuthkit.autopsy.datasourcesummary.datamodel.*; import org.sleuthkit.autopsy.testutils.*; import org.sleuthkit.autopsy.texttranslation.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.apache.commons",
"org.junit",
"org.sleuthkit.autopsy",
"org.sleuthkit.datamodel"
] | java.util; org.apache.commons; org.junit; org.sleuthkit.autopsy; org.sleuthkit.datamodel; | 2,040,295 |
public void setCreateDate(Date createDate); | void function(Date createDate); | /**
* Sets the create date of this process workflow.
*
* @param createDate the create date of this process workflow
*/ | Sets the create date of this process workflow | setCreateDate | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/service/org/opencps/processmgt/model/ProcessWorkflowModel.java",
"license": "agpl-3.0",
"size": 13911
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,527,525 |
public void setBaseShape(Shape shape, boolean notify) {
if (shape == null) {
throw new IllegalArgumentException("Null 'shape' argument.");
}
this.baseShape = shape;
if (notify) {
notifyListeners(new RendererChangeEvent(this));
}
}
// ITEM... | void function(Shape shape, boolean notify) { if (shape == null) { throw new IllegalArgumentException(STR); } this.baseShape = shape; if (notify) { notifyListeners(new RendererChangeEvent(this)); } } | /**
* Sets the base shape and, if requested, sends a
* {@link RendererChangeEvent} to all registered listeners.
*
* @param shape the shape (<code>null</code> not permitted).
* @param notify notify listeners?
*/ | Sets the base shape and, if requested, sends a <code>RendererChangeEvent</code> to all registered listeners | setBaseShape | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "lgpl-2.1",
"size": 97537
} | [
"java.awt.Shape",
"org.jfree.chart.event.RendererChangeEvent"
] | import java.awt.Shape; import org.jfree.chart.event.RendererChangeEvent; | import java.awt.*; import org.jfree.chart.event.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 157,388 |
public void onRadioButtonClicked(View view) {
int newSize;
RadioButton rb = (RadioButton) view;
if (!rb.isChecked()) {
Log.d(TAG, "Got click on non-checked radio button");
return;
}
switch (rb.getId()) {
case R.id.surfaceSizeTiny_radio:
... | void function(View view) { int newSize; RadioButton rb = (RadioButton) view; if (!rb.isChecked()) { Log.d(TAG, STR); return; } switch (rb.getId()) { case R.id.surfaceSizeTiny_radio: newSize = SURFACE_SIZE_TINY; break; case R.id.surfaceSizeSmall_radio: newSize = SURFACE_SIZE_SMALL; break; case R.id.surfaceSizeMedium_rad... | /**
* onClick handler for radio buttons.
*/ | onClick handler for radio buttons | onRadioButtonClicked | {
"repo_name": "wysaid/grafika",
"path": "src/com/android/grafika/HardwareScalerActivity.java",
"license": "apache-2.0",
"size": 30439
} | [
"android.util.Log",
"android.view.SurfaceHolder",
"android.view.SurfaceView",
"android.view.View",
"android.widget.RadioButton"
] | import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.RadioButton; | import android.util.*; import android.view.*; import android.widget.*; | [
"android.util",
"android.view",
"android.widget"
] | android.util; android.view; android.widget; | 2,569,712 |
private void processOverReplicatedBlock(final Block block,
final short replication, final DatanodeDescriptor addedNode,
DatanodeDescriptor delNodeHint) {
assert namesystem.hasWriteLock();
if (addedNode == delNodeHint) {
delNodeHint = null;
}
Collection<DatanodeStorageInfo> nonExcess ... | void function(final Block block, final short replication, final DatanodeDescriptor addedNode, DatanodeDescriptor delNodeHint) { assert namesystem.hasWriteLock(); if (addedNode == delNodeHint) { delNodeHint = null; } Collection<DatanodeStorageInfo> nonExcess = new ArrayList<DatanodeStorageInfo>(); Collection<DatanodeDes... | /**
* Find how many of the containing nodes are "extra", if any.
* If there are any extras, call chooseExcessReplicates() to
* mark them in the excessReplicateMap.
*/ | Find how many of the containing nodes are "extra", if any. If there are any extras, call chooseExcessReplicates() to mark them in the excessReplicateMap | processOverReplicatedBlock | {
"repo_name": "simbadzina/hadoop-fcfs",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java",
"license": "apache-2.0",
"size": 150088
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.server.protocol.DatanodeStorage",
"org.apache.hadoop.hdfs.util.LightWeightLinkedSet"
] | import java.util.ArrayList; import java.util.Collection; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.protocol.DatanodeStorage; import org.apache.hadoop.hdfs.util.LightWeightLinkedSet; | import java.util.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.hdfs.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,243,372 |
public static Collection<ContentService> getContentServicesList( )
{
return _mapContentServicesRegistry.values( );
} | static Collection<ContentService> function( ) { return _mapContentServicesRegistry.values( ); } | /**
* Returns all registered Content services
*
* @return A collection containing all registered Content services
*/ | Returns all registered Content services | getContentServicesList | {
"repo_name": "rzara/lutece-core",
"path": "src/java/fr/paris/lutece/portal/service/portal/PortalService.java",
"license": "bsd-3-clause",
"size": 29644
} | [
"fr.paris.lutece.portal.service.content.ContentService",
"java.util.Collection"
] | import fr.paris.lutece.portal.service.content.ContentService; import java.util.Collection; | import fr.paris.lutece.portal.service.content.*; import java.util.*; | [
"fr.paris.lutece",
"java.util"
] | fr.paris.lutece; java.util; | 1,386,716 |
@Override
public JsonNode findParent(String fieldName)
{
return delegate.findParent(fieldName);
} | JsonNode function(String fieldName) { return delegate.findParent(fieldName); } | /**
* Method for finding a JSON Object that contains specified field,
* within this node or its descendants.
* If no matching field is found in this node or its descendants, returns null.
*
* @param fieldName Name of field to look for
* @return Value of first matching node found, if any; n... | Method for finding a JSON Object that contains specified field, within this node or its descendants. If no matching field is found in this node or its descendants, returns null | findParent | {
"repo_name": "mrids/action-core-0.1.x",
"path": "src/main/java/com/ning/metrics/action/hdfs/data/JsonNodeComparable.java",
"license": "apache-2.0",
"size": 8373
} | [
"org.codehaus.jackson.JsonNode"
] | import org.codehaus.jackson.JsonNode; | import org.codehaus.jackson.*; | [
"org.codehaus.jackson"
] | org.codehaus.jackson; | 2,143,638 |
@Override public void exitExpressionParen(@NotNull BigDataScriptParser.ExpressionParenContext ctx) { } | @Override public void exitExpressionParen(@NotNull BigDataScriptParser.ExpressionParenContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterExpressionParen | {
"repo_name": "leepc12/BigDataScript",
"path": "src/org/bds/antlr/BigDataScriptBaseListener.java",
"license": "apache-2.0",
"size": 36363
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 449,877 |
public Point getLocation() {
return location;
}
| Point function() { return location; } | /**
* Returns the location of the player as a point
* @return The point of the player
*/ | Returns the location of the player as a point | getLocation | {
"repo_name": "inderdhir/Anonymule_libgdx",
"path": "Anonymule/src/com/cs2340/anonymule/Player.java",
"license": "mit",
"size": 6849
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,098,607 |
public static <K extends Comparable<K>, T1, T2> long[] mergeSortedDescending(
final Iterator<T1> itr1,
final Function<T1, K> toKey1,
final Iterator<T2> itr2,
final Function<T2, K> toKey2,
final BiConsumer<T1, T2> consumer
) {
final long[] stats... | static <K extends Comparable<K>, T1, T2> long[] function( final Iterator<T1> itr1, final Function<T1, K> toKey1, final Iterator<T2> itr2, final Function<T2, K> toKey2, final BiConsumer<T1, T2> consumer ) { final long[] stats = new long[]{0L, 0L, 0L}; if (itr1.hasNext() && itr2.hasNext()) { T1 v1 = itr1.next(); T2 v2 = ... | /**
* Given two sorted iterators, merge them.
*
* This is essentially the algorithm used by Merge Sort to merge two sorted list segments
* into a final list, but when two keys are equal ({@link Comparable#compareTo(Object)} is 0)
* then the consumer function is called.
*
* @param itr1... | Given two sorted iterators, merge them. This is essentially the algorithm used by Merge Sort to merge two sorted list segments into a final list, but when two keys are equal (<code>Comparable#compareTo(Object)</code> is 0) then the consumer function is called | mergeSortedDescending | {
"repo_name": "basking2/sdsai",
"path": "sdsai-itrex/src/main/java/com/github/basking2/sdsai/itrex/iterators/Iterators.java",
"license": "mit",
"size": 17936
} | [
"java.util.Iterator",
"java.util.function.BiConsumer",
"java.util.function.Function"
] | import java.util.Iterator; import java.util.function.BiConsumer; import java.util.function.Function; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 190,228 |
@Override
protected AWSAmplify build(AwsSyncClientParams params) {
return new AWSAmplifyClient(params);
} | AWSAmplify function(AwsSyncClientParams params) { return new AWSAmplifyClient(params); } | /**
* Construct a synchronous implementation of AWSAmplify using the current builder configuration.
*
* @param params
* Current builder configuration represented as a parameter object.
* @return Fully configured implementation of AWSAmplify.
*/ | Construct a synchronous implementation of AWSAmplify using the current builder configuration | build | {
"repo_name": "jentfoo/aws-sdk-java",
"path": "aws-java-sdk-amplify/src/main/java/com/amazonaws/services/amplify/AWSAmplifyClientBuilder.java",
"license": "apache-2.0",
"size": 2304
} | [
"com.amazonaws.client.AwsSyncClientParams"
] | import com.amazonaws.client.AwsSyncClientParams; | import com.amazonaws.client.*; | [
"com.amazonaws.client"
] | com.amazonaws.client; | 1,650,505 |
@Override public void writeShort(int v) throws IOException {
out.write(0xFF & v);
out.write(0xFF & (v >> 8));
} | @Override void function(int v) throws IOException { out.write(0xFF & v); out.write(0xFF & (v >> 8)); } | /**
* Writes a {@code short} as specified by
* {@link DataOutputStream#writeShort(int)}, except using little-endian byte
* order.
*
* @throws IOException if an I/O error occurs
*/ | Writes a short as specified by <code>DataOutputStream#writeShort(int)</code>, except using little-endian byte order | writeShort | {
"repo_name": "trivium-io/trivium-core",
"path": "src/io/trivium/dep/com/google/common/io/LittleEndianDataOutputStream.java",
"license": "apache-2.0",
"size": 5328
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 373,632 |
protected Activity xml2AssignE4X(Activity assignE4XActivity, Element assignE4XElement) {
AssignE4X assignE4X;
if (assignE4XActivity instanceof AssignE4X) {
assignE4X = (AssignE4X) assignE4XActivity;
} else {
assignE4X = BPELFactory.eINSTANCE.createAssignE4X();
assignE4X.setElement(assignE4XElement)... | Activity function(Activity assignE4XActivity, Element assignE4XElement) { AssignE4X assignE4X; if (assignE4XActivity instanceof AssignE4X) { assignE4X = (AssignE4X) assignE4XActivity; } else { assignE4X = BPELFactory.eINSTANCE.createAssignE4X(); assignE4X.setElement(assignE4XElement); } if (assignE4XElement.hasAttribut... | /**
* Converts an XML assignE4X element to a BPEL Assign object.
*
*/ | Converts an XML assignE4X element to a BPEL Assign object | xml2AssignE4X | {
"repo_name": "splinter/developer-studio",
"path": "bps/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationBPELReader.java",
"license": "apache-2.0",
"size": 140766
} | [
"org.eclipse.bpel.model.Activity",
"org.eclipse.bpel.model.AssignE4X",
"org.eclipse.bpel.model.BPELFactory",
"org.w3c.dom.Element"
] | import org.eclipse.bpel.model.Activity; import org.eclipse.bpel.model.AssignE4X; import org.eclipse.bpel.model.BPELFactory; import org.w3c.dom.Element; | import org.eclipse.bpel.model.*; import org.w3c.dom.*; | [
"org.eclipse.bpel",
"org.w3c.dom"
] | org.eclipse.bpel; org.w3c.dom; | 2,312,714 |
protected CloudServiceManagementClientImpl newInstance(HttpClientBuilder httpBuilder, ExecutorService executorService) {
return new CloudServiceManagementClientImpl(httpBuilder, executorService, this.getCredentials(), this.getBaseUri(), this.getApiVersion(), this.getLongRunningOperationInitialTimeout(), thi... | CloudServiceManagementClientImpl function(HttpClientBuilder httpBuilder, ExecutorService executorService) { return new CloudServiceManagementClientImpl(httpBuilder, executorService, this.getCredentials(), this.getBaseUri(), this.getApiVersion(), this.getLongRunningOperationInitialTimeout(), this.getLongRunningOperation... | /**
* Initializes a new instance of the CloudServiceManagementClientImpl class.
*
* @param httpBuilder The HTTP client builder.
* @param executorService The executor service.
*/ | Initializes a new instance of the CloudServiceManagementClientImpl class | newInstance | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-scheduler/src/main/java/com/microsoft/windowsazure/management/scheduler/CloudServiceManagementClientImpl.java",
"license": "apache-2.0",
"size": 27944
} | [
"java.util.concurrent.ExecutorService",
"org.apache.http.impl.client.HttpClientBuilder"
] | import java.util.concurrent.ExecutorService; import org.apache.http.impl.client.HttpClientBuilder; | import java.util.concurrent.*; import org.apache.http.impl.client.*; | [
"java.util",
"org.apache.http"
] | java.util; org.apache.http; | 2,837,695 |
protected PendingSlotRequest findMatchingRequest(ResourceProfile slotResourceProfile) {
for (PendingSlotRequest pendingSlotRequest : pendingSlotRequests.values()) {
if (!pendingSlotRequest.isAssigned() && slotResourceProfile.isMatching(pendingSlotRequest.getResourceProfile())) {
return pendingSlotRequest;
... | PendingSlotRequest function(ResourceProfile slotResourceProfile) { for (PendingSlotRequest pendingSlotRequest : pendingSlotRequests.values()) { if (!pendingSlotRequest.isAssigned() && slotResourceProfile.isMatching(pendingSlotRequest.getResourceProfile())) { return pendingSlotRequest; } } return null; } | /**
* Finds a matching slot request for a given resource profile. If there is no such request,
* the method returns null.
*
* Note: If you want to change the behaviour of the slot manager wrt slot allocation and
* request fulfillment, then you should override this method.
*
* @param slotResourceProfile de... | Finds a matching slot request for a given resource profile. If there is no such request, the method returns null. Note: If you want to change the behaviour of the slot manager wrt slot allocation and request fulfillment, then you should override this method | findMatchingRequest | {
"repo_name": "PangZhi/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java",
"license": "apache-2.0",
"size": 33668
} | [
"org.apache.flink.runtime.clusterframework.types.ResourceProfile"
] | import org.apache.flink.runtime.clusterframework.types.ResourceProfile; | import org.apache.flink.runtime.clusterframework.types.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,001,819 |
public static void assertNodeTypeExists(final Session session, final String nodeTypeName)
throws RepositoryException {
final NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager();
assertTrue("NodeType " + nodeTypeName + " does not exist", ntm.hasNodeType(nodeTypeName));
... | static void function(final Session session, final String nodeTypeName) throws RepositoryException { final NodeTypeManager ntm = session.getWorkspace().getNodeTypeManager(); assertTrue(STR + nodeTypeName + STR, ntm.hasNodeType(nodeTypeName)); } | /**
* Asserts that a specific node type is registered in the workspace of the session.
*
* @param session
* the session to perform the lookup
* @param nodeTypeName
* the name of the nodetype that is asserted to exist
* @throws RepositoryException
* ... | Asserts that a specific node type is registered in the workspace of the session | assertNodeTypeExists | {
"repo_name": "inkstand-io/scribble",
"path": "scribble-jcr/src/main/java/io/inkstand/scribble/jcr/JCRAssert.java",
"license": "apache-2.0",
"size": 7730
} | [
"javax.jcr.RepositoryException",
"javax.jcr.Session",
"javax.jcr.nodetype.NodeTypeManager",
"org.junit.Assert"
] | import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.nodetype.NodeTypeManager; import org.junit.Assert; | import javax.jcr.*; import javax.jcr.nodetype.*; import org.junit.*; | [
"javax.jcr",
"org.junit"
] | javax.jcr; org.junit; | 626,829 |
protected boolean matches(String name, PropertyDescriptor desc) {
return desc.getName().equals(name.trim());
} | boolean function(String name, PropertyDescriptor desc) { return desc.getName().equals(name.trim()); } | /**
* Determines if the name of a property descriptor matches the column name.
* Currently only used by unit tests.
* @param name - name of the column.
* @param desc - property descriptor to check against
* @return - true if the name matches the name in the property descriptor.
*/ | Determines if the name of a property descriptor matches the column name. Currently only used by unit tests | matches | {
"repo_name": "mattbertolini/liquibase",
"path": "liquibase-core/src/main/java/liquibase/util/csv/opencsv/bean/HeaderColumnNameMappingStrategy.java",
"license": "apache-2.0",
"size": 8674
} | [
"java.beans.PropertyDescriptor"
] | import java.beans.PropertyDescriptor; | import java.beans.*; | [
"java.beans"
] | java.beans; | 2,542,021 |
@Override
public void run() throws Exception
{
// Load an ontology.
Ontology ontology = new Ontology(getFile("owl/in1.owl"), ReasonerType.HERMIT);
// Retrieve the direct individuals of a class.
for (OntologyIndividual i : ontology.getClass("Foo").getIndividuals(true))
System.out.println(i);
System.ou... | void function() throws Exception { Ontology ontology = new Ontology(getFile(STR), ReasonerType.HERMIT); for (OntologyIndividual i : ontology.getClass("Foo").getIndividuals(true)) System.out.println(i); System.out.println(); for (OntologyIndividual i : ontology.getClass("Foo").getIndividuals(false)) System.out.println(i... | /**
* Launch the sample.
* @throws Exception
* If something goes wrong.
**/ | Launch the sample | run | {
"repo_name": "SPDSS/adss",
"path": "it.polito.security.ontologies.samples/src/it/polito/security/ontologies/samples/classes/GetsIndividuals.java",
"license": "epl-1.0",
"size": 1521
} | [
"it.polito.security.ontologies.Ontology",
"it.polito.security.ontologies.OntologyIndividual",
"it.polito.security.ontologies.ReasonerType"
] | import it.polito.security.ontologies.Ontology; import it.polito.security.ontologies.OntologyIndividual; import it.polito.security.ontologies.ReasonerType; | import it.polito.security.ontologies.*; | [
"it.polito.security"
] | it.polito.security; | 635,504 |
@Override
public MembershipService getMembershipService() {
return coordinator.getMembershipService();
} | MembershipService function() { return coordinator.getMembershipService(); } | /**
* Returns the membership service component
* @return MembershipService
*/ | Returns the membership service component | getMembershipService | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.0/GroupChannel.java",
"license": "mit",
"size": 26470
} | [
"org.apache.catalina.tribes.MembershipService"
] | import org.apache.catalina.tribes.MembershipService; | import org.apache.catalina.tribes.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,758,395 |
public static void storeUser(User user) {
UserFactory.save(user);
} | static void function(User user) { UserFactory.save(user); } | /**
* Updates the Users to the database
* @param user User to store.
*/ | Updates the Users to the database | storeUser | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/user/UserManager.java",
"license": "gpl-2.0",
"size": 42980
} | [
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.domain.user.UserFactory"
] | import com.redhat.rhn.domain.user.User; import com.redhat.rhn.domain.user.UserFactory; | import com.redhat.rhn.domain.user.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 286,993 |
@Nonnull
O visit(@Nonnull OWLDisjointUnionAxiom axiom); | O visit(@Nonnull OWLDisjointUnionAxiom axiom); | /**
* visit OWLDisjointUnionAxiom type
*
* @param axiom
* axiom to visit
* @return visitor value
*/ | visit OWLDisjointUnionAxiom type | visit | {
"repo_name": "matthewhorridge/owlapi-gwt",
"path": "owlapi-gwt-client-side-emul/src/main/java/org/semanticweb/owlapi/model/OWLLogicalAxiomVisitorEx.java",
"license": "lgpl-3.0",
"size": 9088
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 905,801 |
private void pullProjectFromUserDir() throws MojoExecutionException {
String path = System.getProperty("user.dir");
Project project = Project.loadProject(new File(path));
if (project.isOpenmrsCore()) {
branch = wizard.promptForValueIfMissingWithDefault(ENTER_BRANCH_NAME_MESSAGE, ... | void function() throws MojoExecutionException { String path = System.getProperty(STR); Project project = Project.loadProject(new File(path)); if (project.isOpenmrsCore()) { branch = wizard.promptForValueIfMissingWithDefault(ENTER_BRANCH_NAME_MESSAGE, branch, null, MASTER); } else if(branch == null){ branch = MASTER; } ... | /**
* Pulls latest changes if the project exists in the user directory
*
* @throws MojoExecutionException
*/ | Pulls latest changes if the project exists in the user directory | pullProjectFromUserDir | {
"repo_name": "PawelGutkowski/openmrs-sdk",
"path": "maven-plugin/src/main/java/org/openmrs/maven/plugins/Pull.java",
"license": "mpl-2.0",
"size": 14509
} | [
"java.io.File",
"org.apache.maven.plugin.MojoExecutionException",
"org.openmrs.maven.plugins.utility.CompositeException",
"org.openmrs.maven.plugins.utility.Project"
] | import java.io.File; import org.apache.maven.plugin.MojoExecutionException; import org.openmrs.maven.plugins.utility.CompositeException; import org.openmrs.maven.plugins.utility.Project; | import java.io.*; import org.apache.maven.plugin.*; import org.openmrs.maven.plugins.utility.*; | [
"java.io",
"org.apache.maven",
"org.openmrs.maven"
] | java.io; org.apache.maven; org.openmrs.maven; | 515,077 |
public T deserialze(InputStream inputStream,
URI src,
String mimeType); | T function(InputStream inputStream, URI src, String mimeType); | /**
* Deserialize a input stream content to the entity specified.
* @param inputStream The stream to deserialize from after/while reading
* @param src The source URI of the content
* @param mimeType The MIME Type of the inputStream content
* @return Entity after deserialization
*/ | Deserialize a input stream content to the entity specified | deserialze | {
"repo_name": "SmartITEngineering/smart-util",
"path": "rest/atom/src/main/java/com/smartitengineering/util/rest/atom/StreamBasedEntityDeserializer.java",
"license": "lgpl-3.0",
"size": 1539
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 37,675 |
public static Future<?> setFeedItem(final Context context,
final FeedItem item) {
return dbExec.submit(new Runnable() { | static Future<?> function(final Context context, final FeedItem item) { return dbExec.submit(new Runnable() { | /**
* Saves a FeedItem object in the database. This method will save all attributes of the FeedItem object including
* the content of FeedComponent-attributes.
*
* @param context A context that is used for opening a database connection.
* @param item The FeedItem object.
*/ | Saves a FeedItem object in the database. This method will save all attributes of the FeedItem object including the content of FeedComponent-attributes | setFeedItem | {
"repo_name": "volhol/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java",
"license": "mit",
"size": 45090
} | [
"android.content.Context",
"de.danoeh.antennapod.core.feed.FeedItem",
"java.util.concurrent.Future"
] | import android.content.Context; import de.danoeh.antennapod.core.feed.FeedItem; import java.util.concurrent.Future; | import android.content.*; import de.danoeh.antennapod.core.feed.*; import java.util.concurrent.*; | [
"android.content",
"de.danoeh.antennapod",
"java.util"
] | android.content; de.danoeh.antennapod; java.util; | 844,925 |
public void parsingCompleted(Resource resource); | void function(Resource resource); | /**
* <p>
* Signals that the given resource has been changed and the background parsing is
* completed.
* </p>
*
* @param resource the resource that has changed
*/ | Signals that the given resource has been changed and the background parsing is completed. | parsingCompleted | {
"repo_name": "DarwinSPL/DarwinSPL",
"path": "plugins/eu.hyvar.context.contextValidity.resource.hyvalidityformula/src-gen/eu/hyvar/context/contextValidity/resource/hyvalidityformula/IHyvalidityformulaBackgroundParsingListener.java",
"license": "apache-2.0",
"size": 578
} | [
"org.eclipse.emf.ecore.resource.Resource"
] | import org.eclipse.emf.ecore.resource.Resource; | import org.eclipse.emf.ecore.resource.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 442,515 |
public Observable<ServiceResponse<AdvisorInner>> getWithServiceResponseAsync(String resourceGroupName, String serverName, String advisorName) {
if (resourceGroupName == null) {
throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
}
if... | Observable<ServiceResponse<AdvisorInner>> function(String resourceGroupName, String serverName, String advisorName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serverName == null) { throw new IllegalArgumentException(STR); } if (advisorName == null) { throw new IllegalArgumentExcep... | /**
* Gets a server advisor.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param advisorName The name of the Server Advisor.
... | Gets a server advisor | getWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ServerAdvisorsInner.java",
"license": "mit",
"size": 21053
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 146,909 |
@Test
public void testPreparedStatementConnection() {
try {
PooledConnection pc = getPooledConnection();
con = pc.getConnection();
PreparedStatement s = con.prepareStatement("select 'x'");
Connection conRetrieved = s.getConnection();
assertEquals(con.getClass(), conRetrieved.getCl... | void function() { try { PooledConnection pc = getPooledConnection(); con = pc.getConnection(); PreparedStatement s = con.prepareStatement(STR); Connection conRetrieved = s.getConnection(); assertEquals(con.getClass(), conRetrieved.getClass()); assertEquals(con, conRetrieved); } catch (SQLException e) { fail(e.getMessag... | /**
* Ensures that a prepared statement generated by a proxied connection returns the proxied
* connection from getConnection() [not the physical connection].
*/ | Ensures that a prepared statement generated by a proxied connection returns the proxied connection from getConnection() [not the physical connection] | testPreparedStatementConnection | {
"repo_name": "whitingjr/pgjdbc",
"path": "pgjdbc/src/test/java/org/postgresql/test/jdbc2/optional/ConnectionPoolTest.java",
"license": "bsd-2-clause",
"size": 16906
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"javax.sql.PooledConnection",
"org.junit.Assert"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import javax.sql.PooledConnection; import org.junit.Assert; | import java.sql.*; import javax.sql.*; import org.junit.*; | [
"java.sql",
"javax.sql",
"org.junit"
] | java.sql; javax.sql; org.junit; | 712,466 |
@WebMethod(operationName = "getTerminalRouteNodeNames")
@XmlElementWrapper(name = "nodes", required = true)
@XmlElement(name = "node", required = false)
@WebResult(name = "nodes")
List<String> getTerminalRouteNodeNames(@WebParam(name = "documentId") String documentId) throws RiceIllegalArgumentExcep... | @WebMethod(operationName = STR) @XmlElementWrapper(name = "nodes", required = true) @XmlElement(name = "node", required = false) @WebResult(name = "nodes") List<String> getTerminalRouteNodeNames(@WebParam(name = STR) String documentId) throws RiceIllegalArgumentException; | /**
* Gets a list of terminal route node names for a {@link Document} with the given documentId. Will never return null but an empty collection to indicate no results.
*
* @param documentId the unique id of a Document
*
* @return an unmodifiable list of terminal route node names for the {@lin... | Gets a list of terminal route node names for a <code>Document</code> with the given documentId. Will never return null but an empty collection to indicate no results | getTerminalRouteNodeNames | {
"repo_name": "bhutchinson/rice",
"path": "rice-middleware/kew/api/src/main/java/org/kuali/rice/kew/api/document/WorkflowDocumentService.java",
"license": "apache-2.0",
"size": 33728
} | [
"java.util.List",
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.XmlElementWrapper",
"org.kuali.rice.core.api.exception.RiceIllegalArgumentException"
] | import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementWrapper; import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; | import java.util.*; import javax.jws.*; import javax.xml.bind.annotation.*; import org.kuali.rice.core.api.exception.*; | [
"java.util",
"javax.jws",
"javax.xml",
"org.kuali.rice"
] | java.util; javax.jws; javax.xml; org.kuali.rice; | 772,876 |
Observable<ServiceResponse<Void>> paramIntegerWithServiceResponseAsync(String scenario, int value); | Observable<ServiceResponse<Void>> paramIntegerWithServiceResponseAsync(String scenario, int value); | /**
* Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2.
*
* @param scenario Send a post request with header values "scenario": "positive" or "negative"
* @param value Send a post request with header values 1 or -2
* @return the {@l... | Send a post request with header values "scenario": "positive", "value": 1 or "scenario": "negative", "value": -2 | paramIntegerWithServiceResponseAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/header/Headers.java",
"license": "mit",
"size": 53377
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,768,908 |
public AbstractEnvironmentModule addGlobalEnvironmentServices(
Class<? extends EnvironmentService>... services) {
for (Class<? extends EnvironmentService> s : services) {
this.environmentServices.add(s);
}
return this;
} | AbstractEnvironmentModule function( Class<? extends EnvironmentService>... services) { for (Class<? extends EnvironmentService> s : services) { this.environmentServices.add(s); } return this; } | /**
* Add global environment services to be bound to the environment's service
* provider.
*
* @param services
* {@link EnvironmentService} classes to add
* @return this
*/ | Add global environment services to be bound to the environment's service provider | addGlobalEnvironmentServices | {
"repo_name": "Presage/Presage2",
"path": "util/src/main/java/uk/ac/imperial/presage2/util/environment/AbstractEnvironmentModule.java",
"license": "gpl-3.0",
"size": 10495
} | [
"uk.ac.imperial.presage2.core.environment.EnvironmentService"
] | import uk.ac.imperial.presage2.core.environment.EnvironmentService; | import uk.ac.imperial.presage2.core.environment.*; | [
"uk.ac.imperial"
] | uk.ac.imperial; | 608,556 |
public static String humanReadableByteSize(long size){
String measure = "B";
if(size < 1024){
return size + " " + measure;
}
Double number = new Double(size);
if(number>=1024){
number = number/1024;
measure = "KB";
if(number>=10... | static String function(long size){ String measure = "B"; if(size < 1024){ return size + " " + measure; } Double number = new Double(size); if(number>=1024){ number = number/1024; measure = "KB"; if(number>=1024){ number = number/1024; measure = "MB"; if(number>=1024){ number=number/1024; measure = "GB"; } } } DecimalFo... | /**
* Returns human readable information about file size
*
* @param size file size in bytes
* @return file size in appropriate unit
*/ | Returns human readable information about file size | humanReadableByteSize | {
"repo_name": "ajshastri/jenkins",
"path": "core/src/main/java/hudson/Functions.java",
"license": "mit",
"size": 74762
} | [
"java.text.DecimalFormat"
] | import java.text.DecimalFormat; | import java.text.*; | [
"java.text"
] | java.text; | 142,992 |
@Override
public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
IDocument document = viewer.getDocument();
IAdaptable projectAdaptable;
if (viewer instanceof IPySourceViewer) {
IPySourceViewer pySourceViewer = (IPySourceViewer) viewer;
I... | void function(ITextViewer viewer, char trigger, int stateMask, int offset) { IDocument document = viewer.getDocument(); IAdaptable projectAdaptable; if (viewer instanceof IPySourceViewer) { IPySourceViewer pySourceViewer = (IPySourceViewer) viewer; IPyEdit pyEdit = pySourceViewer.getEdit(); this.indentString = pyEdit.g... | /**
* This is the apply that should actually be called!
*/ | This is the apply that should actually be called | apply | {
"repo_name": "fabioz/Pydev",
"path": "plugins/org.python.pydev/src/org/python/pydev/editor/codecompletion/proposals/CtxInsensitiveImportComplProposal.java",
"license": "epl-1.0",
"size": 10380
} | [
"org.eclipse.core.runtime.IAdaptable",
"org.eclipse.jface.text.IDocument",
"org.eclipse.jface.text.ITextViewer",
"org.python.pydev.core.IPyEdit",
"org.python.pydev.core.IPySourceViewer",
"org.python.pydev.core.autoedit.DefaultIndentPrefs"
] | import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.ITextViewer; import org.python.pydev.core.IPyEdit; import org.python.pydev.core.IPySourceViewer; import org.python.pydev.core.autoedit.DefaultIndentPrefs; | import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*; import org.python.pydev.core.*; import org.python.pydev.core.autoedit.*; | [
"org.eclipse.core",
"org.eclipse.jface",
"org.python.pydev"
] | org.eclipse.core; org.eclipse.jface; org.python.pydev; | 3,161 |
public void testFifteenMinExceptionSegments() throws ParseException {
verifyExceptionSegments(this.fifteenMinTimeline,
FIFTEEN_MIN_EXCEPTIONS, DATE_TIME_FORMAT);
} | void function() throws ParseException { verifyExceptionSegments(this.fifteenMinTimeline, FIFTEEN_MIN_EXCEPTIONS, DATE_TIME_FORMAT); } | /**
* Tests methods related to exceptions methods in the fifteenMinTimeline.
*
* @throws ParseException if there is a parsing error.
*/ | Tests methods related to exceptions methods in the fifteenMinTimeline | testFifteenMinExceptionSegments | {
"repo_name": "martingwhite/astor",
"path": "examples/chart_11/tests/org/jfree/chart/axis/junit/SegmentedTimelineTests.java",
"license": "gpl-2.0",
"size": 46257
} | [
"java.text.ParseException"
] | import java.text.ParseException; | import java.text.*; | [
"java.text"
] | java.text; | 119,734 |
public void removeAction(String action) {
Stream.of(action.split(SUBPART_DIVIDER_TOKEN)).forEach(a -> getActions().remove(a));
} | void function(String action) { Stream.of(action.split(SUBPART_DIVIDER_TOKEN)).forEach(a -> getActions().remove(a)); } | /**
* Remove an action. Several actions can be provided, comma-separated.
*
* @param action
*/ | Remove an action. Several actions can be provided, comma-separated | removeAction | {
"repo_name": "apruden/mica2",
"path": "mica-core/src/main/java/org/obiba/mica/security/domain/SubjectAcl.java",
"license": "gpl-3.0",
"size": 6613
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 537,192 |
@Test
public void testProxyOverrideLocalhost() throws Exception {
final String contentUrl = mContentServer.url("/").toString();
int proxyServerRequestCount = mProxyServer.getRequestCount();
// Set proxy override and load content url
// Localhost should not use proxy settings
... | void function() throws Exception { final String contentUrl = mContentServer.url("/").toString(); int proxyServerRequestCount = mProxyServer.getRequestCount(); setProxyOverrideSync(new ProxyConfig.Builder() .addProxyRule(mProxyServer.getHostName() + ":" + mProxyServer.getPort()) .build()); mWebViewOnUiThread.loadUrl(con... | /**
* 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 | testProxyOverrideLocalhost | {
"repo_name": "AndroidX/androidx",
"path": "webkit/webkit/src/androidTest/java/androidx/webkit/ProxyControllerTest.java",
"license": "apache-2.0",
"size": 12169
} | [
"java.util.concurrent.TimeUnit",
"org.junit.Assert"
] | import java.util.concurrent.TimeUnit; import org.junit.Assert; | import java.util.concurrent.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,544,818 |
public static <T> Setting<T> adfixKeySetting(String prefix, String suffix, Function<Settings, String> defaultValue,
Function<String, T> parser, Property... properties) {
return affixKeySetting(AffixKey.withAdfix(prefix, suffix), defaultValue, parser, properti... | static <T> Setting<T> function(String prefix, String suffix, Function<Settings, String> defaultValue, Function<String, T> parser, Property... properties) { return affixKeySetting(AffixKey.withAdfix(prefix, suffix), defaultValue, parser, properties); } | /**
* This setting type allows to validate settings that have the same type and a common prefix and suffix. For instance
* storage.${backend}.enable=[true|false] can easily be added with this setting. Yet, adfix key settings don't support updaters
* out of the box unless {@link #getConcreteSetting(String... | This setting type allows to validate settings that have the same type and a common prefix and suffix. For instance storage.${backend}.enable=[true|false] can easily be added with this setting. Yet, adfix key settings don't support updaters out of the box unless <code>#getConcreteSetting(String)</code> is used to pull t... | adfixKeySetting | {
"repo_name": "danielmitterdorfer/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/settings/Setting.java",
"license": "apache-2.0",
"size": 41010
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,948,710 |
@SuppressWarnings("unchecked")
@Test
public void wrongFirstParameter() {
List<String> parameterTypes = Mockito.mock(List.class);
Mockito.when(parameterTypes.size()).thenReturn(2);
Mockito.when(parameterTypes.get(0)).thenReturn("long");
Mockito.when(rsc.getParameterTypes()).thenReturn(parameterTypes);
O... | @SuppressWarnings(STR) void function() { List<String> parameterTypes = Mockito.mock(List.class); Mockito.when(parameterTypes.size()).thenReturn(2); Mockito.when(parameterTypes.get(0)).thenReturn("long"); Mockito.when(rsc.getParameterTypes()).thenReturn(parameterTypes); Object[] parameters = new Object[] { 1L, "Value" }... | /**
* Tests that no interaction is happening when first parameter is not 'int'.
*/ | Tests that no interaction is happening when first parameter is not 'int' | wrongFirstParameter | {
"repo_name": "ivansenic/inspectIT",
"path": "inspectit.agent.java/src/test/java/rocks/inspectit/agent/java/sensor/method/jdbc/PreparedStatementParameterHookTest.java",
"license": "agpl-3.0",
"size": 7359
} | [
"java.util.List",
"org.mockito.Mockito"
] | import java.util.List; import org.mockito.Mockito; | import java.util.*; import org.mockito.*; | [
"java.util",
"org.mockito"
] | java.util; org.mockito; | 408,942 |
public void logUserPurchase(List<IItem> items, IUser iUser) throws PurchaseHistoryLogicException; | void function(List<IItem> items, IUser iUser) throws PurchaseHistoryLogicException; | /**
* Keeps a log of every purchase made by and user for a list of items
*
* @param iItem
* IItem containing the item involved in the purchase
* @param iUser
* IUser containing the user involved in the purchase
* @exception when the log cannot be saved
*/ | Keeps a log of every purchase made by and user for a list of items | logUserPurchase | {
"repo_name": "unicesi/songstock",
"path": "purchasehistory.logic.api/src/purchasehistory/logic/beans/IPurchaseHistoryLogicBean.java",
"license": "gpl-3.0",
"size": 1875
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,225,894 |
@SuppressWarnings("unchecked")
public static AbstractMetric<IString,String> newMetric(String evalMetric,
List<List<Sequence<IString>>> references) {
AbstractMetric<IString,String> emetric = null;
if (evalMetric.equals("smoothbleu")) {
emetric = new BLEUMetric<IString,String>(references, tru... | @SuppressWarnings(STR) static AbstractMetric<IString,String> function(String evalMetric, List<List<Sequence<IString>>> references) { AbstractMetric<IString,String> emetric = null; if (evalMetric.equals(STR)) { emetric = new BLEUMetric<IString,String>(references, true); } else if (evalMetric.equals(STR)) { int BLEUOrder... | /**
* Return an instance of a corpus-level evaluation metric.
*
* @param evalMetric String specifying the metric
* @param references References set
* @return
*/ | Return an instance of a corpus-level evaluation metric | newMetric | {
"repo_name": "Andy-Peng/phrasal",
"path": "src/edu/stanford/nlp/mt/metrics/CorpusLevelMetricFactory.java",
"license": "gpl-3.0",
"size": 4178
} | [
"edu.stanford.nlp.mt.util.IString",
"edu.stanford.nlp.mt.util.Sequence",
"java.util.List"
] | import edu.stanford.nlp.mt.util.IString; import edu.stanford.nlp.mt.util.Sequence; import java.util.List; | import edu.stanford.nlp.mt.util.*; import java.util.*; | [
"edu.stanford.nlp",
"java.util"
] | edu.stanford.nlp; java.util; | 2,412,820 |
public ChannelFuture writeRstStream(ChannelHandlerContext ctx, int streamId, long errorCode,
ChannelPromise promise, boolean writeIfNoStream) {
Http2Stream stream = connection.stream(streamId);
if (stream == null && !writeIfNoStream) {
// The stream may already have been clos... | ChannelFuture function(ChannelHandlerContext ctx, int streamId, long errorCode, ChannelPromise promise, boolean writeIfNoStream) { Http2Stream stream = connection.stream(streamId); if (stream == null && !writeIfNoStream) { promise.setSuccess(); return promise; } ChannelFuture future = frameWriter.writeRstStream(ctx, st... | /**
* Writes a RST_STREAM frame to the remote endpoint.
* @param ctx the context to use for writing.
* @param streamId the stream for which to send the frame.
* @param errorCode the error code indicating the nature of the failure.
* @param promise the promise for the write.
* @param writeI... | Writes a RST_STREAM frame to the remote endpoint | writeRstStream | {
"repo_name": "JungMinu/netty",
"path": "codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionEncoder.java",
"license": "apache-2.0",
"size": 14491
} | [
"io.netty.channel.ChannelFuture",
"io.netty.channel.ChannelHandlerContext",
"io.netty.channel.ChannelPromise"
] | import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelPromise; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,673,787 |
boolean scheduleMigration(VMInstanceVO vm); | boolean scheduleMigration(VMInstanceVO vm); | /**
* Schedule the vm for migration.
*
* @param vm
* @return true if schedule worked.
*/ | Schedule the vm for migration | scheduleMigration | {
"repo_name": "remibergsma/cosmic",
"path": "cosmic-core/engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java",
"license": "apache-2.0",
"size": 3054
} | [
"com.cloud.vm.VMInstanceVO"
] | import com.cloud.vm.VMInstanceVO; | import com.cloud.vm.*; | [
"com.cloud.vm"
] | com.cloud.vm; | 970,231 |
public void traverse(Node pos) throws org.xml.sax.SAXException
{
this.m_contentHandler.startDocument();
traverseFragment(pos);
this.m_contentHandler.endDocument();
}
| void function(Node pos) throws org.xml.sax.SAXException { this.m_contentHandler.startDocument(); traverseFragment(pos); this.m_contentHandler.endDocument(); } | /**
* Perform a pre-order traversal non-recursive style.
*
* Note that TreeWalker assumes that the subtree is intended to represent
* a complete (though not necessarily well-formed) document and, during a
* traversal, startDocument and endDocument will always be issued to the
* SAX listener... | Perform a pre-order traversal non-recursive style. Note that TreeWalker assumes that the subtree is intended to represent a complete (though not necessarily well-formed) document and, during a traversal, startDocument and endDocument will always be issued to the SAX listener | traverse | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xml/utils/TreeWalker.java",
"license": "mit",
"size": 14659
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 791,228 |
public String getRDFContent() throws IOException {
return getParent().getResources()
.getResourceAsString(getResourcePath());
} | String function() throws IOException { return getParent().getResources() .getResourceAsString(getResourcePath()); } | /**
* Gets the content of this annotation. Note that this method does not cache
* the value it reads.
*
* @return a TTL-encoded RDF model.
* @throws IOException
* If anything goes wrong reading the resource
*/ | Gets the content of this annotation. Note that this method does not cache the value it reads | getRDFContent | {
"repo_name": "binfalse/incubator-taverna-language",
"path": "taverna-scufl2-api/src/main/java/org/apache/taverna/scufl2/api/annotation/Annotation.java",
"license": "apache-2.0",
"size": 4488
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,725,689 |
public List<MicrosoftGraphDirectoryObjectInner> transitiveMemberOf() {
return this.transitiveMemberOf;
} | List<MicrosoftGraphDirectoryObjectInner> function() { return this.transitiveMemberOf; } | /**
* Get the transitiveMemberOf property: The transitiveMemberOf property.
*
* @return the transitiveMemberOf value.
*/ | Get the transitiveMemberOf property: The transitiveMemberOf property | transitiveMemberOf | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/models/MicrosoftGraphUserInner.java",
"license": "mit",
"size": 120247
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 546,721 |
public void copy(EMFTreeComposite otherTreeComposite) {
// If null, return
if (otherTreeComposite == null) {
return;
}
if (otherTreeComposite.ecoreNodeMetaData != null) {
ecoreNodeMetaData = otherTreeComposite.ecoreNodeMetaData;
ecoreNode = EcoreUtil.create(ecoreNodeMetaData);
}
super.copy(oth... | void function(EMFTreeComposite otherTreeComposite) { if (otherTreeComposite == null) { return; } if (otherTreeComposite.ecoreNodeMetaData != null) { ecoreNodeMetaData = otherTreeComposite.ecoreNodeMetaData; ecoreNode = EcoreUtil.create(ecoreNodeMetaData); } super.copy(otherTreeComposite, true); return; } | /**
* This operation performs a deep copy of the attributes of another
* EMFTreeComposite into the current EMFTreeComposite. It copies ALL of the
* children of the EMFTreeComposite, data and child nodes alike.
*
* @param otherTreeComposite
*/ | This operation performs a deep copy of the attributes of another EMFTreeComposite into the current EMFTreeComposite. It copies ALL of the children of the EMFTreeComposite, data and child nodes alike | copy | {
"repo_name": "eclipse/ice",
"path": "org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/emf/EMFTreeComposite.java",
"license": "epl-1.0",
"size": 13563
} | [
"org.eclipse.emf.ecore.util.EcoreUtil"
] | import org.eclipse.emf.ecore.util.EcoreUtil; | import org.eclipse.emf.ecore.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,629,978 |
public List<Field> getFieldsOrderByName(final int rowStart,
final int numberOfResultsToShow, final String sortType) {
return fieldDAO.getFields(rowStart, numberOfResultsToShow, sortType);
}
| List<Field> function(final int rowStart, final int numberOfResultsToShow, final String sortType) { return fieldDAO.getFields(rowStart, numberOfResultsToShow, sortType); } | /**
* Get the fields based on the specified criteria, start and end position.
*
* @see edu.ur.ir.researcher.Field#getFields(java.util.List, int, int)
*/ | Get the fields based on the specified criteria, start and end position | getFieldsOrderByName | {
"repo_name": "nate-rcl/irplus",
"path": "ir_service/src/edu/ur/ir/researcher/service/DefaultFieldService.java",
"license": "apache-2.0",
"size": 3825
} | [
"edu.ur.ir.researcher.Field",
"java.util.List"
] | import edu.ur.ir.researcher.Field; import java.util.List; | import edu.ur.ir.researcher.*; import java.util.*; | [
"edu.ur.ir",
"java.util"
] | edu.ur.ir; java.util; | 2,141,029 |
@Test
public void testParseEveryXyears() {
final CronDefinition quartzDefinition = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ);
parser = new CronParser(quartzDefinition);
parser.parse("0/59 0/59 0/23 1/30 1/11 ? 2017/3");
} | void function() { final CronDefinition quartzDefinition = CronDefinitionBuilder.instanceDefinitionFor(CronType.QUARTZ); parser = new CronParser(quartzDefinition); parser.parse(STR); } | /**
* Corresponds to issue#148
* https://github.com/jmrozanec/cron-utils/issues/148
*/ | Corresponds to issue#148 HREF | testParseEveryXyears | {
"repo_name": "meincs/cron-utils",
"path": "src/test/java/com/cronutils/parser/CronParserTest.java",
"license": "apache-2.0",
"size": 9371
} | [
"com.cronutils.model.CronType",
"com.cronutils.model.definition.CronDefinition",
"com.cronutils.model.definition.CronDefinitionBuilder"
] | import com.cronutils.model.CronType; import com.cronutils.model.definition.CronDefinition; import com.cronutils.model.definition.CronDefinitionBuilder; | import com.cronutils.model.*; import com.cronutils.model.definition.*; | [
"com.cronutils.model"
] | com.cronutils.model; | 2,751,548 |
public Bundle getParams() {
return mParams;
} | Bundle function() { return mParams; } | /**
* Get command line parameters. On the command line when passing <code>-e key value</code>
* pairs, the {@link Bundle} will have the key value pairs conveniently available to the
* tests.
* @since API Level 16
*/ | Get command line parameters. On the command line when passing <code>-e key value</code> pairs, the <code>Bundle</code> will have the key value pairs conveniently available to the tests | getParams | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/testing/uiautomator/library/src/com/android/uiautomator/testrunner/UiAutomatorTestCase.java",
"license": "gpl-2.0",
"size": 4513
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 285,425 |
private boolean isSimStatusNotReady(String currentTab) {
boolean isStatusNotReady = true;
if (FeatureOption.MTK_GEMINI_SUPPORT) {
boolean isSimRdioOff = true;
if (TAB_SIM_1.equals(currentTab)) {
isSimRdioOff = (getSimIndicatorState(PhoneConstants.GEMINI_SIM_1)... | boolean function(String currentTab) { boolean isStatusNotReady = true; if (FeatureOption.MTK_GEMINI_SUPPORT) { boolean isSimRdioOff = true; if (TAB_SIM_1.equals(currentTab)) { isSimRdioOff = (getSimIndicatorState(PhoneConstants.GEMINI_SIM_1) == PhoneConstants.SIM_INDICATOR_RADIOOFF); } else if (TAB_SIM_2.equals(current... | /**
* M: DataUsage_Enhancement_fuction isSimStatusReady()
* Judge whetehr the SIM is radio off or Airplane Mode on
*/ | Judge whetehr the SIM is radio off or Airplane Mode on | isSimStatusNotReady | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Settings/src/com/android/settings/DataUsageSummary.java",
"license": "gpl-2.0",
"size": 144878
} | [
"com.android.internal.telephony.PhoneConstants",
"com.mediatek.common.featureoption.FeatureOption"
] | import com.android.internal.telephony.PhoneConstants; import com.mediatek.common.featureoption.FeatureOption; | import com.android.internal.telephony.*; import com.mediatek.common.featureoption.*; | [
"com.android.internal",
"com.mediatek.common"
] | com.android.internal; com.mediatek.common; | 2,395,331 |
protected static void classConstraintToString(State state, StringBuffer buffer,
ClassConstraint c, Query q, DatabaseSchema schema) throws ObjectStoreException {
QueryClass arg1 = c.getArg1();
QueryClass arg2QC = c.getArg2QueryClass();
InterMineObject arg2O = c.getArg2Object();
... | static void function(State state, StringBuffer buffer, ClassConstraint c, Query q, DatabaseSchema schema) throws ObjectStoreException { QueryClass arg1 = c.getArg1(); QueryClass arg2QC = c.getArg2QueryClass(); InterMineObject arg2O = c.getArg2Object(); queryClassToString(buffer, arg1, q, schema, ID_ONLY, state); buffer... | /**
* Converts a ClassConstraint object into a String suitable for putting in an SQL query.
*
* @param state the current SqlGenerator state
* @param buffer the StringBuffer to place text into
* @param c the ClassConstraint object
* @param q the Query
* @param schema the DatabaseSchema... | Converts a ClassConstraint object into a String suitable for putting in an SQL query | classConstraintToString | {
"repo_name": "julie-sullivan/phytomine",
"path": "intermine/objectstore/main/src/org/intermine/objectstore/intermine/SqlGenerator.java",
"license": "lgpl-2.1",
"size": 136780
} | [
"org.intermine.model.InterMineObject",
"org.intermine.objectstore.ObjectStoreException",
"org.intermine.objectstore.query.ClassConstraint",
"org.intermine.objectstore.query.Query",
"org.intermine.objectstore.query.QueryClass"
] | import org.intermine.model.InterMineObject; import org.intermine.objectstore.ObjectStoreException; import org.intermine.objectstore.query.ClassConstraint; import org.intermine.objectstore.query.Query; import org.intermine.objectstore.query.QueryClass; | import org.intermine.model.*; import org.intermine.objectstore.*; import org.intermine.objectstore.query.*; | [
"org.intermine.model",
"org.intermine.objectstore"
] | org.intermine.model; org.intermine.objectstore; | 2,668,480 |
public void seekToBeginning(TopicPartition... partitions) {
acquire();
try {
Collection<TopicPartition> parts = partitions.length == 0 ? this.subscriptions.assignedPartitions()
: Arrays.asList(partitions);
for (TopicPartition tp : parts)
su... | void function(TopicPartition... partitions) { acquire(); try { Collection<TopicPartition> parts = partitions.length == 0 ? this.subscriptions.assignedPartitions() : Arrays.asList(partitions); for (TopicPartition tp : parts) subscriptions.needOffsetReset(tp, OffsetResetStrategy.EARLIEST); } finally { release(); } } | /**
* Seek to the first offset for each of the given partitions
*/ | Seek to the first offset for each of the given partitions | seekToBeginning | {
"repo_name": "gdfm/kafka",
"path": "clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java",
"license": "apache-2.0",
"size": 65660
} | [
"java.util.Arrays",
"java.util.Collection",
"org.apache.kafka.common.TopicPartition"
] | import java.util.Arrays; import java.util.Collection; import org.apache.kafka.common.TopicPartition; | import java.util.*; import org.apache.kafka.common.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 2,575,438 |
Preconditions.checkArgument(obj != null, "null obj");
try {
if (RocksDBUtil.rocksObjectInitializedMethod == null) {
RocksDBUtil.rocksObjectInitializedMethod = RocksObject.class.getDeclaredMethod("isInitialized");
RocksDBUtil.rocksObjectInitializedMethod.setAccessible(... | Preconditions.checkArgument(obj != null, STR); try { if (RocksDBUtil.rocksObjectInitializedMethod == null) { RocksDBUtil.rocksObjectInitializedMethod = RocksObject.class.getDeclaredMethod(STR); RocksDBUtil.rocksObjectInitializedMethod.setAccessible(true); } return (Boolean)RocksDBUtil.rocksObjectInitializedMethod.invok... | /**
* Determine whether the given {@link RocksObject} is still valid, i.e., has not been deposed.
*
* @param obj object to check
* @return true if {@code obj} is still valid
* @throws IllegalArgumentException if {@code obj} is null
*/ | Determine whether the given <code>RocksObject</code> is still valid, i.e., has not been deposed | isInitialized | {
"repo_name": "tempbottle/jsimpledb",
"path": "src/java/org/jsimpledb/kv/rocksdb/RocksDBUtil.java",
"license": "apache-2.0",
"size": 1263
} | [
"com.google.common.base.Preconditions",
"org.rocksdb.RocksObject"
] | import com.google.common.base.Preconditions; import org.rocksdb.RocksObject; | import com.google.common.base.*; import org.rocksdb.*; | [
"com.google.common",
"org.rocksdb"
] | com.google.common; org.rocksdb; | 547,590 |
public void setCategoryLabelPositions(CategoryLabelPositions positions) {
if (positions == null) {
throw new IllegalArgumentException("Null 'positions' argument.");
}
this.categoryLabelPositions = positions;
notifyListeners(new AxisChangeEvent(this));
}
... | void function(CategoryLabelPositions positions) { if (positions == null) { throw new IllegalArgumentException(STR); } this.categoryLabelPositions = positions; notifyListeners(new AxisChangeEvent(this)); } | /**
* Sets the category label position specification for the axis and sends an
* {@link AxisChangeEvent} to all registered listeners.
*
* @param positions the positions (<code>null</code> not permitted).
*
* @see #getCategoryLabelPositions()
*/ | Sets the category label position specification for the axis and sends an <code>AxisChangeEvent</code> to all registered listeners | setCategoryLabelPositions | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/axis/CategoryAxis.java",
"license": "gpl-2.0",
"size": 49059
} | [
"org.jfree.chart.event.AxisChangeEvent"
] | import org.jfree.chart.event.AxisChangeEvent; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,423,277 |
public void canonicalizeXPathNodeSet(Set<Node> xpathNodeSet, OutputStream writer)
throws CanonicalizationException {
canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet, writer);
} | void function(Set<Node> xpathNodeSet, OutputStream writer) throws CanonicalizationException { canonicalizerSpi.engineCanonicalizeXPathNodeSet(xpathNodeSet, writer); } | /**
* Canonicalizes an XPath node set.
*
* @param xpathNodeSet
* @param writer OutputStream to write the canonicalization result
* @throws CanonicalizationException
*/ | Canonicalizes an XPath node set | canonicalizeXPathNodeSet | {
"repo_name": "apache/santuario-java",
"path": "src/main/java/org/apache/xml/security/c14n/Canonicalizer.java",
"license": "apache-2.0",
"size": 11344
} | [
"java.io.OutputStream",
"java.util.Set",
"org.w3c.dom.Node"
] | import java.io.OutputStream; import java.util.Set; import org.w3c.dom.Node; | import java.io.*; import java.util.*; import org.w3c.dom.*; | [
"java.io",
"java.util",
"org.w3c.dom"
] | java.io; java.util; org.w3c.dom; | 191,451 |
public synchronized void shutdown() {
// remove runner listener
DarkstarWebLoginFactory.getInstance().removeDarkstarServerListener(this);
// shutdown sessions
for (ServerManagerSession session : sessions.values()) {
session.logout();
}
} | synchronized void function() { DarkstarWebLoginFactory.getInstance().removeDarkstarServerListener(this); for (ServerManagerSession session : sessions.values()) { session.logout(); } } | /**
* Shut down the collector and remove all registered listeners
*/ | Shut down the collector and remove all registered listeners | shutdown | {
"repo_name": "AsherBond/MondocosmOS",
"path": "wonderland/modules/tools/server-manager/src/classes/org/jdesktop/wonderland/servermanager/client/PingDataCollector.java",
"license": "agpl-3.0",
"size": 9801
} | [
"org.jdesktop.wonderland.modules.darkstar.api.weblib.DarkstarWebLoginFactory"
] | import org.jdesktop.wonderland.modules.darkstar.api.weblib.DarkstarWebLoginFactory; | import org.jdesktop.wonderland.modules.darkstar.api.weblib.*; | [
"org.jdesktop.wonderland"
] | org.jdesktop.wonderland; | 2,276,941 |
@Test
@Ignore
// TODO: #8511 - Recursive call hangs waiting for lock instead of throwing BeanNotReentrant exception
public void testSFRemoteInterfaceMethod_NonReentrantRecursive() throws Exception {
SFRTestReentrance ejb1 = null;
try {
ejb1 = rhome1.create();
ejb1... | void function() throws Exception { SFRTestReentrance ejb1 = null; try { ejb1 = rhome1.create(); ejb1.callNonRecursiveSelf(5, ejb1); fail(STR); } catch (SFRApplException bae) { String className = bae.getClass().getName(); assertTrue(STR + className + STR + bae, bae.passed); } finally { if (ejb1 != null) { ejb1.remove();... | /**
* (bmc06) Test Stateful remote non-reentrant recursive method call. <p>
*
* See EJB 2.0 Spec section 12.1.11.
*/ | (bmc06) Test Stateful remote non-reentrant recursive method call. See EJB 2.0 Spec section 12.1.11 | testSFRemoteInterfaceMethod_NonReentrantRecursive | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XRemoteSpecWeb.war/src/com/ibm/ejb2x/base/spec/sfr/web/SFRemoteInterfaceMethodServlet.java",
"license": "epl-1.0",
"size": 13304
} | [
"com.ibm.ejb2x.base.spec.sfr.ejb.SFRApplException",
"com.ibm.ejb2x.base.spec.sfr.ejb.SFRTestReentrance",
"org.junit.Assert"
] | import com.ibm.ejb2x.base.spec.sfr.ejb.SFRApplException; import com.ibm.ejb2x.base.spec.sfr.ejb.SFRTestReentrance; import org.junit.Assert; | import com.ibm.ejb2x.base.spec.sfr.ejb.*; import org.junit.*; | [
"com.ibm.ejb2x",
"org.junit"
] | com.ibm.ejb2x; org.junit; | 1,310,729 |
void onApplicationEvent(@Nonnull E event); | void onApplicationEvent(@Nonnull E event); | /**
* Handles an event of type {@link E}.
*
* @param event the inbound event
*/ | Handles an event of type <code>E</code> | onApplicationEvent | {
"repo_name": "spinnaker/kork",
"path": "kork-plugins-api/src/main/java/com/netflix/spinnaker/kork/plugins/api/events/SpinnakerEventListener.java",
"license": "apache-2.0",
"size": 1196
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 737,325 |
@Override
public void setElement(IAdaptable element) {
this.element = element;
} | void function(IAdaptable element) { this.element = element; } | /**
* Sets the element that owns properties shown on this page.
*
* @param element the element
*/ | Sets the element that owns properties shown on this page | setElement | {
"repo_name": "bobwalker99/Pydev",
"path": "plugins/org.python.pydev/src/org/python/pydev/ui/PyProjectPythonDetails.java",
"license": "epl-1.0",
"size": 18635
} | [
"org.eclipse.core.runtime.IAdaptable"
] | import org.eclipse.core.runtime.IAdaptable; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,394,258 |
void promptToConfigureDocumentation(PsiElement element); | void promptToConfigureDocumentation(PsiElement element); | /**
* Prompts the user to configure the external documentation for an element if none was found.
*
* @param element the element for which no documentation was found
*/ | Prompts the user to configure the external documentation for an element if none was found | promptToConfigureDocumentation | {
"repo_name": "android-ia/platform_tools_idea",
"path": "platform/lang-api/src/com/intellij/lang/documentation/ExternalDocumentationProvider.java",
"license": "apache-2.0",
"size": 2284
} | [
"com.intellij.psi.PsiElement"
] | import com.intellij.psi.PsiElement; | import com.intellij.psi.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 832,994 |
int readlink(String filename, Memory buffer, NativeLong size);
public static final GNUCLibrary LIBC = (GNUCLibrary) Native.loadLibrary("c",GNUCLibrary.class); | int readlink(String filename, Memory buffer, NativeLong size); public static final GNUCLibrary LIBC = (GNUCLibrary) Native.loadLibrary("c",GNUCLibrary.class); | /**
* Read a symlink. The name will be copied into the specified memory, and returns the number of
* bytes copied. The string is not null-terminated.
*
* @return
* if the return value equals size, the caller needs to retry with a bigger buffer.
* If -1, error.
*/ | Read a symlink. The name will be copied into the specified memory, and returns the number of bytes copied. The string is not null-terminated | readlink | {
"repo_name": "sincere520/testGitRepo",
"path": "hudson-core/src/main/java/hudson/util/jna/GNUCLibrary.java",
"license": "mit",
"size": 3875
} | [
"com.sun.jna.Memory",
"com.sun.jna.Native",
"com.sun.jna.NativeLong"
] | import com.sun.jna.Memory; import com.sun.jna.Native; import com.sun.jna.NativeLong; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 679,366 |
public void setOnDiscardFromExtraActionListener(@Nullable OnDiscardFromExtraActionListener onDiscardFromExtraActionListener) {
this.onDiscardFromExtraActionListener = onDiscardFromExtraActionListener;
} | void function(@Nullable OnDiscardFromExtraActionListener onDiscardFromExtraActionListener) { this.onDiscardFromExtraActionListener = onDiscardFromExtraActionListener; } | /**
* Sets the callback that will be called when the dialog is closed due a extra action button click.
* @param onDiscardFromExtraActionListener
*/ | Sets the callback that will be called when the dialog is closed due a extra action button click | setOnDiscardFromExtraActionListener | {
"repo_name": "franmontiel/FullScreenDialog",
"path": "library/src/main/java/com/franmontiel/fullscreendialog/FullScreenDialogFragment.java",
"license": "apache-2.0",
"size": 21190
} | [
"android.support.annotation.Nullable"
] | import android.support.annotation.Nullable; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 116,985 |
public static void write(
ChannelHandlerContext ctx, ChannelFuture future,
Object message, SocketAddress remoteAddress) {
ctx.sendDownstream(
new DownstreamMessageEvent(ctx.getChannel(), future, message, remoteAddress));
} | static void function( ChannelHandlerContext ctx, ChannelFuture future, Object message, SocketAddress remoteAddress) { ctx.sendDownstream( new DownstreamMessageEvent(ctx.getChannel(), future, message, remoteAddress)); } | /**
* Sends a {@code "write"} request to the
* {@link ChannelDownstreamHandler} which is placed in the closest
* downstream from the handler associated with the specified
* {@link ChannelHandlerContext}.
*
* @param ctx the context
* @param future the future which will be notified... | Sends a "write" request to the <code>ChannelDownstreamHandler</code> which is placed in the closest downstream from the handler associated with the specified <code>ChannelHandlerContext</code> | write | {
"repo_name": "codefollower/Open-Source-Research",
"path": "Douyu-0.7.1/douyu-netty/src/main/java/com/codefollower/douyu/netty/channel/Channels.java",
"license": "apache-2.0",
"size": 28973
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,971,729 |
EAttribute getCoverageSummaryType_SupportedFormat(); | EAttribute getCoverageSummaryType_SupportedFormat(); | /**
* Returns the meta object for the attribute '{@link net.opengis.wcs11.CoverageSummaryType#getSupportedFormat <em>Supported Format</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Supported Format</em>'.
* @see net.opengis.wcs11.CoverageSummaryType#... | Returns the meta object for the attribute '<code>net.opengis.wcs11.CoverageSummaryType#getSupportedFormat Supported Format</code>'. | getCoverageSummaryType_SupportedFormat | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wcs/src/net/opengis/wcs11/Wcs11Package.java",
"license": "lgpl-2.1",
"size": 160605
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 895,591 |
public static InitialContext getInitialContext(String jndiServerName) throws GenericConfigException {
InitialContext ic = contexts.get(jndiServerName);
if (ic == null) {
JNDIConfigUtil.JndiServerInfo jndiServerInfo = JNDIConfigUtil.getJndiServerInfo(jndiServerName);
if (jnd... | static InitialContext function(String jndiServerName) throws GenericConfigException { InitialContext ic = contexts.get(jndiServerName); if (ic == null) { JNDIConfigUtil.JndiServerInfo jndiServerInfo = JNDIConfigUtil.getJndiServerInfo(jndiServerName); if (jndiServerInfo == null) { throw new GenericConfigException(STR + ... | /**
* Return the initial context according to the entityengine.xml parameters that correspond to the given prefix
* @return the JNDI initial context
*/ | Return the initial context according to the entityengine.xml parameters that correspond to the given prefix | getInitialContext | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-17.12.04/framework/base/src/main/java/org/apache/ofbiz/base/util/JNDIContextFactory.java",
"license": "apache-2.0",
"size": 4016
} | [
"java.util.Hashtable",
"javax.naming.Context",
"javax.naming.InitialContext",
"org.apache.ofbiz.base.config.GenericConfigException",
"org.apache.ofbiz.base.config.JNDIConfigUtil"
] | import java.util.Hashtable; import javax.naming.Context; import javax.naming.InitialContext; import org.apache.ofbiz.base.config.GenericConfigException; import org.apache.ofbiz.base.config.JNDIConfigUtil; | import java.util.*; import javax.naming.*; import org.apache.ofbiz.base.config.*; | [
"java.util",
"javax.naming",
"org.apache.ofbiz"
] | java.util; javax.naming; org.apache.ofbiz; | 1,040,273 |
@Override()
public java.lang.Class getJavaClass(
) {
return org.chocolate_milk.model.CreditCardChargeModRqType.class;
} | @Override() java.lang.Class function( ) { return org.chocolate_milk.model.CreditCardChargeModRqType.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "galleon1/chocolate-milk",
"path": "src/org/chocolate_milk/model/descriptors/CreditCardChargeModRqTypeDescriptor.java",
"license": "lgpl-3.0",
"size": 10197
} | [
"org.chocolate_milk.model.CreditCardChargeModRqType"
] | import org.chocolate_milk.model.CreditCardChargeModRqType; | import org.chocolate_milk.model.*; | [
"org.chocolate_milk.model"
] | org.chocolate_milk.model; | 624,211 |
private TestMetadataServiceHandlerImpl prepareTestConstructsForWsdl(ServiceId serviceId) throws Exception {
final ServiceId requestingWsdlForService = ServiceId.create(DEFAULT_CLIENT, "someServiceWithWsdl122");
TestMetadataServiceHandlerImpl handlerToTest = new TestMetadataServiceHandlerImpl();
... | TestMetadataServiceHandlerImpl function(ServiceId serviceId) throws Exception { final ServiceId requestingWsdlForService = ServiceId.create(DEFAULT_CLIENT, STR); TestMetadataServiceHandlerImpl handlerToTest = new TestMetadataServiceHandlerImpl(); WsdlRequestData wsdlRequestData = new WsdlRequestData(); wsdlRequestData.... | /**
* Prepare TestMetadataServiceHandlerImpl, wiremock, et al for get WSDL tests
*/ | Prepare TestMetadataServiceHandlerImpl, wiremock, et al for get WSDL tests | prepareTestConstructsForWsdl | {
"repo_name": "ria-ee/X-Road",
"path": "src/addons/metaservice/src/test/java/ee/ria/xroad/proxy/serverproxy/MetadataServiceHandlerTest.java",
"license": "mit",
"size": 29238
} | [
"com.github.tomakehurst.wiremock.client.WireMock",
"ee.ria.xroad.common.identifier.ServiceId",
"ee.ria.xroad.proxy.common.WsdlRequestData",
"ee.ria.xroad.proxy.util.MetaserviceTestUtil",
"java.io.InputStream",
"org.mockito.Mockito"
] | import com.github.tomakehurst.wiremock.client.WireMock; import ee.ria.xroad.common.identifier.ServiceId; import ee.ria.xroad.proxy.common.WsdlRequestData; import ee.ria.xroad.proxy.util.MetaserviceTestUtil; import java.io.InputStream; import org.mockito.Mockito; | import com.github.tomakehurst.wiremock.client.*; import ee.ria.xroad.common.identifier.*; import ee.ria.xroad.proxy.common.*; import ee.ria.xroad.proxy.util.*; import java.io.*; import org.mockito.*; | [
"com.github.tomakehurst",
"ee.ria.xroad",
"java.io",
"org.mockito"
] | com.github.tomakehurst; ee.ria.xroad; java.io; org.mockito; | 1,581,656 |
interface WithPeer {
Update withPeer(SubResource peer);
} | interface WithPeer { Update withPeer(SubResource peer); } | /**
* Specifies peer.
* @param peer The reference to peerings resource
* @return the next update stage
*/ | Specifies peer | withPeer | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/VirtualNetworkGatewayConnection.java",
"license": "mit",
"size": 20944
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 439,020 |
public int createTextureObject() {
int[] textures = new int[1];
GLES20.glGenTextures(1, textures, 0);
GlUtil.checkGlError("glGenTextures");
int texId = textures[0];
GLES20.glBindTexture(mTextureTarget, texId);
GlUtil.checkGlError("glBindTexture " + texId);
G... | int function() { int[] textures = new int[1]; GLES20.glGenTextures(1, textures, 0); GlUtil.checkGlError(STR); int texId = textures[0]; GLES20.glBindTexture(mTextureTarget, texId); GlUtil.checkGlError(STR + texId); GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST)... | /**
* Creates a texture object suitable for use with this program.
* <p>
* On exit, the texture will be bound.
*/ | Creates a texture object suitable for use with this program. On exit, the texture will be bound | createTextureObject | {
"repo_name": "pili-engineering/PLDroidShortVideo",
"path": "ShortVideoUIDemo/faceunity/src/main/java/com/faceunity/gles/Texture2dProgram.java",
"license": "apache-2.0",
"size": 14872
} | [
"android.opengl.GLES11Ext",
"com.faceunity.gles.core.GlUtil"
] | import android.opengl.GLES11Ext; import com.faceunity.gles.core.GlUtil; | import android.opengl.*; import com.faceunity.gles.core.*; | [
"android.opengl",
"com.faceunity.gles"
] | android.opengl; com.faceunity.gles; | 696,463 |
protected void reset() {
if (parentList != null) {
parentList.itemChanged();
}
}
}
protected class LengthListBuilder implements LengthListHandler {
protected ListHandler listHandler;
protected float currentValue;
... | void function() { if (parentList != null) { parentList.itemChanged(); } } } protected class LengthListBuilder implements LengthListHandler { protected ListHandler listHandler; protected float currentValue; protected short currentType; public LengthListBuilder(ListHandler listHandler) { this.listHandler = listHandler; } | /**
* Notifies the parent list that this item has changed.
*/ | Notifies the parent list that this item has changed | reset | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/AbstractSVGLengthList.java",
"license": "apache-2.0",
"size": 10061
} | [
"org.apache.flex.forks.batik.parser.LengthListHandler"
] | import org.apache.flex.forks.batik.parser.LengthListHandler; | import org.apache.flex.forks.batik.parser.*; | [
"org.apache.flex"
] | org.apache.flex; | 2,888,853 |
public static java.util.List extractOutpatientNotesOutcomeList(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.OutpatientNotesOutcomeVoCollection voCollection)
{
return extractOutpatientNotesOutcomeList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.OutpatientNotesOutcomeVoCollection voCollection) { return extractOutpatientNotesOutcomeList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.clinical.domain.objects.OutpatientNotesOutcome list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.clinical.domain.objects.OutpatientNotesOutcome list from the value object collection | extractOutpatientNotesOutcomeList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/OutpatientNotesOutcomeVoAssembler.java",
"license": "agpl-3.0",
"size": 24330
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,541,868 |
@POST
@Path("{path:.*}")
@Consumes({"*/*"})
@Produces({MediaType.APPLICATION_JSON})
public Response post(InputStream is,
@Context UriInfo uriInfo,
@PathParam("path") String path,
@QueryParam(OperationParam.NAME) OperationParam op,
... | @Path(STR) @Consumes({"*/*"}) @Produces({MediaType.APPLICATION_JSON}) Response function(InputStream is, @Context UriInfo uriInfo, @PathParam("path") String path, @QueryParam(OperationParam.NAME) OperationParam op, @Context Parameters params) throws IOException, FileSystemAccessException { UserGroupInformation user = Ht... | /**
* Binding to handle POST requests.
*
* @param is the inputstream for the request payload.
* @param uriInfo the of the request.
* @param path the path for operation.
* @param op the HttpFS operation of the request.
* @param params the HttpFS parameters of the request.
*
* @return the reque... | Binding to handle POST requests | post | {
"repo_name": "ZhangXFeng/hadoop",
"path": "src/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java",
"license": "apache-2.0",
"size": 26596
} | [
"java.io.IOException",
"java.io.InputStream",
"java.text.MessageFormat",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"javax.ws.rs.co... | import java.io.IOException; import java.io.InputStream; import java.text.MessageFormat; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.c... | import java.io.*; import java.text.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.hadoop.fs.http.client.*; import org.apache.hadoop.fs.http.server.*; import org.apache.hadoop.lib.service.*; import org.apache.hadoop.lib.wsrs.*; import org.apache.hadoop.security.*; import org.apache.hadoop.security... | [
"java.io",
"java.text",
"javax.ws",
"org.apache.hadoop",
"org.slf4j"
] | java.io; java.text; javax.ws; org.apache.hadoop; org.slf4j; | 2,792,488 |
protected Point restoreContextSelectorPopupSize() {
if (fDialogSettings == null)
return null;
Point size= new Point(-1, -1);
try {
size.x= fDialogSettings.getInt(STORE_CONTEXT_SELECTOR_POPUP_SIZE_X);
size.y= fDialogSettings.getInt(STORE_CONTEXT_SELECTOR_POPUP_SIZE_Y);
} catch (NumberFormatExceptio... | Point function() { if (fDialogSettings == null) return null; Point size= new Point(-1, -1); try { size.x= fDialogSettings.getInt(STORE_CONTEXT_SELECTOR_POPUP_SIZE_X); size.y= fDialogSettings.getInt(STORE_CONTEXT_SELECTOR_POPUP_SIZE_Y); } catch (NumberFormatException ex) { return null; } if (size.x == -1 && size.y == -1... | /**
* Restores the content assist's context selector pop-up size.
*
* @return the stored size or <code>null</code> if none
* @since 3.9
*/ | Restores the content assist's context selector pop-up size | restoreContextSelectorPopupSize | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.jface.text/src/org/eclipse/jface/text/contentassist/ContentAssistant.java",
"license": "epl-1.0",
"size": 84430
} | [
"org.eclipse.swt.graphics.Point",
"org.eclipse.swt.graphics.Rectangle",
"org.eclipse.swt.widgets.Display"
] | import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Display; | import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,193,771 |
public static VerificationConstraint extract(Map<?,?> map, String key) throws ConstraintException
{
VerificationConstraint instance = new VerificationConstraint();
instance.setExists(map.containsKey(key));
if (instance.exists())
{
fill(instance, map.get(key), key);
... | static VerificationConstraint function(Map<?,?> map, String key) throws ConstraintException { VerificationConstraint instance = new VerificationConstraint(); instance.setExists(map.containsKey(key)); if (instance.exists()) { fill(instance, map.get(key), key); } return instance; } | /**
* Create a {@code VerificationConstraint} instance from an object in the given map.
*
* @param map
* A map that may contain {@code "verification"}.
*
* @param key
* The key that identifies the object in the map. In normal cases,
* the key is {@code "ve... | Create a VerificationConstraint instance from an object in the given map | extract | {
"repo_name": "authlete/authlete-java-common",
"path": "src/main/java/com/authlete/common/assurance/constraint/VerificationConstraint.java",
"license": "apache-2.0",
"size": 5611
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 421,701 |
public void train(int[][] docWords, ArrayList<Integer> docIndices) {
this.docIndices = docIndices;
if (this.docIndices == null) { // add all documents
this.docIndices = new ArrayList<>();
for (int dd = 0; dd < docWords.length; dd++) {
this.docIndices.add(dd);
... | void function(int[][] docWords, ArrayList<Integer> docIndices) { this.docIndices = docIndices; if (this.docIndices == null) { this.docIndices = new ArrayList<>(); for (int dd = 0; dd < docWords.length; dd++) { this.docIndices.add(dd); } } this.numTokens = 0; this.D = this.docIndices.size(); this.words = new int[D][]; t... | /**
* Set training data.
*
* @param docWords All documents
* @param docIndices Indices of selected documents. If this is null, all
* documents are considered.
*/ | Set training data | train | {
"repo_name": "vietansegan/segan",
"path": "src/sampler/unsupervised/NLDA.java",
"license": "apache-2.0",
"size": 41623
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 402,126 |
public static void setPriority(Priority priority) {
Hierarchy.getDefaultHierarchy().setDefaultPriority(priority);
} | static void function(Priority priority) { Hierarchy.getDefaultHierarchy().setDefaultPriority(priority); } | /**
* Set the default logging priority.
*
* @param priority e.g. Priority.DEBUG
*/ | Set the default logging priority | setPriority | {
"repo_name": "ubikfsabbe/jmeter",
"path": "src/jorphan/org/apache/jorphan/logging/LoggingManager.java",
"license": "apache-2.0",
"size": 14455
} | [
"org.apache.log.Hierarchy",
"org.apache.log.Priority"
] | import org.apache.log.Hierarchy; import org.apache.log.Priority; | import org.apache.log.*; | [
"org.apache.log"
] | org.apache.log; | 1,521,610 |
public static CopyParticipant[] loadCopyParticipants(RefactoringStatus status, RefactoringProcessor processor, Object element, CopyArguments arguments, String affectedNatures[], SharableParticipants shared) {
return loadCopyParticipants(status, processor, element, arguments, null, affectedNatures, shared);
} | static CopyParticipant[] function(RefactoringStatus status, RefactoringProcessor processor, Object element, CopyArguments arguments, String affectedNatures[], SharableParticipants shared) { return loadCopyParticipants(status, processor, element, arguments, null, affectedNatures, shared); } | /**
* Loads the copy participants for the given element.
*
* @param status a refactoring status to report status if problems occurred while
* loading the participants
* @param processor the processor that will own the participants
* @param element the element to be copied or a corresponding descriptor
* ... | Loads the copy participants for the given element | loadCopyParticipants | {
"repo_name": "dhuebner/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/src/main/java/org/eclipse/ltk/core/refactoring/participants/ParticipantManager.java",
"license": "epl-1.0",
"size": 13612
} | [
"org.eclipse.ltk.core.refactoring.RefactoringStatus"
] | import org.eclipse.ltk.core.refactoring.RefactoringStatus; | import org.eclipse.ltk.core.refactoring.*; | [
"org.eclipse.ltk"
] | org.eclipse.ltk; | 1,112,555 |
private void setSigninPromoDeclined() {
SharedPreferences.Editor sharedPreferencesEditor =
PreferenceManager.getDefaultSharedPreferences(mContext).edit();
sharedPreferencesEditor.putBoolean(PREF_SIGNIN_PROMO_DECLINED, true);
sharedPreferencesEditor.apply();
} | void function() { SharedPreferences.Editor sharedPreferencesEditor = PreferenceManager.getDefaultSharedPreferences(mContext).edit(); sharedPreferencesEditor.putBoolean(PREF_SIGNIN_PROMO_DECLINED, true); sharedPreferencesEditor.apply(); } | /**
* Save that user tapped "No" button on the signin promo header.
*/ | Save that user tapped "No" button on the signin promo header | setSigninPromoDeclined | {
"repo_name": "was4444/chromium.src",
"path": "chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkPromoHeader.java",
"license": "bsd-3-clause",
"size": 5799
} | [
"android.content.SharedPreferences",
"android.preference.PreferenceManager"
] | import android.content.SharedPreferences; import android.preference.PreferenceManager; | import android.content.*; import android.preference.*; | [
"android.content",
"android.preference"
] | android.content; android.preference; | 2,132,797 |
public List<MaskSection> getSections() {
return sections;
} | List<MaskSection> function() { return sections; } | /**
* Returns a list containing all the mask fragments
*/ | Returns a list containing all the mask fragments | getSections | {
"repo_name": "jhrcek/kie-wb-common",
"path": "kie-wb-common-forms/kie-wb-common-forms-commons/kie-wb-common-forms-common-rendering/kie-wb-common-forms-common-rendering-shared/src/main/java/org/kie/workbench/common/forms/commons/rendering/shared/util/masks/MaskInterpreter.java",
"license": "apache-2.0",
"size"... | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 614,775 |
public void subscribeToDeviceCommands(String deviceType, String deviceId, String command, String format) {
try {
String newTopic = "iot-2/type/"+deviceType+"/id/"+deviceId+"/cmd/" + command + "/fmt/" + format;
subscriptions.put(newTopic, new Integer(0));
mqttAsyncClient.subscribe(newTopic, 0);
} catch (... | void function(String deviceType, String deviceId, String command, String format) { try { String newTopic = STR+deviceType+"/id/"+deviceId+"/cmd/" + command + "/fmt/" + format; subscriptions.put(newTopic, new Integer(0)); mqttAsyncClient.subscribe(newTopic, 0); } catch (MqttException e) { e.printStackTrace(); } } | /**
* Subscribe to device commands, on the behalf of a device, for the IBM Internet of Things Foundation. <br>
* Quality of Service is set to 0
* @param deviceType
* object of String which denotes deviceType
* @param deviceId
* object of String which denotes deviceId
* @param comman... | Subscribe to device commands, on the behalf of a device, for the IBM Internet of Things Foundation. Quality of Service is set to 0 | subscribeToDeviceCommands | {
"repo_name": "BorisDaich/iot-java",
"path": "src/com/ibm/iotf/client/app/ApplicationClient.java",
"license": "epl-1.0",
"size": 24050
} | [
"org.eclipse.paho.client.mqttv3.MqttException"
] | import org.eclipse.paho.client.mqttv3.MqttException; | import org.eclipse.paho.client.mqttv3.*; | [
"org.eclipse.paho"
] | org.eclipse.paho; | 1,013,487 |
public void stopMiniAccumulo() throws IOException, InterruptedException {
if(cluster != null) {
try {
log.info("Shutting down the Mini Accumulo being used as a Rya store.");
cluster.stop();
log.info("Mini Accumulo being used as a Rya store shut dow... | void function() throws IOException, InterruptedException { if(cluster != null) { try { log.info(STR); cluster.stop(); log.info(STR); } catch(final Exception e) { log.error(STR, e); } } } | /**
* Stop the {@link MiniAccumuloCluster}.
*/ | Stop the <code>MiniAccumuloCluster</code> | stopMiniAccumulo | {
"repo_name": "apache/incubator-rya",
"path": "test/accumulo/src/main/java/org/apache/rya/test/accumulo/MiniAccumuloClusterInstance.java",
"license": "apache-2.0",
"size": 3800
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,368,889 |
public SchematicEntry get( String key ); | SchematicEntry function( String key ); | /**
* Get the entry with the supplied key.
*
* @param key the key or identifier for the document
* @return the entry, or null if there was no document with the supplied key
* @throws DocumentStoreException if there is a problem retrieving the document
*/ | Get the entry with the supplied key | get | {
"repo_name": "stemig62/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/document/DocumentStore.java",
"license": "apache-2.0",
"size": 10008
} | [
"org.infinispan.schematic.SchematicEntry"
] | import org.infinispan.schematic.SchematicEntry; | import org.infinispan.schematic.*; | [
"org.infinispan.schematic"
] | org.infinispan.schematic; | 120,097 |
public static <T> HotSwappingWith<T> proxy(final Class<T> primaryType, final Class<?> ... types) {
return new HotSwappingWith<T>(new HotSwapping<T>(primaryType, types));
}
/**
* Create a proxy with hot swapping capabilities for specific types of the delegate given with an
* {@link ObjectR... | static <T> HotSwappingWith<T> function(final Class<T> primaryType, final Class<?> ... types) { return new HotSwappingWith<T>(new HotSwapping<T>(primaryType, types)); } /** * Create a proxy with hot swapping capabilities for specific types of the delegate given with an * {@link ObjectReference}. The delegate must implem... | /**
* Creates a factory for proxy instances that allow the exchange of delegated instances.
*
* @param primaryType the primary type implemented by the proxy
* @param types other types that are implemented by the proxy
* @param <T> the proxied type
* @return a factory that will proxy instan... | Creates a factory for proxy instances that allow the exchange of delegated instances | proxy | {
"repo_name": "proxytoys/proxytoys",
"path": "proxytoys/src/main/java/com/thoughtworks/proxy/toys/hotswap/HotSwapping.java",
"license": "bsd-3-clause",
"size": 6801
} | [
"com.thoughtworks.proxy.ProxyFactory",
"com.thoughtworks.proxy.kit.ObjectReference"
] | import com.thoughtworks.proxy.ProxyFactory; import com.thoughtworks.proxy.kit.ObjectReference; | import com.thoughtworks.proxy.*; import com.thoughtworks.proxy.kit.*; | [
"com.thoughtworks.proxy"
] | com.thoughtworks.proxy; | 505,595 |
private void startSubscriptionAttributes(Attributes atts) {
String ip = atts.getValue(INTEREST_POLICY);
SubscriptionAttributes sa;
if (ip == null) {
sa = new SubscriptionAttributes();
} else if (ip.equals(ALL)) {
sa = new SubscriptionAttributes(InterestPolicy.ALL);
} else if (ip.equals... | void function(Attributes atts) { String ip = atts.getValue(INTEREST_POLICY); SubscriptionAttributes sa; if (ip == null) { sa = new SubscriptionAttributes(); } else if (ip.equals(ALL)) { sa = new SubscriptionAttributes(InterestPolicy.ALL); } else if (ip.equals(CACHE_CONTENT)) { sa = new SubscriptionAttributes(InterestPo... | /**
* When a <code>subscription-attributes</code> element is first encountered, we create an
* SubscriptionAttibutes?? object from the element's attributes and stick it in the current region
* attributes.
*/ | When a <code>subscription-attributes</code> element is first encountered, we create an SubscriptionAttibutes?? object from the element's attributes and stick it in the current region attributes | startSubscriptionAttributes | {
"repo_name": "pdxrunner/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java",
"license": "apache-2.0",
"size": 128922
} | [
"org.apache.geode.InternalGemFireException",
"org.apache.geode.cache.InterestPolicy",
"org.apache.geode.cache.SubscriptionAttributes",
"org.xml.sax.Attributes"
] | import org.apache.geode.InternalGemFireException; import org.apache.geode.cache.InterestPolicy; import org.apache.geode.cache.SubscriptionAttributes; import org.xml.sax.Attributes; | import org.apache.geode.*; import org.apache.geode.cache.*; import org.xml.sax.*; | [
"org.apache.geode",
"org.xml.sax"
] | org.apache.geode; org.xml.sax; | 2,274,137 |
AcceptsOneWidget getStatusPanel(); | AcceptsOneWidget getStatusPanel(); | /**
* Returns status panel ( an information panel located under actions panel )
*
* @return status panel
*/ | Returns status panel ( an information panel located under actions panel ) | getStatusPanel | {
"repo_name": "codenvy/che-core",
"path": "ide/che-core-ide-app/src/main/java/org/eclipse/che/ide/workspace/WorkspaceView.java",
"license": "epl-1.0",
"size": 2375
} | [
"com.google.gwt.user.client.ui.AcceptsOneWidget"
] | import com.google.gwt.user.client.ui.AcceptsOneWidget; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 78,731 |
public boolean isNull() throws SQLException
{
if ( rs != null ) { return rs.isNull(columnNumber); }
else { return (_clob == null) && (_blob == null); }
} | boolean function() throws SQLException { if ( rs != null ) { return rs.isNull(columnNumber); } else { return (_clob == null) && (_blob == null); } } | /**
* Is the value null? Null status is obtained from the underlying
* EngineResultSet or LOB, so that it can be determined before the stream
* is retrieved.
*
* @return true if this value is null
*
*/ | Is the value null? Null status is obtained from the underlying EngineResultSet or LOB, so that it can be determined before the stream is retrieved | isNull | {
"repo_name": "kavin256/Derby",
"path": "java/drda/org/apache/derby/impl/drda/EXTDTAInputStream.java",
"license": "apache-2.0",
"size": 9267
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,641,281 |
int getDatanodeWriteTimeout(int numNodes) {
return (dfsClientConf.confTime > 0) ?
(dfsClientConf.confTime + HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * numNodes) : 0;
} | int getDatanodeWriteTimeout(int numNodes) { return (dfsClientConf.confTime > 0) ? (dfsClientConf.confTime + HdfsServerConstants.WRITE_TIMEOUT_EXTENSION * numNodes) : 0; } | /**
* Return the timeout that clients should use when writing to datanodes.
* @param numNodes the number of nodes in the pipeline.
*/ | Return the timeout that clients should use when writing to datanodes | getDatanodeWriteTimeout | {
"repo_name": "yelshater/hadoop-2.3.0",
"path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/DFSClient.java",
"license": "apache-2.0",
"size": 108346
} | [
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants"
] | import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; | import org.apache.hadoop.hdfs.server.common.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,161,294 |
public static OneResponse snapshotDelete(Client client, int id, int snapId)
{
return client.call(SNAPSHOTDELETE, id, snapId);
} | static OneResponse function(Client client, int id, int snapId) { return client.call(SNAPSHOTDELETE, id, snapId); } | /**
* Deletes a VM snapshot.
*
* @param client XML-RPC Client.
* @param id The VM id of the target VM.
* @param snapId Id of the snapshot
* @return If an error occurs the error message contains the reason.
*/ | Deletes a VM snapshot | snapshotDelete | {
"repo_name": "Terradue/one",
"path": "src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java",
"license": "apache-2.0",
"size": 38638
} | [
"org.opennebula.client.Client",
"org.opennebula.client.OneResponse"
] | import org.opennebula.client.Client; import org.opennebula.client.OneResponse; | import org.opennebula.client.*; | [
"org.opennebula.client"
] | org.opennebula.client; | 2,424,457 |
@CalledByNative("BookmarksCallback")
void onBookmarksFolderHierarchyAvailable(BookmarkId folderId,
List<BookmarkItem> bookmarksList);
} | @CalledByNative(STR) void onBookmarksFolderHierarchyAvailable(BookmarkId folderId, List<BookmarkItem> bookmarksList); } | /**
* Callback method for fetching the folder hierarchy.
* @param folderId The folder id to which the bookmarks belong.
* @param bookmarksList List holding the fetched folder details.
*/ | Callback method for fetching the folder hierarchy | onBookmarksFolderHierarchyAvailable | {
"repo_name": "Workday/OpenFrame",
"path": "chrome/android/java/src/org/chromium/chrome/browser/bookmark/BookmarksBridge.java",
"license": "bsd-3-clause",
"size": 34493
} | [
"java.util.List",
"org.chromium.base.annotations.CalledByNative",
"org.chromium.components.bookmarks.BookmarkId"
] | import java.util.List; import org.chromium.base.annotations.CalledByNative; import org.chromium.components.bookmarks.BookmarkId; | import java.util.*; import org.chromium.base.annotations.*; import org.chromium.components.bookmarks.*; | [
"java.util",
"org.chromium.base",
"org.chromium.components"
] | java.util; org.chromium.base; org.chromium.components; | 2,293,286 |
public void transferAsync(String targetName, TransferDefinition definition, TransferCallback... callbacks)
{
transferAsync(targetName, definition, Arrays.asList(callbacks));
} | void function(String targetName, TransferDefinition definition, TransferCallback... callbacks) { transferAsync(targetName, definition, Arrays.asList(callbacks)); } | /**
* Transfer async.
*
* @param targetName
* @param definition
* @param callbacks
*
*/ | Transfer async | transferAsync | {
"repo_name": "daniel-he/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/transfer/TransferServiceImpl2.java",
"license": "lgpl-3.0",
"size": 58252
} | [
"java.util.Arrays",
"org.alfresco.service.cmr.transfer.TransferCallback",
"org.alfresco.service.cmr.transfer.TransferDefinition"
] | import java.util.Arrays; import org.alfresco.service.cmr.transfer.TransferCallback; import org.alfresco.service.cmr.transfer.TransferDefinition; | import java.util.*; import org.alfresco.service.cmr.transfer.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 731,397 |
boolean setAttributeWithoutCheck(PerunSession sess, Member member, Group group, Attribute attribute, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberGroupMismatchException; | boolean setAttributeWithoutCheck(PerunSession sess, Member member, Group group, Attribute attribute, boolean workWithUserAttributes) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException, MemberGroupMismatchException; | /**
* Just store the particular attribute associated with the member-group, doesn't preform any value check. Core attributes can't be set this way.
*
* @param sess
* @param member
* @param group
* @param attribute
* @param workWithUserAttributes
* @return
* @throws InternalErrorException
* @throws W... | Just store the particular attribute associated with the member-group, doesn't preform any value check. Core attributes can't be set this way | setAttributeWithoutCheck | {
"repo_name": "zlamalp/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 244560
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.Group",
"cz.metacentrum.perun.core.api.Member",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.MemberGroupMismatchException",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmen... | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.MemberGroupMismatchException; import cz.metacentrum.perun.core.api.exceptions.WrongA... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,813,944 |
private static String toLinebreakSubst(String s) {
return s.replaceAll(Pattern.quote("\r\n"), LINEBREAK_SUBST).replaceAll(
Pattern.quote("\n"), LINEBREAK_SUBST);
} | static String function(String s) { return s.replaceAll(Pattern.quote("\r\n"), LINEBREAK_SUBST).replaceAll( Pattern.quote("\n"), LINEBREAK_SUBST); } | /**
* Replaces all "\r\n" and "\n" in the String with the LINEBREAK_SUBST
*
* @param s
* The original String
* @return The String with the replacements
*/ | Replaces all "\r\n" and "\n" in the String with the LINEBREAK_SUBST | toLinebreakSubst | {
"repo_name": "ischweizer/MoSeS--Client-",
"path": "moses/src/de/da_sense/moses/client/abstraction/apks/ExternalApplication.java",
"license": "apache-2.0",
"size": 18770
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,282,713 |
Widget getWidget(String id) throws Exception;
| Widget getWidget(String id) throws Exception; | /**
* Gets the specified Widget
* @param id the value identifying the widget in the marketplace, e.g. Widget URI or GUID
* @return a Widget
* @throws Exception if no match is found
*/ | Gets the specified Widget | getWidget | {
"repo_name": "svn2github/rave",
"path": "rave-components/rave-core/src/main/java/org/apache/rave/portal/service/WidgetMarketplaceService.java",
"license": "apache-2.0",
"size": 3617
} | [
"org.apache.rave.model.Widget"
] | import org.apache.rave.model.Widget; | import org.apache.rave.model.*; | [
"org.apache.rave"
] | org.apache.rave; | 321,225 |
public List<FrdFraudRelatedOrderInfo> queryByRange(String jpqlStmt, int firstResult,
int maxResults); | List<FrdFraudRelatedOrderInfo> function(String jpqlStmt, int firstResult, int maxResults); | /**
* queryByRange - allows querying by range/block
*
* @param jpqlStmt
* @param firstResult
* @param maxResults
* @return a list of FrdFraudRelatedOrderInfo
*/ | queryByRange - allows querying by range/block | queryByRange | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/FrdFraudRelatedOrderInfoSessionEJBRemote.java",
"license": "apache-2.0",
"size": 3152
} | [
"com.gdn.venice.persistence.FrdFraudRelatedOrderInfo",
"java.util.List"
] | import com.gdn.venice.persistence.FrdFraudRelatedOrderInfo; import java.util.List; | import com.gdn.venice.persistence.*; import java.util.*; | [
"com.gdn.venice",
"java.util"
] | com.gdn.venice; java.util; | 1,747,057 |
public void onArmourDequip(World worldObj, EntityPlayer player, ItemStack stack); | void function(World worldObj, EntityPlayer player, ItemStack stack); | /**
* One of those called methods. Called when the armour is taken off.
*
* @param worldObj
* @param player
* @param stack2
*/ | One of those called methods. Called when the armour is taken off | onArmourDequip | {
"repo_name": "chbachman/ModularArmour",
"path": "src/main/java/chbachman/api/item/IModularItem.java",
"license": "gpl-3.0",
"size": 2798
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraft.world.World"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; | import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraft.world.*; | [
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.world"
] | net.minecraft.entity; net.minecraft.item; net.minecraft.world; | 341,693 |
public static <R, C, V> TreeBasedTable<R, C, V> create(
Comparator<? super R> rowComparator,
Comparator<? super C> columnComparator) {
checkNotNull(rowComparator);
checkNotNull(columnComparator);
return new TreeBasedTable<R, C, V>(rowComparator, columnComparator);
} | static <R, C, V> TreeBasedTable<R, C, V> function( Comparator<? super R> rowComparator, Comparator<? super C> columnComparator) { checkNotNull(rowComparator); checkNotNull(columnComparator); return new TreeBasedTable<R, C, V>(rowComparator, columnComparator); } | /**
* Creates an empty {@code TreeBasedTable} that is ordered by the specified
* comparators.
*
* @param rowComparator the comparator that orders the row keys
* @param columnComparator the comparator that orders the column keys
*/ | Creates an empty TreeBasedTable that is ordered by the specified comparators | create | {
"repo_name": "gank0326/j2objc",
"path": "guava/sources/com/google/common/collect/TreeBasedTable.java",
"license": "apache-2.0",
"size": 12159
} | [
"com.google.common.base.Preconditions",
"java.util.Comparator"
] | import com.google.common.base.Preconditions; import java.util.Comparator; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 499,845 |
public void afterUnmarshal(Unmarshaller unmarshaller, Object parent){
if (customProperties == null || customProperties.isEmpty()){
this.customPropertiesMap = Collections.emptyMap();
}else {
this.customPropertiesMap = new HashMap<>(customProperties.size());
for (Cu... | void function(Unmarshaller unmarshaller, Object parent){ if (customProperties == null customProperties.isEmpty()){ this.customPropertiesMap = Collections.emptyMap(); }else { this.customPropertiesMap = new HashMap<>(customProperties.size()); for (CustomProperty currProp : this.customProperties){ customPropertiesMap.put(... | /**
* This method gets automatically called by the JAXB infrastructure
*/ | This method gets automatically called by the JAXB infrastructure | afterUnmarshal | {
"repo_name": "shpandrak/sif",
"path": "generator/src/main/java/com/shpandrak/metadata/model/field/AbstractFieldMetadata.java",
"license": "lgpl-3.0",
"size": 2842
} | [
"com.shpandrak.metadata.model.CustomProperty",
"java.util.Collections",
"java.util.HashMap",
"javax.xml.bind.Unmarshaller"
] | import com.shpandrak.metadata.model.CustomProperty; import java.util.Collections; import java.util.HashMap; import javax.xml.bind.Unmarshaller; | import com.shpandrak.metadata.model.*; import java.util.*; import javax.xml.bind.*; | [
"com.shpandrak.metadata",
"java.util",
"javax.xml"
] | com.shpandrak.metadata; java.util; javax.xml; | 749,064 |
public Vec3 getPositionVector()
{
return new Vec3(d0, d1, d2);
} | Vec3 function() { return new Vec3(d0, d1, d2); } | /**
* Get the position vector. <b>{@code null} is not allowed!</b> If you are not an entity in the world,
* return 0.0D, 0.0D, 0.0D
*/ | Get the position vector. null is not allowed! If you are not an entity in the world, return 0.0D, 0.0D, 0.0D | getPositionVector | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/command/CommandExecuteAt.java",
"license": "gpl-3.0",
"size": 7198
} | [
"net.minecraft.util.Vec3"
] | import net.minecraft.util.Vec3; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 17,791 |
@Test
public void testMakingFabric() {
player.setQuest(questSlot, "need_fabric");
npc = SingletonRepository.getNPCList().get("Kampusch");
en = npc.getEngine();
en.step(player, "hi");
assertEquals("Greetings. What an interesting place this is.", getReply(npc));
en.step(player, "help");
assertEquals("S... | void function() { player.setQuest(questSlot, STR); npc = SingletonRepository.getNPCList().get(STR); en = npc.getEngine(); en.step(player, "hi"); assertEquals(STR, getReply(npc)); en.step(player, "help"); assertEquals(STR, getReply(npc)); en.step(player, "offer"); assertEquals(STR, getReply(npc)); en.step(player, "fuse"... | /**
* Tests for makingFabric.
*/ | Tests for makingFabric | testMakingFabric | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "tests/games/stendhal/server/maps/quests/MithrilCloakTest.java",
"license": "gpl-2.0",
"size": 34623
} | [
"games.stendhal.server.core.engine.SingletonRepository",
"games.stendhal.server.entity.item.Item",
"games.stendhal.server.entity.npc.ConversationStates",
"org.junit.Assert"
] | import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.npc.ConversationStates; import org.junit.Assert; | import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.item.*; import games.stendhal.server.entity.npc.*; import org.junit.*; | [
"games.stendhal.server",
"org.junit"
] | games.stendhal.server; org.junit; | 1,066,947 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.