method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void testIndexOf() { DefaultXYZDataset d = createSampleDataset1(); assertEquals(0, d.indexOf("S1")); assertEquals(1, d.indexOf("S2")); assertEquals(-1, d.indexOf("Green Eggs and Ham")); assertEquals(-1, d.indexOf(null)); } static final double EPSILON = 0.0...
void function() { DefaultXYZDataset d = createSampleDataset1(); assertEquals(0, d.indexOf("S1")); assertEquals(1, d.indexOf("S2")); assertEquals(-1, d.indexOf(STR)); assertEquals(-1, d.indexOf(null)); } static final double EPSILON = 0.0000000001;
/** * Some checks for the indexOf(Comparable) method. */
Some checks for the indexOf(Comparable) method
testIndexOf
{ "repo_name": "SpoonLabs/astor", "path": "examples/chart_11/tests/org/jfree/data/xy/junit/DefaultXYZDatasetTests.java", "license": "gpl-2.0", "size": 8872 }
[ "org.jfree.data.xy.DefaultXYZDataset" ]
import org.jfree.data.xy.DefaultXYZDataset;
import org.jfree.data.xy.*;
[ "org.jfree.data" ]
org.jfree.data;
803,547
static File createTaskControllerConf(String path, Configuration conf) throws IOException { File confDirectory = new File(path, "../conf"); if (!confDirectory.exists()) { confDirectory.mkdirs(); } File configurationFile = new File(confDirectory, "taskcontroller.cfg"); PrintWriter writer...
static File createTaskControllerConf(String path, Configuration conf) throws IOException { File confDirectory = new File(path, STR); if (!confDirectory.exists()) { confDirectory.mkdirs(); } File configurationFile = new File(confDirectory, STR); PrintWriter writer = new PrintWriter(new FileOutputStream(configurationFile...
/** * Create taskcontroller.cfg. * * @param path Path to the taskcontroller binary. * @param conf TaskTracker's configuration * @return the created conf file * @throws IOException */
Create taskcontroller.cfg
createTaskControllerConf
{ "repo_name": "jayantgolhar/Hadoop-0.21.0", "path": "mapred/src/test/mapred/org/apache/hadoop/mapred/ClusterWithLinuxTaskController.java", "license": "apache-2.0", "size": 17653 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.PrintWriter", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.mapreduce.MRConfig", "org.apache.hadoop.mapreduce.server.tasktracker.TTConfig" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.PrintWriter; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.MRConfig; import org.apache.hadoop.mapreduce.server.tasktracker.TTConfig;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.server.tasktracker.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
224,496
public void addFeedbackAttachment(Reference attachment);
void function(Reference attachment);
/** * Add an attachment to the list of feedback attachments. * * @param attachment - * The Resource object pointing to the attachment. */
Add an attachment to the list of feedback attachments
addFeedbackAttachment
{ "repo_name": "harfalm/Sakai-10.1", "path": "assignment/assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentSubmissionEdit.java", "license": "apache-2.0", "size": 7058 }
[ "org.sakaiproject.entity.api.Reference" ]
import org.sakaiproject.entity.api.Reference;
import org.sakaiproject.entity.api.*;
[ "org.sakaiproject.entity" ]
org.sakaiproject.entity;
483,316
private void sendRegistrationIdToBackend() { // Your implementation here. String url = "https://your.server.com/pushsharp/api/notification/device/register/" + "1/" + regid + "/android/" + android_id; HttpClient httpclient = new DefaultHttpClient(); try { String auth = B...
void function() { String url = STRUTF-8STRAuthorizationSTRBasic STRresponse: " + response); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } catch (ClientProtocolException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } }
/** * Sends the registration ID to your server over HTTP, so it can use GCM/HTTP * or CCS to send messages to your app. Not needed for this demo since the * device sends upstream messages to a server that echoes back the message * using the 'from' address in the message. */
Sends the registration ID to your server over HTTP, so it can use GCM/HTTP or CCS to send messages to your app. Not needed for this demo since the device sends upstream messages to a server that echoes back the message using the 'from' address in the message
sendRegistrationIdToBackend
{ "repo_name": "vmandic/DevUG-PushSharp", "path": "PushSharp-Android/DevUG-PushSharp/app/src/main/java/com/mobendo/devug_pushsharp/MainActivity.java", "license": "apache-2.0", "size": 8900 }
[ "java.io.IOException", "java.io.UnsupportedEncodingException", "org.apache.http.client.ClientProtocolException" ]
import java.io.IOException; import java.io.UnsupportedEncodingException; import org.apache.http.client.ClientProtocolException;
import java.io.*; import org.apache.http.client.*;
[ "java.io", "org.apache.http" ]
java.io; org.apache.http;
1,927,962
HistoryDto findHistoryBySeqNumber(String appId, int seqNum);
HistoryDto findHistoryBySeqNumber(String appId, int seqNum);
/** * Find history by application id and sequence number. * * @param appId the string id of application * @param seqNum the sequence number * @return the found history dto */
Find history by application id and sequence number
findHistoryBySeqNumber
{ "repo_name": "kallelzied/kaa", "path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/HistoryService.java", "license": "apache-2.0", "size": 2466 }
[ "org.kaaproject.kaa.common.dto.HistoryDto" ]
import org.kaaproject.kaa.common.dto.HistoryDto;
import org.kaaproject.kaa.common.dto.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
391,861
public static int frameLengthVolatile(final UnsafeBuffer termBuffer, final int frameOffset) { int frameLength = termBuffer.getIntVolatile(lengthOffset(frameOffset)); if (ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN) { frameLength = Integer.reverseBytes(frameLength); ...
static int function(final UnsafeBuffer termBuffer, final int frameOffset) { int frameLength = termBuffer.getIntVolatile(lengthOffset(frameOffset)); if (ByteOrder.nativeOrder() != ByteOrder.LITTLE_ENDIAN) { frameLength = Integer.reverseBytes(frameLength); } return frameLength; }
/** * Get the length of a frame from the header as a volatile read. * * @param termBuffer containing the frame. * @param frameOffset at which a frame begins. * @return the value for the frame length. */
Get the length of a frame from the header as a volatile read
frameLengthVolatile
{ "repo_name": "ycaihua/Aeron", "path": "aeron-common/src/main/java/uk/co/real_logic/aeron/common/concurrent/logbuffer/FrameDescriptor.java", "license": "apache-2.0", "size": 10766 }
[ "java.nio.ByteOrder", "uk.co.real_logic.agrona.concurrent.UnsafeBuffer" ]
import java.nio.ByteOrder; import uk.co.real_logic.agrona.concurrent.UnsafeBuffer;
import java.nio.*; import uk.co.real_logic.agrona.concurrent.*;
[ "java.nio", "uk.co.real_logic" ]
java.nio; uk.co.real_logic;
896,128
public List<SearchResult> searchUsers(String search);
List<SearchResult> function(String search);
/** * Returns a list of SearchResults for the user search * * @param search * @param first * @param last * @return */
Returns a list of SearchResults for the user search
searchUsers
{ "repo_name": "sakai-mirror/delegatedaccess", "path": "api/src/java/org/sakaiproject/delegatedaccess/logic/ProjectLogic.java", "license": "apache-2.0", "size": 11471 }
[ "java.util.List", "org.sakaiproject.delegatedaccess.model.SearchResult" ]
import java.util.List; import org.sakaiproject.delegatedaccess.model.SearchResult;
import java.util.*; import org.sakaiproject.delegatedaccess.model.*;
[ "java.util", "org.sakaiproject.delegatedaccess" ]
java.util; org.sakaiproject.delegatedaccess;
93,573
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner> beginMigrateMongoDBDatabaseToManualThroughputAsync( String resourceGroupName, String accountName, String databaseName);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner> beginMigrateMongoDBDatabaseToManualThroughputAsync( String resourceGroupName, String accountName, String databaseName);
/** * Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @throws I...
Migrate an Azure Cosmos DB MongoDB database from autoscale to manual throughput
beginMigrateMongoDBDatabaseToManualThroughputAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java", "license": "mit", "size": 104176 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.PollerFlux", "com.azure.resourcemanager.cosmos.fluent.models.ThroughputSettingsGetResultsInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux; import com.azure.resourcemanager.cosmos.fluent.models.ThroughputSettingsGetResultsInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.cosmos.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,805,577
public Set<String> getNonInstrumentedPackages() { Set<String> names = new HashSet<String>(); names.add("java."); names.add("javax."); names.add("sun."); names.add("org.jacoco."); names.add("org.objectweb."); names.add("org.w3c."); names.add("org.xml."); return names; }
Set<String> function() { Set<String> names = new HashSet<String>(); names.add("java."); names.add(STR); names.add("sun."); names.add(STR); names.add(STR); names.add(STR); names.add(STR); return names; }
/** * Note if you were testing java, org.w3c, org.jacoco, org.objectweb. * or org.xml you would need your own implementation * to allow those classes to be instrumented. This * was done for general ease of use. * @return */
Note if you were testing java, org.w3c, org.jacoco, org.objectweb. or org.xml you would need your own implementation to allow those classes to be instrumented. This was done for general ease of use
getNonInstrumentedPackages
{ "repo_name": "adligo/tests4j_4jacoco.adligo.org", "path": "src/org/adligo/tests4j_4jacoco/plugin/whitelists/RequiredList.java", "license": "apache-2.0", "size": 15642 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,357,453
protected Processor wrapInErrorHandler(RouteContext routeContext, Processor output) throws Exception { ErrorHandlerFactory builder = routeContext.getRoute().getErrorHandlerBuilder(); // create error handler Processor errorHandler = builder.createErrorHandler(routeContext, output); /...
Processor function(RouteContext routeContext, Processor output) throws Exception { ErrorHandlerFactory builder = routeContext.getRoute().getErrorHandlerBuilder(); Processor errorHandler = builder.createErrorHandler(routeContext, output); for (LifecycleStrategy strategy : routeContext.getCamelContext().getLifecycleStrat...
/** * Wraps the given output in an error handler * * @param routeContext the route context * @param output the output * @return the output wrapped with the error handler * @throws Exception can be thrown if failed to create error handler builder */
Wraps the given output in an error handler
wrapInErrorHandler
{ "repo_name": "oscerd/camel", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 144870 }
[ "org.apache.camel.ErrorHandlerFactory", "org.apache.camel.Processor", "org.apache.camel.spi.LifecycleStrategy", "org.apache.camel.spi.RouteContext" ]
import org.apache.camel.ErrorHandlerFactory; import org.apache.camel.Processor; import org.apache.camel.spi.LifecycleStrategy; import org.apache.camel.spi.RouteContext;
import org.apache.camel.*; import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
945,601
public DdosCustomPolicyInner withProtocolCustomSettings(List<ProtocolCustomSettingsFormat> protocolCustomSettings) { this.protocolCustomSettings = protocolCustomSettings; return this; }
DdosCustomPolicyInner function(List<ProtocolCustomSettingsFormat> protocolCustomSettings) { this.protocolCustomSettings = protocolCustomSettings; return this; }
/** * Set the protocol-specific DDoS policy customization parameters. * * @param protocolCustomSettings the protocolCustomSettings value to set * @return the DdosCustomPolicyInner object itself. */
Set the protocol-specific DDoS policy customization parameters
withProtocolCustomSettings
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/network/v2019_08_01/implementation/DdosCustomPolicyInner.java", "license": "mit", "size": 4523 }
[ "com.microsoft.azure.management.network.v2019_08_01.ProtocolCustomSettingsFormat", "java.util.List" ]
import com.microsoft.azure.management.network.v2019_08_01.ProtocolCustomSettingsFormat; import java.util.List;
import com.microsoft.azure.management.network.v2019_08_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,720,778
@ApiModelProperty(value = "") public String getStandaloneHash() { return standaloneHash; }
@ApiModelProperty(value = "") String function() { return standaloneHash; }
/** * Get standaloneHash * @return standaloneHash **/
Get standaloneHash
getStandaloneHash
{ "repo_name": "LogSentinel/logsentinel-java-client", "path": "src/main/java/com/logsentinel/model/LogResponse.java", "license": "mit", "size": 4473 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
333,720
public List<TestSession> getSortedMap( List<TestSession> testData ) { Collections.sort( testData ); Collections.reverse( testData ); return testData; }
List<TestSession> function( List<TestSession> testData ) { Collections.sort( testData ); Collections.reverse( testData ); return testData; }
/** * This will return the sorted list of TestSession data according to date. * * @param testData * List of all TestSessions. * @return Return the sorted list of testData. */
This will return the sorted list of TestSession data according to date
getSortedMap
{ "repo_name": "opengeospatial/teamengine", "path": "teamengine-web/src/main/java/com/occamlab/te/web/TestSession.java", "license": "apache-2.0", "size": 6852 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,196,515
protected I_CmsSearchConfigurationFacetRange parseRangeFacet(String pathPrefix) { try { final String range = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_RANGE); final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME); final St...
I_CmsSearchConfigurationFacetRange function(String pathPrefix) { try { final String range = parseMandatoryStringValue(pathPrefix + XML_ELEMENT_RANGE_FACET_RANGE); final String name = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FACET_NAME); final String label = parseOptionalStringValue(pathPrefix + XML_ELEMENT_FAC...
/** Reads the configuration of a range facet. * @param pathPrefix The XML Path that leads to the range facet configuration, or <code>null</code> if the XML was not correctly structured. * @return The read configuration, or <code>null</code> if the XML was not correctly structured. */
Reads the configuration of a range facet
parseRangeFacet
{ "repo_name": "gallardo/opencms-core", "path": "src/org/opencms/jsp/search/config/parser/CmsXMLSearchConfigurationParser.java", "license": "lgpl-2.1", "size": 40353 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.opencms.jsp.search.config.CmsSearchConfigurationFacetRange" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.opencms.jsp.search.config.CmsSearchConfigurationFacetRange;
import java.util.*; import org.opencms.jsp.search.config.*;
[ "java.util", "org.opencms.jsp" ]
java.util; org.opencms.jsp;
1,799,807
public void copyFrom(QueryTreeNode node) throws StandardException { super.copyFrom(node); StaticMethodCallNode other = (StaticMethodCallNode)node; this.procedureName = (TableName)getNodeFactory().copyNode(other.procedureName, ...
void function(QueryTreeNode node) throws StandardException { super.copyFrom(node); StaticMethodCallNode other = (StaticMethodCallNode)node; this.procedureName = (TableName)getNodeFactory().copyNode(other.procedureName, getParserContext()); }
/** * Fill this node with a deep copy of the given node. */
Fill this node with a deep copy of the given node
copyFrom
{ "repo_name": "youngor/openclouddb", "path": "MyCAT/src/main/java/com/akiban/sql/parser/StaticMethodCallNode.java", "license": "apache-2.0", "size": 4905 }
[ "com.akiban.sql.StandardException" ]
import com.akiban.sql.StandardException;
import com.akiban.sql.*;
[ "com.akiban.sql" ]
com.akiban.sql;
1,035,573
public MetaProperty<SwapIndex> index() { return index; }
MetaProperty<SwapIndex> function() { return index; }
/** * The meta-property for the {@code index} property. * @return the meta-property, not null */
The meta-property for the index property
index
{ "repo_name": "ChinaQuants/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/cms/CmsPeriod.java", "license": "apache-2.0", "size": 42943 }
[ "com.opengamma.strata.product.swap.SwapIndex", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.product.swap.SwapIndex; import org.joda.beans.MetaProperty;
import com.opengamma.strata.product.swap.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
2,498,033
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<ExpressRouteServiceProviderInner> list(Context context) { return new PagedIterable<>(listAsync(context)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ExpressRouteServiceProviderInner> function(Context context) { return new PagedIterable<>(listAsync(context)); }
/** * Gets all the available express route service providers. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws R...
Gets all the available express route service providers
list
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteServiceProvidersClientImpl.java", "license": "mit", "size": 12515 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.ExpressRouteServiceProviderInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.ExpressRouteServiceProviderInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
190,155
public @Nonnull Iterable<VolumeProduct> listVolumeProducts() throws InternalException, CloudException;
@Nonnull Iterable<VolumeProduct> function() throws InternalException, CloudException;
/** * Lists the set of volume products that may be used in provisioning a block storage volume. Because not all clouds * support the concept of volume products (as indicated by {@link VolumeCapabilities#getVolumeProductRequirement()}, this method should * return an empty list in such clouds. * @retu...
Lists the set of volume products that may be used in provisioning a block storage volume. Because not all clouds support the concept of volume products (as indicated by <code>VolumeCapabilities#getVolumeProductRequirement()</code>, this method should return an empty list in such clouds
listVolumeProducts
{ "repo_name": "maksimov/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/compute/VolumeSupport.java", "license": "apache-2.0", "size": 18208 }
[ "javax.annotation.Nonnull", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException" ]
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
990,997
private static void assertStagedDirectory(CloudJob job, boolean exists) { File stageInDir = new File(FileStagingService.pathConcat(testStagingInfo.getStageInDirectory(), FileStagingService.getBaseFolderForJob(job))); Assert.assertEquals(exists, stageInDir.exists()); if (exist...
static void function(CloudJob job, boolean exists) { File stageInDir = new File(FileStagingService.pathConcat(testStagingInfo.getStageInDirectory(), FileStagingService.getBaseFolderForJob(job))); Assert.assertEquals(exists, stageInDir.exists()); if (exists) { Assert.assertEquals(true, stageInDir.isDirectory()); } }
/** * Tests the existence/nonexistence of job's stage in directory * * @param job * @param exists */
Tests the existence/nonexistence of job's stage in directory
assertStagedDirectory
{ "repo_name": "victortey/portal-core", "path": "src/test/java/org/auscope/portal/core/services/cloud/TestFileStagingService.java", "license": "lgpl-3.0", "size": 19978 }
[ "java.io.File", "org.auscope.portal.core.cloud.CloudJob", "org.junit.Assert" ]
import java.io.File; import org.auscope.portal.core.cloud.CloudJob; import org.junit.Assert;
import java.io.*; import org.auscope.portal.core.cloud.*; import org.junit.*;
[ "java.io", "org.auscope.portal", "org.junit" ]
java.io; org.auscope.portal; org.junit;
2,237,372
void processEventOverride(IMXMLEventSpecifierNode eventNode, Context context) { FlexProject project = getProject(); Name eventOverride = project.getEventOverrideClassName(); IASNode parentNode = eventNode.getParent(); String id = parentNode instanceof IMXMLInstanceNode ?...
void processEventOverride(IMXMLEventSpecifierNode eventNode, Context context) { FlexProject project = getProject(); Name eventOverride = project.getEventOverrideClassName(); IASNode parentNode = eventNode.getParent(); String id = parentNode instanceof IMXMLInstanceNode ? ((IMXMLInstanceNode)parentNode).getEffectiveID()...
/** * Generates instructions in the current context * to create an instance of mx.states.SetEventHandler * with its <code>target</code>, <code>name</code>, * and <code>handlerFunction</code> properties set. */
Generates instructions in the current context to create an instance of mx.states.SetEventHandler with its <code>target</code>, <code>name</code>, and <code>handlerFunction</code> properties set
processEventOverride
{ "repo_name": "adufilie/flex-falcon", "path": "compiler.js/src/org/apache/flex/compiler/internal/as/codegen/JSMXMLClassDirectiveProcessor.java", "license": "apache-2.0", "size": 61621 }
[ "org.apache.flex.abc.semantics.Name", "org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor", "org.apache.flex.compiler.internal.projects.FlexProject", "org.apache.flex.compiler.tree.as.IASNode", "org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode", "org.apache.flex.compiler.tr...
import org.apache.flex.abc.semantics.Name; import org.apache.flex.compiler.internal.as.codegen.MXMLClassDirectiveProcessor; import org.apache.flex.compiler.internal.projects.FlexProject; import org.apache.flex.compiler.tree.as.IASNode; import org.apache.flex.compiler.tree.mxml.IMXMLEventSpecifierNode; import org.apache...
import org.apache.flex.abc.semantics.*; import org.apache.flex.compiler.internal.as.codegen.*; import org.apache.flex.compiler.internal.projects.*; import org.apache.flex.compiler.tree.as.*; import org.apache.flex.compiler.tree.mxml.*;
[ "org.apache.flex" ]
org.apache.flex;
295,227
public void registerConnectPoint(ConnectPoint portToRegister) { this.neighbourResolutionService.registerNeighbourHandler( portToRegister, neighbourHandler, appId ); } private class InternalConfigListener implements NetworkConfigListener { ...
void function(ConnectPoint portToRegister) { this.neighbourResolutionService.registerNeighbourHandler( portToRegister, neighbourHandler, appId ); } private class InternalConfigListener implements NetworkConfigListener { SegmentRoutingManager srManager; public InternalConfigListener(SegmentRoutingManager srManager) { th...
/** * Registers the given connect point with the NRS, this is necessary * to receive the NDP and ARP packets from the NRS. * * @param portToRegister connect point to register */
Registers the given connect point with the NRS, this is necessary to receive the NDP and ARP packets from the NRS
registerConnectPoint
{ "repo_name": "donNewtonAlpha/onos", "path": "apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java", "license": "apache-2.0", "size": 58824 }
[ "org.onosproject.net.ConnectPoint", "org.onosproject.net.config.NetworkConfigListener" ]
import org.onosproject.net.ConnectPoint; import org.onosproject.net.config.NetworkConfigListener;
import org.onosproject.net.*; import org.onosproject.net.config.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,194,436
public byte[] createEdfPNG(GraphDefinition definition, MeasurementSampleDescriptor... sampleData) throws MeasurementDataNotFoundException { return graphUtils.chartToPNG(createEdfGraph(definition, sampleData)); }
byte[] function(GraphDefinition definition, MeasurementSampleDescriptor... sampleData) throws MeasurementDataNotFoundException { return graphUtils.chartToPNG(createEdfGraph(definition, sampleData)); }
/** * Creates the empirical distribution comparison graph as PNG image. * * @param samples * The sample data. * @return PNG encoded image as byte array, or {@code null} when error * occurs. * @throws MeasurementDataNotFoundException * Thrown when m...
Creates the empirical distribution comparison graph as PNG image
createEdfPNG
{ "repo_name": "lottie-c/spl_tests_new", "path": "src/java/cz/cuni/mff/spl/evaluator/graphs/EdfCreator.java", "license": "bsd-3-clause", "size": 8710 }
[ "cz.cuni.mff.spl.evaluator.input.MeasurementDataProvider" ]
import cz.cuni.mff.spl.evaluator.input.MeasurementDataProvider;
import cz.cuni.mff.spl.evaluator.input.*;
[ "cz.cuni.mff" ]
cz.cuni.mff;
2,449,267
Invariants.require(inputs.containsKey(id) == false); Queue<Object> q = new ConcurrentLinkedQueue<>(values); inputs.put(id, () -> new SupplierObjectReader(q::poll)); return this; }
Invariants.require(inputs.containsKey(id) == false); Queue<Object> q = new ConcurrentLinkedQueue<>(values); inputs.put(id, () -> new SupplierObjectReader(q::poll)); return this; }
/** * Adds a non-broadcast input. * @param id the port ID * @param values the values * @return this */
Adds a non-broadcast input
input
{ "repo_name": "asakusafw/asakusafw-compiler", "path": "vanilla/runtime/core/src/test/java/com/asakusafw/vanilla/core/testing/MockEdgeDriver.java", "license": "apache-2.0", "size": 10217 }
[ "com.asakusafw.lang.utils.common.Invariants", "java.util.Queue", "java.util.concurrent.ConcurrentLinkedQueue" ]
import com.asakusafw.lang.utils.common.Invariants; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue;
import com.asakusafw.lang.utils.common.*; import java.util.*; import java.util.concurrent.*;
[ "com.asakusafw.lang", "java.util" ]
com.asakusafw.lang; java.util;
1,379,384
@Test public void addBody() { World w = new World(); Body b = new Body(); w.addBody(b); TestCase.assertFalse(w.bodies.isEmpty()); // make sure the body's world reference is there TestCase.assertNotNull(b.world); // make sure it was added to the broadphase TestCase.assertNotNull(w.broadphase...
void function() { World w = new World(); Body b = new Body(); w.addBody(b); TestCase.assertFalse(w.bodies.isEmpty()); TestCase.assertNotNull(b.world); TestCase.assertNotNull(w.broadphaseDetector.getAABB(b)); }
/** * Tests the add body method. */
Tests the add body method
addBody
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/dynamics/WorldTest.java", "license": "bsd-3-clause", "size": 27828 }
[ "junit.framework.TestCase" ]
import junit.framework.TestCase;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
690,676
public List<Cluster> cluster(List<UniqueSequence> sequences) throws InterruptedException, ExecutionException, DataException;
List<Cluster> function(List<UniqueSequence> sequences) throws InterruptedException, ExecutionException, DataException;
/** * Clusters a collection of sequences. * @param sequences Sequences to be clustered. * @return A collection of clusters. * @throws InterruptedException * @throws ExecutionException * @throws DataException */
Clusters a collection of sequences
cluster
{ "repo_name": "hammock-dev/hammock", "path": "src/cz/krejciadam/hammock/SequenceClusterer.java", "license": "gpl-3.0", "size": 673 }
[ "java.util.List", "java.util.concurrent.ExecutionException" ]
import java.util.List; import java.util.concurrent.ExecutionException;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,402,022
@Override @SuppressWarnings({"unchecked"}) public SimpleRiverSource register(CallableStatement statement, Map<String, Object> values) throws SQLException { if (values == null) { return this; } for (Map.Entry<String, Object> me : values.entrySet()) { // { "key"...
@SuppressWarnings({STR}) SimpleRiverSource function(CallableStatement statement, Map<String, Object> values) throws SQLException { if (values == null) { return this; } for (Map.Entry<String, Object> me : values.entrySet()) { Map<String, Object> m = (Map<String, Object>) me.getValue(); Integer n = (Integer) m.get("pos")...
/** * Register variables in callable statement * * @param statement callable statement * @param values values * @return this river source * @throws SQLException when SQL execution gives an error */
Register variables in callable statement
register
{ "repo_name": "szwork2013/elasticsearch-sentiment", "path": "elasticsearch-jdbc/src/main/java/org/xbib/elasticsearch/river/jdbc/strategy/simple/SimpleRiverSource.java", "license": "apache-2.0", "size": 69417 }
[ "java.sql.CallableStatement", "java.sql.SQLException", "java.util.Map" ]
import java.sql.CallableStatement; import java.sql.SQLException; import java.util.Map;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,511,568
private void getProfileData() { Intent intent = getIntent(); // get id long id = intent.getLongExtra(Profiles.PROFILE_ID, -1); if (id > 0) mProfile = Profiles.getProfileByID(getContentResolver(), (int) id); else mProfile = new Profi...
void function() { Intent intent = getIntent(); long id = intent.getLongExtra(Profiles.PROFILE_ID, -1); if (id > 0) mProfile = Profiles.getProfileByID(getContentResolver(), (int) id); else mProfile = new Profile(); }
/** * get profile data. if a valid profile id was sent in the intent * we will grab the profile. * If not this is a new profile */
get profile data. if a valid profile id was sent in the intent we will grab the profile. If not this is a new profile
getProfileData
{ "repo_name": "userdelroot/android_mod_DroidProfiles", "path": "src/fac/userdelroot/droidprofiles/AddProfile.java", "license": "gpl-3.0", "size": 21058 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
646,975
private void startEditor() { Intent i = new Intent(); // First try to run the plus version of Editor. i.setClassName("sk.halmi.fbeditplus", "sk.halmi.fbeditplus.EditorActivity"); try { startActivity(i); finish(); } catch (ActivityNotFoundException e) { // If not found, try to run the ...
void function() { Intent i = new Intent(); i.setClassName(STR, STR); try { startActivity(i); finish(); } catch (ActivityNotFoundException e) { i.setClassName(STR, STR); try { startActivity(i); finish(); } catch (ActivityNotFoundException ex) { try { Toast.makeText(getApplicationContext(), R.string.install_editor, Toast...
/** * Starts editor / market with editor's download. */
Starts editor / market with editor's download
startEditor
{ "repo_name": "germanviscuso/frozenbubble-kii", "path": "src/org/jfedor/frozenbubble/FrozenBubble.java", "license": "gpl-2.0", "size": 28649 }
[ "android.content.ActivityNotFoundException", "android.content.Intent", "android.net.Uri", "android.widget.Toast" ]
import android.content.ActivityNotFoundException; import android.content.Intent; import android.net.Uri; import android.widget.Toast;
import android.content.*; import android.net.*; import android.widget.*;
[ "android.content", "android.net", "android.widget" ]
android.content; android.net; android.widget;
1,374,224
@Override public ResourceLocator getResourceLocator() { return MCLEVPlugin.INSTANCE; }
ResourceLocator function() { return MCLEVPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * @generated */
Return the resource locator for this item provider's resources
getResourceLocator
{ "repo_name": "parraman/micobs", "path": "mclev/es.uah.aut.srg.micobs.mclev/src/es/uah/aut/srg/micobs/mclev/mclevdom/provider/MStringParamIODSPSwitchItemProvider.java", "license": "epl-1.0", "size": 6036 }
[ "es.uah.aut.srg.micobs.mclev.plugin.MCLEVPlugin", "org.eclipse.emf.common.util.ResourceLocator" ]
import es.uah.aut.srg.micobs.mclev.plugin.MCLEVPlugin; import org.eclipse.emf.common.util.ResourceLocator;
import es.uah.aut.srg.micobs.mclev.plugin.*; import org.eclipse.emf.common.util.*;
[ "es.uah.aut", "org.eclipse.emf" ]
es.uah.aut; org.eclipse.emf;
152,316
public void openPageURL(String url) { activate(); browser.setURL(url); new WaitUntil(new PageIsLoaded(browser), TIMEOUT); }
void function(String url) { activate(); browser.setURL(url); new WaitUntil(new PageIsLoaded(browser), TIMEOUT); }
/** * Opens page with given URL in browser. * * @param url the url */
Opens page with given URL in browser
openPageURL
{ "repo_name": "jboss-reddeer/reddeer", "path": "plugins/org.eclipse.reddeer.eclipse/src/org/eclipse/reddeer/eclipse/ui/browser/WebBrowserView.java", "license": "epl-1.0", "size": 2989 }
[ "org.eclipse.reddeer.common.wait.WaitUntil", "org.eclipse.reddeer.swt.condition.PageIsLoaded" ]
import org.eclipse.reddeer.common.wait.WaitUntil; import org.eclipse.reddeer.swt.condition.PageIsLoaded;
import org.eclipse.reddeer.common.wait.*; import org.eclipse.reddeer.swt.condition.*;
[ "org.eclipse.reddeer" ]
org.eclipse.reddeer;
2,211,390
public void testFormat() { NDC.clear(); NDC.push("NDC goes here"); Logger logger = Logger.getLogger("org.apache.log4j.LayoutTest"); LoggingEvent event = new LoggingEvent( "org.apache.log4j.Logger", logger, Level.INFO, "Hello, World", null); TTCCLayout layout = (TTCCLayout) createLay...
void function() { NDC.clear(); NDC.push(STR); Logger logger = Logger.getLogger(STR); LoggingEvent event = new LoggingEvent( STR, logger, Level.INFO, STR, null); TTCCLayout layout = (TTCCLayout) createLayout(); String result = layout.format(event); NDC.pop(); StringBuffer buf = new StringBuffer(100); layout.dateFormat(b...
/** * Tests format. */
Tests format
testFormat
{ "repo_name": "DRUNK2013/log4j", "path": "tests/src/java/org/apache/log4j/TTCCLayoutTest.java", "license": "apache-2.0", "size": 3421 }
[ "org.apache.log4j.spi.LoggingEvent" ]
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.*;
[ "org.apache.log4j" ]
org.apache.log4j;
712,647
public final Property<Currency> counterCurrency() { return metaBean().counterCurrency().createProperty(this); }
final Property<Currency> function() { return metaBean().counterCurrency().createProperty(this); }
/** * Gets the the {@code counterCurrency} property. * @return the property, not null */
Gets the the counterCurrency property
counterCurrency
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial-types/src/main/java/com/opengamma/financial/security/fx/FXVolatilitySwapSecurity.java", "license": "apache-2.0", "size": 16178 }
[ "com.opengamma.util.money.Currency", "org.joda.beans.Property" ]
import com.opengamma.util.money.Currency; import org.joda.beans.Property;
import com.opengamma.util.money.*; import org.joda.beans.*;
[ "com.opengamma.util", "org.joda.beans" ]
com.opengamma.util; org.joda.beans;
2,383,561
public List<Double> getExecutionTimeHistoryVmSelection() { return executionTimeHistoryVmSelection; }
List<Double> function() { return executionTimeHistoryVmSelection; }
/** * Gets the execution time history vm selection. * * @return the execution time history vm selection */
Gets the execution time history vm selection
getExecutionTimeHistoryVmSelection
{ "repo_name": "Sukoon-Sharma/OpenSim", "path": "src/org/cloudbus/cloudsim/power/PowerVmAllocationPolicyMigrationAbstract.java", "license": "lgpl-3.0", "size": 20722 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,405,549
@Override public RuleVisibility getVisibility() { // Temporary logic to relax config_setting's visibility enforcement while depot migrations set // visibility settings properly (legacy code may have visibility settings that would break if // enforced). See https://github.com/bazelbuild/bazel/issues/1266...
RuleVisibility function() { if (ruleClass.getName().equals(STR)) { ConfigSettingVisibilityPolicy policy = pkg.getConfigSettingVisibilityPolicy(); if (visibility != null) { return visibility; } else if (policy == ConfigSettingVisibilityPolicy.DEFAULT_PUBLIC) { return ConstantRuleVisibility.PUBLIC; } else { return pkg.ge...
/** * Returns the effective visibility of this Rule. Visibility is computed from * these sources in this order of preference: * - 'visibility' attribute * - 'default_visibility;' attribute of package() declaration * - public. */
Returns the effective visibility of this Rule. Visibility is computed from these sources in this order of preference: - 'visibility' attribute - 'default_visibility;' attribute of package() declaration - public
getVisibility
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/Rule.java", "license": "apache-2.0", "size": 37250 }
[ "com.google.devtools.build.lib.packages.Package" ]
import com.google.devtools.build.lib.packages.Package;
import com.google.devtools.build.lib.packages.*;
[ "com.google.devtools" ]
com.google.devtools;
2,331,051
@Nullable public GridCacheMvccCandidate releaseLocal() { return releaseLocal(Thread.currentThread().getId()); }
@Nullable GridCacheMvccCandidate function() { return releaseLocal(Thread.currentThread().getId()); }
/** * Local local release. * @return Removed lock candidate or <tt>null</tt> if candidate was not removed. */
Local local release
releaseLocal
{ "repo_name": "VladimirErshov/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java", "license": "apache-2.0", "size": 24980 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,823,256
public static String getHazelcastFactory(@Nonnull PMessageDescriptor<?, ?> type) { return camelCase(type.getProgramName()).concat("_Factory"); }
static String function(@Nonnull PMessageDescriptor<?, ?> type) { return camelCase(type.getProgramName()).concat(STR); }
/** * Method to get the thrift file as a class name for a hazelcast factory. * * @param type PStructDescriptor with the information to fetch thrift info from. * @return class name for the hazelcast factory. */
Method to get the thrift file as a class name for a hazelcast factory
getHazelcastFactory
{ "repo_name": "morimekta/thrift-j2", "path": "providence-generator-java/src/main/java/net/morimekta/providence/generator/format/java/utils/JUtils.java", "license": "apache-2.0", "size": 5301 }
[ "javax.annotation.Nonnull", "net.morimekta.providence.descriptor.PMessageDescriptor" ]
import javax.annotation.Nonnull; import net.morimekta.providence.descriptor.PMessageDescriptor;
import javax.annotation.*; import net.morimekta.providence.descriptor.*;
[ "javax.annotation", "net.morimekta.providence" ]
javax.annotation; net.morimekta.providence;
767,539
public String[] getCompleteVerse(int chapter, int verse) { if (!bookOpened) { return null; } if (chapter < 0 || chapter > getChapterCount()) { return null; } if (verse < 0 || verse > getVerseCount(chapter)) { return null; } if (bible.isByteShifted()) { return getVerseByteShifted(chapter...
String[] function(int chapter, int verse) { if (!bookOpened) { return null; } if (chapter < 0 chapter > getChapterCount()) { return null; } if (verse < 0 verse > getVerseCount(chapter)) { return null; } if (bible.isByteShifted()) { return getVerseByteShifted(chapter, verse); } @SuppressWarnings(STR) ArrayList<String>[]...
/** * Get complete verse content for this chapter/verse * * @param chapter * chapter number * @param verse * verse number * @return null on error (book not opened, invalid * chapter/verse) or the content complete content of the verse * (for each "Tags"). Index 0 ...
Get complete verse content for this chapter/verse
getCompleteVerse
{ "repo_name": "Jaden-J/androidbible", "path": "BiblePlus/src/main/java/com/compactbyte/bibleplus/reader/BookInfo.java", "license": "apache-2.0", "size": 20487 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,133,790
private List<Pixels> loadPixelsByImage(Set<Long> imageIds) { StopWatch s1 = new Slf4JStopWatch("omero.loadPixelsByImage"); Parameters p = new Parameters(); p.addIds(imageIds); String sql = "select pix from Pixels as pix " + "join fetch pix.image as i " + "join fetch pix.pixelsType " + "join fet...
List<Pixels> function(Set<Long> imageIds) { StopWatch s1 = new Slf4JStopWatch(STR); Parameters p = new Parameters(); p.addIds(imageIds); String sql = STR + STR + STR + STR + STR + STR; List<Pixels> pixels = iQuery.findAllByQuery(sql, p); s1.stop(); return pixels; }
/** * Retrieves all Pixels linked to a given set of Image IDs. * * @param imageIds Image IDs to retrieve Pixels for. * @return List of Pixels associated with the given Image IDs. */
Retrieves all Pixels linked to a given set of Image IDs
loadPixelsByImage
{ "repo_name": "jballanc/openmicroscopy", "path": "components/server/src/ome/logic/RenderingSettingsImpl.java", "license": "gpl-2.0", "size": 57280 }
[ "java.util.List", "java.util.Set", "org.perf4j.StopWatch", "org.perf4j.slf4j.Slf4JStopWatch" ]
import java.util.List; import java.util.Set; import org.perf4j.StopWatch; import org.perf4j.slf4j.Slf4JStopWatch;
import java.util.*; import org.perf4j.*; import org.perf4j.slf4j.*;
[ "java.util", "org.perf4j", "org.perf4j.slf4j" ]
java.util; org.perf4j; org.perf4j.slf4j;
122,706
public static ReferenceList getRolesList( ) { ReferenceList roleList = _dao.selectRolesList( ); Role defaultRole = getDefaultRole( ); roleList.addItem( defaultRole.getRole( ), defaultRole.getRoleDescription( ) ); return roleList; }
static ReferenceList function( ) { ReferenceList roleList = _dao.selectRolesList( ); Role defaultRole = getDefaultRole( ); roleList.addItem( defaultRole.getRole( ), defaultRole.getRoleDescription( ) ); return roleList; }
/** * Return the list of all roles * * @return A ReferenceList of roles */
Return the list of all roles
getRolesList
{ "repo_name": "rzara/lutece-core", "path": "src/java/fr/paris/lutece/portal/business/role/RoleHome.java", "license": "bsd-3-clause", "size": 6304 }
[ "fr.paris.lutece.util.ReferenceList" ]
import fr.paris.lutece.util.ReferenceList;
import fr.paris.lutece.util.*;
[ "fr.paris.lutece" ]
fr.paris.lutece;
947,507
@Test public void testAeshExtensionCommandNotConnected() throws Exception { CliProcessWrapper cli = new CliProcessWrapper() .addCliArgument("--controller=" + client.getMgmtAddress() + ":" + client.getMgmtPort()) .addCliArgument(CliExtCommand.NAME); cli.executeNonI...
void function() throws Exception { CliProcessWrapper cli = new CliProcessWrapper() .addCliArgument(STR + client.getMgmtAddress() + ":" + client.getMgmtPort()) .addCliArgument(CliExtCommand.NAME); cli.executeNonInteractive(); Assert.assertThat(STR, cli.getProcessExitValue(), is(not(0))); Assert.assertThat(STR, cli.getOu...
/** * Try to use Aesh CLI command, CLI is not connected. Error message should be printed. */
Try to use Aesh CLI command, CLI is not connected. Error message should be printed
testAeshExtensionCommandNotConnected
{ "repo_name": "jamezp/wildfly-core", "path": "testsuite/standalone/src/test/java/org/jboss/as/test/integration/management/cli/extensions/CliExtCommandsTestCase.java", "license": "lgpl-2.1", "size": 10373 }
[ "org.hamcrest.CoreMatchers", "org.jboss.as.test.integration.management.cli.CliProcessWrapper", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.jboss.as.test.integration.management.cli.CliProcessWrapper; import org.junit.Assert;
import org.hamcrest.*; import org.jboss.as.test.integration.management.cli.*; import org.junit.*;
[ "org.hamcrest", "org.jboss.as", "org.junit" ]
org.hamcrest; org.jboss.as; org.junit;
1,520,107
@Override public OutputStream getOutputStream() throws IOException { return new LocalOutputStream(new FileOutputStream(absPath, false).getChannel()); }
OutputStream function() throws IOException { return new LocalOutputStream(new FileOutputStream(absPath, false).getChannel()); }
/** * Implementation notes: the returned <code>InputStream</code> uses a NIO {@link FileChannel} under the hood to * benefit from <code>InterruptibleChannel</code> and allow a thread waiting for an I/O to be gracefully interrupted * using <code>Thread#interrupt()</code>. * @throws IOException if an ...
Implementation notes: the returned <code>InputStream</code> uses a NIO <code>FileChannel</code> under the hood to benefit from <code>InterruptibleChannel</code> and allow a thread waiting for an I/O to be gracefully interrupted using <code>Thread#interrupt()</code>
getOutputStream
{ "repo_name": "Keltek/mucommander", "path": "src/main/com/mucommander/commons/file/impl/local/UNCFile.java", "license": "gpl-3.0", "size": 29731 }
[ "com.mucommander.commons.file.impl.local.LocalFile", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream" ]
import com.mucommander.commons.file.impl.local.LocalFile; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;
import com.mucommander.commons.file.impl.local.*; import java.io.*;
[ "com.mucommander.commons", "java.io" ]
com.mucommander.commons; java.io;
2,147,565
SimpleEntry sampleEntry1 = new SimpleEntry("TestEntry #1", 1); SimpleEntry sampleEntry2 = new SimpleEntry("TestEntry #2", 2); SimpleEntry result; Transaction txn; long leaseTime = timeout2; // first check that space is empty if (!checkSpace(space)) { throw ne...
SimpleEntry sampleEntry1 = new SimpleEntry(STR, 1); SimpleEntry sampleEntry2 = new SimpleEntry(STR, 2); SimpleEntry result; Transaction txn; long leaseTime = timeout2; if (!checkSpace(space)) { throw new TestException( STR); } txn = getTransaction(); space.write(sampleEntry1, txn, Lease.FOREVER); result = (SimpleEntry)...
/** * This method asserts that an entry that is written under the * non null transaction is not visible outside its transaction until the * transaction successfully commits. * * <P>Notes:<BR>For more information see the JavaSpaces specification * section 3.1</P> */
This method asserts that an entry that is written under the non null transaction is not visible outside its transaction until the transaction successfully commits. Notes:For more information see the JavaSpaces specification section 3.1
run
{ "repo_name": "pfirmstone/JGDMS", "path": "qa/src/org/apache/river/test/spec/javaspace/conformance/TransactionCommitWriteTest.java", "license": "apache-2.0", "size": 8670 }
[ "net.jini.core.lease.Lease", "net.jini.core.transaction.Transaction", "org.apache.river.qa.harness.TestException" ]
import net.jini.core.lease.Lease; import net.jini.core.transaction.Transaction; import org.apache.river.qa.harness.TestException;
import net.jini.core.lease.*; import net.jini.core.transaction.*; import org.apache.river.qa.harness.*;
[ "net.jini.core", "org.apache.river" ]
net.jini.core; org.apache.river;
226,566
public long getUpper() { if ( max.equals(infTerm) ) return Global.MaxTemporalHorizon; else if ( min.isVariable() ) return Global.MaxTemporalHorizon; else return ((IntegerTerm)max).getValue(); }
long function() { if ( max.equals(infTerm) ) return Global.MaxTemporalHorizon; else if ( min.isVariable() ) return Global.MaxTemporalHorizon; else return ((IntegerTerm)max).getValue(); }
/** * Get upper bound. * @return the upper bound */
Get upper bound
getUpper
{ "repo_name": "Ewulution/SpiderPlan", "path": "src/main/java/org/spiderplan/representation/expressions/temporal/Interval.java", "license": "mit", "size": 5481 }
[ "org.spiderplan.representation.logic.IntegerTerm", "org.spiderplan.tools.Global" ]
import org.spiderplan.representation.logic.IntegerTerm; import org.spiderplan.tools.Global;
import org.spiderplan.representation.logic.*; import org.spiderplan.tools.*;
[ "org.spiderplan.representation", "org.spiderplan.tools" ]
org.spiderplan.representation; org.spiderplan.tools;
2,842,369
@Nullable public ImmutableMap<String, String> serviceAttributes() { return this.serviceAttributes; }
ImmutableMap<String, String> function() { return this.serviceAttributes; }
/** * The service attributes of the node. */
The service attributes of the node
serviceAttributes
{ "repo_name": "Kreolwolf1/Elastic", "path": "src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java", "license": "apache-2.0", "size": 9060 }
[ "com.google.common.collect.ImmutableMap" ]
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
1,364,612
public void parse (String systemId) throws IOException, SAXException { parse(new InputSource(systemId)); }
void function (String systemId) throws IOException, SAXException { parse(new InputSource(systemId)); }
/** * Parse an XML document. * * @param systemId The absolute URL of the document. * @exception java.io.IOException If there is a problem reading * the raw content of the document. * @exception SAXException If there is a problem * processing the document. * ...
Parse an XML document
parse
{ "repo_name": "github-lis/JamVM-PH", "path": "src/classpath/external/sax/org/xml/sax/helpers/ParserAdapter.java", "license": "gpl-2.0", "size": 27581 }
[ "java.io.IOException", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import org.xml.sax.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
2,128,920
@Nonnull public BuiltInIdentityProviderRequest select(@Nonnull final String value) { addSelectOption(value); return this; }
BuiltInIdentityProviderRequest function(@Nonnull final String value) { addSelectOption(value); return this; }
/** * Sets the select clause for the request * * @param value the select clause * @return the updated request */
Sets the select clause for the request
select
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/BuiltInIdentityProviderRequest.java", "license": "mit", "size": 6379 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,768,766
private String cleanHostName(RawString name) throws ConfigException { String hostName = name.getValue(); if (hostName.indexOf("${") < 0) { for (int i = 0; i < hostName.length(); i++) { char ch = hostName.charAt(i); if (ch == ' ' || ch == '\t' || ch == ',') { throw new ConfigException(L.l("H...
String function(RawString name) throws ConfigException { String hostName = name.getValue(); if (hostName.indexOf("${") < 0) { for (int i = 0; i < hostName.length(); i++) { char ch = hostName.charAt(i); if (ch == ' ' ch == '\t' ch == ',') { throw new ConfigException(L.l(STR, hostName)); } } } return hostName; }
/** * Sets the host name. */
Sets the host name
cleanHostName
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/server/host/HostConfig.java", "license": "gpl-2.0", "size": 5742 }
[ "com.caucho.config.ConfigException", "com.caucho.config.types.RawString" ]
import com.caucho.config.ConfigException; import com.caucho.config.types.RawString;
import com.caucho.config.*; import com.caucho.config.types.*;
[ "com.caucho.config" ]
com.caucho.config;
2,434,600
protected static Statement makeStatement(final String subject, final String predicate, final String object) { checkNotNull(subject); checkNotNull(predicate); checkNotNull(object); final RyaStatement ryaStmt = makeRyaStatement(subject, predicate, object); return RyaToRdfConve...
static Statement function(final String subject, final String predicate, final String object) { checkNotNull(subject); checkNotNull(predicate); checkNotNull(object); final RyaStatement ryaStmt = makeRyaStatement(subject, predicate, object); return RyaToRdfConversions.convertStatement(ryaStmt); }
/** * A helper function for creating a Sesame {@link Statement} that represents * a Triple.. * * @param subject * - The Subject of the Triple. (not null) * @param predicate * - The Predicate of the Triple. (not null) * @param object * - The O...
A helper function for creating a Sesame <code>Statement</code> that represents a Triple.
makeStatement
{ "repo_name": "isper3at/incubator-rya", "path": "extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java", "license": "apache-2.0", "size": 19285 }
[ "com.google.common.base.Preconditions", "org.openrdf.model.Statement" ]
import com.google.common.base.Preconditions; import org.openrdf.model.Statement;
import com.google.common.base.*; import org.openrdf.model.*;
[ "com.google.common", "org.openrdf.model" ]
com.google.common; org.openrdf.model;
2,076,814
@Override public InlineCount getInlineCount();
InlineCount function();
/** * Gets the value of the $inlinecount system query option. * @return {@link InlineCount} the inline count or null */
Gets the value of the $inlinecount system query option
getInlineCount
{ "repo_name": "apache/olingo-odata2", "path": "odata2-lib/odata-api/src/main/java/org/apache/olingo/odata2/api/uri/UriInfo.java", "license": "apache-2.0", "size": 8480 }
[ "org.apache.olingo.odata2.api.commons.InlineCount" ]
import org.apache.olingo.odata2.api.commons.InlineCount;
import org.apache.olingo.odata2.api.commons.*;
[ "org.apache.olingo" ]
org.apache.olingo;
1,312,649
@Nonnull <T> T decode(@Nonnull Type type, @Nonnull MediaType contentType);
@Nonnull <T> T decode(@Nonnull Type type, @Nonnull MediaType contentType);
/** * Convert the HTTP body to the given type. * * @param type Generic type. * @param contentType Content type to use. * @param <T> Conversion type. * @return Instance of conversion type. */
Convert the HTTP body to the given type
decode
{ "repo_name": "jooby-project/jooby", "path": "jooby/src/main/java/io/jooby/Context.java", "license": "apache-2.0", "size": 41138 }
[ "java.lang.reflect.Type", "javax.annotation.Nonnull" ]
import java.lang.reflect.Type; import javax.annotation.Nonnull;
import java.lang.reflect.*; import javax.annotation.*;
[ "java.lang", "javax.annotation" ]
java.lang; javax.annotation;
2,850,265
public ViewGroup getParent() { return parent; }
ViewGroup function() { return parent; }
/** * Gets parent. * * @return the parent */
Gets parent
getParent
{ "repo_name": "AgileAndroid/AgileAdapter", "path": "src/main/java/com/agileandroid/ui/adapters/view/resolver/ViewResolverBuilder.java", "license": "bsd-3-clause", "size": 4339 }
[ "android.view.ViewGroup" ]
import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
1,662,004
@Test public void testClientLoginOverride() throws Exception { SecurityProtocol securityProtocol = SecurityProtocol.SASL_PLAINTEXT; TestJaasConfig jaasConfig = configureMechanisms("PLAIN", Collections.singletonList("PLAIN")); jaasConfig.setClientOptions("PLAIN", "invaliduser", "invalidpa...
void function() throws Exception { SecurityProtocol securityProtocol = SecurityProtocol.SASL_PLAINTEXT; TestJaasConfig jaasConfig = configureMechanisms("PLAIN", Collections.singletonList("PLAIN")); jaasConfig.setClientOptions("PLAIN", STR, STR); server = createEchoServer(securityProtocol); saslClientConfigs.put(SaslCon...
/** * Tests SASL login class override. */
Tests SASL login class override
testClientLoginOverride
{ "repo_name": "Esquive/kafka", "path": "clients/src/test/java/org/apache/kafka/common/security/authenticator/SaslAuthenticatorTest.java", "license": "apache-2.0", "size": 86071 }
[ "java.util.Collections", "org.apache.kafka.common.config.SaslConfigs", "org.apache.kafka.common.security.auth.SecurityProtocol", "org.junit.Assert" ]
import java.util.Collections; import org.apache.kafka.common.config.SaslConfigs; import org.apache.kafka.common.security.auth.SecurityProtocol; import org.junit.Assert;
import java.util.*; import org.apache.kafka.common.config.*; import org.apache.kafka.common.security.auth.*; import org.junit.*;
[ "java.util", "org.apache.kafka", "org.junit" ]
java.util; org.apache.kafka; org.junit;
40,075
public static final Set<String> getCorrespondingEidAttributes(String requestedEidasAttributeName) { return getCorrespondingEidAttributes(EidasNaturalPersonAttributes.valueOf(requestedEidasAttributeName)); }
static final Set<String> function(String requestedEidasAttributeName) { return getCorrespondingEidAttributes(EidasNaturalPersonAttributes.valueOf(requestedEidasAttributeName)); }
/** * Returns a {@link Set} of the names which represent either data groups or special functions required to the read in order to answer a request for the given eIDAS attribute name * * @param requestedEidasAttributeName * The namne of the requested eIDAS attribute * @return A set of names wh...
Returns a <code>Set</code> of the names which represent either data groups or special functions required to the read in order to answer a request for the given eIDAS attribute name
getCorrespondingEidAttributes
{ "repo_name": "eID-Testbeds/server", "path": "eidsrv-testbed-runner/src/main/java/com/secunet/eidserver/testbed/runner/eidas/EidEidasMapping.java", "license": "apache-2.0", "size": 3209 }
[ "de.governikus.eidassaml.starterkit.EidasNaturalPersonAttributes", "java.util.Set" ]
import de.governikus.eidassaml.starterkit.EidasNaturalPersonAttributes; import java.util.Set;
import de.governikus.eidassaml.starterkit.*; import java.util.*;
[ "de.governikus.eidassaml", "java.util" ]
de.governikus.eidassaml; java.util;
1,226,623
void startMessageExpirationWorker() { InboundKernelOpsEvent kernelOpsEvent = new InboundKernelOpsEvent(); kernelOpsEvent.prepareForStartMessageExpirationWorker(messagingEngine); inboundEventManager.publishStateEvent(kernelOpsEvent); }
void startMessageExpirationWorker() { InboundKernelOpsEvent kernelOpsEvent = new InboundKernelOpsEvent(); kernelOpsEvent.prepareForStartMessageExpirationWorker(messagingEngine); inboundEventManager.publishStateEvent(kernelOpsEvent); }
/** * Start message expiration task. This will periodically delete any expired messages * NOTE: This is package specific. We don't need access outside from kernel for this task */
Start message expiration task. This will periodically delete any expired messages
startMessageExpirationWorker
{ "repo_name": "ramith/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/Andes.java", "license": "apache-2.0", "size": 35104 }
[ "org.wso2.andes.kernel.disruptor.inbound.InboundKernelOpsEvent" ]
import org.wso2.andes.kernel.disruptor.inbound.InboundKernelOpsEvent;
import org.wso2.andes.kernel.disruptor.inbound.*;
[ "org.wso2.andes" ]
org.wso2.andes;
2,776,902
private void layoutComponent(Container parent, Component child){ float width = parent.getWidth(); float height = parent.getHeight(); Constraint p = constraintsMap.get(child); if(p==null){ child.doLayout(); return; } float f1 = p.width; float f2 = p.height; if(p.isRelativeWidth){ ...
void function(Container parent, Component child){ float width = parent.getWidth(); float height = parent.getHeight(); Constraint p = constraintsMap.get(child); if(p==null){ child.doLayout(); return; } float f1 = p.width; float f2 = p.height; if(p.isRelativeWidth){ f1 *= width; } if(p.isRelativeHeight){ f2 *= height; } ...
/** * lays out the specified component * @param parent containing the component * @param child component to be laid out (sized and positioned) */
lays out the specified component
layoutComponent
{ "repo_name": "hageldave/UsefulStuff", "path": "src/main/java/old/gui/ProgrammersLayout.java", "license": "gpl-2.0", "size": 22202 }
[ "java.awt.Component", "java.awt.Container" ]
import java.awt.Component; import java.awt.Container;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,200,697
@Generated @Selector("cancelContentEditing") void cancelContentEditing();
@Selector(STR) void cancelContentEditing();
/** * Called if the user cancels the editing session. (Can be called while the receiver is producing the editing output.) */
Called if the user cancels the editing session. (Can be called while the receiver is producing the editing output.)
cancelContentEditing
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/photosui/protocol/PHContentEditingController.java", "license": "apache-2.0", "size": 3395 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,579,032
void lock() throws RemoteException;
void lock() throws RemoteException;
/** * Lock this object. * * @throws RemoteException */
Lock this object
lock
{ "repo_name": "kondziu/AtomicRMI", "path": "src/put/atomicrmi/optsva/objects/ObjectProxy.java", "license": "gpl-3.0", "size": 6316 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
1,013,617
public void setError(VolleyError error) { mError = error; }
void function(VolleyError error) { mError = error; }
/** * Set the error for this response */
Set the error for this response
setError
{ "repo_name": "ly-android/SimplifyReader", "path": "library/src/main/java/com/android/volley/toolbox/ImageLoader.java", "license": "apache-2.0", "size": 20636 }
[ "com.android.volley.VolleyError" ]
import com.android.volley.VolleyError;
import com.android.volley.*;
[ "com.android.volley" ]
com.android.volley;
330,883
public ObjectName[] getObservedObjects(); /** * Gets the object name of the object being observed. * * @return The object being observed. * * @see #setObservedObject * * @deprecated As of JMX 1.2, replaced by {@link #getObservedObjects}
ObjectName[] function(); /** * Gets the object name of the object being observed. * * @return The object being observed. * * @see #setObservedObject * * @deprecated As of JMX 1.2, replaced by {@link #getObservedObjects}
/** * Returns an array containing the objects being observed. * * @return The objects being observed. * */
Returns an array containing the objects being observed
getObservedObjects
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jdk/src/share/classes/javax/management/monitor/MonitorMBean.java", "license": "gpl-2.0", "size": 4577 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
1,152,979
public ServiceFuture<AppServiceEnvironmentResourceInner> createOrUpdateAsync(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, final ServiceCallback<AppServiceEnvironmentResourceInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWith...
ServiceFuture<AppServiceEnvironmentResourceInner> function(String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, final ServiceCallback<AppServiceEnvironmentResourceInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceG...
/** * Create or update an App Service Environment. * Create or update an App Service Environment. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the App Service Environment. * @param hostingEnvironmentEnvelope Configuration deta...
Create or update an App Service Environment. Create or update an App Service Environment
createOrUpdateAsync
{ "repo_name": "anudeepsharma/azure-sdk-for-java", "path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/AppServiceEnvironmentsInner.java", "license": "mit", "size": 564891 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,611,615
public static Graph asReadOnlyGraph(Graph g) { return helper.asReadOnlyGraph(g); }
static Graph function(Graph g) { return helper.asReadOnlyGraph(g); }
/** * This indicates that no further changes to the graph are needed. * Some implementations may give runtime exceptions if this is violated. * @param g the Graph to get as a read-only variant * @return a read-only graph */
This indicates that no further changes to the graph are needed. Some implementations may give runtime exceptions if this is violated
asReadOnlyGraph
{ "repo_name": "TopQuadrant/shacl", "path": "src/main/java/org/topbraid/jenax/util/JenaUtil.java", "license": "apache-2.0", "size": 38680 }
[ "org.apache.jena.graph.Graph" ]
import org.apache.jena.graph.Graph;
import org.apache.jena.graph.*;
[ "org.apache.jena" ]
org.apache.jena;
2,494,871
private void addArgIfNotEmpty( List<String> arguments, String key, String value ) { addArgIfNotEmpty( arguments, key, value, false ); }
void function( List<String> arguments, String key, String value ) { addArgIfNotEmpty( arguments, key, value, false ); }
/** * Convenience method to add an argument to the <code>command line</code> * if the the value is not null or empty. * <p/> * Moreover, the value could be comma separated. * * @param arguments a list of arguments, not null * @param key the argument name. * @param value ...
Convenience method to add an argument to the <code>command line</code> if the the value is not null or empty. Moreover, the value could be comma separated
addArgIfNotEmpty
{ "repo_name": "restlet/maven-plugins", "path": "maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java", "license": "apache-2.0", "size": 227379 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
331,858
public void MakePostToFeedRequest(String in_graphPath, String[] in_params) { Bundle postParams = new Bundle(); for (int i = 0; i < in_params.length; i+=2) { postParams.putString(in_params[i], in_params[i+1]); } ShowDialogWithoutNotificationBar("feed", postParams); }
void function(String in_graphPath, String[] in_params) { Bundle postParams = new Bundle(); for (int i = 0; i < in_params.length; i+=2) { postParams.putString(in_params[i], in_params[i+1]); } ShowDialogWithoutNotificationBar("feed", postParams); }
/** * If a session is open then make the graph request. * * @author T Kane * * @param in_graphPath - Facebook graph path * @param in_params - Additional graph parameters */
If a session is open then make the graph request
MakePostToFeedRequest
{ "repo_name": "fjpavm/ChilliSource", "path": "Source/CSBackend/Platform/Android/Main/Java/com/chilliworks/chillisource/social/FacebookNativeInterface.java", "license": "mit", "size": 19036 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,420,805
public Set<TableName> getSelectorTables() { return new HashSet<>(); }
Set<TableName> function() { return new HashSet<>(); }
/** * Get the tables associated with the current selector. * * @return A set of {@link com.stratio.crossdata.common.data.TableName}. */
Get the tables associated with the current selector
getSelectorTables
{ "repo_name": "ccaballe/crossdata", "path": "crossdata-common/src/main/java/com/stratio/crossdata/common/statements/structures/Selector.java", "license": "apache-2.0", "size": 4345 }
[ "com.stratio.crossdata.common.data.TableName", "java.util.HashSet", "java.util.Set" ]
import com.stratio.crossdata.common.data.TableName; import java.util.HashSet; import java.util.Set;
import com.stratio.crossdata.common.data.*; import java.util.*;
[ "com.stratio.crossdata", "java.util" ]
com.stratio.crossdata; java.util;
1,146,889
public GridCacheVersionConflictContext<K, V> conflictResolve(GridCacheVersionedEntryEx<K, V> oldEntry, GridCacheVersionedEntryEx<K, V> newEntry, boolean atomicVerComp) throws IgniteCheckedException { assert conflictRslvr != null : "Should not reach this place."; GridCacheVersionConflictCont...
GridCacheVersionConflictContext<K, V> function(GridCacheVersionedEntryEx<K, V> oldEntry, GridCacheVersionedEntryEx<K, V> newEntry, boolean atomicVerComp) throws IgniteCheckedException { assert conflictRslvr != null : STR; GridCacheVersionConflictContext<K, V> ctx = conflictRslvr.resolve(oldEntry, newEntry, atomicVerCom...
/** * Resolve DR conflict. * * @param oldEntry Old entry. * @param newEntry New entry. * @param atomicVerComp Whether to use atomic version comparator. * @return Conflict resolution result. * @throws IgniteCheckedException In case of exception. */
Resolve DR conflict
conflictResolve
{ "repo_name": "VladimirErshov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java", "license": "apache-2.0", "size": 60337 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext", "org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEntryEx" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionConflictContext; import org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEntryEx;
import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.version.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,104,395
@Override public TestElement createTestElement() { SmtpSampler sampler = new SmtpSampler(); modifyTestElement(sampler); return sampler; }
TestElement function() { SmtpSampler sampler = new SmtpSampler(); modifyTestElement(sampler); return sampler; }
/** * Creates a new TestElement and set up its data * @return Test-element for JMeter * @see org.apache.jmeter.gui.JMeterGUIComponent#createTestElement() */
Creates a new TestElement and set up its data
createTestElement
{ "repo_name": "benbenw/jmeter", "path": "src/protocol/mail/src/main/java/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpSamplerGui.java", "license": "apache-2.0", "size": 8687 }
[ "org.apache.jmeter.protocol.smtp.sampler.SmtpSampler", "org.apache.jmeter.testelement.TestElement" ]
import org.apache.jmeter.protocol.smtp.sampler.SmtpSampler; import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.protocol.smtp.sampler.*; import org.apache.jmeter.testelement.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
1,568,512
private void createTestDatabaseDb2() { // create tables executeUpdate("create table test_table (col1 int not null primary key generated by default as identity, col2 varchar(12) not null)", dataSource); executeUpdate("create table \"Test_CASE_Table\" (col1 int, foreign key (col1) reference...
void function() { executeUpdate(STR, dataSource); executeUpdate(STRTest_CASE_Table\STR, dataSource); executeUpdate(STR, dataSource); executeUpdate(STRTest_CASE_View\STRTest_CASE_Table\STRcreate sequence test_sequenceSTRcreate sequence \"Test_CASE_Sequence\STRcreate trigger test_trigger before insert on \STR FOR EACH RO...
/** * Creates all test database structures (view, tables...) */
Creates all test database structures (view, tables...)
createTestDatabaseDb2
{ "repo_name": "DbMaintain/dbmaintain", "path": "dbmaintain/src/test/java/org/dbmaintain/structure/clear/impl/DefaultDBClearerTest.java", "license": "apache-2.0", "size": 20861 }
[ "org.dbmaintain.util.SQLTestUtils", "org.junit.jupiter.api.Test" ]
import org.dbmaintain.util.SQLTestUtils; import org.junit.jupiter.api.Test;
import org.dbmaintain.util.*; import org.junit.jupiter.api.*;
[ "org.dbmaintain.util", "org.junit.jupiter" ]
org.dbmaintain.util; org.junit.jupiter;
456,728
public Collection ejbFindAllComplaintsByManager(User user) throws FinderException { return this.idoFindPKsBySQL("select * from "+getEntityName()+" where "+COLUMN_MANAGER_ID+" = "+(user.getPrimaryKey()).toString()); }
Collection function(User user) throws FinderException { return this.idoFindPKsBySQL(STR+getEntityName()+STR+COLUMN_MANAGER_ID+STR+(user.getPrimaryKey()).toString()); }
/** * Method ejbFindAllComplaintsByManager. * @param user * @return Collection * @throws FinderException * @throws RemoteException */
Method ejbFindAllComplaintsByManager
ejbFindAllComplaintsByManager
{ "repo_name": "idega/se.idega.idegaweb.commune", "path": "src/java/se/idega/idegaweb/commune/complaint/data/ComplaintBMPBean.java", "license": "gpl-3.0", "size": 6620 }
[ "com.idega.user.data.User", "java.util.Collection", "javax.ejb.FinderException" ]
import com.idega.user.data.User; import java.util.Collection; import javax.ejb.FinderException;
import com.idega.user.data.*; import java.util.*; import javax.ejb.*;
[ "com.idega.user", "java.util", "javax.ejb" ]
com.idega.user; java.util; javax.ejb;
2,325,280
@Override public boolean execute(String jobName, Date jobRunDate) { final boolean shouldRunIcrEncumbranceActivity = this.getParameterService().getParameterValueAsBoolean(KfsParameterConstants.GENERAL_LEDGER_BATCH.class, GeneralLedgerConstants.USE_ICR_ENCUMBRANCE_PARAM, Boolean.FALSE); if (should...
boolean function(String jobName, Date jobRunDate) { final boolean shouldRunIcrEncumbranceActivity = this.getParameterService().getParameterValueAsBoolean(KfsParameterConstants.GENERAL_LEDGER_BATCH.class, GeneralLedgerConstants.USE_ICR_ENCUMBRANCE_PARAM, Boolean.FALSE); if (shouldRunIcrEncumbranceActivity) { StopWatch s...
/** * This step sorts the ICR Encumbrance file * * @param jobName the name of the job this step is being run as part of * @param jobRunDate the time/date the job was started * @return true if the job completed successfully, false if otherwise * @see org.kuali.kfs.sys.batch.Step#execute(...
This step sorts the ICR Encumbrance file
execute
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/gl/batch/IcrEncumbranceSortStep.java", "license": "agpl-3.0", "size": 3393 }
[ "java.io.File", "java.util.Date", "org.kuali.kfs.gl.GeneralLedgerConstants", "org.kuali.kfs.sys.service.impl.KfsParameterConstants", "org.springframework.util.StopWatch" ]
import java.io.File; import java.util.Date; import org.kuali.kfs.gl.GeneralLedgerConstants; import org.kuali.kfs.sys.service.impl.KfsParameterConstants; import org.springframework.util.StopWatch;
import java.io.*; import java.util.*; import org.kuali.kfs.gl.*; import org.kuali.kfs.sys.service.impl.*; import org.springframework.util.*;
[ "java.io", "java.util", "org.kuali.kfs", "org.springframework.util" ]
java.io; java.util; org.kuali.kfs; org.springframework.util;
856,851
EAttribute getExactNumber_ExactNumber();
EAttribute getExactNumber_ExactNumber();
/** * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ExactNumber#getExactNumber <em>Exact Number</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Exact Number</em>'. * @see hu...
Returns the meta object for the attribute '<code>hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ExactNumber#getExactNumber Exact Number</code>'.
getExactNumber_ExactNumber
{ "repo_name": "viatra/VIATRA-Generator", "path": "Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/ApplicationConfigurationPackage.java", "license": "epl-1.0", "size": 236178 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,261,763
@Test public void testSetStorageTypeQuota() throws Exception { String nsId = "ns0"; String src = "/type-QuotaMounttable"; String dest = "/type-QuotaMounttable"; try { addMountTable(src, nsId, dest); // verify the default quota. MountTable mountTable = getMountTable(src).get(0); ...
void function() throws Exception { String nsId = "ns0"; String src = STR; String dest = STR; try { addMountTable(src, nsId, dest); MountTable mountTable = getMountTable(src).get(0); RouterQuotaUsage quotaUsage = mountTable.getQuota(); for (StorageType t : StorageType.values()) { assertEquals(RouterQuotaUsage.QUOTA_USAG...
/** * Test command -setStorageTypeQuota. */
Test command -setStorageTypeQuota
testSetStorageTypeQuota
{ "repo_name": "steveloughran/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterAdminCLI.java", "license": "apache-2.0", "size": 71599 }
[ "org.apache.hadoop.fs.StorageType", "org.apache.hadoop.hdfs.protocol.HdfsConstants", "org.apache.hadoop.hdfs.server.federation.store.records.MountTable", "org.junit.Assert" ]
import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.server.federation.store.records.MountTable; import org.junit.Assert;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.federation.store.records.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
800,779
private List<String> readConceptFieldValues(String conceptURI, SKOSType type) throws IOException { List<String> labels = conceptMap.get(conceptURI).get(type); if (labels != null) { return labels; } return Collections.emptyList(); }
List<String> function(String conceptURI, SKOSType type) throws IOException { List<String> labels = conceptMap.get(conceptURI).get(type); if (labels != null) { return labels; } return Collections.emptyList(); }
/** * Returns the values of a given field for a given concept */
Returns the values of a given field for a given concept
readConceptFieldValues
{ "repo_name": "jprante/elasticsearch-analysis-skos", "path": "src/test/java/org/xbib/elasticsearch/index/analysis/skos/test/filter/SKOSEngineMock.java", "license": "apache-2.0", "size": 7516 }
[ "java.io.IOException", "java.util.Collections", "java.util.List", "org.xbib.elasticsearch.index.analysis.skos.SKOSTypeAttribute" ]
import java.io.IOException; import java.util.Collections; import java.util.List; import org.xbib.elasticsearch.index.analysis.skos.SKOSTypeAttribute;
import java.io.*; import java.util.*; import org.xbib.elasticsearch.index.analysis.skos.*;
[ "java.io", "java.util", "org.xbib.elasticsearch" ]
java.io; java.util; org.xbib.elasticsearch;
723,105
public Builder restructuringClause(RestructuringClause restructuringClause) { JodaBeanUtils.notNull(restructuringClause, "restructuringClause"); this.restructuringClause = restructuringClause; return this; }
Builder function(RestructuringClause restructuringClause) { JodaBeanUtils.notNull(restructuringClause, STR); this.restructuringClause = restructuringClause; return this; }
/** * Sets the applicable restructuring. * @param restructuringClause the new value, not null * @return this, for chaining, not null */
Sets the applicable restructuring
restructuringClause
{ "repo_name": "nssales/Strata", "path": "modules/finance/src/main/java/com/opengamma/strata/finance/credit/SingleNameReferenceInformation.java", "license": "apache-2.0", "size": 17902 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,835,045
public final Column<Integer> getIdColumn() { return col_id; }
final Column<Integer> function() { return col_id; }
/** * Retrieves the <code>Id</code> <code>Column</code> for this * <code>IntegerField</code> <code>Table</code>. * * see org.melati.poem.prepro.FieldDef#generateColAccessor * @return the id <code>Column</code> */
Retrieves the <code>Id</code> <code>Column</code> for this <code>IntegerField</code> <code>Table</code>. see org.melati.poem.prepro.FieldDef#generateColAccessor
getIdColumn
{ "repo_name": "timp21337/melati-old", "path": "poem/src/test/java/org/melati/poem/test/generated/IntegerFieldTableBase.java", "license": "gpl-2.0", "size": 7882 }
[ "org.melati.poem.Column" ]
import org.melati.poem.Column;
import org.melati.poem.*;
[ "org.melati.poem" ]
org.melati.poem;
1,343,825
EAttribute getFont_Rotation();
EAttribute getFont_Rotation();
/** * Returns the meta object for the attribute '{@link fr.lip6.move.pnml.symmetricnet.hlcorestructure.Font#getRotation <em>Rotation</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Rotation</em>'. * @see fr.lip6.move.pnml.symmetricnet.hlcorestructure....
Returns the meta object for the attribute '<code>fr.lip6.move.pnml.symmetricnet.hlcorestructure.Font#getRotation Rotation</code>'.
getFont_Rotation
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/hlcorestructure/HlcorestructurePackage.java", "license": "epl-1.0", "size": 178846 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
30,620
public static List<ServerHolder> setupDummyCluster(int serverCount, int maxSegments) { List<ServerHolder> serverHolderList = new ArrayList<>(); // Create 10 servers with current size being 3K & max size being 10K // Each having having 100 segments for (int i = 0; i < serverCount; i++) { LoadQu...
static List<ServerHolder> function(int serverCount, int maxSegments) { List<ServerHolder> serverHolderList = new ArrayList<>(); for (int i = 0; i < serverCount; i++) { LoadQueuePeonTester fromPeon = new LoadQueuePeonTester(); List<DataSegment> segments = IntStream .range(0, maxSegments) .mapToObj(j -> getSegment(j)) .c...
/** * Create Druid cluster with serverCount servers having maxSegments segments each, and 1 server with 98 segment * Cost Balancer Strategy should assign the next segment to the server with less segments. */
Create Druid cluster with serverCount servers having maxSegments segments each, and 1 server with 98 segment Cost Balancer Strategy should assign the next segment to the server with less segments
setupDummyCluster
{ "repo_name": "knoguchi/druid", "path": "server/src/test/java/org/apache/druid/server/coordinator/DiskNormalizedCostBalancerStrategyTest.java", "license": "apache-2.0", "size": 6027 }
[ "com.google.common.collect.ImmutableMap", "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.stream.Collectors", "java.util.stream.IntStream", "org.apache.druid.client.ImmutableDruidDataSource", "org.apache.druid.client.ImmutableDruidServer", "org.apache.druid.server.coordi...
import com.google.common.collect.ImmutableMap; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; import java.util.stream.IntStream; import org.apache.druid.client.ImmutableDruidDataSource; import org.apache.druid.client.ImmutableDruidServer; import org....
import com.google.common.collect.*; import java.util.*; import java.util.stream.*; import org.apache.druid.client.*; import org.apache.druid.server.coordination.*; import org.apache.druid.timeline.*; import org.easymock.*;
[ "com.google.common", "java.util", "org.apache.druid", "org.easymock" ]
com.google.common; java.util; org.apache.druid; org.easymock;
657,342
void expectSwitchMatchesCase(NodeTraversal t, Node n, JSType switchType, JSType caseType) { // ECMA-262, page 68, step 3 of evaluation of CaseBlock, // but allowing extra autoboxing. // TODO(user): remove extra conditions when type annotations // in the code base have adapted to the change in th...
void expectSwitchMatchesCase(NodeTraversal t, Node n, JSType switchType, JSType caseType) { if (!switchType.canTestForShallowEqualityWith(caseType) && (caseType.autoboxesTo() == null !caseType.autoboxesTo().isSubtype(switchType))) { mismatch(t, n.getFirstChild(), STR, caseType, switchType); } }
/** * Expect that the type of a switch condition matches the type of its * case condition. */
Expect that the type of a switch condition matches the type of its case condition
expectSwitchMatchesCase
{ "repo_name": "dound/google-closure-compiler", "path": "src/com/google/javascript/jscomp/TypeValidator.java", "license": "apache-2.0", "size": 30417 }
[ "com.google.javascript.rhino.Node", "com.google.javascript.rhino.jstype.JSType" ]
import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSType;
import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*;
[ "com.google.javascript" ]
com.google.javascript;
101,139
@RequestMapping(params = "getChequeBookDuplicateData", method = RequestMethod.POST) public @ResponseBody boolean findChequeBookDuplicateCombination(final TbAcChequebookleafMas tbAcChequebookleafMas, final HttpServletRequest request, final Model model, final BindingResult bindingResult) { boo...
@RequestMapping(params = STR, method = RequestMethod.POST) @ResponseBody boolean function(final TbAcChequebookleafMas tbAcChequebookleafMas, final HttpServletRequest request, final Model model, final BindingResult bindingResult) { boolean isValidationError = false; if (acChequebookleafMasService.getChequeBookCount( tbA...
/** * Shows a form page in order to check a TbAcChequebookleafMas Data entry duplicate or not * * @param model Spring MVC model * @return */
Shows a form page in order to check a TbAcChequebookleafMas Data entry duplicate or not
findChequeBookDuplicateCombination
{ "repo_name": "abmindiarepomanager/ABMOpenMainet", "path": "Mainet1.1/MainetServiceParent/MainetServiceAccount/src/main/java/com/abm/mainet/account/ui/controller/TbAcChequebookleafMasController.java", "license": "gpl-3.0", "size": 24200 }
[ "com.abm.mainet.account.dto.TbAcChequebookleafMas", "com.abm.mainet.common.constant.MainetConstants", "com.abm.mainet.common.utility.ApplicationSession", "com.abm.mainet.common.utility.UserSession", "javax.servlet.http.HttpServletRequest", "org.springframework.ui.Model", "org.springframework.validation....
import com.abm.mainet.account.dto.TbAcChequebookleafMas; import com.abm.mainet.common.constant.MainetConstants; import com.abm.mainet.common.utility.ApplicationSession; import com.abm.mainet.common.utility.UserSession; import javax.servlet.http.HttpServletRequest; import org.springframework.ui.Model; import org.springf...
import com.abm.mainet.account.dto.*; import com.abm.mainet.common.constant.*; import com.abm.mainet.common.utility.*; import javax.servlet.http.*; import org.springframework.ui.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*;
[ "com.abm.mainet", "javax.servlet", "org.springframework.ui", "org.springframework.validation", "org.springframework.web" ]
com.abm.mainet; javax.servlet; org.springframework.ui; org.springframework.validation; org.springframework.web;
1,326,525
@Override Set<N> adjacentNodes(N node);
Set<N> adjacentNodes(N node);
/** * Returns the nodes which have an incident edge in common with {@code node} in this graph. * * @throws IllegalArgumentException if {@code node} is not an element of this graph */
Returns the nodes which have an incident edge in common with node in this graph
adjacentNodes
{ "repo_name": "xasx/guava", "path": "guava/src/com/google/common/graph/ValueGraph.java", "license": "apache-2.0", "size": 13683 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
22,379
HasSimple setSimpleWeight(final Map<String, Double> simpleWeight);
HasSimple setSimpleWeight(final Map<String, Double> simpleWeight);
/** * Set the map of relative field paths to their weights for simple queries. * * @param simpleWeight Map of field paths to weights. * @return This object. */
Set the map of relative field paths to their weights for simple queries
setSimpleWeight
{ "repo_name": "CitrineInformatics/java-citrination-client", "path": "src/main/java/io/citrine/jcc/search/core/query/HasSimple.java", "license": "apache-2.0", "size": 1542 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
571,871
public PDAction getO() { COSDictionary o = (COSDictionary)actions.getDictionaryObject( "O" ); PDAction retval = null; if( o != null ) { retval = PDActionFactory.createAction( o ); } return retval; }
PDAction function() { COSDictionary o = (COSDictionary)actions.getDictionaryObject( "O" ); PDAction retval = null; if( o != null ) { retval = PDActionFactory.createAction( o ); } return retval; }
/** * This will get an action to be performed when the page * is opened. This action is independent of any that may be * defined by the OpenAction entry in the document catalog, * and is executed after such an action. * * @return The O entry of page object's additional actions dictionary. ...
This will get an action to be performed when the page is opened. This action is independent of any that may be defined by the OpenAction entry in the document catalog, and is executed after such an action
getO
{ "repo_name": "ZhenyaM/veraPDF-pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/action/PDPageAdditionalActions.java", "license": "apache-2.0", "size": 3625 }
[ "org.apache.pdfbox.cos.COSDictionary" ]
import org.apache.pdfbox.cos.COSDictionary;
import org.apache.pdfbox.cos.*;
[ "org.apache.pdfbox" ]
org.apache.pdfbox;
2,274,824
public Set<String> getSuppressions() { Set<String> suppressions = info == null ? null : info.suppressions; return suppressions == null ? Collections.<String>emptySet() : suppressions; }
Set<String> function() { Set<String> suppressions = info == null ? null : info.suppressions; return suppressions == null ? Collections.<String>emptySet() : suppressions; }
/** * Returns the set of suppressed warnings. */
Returns the set of suppressed warnings
getSuppressions
{ "repo_name": "brad4d/closure-compiler", "path": "src/com/google/javascript/rhino/JSDocInfo.java", "license": "apache-2.0", "size": 60943 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
961,351
public Object valueOf(String text) { if ("all".equals(text)) return Level.ALL; else if ("finest".equals(text)) return Level.FINEST; else if ("finer".equals(text)) return Level.FINER; else if ("fine".equals(text)) return Level.FINE; else if ("config".equals(text)) re...
Object function(String text) { if ("all".equals(text)) return Level.ALL; else if (STR.equals(text)) return Level.FINEST; else if ("finer".equals(text)) return Level.FINER; else if ("fine".equals(text)) return Level.FINE; else if (STR.equals(text)) return Level.CONFIG; else if ("info".equals(text)) return Level.INFO; el...
/** * Replace with the real path. */
Replace with the real path
valueOf
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/config/type/LevelBuilder.java", "license": "gpl-2.0", "size": 2714 }
[ "com.caucho.config.ConfigException", "java.util.logging.Level" ]
import com.caucho.config.ConfigException; import java.util.logging.Level;
import com.caucho.config.*; import java.util.logging.*;
[ "com.caucho.config", "java.util" ]
com.caucho.config; java.util;
185,356
protected Run getRun(char ch) { Run run; if (whitespace.isValid(ch)) run = whitespace; else if (delimiter.isValid(ch)) run = delimiter; else if (identifier.isValid(ch)) run = identifier; else if (other.isValid(ch)) run = other; else { Assert.isTrue(false); return null; } run.init()...
Run function(char ch) { Run run; if (whitespace.isValid(ch)) run = whitespace; else if (delimiter.isValid(ch)) run = delimiter; else if (identifier.isValid(ch)) run = identifier; else if (other.isValid(ch)) run = other; else { Assert.isTrue(false); return null; } run.init(); return run; }
/** * Returns a run based on a character. * * @param ch * the character to test * @return the correct character given <code>ch</code> */
Returns a run based on a character
getRun
{ "repo_name": "JKatzwinkel/bts", "path": "org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/model/CommonBreakIterator.java", "license": "lgpl-3.0", "size": 13845 }
[ "org.eclipse.core.runtime.Assert" ]
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
93,432
@Override public void setUriEncoding(Charset uriEncoding) { this.uriEncoding = uriEncoding; }
void function(Charset uriEncoding) { this.uriEncoding = uriEncoding; }
/** * Set the character encoding to use for URL decoding. If not specified 'UTF-8' will * be used. * @param uriEncoding the uri encoding to set */
Set the character encoding to use for URL decoding. If not specified 'UTF-8' will be used
setUriEncoding
{ "repo_name": "jxblum/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/tomcat/TomcatReactiveWebServerFactory.java", "license": "apache-2.0", "size": 16257 }
[ "java.nio.charset.Charset" ]
import java.nio.charset.Charset;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,082,715
public int readUI8(String name) throws IOException { newDumpLevel(name, "UI8"); int ret = readEx(); endDumpLevel(ret); return ret; }
int function(String name) throws IOException { newDumpLevel(name, "UI8"); int ret = readEx(); endDumpLevel(ret); return ret; }
/** * Reads one UI8 (Unsigned 8bit integer) value from the stream * * @param name * @return UI8 value or -1 on error * @throws IOException */
Reads one UI8 (Unsigned 8bit integer) value from the stream
readUI8
{ "repo_name": "realmaster42/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java", "license": "gpl-3.0", "size": 122880 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,529,338
public void objectToEntry(Object object, TupleOutput output) { SupplierKey key = (SupplierKey) object; output.writeString(key.getNumber()); } } private static class SupplierBinding extends TupleSerialBinding { private SupplierBinding(ClassCatalog ...
void function(Object object, TupleOutput output) { SupplierKey key = (SupplierKey) object; output.writeString(key.getNumber()); } } private static class SupplierBinding extends TupleSerialBinding { private SupplierBinding(ClassCatalog classCatalog, Class dataClass) { super(classCatalog, dataClass); }
/** * Create the stored key tuple entry from the key object. */
Create the stored key tuple entry from the key object
objectToEntry
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/db/db-4.6.21/examples_java/src/collections/ship/tuple/SampleViews.java", "license": "gpl-2.0", "size": 12188 }
[ "com.sleepycat.bind.serial.ClassCatalog", "com.sleepycat.bind.serial.TupleSerialBinding", "com.sleepycat.bind.tuple.TupleOutput" ]
import com.sleepycat.bind.serial.ClassCatalog; import com.sleepycat.bind.serial.TupleSerialBinding; import com.sleepycat.bind.tuple.TupleOutput;
import com.sleepycat.bind.serial.*; import com.sleepycat.bind.tuple.*;
[ "com.sleepycat.bind" ]
com.sleepycat.bind;
2,887,201
public static void addConfigurationParameters(ResourceCreationSpecifier specifier, Class<?>... dynamicallyLoadedClasses) { for (Class<?> dynamicallyLoadedClass : dynamicallyLoadedClasses) { ConfigurationData reflectedConfigurationData = ConfigurationParameterFactory .createConfig...
static void function(ResourceCreationSpecifier specifier, Class<?>... dynamicallyLoadedClasses) { for (Class<?> dynamicallyLoadedClass : dynamicallyLoadedClasses) { ConfigurationData reflectedConfigurationData = ConfigurationParameterFactory .createConfigurationData(dynamicallyLoadedClass); ResourceCreationSpecifierFac...
/** * Provides a mechanism to add configuration parameter information to a specifier for the given * classes. This method may be useful in situations where a class definition has annotated * configuration parameters that you want to include in the given specifier * * @param specifier * ...
Provides a mechanism to add configuration parameter information to a specifier for the given classes. This method may be useful in situations where a class definition has annotated configuration parameters that you want to include in the given specifier
addConfigurationParameters
{ "repo_name": "agentlab/uimafit-v3-osgi", "path": "bundles/org.apache.uima.fit/src/main/java/org/apache/uima/fit/factory/ConfigurationParameterFactory.java", "license": "apache-2.0", "size": 28372 }
[ "org.apache.uima.resource.ResourceCreationSpecifier" ]
import org.apache.uima.resource.ResourceCreationSpecifier;
import org.apache.uima.resource.*;
[ "org.apache.uima" ]
org.apache.uima;
1,146,284
private MOrderLine copyLineFrom (MOrderLine otherLine,Integer C_Order_ID , Properties ctx, String trx) { MOrderLine newLine = new MOrderLine (ctx,0,trx); MOrderLine.copyValues(otherLine, newLine); newLine.setC_Order_ID(C_Order_ID); newLine.set_ValueOfColumn ("C_OrderLine_ID", new Integer(0)); // new newLi...
MOrderLine function (MOrderLine otherLine,Integer C_Order_ID , Properties ctx, String trx) { MOrderLine newLine = new MOrderLine (ctx,0,trx); MOrderLine.copyValues(otherLine, newLine); newLine.setC_Order_ID(C_Order_ID); newLine.set_ValueOfColumn (STR, new Integer(0)); newLine.setM_AttributeSetInstance_ID(0); newLine.se...
/** * Copy Line From other Order Line * @param otherLine orderLine * @param C_Order_ID C_Order_ID for the new line * @return Newly created line */
Copy Line From other Order Line
copyLineFrom
{ "repo_name": "mgrigioni/oseb", "path": "base/src/org/adempierelbr/process/ProcProcessOtherNF.java", "license": "gpl-2.0", "size": 10933 }
[ "java.util.Properties", "org.compiere.model.MOrderLine", "org.compiere.util.Env" ]
import java.util.Properties; import org.compiere.model.MOrderLine; import org.compiere.util.Env;
import java.util.*; import org.compiere.model.*; import org.compiere.util.*;
[ "java.util", "org.compiere.model", "org.compiere.util" ]
java.util; org.compiere.model; org.compiere.util;
2,101,024
private void createQuietly(String path) { try { zooKeeper.create(path, EMPTY_DATA, ACL, MODE); } catch (KeeperException e) { if (!(e.code() == Code.NODEEXISTS)) { throw new RuntimeException(e); } } catch (InterruptedException e) { ...
void function(String path) { try { zooKeeper.create(path, EMPTY_DATA, ACL, MODE); } catch (KeeperException e) { if (!(e.code() == Code.NODEEXISTS)) { throw new RuntimeException(e); } } catch (InterruptedException e) { throw new RuntimeException(e); } }
/** * Attempts to create the specified path. Quietly swallows a Node Exists * Exception. */
Attempts to create the specified path. Quietly swallows a Node Exists Exception
createQuietly
{ "repo_name": "cwensel/ztree", "path": "src/java/org/apache/zookeeper/ztree/ZNode.java", "license": "apache-2.0", "size": 16467 }
[ "org.apache.zookeeper.KeeperException" ]
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.*;
[ "org.apache.zookeeper" ]
org.apache.zookeeper;
2,644,057
protected void createFile(IFolder folder, String filename, String content, boolean force) throws CoreException { IFile file; file = folder.getFile(filename); if(file.exists() && force) { // file.delete(true,true,null); // YT - deleting files produce inconsistency in SVN working copies file.setConten...
void function(IFolder folder, String filename, String content, boolean force) throws CoreException { IFile file; file = folder.getFile(filename); if(file.exists() && force) { file.setContents(new ByteArrayInputStream(content.getBytes()), true, true, null); } else if(file.exists() && !(force)) { } else { file.create(new...
/** * Creates a <em>text</em> file in an eclipse folder. If this file already * exists it is replaced. * * @param folder * The folder that will contain the file. * @param filename * The name of the file to create. * @param content * Te text content of the file. * @throws CoreEx...
Creates a text file in an eclipse folder. If this file already exists it is replaced
createFile
{ "repo_name": "RobotML/RobotML-SDK-Juno", "path": "plugins/robotml/com.cea.papyrus.gen.cpp.core/src/com/cea/papyrus/gen/cpp/core/transformation/ModelElementsCreator.java", "license": "epl-1.0", "size": 15010 }
[ "java.io.ByteArrayInputStream", "org.eclipse.core.resources.IFile", "org.eclipse.core.resources.IFolder", "org.eclipse.core.runtime.CoreException" ]
import java.io.ByteArrayInputStream; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFolder; import org.eclipse.core.runtime.CoreException;
import java.io.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "java.io", "org.eclipse.core" ]
java.io; org.eclipse.core;
2,218,548
public void initialize() throws ResourceInitializationException { Dictionary nameFinderDictionary; try { String modelName = AnnotatorUtil.getRequiredStringParameter(context, UimaUtil.DICTIONARY_PARAMETER); InputStream inModel = AnnotatorUtil .getResourceAsStream(contex...
void function() throws ResourceInitializationException { Dictionary nameFinderDictionary; try { String modelName = AnnotatorUtil.getRequiredStringParameter(context, UimaUtil.DICTIONARY_PARAMETER); InputStream inModel = AnnotatorUtil .getResourceAsStream(context, modelName); nameFinderDictionary = new Dictionary(inModel...
/** * Initializes the current instance with the given context. * * Note: Do all initialization in this method, do not use the constructor. */
Initializes the current instance with the given context. Note: Do all initialization in this method, do not use the constructor
initialize
{ "repo_name": "aertoria/opennlp", "path": "opennlp-uima/src/main/java/opennlp/uima/namefind/DictionaryNameFinder.java", "license": "apache-2.0", "size": 2613 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.uima.resource.ResourceInitializationException" ]
import java.io.IOException; import java.io.InputStream; import org.apache.uima.resource.ResourceInitializationException;
import java.io.*; import org.apache.uima.resource.*;
[ "java.io", "org.apache.uima" ]
java.io; org.apache.uima;
492,094
@Override public void updateTask() { BlockPosition pos = npc.getUpkeepPoint(); if(pos==null){return;} double dist = npc.getDistanceSq(pos.x+0.5d, pos.y, pos.z+0.5d); if(dist>5.d*5.d) { npc.addAITask(TASK_MOVE); moveToPosition(pos, dist); } else { npc.removeAITask(TASK_MO...
void function() { BlockPosition pos = npc.getUpkeepPoint(); if(pos==null){return;} double dist = npc.getDistanceSq(pos.x+0.5d, pos.y, pos.z+0.5d); if(dist>5.d*5.d) { npc.addAITask(TASK_MOVE); moveToPosition(pos, dist); } else { npc.removeAITask(TASK_MOVE); tryUpkeep(pos); } }
/** * Updates the task */
Updates the task
updateTask
{ "repo_name": "Mazdallier/AncientWarfare2", "path": "src/main/java/net/shadowmage/ancientwarfare/npc/ai/owned/NpcAIPlayerOwnedGetFood.java", "license": "gpl-3.0", "size": 2013 }
[ "net.shadowmage.ancientwarfare.core.util.BlockPosition" ]
import net.shadowmage.ancientwarfare.core.util.BlockPosition;
import net.shadowmage.ancientwarfare.core.util.*;
[ "net.shadowmage.ancientwarfare" ]
net.shadowmage.ancientwarfare;
2,865,003
public void treeNodesRemoved(TreeModelEvent ev) { // TODO: The API docs suggest that this method should do something // but I cannot really see what has to be done here ... }
void function(TreeModelEvent ev) { }
/** * Notifies when a node is removed from the tree. * * This method is called after the actual change occured. * * @param ev the TreeModelEvent describing the change */
Notifies when a node is removed from the tree. This method is called after the actual change occured
treeNodesRemoved
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/JTree.java", "license": "bsd-3-clause", "size": 80712 }
[ "javax.swing.event.TreeModelEvent" ]
import javax.swing.event.TreeModelEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,667,691
public void assertNoQuickFixMessage(Set<String> exceptForThese) { String auraErrorMsg = getQuickFixMessage(); if (!auraErrorMsg.isEmpty()) { if (exceptForThese != null) { // Compare against any expected failures for (String allowedException : exceptForThes...
void function(Set<String> exceptForThese) { String auraErrorMsg = getQuickFixMessage(); if (!auraErrorMsg.isEmpty()) { if (exceptForThese != null) { for (String allowedException : exceptForThese) { if (auraErrorMsg.contains(allowedException)) { return; } } } Assert.fail(STR + auraErrorMsg); } }
/** * Look for any quickfix exceptions. These can sometimes reflect a framework load failure but provide a better error * message. */
Look for any quickfix exceptions. These can sometimes reflect a framework load failure but provide a better error message
assertNoQuickFixMessage
{ "repo_name": "lhong375/aura", "path": "aura/src/test/java/org/auraframework/util/AuraUITestingUtil.java", "license": "apache-2.0", "size": 29356 }
[ "java.util.Set", "junit.framework.Assert" ]
import java.util.Set; import junit.framework.Assert;
import java.util.*; import junit.framework.*;
[ "java.util", "junit.framework" ]
java.util; junit.framework;
2,064,166
@Override public boolean shouldAcceptRequest(String userId, FlowRequest flowRequest) throws Exception { return true; }
boolean function(String userId, FlowRequest flowRequest) throws Exception { return true; }
/** * Accepts all requests */
Accepts all requests
shouldAcceptRequest
{ "repo_name": "dana-i2cat/opennaas-routing-nfv", "path": "extensions/bundles/ofertie.ncl/src/main/java/org/opennaas/extensions/ofertie/ncl/provisioner/components/mockup/QoSPDPMockup.java", "license": "lgpl-3.0", "size": 443 }
[ "org.opennaas.extensions.ofertie.ncl.provisioner.api.model.FlowRequest" ]
import org.opennaas.extensions.ofertie.ncl.provisioner.api.model.FlowRequest;
import org.opennaas.extensions.ofertie.ncl.provisioner.api.model.*;
[ "org.opennaas.extensions" ]
org.opennaas.extensions;
1,306,505
public static Value oci_num_fields(Env env, @NotNull OracleStatement stmt) { try { if (stmt == null) { return BooleanValue.FALSE; } JdbcResultResource resource = stmt.getResultSet(); return LongValue.create(resource.getFieldCount()); } ...
static Value function(Env env, @NotNull OracleStatement stmt) { try { if (stmt == null) { return BooleanValue.FALSE; } JdbcResultResource resource = stmt.getResultSet(); return LongValue.create(resource.getFieldCount()); } catch (Exception e) { env.warning(e); return BooleanValue.FALSE; } }
/** * Returns the number of result columns in a statement */
Returns the number of result columns in a statement
oci_num_fields
{ "repo_name": "smba/oak", "path": "quercus/src/main/java/com/caucho/quercus/lib/db/OracleModule.java", "license": "lgpl-3.0", "size": 62182 }
[ "com.caucho.quercus.annotation.NotNull", "com.caucho.quercus.env.BooleanValue", "com.caucho.quercus.env.Env", "com.caucho.quercus.env.LongValue", "com.caucho.quercus.env.Value" ]
import com.caucho.quercus.annotation.NotNull; import com.caucho.quercus.env.BooleanValue; import com.caucho.quercus.env.Env; import com.caucho.quercus.env.LongValue; import com.caucho.quercus.env.Value;
import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
1,972,733
public IPortletEntity getOrCreatePortletEntity(HttpServletRequest request, IPortletDefinitionId portletDefinitionId, String layoutNodeId, int userId);
IPortletEntity function(HttpServletRequest request, IPortletDefinitionId portletDefinitionId, String layoutNodeId, int userId);
/** * Convenience for {@link #getPortletEntity(String, int)} and {@link #createPortletEntity(IPortletDefinitionId, String, int)}. * If the get returns null the entity will be created and returned. * * @see #getPortletEntity(String, int) * @see #createPortletEntity(IPortletDefinitionId, String,...
Convenience for <code>#getPortletEntity(String, int)</code> and <code>#createPortletEntity(IPortletDefinitionId, String, int)</code>. If the get returns null the entity will be created and returned
getOrCreatePortletEntity
{ "repo_name": "pspaude/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/portlet/registry/IPortletEntityRegistry.java", "license": "apache-2.0", "size": 5483 }
[ "javax.servlet.http.HttpServletRequest", "org.jasig.portal.portlet.om.IPortletDefinitionId", "org.jasig.portal.portlet.om.IPortletEntity" ]
import javax.servlet.http.HttpServletRequest; import org.jasig.portal.portlet.om.IPortletDefinitionId; import org.jasig.portal.portlet.om.IPortletEntity;
import javax.servlet.http.*; import org.jasig.portal.portlet.om.*;
[ "javax.servlet", "org.jasig.portal" ]
javax.servlet; org.jasig.portal;
1,605,692
private void layoutBubble() { bubble.removeAll(); constraints = new GridBagConstraints(); Insets insetsLabel = new Insets(10, 10, 10, 10); Insets insetsMainText = new Insets(0, 10, 10, 10); int numberAdditionalComponents = this.componentsInBubble.length; switch (realAlignment) { case TOPLEFT: ins...
void function() { bubble.removeAll(); constraints = new GridBagConstraints(); Insets insetsLabel = new Insets(10, 10, 10, 10); Insets insetsMainText = new Insets(0, 10, 10, 10); int numberAdditionalComponents = this.componentsInBubble.length; switch (realAlignment) { case TOPLEFT: insetsLabel = new Insets(CORNER_RADIUS...
/** * Adds the components to the bubble. */
Adds the components to the bubble
layoutBubble
{ "repo_name": "transwarpio/rapidminer", "path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/gui/tools/bubble/BubbleWindow.java", "license": "gpl-3.0", "size": 71660 }
[ "java.awt.GridBagConstraints", "java.awt.Insets", "javax.swing.JLabel" ]
import java.awt.GridBagConstraints; import java.awt.Insets; import javax.swing.JLabel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,341,719
public int clampViewPositionVertical(View child, int top, int dy) { return 0; } }
int function(View child, int top, int dy) { return 0; } }
/** * Restrict the motion of the dragged child view along the vertical * axis. The default implementation does not allow vertical motion; the * extending class must override this method and provide the desired * clamping. * * @param child Child view being dragged ...
Restrict the motion of the dragged child view along the vertical axis. The default implementation does not allow vertical motion; the extending class must override this method and provide the desired clamping
clampViewPositionVertical
{ "repo_name": "DragonLz/CYXBS_Android_V2.0", "path": "app/src/main/java/com/mredrock/cyxbs/presenter/activity/swipebacklayout/ViewDragHelper.java", "license": "apache-2.0", "size": 62286 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
207,589