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 Set<E> getMinCutEdges() { return mMinCutEdges; }
Set<E> function() { return mMinCutEdges; }
/** * Returns the edges in the minimum cut. */
Returns the edges in the minimum cut
getMinCutEdges
{ "repo_name": "xiaohanz/softcontroller", "path": "third-party/net.sf.jung2/src/main/java/edu/uci/ics/jung/algorithms/flows/EdmondsKarpMaxFlow.java", "license": "epl-1.0", "size": 11384 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,320,157
public static final URL getUrl(String url) throws MalformedURLException { try { return new URL(url); } catch (MalformedURLException e) { String protocol = new URL(null, url, GENERIC_HANDLER).getProtocol(); URLStreamHandler handler = FileUtils.handlers.get(protocol.toLowerCase()); if (handler != null)...
static final URL function(String url) throws MalformedURLException { try { return new URL(url); } catch (MalformedURLException e) { String protocol = new URL(null, url, GENERIC_HANDLER).getProtocol(); URLStreamHandler handler = FileUtils.handlers.get(protocol.toLowerCase()); if (handler != null) { return new URL(null, ...
/** * If the given string is an valid absolute URL * with a known protocol, returns the URL. * * Throws MalformedURLException otherwise. * * @param url * @return URL constructed from <code>url</code> * @throws MalformedURLException */
If the given string is an valid absolute URL with a known protocol, returns the URL. Throws MalformedURLException otherwise
getUrl
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.engine/src/org/jetel/util/file/FileUtils.java", "license": "lgpl-2.1", "size": 97871 }
[ "java.net.MalformedURLException", "java.net.URLStreamHandler" ]
import java.net.MalformedURLException; import java.net.URLStreamHandler;
import java.net.*;
[ "java.net" ]
java.net;
2,720,257
public ManagedClusterInner updateTags(String resourceGroupName, String resourceName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).toBlocking().last().body(); }
ManagedClusterInner function(String resourceGroupName, String resourceName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, resourceName, tags).toBlocking().last().body(); }
/** * Updates tags on a managed cluster. * Updates a managed cluster with the specified tags. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param tags Resource tags. * @throws IllegalArgumentException th...
Updates tags on a managed cluster. Updates a managed cluster with the specified tags
updateTags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_04_01/implementation/ManagedClustersInner.java", "license": "mit", "size": 126956 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,471,172
private String compareAccessLists( CmsObject cms, String resourceName, OpenCmsTestResourceStorageEntry storedResource, List excludeList) throws CmsException { String noMatches = ""; CmsAccessControlList resList = cms.getAccessControlList(resourceName); CmsAcc...
String function( CmsObject cms, String resourceName, OpenCmsTestResourceStorageEntry storedResource, List excludeList) throws CmsException { String noMatches = STR[ACL differences STR]\nSTR[ACL differences STR]\n"; } return noMatches; }
/** * Compares two access lists and creates a list of permission sets which are * not matching and are not included in a seperate exclude list. * @param cms the CmsObject * @param resourceName the name of the resource the properties belong to * @param storedResource the stored resource correspo...
Compares two access lists and creates a list of permission sets which are not matching and are not included in a seperate exclude list
compareAccessLists
{ "repo_name": "serrapos/opencms-core", "path": "test/org/opencms/test/OpenCmsTestCase.java", "license": "lgpl-2.1", "size": 144807 }
[ "java.util.List", "org.opencms.file.CmsObject", "org.opencms.main.CmsException" ]
import java.util.List; import org.opencms.file.CmsObject; import org.opencms.main.CmsException;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
1,070,251
@ApiModelProperty(example = "null", value = "") public Integer getCurrentNumberOfLoads() { return currentNumberOfLoads; }
@ApiModelProperty(example = "null", value = "") Integer function() { return currentNumberOfLoads; }
/** * Get currentNumberOfLoads * @return currentNumberOfLoads **/
Get currentNumberOfLoads
getCurrentNumberOfLoads
{ "repo_name": "ixaris/ope-applicationclients", "path": "java-client/src/main/java/com/ixaris/ope/applications/client/model/ManagedCard.java", "license": "mit", "size": 29097 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,487,137
public static java.util.List extractMiniNutritionalAssessmentDetailsList(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MiniNutritionalAssessmentDetailsCollection voCollection) { return extractMiniNutritionalAssessmentDetailsList(domainFactory, voCollection, null, new HashMap()); } ...
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MiniNutritionalAssessmentDetailsCollection voCollection) { return extractMiniNutritionalAssessmentDetailsList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessmentDetails list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessmentDetails list from the value object collection
extractMiniNutritionalAssessmentDetailsList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/MiniNutritionalAssessmentDetailsAssembler.java", "license": "agpl-3.0", "size": 17931 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,430,601
public void addError(Test test, Throwable t) { String testName = JUnitVersionHelper.getTestCaseName(test); logTestListenerEvent("addError(" + testName + ", " + t.getMessage() + ")"); if (haltOnError) { res.stop(); } }
void function(Test test, Throwable t) { String testName = JUnitVersionHelper.getTestCaseName(test); logTestListenerEvent(STR + testName + STR + t.getMessage() + ")"); if (haltOnError) { res.stop(); } }
/** * Interface TestListener. * * <p>An error occurred while running the test. * @param test the test. * @param t the error thrown by the test. */
Interface TestListener. An error occurred while running the test
addError
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java", "license": "mit", "size": 49517 }
[ "junit.framework.Test" ]
import junit.framework.Test;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,766,970
public final void addResourceChangeListener( IResourceChangeListener listener ) { if ( resourceChangeListeners == null ) resourceChangeListeners = new ArrayList<IResourceChangeListener>( ); if ( !resourceChangeListeners.contains( listener ) ) resourceChangeListeners.add( listener ); }
final void function( IResourceChangeListener listener ) { if ( resourceChangeListeners == null ) resourceChangeListeners = new ArrayList<IResourceChangeListener>( ); if ( !resourceChangeListeners.contains( listener ) ) resourceChangeListeners.add( listener ); }
/** * Adds one resource change listener. The duplicate listener will not be * added. * * @param listener * the resource change listener to add */
Adds one resource change listener. The duplicate listener will not be added
addResourceChangeListener
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/ModuleImpl.java", "license": "epl-1.0", "size": 72136 }
[ "java.util.ArrayList", "org.eclipse.birt.report.model.api.core.IResourceChangeListener" ]
import java.util.ArrayList; import org.eclipse.birt.report.model.api.core.IResourceChangeListener;
import java.util.*; import org.eclipse.birt.report.model.api.core.*;
[ "java.util", "org.eclipse.birt" ]
java.util; org.eclipse.birt;
650,708
public static org.apache.hadoop.hbase.client.MultiResponse getResults(final MultiRequest request, final Map<Integer, Integer> rowMutationsIndexMap, final MultiResponse response, final CellScanner cells) throws IOException { int requestRegionActionCount = request.getRegionActionCount(); int respons...
static org.apache.hadoop.hbase.client.MultiResponse function(final MultiRequest request, final Map<Integer, Integer> rowMutationsIndexMap, final MultiResponse response, final CellScanner cells) throws IOException { int requestRegionActionCount = request.getRegionActionCount(); int responseRegionActionResultCount = resp...
/** * Get the results from a protocol buffer MultiResponse * * @param request the original protocol buffer MultiRequest * @param rowMutationsIndexMap Used to support RowMutations in batch * @param response the protocol buffer MultiResponse to convert * @param cells Cells to go with the passed in <code...
Get the results from a protocol buffer MultiResponse
getResults
{ "repo_name": "francisliu/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ResponseConverter.java", "license": "apache-2.0", "size": 19256 }
[ "java.io.IOException", "java.util.Map", "org.apache.hadoop.hbase.CellScanner", "org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos", "org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos" ]
import java.io.IOException; import java.util.Map; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos; import org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
557,409
void save(Csar csar);
void save(Csar csar);
/** * Save a Cloud Service Archive in ElasticSearch. * * @param csar The csar to save. */
Save a Cloud Service Archive in ElasticSearch
save
{ "repo_name": "broly-git/alien4cloud", "path": "alien4cloud-core/src/main/java/org/alien4cloud/tosca/catalog/index/ICsarService.java", "license": "apache-2.0", "size": 5145 }
[ "org.alien4cloud.tosca.model.Csar" ]
import org.alien4cloud.tosca.model.Csar;
import org.alien4cloud.tosca.model.*;
[ "org.alien4cloud.tosca" ]
org.alien4cloud.tosca;
1,808,498
public synchronized Client transportClient() { ensureOpen(); // randomly return a transport client going to one of the nodes in the cluster return getOrBuildRandomNode().transportClient(); }
synchronized Client function() { ensureOpen(); return getOrBuildRandomNode().transportClient(); }
/** * Returns a transport client */
Returns a transport client
transportClient
{ "repo_name": "davidvgalbraith/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java", "license": "apache-2.0", "size": 80723 }
[ "org.elasticsearch.client.Client" ]
import org.elasticsearch.client.Client;
import org.elasticsearch.client.*;
[ "org.elasticsearch.client" ]
org.elasticsearch.client;
1,666,464
void saveOrUpdatePeerreviewSession(PeerreviewSession resSession);
void saveOrUpdatePeerreviewSession(PeerreviewSession resSession);
/** * Save or update peerreview session. * * @param resSession */
Save or update peerreview session
saveOrUpdatePeerreviewSession
{ "repo_name": "lamsfoundation/lams", "path": "lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/IPeerreviewService.java", "license": "gpl-2.0", "size": 12435 }
[ "org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession" ]
import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession;
import org.lamsfoundation.lams.tool.peerreview.model.*;
[ "org.lamsfoundation.lams" ]
org.lamsfoundation.lams;
2,098,926
@ServiceMethod(returns = ReturnType.SINGLE) public void start(String resourceGroupName, String cloudServiceName) { startAsync(resourceGroupName, cloudServiceName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String cloudServiceName) { startAsync(resourceGroupName, cloudServiceName).block(); }
/** * Starts the cloud service. * * @param resourceGroupName Name of the resource group. * @param cloudServiceName Name of the cloud service. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ApiErrorException thrown if the request is rejected by server...
Starts the cloud service
start
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CloudServicesClientImpl.java", "license": "mit", "size": 179410 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
30,234
public void dumpStats() { final IgniteLogger log = this.diagnosticLog; if (log != null) { StringBuilder sb = new StringBuilder(); dumpInfo(sb, null); U.warn(log, sb.toString()); GridNioServer<Message> nioSrvr = this.nioSrvr;
void function() { final IgniteLogger log = this.diagnosticLog; if (log != null) { StringBuilder sb = new StringBuilder(); dumpInfo(sb, null); U.warn(log, sb.toString()); GridNioServer<Message> nioSrvr = this.nioSrvr;
/** * Dumps SPI per-connection stats to logs. */
Dumps SPI per-connection stats to logs
dumpStats
{ "repo_name": "endian675/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java", "license": "apache-2.0", "size": 181146 }
[ "org.apache.ignite.IgniteLogger", "org.apache.ignite.internal.util.nio.GridNioServer", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.plugin.extensions.communication.Message" ]
import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.nio.GridNioServer; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.plugin.extensions.communication.Message;
import org.apache.ignite.*; import org.apache.ignite.internal.util.nio.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.plugin.extensions.communication.*;
[ "org.apache.ignite" ]
org.apache.ignite;
554,862
public static void LoadState(String fileName) { try { FileInputStream in = new FileInputStream(fileName); ObjectInputStream s = new ObjectInputStream(in); _timerInstance = (AgentSimulationTime) s.readObject(); _timerInstance.Resume(); s.close(); ...
static void function(String fileName) { try { FileInputStream in = new FileInputStream(fileName); ObjectInputStream s = new ObjectInputStream(in); _timerInstance = (AgentSimulationTime) s.readObject(); _timerInstance.Resume(); s.close(); in.close(); } catch (Exception e) { e.printStackTrace(); } }
/** * Loads a specific state of the AgentSimulationTimer from a previously * saved file * @param fileName - the stream to load the timer state from */
Loads a specific state of the AgentSimulationTimer from a previously saved file
LoadState
{ "repo_name": "nurv/lirec", "path": "AgentMind/trunk/AgentMind/FAtiMA/src/FAtiMA/AgentSimulationTime.java", "license": "gpl-3.0", "size": 7687 }
[ "java.io.FileInputStream", "java.io.ObjectInputStream" ]
import java.io.FileInputStream; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,299,121
@Override public void changeCursor(Cursor cursor) { super.changeCursor(cursor); resetMappings(); }
void function(Cursor cursor) { super.changeCursor(cursor); resetMappings(); }
/** * Changes Cursor and clears list-Cursor mapping. * * @see android.widget.CursorAdapter#changeCursor(android.database.Cursor) */
Changes Cursor and clears list-Cursor mapping
changeCursor
{ "repo_name": "WayneSuper/Mamykopo", "path": "app/src/main/java/cn/wayne/mamypoko/ui/dragsortlistview/DragSortCursorAdapter.java", "license": "apache-2.0", "size": 6902 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
275,984
public JcePGPDataEncryptorBuilder setProvider(Provider provider) { this.helper = new OperatorHelper(new ProviderJcaJceHelper(provider)); return this; }
JcePGPDataEncryptorBuilder function(Provider provider) { this.helper = new OperatorHelper(new ProviderJcaJceHelper(provider)); return this; }
/** * Sets the JCE provider to source cryptographic primitives from. * * @param provider the JCE provider to use. * @return the current builder. */
Sets the JCE provider to source cryptographic primitives from
setProvider
{ "repo_name": "iseki-masaya/spongycastle", "path": "pg/src/main/java/org/spongycastle/openpgp/operator/jcajce/JcePGPDataEncryptorBuilder.java", "license": "mit", "size": 5199 }
[ "java.security.Provider", "org.spongycastle.jcajce.util.ProviderJcaJceHelper" ]
import java.security.Provider; import org.spongycastle.jcajce.util.ProviderJcaJceHelper;
import java.security.*; import org.spongycastle.jcajce.util.*;
[ "java.security", "org.spongycastle.jcajce" ]
java.security; org.spongycastle.jcajce;
36,975
public VpnType vpnType() { return this.vpnType; }
VpnType function() { return this.vpnType; }
/** * Get the type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'. * * @return the vpnType value */
Get the type of this virtual network gateway. Possible values include: 'PolicyBased', 'RouteBased'
vpnType
{ "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/VirtualNetworkGatewayInner.java", "license": "mit", "size": 15173 }
[ "com.microsoft.azure.management.network.v2019_08_01.VpnType" ]
import com.microsoft.azure.management.network.v2019_08_01.VpnType;
import com.microsoft.azure.management.network.v2019_08_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
894,009
void closeConnectionToNamenode() { RPC.stopProxy(namenode); }
void closeConnectionToNamenode() { RPC.stopProxy(namenode); }
/** * Close connections the Namenode. */
Close connections the Namenode
closeConnectionToNamenode
{ "repo_name": "jonathangizmo/HadoopDistJ", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java", "license": "mit", "size": 117695 }
[ "org.apache.hadoop.ipc.RPC" ]
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
586,793
@SuppressWarnings("unchecked") public static List<Float> toList(float[] array) { return DefaultTypeTransformation.primitiveArrayToList(array); }
@SuppressWarnings(STR) static List<Float> function(float[] array) { return DefaultTypeTransformation.primitiveArrayToList(array); }
/** * Converts this array to a List of the same size, with each element * added to the list. * * @param array a float array * @return a list containing the contents of this array. * @since 1.0 */
Converts this array to a List of the same size, with each element added to the list
toList
{ "repo_name": "apache/incubator-groovy", "path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "apache-2.0", "size": 703151 }
[ "java.util.List", "org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation" ]
import java.util.List; import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
import java.util.*; import org.codehaus.groovy.runtime.typehandling.*;
[ "java.util", "org.codehaus.groovy" ]
java.util; org.codehaus.groovy;
2,620,814
TDImportResult importBytes(String database, String table, byte[] content, int offset, int length, String id);
TDImportResult importBytes(String database, String table, byte[] content, int offset, int length, String id);
/** * Import a msgpack.gz file upon target table * @param database target database * @param table target table * @param content source msgpack.gz formatted bytes * @param offset start offset of content bytes * @param length length of bytes * @param id unique import id, ex uuid, which ...
Import a msgpack.gz file upon target table
importBytes
{ "repo_name": "treasure-data/td-client-java", "path": "src/main/java/com/treasuredata/client/TDClientApi.java", "license": "apache-2.0", "size": 15031 }
[ "com.treasuredata.client.model.TDImportResult" ]
import com.treasuredata.client.model.TDImportResult;
import com.treasuredata.client.model.*;
[ "com.treasuredata.client" ]
com.treasuredata.client;
2,367,204
public static LZ4Factory fastestInstance () { if (Native.isLoaded () || Native.class.getClassLoader () == ClassLoader.getSystemClassLoader ()) { try { return nativeInstance (); } catch (Throwable t) { return fastestJavaInstance (); ...
static LZ4Factory function () { if (Native.isLoaded () Native.class.getClassLoader () == ClassLoader.getSystemClassLoader ()) { try { return nativeInstance (); } catch (Throwable t) { return fastestJavaInstance (); } } else { return fastestJavaInstance (); } }
/** * Return the fastest available {@link LZ4Factory} instance. If the class * loader is the system class loader and if the * {@link #nativeInstance() native instance} loads successfully, then the * {@link #nativeInstance() native instance} is returned, otherwise the * {@link #fastestJavaInstan...
Return the fastest available <code>LZ4Factory</code> instance. If the class loader is the system class loader and if the <code>#nativeInstance() native instance</code> loads successfully, then the <code>#nativeInstance() native instance</code> is returned, otherwise the <code>#fastestJavaInstance() fastest Java instanc...
fastestInstance
{ "repo_name": "CodeBrig/Beam", "path": "src/net/jpountz/lz4/LZ4Factory.java", "license": "mit", "size": 8616 }
[ "net.jpountz.util.Native" ]
import net.jpountz.util.Native;
import net.jpountz.util.*;
[ "net.jpountz.util" ]
net.jpountz.util;
190,162
public void generate(JavaWriter out) throws Exception { }
void function(JavaWriter out) throws Exception { }
/** * Generates the code for the tag * * @param out the output writer for the generated java. */
Generates the code for the tag
generate
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/xsl/java/XtpDeclaration.java", "license": "gpl-2.0", "size": 2316 }
[ "com.caucho.java.JavaWriter" ]
import com.caucho.java.JavaWriter;
import com.caucho.java.*;
[ "com.caucho.java" ]
com.caucho.java;
705,520
protected EntityManagerFactory createEntityManagerFactoryProxy(EntityManagerFactory emf) { Set<Class<?>> ifcs = new LinkedHashSet<>(); if (this.entityManagerFactoryInterface != null) { ifcs.add(this.entityManagerFactoryInterface); } else if (emf != null) { ifcs.addAll(ClassUtils.getAllInterfacesForClas...
EntityManagerFactory function(EntityManagerFactory emf) { Set<Class<?>> ifcs = new LinkedHashSet<>(); if (this.entityManagerFactoryInterface != null) { ifcs.add(this.entityManagerFactoryInterface); } else if (emf != null) { ifcs.addAll(ClassUtils.getAllInterfacesForClassAsSet(emf.getClass(), this.beanClassLoader)); } e...
/** * Create a proxy of the given EntityManagerFactory. We do this to be able * to return transaction-aware proxies for application-managed * EntityManagers, and to introduce the NamedEntityManagerFactory interface * @param emf EntityManagerFactory as returned by the persistence provider * @return proxy entit...
Create a proxy of the given EntityManagerFactory. We do this to be able to return transaction-aware proxies for application-managed EntityManagers, and to introduce the NamedEntityManagerFactory interface
createEntityManagerFactoryProxy
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.orm/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java", "license": "mit", "size": 24196 }
[ "java.lang.reflect.Proxy", "java.util.LinkedHashSet", "java.util.Set", "javax.persistence.EntityManagerFactory", "org.springframework.util.ClassUtils" ]
import java.lang.reflect.Proxy; import java.util.LinkedHashSet; import java.util.Set; import javax.persistence.EntityManagerFactory; import org.springframework.util.ClassUtils;
import java.lang.reflect.*; import java.util.*; import javax.persistence.*; import org.springframework.util.*;
[ "java.lang", "java.util", "javax.persistence", "org.springframework.util" ]
java.lang; java.util; javax.persistence; org.springframework.util;
1,662,748
@Test public void testRecoverAfterIncompleteRecovery() throws Exception { setupLoggers345(); // Shut down the logger that has length = 5 cluster.getJournalNode(2).stopAndJoin(0); qjm = createSpyingQJM(); spies = qjm.getLoggerSetForTests().getLoggersForTests(); // Allow no logger to finali...
void function() throws Exception { setupLoggers345(); cluster.getJournalNode(2).stopAndJoin(0); qjm = createSpyingQJM(); spies = qjm.getLoggerSetForTests().getLoggersForTests(); for (AsyncLogger spy : spies) { TestQuorumJournalManagerUnit.futureThrows(new IOException(STR)) .when(spy).finalizeLogSegment(Mockito.eq(1L), ...
/** * edit lengths [3,4,5] * first recovery: * - sees [3,4,x] * - picks length 4 for recoveryEndTxId * - calls acceptRecovery() * - crashes before finalizing * second recovery: * - sees [x, 4, 5] * - should pick recovery length 4, even though it saw * a larger txid, because a previous re...
edit lengths [3,4,5] first recovery: - sees [3,4,x] - picks length 4 for recoveryEndTxId - calls acceptRecovery() - crashes before finalizing second recovery: - sees [x, 4, 5] - should pick recovery length 4, even though it saw a larger txid, because a previous recovery accepted it
testRecoverAfterIncompleteRecovery
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/qjournal/client/TestQuorumJournalManager.java", "license": "apache-2.0", "size": 34752 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.qjournal.client.TestQuorumJournalManagerUnit", "org.apache.hadoop.test.GenericTestUtils", "org.junit.Assert", "org.mockito.Mockito" ]
import java.io.IOException; import org.apache.hadoop.hdfs.qjournal.client.TestQuorumJournalManagerUnit; import org.apache.hadoop.test.GenericTestUtils; import org.junit.Assert; import org.mockito.Mockito;
import java.io.*; import org.apache.hadoop.hdfs.qjournal.client.*; import org.apache.hadoop.test.*; import org.junit.*; import org.mockito.*;
[ "java.io", "org.apache.hadoop", "org.junit", "org.mockito" ]
java.io; org.apache.hadoop; org.junit; org.mockito;
1,136,334
public static long updateIfaceVLANFromLink(Interface iface, Link link) { if (link.getSource().equals(iface)) iface.setVlan(link.getSink().getVlan()); else iface.setVlan(link.getSource().getVlan()); return iface.getVlan(); }
static long function(Interface iface, Link link) { if (link.getSource().equals(iface)) iface.setVlan(link.getSink().getVlan()); else iface.setVlan(link.getSource().getVlan()); return iface.getVlan(); }
/** * Sets iface vlan according to the other endpoint of given link. * * @param iface * to update * @param link * to get vlan from */
Sets iface vlan according to the other endpoint of given link
updateIfaceVLANFromLink
{ "repo_name": "dana-i2cat/opennaas-routing-nfv", "path": "extensions/bundles/vcpe/src/main/java/org/opennaas/extensions/vcpe/model/helper/VCPENetworkModelHelper.java", "license": "lgpl-3.0", "size": 21028 }
[ "org.opennaas.extensions.vcpe.model.Interface", "org.opennaas.extensions.vcpe.model.Link" ]
import org.opennaas.extensions.vcpe.model.Interface; import org.opennaas.extensions.vcpe.model.Link;
import org.opennaas.extensions.vcpe.model.*;
[ "org.opennaas.extensions" ]
org.opennaas.extensions;
1,115,361
public JSONObject toJSONObject(Object o) throws JsonProcessingException, ParseException { return (JSONObject) _parser.get().parse(toJSON(o, false)); }
JSONObject function(Object o) throws JsonProcessingException, ParseException { return (JSONObject) _parser.get().parse(toJSON(o, false)); }
/** * Transforms a bean (aka POJO) to a JSONObject. */
Transforms a bean (aka POJO) to a JSONObject
toJSONObject
{ "repo_name": "iraghumitra/incubator-metron", "path": "metron-platform/metron-common/src/main/java/org/apache/metron/common/utils/JSONUtils.java", "license": "apache-2.0", "size": 6565 }
[ "com.fasterxml.jackson.core.JsonProcessingException", "org.json.simple.JSONObject", "org.json.simple.parser.ParseException" ]
import com.fasterxml.jackson.core.JsonProcessingException; import org.json.simple.JSONObject; import org.json.simple.parser.ParseException;
import com.fasterxml.jackson.core.*; import org.json.simple.*; import org.json.simple.parser.*;
[ "com.fasterxml.jackson", "org.json.simple" ]
com.fasterxml.jackson; org.json.simple;
698,804
protected static int getSlave(Long receiverID) throws Exception { int slave; String[] columns = {MasterSlaveTable.COLUMN_SLAVE}; Cursor cursor = DatabaseHandler.database.query(MasterSlaveTable.TABLE_NAME, columns, MasterSlaveTable.COLUMN_RECEIVER_ID + "==" + receiverID, null,...
static int function(Long receiverID) throws Exception { int slave; String[] columns = {MasterSlaveTable.COLUMN_SLAVE}; Cursor cursor = DatabaseHandler.database.query(MasterSlaveTable.TABLE_NAME, columns, MasterSlaveTable.COLUMN_RECEIVER_ID + "==" + receiverID, null, null, null, null); if (cursor.moveToFirst()) { slave ...
/** * Returns the slave channel of a MasterSlaveReceiver. * * @param receiverID The ID of the receiver. * @return The slave channel of the receiver. */
Returns the slave channel of a MasterSlaveReceiver
getSlave
{ "repo_name": "Power-Switch/PowerSwitch_Android", "path": "Smartphone/src/main/java/eu/power_switch/database/handler/MasterSlaveReceiverHandler.java", "license": "gpl-3.0", "size": 4013 }
[ "android.database.Cursor", "eu.power_switch.database.table.receiver.MasterSlaveTable", "java.util.NoSuchElementException" ]
import android.database.Cursor; import eu.power_switch.database.table.receiver.MasterSlaveTable; import java.util.NoSuchElementException;
import android.database.*; import eu.power_switch.database.table.receiver.*; import java.util.*;
[ "android.database", "eu.power_switch.database", "java.util" ]
android.database; eu.power_switch.database; java.util;
691,409
public void onClearClick(View v) { reset(); }
void function(View v) { reset(); }
/** * Called when "Clear" button is clicked * * @param v */
Called when "Clear" button is clicked
onClearClick
{ "repo_name": "iFernandoSousa/cordova-salesforcesdk", "path": "src/android/com/salesforce/androidsdk/smartstore/ui/SmartStoreInspectorActivity.java", "license": "unlicense", "size": 10574 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,441,828
public void initialize() { enqueue(new GetVersionMessageClass().doRequest()); enqueue(new MemoryGetIdMessageClass().doRequest()); enqueue(new SerialApiGetCapabilitiesMessageClass().doRequest()); enqueue(new SerialApiSetTimeoutsMessageClass().doRequest(150, 15)); enqueue(new G...
void function() { enqueue(new GetVersionMessageClass().doRequest()); enqueue(new MemoryGetIdMessageClass().doRequest()); enqueue(new SerialApiGetCapabilitiesMessageClass().doRequest()); enqueue(new SerialApiSetTimeoutsMessageClass().doRequest(150, 15)); enqueue(new GetSucNodeIdMessageClass().doRequest()); }
/** * Initializes communication with the ZWave controller stick. * */
Initializes communication with the ZWave controller stick
initialize
{ "repo_name": "jongj/openhab2-addons", "path": "addons/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/ZWaveController.java", "license": "epl-1.0", "size": 55391 }
[ "org.openhab.binding.zwave.internal.protocol.serialmessage.GetSucNodeIdMessageClass", "org.openhab.binding.zwave.internal.protocol.serialmessage.GetVersionMessageClass", "org.openhab.binding.zwave.internal.protocol.serialmessage.MemoryGetIdMessageClass", "org.openhab.binding.zwave.internal.protocol.serialmess...
import org.openhab.binding.zwave.internal.protocol.serialmessage.GetSucNodeIdMessageClass; import org.openhab.binding.zwave.internal.protocol.serialmessage.GetVersionMessageClass; import org.openhab.binding.zwave.internal.protocol.serialmessage.MemoryGetIdMessageClass; import org.openhab.binding.zwave.internal.protocol...
import org.openhab.binding.zwave.internal.protocol.serialmessage.*;
[ "org.openhab.binding" ]
org.openhab.binding;
458,551
@Override public void update(ByteBuffer buffer) { int pos = buffer.position(); int limit = buffer.limit(); assert (pos <= limit); int rem = limit - pos; if (rem <= 0) return; if (buffer instanceof DirectBuffer) { crc = updateByteBuffer(crc,...
void function(ByteBuffer buffer) { int pos = buffer.position(); int limit = buffer.limit(); assert (pos <= limit); int rem = limit - pos; if (rem <= 0) return; if (buffer instanceof DirectBuffer) { crc = updateByteBuffer(crc, ((DirectBuffer)buffer).address(), pos, rem); } else if (buffer.hasArray()) { crc = updateBytes...
/** * Updates the CRC-32 checksum with the bytes from the specified buffer. * * The checksum is updated with the remaining bytes in the buffer, starting * at the buffer's position. Upon return, the buffer's position will be * updated to its limit; its limit will not have been changed. * ...
Updates the CRC-32 checksum with the bytes from the specified buffer. The checksum is updated with the remaining bytes in the buffer, starting at the buffer's position. Upon return, the buffer's position will be updated to its limit; its limit will not have been changed
update
{ "repo_name": "universsky/openjdk", "path": "jdk/src/java.base/share/classes/java/util/zip/CRC32.java", "license": "gpl-2.0", "size": 5570 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,735,191
@Test public void testDuplicateRevisions() { int randNum = getRandomInt(); String sourceFile = "//depot/93bugs/Job039414/test01/..."; String targetFile = "//depot/93bugs/Job039414/" + randNum + "/..."; int startRev = 0; int endRev = 2; try { FileSpec sourceSpec = new FileSpec(sourceFile); sour...
void function() { int randNum = getRandomInt(); String sourceFile = STR int startRev = 0; int endRev = 2; try { FileSpec sourceSpec = new FileSpec(sourceFile); sourceSpec.setStartRevision(startRev); sourceSpec.setEndRevision(endRev); FileSpec targetSpec = new FileSpec(targetFile); List<IFileSpec> files = superServer.du...
/** * Test 'p4 duplicate'. */
Test 'p4 duplicate'
testDuplicateRevisions
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/features122/DuplicateRevisionsTest.java", "license": "apache-2.0", "size": 3281 }
[ "com.perforce.p4java.core.file.FileSpecBuilder", "com.perforce.p4java.core.file.IFileSpec", "com.perforce.p4java.core.file.IObliterateResult", "com.perforce.p4java.exception.P4JavaException", "com.perforce.p4java.impl.generic.core.file.FileSpec", "com.perforce.p4java.option.server.DuplicateRevisionsOption...
import com.perforce.p4java.core.file.FileSpecBuilder; import com.perforce.p4java.core.file.IFileSpec; import com.perforce.p4java.core.file.IObliterateResult; import com.perforce.p4java.exception.P4JavaException; import com.perforce.p4java.impl.generic.core.file.FileSpec; import com.perforce.p4java.option.server.Duplica...
import com.perforce.p4java.core.file.*; import com.perforce.p4java.exception.*; import com.perforce.p4java.impl.generic.core.file.*; import com.perforce.p4java.option.server.*; import java.util.*; import org.junit.*;
[ "com.perforce.p4java", "java.util", "org.junit" ]
com.perforce.p4java; java.util; org.junit;
2,058,412
@Generated @StructureField(order = 4, isGetter = false) public native void setFlags(byte value);
@StructureField(order = 4, isGetter = false) native void function(byte value);
/** * set to 0 for now */
set to 0 for now
setFlags
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/coretext/struct/KernIndexArrayHeader.java", "license": "apache-2.0", "size": 3762 }
[ "org.moe.natj.c.ann.StructureField" ]
import org.moe.natj.c.ann.StructureField;
import org.moe.natj.c.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,640,960
@Test(expected = IllegalArgumentException.class) public void minkowskiSumInvalidCount3() { Geometry.minkowskiSum(Geometry.createUnitCirclePolygon(5, 0.5), Geometry.createCircle(0.5), 0); }
@Test(expected = IllegalArgumentException.class) void function() { Geometry.minkowskiSum(Geometry.createUnitCirclePolygon(5, 0.5), Geometry.createCircle(0.5), 0); }
/** * Test the minkowski sum method given an invalid count. * @since 3.1.5 */
Test the minkowski sum method given an invalid count
minkowskiSumInvalidCount3
{ "repo_name": "satishbabusee/dyn4j", "path": "junit/org/dyn4j/geometry/GeometryTest.java", "license": "bsd-3-clause", "size": 54121 }
[ "org.dyn4j.geometry.Geometry", "org.junit.Test" ]
import org.dyn4j.geometry.Geometry; import org.junit.Test;
import org.dyn4j.geometry.*; import org.junit.*;
[ "org.dyn4j.geometry", "org.junit" ]
org.dyn4j.geometry; org.junit;
2,796,695
protected final MessageAddressingProperties newChannelParams() { assertNotNull(newReply); assertNotNull(newReply.getMessageContext()); SoapMessage request = (SoapMessage)newReply.getMessageContext().getRequest(); assertNotNull(request); MessageAddressingProperties wsaPropert...
final MessageAddressingProperties function() { assertNotNull(newReply); assertNotNull(newReply.getMessageContext()); SoapMessage request = (SoapMessage)newReply.getMessageContext().getRequest(); assertNotNull(request); MessageAddressingProperties wsaProperties = TestUtil.getWSAProperties(request); assertNotNull(wsaProp...
/** * Only response is allow using a brand new channel * * @return */
Only response is allow using a brand new channel
newChannelParams
{ "repo_name": "sabre1041/camel", "path": "components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/addressing/AbstractWSATests.java", "license": "apache-2.0", "size": 6971 }
[ "org.apache.camel.component.spring.ws.utils.TestUtil", "org.springframework.ws.soap.SoapMessage", "org.springframework.ws.soap.addressing.core.MessageAddressingProperties" ]
import org.apache.camel.component.spring.ws.utils.TestUtil; import org.springframework.ws.soap.SoapMessage; import org.springframework.ws.soap.addressing.core.MessageAddressingProperties;
import org.apache.camel.component.spring.ws.utils.*; import org.springframework.ws.soap.*; import org.springframework.ws.soap.addressing.core.*;
[ "org.apache.camel", "org.springframework.ws" ]
org.apache.camel; org.springframework.ws;
1,244,630
private Cursor query(String selection, String[] selectionArgs, String[] columns) { HashMap<String, String> mColumnMap = new HashMap<String, String>(); mColumnMap.put(DEPLOYMENT_ID, DEPLOYMENT_ID); mColumnMap.put(DEPLOYMENT_CAT_ID, DEPLOYMENT_CAT_ID); mColumnMap.put(DEPLOYMENT_DESC, D...
Cursor function(String selection, String[] selectionArgs, String[] columns) { HashMap<String, String> mColumnMap = new HashMap<String, String>(); mColumnMap.put(DEPLOYMENT_ID, DEPLOYMENT_ID); mColumnMap.put(DEPLOYMENT_CAT_ID, DEPLOYMENT_CAT_ID); mColumnMap.put(DEPLOYMENT_DESC, DEPLOYMENT_DESC); mColumnMap.put(DEPLOYMEN...
/** * Performs a database query. * * @param selection The selection clause * @param selectionArgs Selection arguments for "?" components in the * selection * @param columns The columns to return * @return A Cursor over all rows matching the query */
Performs a database query
query
{ "repo_name": "mckayb24/Ushahidi_Android", "path": "Core/src/com/ushahidi/android/app/data/Database.java", "license": "lgpl-3.0", "size": 42834 }
[ "android.app.SearchManager", "android.database.Cursor", "android.database.sqlite.SQLiteQueryBuilder", "android.provider.BaseColumns", "java.util.HashMap" ]
import android.app.SearchManager; import android.database.Cursor; import android.database.sqlite.SQLiteQueryBuilder; import android.provider.BaseColumns; import java.util.HashMap;
import android.app.*; import android.database.*; import android.database.sqlite.*; import android.provider.*; import java.util.*;
[ "android.app", "android.database", "android.provider", "java.util" ]
android.app; android.database; android.provider; java.util;
1,113,311
@Override public void initialize(UimaContext context) throws ResourceInitializationException { super.initialize(context); try { //RelevantRetrievedCorrectCounterResource resource = (RelevantRetrievedCorrectCounterResource) context.getResourceObject("SharedRelevantRetrievedAndCorrectCounterResource"); Rele...
void function(UimaContext context) throws ResourceInitializationException { super.initialize(context); try { RelevantRetrievedCorrectCounterResource resource = (RelevantRetrievedCorrectCounterResource)getContext().getResourceObject(STR); this.setRelevantRetrievedCorrectCounterResource(resource); String annotationType =...
/** * Get and set the resource, * the Test and the Gold annotation types to compare with, * eventually their FeaturesNames to compare * from parameters */
Get and set the resource, the Test and the Gold annotation types to compare with, eventually their FeaturesNames to compare from parameters
initialize
{ "repo_name": "DrDub/uima-common", "path": "src/fr/univnantes/lina/uima/nlp/InformationRetrievalEvaluatorAE.java", "license": "apache-2.0", "size": 12074 }
[ "fr.univnantes.lina.uima.resources.RelevantRetrievedCorrectCounterResource", "org.apache.uima.UimaContext", "org.apache.uima.resource.ResourceInitializationException" ]
import fr.univnantes.lina.uima.resources.RelevantRetrievedCorrectCounterResource; import org.apache.uima.UimaContext; import org.apache.uima.resource.ResourceInitializationException;
import fr.univnantes.lina.uima.resources.*; import org.apache.uima.*; import org.apache.uima.resource.*;
[ "fr.univnantes.lina", "org.apache.uima" ]
fr.univnantes.lina; org.apache.uima;
950,041
@Test public void testLength() { System.out.println("length"); assertEquals(5, INSTANCE.length()); }
void function() { System.out.println(STR); assertEquals(5, INSTANCE.length()); }
/** * Test of length method, of class ArrayGene. */
Test of length method, of class ArrayGene
testLength
{ "repo_name": "yferras/javartint", "path": "crow-javartint/crow-javartint-gea/src/test/java/com/github/yferras/javartint/gea/gene/ArrayGeneTest.java", "license": "gpl-3.0", "size": 4986 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,278,123
Task<CompileResult> task = createTask(tplfile); compiler.submit(task); return task; } public static class PostCompileProcessor { private final Compiler compiler; private final CompilerOptions options; public PostCompileProcessor(Compiler compiler) { this.compiler = compiler; this.options = comp...
Task<CompileResult> task = createTask(tplfile); compiler.submit(task); return task; } static class PostCompileProcessor { private final Compiler functionr; final CompilerOptions options; public PostCompileProcessor(Compiler functionr) { this.compiler = compiler; this.options = compiler.options; }
/** * Unconditionally compiles the template, but does not put it into the * cache. This is useful for (re)compilations of a large number of template * where keeping them for a build is not necessary. * * @param tplfile * absolute path of the file to compile * * @return return a result that ...
Unconditionally compiles the template, but does not put it into the cache. This is useful for (re)compilations of a large number of template where keeping them for a build is not necessary
compile
{ "repo_name": "quattor/pan", "path": "panc/src/main/java/org/quattor/pan/cache/CompileCache.java", "license": "apache-2.0", "size": 5052 }
[ "org.quattor.pan.Compiler", "org.quattor.pan.CompilerOptions", "org.quattor.pan.tasks.CompileResult", "org.quattor.pan.tasks.Task" ]
import org.quattor.pan.Compiler; import org.quattor.pan.CompilerOptions; import org.quattor.pan.tasks.CompileResult; import org.quattor.pan.tasks.Task;
import org.quattor.pan.*; import org.quattor.pan.tasks.*;
[ "org.quattor.pan" ]
org.quattor.pan;
2,569,287
@Deprecated @Override public Type get(Object pkey) throws IOException, SQLException { if(pkey == null) return null; if(pkey instanceof Integer) return get(((Integer)pkey).intValue()); else if(pkey instanceof String) return get((String)pkey); else throw new IllegalArgumentException("Must be an Integer or ...
Type function(Object pkey) throws IOException, SQLException { if(pkey == null) return null; if(pkey instanceof Integer) return get(((Integer)pkey).intValue()); else if(pkey instanceof String) return get((String)pkey); else throw new IllegalArgumentException(STR); }
/** * Supports both Integer (num) and String (type) keys. * * @deprecated Always try to lookup by specific keys; the compiler will help you more when types change. */
Supports both Integer (num) and String (type) keys
get
{ "repo_name": "aoindustries/aoserv-client", "path": "src/main/java/com/aoindustries/aoserv/client/schema/TypeTable.java", "license": "lgpl-3.0", "size": 2426 }
[ "java.io.IOException", "java.sql.SQLException" ]
import java.io.IOException; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,057,314
public ArrayList<V> removeValues() { ArrayList<V> values = this.values.remove(); //assert values != null; return values; }
ArrayList<V> function() { ArrayList<V> values = this.values.remove(); return values; }
/** * Retrieves and remove the first list of values * * @return the first key */
Retrieves and remove the first list of values
removeValues
{ "repo_name": "kl0u/visco", "path": "src/mapred/visco/core/merge/IOChannelBuffer.java", "license": "apache-2.0", "size": 2854 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,682,392
@ApiModelProperty(example = "null", value = "This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction wil...
@ApiModelProperty(example = "null", value = STR) String function() { return documentCode; }
/** * This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction will be stored * @return documentCode ...
This string is a code maintained by the client application to uniquely identify a document in the client's systems. It will typically be an invoice number, sales order, receipt number, returned merchandise authorization number, etc. When has this field, the transaction will be stored
getDocumentCode
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/model/SalesHeaderIn.java", "license": "gpl-3.0", "size": 14182 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,282,520
public static boolean isValidRegion(String region) { try { Regions.fromName(region.toLowerCase()); } catch (IllegalArgumentException e) { return false; } return true; } public static final String AWS_CLIENT_CONFIG_PREFIX = "aws.clientconfig.";
static boolean function(String region) { try { Regions.fromName(region.toLowerCase()); } catch (IllegalArgumentException e) { return false; } return true; } public static final String AWS_CLIENT_CONFIG_PREFIX = STR;
/** * Checks whether or not a region ID is valid. * * @param region The AWS region ID to check * @return true if the supplied region ID is valid, false otherwise */
Checks whether or not a region ID is valid
isValidRegion
{ "repo_name": "greghogan/flink", "path": "flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/AWSUtil.java", "license": "apache-2.0", "size": 12947 }
[ "com.amazonaws.regions.Regions" ]
import com.amazonaws.regions.Regions;
import com.amazonaws.regions.*;
[ "com.amazonaws.regions" ]
com.amazonaws.regions;
2,903,275
public @Nullable String getIconName() { return iconName; }
@Nullable String function() { return iconName; }
/** * Returns the custom icon assigned to the device * * @return a possibly null, possibly empty icon name */
Returns the custom icon assigned to the device
getIconName
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/models/NeeoDevice.java", "license": "epl-1.0", "size": 14520 }
[ "org.eclipse.jdt.annotation.Nullable" ]
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jdt.annotation.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,549,962
public void setDirection(EdgeDirection direction) { this.direction = direction; }
void function(EdgeDirection direction) { this.direction = direction; }
/** * Sets the direction in which neighbors are to be selected * By default the neighbors who are target of the edges are selected. * * @param direction - IN, OUT or ALL */
Sets the direction in which neighbors are to be selected By default the neighbors who are target of the edges are selected
setDirection
{ "repo_name": "haohui/flink", "path": "flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/gsa/GSAConfiguration.java", "license": "apache-2.0", "size": 4678 }
[ "org.apache.flink.graph.EdgeDirection" ]
import org.apache.flink.graph.EdgeDirection;
import org.apache.flink.graph.*;
[ "org.apache.flink" ]
org.apache.flink;
929,512
void encode(T message, FrameBuilder builder);
void encode(T message, FrameBuilder builder);
/** * Encodes the specified Message into a Frame. * * @param message The Message to encode. * @param builder The FrameBuilder used to build the Frame from the specified Message. */
Encodes the specified Message into a Frame
encode
{ "repo_name": "ryleykimmel/brandywine", "path": "network/src/main/java/me/ryleykimmel/brandywine/network/message/MessageEncoder.java", "license": "isc", "size": 570 }
[ "me.ryleykimmel.brandywine.network.frame.FrameBuilder" ]
import me.ryleykimmel.brandywine.network.frame.FrameBuilder;
import me.ryleykimmel.brandywine.network.frame.*;
[ "me.ryleykimmel.brandywine" ]
me.ryleykimmel.brandywine;
2,871,199
public long getLength(ExtendedBlock b) throws IOException; /** * Get reference to the replica meta info in the replicasMap. * To be called from methods that are synchronized on {@link FSDataset}
long function(ExtendedBlock b) throws IOException; /** * Get reference to the replica meta info in the replicasMap. * To be called from methods that are synchronized on {@link FSDataset}
/** * Returns the specified block's on-disk length (excluding metadata) * @return the specified block's on-disk length (excluding metadta) * @throws IOException on error */
Returns the specified block's on-disk length (excluding metadata)
getLength
{ "repo_name": "vesense/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java", "license": "apache-2.0", "size": 18892 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.ExtendedBlock" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,499,799
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLayeredPane3 = new javax.swing.JLayeredPane(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); ...
@SuppressWarnings(STR) void function() { jLayeredPane3 = new javax.swing.JLayeredPane(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jTextField1 = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jComboBox1 = new javax.swing.JComboBox(); jLabel1 = new javax.swing...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "rochmanmaarif/inpatient", "path": "inpatient/src/Sistem_monitoring_mutasi_ri/frmCariMedrec.java", "license": "gpl-2.0", "size": 12524 }
[ "javax.swing.table.DefaultTableModel" ]
import javax.swing.table.DefaultTableModel;
import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
895,219
private static Subscribe recupSubscribe(ResultSet rs) throws SQLException { Subscribe subscribe = new Subscribe(); int subscribeId = rs.getInt("subscribeId"); String userId = rs.getString("userId"); String instanceId = rs.getString("instanceId"); String field1 = rs.getString("field1"); S...
static Subscribe function(ResultSet rs) throws SQLException { Subscribe subscribe = new Subscribe(); int subscribeId = rs.getInt(STR); String userId = rs.getString(STR); String instanceId = rs.getString(STR); String field1 = rs.getString(STR); String field2 = rs.getString(STR); subscribe.setSubscribeId(Integer.toString...
/** * get a subscription to resultSet * @param rs : ResultSet * @return Subscribe * @throws SQLException */
get a subscription to resultSet
recupSubscribe
{ "repo_name": "stephaneperry/Silverpeas-Components", "path": "classifieds/classifieds-jar/src/main/java/com/silverpeas/classifieds/dao/ClassifiedsDAO.java", "license": "agpl-3.0", "size": 22024 }
[ "com.silverpeas.classifieds.model.Subscribe", "java.sql.ResultSet", "java.sql.SQLException" ]
import com.silverpeas.classifieds.model.Subscribe; import java.sql.ResultSet; import java.sql.SQLException;
import com.silverpeas.classifieds.model.*; import java.sql.*;
[ "com.silverpeas.classifieds", "java.sql" ]
com.silverpeas.classifieds; java.sql;
2,802,271
public static String getParameter( ApplicationEvent event, String name ) { String parametersJson = event.parameters().get(); try { JSONObject jsonObject = new JSONObject( parametersJson ); return jsonObject.get( name ).toString(); } catch (JSONException e)...
static String function( ApplicationEvent event, String name ) { String parametersJson = event.parameters().get(); try { JSONObject jsonObject = new JSONObject( parametersJson ); return jsonObject.get( name ).toString(); } catch (JSONException e) { return null; } }
/** * Get the named parameter from an event. * * @param event event with parameters * @param name name of parameter * @return the parameter with the given name or null */
Get the named parameter from an event
getParameter
{ "repo_name": "joobn72/qi4j-sdk", "path": "libraries/eventsourcing/src/main/java/org/qi4j/library/eventsourcing/application/source/helper/ApplicationEventParameters.java", "license": "apache-2.0", "size": 2111 }
[ "org.json.JSONException", "org.json.JSONObject", "org.qi4j.library.eventsourcing.application.api.ApplicationEvent" ]
import org.json.JSONException; import org.json.JSONObject; import org.qi4j.library.eventsourcing.application.api.ApplicationEvent;
import org.json.*; import org.qi4j.library.eventsourcing.application.api.*;
[ "org.json", "org.qi4j.library" ]
org.json; org.qi4j.library;
920,070
protected synchronized boolean doRegister(Collection<DynamicMetric<?, ?>> dynamicMetrics, String description, String domain, String... keyValuePairs) throws JMException { return doRegister(dynamicMetrics, description, MBeanRegistrar.buildObjectName(domain, keyValuePairs)); }
synchronized boolean function(Collection<DynamicMetric<?, ?>> dynamicMetrics, String description, String domain, String... keyValuePairs) throws JMException { return doRegister(dynamicMetrics, description, MBeanRegistrar.buildObjectName(domain, keyValuePairs)); }
/** * Instantiates a new Dynamic MBean provider. * @param dynamicMetrics Dynamic Metrics that are exposed by this provider * @param description the MBean description * @param domain the MBean domain name * @param keyValuePairs the MBean object name components */
Instantiates a new Dynamic MBean provider
doRegister
{ "repo_name": "lei-xia/helix", "path": "metrics-common/src/main/java/org/apache/helix/monitoring/mbeans/dynamicMBeans/DynamicMBeanProvider.java", "license": "apache-2.0", "size": 9341 }
[ "java.util.Collection", "javax.management.JMException", "org.apache.helix.monitoring.mbeans.MBeanRegistrar" ]
import java.util.Collection; import javax.management.JMException; import org.apache.helix.monitoring.mbeans.MBeanRegistrar;
import java.util.*; import javax.management.*; import org.apache.helix.monitoring.mbeans.*;
[ "java.util", "javax.management", "org.apache.helix" ]
java.util; javax.management; org.apache.helix;
2,386,434
public static Proxy getProxy(Class<?>... ics) { return getProxy(ClassHelper.getCallerClassLoader(Proxy.class), ics); }
static Proxy function(Class<?>... ics) { return getProxy(ClassHelper.getCallerClassLoader(Proxy.class), ics); }
/** * Get proxy. * * @param ics interface class array. * @return Proxy instance. */
Get proxy
getProxy
{ "repo_name": "wuziliang18/source-code-learn-dubbo", "path": "dubbo-common/src/main/java/com/alibaba/dubbo/common/bytecode/Proxy.java", "license": "apache-2.0", "size": 8696 }
[ "com.alibaba.dubbo.common.utils.ClassHelper" ]
import com.alibaba.dubbo.common.utils.ClassHelper;
import com.alibaba.dubbo.common.utils.*;
[ "com.alibaba.dubbo" ]
com.alibaba.dubbo;
1,111,467
@Test public void testLoadImportLog() throws ServerError, CannotCreateSessionException, PermissionDeniedException { final long currentGroupId = iAdmin.getEventContext().groupId; final Map<String, String> groupContext = ImmutableMap.of(Login.OMERO_GROUP, Long.toString(currentGroupId)...
void function() throws ServerError, CannotCreateSessionException, PermissionDeniedException { final long currentGroupId = iAdmin.getEventContext().groupId; final Map<String, String> groupContext = ImmutableMap.of(Login.OMERO_GROUP, Long.toString(currentGroupId)); final IUpdatePrx iUpdateRoot = (IUpdatePrx) root.getSess...
/** * Test that the correct import logs are retrieved for given fileset and image IDs. * @throws ServerError unexpected * @throws CannotCreateSessionException unexpected * @throws PermissionDeniedException unexpected */
Test that the correct import logs are retrieved for given fileset and image IDs
testLoadImportLog
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/MetadataServiceTest.java", "license": "gpl-2.0", "size": 84821 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableMap", "java.util.List", "java.util.Map", "org.testng.AssertJUnit" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import java.util.List; import java.util.Map; import org.testng.AssertJUnit;
import com.google.common.collect.*; import java.util.*; import org.testng.*;
[ "com.google.common", "java.util", "org.testng" ]
com.google.common; java.util; org.testng;
598,982
public static String getApplicationPaginatedURL(Integer offset, Integer limit) { String paginatedURL = RestApiConstants.APPLICATIONS_GET_PAGINATION_URL; paginatedURL = paginatedURL.replace(RestApiConstants.LIMIT_PARAM, String.valueOf(limit)); paginatedURL = paginatedURL.replace(RestApiConsta...
static String function(Integer offset, Integer limit) { String paginatedURL = RestApiConstants.APPLICATIONS_GET_PAGINATION_URL; paginatedURL = paginatedURL.replace(RestApiConstants.LIMIT_PARAM, String.valueOf(limit)); paginatedURL = paginatedURL.replace(RestApiConstants.OFFSET_PARAM, String.valueOf(offset)); return pag...
/** * Returns the paginated url for Applications API * * @param offset starting index * @param limit max number of objects returned * @return constructed paginated url */
Returns the paginated url for Applications API
getApplicationPaginatedURL
{ "repo_name": "sambaheerathan/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.commons/src/main/java/org/wso2/carbon/apimgt/rest/api/common/util/RestApiUtil.java", "license": "apache-2.0", "size": 17206 }
[ "org.wso2.carbon.apimgt.rest.api.common.RestApiConstants" ]
import org.wso2.carbon.apimgt.rest.api.common.RestApiConstants;
import org.wso2.carbon.apimgt.rest.api.common.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,437,669
SAMLSSORespDTO process(SAMLSSOAuthnReqDTO authnReqDTO, String sessionId, boolean isAuthenticated, String authenticators, String authMode) throws Exception;
SAMLSSORespDTO process(SAMLSSOAuthnReqDTO authnReqDTO, String sessionId, boolean isAuthenticated, String authenticators, String authMode) throws Exception;
/** * Processes the authentication request according to SAML SSO Web Browser Specification * * @return SAMLSSOSignInResponseDTO : includes validation outputs * @throws IdentityException */
Processes the authentication request according to SAML SSO Web Browser Specification
process
{ "repo_name": "pulasthi7/carbon-identity", "path": "components/sso-saml/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/processors/SSOAuthnRequestProcessor.java", "license": "apache-2.0", "size": 1788 }
[ "org.wso2.carbon.identity.sso.saml.dto.SAMLSSOAuthnReqDTO", "org.wso2.carbon.identity.sso.saml.dto.SAMLSSORespDTO" ]
import org.wso2.carbon.identity.sso.saml.dto.SAMLSSOAuthnReqDTO; import org.wso2.carbon.identity.sso.saml.dto.SAMLSSORespDTO;
import org.wso2.carbon.identity.sso.saml.dto.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
342,460
public Object getElementData(Node n) { if (elementDataMap == null) return null; Object o = elementDataMap.get(n); if (o == null) return null; SoftReference sr = (SoftReference)o; o = sr.get(); if (o == null) { elementDataMap.remove(n); ...
Object function(Node n) { if (elementDataMap == null) return null; Object o = elementDataMap.get(n); if (o == null) return null; SoftReference sr = (SoftReference)o; o = sr.get(); if (o == null) { elementDataMap.remove(n); } return o; }
/** * Retrieves a data object associated with the given node. */
Retrieves a data object associated with the given node
getElementData
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/BridgeContext.java", "license": "apache-2.0", "size": 69332 }
[ "java.lang.ref.SoftReference", "org.w3c.dom.Node" ]
import java.lang.ref.SoftReference; import org.w3c.dom.Node;
import java.lang.ref.*; import org.w3c.dom.*;
[ "java.lang", "org.w3c.dom" ]
java.lang; org.w3c.dom;
2,843,754
@Parameters(name = "{1}") public static Collection<Object[]> getLevels() { return asList(new Object[][] { { Level.WARN, "WARN" }, { Level.ERROR, "ERROR" } }); }
@Parameters(name = "{1}") static Collection<Object[]> function() { return asList(new Object[][] { { Level.WARN, "WARN" }, { Level.ERROR, "ERROR" } }); }
/** * Returns all severity levels that are relevant for testing. * * @return Each object array contains the severity level for issuing log entries and the expected severity level * text in outputs */
Returns all severity levels that are relevant for testing
getLevels
{ "repo_name": "pmwmedia/tinylog", "path": "tinylog-api/src/test/java/org/tinylog/provider/InternalLoggerTest.java", "license": "apache-2.0", "size": 4336 }
[ "java.util.Arrays", "java.util.Collection", "org.junit.runners.Parameterized", "org.tinylog.Level" ]
import java.util.Arrays; import java.util.Collection; import org.junit.runners.Parameterized; import org.tinylog.Level;
import java.util.*; import org.junit.runners.*; import org.tinylog.*;
[ "java.util", "org.junit.runners", "org.tinylog" ]
java.util; org.junit.runners; org.tinylog;
2,130,261
public void getA( final Complex a ) { a.assign( aRe, aIm ); }
void function( final Complex a ) { a.assign( aRe, aIm ); }
/** assigns <code>a</code> with entry <code>a</code> of this ** @param a complex value which is assigned with entry <code>a</code>. */
assigns <code>a</code> with entry <code>a</code> of this
getA
{ "repo_name": "jupsal/schmies-jTEM", "path": "libUnzipped/de/jtem/mfc/matrix/AbstractComplex2By2.java", "license": "bsd-2-clause", "size": 33984 }
[ "de.jtem.mfc.field.Complex" ]
import de.jtem.mfc.field.Complex;
import de.jtem.mfc.field.*;
[ "de.jtem.mfc" ]
de.jtem.mfc;
2,377,009
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[1] == PackageManager.PERMISSION_GRANTED) { solveRouteBetweenTwoPoints(...
void function(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED && grantResults[1] == PackageManager.PERMISSION_GRANTED) { solveRouteBetweenTwoPoints(); } else { Toast.makeText(this, getString(R.string.locat...
/** * Handle the permissions request response. */
Handle the permissions request response
onRequestPermissionsResult
{ "repo_name": "Esri/arcgis-runtime-samples-android", "path": "java/navigate-in-ar/src/main/java/com/esri/arcgisruntime/sample/navigateinar/MainActivity.java", "license": "apache-2.0", "size": 12777 }
[ "android.content.pm.PackageManager", "android.widget.Toast", "androidx.annotation.NonNull" ]
import android.content.pm.PackageManager; import android.widget.Toast; import androidx.annotation.NonNull;
import android.content.pm.*; import android.widget.*; import androidx.annotation.*;
[ "android.content", "android.widget", "androidx.annotation" ]
android.content; android.widget; androidx.annotation;
1,830,002
public static boolean arePartsEqual(ByteBuffer buffer, int offsetLeft, int lengthLeft, int offsetRight, int lengthRight) { if (lengthLeft != lengthRight) { return false; } if (buffer.hasArray()) { return 0 == Bytes.compareTo( buffer.array(), buffer.arrayOffset() + offset...
static boolean function(ByteBuffer buffer, int offsetLeft, int lengthLeft, int offsetRight, int lengthRight) { if (lengthLeft != lengthRight) { return false; } if (buffer.hasArray()) { return 0 == Bytes.compareTo( buffer.array(), buffer.arrayOffset() + offsetLeft, lengthLeft, buffer.array(), buffer.arrayOffset() + offs...
/** * Check whether two parts in the same buffer are equal. * @param buffer In which buffer there are parts * @param offsetLeft Beginning of first part. * @param lengthLeft Length of the first part. * @param offsetRight Beginning of the second part. * @param lengthRight Length of the second part. *...
Check whether two parts in the same buffer are equal
arePartsEqual
{ "repo_name": "HubSpot/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/ByteBufferUtils.java", "license": "apache-2.0", "size": 39287 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,233,949
public int getContrast() throws SonyProjectorException { return convertDataToInt(getSetting(SonyProjectorItem.CONTRAST)); }
int function() throws SonyProjectorException { return convertDataToInt(getSetting(SonyProjectorItem.CONTRAST)); }
/** * Request the projector to get the current contrast setting * * @return the current contrast value * * @throws SonyProjectorException - In case of any problem */
Request the projector to get the current contrast setting
getContrast
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.sonyprojector/src/main/java/org/openhab/binding/sonyprojector/internal/communication/SonyProjectorConnector.java", "license": "epl-1.0", "size": 43482 }
[ "org.openhab.binding.sonyprojector.internal.SonyProjectorException" ]
import org.openhab.binding.sonyprojector.internal.SonyProjectorException;
import org.openhab.binding.sonyprojector.internal.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,746,196
private static void registerSlotFilled(UpdateSpec updateSpec, Slot slot, Object value) { slot.fill(value); updateSpec.getNonTransactionalGroup().includeSlot(slot); updateSpec.getFinalTransaction().registerTask(new HandleSlotFilledTask(slot)); }
static void function(UpdateSpec updateSpec, Slot slot, Object value) { slot.fill(value); updateSpec.getNonTransactionalGroup().includeSlot(slot); updateSpec.getFinalTransaction().registerTask(new HandleSlotFilledTask(slot)); }
/** * Given a Slot and a concrete value with which to fill the slot, we fill the * value with the slot and create a new {@link HandleSlotFilledTask} for the * newly filled Slot. We register the Slot and the Task with the given * UpdateSpec for later saving. * * @param updateSpec The Slot will be added...
Given a Slot and a concrete value with which to fill the slot, we fill the value with the slot and create a new <code>HandleSlotFilledTask</code> for the newly filled Slot. We register the Slot and the Task with the given UpdateSpec for later saving
registerSlotFilled
{ "repo_name": "sosandstrom/appengine-mapreduce", "path": "src/com/google/appengine/tools/pipeline/impl/PipelineManager.java", "license": "apache-2.0", "size": 39652 }
[ "com.google.appengine.tools.pipeline.impl.backend.UpdateSpec", "com.google.appengine.tools.pipeline.impl.model.Slot", "com.google.appengine.tools.pipeline.impl.tasks.HandleSlotFilledTask" ]
import com.google.appengine.tools.pipeline.impl.backend.UpdateSpec; import com.google.appengine.tools.pipeline.impl.model.Slot; import com.google.appengine.tools.pipeline.impl.tasks.HandleSlotFilledTask;
import com.google.appengine.tools.pipeline.impl.backend.*; import com.google.appengine.tools.pipeline.impl.model.*; import com.google.appengine.tools.pipeline.impl.tasks.*;
[ "com.google.appengine" ]
com.google.appengine;
2,267,602
public void setNotEmployedReason(final EmploymentNotEmployedReasonEnum notEmployedReason) { this.notEmployedReason = notEmployedReason; }
void function(final EmploymentNotEmployedReasonEnum notEmployedReason) { this.notEmployedReason = notEmployedReason; }
/** * Set the value related to the column: notEmployedReason. * @param notEmployedReason the notEmployedReason value you wish to set */
Set the value related to the column: notEmployedReason
setNotEmployedReason
{ "repo_name": "servinglynk/hmis-lynk-open-source", "path": "hmis-model-v2016/src/main/java/com/servinglynk/hmis/warehouse/model/v2016/Employment.java", "license": "mpl-2.0", "size": 13316 }
[ "com.servinglynk.hmis.warehouse.enums.EmploymentNotEmployedReasonEnum" ]
import com.servinglynk.hmis.warehouse.enums.EmploymentNotEmployedReasonEnum;
import com.servinglynk.hmis.warehouse.enums.*;
[ "com.servinglynk.hmis" ]
com.servinglynk.hmis;
99,198
protected boolean affectsOverrideIndicatorAnnotations(PropertyChangeEvent event) { String key= event.getProperty(); AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(OverrideIndicatorManager.ANNOTATION_TYPE); if (key == null || preference == null) return false; retu...
boolean function(PropertyChangeEvent event) { String key= event.getProperty(); AnnotationPreference preference= getAnnotationPreferenceLookup().getAnnotationPreference(OverrideIndicatorManager.ANNOTATION_TYPE); if (key == null preference == null) return false; return key.equals(preference.getHighlightPreferenceKey()) k...
/** * Determines whether the preference change encoded by the given event * changes the override indication. * * @param event the event to be investigated * @return <code>true</code> if event causes a change * @since 3.0 */
Determines whether the preference change encoded by the given event changes the override indication
affectsOverrideIndicatorAnnotations
{ "repo_name": "trylimits/Eclipse-Postfix-Code-Completion", "path": "luna/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java", "license": "epl-1.0", "size": 138550 }
[ "org.eclipse.jface.util.PropertyChangeEvent", "org.eclipse.ui.texteditor.AnnotationPreference" ]
import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.jface.util.*; import org.eclipse.ui.texteditor.*;
[ "org.eclipse.jface", "org.eclipse.ui" ]
org.eclipse.jface; org.eclipse.ui;
2,721,913
public Builder definition(BillTransactionDefinition definition) { this._definition = definition; return this; }
Builder function(BillTransactionDefinition definition) { this._definition = definition; return this; }
/** * Sets the bond definition. * @param definition the new value * @return this, for chaining, not null */
Sets the bond definition
definition
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial/src/main/java/com/mcleodmoores/financial/function/trade/DiscountBondDetailsProvider.java", "license": "apache-2.0", "size": 13964 }
[ "com.opengamma.analytics.financial.instrument.bond.BillTransactionDefinition" ]
import com.opengamma.analytics.financial.instrument.bond.BillTransactionDefinition;
import com.opengamma.analytics.financial.instrument.bond.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
1,856,120
ReferenceEntry<K, V> getFirst(int hash) { // read this volatile field only once AtomicReferenceArray<ReferenceEntry<K, V>> table = this.table; return table.get(hash & (table.length() - 1)); } // Specialized implementations of map methods
ReferenceEntry<K, V> getFirst(int hash) { AtomicReferenceArray<ReferenceEntry<K, V>> table = this.table; return table.get(hash & (table.length() - 1)); }
/** * Returns first entry of bin for given hash. */
Returns first entry of bin for given hash
getFirst
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/externals/guava/src/main/java/com/google/common/cache/LocalCache.java", "license": "apache-2.0", "size": 149158 }
[ "java.util.concurrent.atomic.AtomicReferenceArray" ]
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,920,536
void sendAllItemsStates() { if (itemsConfig == null) { return; } for (Map.Entry<String, SimpleBinaryBindingConfig> item : itemsConfig.entrySet()) { SimpleBinaryBindingConfig cfg = item.getValue(); for (DeviceConfig dev : cfg.devices) { if...
void sendAllItemsStates() { if (itemsConfig == null) { return; } for (Map.Entry<String, SimpleBinaryBindingConfig> item : itemsConfig.entrySet()) { SimpleBinaryBindingConfig cfg = item.getValue(); for (DeviceConfig dev : cfg.devices) { if (!dev.getPortName().equals(this.deviceName) dev.getDataDirection() == DataDirecti...
/** * For device items provide send state to device */
For device items provide send state to device
sendAllItemsStates
{ "repo_name": "docbender/openhab", "path": "bundles/binding/org.openhab.binding.simplebinary/src/main/java/org/openhab/binding/simplebinary/internal/SimpleBinaryGenericDevice.java", "license": "epl-1.0", "size": 50475 }
[ "java.util.Map", "org.openhab.binding.simplebinary.internal.SimpleBinaryGenericBindingProvider" ]
import java.util.Map; import org.openhab.binding.simplebinary.internal.SimpleBinaryGenericBindingProvider;
import java.util.*; import org.openhab.binding.simplebinary.internal.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
719,939
@IgniteSpiConfiguration(optional = true) public AlwaysFailoverSpi setMaximumFailoverAttempts(int maxFailoverAttempts) { this.maxFailoverAttempts = maxFailoverAttempts; return this; }
@IgniteSpiConfiguration(optional = true) AlwaysFailoverSpi function(int maxFailoverAttempts) { this.maxFailoverAttempts = maxFailoverAttempts; return this; }
/** * Sets maximum number of attempts to execute a failed job on another node. * If not specified, {@link #DFLT_MAX_FAILOVER_ATTEMPTS} value will be used. * * @param maxFailoverAttempts Maximum number of attempts to execute a failed job on another node. * @return {@code this} for chaining. ...
Sets maximum number of attempts to execute a failed job on another node. If not specified, <code>#DFLT_MAX_FAILOVER_ATTEMPTS</code> value will be used
setMaximumFailoverAttempts
{ "repo_name": "ptupitsyn/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/failover/always/AlwaysFailoverSpi.java", "license": "apache-2.0", "size": 12392 }
[ "org.apache.ignite.spi.IgniteSpiConfiguration" ]
import org.apache.ignite.spi.IgniteSpiConfiguration;
import org.apache.ignite.spi.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,636,814
public String getLanguage() { return genericStringGetter(SETTING_LOCALE, Locale.getDefault().getLanguage()); }
String function() { return genericStringGetter(SETTING_LOCALE, Locale.getDefault().getLanguage()); }
/** * Gets the setting for the default locale * * @return a string with a lowercase-2-letter-country-code for the default languages */
Gets the setting for the default locale
getLanguage
{ "repo_name": "RalfBarkow/Zettelkasten", "path": "src/main/java/de/danielluedecke/zettelkasten/database/Settings.java", "license": "gpl-3.0", "size": 218921 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
897,842
public static int getRequiredIntParameter(PortletRequest request, String name) throws PortletRequestBindingException { return INT_PARSER.parseInt(name, request.getParameter(name)); }
static int function(PortletRequest request, String name) throws PortletRequestBindingException { return INT_PARSER.parseInt(name, request.getParameter(name)); }
/** * Get an int parameter, throwing an exception if it isn't found or isn't a number. * @param request current portlet request * @param name the name of the parameter * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */
Get an int parameter, throwing an exception if it isn't found or isn't a number
getRequiredIntParameter
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/web/portlet/bind/PortletRequestUtils.java", "license": "unlicense", "size": 24504 }
[ "javax.portlet.PortletRequest" ]
import javax.portlet.PortletRequest;
import javax.portlet.*;
[ "javax.portlet" ]
javax.portlet;
2,462,288
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<AuthorizationRuleInner> listAuthorizationRules( String resourceGroupName, String namespaceName, String eventHubName) { return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName)); ...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<AuthorizationRuleInner> function( String resourceGroupName, String namespaceName, String eventHubName) { return new PagedIterable<>(listAuthorizationRulesAsync(resourceGroupName, namespaceName, eventHubName)); }
/** * Gets the authorization rules for an Event Hub. * * @param resourceGroupName Name of the resource group within the azure subscription. * @param namespaceName The Namespace name. * @param eventHubName The Event Hub name. * @throws IllegalArgumentException thrown if parameters fail the ...
Gets the authorization rules for an Event Hub
listAuthorizationRules
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-eventhubs/src/main/java/com/azure/resourcemanager/eventhubs/implementation/EventHubsClientImpl.java", "license": "mit", "size": 114749 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.eventhubs.fluent.models.AuthorizationRuleInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.eventhubs.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,998,427
public ItemStack decrStackSize(int index, int count) { return index >= this.upperChest.getSizeInventory() ? this.lowerChest.decrStackSize(index - this.upperChest.getSizeInventory(), count) : this.upperChest.decrStackSize(index, count); }
ItemStack function(int index, int count) { return index >= this.upperChest.getSizeInventory() ? this.lowerChest.decrStackSize(index - this.upperChest.getSizeInventory(), count) : this.upperChest.decrStackSize(index, count); }
/** * Removes up to a specified number of items from an inventory slot and returns them in a new stack. */
Removes up to a specified number of items from an inventory slot and returns them in a new stack
decrStackSize
{ "repo_name": "lucemans/ShapeClient-SRC", "path": "net/minecraft/inventory/InventoryLargeChest.java", "license": "mpl-2.0", "size": 6807 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
1,449,677
public VM getVM(Connection c) throws Types.BadServerResponse, XmlRpcException { String method_call = "VIF.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispat...
VM function(Connection c) throws Types.BadServerResponse, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); if(response.get(STR).equals(STR...
/** * Get the VM field of the given VIF. * * @return value of the field */
Get the VM field of the given VIF
getVM
{ "repo_name": "cc14514/hq6", "path": "hq-plugin/xen-plugin/src/main/java/com/xensource/xenapi/VIF.java", "license": "unlicense", "size": 34400 }
[ "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import java.util.*; import org.apache.xmlrpc.*;
[ "java.util", "org.apache.xmlrpc" ]
java.util; org.apache.xmlrpc;
2,764,903
private static void showResultNotification(Context context, String contentTitle, String contentText, int applyingResult, String failingUrl) { NotificationManager notificationManager = (NotificationManager) context .getApplicationContext().getSys...
static void function(Context context, String contentTitle, String contentText, int applyingResult, String failingUrl) { NotificationManager notificationManager = (NotificationManager) context .getApplicationContext().getSystemService(Context.NOTIFICATION_SERVICE); int icon = R.drawable.status_bar_icon; long when = Syst...
/** * Show notification with result defined in params * * @param contentTitle * @param contentText */
Show notification with result defined in params
showResultNotification
{ "repo_name": "Hainish/ad-away", "path": "AdAway/src/main/java/org/adaway/helper/ResultHelper.java", "license": "gpl-3.0", "size": 20832 }
[ "android.app.Notification", "android.app.NotificationManager", "android.app.PendingIntent", "android.content.Context", "android.content.Intent", "org.adaway.ui.BaseActivity" ]
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import org.adaway.ui.BaseActivity;
import android.app.*; import android.content.*; import org.adaway.ui.*;
[ "android.app", "android.content", "org.adaway.ui" ]
android.app; android.content; org.adaway.ui;
1,152,194
public List<WorkerPool> workerPools() { return this.workerPools; }
List<WorkerPool> function() { return this.workerPools; }
/** * Get description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. * * @return the workerPools value */
Get description of worker pools with worker size IDs, VM sizes, and number of workers in each pool
workerPools
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/AppServiceEnvironmentPatchResource.java", "license": "mit", "size": 25529 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,240,032
public ServletContext getServletContext();
ServletContext function();
/** * Return the servlet context for which this Context is a facade. */
Return the servlet context for which this Context is a facade
getServletContext
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/Context.java", "license": "mit", "size": 33527 }
[ "javax.servlet.ServletContext" ]
import javax.servlet.ServletContext;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
1,003,121
public void addExtension(File extensionToInstall) throws IOException { addExtension(extensionToInstall.getName(), new FileExtension(extensionToInstall)); }
void function(File extensionToInstall) throws IOException { addExtension(extensionToInstall.getName(), new FileExtension(extensionToInstall)); }
/** * Attempt to add an extension to install into this instance. * * @param extensionToInstall * @throws IOException */
Attempt to add an extension to install into this instance
addExtension
{ "repo_name": "krosenvold/selenium-git-release-candidate", "path": "java/client/src/org/openqa/selenium/firefox/FirefoxProfile.java", "license": "apache-2.0", "size": 15724 }
[ "java.io.File", "java.io.IOException", "org.openqa.selenium.firefox.internal.FileExtension" ]
import java.io.File; import java.io.IOException; import org.openqa.selenium.firefox.internal.FileExtension;
import java.io.*; import org.openqa.selenium.firefox.internal.*;
[ "java.io", "org.openqa.selenium" ]
java.io; org.openqa.selenium;
2,025,350
public static void timedOut(PartitionedRegion partitionedRegion, Set<InternalDistributedMember> allStores, Collection<InternalDistributedMember> alreadyUsed, String opString, long timeOut) { throw new PartitionedRegionStorageException( format("Timed out attempting to %s in the partitioned regi...
static void function(PartitionedRegion partitionedRegion, Set<InternalDistributedMember> allStores, Collection<InternalDistributedMember> alreadyUsed, String opString, long timeOut) { throw new PartitionedRegionStorageException( format(STR, opString, regionStatus(partitionedRegion, allStores, alreadyUsed, true), timeOu...
/** * Indicate a timeout due to excessive retries among available peers * * @param allStores all feasible stores. If null, we don't know. * @param alreadyUsed those that have already accepted, only used if allStores != null * @param opString description of the operation which timed out */
Indicate a timeout due to excessive retries among available peers
timedOut
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProvider.java", "license": "apache-2.0", "size": 84915 }
[ "java.lang.String", "java.util.Collection", "java.util.Set", "org.apache.geode.cache.PartitionedRegionStorageException", "org.apache.geode.distributed.internal.membership.InternalDistributedMember" ]
import java.lang.String; import java.util.Collection; import java.util.Set; import org.apache.geode.cache.PartitionedRegionStorageException; import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
import java.lang.*; import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.distributed.internal.membership.*;
[ "java.lang", "java.util", "org.apache.geode" ]
java.lang; java.util; org.apache.geode;
2,317,235
public static String getLastResponse() { return PayPalResource.getLastResponse(); }
static String function() { return PayPalResource.getLastResponse(); }
/** * Returns the last response returned by the Service * * @return Last response got from the Service */
Returns the last response returned by the Service
getLastResponse
{ "repo_name": "sealala/ams", "path": "src/main/java/com/paypal/api/payments/Sale.java", "license": "gpl-2.0", "size": 10160 }
[ "com.paypal.core.rest.PayPalResource" ]
import com.paypal.core.rest.PayPalResource;
import com.paypal.core.rest.*;
[ "com.paypal.core" ]
com.paypal.core;
510,267
public synchronized ThreshdConfiguration getConfiguration() { return m_config; }
synchronized ThreshdConfiguration function() { return m_config; }
/** * Return the threshd configuration object. * * @return a {@link org.opennms.netmgt.config.threshd.ThreshdConfiguration} object. */
Return the threshd configuration object
getConfiguration
{ "repo_name": "tdefilip/opennms", "path": "opennms-config/src/main/java/org/opennms/netmgt/config/ThreshdConfigManager.java", "license": "agpl-3.0", "size": 14233 }
[ "org.opennms.netmgt.config.threshd.ThreshdConfiguration" ]
import org.opennms.netmgt.config.threshd.ThreshdConfiguration;
import org.opennms.netmgt.config.threshd.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
427,368
private void load(final CSVDataInput input) throws IOException { final Iterator<String[]> iter = input.iterator(); final List<String[]> elems = new ArrayList<String[]>(); while (iter.hasNext()) { final String[] line = iter.next(); elems.add(line); } ...
void function(final CSVDataInput input) throws IOException { final Iterator<String[]> iter = input.iterator(); final List<String[]> elems = new ArrayList<String[]>(); while (iter.hasNext()) { final String[] line = iter.next(); elems.add(line); } data = elems.toArray(new String[elems.size()][]); }
/** * Loads the data. * * @param input the input * @throws IOException Signals that an I/O exception has occurred. */
Loads the data
load
{ "repo_name": "COWYARD/arx", "path": "src/main/org/deidentifier/arx/io/CSVHierarchyInput.java", "license": "apache-2.0", "size": 8606 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,331,483
public List<String> paths() { return this.paths; }
List<String> function() { return this.paths; }
/** * Get path rules of URL path map. * * @return the paths value */
Get path rules of URL path map
paths
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/ApplicationGatewayPathRule.java", "license": "mit", "size": 6439 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
632,355
public void setSecurityLink(SecurityLink securityLink) { JodaBeanUtils.notNull(securityLink, "securityLink"); this._securityLink = securityLink; }
void function(SecurityLink securityLink) { JodaBeanUtils.notNull(securityLink, STR); this._securityLink = securityLink; }
/** * Sets the link referencing the security, not null. * This may also hold the resolved security. * @param securityLink the new value of the property, not null */
Sets the link referencing the security, not null. This may also hold the resolved security
setSecurityLink
{ "repo_name": "McLeodMoores/starling", "path": "projects/core/src/main/java/com/opengamma/core/position/impl/SimpleTrade.java", "license": "apache-2.0", "size": 28757 }
[ "com.opengamma.core.security.SecurityLink", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.core.security.SecurityLink; import org.joda.beans.JodaBeanUtils;
import com.opengamma.core.security.*; import org.joda.beans.*;
[ "com.opengamma.core", "org.joda.beans" ]
com.opengamma.core; org.joda.beans;
1,257,365
public static void download(final URL url, final File file, final DownloadProgress progress, final boolean keepAlive) throws IOException { final File parentFile = file.getParentFile(); if (parentFile != null && !parentFile.exists()) { parentFile.mkdirs(); } file.crea...
static void function(final URL url, final File file, final DownloadProgress progress, final boolean keepAlive) throws IOException { final File parentFile = file.getParentFile(); if (parentFile != null && !parentFile.exists()) { parentFile.mkdirs(); } file.createNewFile(); FileOutputStream fos = null; BufferedOutputStre...
/** * Downloads a file and stores data to a file * * @param url * @param cache * @throws IOException */
Downloads a file and stores data to a file
download
{ "repo_name": "friedlwo/AppWoksUtils", "path": "src/org/appwork/utils/net/HTTP.java", "license": "artistic-2.0", "size": 7315 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.net.HttpURLConnection", "java.util.zip.GZIPInputStream" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.HttpURLConnection; import java.util.zip.GZIPInputStream;
import java.io.*; import java.net.*; import java.util.zip.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
2,571,789
default OptionalLong metadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle) { throw new PrestoException(NOT_SUPPORTED, "This connector does not support deletes"); }
default OptionalLong metadataDelete(ConnectorSession session, ConnectorTableHandle tableHandle, ConnectorTableLayoutHandle tableLayoutHandle) { throw new PrestoException(NOT_SUPPORTED, STR); }
/** * Delete the provided table layout * * @return number of rows deleted, or null for unknown */
Delete the provided table layout
metadataDelete
{ "repo_name": "hgschmie/presto", "path": "presto-spi/src/main/java/io/prestosql/spi/connector/ConnectorMetadata.java", "license": "apache-2.0", "size": 38741 }
[ "io.prestosql.spi.PrestoException", "java.util.OptionalLong" ]
import io.prestosql.spi.PrestoException; import java.util.OptionalLong;
import io.prestosql.spi.*; import java.util.*;
[ "io.prestosql.spi", "java.util" ]
io.prestosql.spi; java.util;
2,254,918
private static File getUploadedFileFromUploadId(String uploadedFileId) { File tempDir = new File(FileRepositoryManager.getTemporaryPath()); Collection<File> files = FileUtils.listFiles(tempDir, new PrefixFileFilter(uploadedFileId), FalseFileFilter.FALSE); if (files.isEmpty() || files.size() > 1) {...
static File function(String uploadedFileId) { File tempDir = new File(FileRepositoryManager.getTemporaryPath()); Collection<File> files = FileUtils.listFiles(tempDir, new PrefixFileFilter(uploadedFileId), FalseFileFilter.FALSE); if (files.isEmpty() files.size() > 1) { return new File(tempDir, STR); } return files.itera...
/** * Gets an uploaded file from a given uploaded file identifier. * @param uploadedFileId * @return */
Gets an uploaded file from a given uploaded file identifier
getUploadedFileFromUploadId
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "lib-core/src/main/java/org/silverpeas/upload/UploadedFile.java", "license": "agpl-3.0", "size": 8175 }
[ "com.stratelia.webactiv.util.FileRepositoryManager", "java.io.File", "java.util.Collection", "org.apache.commons.io.FileUtils", "org.apache.commons.io.filefilter.FalseFileFilter", "org.apache.commons.io.filefilter.PrefixFileFilter" ]
import com.stratelia.webactiv.util.FileRepositoryManager; import java.io.File; import java.util.Collection; import org.apache.commons.io.FileUtils; import org.apache.commons.io.filefilter.FalseFileFilter; import org.apache.commons.io.filefilter.PrefixFileFilter;
import com.stratelia.webactiv.util.*; import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.apache.commons.io.filefilter.*;
[ "com.stratelia.webactiv", "java.io", "java.util", "org.apache.commons" ]
com.stratelia.webactiv; java.io; java.util; org.apache.commons;
1,874,080
public static boolean isEmpty(Iterable<?> iterable) { if (iterable instanceof Collection) { return ((Collection<?>) iterable).isEmpty(); } return !iterable.iterator().hasNext(); }
static boolean function(Iterable<?> iterable) { if (iterable instanceof Collection) { return ((Collection<?>) iterable).isEmpty(); } return !iterable.iterator().hasNext(); }
/** * Determines if the given iterable contains no elements. * * <p>There is no precise {@link Iterator} equivalent to this method, since * one can only ask an iterator whether it has any elements <i>remaining</i> * (which one does using {@link Iterator#hasNext}). * * @return {@code true} if the it...
Determines if the given iterable contains no elements. There is no precise <code>Iterator</code> equivalent to this method, since one can only ask an iterator whether it has any elements remaining (which one does using <code>Iterator#hasNext</code>)
isEmpty
{ "repo_name": "sarvex/guava", "path": "guava/src/com/google/common/collect/Iterables.java", "license": "apache-2.0", "size": 37742 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,832,390
public String getDatabase() { if (m_databaseKey == null) { m_databaseKey = getExtProperty("db.name"); } if (CmsStringUtil.isEmpty(m_databaseKey)) { m_databaseKey = getSortedDatabases().get(0); } return m_databaseKey; }
String function() { if (m_databaseKey == null) { m_databaseKey = getExtProperty(STR); } if (CmsStringUtil.isEmpty(m_databaseKey)) { m_databaseKey = getSortedDatabases().get(0); } return m_databaseKey; }
/** * Returns the key of the selected database server (e.g. "mysql", "generic" or "oracle").<p> * * @return the key of the selected database server (e.g. "mysql", "generic" or "oracle") */
Returns the key of the selected database server (e.g. "mysql", "generic" or "oracle")
getDatabase
{ "repo_name": "mediaworx/opencms-core", "path": "src-setup/org/opencms/setup/CmsSetupBean.java", "license": "lgpl-2.1", "size": 115587 }
[ "org.opencms.util.CmsStringUtil" ]
import org.opencms.util.CmsStringUtil;
import org.opencms.util.*;
[ "org.opencms.util" ]
org.opencms.util;
1,027,398
@Test public void edgeCreationBidirectionalTest() throws Exception { LogicalGraph social = getSocialNetworkLoader().getLogicalGraph(); testForEdgeDirection(social, EdgeDirection.BIDIRECTIONAL); }
void function() throws Exception { LogicalGraph social = getSocialNetworkLoader().getLogicalGraph(); testForEdgeDirection(social, EdgeDirection.BIDIRECTIONAL); }
/** * Tests whether edges are created properly according to bidrectional configuration. * * @throws Exception If the data could not be loaded or collected properly. */
Tests whether edges are created properly according to bidrectional configuration
edgeCreationBidirectionalTest
{ "repo_name": "rostam/gradoop", "path": "gradoop-data-integration/src/test/java/org/gradoop/dataintegration/transformation/impl/ExtractPropertyFromVertexTest.java", "license": "apache-2.0", "size": 9498 }
[ "org.gradoop.dataintegration.transformation.impl.config.EdgeDirection", "org.gradoop.flink.model.impl.epgm.LogicalGraph" ]
import org.gradoop.dataintegration.transformation.impl.config.EdgeDirection; import org.gradoop.flink.model.impl.epgm.LogicalGraph;
import org.gradoop.dataintegration.transformation.impl.config.*; import org.gradoop.flink.model.impl.epgm.*;
[ "org.gradoop.dataintegration", "org.gradoop.flink" ]
org.gradoop.dataintegration; org.gradoop.flink;
358,296
public void testSerialization() { MultiplePiePlot p1 = new MultiplePiePlot(null); p1.setAggregatedItemsPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.red)); MultiplePiePlot p2 = null; try { ByteArrayOutputStream buffer = new ByteArrayO...
void function() { MultiplePiePlot p1 = new MultiplePiePlot(null); p1.setAggregatedItemsPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.red)); MultiplePiePlot p2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObjec...
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "JSansalone/JFreeChart", "path": "tests/org/jfree/chart/plot/junit/MultiplePiePlotTests.java", "license": "lgpl-2.1", "size": 8320 }
[ "java.awt.Color", "java.awt.GradientPaint", "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.jfree.chart.plot.MultiplePiePlot" ]
import java.awt.Color; import java.awt.GradientPaint; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.jfree.chart.plot.MultiplePiePlot;
import java.awt.*; import java.io.*; import org.jfree.chart.plot.*;
[ "java.awt", "java.io", "org.jfree.chart" ]
java.awt; java.io; org.jfree.chart;
1,877,499
public long getMissingBlocksCount() throws IOException { return dfs.getMissingBlocksCount(); }
long function() throws IOException { return dfs.getMissingBlocksCount(); }
/** * Returns count of blocks with no good replicas left. Normally should be * zero. * * @throws IOException */
Returns count of blocks with no good replicas left. Normally should be zero
getMissingBlocksCount
{ "repo_name": "cloudera/hadoop-hdfs", "path": "src/java/org/apache/hadoop/hdfs/DistributedFileSystem.java", "license": "apache-2.0", "size": 27036 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,085,204
if ( event.getType() == ServiceEvent.REGISTERED && !this.deployed ) { this.deploymentAdminReference = this.bundleContext.getServiceReference(DEPLOYMENT_ADMIN); this.deploymentAdmin = (DeploymentAdmin) this.bundleContext.getService(this.deploymentAdminReference); this.serviceAvailable...
if ( event.getType() == ServiceEvent.REGISTERED && !this.deployed ) { this.deploymentAdminReference = this.bundleContext.getServiceReference(DEPLOYMENT_ADMIN); this.deploymentAdmin = (DeploymentAdmin) this.bundleContext.getService(this.deploymentAdminReference); this.serviceAvailable = true; if ( this.frameworkStarted ...
/** * Wait for the deployment admin service. * @see org.osgi.framework.ServiceListener#serviceChanged(org.osgi.framework.ServiceEvent) */
Wait for the deployment admin service
serviceChanged
{ "repo_name": "codders/k2-sling-fork", "path": "launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/DeploymentPackageInstaller.java", "license": "apache-2.0", "size": 7946 }
[ "org.osgi.framework.ServiceEvent", "org.osgi.service.deploymentadmin.DeploymentAdmin" ]
import org.osgi.framework.ServiceEvent; import org.osgi.service.deploymentadmin.DeploymentAdmin;
import org.osgi.framework.*; import org.osgi.service.deploymentadmin.*;
[ "org.osgi.framework", "org.osgi.service" ]
org.osgi.framework; org.osgi.service;
2,563,940
@Generated @Selector("setCancellationFeeThreshold:") public native void setCancellationFeeThreshold(NSDateComponents value);
@Selector(STR) native void function(NSDateComponents value);
/** * The time after which canceling the ride will incur the cancellation fee */
The time after which canceling the ride will incur the cancellation fee
setCancellationFeeThreshold
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/intents/INCancelRideIntentResponse.java", "license": "apache-2.0", "size": 6541 }
[ "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,082,639
@ApiModelProperty( value = "The available relationships that the processor currently supports.", readOnly = true ) public List<RelationshipDTO> getRelationships() { return relationships; }
@ApiModelProperty( value = STR, readOnly = true ) List<RelationshipDTO> function() { return relationships; }
/** * Gets the available relationships that this processor currently supports. * * @return The available relationships */
Gets the available relationships that this processor currently supports
getRelationships
{ "repo_name": "InspurUSA/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-client-dto/src/main/java/org/apache/nifi/web/api/dto/ProcessorDTO.java", "license": "apache-2.0", "size": 9156 }
[ "io.swagger.annotations.ApiModelProperty", "java.util.List" ]
import io.swagger.annotations.ApiModelProperty; import java.util.List;
import io.swagger.annotations.*; import java.util.*;
[ "io.swagger.annotations", "java.util" ]
io.swagger.annotations; java.util;
98,468
public IDataset getMaximum_incident_angle();
IDataset function();
/** * <p> * <b>Type:</b> NX_FLOAT * <b>Units:</b> NX_ANGLE * </p> * * @return the value. */
Type: NX_FLOAT Units: NX_ANGLE
getMaximum_incident_angle
{ "repo_name": "willrogers/dawnsci", "path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/NXcapillary.java", "license": "epl-1.0", "size": 2336 }
[ "org.eclipse.dawnsci.analysis.api.dataset.IDataset" ]
import org.eclipse.dawnsci.analysis.api.dataset.IDataset;
import org.eclipse.dawnsci.analysis.api.dataset.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
1,343,710
@Override public void stateChanged(ChangeEvent e) { if (e.getSource() == this.acceptCheckBox) { this.acceptButton.setEnabled(this.acceptCheckBox.isSelected()); } }
void function(ChangeEvent e) { if (e.getSource() == this.acceptCheckBox) { this.acceptButton.setEnabled(this.acceptCheckBox.isSelected()); } }
/** * Listens to changes of the check box, enables the accept button when the check box is active. */
Listens to changes of the check box, enables the accept button when the check box is active
stateChanged
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/gui/dialog/EULADialog.java", "license": "agpl-3.0", "size": 12974 }
[ "javax.swing.event.ChangeEvent" ]
import javax.swing.event.ChangeEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,091,438
public OutputStream create(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, @Nullable Map<String, String> props) throws IgniteException;
OutputStream function(IgfsPath path, int bufSize, boolean overwrite, int replication, long blockSize, @Nullable Map<String, String> props) throws IgniteException;
/** * Creates a file and opens it for writing. * * @param path File path to create. * @param bufSize Write buffer size (bytes) or {@code zero} to use default value. * @param overwrite Overwrite file if it already exists. Note: you cannot overwrite an existent directory. * @param replicatio...
Creates a file and opens it for writing
create
{ "repo_name": "dlnufox/ignite", "path": "modules/core/src/main/java/org/apache/ignite/igfs/secondary/IgfsSecondaryFileSystem.java", "license": "apache-2.0", "size": 8438 }
[ "java.io.OutputStream", "java.util.Map", "org.apache.ignite.IgniteException", "org.apache.ignite.igfs.IgfsPath", "org.jetbrains.annotations.Nullable" ]
import java.io.OutputStream; import java.util.Map; import org.apache.ignite.IgniteException; import org.apache.ignite.igfs.IgfsPath; import org.jetbrains.annotations.Nullable;
import java.io.*; import java.util.*; import org.apache.ignite.*; import org.apache.ignite.igfs.*; import org.jetbrains.annotations.*;
[ "java.io", "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.io; java.util; org.apache.ignite; org.jetbrains.annotations;
308,566
public static Boolean evaluate(Object obj, Navigator nav) { return ( ( BooleanFunction.evaluate( obj, nav ).booleanValue() ) ? Boolean.FALSE : Boolean.TRUE ); }
static Boolean function(Object obj, Navigator nav) { return ( ( BooleanFunction.evaluate( obj, nav ).booleanValue() ) ? Boolean.FALSE : Boolean.TRUE ); }
/** * Returns <code>Boolean.TRUE</code> if the boolean value of * <code>obj</code> is false, and <code>Boolean.FALSE</code> otherwise. * The boolean value is calculated as if by the XPath <code>boolean</code> * function. * * @param obj the object whose boolean value is inverted * @par...
Returns <code>Boolean.TRUE</code> if the boolean value of <code>obj</code> is false, and <code>Boolean.FALSE</code> otherwise. The boolean value is calculated as if by the XPath <code>boolean</code> function
evaluate
{ "repo_name": "brunobuzzi/orbeon-forms", "path": "xupdate/src/main/java/org/orbeon/jaxen/function/NotFunction.java", "license": "lgpl-2.1", "size": 4866 }
[ "org.orbeon.jaxen.Navigator" ]
import org.orbeon.jaxen.Navigator;
import org.orbeon.jaxen.*;
[ "org.orbeon.jaxen" ]
org.orbeon.jaxen;
2,163,070
public TriggerListener getTriggerListener(String name) { synchronized (triggerListeners) { return (TriggerListener) triggerListeners.get(name); } }
TriggerListener function(String name) { synchronized (triggerListeners) { return (TriggerListener) triggerListeners.get(name); } }
/** * <p> * Get the <i>non-global</i><code>{@link org.quartz.TriggerListener}</code> * that has the given name. * </p> */
Get the non-global<code><code>org.quartz.TriggerListener</code></code> that has the given name.
getTriggerListener
{ "repo_name": "optivo-org/quartz-1.8.3-optivo", "path": "quartz/src/main/java/org/quartz/core/QuartzScheduler.java", "license": "apache-2.0", "size": 78832 }
[ "org.quartz.TriggerListener" ]
import org.quartz.TriggerListener;
import org.quartz.*;
[ "org.quartz" ]
org.quartz;
248,358
public Collection<String> getEntityURIsFor(Property prop) { Collection<String> uris = new HashSet<String>(); // find in named graphs Iterator<?> it = getNamedGraphSet().findQuads(Node.ANY, Node.ANY, Node.createURI(prop.getURI()), Node.ANY); while (it.hasNext()) { Quad q = (Quad)it.next(...
Collection<String> function(Property prop) { Collection<String> uris = new HashSet<String>(); Iterator<?> it = getNamedGraphSet().findQuads(Node.ANY, Node.ANY, Node.createURI(prop.getURI()), Node.ANY); while (it.hasNext()) { Quad q = (Quad)it.next(); uris.add(q.getSubject().getURI()); } return uris; }
/** * Returns a list of URIs for entities that have the specified property. * * @param prop * The property * * @return A collection of uris. */
Returns a list of URIs for entities that have the specified property
getEntityURIsFor
{ "repo_name": "ox-it/gaboto", "path": "src/main/java/net/sf/gaboto/Gaboto.java", "license": "bsd-3-clause", "size": 42205 }
[ "com.hp.hpl.jena.graph.Node", "com.hp.hpl.jena.rdf.model.Property", "de.fuberlin.wiwiss.ng4j.Quad", "java.util.Collection", "java.util.HashSet", "java.util.Iterator" ]
import com.hp.hpl.jena.graph.Node; import com.hp.hpl.jena.rdf.model.Property; import de.fuberlin.wiwiss.ng4j.Quad; import java.util.Collection; import java.util.HashSet; import java.util.Iterator;
import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.rdf.model.*; import de.fuberlin.wiwiss.ng4j.*; import java.util.*;
[ "com.hp.hpl", "de.fuberlin.wiwiss", "java.util" ]
com.hp.hpl; de.fuberlin.wiwiss; java.util;
743,487