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 String getFullName() throws RemoteException;
| String function() throws RemoteException; | /**
* Returns the full name of the SubComponent.
*
* @return a String containing the full name.
*
* @exception RemoteException if there was an error during remote access of this method.
*/ | Returns the full name of the SubComponent | getFullName | {
"repo_name": "tolo/JServer",
"path": "src/java/com/teletalk/jserver/rmi/remote/RemoteSubComponent.java",
"license": "apache-2.0",
"size": 14573
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 459,236 |
public static DoubleMatrix cholesky(DoubleMatrix A) {
DoubleMatrix result = A.dup();
int info = NativeBlas.dpotrf('U', A.rows, result.data, 0, A.rows);
if (info < 0) {
throw new LapackArgumentException("DPOTRF", -info);
} else if (info > 0) {
throw new LapackP... | static DoubleMatrix function(DoubleMatrix A) { DoubleMatrix result = A.dup(); int info = NativeBlas.dpotrf('U', A.rows, result.data, 0, A.rows); if (info < 0) { throw new LapackArgumentException(STR, -info); } else if (info > 0) { throw new LapackPositivityException(STR, STR + info + STR); } clearLower(result); return ... | /**
* Compute Cholesky decomposition of A
*
* @param A symmetric, positive definite matrix (only upper half is used)
* @return upper triangular matrix U such that A = U' * U
*/ | Compute Cholesky decomposition of A | cholesky | {
"repo_name": "Quantisan/jblas",
"path": "src/main/java/org/jblas/Decompose.java",
"license": "bsd-3-clause",
"size": 3233
} | [
"org.jblas.exceptions.LapackArgumentException",
"org.jblas.exceptions.LapackPositivityException"
] | import org.jblas.exceptions.LapackArgumentException; import org.jblas.exceptions.LapackPositivityException; | import org.jblas.exceptions.*; | [
"org.jblas.exceptions"
] | org.jblas.exceptions; | 1,212,449 |
private static EncodingInfo[] loadEncodingInfo()
{
try
{
final InputStream is;
SecuritySupport ss = SecuritySupport.getInstance();
is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
... | static EncodingInfo[] function() { try { final InputStream is; SecuritySupport ss = SecuritySupport.getInstance(); is = ss.getResourceAsStream(ObjectFactory.findClassLoader(), ENCODINGS_FILE); Properties props = new Properties(); if (is != null) { props.load(is); is.close(); } else { } int totalEntries = props.size(); ... | /**
* Load a list of all the supported encodings.
*
* System property "encodings" formatted using URL syntax may define an
* external encodings list. Thanks to Sergey Ushakov for the code
* contribution!
* @xsl.usage internal
*/ | Load a list of all the supported encodings. System property "encodings" formatted using URL syntax may define an external encodings list. Thanks to Sergey Ushakov for the code contribution | loadEncodingInfo | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xml/serializer/Encodings.java",
"license": "gpl-3.0",
"size": 17814
} | [
"java.io.InputStream",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.List",
"java.util.Properties",
"java.util.StringTokenizer"
] | import java.io.InputStream; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.Properties; import java.util.StringTokenizer; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,324,362 |
EReference getGlobalChoreographyTask_InitiatingParticipantRef(); | EReference getGlobalChoreographyTask_InitiatingParticipantRef(); | /**
* Returns the meta object for the reference '{@link org.eclipse.bpmn2.GlobalChoreographyTask#getInitiatingParticipantRef <em>Initiating Participant Ref</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Initiating Participant Ref</em>'.
... | Returns the meta object for the reference '<code>org.eclipse.bpmn2.GlobalChoreographyTask#getInitiatingParticipantRef Initiating Participant Ref</code>'. | getGlobalChoreographyTask_InitiatingParticipantRef | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,408,161 |
ModelAndView getModelAndView(UifFormBase form, String pageId);
| ModelAndView getModelAndView(UifFormBase form, String pageId); | /**
* Configures the Spring model and view instance containing the form data and pointing to the
* generic Uif view, and also changes the current page to the given page id.
*
* <p>The view to render is assumed to be set in the given form object.</p>
*
* @param form form instance cont... | Configures the Spring model and view instance containing the form data and pointing to the generic Uif view, and also changes the current page to the given page id. The view to render is assumed to be set in the given form object | getModelAndView | {
"repo_name": "jruchcolo/rice-cd",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/web/service/ModelAndViewService.java",
"license": "apache-2.0",
"size": 7501
} | [
"org.kuali.rice.krad.web.form.UifFormBase",
"org.springframework.web.servlet.ModelAndView"
] | import org.kuali.rice.krad.web.form.UifFormBase; import org.springframework.web.servlet.ModelAndView; | import org.kuali.rice.krad.web.form.*; import org.springframework.web.servlet.*; | [
"org.kuali.rice",
"org.springframework.web"
] | org.kuali.rice; org.springframework.web; | 1,140,715 |
private void put(Ignite node, int startIdx, int endIdx) {
for (int i = startIdx; i < endIdx; i++)
node.cache(CACHE_NAME).put(key(node, i), val(node, i));
} | void function(Ignite node, int startIdx, int endIdx) { for (int i = startIdx; i < endIdx; i++) node.cache(CACHE_NAME).put(key(node, i), val(node, i)); } | /**
* Put to cache keys and values for range from startIdx to endIdx.
* @param node Node.
* @param startIdx Starting index.
* @param endIdx Ending index.
*/ | Put to cache keys and values for range from startIdx to endIdx | put | {
"repo_name": "psadusumilli/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/DynamicColumnsAbstractConcurrentSelfTest.java",
"license": "apache-2.0",
"size": 40302
} | [
"org.apache.ignite.Ignite"
] | import org.apache.ignite.Ignite; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,099,540 |
@Test
public void testLoadSpecifiedAnnotationsVariousTypes() throws Exception {
TagAnnotation tag = new TagAnnotationI();
tag.setTextValue(omero.rtypes.rstring("tag"));
TagAnnotation tagReturned = (TagAnnotation) iUpdate
.saveAndReturnObject(tag);
Parameters param... | void function() throws Exception { TagAnnotation tag = new TagAnnotationI(); tag.setTextValue(omero.rtypes.rstring("tag")); TagAnnotation tagReturned = (TagAnnotation) iUpdate .saveAndReturnObject(tag); Parameters param = new Parameters(); List<String> include = new ArrayList<String>(); List<String> exclude = new Array... | /**
* Tests the retrieval of annotations of different types i.e. tag, comment,
* boolean, long and the conversion into the corresponding
* <code>POJOS</code> object.
*
* @throws Exception
* Thrown if an error occurred.
*/ | Tests the retrieval of annotations of different types i.e. tag, comment, boolean, long and the conversion into the corresponding <code>POJOS</code> object | testLoadSpecifiedAnnotationsVariousTypes | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/MetadataServiceTest.java",
"license": "gpl-2.0",
"size": 74475
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.testng.AssertJUnit"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.testng.AssertJUnit; | import java.util.*; import org.testng.*; | [
"java.util",
"org.testng"
] | java.util; org.testng; | 1,600,773 |
public void writeDataSetWithNSInfo(XMLStreamWriter writer,
DataSet dataset,
File directory)
throws XMLStreamException, IOException {
writeDataSetStartElement(writer);
insertDSInfo(writer, dataset, directory);
... | void function(XMLStreamWriter writer, DataSet dataset, File directory) throws XMLStreamException, IOException { writeDataSetStartElement(writer); insertDSInfo(writer, dataset, directory); writer.writeEndElement(); } | /**
* writes the dataset with a namespace-attributed start element and then
* does the same thing as the above method.
*/ | writes the dataset with a namespace-attributed start element and then does the same thing as the above method | writeDataSetWithNSInfo | {
"repo_name": "crotwell/fissuresUtil",
"path": "src/main/java/edu/sc/seis/fissuresUtil/xml/DataSetToXMLStAX.java",
"license": "gpl-2.0",
"size": 8287
} | [
"java.io.File",
"java.io.IOException",
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamWriter"
] | import java.io.File; import java.io.IOException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; | import java.io.*; import javax.xml.stream.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 1,987,525 |
public Pair<String, Short> getTableCacheInfo(List<Long> cacheDirIds) {
String cachePoolName = null;
Short cacheReplication = 0;
Long cacheDirId = HdfsCachingUtil.getCacheDirectiveId(msTable_.getParameters());
if (cacheDirId != null) {
try {
cachePoolName = HdfsCachingUtil.getCachePool(ca... | Pair<String, Short> function(List<Long> cacheDirIds) { String cachePoolName = null; Short cacheReplication = 0; Long cacheDirId = HdfsCachingUtil.getCacheDirectiveId(msTable_.getParameters()); if (cacheDirId != null) { try { cachePoolName = HdfsCachingUtil.getCachePool(cacheDirId); cacheReplication = HdfsCachingUtil.ge... | /**
* If the table is cached, it returns a <cache pool name, replication factor> pair
* and adds the table cached directive ID to 'cacheDirIds'. Otherwise, it
* returns a <null, 0> pair.
*/ | If the table is cached, it returns a pair and adds the table cached directive ID to 'cacheDirIds'. Otherwise, it returns a pair | getTableCacheInfo | {
"repo_name": "kapilrastogi/Impala",
"path": "fe/src/main/java/com/cloudera/impala/catalog/Table.java",
"license": "apache-2.0",
"size": 18533
} | [
"com.cloudera.impala.common.ImpalaRuntimeException",
"com.cloudera.impala.common.Pair",
"com.cloudera.impala.util.HdfsCachingUtil",
"com.google.common.base.Preconditions",
"java.util.List"
] | import com.cloudera.impala.common.ImpalaRuntimeException; import com.cloudera.impala.common.Pair; import com.cloudera.impala.util.HdfsCachingUtil; import com.google.common.base.Preconditions; import java.util.List; | import com.cloudera.impala.common.*; import com.cloudera.impala.util.*; import com.google.common.base.*; import java.util.*; | [
"com.cloudera.impala",
"com.google.common",
"java.util"
] | com.cloudera.impala; com.google.common; java.util; | 1,203,646 |
public StorageType getStorageType() {
return storageType;
} | StorageType function() { return storageType; } | /**
* Returns Storage Type info.
*
* @return Storage Type of the bucket
*/ | Returns Storage Type info | getStorageType | {
"repo_name": "xiao-chen/hadoop",
"path": "hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/web/response/BucketInfo.java",
"license": "apache-2.0",
"size": 8011
} | [
"org.apache.hadoop.hdds.protocol.StorageType"
] | import org.apache.hadoop.hdds.protocol.StorageType; | import org.apache.hadoop.hdds.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 164,734 |
@Test(expected = IllegalArgumentException.class)
public void testExceptionArrayParameterSize2() {
Throwable[] input1 = new Throwable[] { new RuntimeException() };
int input2 = -1;
checkExceptionCauses(input1, input2);
} | @Test(expected = IllegalArgumentException.class) void function() { Throwable[] input1 = new Throwable[] { new RuntimeException() }; int input2 = -1; checkExceptionCauses(input1, input2); } | /**
* Tests the check method with a negative size parameter.
*/ | Tests the check method with a negative size parameter | testExceptionArrayParameterSize2 | {
"repo_name": "gammalgris/jmul",
"path": "Utilities/Checks-Tests/src/test/jmul/checks/ThrowableParameterTest.java",
"license": "gpl-3.0",
"size": 5042
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,356,170 |
public FeedMapping removeFeedMapping(FeedMapping feedMapping) throws RemoteException {
return delegateLocator.getFeedMappingDelegate().remove(feedMapping);
} | FeedMapping function(FeedMapping feedMapping) throws RemoteException { return delegateLocator.getFeedMappingDelegate().remove(feedMapping); } | /**
* Removes the FeedMappings from the ExtendedManagedCustomer's ManagedCustomer.
*
* @param feedMapping the FeedMapping to remove
* @return the updated FeedMapping
* @throws RemoteException for communication-related exceptions
*/ | Removes the FeedMappings from the ExtendedManagedCustomer's ManagedCustomer | removeFeedMapping | {
"repo_name": "raja15792/googleads-java-lib",
"path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/ExtendedManagedCustomer.java",
"license": "apache-2.0",
"size": 39864
} | [
"com.google.api.ads.adwords.axis.v201506.cm.FeedMapping",
"java.rmi.RemoteException"
] | import com.google.api.ads.adwords.axis.v201506.cm.FeedMapping; import java.rmi.RemoteException; | import com.google.api.ads.adwords.axis.v201506.cm.*; import java.rmi.*; | [
"com.google.api",
"java.rmi"
] | com.google.api; java.rmi; | 1,423,952 |
@Test
public void testTripleDesGoodPasswordDecrypt()
{
CipherTextHandler lockBox = new CipherTextHandler();
KerberosPrincipal principal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
String algorithm = VendorHelper.getTripleDesAlgorithm();
KerberosKey kerberosKey = new Ker... | void function() { CipherTextHandler lockBox = new CipherTextHandler(); KerberosPrincipal principal = new KerberosPrincipal( STR ); String algorithm = VendorHelper.getTripleDesAlgorithm(); KerberosKey kerberosKey = new KerberosKey( principal, STR.toCharArray(), algorithm ); EncryptionKey key = new EncryptionKey( Encrypt... | /**
* Tests the unsealing of Kerberos CipherText with a good password. After decryption and
* an integrity check, an attempt is made to decode the bytes as an EncryptedTimestamp. The
* result is timestamp data.
*/ | Tests the unsealing of Kerberos CipherText with a good password. After decryption and an integrity check, an attempt is made to decode the bytes as an EncryptedTimestamp. The result is timestamp data | testTripleDesGoodPasswordDecrypt | {
"repo_name": "drankye/directory-server",
"path": "kerberos-codec/src/test/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandlerTest.java",
"license": "apache-2.0",
"size": 21386
} | [
"javax.security.auth.kerberos.KerberosKey",
"javax.security.auth.kerberos.KerberosPrincipal",
"org.apache.directory.shared.kerberos.codec.KerberosDecoder",
"org.apache.directory.shared.kerberos.codec.types.EncryptionType",
"org.apache.directory.shared.kerberos.components.EncryptedData",
"org.apache.direct... | import javax.security.auth.kerberos.KerberosKey; import javax.security.auth.kerberos.KerberosPrincipal; import org.apache.directory.shared.kerberos.codec.KerberosDecoder; import org.apache.directory.shared.kerberos.codec.types.EncryptionType; import org.apache.directory.shared.kerberos.components.EncryptedData; import ... | import javax.security.auth.kerberos.*; import org.apache.directory.shared.kerberos.codec.*; import org.apache.directory.shared.kerberos.codec.types.*; import org.apache.directory.shared.kerberos.components.*; import org.apache.directory.shared.kerberos.exceptions.*; import org.junit.*; | [
"javax.security",
"org.apache.directory",
"org.junit"
] | javax.security; org.apache.directory; org.junit; | 2,468,685 |
public static String join(Collection< ? > list, String delimeter) {
return join(delimeter, list);
} | static String function(Collection< ? > list, String delimeter) { return join(delimeter, list); } | /**
* Join a list.
*/ | Join a list | join | {
"repo_name": "lostiniceland/bnd",
"path": "biz.aQute.bndlib/src/aQute/bnd/osgi/Processor.java",
"license": "apache-2.0",
"size": 70777
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,398,588 |
public void submit(Callable<?> task) {
while (queue.isEmpty()) {
int active0 = active.get();
if (active0 == maxTasks)
break;
if (active.compareAndSet(active0, active0 + 1)) {
startThread(task);
return; // Started in new t... | void function(Callable<?> task) { while (queue.isEmpty()) { int active0 = active.get(); if (active0 == maxTasks) break; if (active.compareAndSet(active0, active0 + 1)) { startThread(task); return; } } try { while (!queue.offer(task, 100, TimeUnit.MILLISECONDS)) { if (shutdown) return; } } catch (InterruptedException ig... | /**
* Submit task.
*
* @param task Task.
*/ | Submit task | submit | {
"repo_name": "SomeFire/ignite",
"path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/HadoopExecutorService.java",
"license": "apache-2.0",
"size": 6531
} | [
"java.util.concurrent.Callable",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 659,242 |
private static double[][] generateCoordinates(
int coordCount, int dimensions, int clusterCount, long randomSeed)
throws InsufficientMemoryException {
// Explicit garbage collection to reduce the likelihood of
// having insufficient memory.
System.gc();
... | static double[][] function( int coordCount, int dimensions, int clusterCount, long randomSeed) throws InsufficientMemoryException { System.gc(); long memRequired = 8L * (long) dimensions * (long) (coordCount + clusterCount); if (Runtime.getRuntime().freeMemory() < memRequired) { throw new InsufficientMemoryException();... | /**
* Generates the coordinates to be clustered.
*
* @param coordCount the number of coordinates.
* @param dimensions the length of the coordinates.
* @param clusterCount the number of clusters in the distribution.
* @param randomSeed the seed used by the random number generator.
... | Generates the coordinates to be clustered | generateCoordinates | {
"repo_name": "ariesteam/thinklab",
"path": "plugins/org.integratedmodelling.thinklab.geospace/src/org/integratedmodelling/geospace/kmeans/KMeansFrame.java",
"license": "gpl-3.0",
"size": 16656
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 960,954 |
public Stream<Node> flattenDescendants()
{
return children.values().stream().flatMap(Node::flatten);
} | Stream<Node> function() { return children.values().stream().flatMap(Node::flatten); } | /**
* Return a {@link Stream} of Nodes consisting of all the descendants of this Node. This Node is not included.
* <p>
* @return a {@link Stream} of Nodes consisting of all the descendants of this Node
*/ | Return a <code>Stream</code> of Nodes consisting of all the descendants of this Node. This Node is not included. | flattenDescendants | {
"repo_name": "nitsanw/honest-profiler",
"path": "src/main/java/com/insightfullogic/honest_profiler/core/aggregation/result/straight/Node.java",
"license": "mit",
"size": 6437
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 2,436,566 |
private int getShardCount() {
try {
Key counterKey = KeyFactory.createKey(Counter.KIND, counterName);
Entity counter = DS.get(counterKey);
Long shardCount = (Long) counter.getProperty(Counter.SHARD_COUNT);
return shardCount.intValue();
} catch (EntityNotFoundException ignore) {
r... | int function() { try { Key counterKey = KeyFactory.createKey(Counter.KIND, counterName); Entity counter = DS.get(counterKey); Long shardCount = (Long) counter.getProperty(Counter.SHARD_COUNT); return shardCount.intValue(); } catch (EntityNotFoundException ignore) { return INITIAL_SHARDS; } } | /**
* Get the number of shards in this counter.
*
* @return shard count
*/ | Get the number of shards in this counter | getShardCount | {
"repo_name": "hieunguyen/tuongky",
"path": "src/com/tuongky/model/datastore/ShardedCounter.java",
"license": "mit",
"size": 7447
} | [
"com.google.appengine.api.datastore.Entity",
"com.google.appengine.api.datastore.EntityNotFoundException",
"com.google.appengine.api.datastore.Key",
"com.google.appengine.api.datastore.KeyFactory"
] | import com.google.appengine.api.datastore.Entity; import com.google.appengine.api.datastore.EntityNotFoundException; import com.google.appengine.api.datastore.Key; import com.google.appengine.api.datastore.KeyFactory; | import com.google.appengine.api.datastore.*; | [
"com.google.appengine"
] | com.google.appengine; | 1,705,616 |
protected void handleElementAdded(CompositeGraphicsNode gn,
Node parent,
Element childElt) {
// build the graphics node
GVTBuilder builder = ctx.getGVTBuilder();
GraphicsNode childNode = builder.build(ctx, childElt... | void function(CompositeGraphicsNode gn, Node parent, Element childElt) { GVTBuilder builder = ctx.getGVTBuilder(); GraphicsNode childNode = builder.build(ctx, childElt); if (childNode == null) { return; } int idx = -1; for(Node ps = childElt.getPreviousSibling(); ps != null; ps = ps.getPreviousSibling()) { if (ps.getNo... | /**
* Invoked when an MutationEvent of type 'DOMNodeInserted' is fired.
*/ | Invoked when an MutationEvent of type 'DOMNodeInserted' is fired | handleElementAdded | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/bridge/SVGGElementBridge.java",
"license": "gpl-3.0",
"size": 4860
} | [
"org.apache.batik.gvt.CompositeGraphicsNode",
"org.apache.batik.gvt.GraphicsNode",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import org.apache.batik.gvt.CompositeGraphicsNode; import org.apache.batik.gvt.GraphicsNode; import org.w3c.dom.Element; import org.w3c.dom.Node; | import org.apache.batik.gvt.*; import org.w3c.dom.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,303,911 |
public ClientConfiguration withInstance(String instanceName) {
checkArgument(instanceName != null, "instanceName is null");
return with(ClientProperty.INSTANCE_NAME, instanceName);
} | ClientConfiguration function(String instanceName) { checkArgument(instanceName != null, STR); return with(ClientProperty.INSTANCE_NAME, instanceName); } | /**
* Same as {@link #with(ClientProperty, String)} for ClientProperty.INSTANCE_NAME
*
*/ | Same as <code>#with(ClientProperty, String)</code> for ClientProperty.INSTANCE_NAME | withInstance | {
"repo_name": "adamjshook/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/client/ClientConfiguration.java",
"license": "apache-2.0",
"size": 17727
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,504,322 |
return name;
}
private static final Map<String, Namespace> MAP;
static {
final Map<String, Namespace> map = new HashMap<String, Namespace>();
for (Namespace namespace : values()) {
final String name = namespace.getUriString();
if (name != null) map.put(name, namespa... | return name; } private static final Map<String, Namespace> MAP; static { final Map<String, Namespace> map = new HashMap<String, Namespace>(); for (Namespace namespace : values()) { final String name = namespace.getUriString(); if (name != null) map.put(name, namespace); } MAP = map; } | /**
* Get the URI of this namespace.
*
* @return the URI
*/ | Get the URI of this namespace | getUriString | {
"repo_name": "immutant/immutant-release",
"path": "modules/web/src/main/java/org/immutant/web/as/Namespace.java",
"license": "lgpl-3.0",
"size": 1930
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 967,256 |
public Class<?> getType(Object propertyId)
{
logger.executionTrace();
// TODO: refactor to use same code as EntityItemProperty#getType()
// This will also fix incomplete implementation of this method (for association types). Not critical as
// Components don't really rely on this methods.
if (addedPrope... | Class<?> function(Object propertyId) { logger.executionTrace(); if (addedProperties.keySet().contains(propertyId)) return addedProperties.get(propertyId); if (propertyInEmbeddedKey(propertyId)) { final ComponentType idType = (ComponentType) classMetadata.getIdentifierType(); final String[] propertyNames = idType.getPro... | /**
* Gets the data type of all Properties identified by the given Property ID. This method does pretty much the same
* thing as EntityItemProperty#getType()
*/ | Gets the data type of all Properties identified by the given Property ID. This method does pretty much the same thing as EntityItemProperty#getType() | getType | {
"repo_name": "veronicawwashington/enterprise-app",
"path": "src/enterpriseapp/hibernate/CustomHbnContainer.java",
"license": "agpl-3.0",
"size": 57727
} | [
"java.lang.reflect.Field",
"org.hibernate.type.ComponentType",
"org.hibernate.type.Type"
] | import java.lang.reflect.Field; import org.hibernate.type.ComponentType; import org.hibernate.type.Type; | import java.lang.reflect.*; import org.hibernate.type.*; | [
"java.lang",
"org.hibernate.type"
] | java.lang; org.hibernate.type; | 1,932,101 |
public void setAddedComponentIndex(
final @Nullable Integer addedComponentIndex )
{
addedComponentIndex_ = addedComponentIndex;
}
| void function( final @Nullable Integer addedComponentIndex ) { addedComponentIndex_ = addedComponentIndex; } | /**
* Sets the index of the first component added to the container.
*
* @param addedComponentIndex
* The index of the first component added to the container or
* {@code null} if no components were added.
*/ | Sets the index of the first component added to the container | setAddedComponentIndex | {
"repo_name": "gamegineer/dev",
"path": "main/table/org.gamegineer.table.net.impl/src/org/gamegineer/table/internal/net/impl/node/ContainerIncrement.java",
"license": "gpl-3.0",
"size": 7689
} | [
"org.eclipse.jdt.annotation.Nullable"
] | import org.eclipse.jdt.annotation.Nullable; | import org.eclipse.jdt.annotation.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,475,448 |
public BudgetDocument<DevelopmentProposal> getSyncableBudget(DevelopmentProposal childProposal) throws ProposalHierarchyException; | BudgetDocument<DevelopmentProposal> function(DevelopmentProposal childProposal) throws ProposalHierarchyException; | /**
* Gets the budget for hierarchy sync. This will be the budget marked final or the most recently created budget.
* @param childProposal
* @return
* @throws ProposalHierarchyException
*/ | Gets the budget for hierarchy sync. This will be the budget marked final or the most recently created budget | getSyncableBudget | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/coeus/propdev/impl/hierarchy/ProposalHierarchyService.java",
"license": "apache-2.0",
"size": 11725
} | [
"org.kuali.coeus.common.budget.framework.core.BudgetDocument",
"org.kuali.coeus.propdev.impl.core.DevelopmentProposal"
] | import org.kuali.coeus.common.budget.framework.core.BudgetDocument; import org.kuali.coeus.propdev.impl.core.DevelopmentProposal; | import org.kuali.coeus.common.budget.framework.core.*; import org.kuali.coeus.propdev.impl.core.*; | [
"org.kuali.coeus"
] | org.kuali.coeus; | 2,891,668 |
@Test
public void testRevertToDefaultValue() {
boolean valueOnly = true;
FieldConfigWindBarbs field =
new FieldConfigWindBarbs(
new FieldConfigCommonData(
String.class, FieldIdEnum.NAME, "test label", valueOnly, false),
... | void function() { boolean valueOnly = true; FieldConfigWindBarbs field = new FieldConfigWindBarbs( new FieldConfigCommonData( String.class, FieldIdEnum.NAME, STR, valueOnly, false), null, null, null); field.revertToDefaultValue(); field.createUI(); field.revertToDefaultValue(); } | /**
* Test method for {@link
* com.sldeditor.ui.detail.vendor.geoserver.marker.windbarb.FieldConfigWindBarbs#revertToDefaultValue()}.
*/ | Test method for <code>com.sldeditor.ui.detail.vendor.geoserver.marker.windbarb.FieldConfigWindBarbs#revertToDefaultValue()</code> | testRevertToDefaultValue | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/test/java/com/sldeditor/test/unit/ui/detail/vendor/geoserver/marker/windbarb/FieldConfigWindBarbsTest.java",
"license": "gpl-3.0",
"size": 20861
} | [
"com.sldeditor.common.xml.ui.FieldIdEnum",
"com.sldeditor.ui.detail.config.FieldConfigCommonData",
"com.sldeditor.ui.detail.vendor.geoserver.marker.windbarb.FieldConfigWindBarbs"
] | import com.sldeditor.common.xml.ui.FieldIdEnum; import com.sldeditor.ui.detail.config.FieldConfigCommonData; import com.sldeditor.ui.detail.vendor.geoserver.marker.windbarb.FieldConfigWindBarbs; | import com.sldeditor.common.xml.ui.*; import com.sldeditor.ui.detail.config.*; import com.sldeditor.ui.detail.vendor.geoserver.marker.windbarb.*; | [
"com.sldeditor.common",
"com.sldeditor.ui"
] | com.sldeditor.common; com.sldeditor.ui; | 204,161 |
public static Bitmap byteToBitmap(byte[] b) {
return (b == null || b.length == 0) ? null : BitmapFactory
.decodeByteArray(b, 0, b.length);
} | static Bitmap function(byte[] b) { return (b == null b.length == 0) ? null : BitmapFactory .decodeByteArray(b, 0, b.length); } | /**
* convert byte array to Bitmap
*
* @param b
* @return
*/ | convert byte array to Bitmap | byteToBitmap | {
"repo_name": "suzhugen/androidOddosonLibrary",
"path": "src/com/oddoson/android/common/image/ImageUtils.java",
"license": "apache-2.0",
"size": 7989
} | [
"android.graphics.Bitmap",
"android.graphics.BitmapFactory"
] | import android.graphics.Bitmap; import android.graphics.BitmapFactory; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,377,392 |
public void testToArray1_BadArg() {
LinkedBlockingDeque q = populatedDeque(SIZE);
try {
q.toArray(new String[10]);
shouldThrow();
} catch (ArrayStoreException success) {}
} | void function() { LinkedBlockingDeque q = populatedDeque(SIZE); try { q.toArray(new String[10]); shouldThrow(); } catch (ArrayStoreException success) {} } | /**
* toArray(incompatible array type) throws ArrayStoreException
*/ | toArray(incompatible array type) throws ArrayStoreException | testToArray1_BadArg | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "jsr166-tests/src/test/java/jsr166/LinkedBlockingDequeTest.java",
"license": "gpl-2.0",
"size": 60349
} | [
"java.util.concurrent.LinkedBlockingDeque"
] | import java.util.concurrent.LinkedBlockingDeque; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,288,786 |
return LanguageUtil.getRename(typeName, BOXED_TYPE_MAP);
} | return LanguageUtil.getRename(typeName, BOXED_TYPE_MAP); } | /**
* Returns the Java representation of a basic type in boxed form.
*/ | Returns the Java representation of a basic type in boxed form | boxedTypeName | {
"repo_name": "jmuk/toolkit",
"path": "src/main/java/com/google/api/codegen/java/JavaContextCommon.java",
"license": "apache-2.0",
"size": 5227
} | [
"com.google.api.codegen.LanguageUtil"
] | import com.google.api.codegen.LanguageUtil; | import com.google.api.codegen.*; | [
"com.google.api"
] | com.google.api; | 936,724 |
public double getOpinionOfPerson(Person person1, Person person2) {
double result = 50D;
if (hasRelationship(person1, person2)) {
Relationship relationship = getRelationship(person1, person2);
result = relationship.getPersonOpinion(person1);
}
return result;
}
| double function(Person person1, Person person2) { double result = 50D; if (hasRelationship(person1, person2)) { Relationship relationship = getRelationship(person1, person2); result = relationship.getPersonOpinion(person1); } return result; } | /**
* Gets the opinion that a person has of another person. Note: If the people
* don't have a relationship, return default value of 50.
*
* @param person1 the person holding the opinion.
* @param person2 the person who the opinion is of.
* @return opinion value from 0 (enemy) to 50 (indifferent) to ... | Gets the opinion that a person has of another person. Note: If the people don't have a relationship, return default value of 50 | getOpinionOfPerson | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/social/RelationshipManager.java",
"license": "gpl-3.0",
"size": 20543
} | [
"org.mars_sim.msp.core.person.Person"
] | import org.mars_sim.msp.core.person.Person; | import org.mars_sim.msp.core.person.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 638,080 |
public List<String> getSymbols(String filterTerm) throws HibernateException {
List<String> targetList = new ArrayList();
List sourceList = null;
try {
getCurrentSession().beginTransaction();
sourceList = getCurrentSession()
.createSQLQuery("SELECT ... | List<String> function(String filterTerm) throws HibernateException { List<String> targetList = new ArrayList(); List sourceList = null; try { getCurrentSession().beginTransaction(); sourceList = getCurrentSession() .createSQLQuery(STR) .setParameter(STR, "%" + filterTerm.trim() + "%") .list(); getCurrentSession().getTr... | /**
* Returns a distinct filtered list of gene symbols suitable for autocomplete
* sourcing.
*
* @param filterTerm the filter term for the gene symbol (used in sql LIKE clause)
* @return a <code>List<String></code> of distinct gene symbols filtered
* by <code>filterTerm</code> suita... | Returns a distinct filtered list of gene symbols suitable for autocomplete sourcing | getSymbols | {
"repo_name": "InfraFrontier/CuratorialInterfaces",
"path": "src/main/java/uk/ac/ebi/emma/manager/GenesManager.java",
"license": "apache-2.0",
"size": 32364
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.hibernate.HibernateException"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.hibernate.HibernateException; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 188,913 |
public boolean canBeActivated(GameCharacter character, boolean noApCheck) {
if (!isActivated() || !canBeLearned(character)) {
return false;
}
if ((isCombatOnly() || isAttack()) && (character.getMap() == null || character.getMap().isWorldMap())) {
return false;
}
Stats characterStats =... | boolean function(GameCharacter character, boolean noApCheck) { if (!isActivated() !canBeLearned(character)) { return false; } if ((isCombatOnly() isAttack()) && (character.getMap() == null character.getMap().isWorldMap())) { return false; } Stats characterStats = character.stats(); if (getSpCost() > 0 && characterStats... | /**
* Returns true if the supplied character fulfills all
* requirements in order to activate this perk. Please note
* that in order to be able to activate, the character
* must also fulfill all the requirements required to learn
* the perk.
*
* @param character
* @param noApCheck - if true, a... | Returns true if the supplied character fulfills all requirements in order to activate this perk. Please note that in order to be able to activate, the character must also fulfill all the requirements required to learn the perk | canBeActivated | {
"repo_name": "mganzarcik/fabulae",
"path": "core/src/mg/fishchicken/gamelogic/characters/perks/Perk.java",
"license": "mit",
"size": 14733
} | [
"groovy.lang.Binding"
] | import groovy.lang.Binding; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 48,387 |
protected void initEntrances()
{ entranceIndex = 0;
entranceRoles = new Role[]{Role.FLOOR,Role.BLOCK,Role.ITEM,Role.BOMB,Role.HERO};
entranceDelays = new Double[]{0d,0d,0d,0d,0d,0d,GameData.READY_TIME,GameData.SET_TIME,GameData.GO_TIME};
entranceTexts = new String[]{null,null,null,null,null,panel.getMessa... | void function() { entranceIndex = 0; entranceRoles = new Role[]{Role.FLOOR,Role.BLOCK,Role.ITEM,Role.BOMB,Role.HERO}; entranceDelays = new Double[]{0d,0d,0d,0d,0d,0d,GameData.READY_TIME,GameData.SET_TIME,GameData.GO_TIME}; entranceTexts = new String[]{null,null,null,null,null,panel.getMessageTextReady(),panel.getMessag... | /**
* Handles how sprites enter the zone.
*/ | Handles how sprites enter the zone | initEntrances | {
"repo_name": "vlabatut/totalboumboum",
"path": "src/org/totalboumboum/engine/loop/VisibleLoop.java",
"license": "gpl-2.0",
"size": 38804
} | [
"org.totalboumboum.engine.content.feature.Role",
"org.totalboumboum.tools.GameData"
] | import org.totalboumboum.engine.content.feature.Role; import org.totalboumboum.tools.GameData; | import org.totalboumboum.engine.content.feature.*; import org.totalboumboum.tools.*; | [
"org.totalboumboum.engine",
"org.totalboumboum.tools"
] | org.totalboumboum.engine; org.totalboumboum.tools; | 715,562 |
public static String getColumnString(Cursor cursor, String columnName) {
int col = cursor.getColumnIndex(columnName);
return getStringOrNull(cursor, col);
} | static String function(Cursor cursor, String columnName) { int col = cursor.getColumnIndex(columnName); return getStringOrNull(cursor, col); } | /**
* Gets the value of a string column by name.
*
* @param cursor Cursor to read the value from.
* @param columnName The name of the column to read.
* @return The value of the given column, or <code>null</null>
* if the cursor does not contain the given column.
*/ | Gets the value of a string column by name | getColumnString | {
"repo_name": "perrystreetsoftware/ActionBarSherlock",
"path": "actionbarsherlock/src/com/actionbarsherlock/widget/SuggestionsAdapter.java",
"license": "apache-2.0",
"size": 28606
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 617,977 |
private static boolean isSimplePreferences(Context context) {
return ALWAYS_SIMPLE_PREFS
|| Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB
|| !isXLargeTablet(context);
}
| static boolean function(Context context) { return ALWAYS_SIMPLE_PREFS Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB !isXLargeTablet(context); } | /**
* Determines whether the simplified settings UI should be shown. This is
* true if this is forced via {@link #ALWAYS_SIMPLE_PREFS}, or the device
* doesn't have newer APIs like {@link PreferenceFragment}, or the device
* doesn't have an extra-large screen. In these cases, a single-pane
* "simplified"... | Determines whether the simplified settings UI should be shown. This is true if this is forced via <code>#ALWAYS_SIMPLE_PREFS</code>, or the device doesn't have newer APIs like <code>PreferenceFragment</code>, or the device doesn't have an extra-large screen. In these cases, a single-pane "simplified" settings UI should... | isSimplePreferences | {
"repo_name": "ReliQ/FirstTipCalc",
"path": "src/com/reliqartz/firsttipcalc/gui/SettingsActivity.java",
"license": "apache-2.0",
"size": 12356
} | [
"android.content.Context",
"android.os.Build"
] | import android.content.Context; import android.os.Build; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 2,791,324 |
public ServiceResponseWithHeaders<Void, LROsDeleteAsyncRetrySucceededHeadersInner> beginDeleteAsyncRetrySucceeded() throws CloudException, IOException {
return beginDeleteAsyncRetrySucceededAsync().toBlocking().single();
} | ServiceResponseWithHeaders<Void, LROsDeleteAsyncRetrySucceededHeadersInner> function() throws CloudException, IOException { return beginDeleteAsyncRetrySucceededAsync().toBlocking().single(); } | /**
* Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status.
*
* @throws CloudException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
... | Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status | beginDeleteAsyncRetrySucceeded | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/lro/implementation/LROsInner.java",
"license": "mit",
"size": 313853
} | [
"com.microsoft.azure.CloudException",
"com.microsoft.rest.ServiceResponseWithHeaders",
"java.io.IOException"
] | import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.io"
] | com.microsoft.azure; com.microsoft.rest; java.io; | 2,482,539 |
public static void showHide(@NonNull final Fragment show, @NonNull final List<Fragment> hide) {
for (Fragment fragment : hide) {
putArgs(fragment, fragment != show);
}
operateNoAnim(TYPE_SHOW_HIDE_FRAGMENT, show.getFragmentManager(), show, hide.toArray(new Fragment[0]));
} | static void function(@NonNull final Fragment show, @NonNull final List<Fragment> hide) { for (Fragment fragment : hide) { putArgs(fragment, fragment != show); } operateNoAnim(TYPE_SHOW_HIDE_FRAGMENT, show.getFragmentManager(), show, hide.toArray(new Fragment[0])); } | /**
* Show fragment then hide other fragment.
*
* @param show The fragment will be show.
* @param hide The fragment will be hide.
*/ | Show fragment then hide other fragment | showHide | {
"repo_name": "didi/DoraemonKit",
"path": "Android/dokit-util/src/main/java/com/didichuxing/doraemonkit/util/FragmentUtils.java",
"license": "apache-2.0",
"size": 82370
} | [
"androidx.annotation.NonNull",
"androidx.fragment.app.Fragment",
"java.util.List"
] | import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import java.util.List; | import androidx.annotation.*; import androidx.fragment.app.*; import java.util.*; | [
"androidx.annotation",
"androidx.fragment",
"java.util"
] | androidx.annotation; androidx.fragment; java.util; | 1,160,796 |
@Lookup(name = "By data provider name")
TaskDataProvider findByName(@LookupField(name = "name") String name); | @Lookup(name = STR) TaskDataProvider findByName(@LookupField(name = "name") String name); | /**
* Returns the data provider with the given name.
*
* @param name the name of the data provider
* @return the provider with the given name
*/ | Returns the data provider with the given name | findByName | {
"repo_name": "sebbrudzinski/motech",
"path": "modules/tasks/tasks/src/main/java/org/motechproject/tasks/repository/DataProviderDataService.java",
"license": "bsd-3-clause",
"size": 698
} | [
"org.motechproject.mds.annotations.Lookup",
"org.motechproject.mds.annotations.LookupField",
"org.motechproject.tasks.domain.mds.task.TaskDataProvider"
] | import org.motechproject.mds.annotations.Lookup; import org.motechproject.mds.annotations.LookupField; import org.motechproject.tasks.domain.mds.task.TaskDataProvider; | import org.motechproject.mds.annotations.*; import org.motechproject.tasks.domain.mds.task.*; | [
"org.motechproject.mds",
"org.motechproject.tasks"
] | org.motechproject.mds; org.motechproject.tasks; | 1,215,384 |
@Test
@SmallTest
@Feature({"Preferences"})
public void testExportMenuItemNoLock() {
mTestHelper.setPasswordSource(
new SavedPasswordEntry("https://example.com", "test user", "password"));
ReauthenticationManager.setApiOverride(ReauthenticationManager.OverrideState.AVAILA... | @Feature({STR}) void function() { mTestHelper.setPasswordSource( new SavedPasswordEntry("https: ReauthenticationManager.setApiOverride(ReauthenticationManager.OverrideState.AVAILABLE); ReauthenticationManager.setScreenLockSetUpOverride( ReauthenticationManager.OverrideState.UNAVAILABLE); final SettingsActivity settings... | /**
* Check whether the user is asked to set up a screen lock if attempting to export passwords.
*/ | Check whether the user is asked to set up a screen lock if attempting to export passwords | testExportMenuItemNoLock | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/javatests/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettingsExportTest.java",
"license": "bsd-3-clause",
"size": 44067
} | [
"android.support.test.InstrumentationRegistry",
"android.view.View",
"androidx.test.espresso.Espresso",
"androidx.test.espresso.matcher.ViewMatchers",
"org.chromium.base.test.util.Feature",
"org.chromium.chrome.browser.settings.SettingsActivity",
"org.chromium.ui.test.util.ViewUtils",
"org.hamcrest.Ma... | import android.support.test.InstrumentationRegistry; import android.view.View; import androidx.test.espresso.Espresso; import androidx.test.espresso.matcher.ViewMatchers; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.settings.SettingsActivity; import org.chromium.ui.test.util.ViewUtils;... | import android.support.test.*; import android.view.*; import androidx.test.espresso.*; import androidx.test.espresso.matcher.*; import org.chromium.base.test.util.*; import org.chromium.chrome.browser.settings.*; import org.chromium.ui.test.util.*; import org.hamcrest.*; | [
"android.support",
"android.view",
"androidx.test",
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.ui",
"org.hamcrest"
] | android.support; android.view; androidx.test; org.chromium.base; org.chromium.chrome; org.chromium.ui; org.hamcrest; | 52,739 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<ApplicationGatewayInner>> listAllNextSinglePageAsync(String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<ApplicationGatewayInner>> function(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final ... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by serve... | Get the next page of items | listAllNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ApplicationGatewaysClientImpl.java",
"license": "mit",
"size": 166717
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.network.fluent.models.ApplicationGatewayInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.ApplicationGatewayInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 778,523 |
static ScoreDocComparator comparatorFloat (final IndexReader reader, final String fieldname)
throws IOException {
final String field = fieldname.intern();
final float[] fieldOrder = FieldCache.DEFAULT.getFloats (reader, field);
return new ScoreDocComparator () { | static ScoreDocComparator comparatorFloat (final IndexReader reader, final String fieldname) throws IOException { final String field = fieldname.intern(); final float[] fieldOrder = FieldCache.DEFAULT.getFloats (reader, field); return new ScoreDocComparator () { | /**
* Returns a comparator for sorting hits according to a field containing floats.
* @param reader Index to use.
* @param fieldname Fieldable containg float values.
* @return Comparator for sorting hits.
* @throws IOException If an error occurs reading the index.
*/ | Returns a comparator for sorting hits according to a field containing floats | comparatorFloat | {
"repo_name": "lpxz/grail-lucene477083",
"path": "src/java/org/apache/lucene/search/FieldSortedHitQueue.java",
"license": "apache-2.0",
"size": 13280
} | [
"java.io.IOException",
"org.apache.lucene.index.IndexReader"
] | import java.io.IOException; import org.apache.lucene.index.IndexReader; | import java.io.*; import org.apache.lucene.index.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,837,745 |
private static String generateUniqueName(final String suffix) {
String name = UUID.randomUUID().toString().replaceAll("-", "");
if (suffix != null) name += suffix;
return name;
} | static String function(final String suffix) { String name = UUID.randomUUID().toString().replaceAll("-", ""); if (suffix != null) name += suffix; return name; } | /**
* Generate a unique file name, used by createTempName() and commitStoreFile()
* @param suffix extra information to append to the generated name
* @return Unique file name
*/ | Generate a unique file name, used by createTempName() and commitStoreFile() | generateUniqueName | {
"repo_name": "intel-hadoop/hbase-rhino",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java",
"license": "apache-2.0",
"size": 41756
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 119,303 |
public OnExceptionDefinition handled(@AsPredicate Predicate handled) {
setHandledPolicy(handled);
return this;
} | OnExceptionDefinition function(@AsPredicate Predicate handled) { setHandledPolicy(handled); return this; } | /**
* Sets whether the exchange should be marked as handled or not.
*
* @param handled predicate that determines true or false
* @return the builder
*/ | Sets whether the exchange should be marked as handled or not | handled | {
"repo_name": "punkhorn/camel-upstream",
"path": "core/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java",
"license": "apache-2.0",
"size": 29346
} | [
"org.apache.camel.Predicate",
"org.apache.camel.spi.AsPredicate"
] | import org.apache.camel.Predicate; import org.apache.camel.spi.AsPredicate; | import org.apache.camel.*; import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,447,847 |
private void markAsExported(ValueSet valueSet, OnyxDataExportDestination destination, String destinationTableName) {
Date exportDate = new Date();
// Find the earliest and latest entity capture date-time
Date captureStartDate = null;
Date captureEndDate = null;
CaptureAndExportStrategy captureAn... | void function(ValueSet valueSet, OnyxDataExportDestination destination, String destinationTableName) { Date exportDate = new Date(); Date captureStartDate = null; Date captureEndDate = null; CaptureAndExportStrategy captureAndExportStrategy = captureAndExportStrategyMap.get(valueSet.getVariableEntity().getType()); if(c... | /**
* Creates an {@code ExportLog} entry for the specified {@code valueSet} and {@code destination}.
* @param valueSet
* @param destination
*/ | Creates an ExportLog entry for the specified valueSet and destination | markAsExported | {
"repo_name": "apruden/onyx",
"path": "onyx-core/src/main/java/org/obiba/onyx/engine/variable/export/OnyxDataExport.java",
"license": "gpl-3.0",
"size": 14699
} | [
"java.util.Date",
"org.obiba.magma.ValueSet",
"org.obiba.magma.support.MultithreadedDatasourceCopier",
"org.obiba.onyx.core.domain.statistics.ExportLog",
"org.obiba.onyx.engine.variable.CaptureAndExportStrategy"
] | import java.util.Date; import org.obiba.magma.ValueSet; import org.obiba.magma.support.MultithreadedDatasourceCopier; import org.obiba.onyx.core.domain.statistics.ExportLog; import org.obiba.onyx.engine.variable.CaptureAndExportStrategy; | import java.util.*; import org.obiba.magma.*; import org.obiba.magma.support.*; import org.obiba.onyx.core.domain.statistics.*; import org.obiba.onyx.engine.variable.*; | [
"java.util",
"org.obiba.magma",
"org.obiba.onyx"
] | java.util; org.obiba.magma; org.obiba.onyx; | 229,327 |
void setModel(ScenarioModel model); | void setModel(ScenarioModel model); | /**
* Sets model to be managed with this manager.
*
* @param model model
*/ | Sets model to be managed with this manager | setModel | {
"repo_name": "PerfCake/pc4ide",
"path": "pc4ide-editor/src/main/java/org/perfcake/ide/editor/form/FormManager.java",
"license": "apache-2.0",
"size": 3468
} | [
"org.perfcake.ide.core.model.components.ScenarioModel"
] | import org.perfcake.ide.core.model.components.ScenarioModel; | import org.perfcake.ide.core.model.components.*; | [
"org.perfcake.ide"
] | org.perfcake.ide; | 2,015,260 |
private String getContentString () throws SerializationException {
String typeAttr;
String sContent;
if ( content instanceof XmlAble ) {
typeAttr = "XmlAble";
sContent = ((XmlAble)content).toXmlString();
} else {
typeAttr = "Serializable";
sContent = Base64.encodeBase64String( SerializeTools.seri... | String function () throws SerializationException { String typeAttr; String sContent; if ( content instanceof XmlAble ) { typeAttr = STR; sContent = ((XmlAble)content).toXmlString(); } else { typeAttr = STR; sContent = Base64.encodeBase64String( SerializeTools.serialize((Serializable) content )); } String response = STR... | /**
* get the contents of this message as base 64 encoded string
*
* @return message contents in xml format with all important attributes and the actual content as base64 encoded string
*
* @throws SerializationException
*/ | get the contents of this message as base 64 encoded string | getContentString | {
"repo_name": "AlexRuppert/las2peer_project",
"path": "java/i5/las2peer/communication/Message.java",
"license": "mit",
"size": 25709
} | [
"java.io.Serializable",
"org.apache.commons.codec.binary.Base64"
] | import java.io.Serializable; import org.apache.commons.codec.binary.Base64; | import java.io.*; import org.apache.commons.codec.binary.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 1,022,590 |
//-----------------------------------------------------------------------
public static <E> int indexOf(final List<E> list, final Predicate<E> predicate) {
if (list != null && predicate != null) {
for (int i = 0; i < list.size(); i++) {
final E item = list.get(i);
... | static <E> int function(final List<E> list, final Predicate<E> predicate) { if (list != null && predicate != null) { for (int i = 0; i < list.size(); i++) { final E item = list.get(i); if (predicate.evaluate(item)) { return i; } } } return -1; } /** * Returns the longest common subsequence (LCS) of two sequences (lists... | /**
* Finds the first index in the given List which matches the given predicate.
* <p>
* If the input List or predicate is null, or no element of the List
* matches the predicate, -1 is returned.
*
* @param <E> the element type
* @param list the List to search, may be null
* @pa... | Finds the first index in the given List which matches the given predicate. If the input List or predicate is null, or no element of the List matches the predicate, -1 is returned | indexOf | {
"repo_name": "AffogatoLang/Moka",
"path": "lib/Apache_Commons_Collections/src/main/java/org/apache/commons/collections4/ListUtils.java",
"license": "bsd-3-clause",
"size": 27973
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 457,871 |
// readLines
//-----------------------------------------------------------------------
public static List<String> readLines(InputStream input) throws IOException {
InputStreamReader reader = new InputStreamReader(input);
return readLines(reader);
}
| static List<String> function(InputStream input) throws IOException { InputStreamReader reader = new InputStreamReader(input); return readLines(reader); } | /**
* Get the contents of an <code>InputStream</code> as a list of Strings,
* one entry per line, using the default character encoding of the platform.
* <p>
* This method buffers the input internally, so there is no need to use a
* <code>BufferedInputStream</code>.
*
* @param ... | Get the contents of an <code>InputStream</code> as a list of Strings, one entry per line, using the default character encoding of the platform. This method buffers the input internally, so there is no need to use a <code>BufferedInputStream</code> | readLines | {
"repo_name": "rytina/dukecon_appsgenerator",
"path": "org.apache.commons.io/source-bundle/org/apache/commons/io/IOUtils.java",
"license": "epl-1.0",
"size": 62217
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.util.List"
] | import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 531,381 |
private static Optional<InternalRexNode> translateOp2(String op, String name,
RexLiteral right, RexNode originNode, KeyMeta keyMeta) {
String value = literalValue(right);
InternalRexNode node = new InternalRexNode();
node.node = originNode;
node.ordinalInKey = keyMeta.getKeyColumnNames().indexOf... | static Optional<InternalRexNode> function(String op, String name, RexLiteral right, RexNode originNode, KeyMeta keyMeta) { String value = literalValue(right); InternalRexNode node = new InternalRexNode(); node.node = originNode; node.ordinalInKey = keyMeta.getKeyColumnNames().indexOf(name); if (keyMeta.getVarLen(name).... | /**
* Combines a field name, operator, and literal to produce a predicate string.
*/ | Combines a field name, operator, and literal to produce a predicate string | translateOp2 | {
"repo_name": "datametica/calcite",
"path": "innodb/src/main/java/org/apache/calcite/adapter/innodb/InnodbFilterTranslator.java",
"license": "apache-2.0",
"size": 19093
} | [
"com.alibaba.innodb.java.reader.schema.KeyMeta",
"java.util.Optional",
"org.apache.calcite.rex.RexLiteral",
"org.apache.calcite.rex.RexNode"
] | import com.alibaba.innodb.java.reader.schema.KeyMeta; import java.util.Optional; import org.apache.calcite.rex.RexLiteral; import org.apache.calcite.rex.RexNode; | import com.alibaba.innodb.java.reader.schema.*; import java.util.*; import org.apache.calcite.rex.*; | [
"com.alibaba.innodb",
"java.util",
"org.apache.calcite"
] | com.alibaba.innodb; java.util; org.apache.calcite; | 371,491 |
public static int ConvertDipToPx(Context context, float dips)
{
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dips, context.getResources().getDisplayMetrics());
}
| static int function(Context context, float dips) { return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dips, context.getResources().getDisplayMetrics()); } | /** Converts the given number of density independent pixels to the corresponding number of pixels using the formula: px = dip * (dpi / 160).
*
* @param context the current Context
* @param dips a value in DIPs
* @return the corresponding value in Pixels
* */ | Converts the given number of density independent pixels to the corresponding number of pixels using the formula: px = dip * (dpi / 160) | ConvertDipToPx | {
"repo_name": "dave-cassettari/sapelli",
"path": "CollectorAndroid/src/uk/ac/ucl/excites/sapelli/collector/util/ScreenMetrics.java",
"license": "unlicense",
"size": 3700
} | [
"android.content.Context",
"android.util.TypedValue"
] | import android.content.Context; import android.util.TypedValue; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 2,054,990 |
void setChannel(Channel value); | void setChannel(Channel value); | /**
* Sets the value of the '{@link org.roboid.studio.timeline.ChannelTrack#getChannel <em>Channel</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Channel</em>' reference.
* @see #getChannel()
* @generated
*/ | Sets the value of the '<code>org.roboid.studio.timeline.ChannelTrack#getChannel Channel</code>' reference. | setChannel | {
"repo_name": "roboidstudio/embedded",
"path": "org.roboid.studio.timeline.model/src/org/roboid/studio/timeline/ChannelTrack.java",
"license": "lgpl-2.1",
"size": 5238
} | [
"org.roboid.robot.Channel"
] | import org.roboid.robot.Channel; | import org.roboid.robot.*; | [
"org.roboid.robot"
] | org.roboid.robot; | 781,349 |
public JMenuItem[] getFileMenuSecondaries() {
return null;
} | JMenuItem[] function() { return null; } | /**
* Get secondary file menu opereations for this tool. These are placed after
* all primary actions from all tools, but before the global operations like
* preferences, close and exit.
* They will be shown in the order given in the array. There
* are none provided by default (null).
* ... | Get secondary file menu opereations for this tool. These are placed after all primary actions from all tools, but before the global operations like preferences, close and exit. They will be shown in the order given in the array. There are none provided by default (null) | getFileMenuSecondaries | {
"repo_name": "otmarjr/jtreg-fork",
"path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/tool/ToolManager.java",
"license": "gpl-2.0",
"size": 7898
} | [
"javax.swing.JMenuItem"
] | import javax.swing.JMenuItem; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,015,889 |
@Test
public void testHMSClientWithoutFilter() throws Exception {
MetastoreConf.setBoolVar(conf, ConfVars.METASTORE_CLIENT_FILTER_ENABLED, false);
DBNAME1 = "db_testHMSClientWithoutFilter_1";
DBNAME2 = "db_testHMSClientWithoutFilter_2";
creatEnv(conf);
assertNotNull(client.getTable(DBNAME1, TAB... | void function() throws Exception { MetastoreConf.setBoolVar(conf, ConfVars.METASTORE_CLIENT_FILTER_ENABLED, false); DBNAME1 = STR; DBNAME2 = STR; creatEnv(conf); assertNotNull(client.getTable(DBNAME1, TAB1)); assertEquals(2, client.getTables(DBNAME1, "*").size()); assertEquals(2, client.getAllTables(DBNAME1).size()); a... | /**
* Disable filtering at HMS client
* By default, the HMS server side filtering is disabled, so we can see HMS client filtering behavior
* @throws Exception
*/ | Disable filtering at HMS client By default, the HMS server side filtering is disabled, so we can see HMS client filtering behavior | testHMSClientWithoutFilter | {
"repo_name": "nishantmonu51/hive",
"path": "standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java",
"license": "apache-2.0",
"size": 14449
} | [
"com.google.common.collect.Lists",
"org.apache.hadoop.hive.metastore.conf.MetastoreConf",
"org.junit.Assert"
] | import com.google.common.collect.Lists; import org.apache.hadoop.hive.metastore.conf.MetastoreConf; import org.junit.Assert; | import com.google.common.collect.*; import org.apache.hadoop.hive.metastore.conf.*; import org.junit.*; | [
"com.google.common",
"org.apache.hadoop",
"org.junit"
] | com.google.common; org.apache.hadoop; org.junit; | 765,284 |
@Test
public void testPartitionedRegionAndCopyOnRead() throws Exception {
final Host h = getHost(0);
final VM accessor = h.getVM(2);
final VM datastore = h.getVM(3);
final String rName = getUniqueName();
final String k1 = "k1"; | void function() throws Exception { final Host h = getHost(0); final VM accessor = h.getVM(2); final VM datastore = h.getVM(3); final String rName = getUniqueName(); final String k1 = "k1"; | /**
* Test to ensure that a PartitionedRegion doesn't make more than the expected number of copies
* when copy-on-read is set to true
*/ | Test to ensure that a PartitionedRegion doesn't make more than the expected number of copies when copy-on-read is set to true | testPartitionedRegionAndCopyOnRead | {
"repo_name": "pdxrunner/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ClientDeserializationCopyOnReadRegressionTest.java",
"license": "apache-2.0",
"size": 19945
} | [
"org.apache.geode.test.dunit.Host"
] | import org.apache.geode.test.dunit.Host; | import org.apache.geode.test.dunit.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,725,447 |
public CallHandle loadRatings(SecurityContext ctx, Class nodeType,
List<Long> nodeIDs, long userID, AgentEventListener observer);
| CallHandle function(SecurityContext ctx, Class nodeType, List<Long> nodeIDs, long userID, AgentEventListener observer); | /**
* Loads all the ratings attached by a given user to the specified objects.
* Retrieves the files if the userID is not <code>-1</code>.
*
* @param ctx The security context.
* @param nodeType The class identifying the object.
* Mustn't be <code>null</code>.
* @param nodeIDs The collection of ids of the... | Loads all the ratings attached by a given user to the specified objects. Retrieves the files if the userID is not <code>-1</code> | loadRatings | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/views/MetadataHandlerView.java",
"license": "gpl-2.0",
"size": 20883
} | [
"java.util.List",
"org.openmicroscopy.shoola.env.event.AgentEventListener"
] | import java.util.List; import org.openmicroscopy.shoola.env.event.AgentEventListener; | import java.util.*; import org.openmicroscopy.shoola.env.event.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 1,185,705 |
public void testParseTemplateConsidersAttachment() throws XWikiException
{
XWikiDocument skin = new XWikiDocument(new DocumentReference("Wiki", "XWiki", "Skin"));
XWikiAttachment attachment = new XWikiAttachment();
skin.getAttachmentList().add(attachment);
attachment.setContent("... | void function() throws XWikiException { XWikiDocument skin = new XWikiDocument(new DocumentReference("Wiki", "XWiki", "Skin")); XWikiAttachment attachment = new XWikiAttachment(); skin.getAttachmentList().add(attachment); attachment.setContent(STR.getBytes()); attachment.setFilename(STR); attachment.setDoc(skin); this.... | /**
* See XWIKI-2096
*/ | See XWIKI-2096 | testParseTemplateConsidersAttachment | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/XWikiTest.java",
"license": "lgpl-2.1",
"size": 28982
} | [
"com.xpn.xwiki.doc.XWikiAttachment",
"com.xpn.xwiki.doc.XWikiDocument",
"org.xwiki.model.reference.DocumentReference"
] | import com.xpn.xwiki.doc.XWikiAttachment; import com.xpn.xwiki.doc.XWikiDocument; import org.xwiki.model.reference.DocumentReference; | import com.xpn.xwiki.doc.*; import org.xwiki.model.reference.*; | [
"com.xpn.xwiki",
"org.xwiki.model"
] | com.xpn.xwiki; org.xwiki.model; | 2,673,199 |
char getArrayDelimiter(int oid) throws SQLException; | char getArrayDelimiter(int oid) throws SQLException; | /**
* Determine the delimiter for the elements of the given array type oid.
*
* @param oid the array type's OID
* @return the base type's array type delimiter
* @throws SQLException if an error occurs when retrieving array delimiter
*/ | Determine the delimiter for the elements of the given array type oid | getArrayDelimiter | {
"repo_name": "sehrope/pgjdbc",
"path": "pgjdbc/src/main/java/org/postgresql/core/TypeInfo.java",
"license": "bsd-2-clause",
"size": 3769
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,835,129 |
public void setSageEmployeePersistence(
SageEmployeePersistence sageEmployeePersistence) {
this.sageEmployeePersistence = sageEmployeePersistence;
} | void function( SageEmployeePersistence sageEmployeePersistence) { this.sageEmployeePersistence = sageEmployeePersistence; } | /**
* Sets the sage employee persistence.
*
* @param sageEmployeePersistence the sage employee persistence
*/ | Sets the sage employee persistence | setSageEmployeePersistence | {
"repo_name": "RMarinDTI/CloubityRepo",
"path": "Servicio-portlet/docroot/WEB-INF/src/es/davinciti/liferay/service/base/CurrencyServiceBaseImpl.java",
"license": "unlicense",
"size": 52888
} | [
"es.davinciti.liferay.service.persistence.SageEmployeePersistence"
] | import es.davinciti.liferay.service.persistence.SageEmployeePersistence; | import es.davinciti.liferay.service.persistence.*; | [
"es.davinciti.liferay"
] | es.davinciti.liferay; | 2,247,458 |
@GET
@NoCache
@Produces(MediaType.APPLICATION_JSON)
public Stream<RoleRepresentation> getRoles(@QueryParam("search") @DefaultValue("") String search,
@QueryParam("first") Integer firstResult,
@QueryParam("max")... | @Produces(MediaType.APPLICATION_JSON) Stream<RoleRepresentation> function(@QueryParam(STR) @DefaultValue(STRfirstSTRmaxSTRbriefRepresentationSTRtrue") boolean briefRepresentation) { auth.roles().requireList(roleContainer); Set<RoleModel> roleModels; if(search != null && search.trim().length() > 0) { roleModels = roleCo... | /**
* Get all roles for the realm or client
*
* @return
*/ | Get all roles for the realm or client | getRoles | {
"repo_name": "mhajas/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/RoleContainerResource.java",
"license": "apache-2.0",
"size": 16537
} | [
"java.util.Objects",
"java.util.Set",
"java.util.function.Function",
"java.util.stream.Stream",
"javax.ws.rs.DefaultValue",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.MediaType",
"org.keycloak.models.RoleModel",
"org.keycloak.models.utils.ModelToRepresentation",
"org.key... | import java.util.Objects; import java.util.Set; import java.util.function.Function; import java.util.stream.Stream; import javax.ws.rs.DefaultValue; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import org.keycloak.models.RoleModel; import org.keycloak.models.utils.Model... | import java.util.*; import java.util.function.*; import java.util.stream.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*; | [
"java.util",
"javax.ws",
"org.keycloak.models",
"org.keycloak.representations"
] | java.util; javax.ws; org.keycloak.models; org.keycloak.representations; | 1,412,393 |
public void run() {
char[] buf = new char[8192];
// Run until we're interrupted.
while (!runningThread.isInterrupted()) {
try {
int len = incomingReader.read(buf);
if (len == -1) {
// Die if no input is available.
... | void function() { char[] buf = new char[8192]; while (!runningThread.isInterrupted()) { try { int len = incomingReader.read(buf); if (len == -1) { break; } else if (len > 0) { String str = new String(buf, 0, len); synchronized (outgoingTextArea) { appending = true; outgoingTextArea.append(str); appending = false; outgo... | /**
* Read input from the reader and append it to the text area. Runs
* until the <code>stop()</code> method is called or an I/O
* exception occurs.
*
* @see #start
* @see #stop
*/ | Read input from the reader and append it to the text area. Runs until the <code>stop()</code> method is called or an I/O exception occurs | run | {
"repo_name": "mbertacca/JSwat2",
"path": "classes/com/bluemarsh/jswat/ui/ReaderToTextArea.java",
"license": "gpl-2.0",
"size": 5106
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 733,389 |
default<T1> Case<T1,R,Function<T1,R>> or(Predicate<T1> or, Function<T1,T> fn){
return composeOr(Case.of(or,fn));
} | default<T1> Case<T1,R,Function<T1,R>> or(Predicate<T1> or, Function<T1,T> fn){ return composeOr(Case.of(or,fn)); } | /**
* Syntax sugar for composeOr
* @see #composeOr
*
* Provide a Case that will be executed before the current one. The function from the supplied Case will be executed
* first and it;s output will be provided to the function of the current case - if either predicate holds.
*
* <pre>
* case1 =Case.of(... | Syntax sugar for composeOr | or | {
"repo_name": "sjfloat/cyclops",
"path": "cyclops-pattern-matching/src/main/java/com/aol/cyclops/matcher/Case.java",
"license": "mit",
"size": 17901
} | [
"java.util.function.Function",
"java.util.function.Predicate"
] | import java.util.function.Function; import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,367,328 |
public static String getAlgoList(Provider p) {
StringBuilder b = new StringBuilder();
Set<String> types = new HashSet<String>();
for(Provider.Service svc: p.getServices()) {
types.add(svc.getType());
if("KeyGenerator".equals(svc.getType()))
b.append("\n\t").append("[").append(svc.getType()).app... | static String function(Provider p) { StringBuilder b = new StringBuilder(); Set<String> types = new HashSet<String>(); for(Provider.Service svc: p.getServices()) { types.add(svc.getType()); if(STR.equals(svc.getType())) b.append("\n\t").append("[").append(svc.getType()).append(STR).append(svc.getAlgorithm()); } System.... | /**
* Returns the algo list for the passed provider
* @param p the provder
* @return the algo list
*/ | Returns the algo list for the passed provider | getAlgoList | {
"repo_name": "nickman/HeliosStreams",
"path": "collector-server/src/test/java/test/com/heliosapm/streams/collector/ssh/server/ApacheSSHDServer.java",
"license": "apache-2.0",
"size": 10805
} | [
"java.security.Provider",
"java.util.HashSet",
"java.util.Set"
] | import java.security.Provider; import java.util.HashSet; import java.util.Set; | import java.security.*; import java.util.*; | [
"java.security",
"java.util"
] | java.security; java.util; | 1,172,807 |
private void mergeObjectTable(ObjectTable methodObjectTable, boolean stringsOnly) {
Enumeration e = methodObjectTable.objectTable.elements();
while (e.hasMoreElements()) {
ObjectCounter moc = (ObjectCounter)e.nextElement();
if (!stringsOnly || (moc.getObject() instanceof Stri... | void function(ObjectTable methodObjectTable, boolean stringsOnly) { Enumeration e = methodObjectTable.objectTable.elements(); while (e.hasMoreElements()) { ObjectCounter moc = (ObjectCounter)e.nextElement(); if (!stringsOnly (moc.getObject() instanceof String)) { mergeConstantObject(moc); } } } | /**
* Merge the objects and usage counts from methodObjectTable into this object table
* @param methodObjectTable
* @param stringsOnly if true only merge in string objects (for to preserve strings used by vm2c)
*/ | Merge the objects and usage counts from methodObjectTable into this object table | mergeObjectTable | {
"repo_name": "squawk-mirror/squawk",
"path": "translator/src/com/sun/squawk/translator/ObjectTable.java",
"license": "gpl-2.0",
"size": 14242
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,681,456 |
public static long getTimestampAsLong(Timestamp timestamp) {
return millisToSeconds(timestamp.getTime());
} | static long function(Timestamp timestamp) { return millisToSeconds(timestamp.getTime()); } | /**
* Return a long representation of a Timestamp.
* @param timestamp
* @return
*/ | Return a long representation of a Timestamp | getTimestampAsLong | {
"repo_name": "vergilchiu/hive",
"path": "storage-api/src/java/org/apache/hadoop/hive/ql/exec/vector/TimestampColumnVector.java",
"license": "apache-2.0",
"size": 12182
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,066,294 |
public static int getRequiredHeightBoundingClientRect(
com.google.gwt.dom.client.Element element) {
return (int) Math
.ceil(getRequiredHeightBoundingClientRectDouble(element));
} | static int function( com.google.gwt.dom.client.Element element) { return (int) Math .ceil(getRequiredHeightBoundingClientRectDouble(element)); } | /**
* Calculates the height of the element's bounding rectangle.
* <p>
* In case the browser doesn't support bounding rectangles, the returned
* value is the offset height.
*
* @param element
* the element of which to calculate the height
* @return the height of the el... | Calculates the height of the element's bounding rectangle. In case the browser doesn't support bounding rectangles, the returned value is the offset height | getRequiredHeightBoundingClientRect | {
"repo_name": "mstahv/framework",
"path": "client/src/main/java/com/vaadin/client/WidgetUtil.java",
"license": "apache-2.0",
"size": 65738
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,968,990 |
@MethodSource("com.azure.messaging.servicebus.IntegrationTestBase#messagingEntityWithSessions")
@ParameterizedTest
void receiveMessageAndComplete(MessagingEntityType entityType, boolean isSessionEnabled) {
// Arrange
setSenderAndReceiver(entityType, TestUtils.USE_CASE_DEFAULT, isSessionEnabl... | @MethodSource(STR) void receiveMessageAndComplete(MessagingEntityType entityType, boolean isSessionEnabled) { setSenderAndReceiver(entityType, TestUtils.USE_CASE_DEFAULT, isSessionEnabled); int maxMessages = 1; final String messageId = UUID.randomUUID().toString(); final ServiceBusMessage message = getMessage(messageId... | /**
* Verifies that we can send and receive one messages.
*/ | Verifies that we can send and receive one messages | receiveMessageAndComplete | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/servicebus/azure-messaging-servicebus/src/test/java/com/azure/messaging/servicebus/ServiceBusReceiverClientIntegrationTest.java",
"license": "mit",
"size": 36855
} | [
"com.azure.messaging.servicebus.implementation.MessagingEntityType",
"java.util.UUID",
"java.util.concurrent.atomic.AtomicInteger",
"java.util.stream.Stream",
"org.junit.jupiter.api.Assertions",
"org.junit.jupiter.params.provider.MethodSource"
] | import com.azure.messaging.servicebus.implementation.MessagingEntityType; import java.util.UUID; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.provider.MethodSource; | import com.azure.messaging.servicebus.implementation.*; import java.util.*; import java.util.concurrent.atomic.*; import java.util.stream.*; import org.junit.jupiter.api.*; import org.junit.jupiter.params.provider.*; | [
"com.azure.messaging",
"java.util",
"org.junit.jupiter"
] | com.azure.messaging; java.util; org.junit.jupiter; | 2,844,468 |
public DataObjectModification<VtnNode> newCreatedModification() {
List<DataObjectModification<?>> children = new ArrayList<>();
for (VtnPortBuildHelper child: portBuilders.values()) {
children.add(child.newCreatedModification());
}
return newKeyedModification(null, build... | DataObjectModification<VtnNode> function() { List<DataObjectModification<?>> children = new ArrayList<>(); for (VtnPortBuildHelper child: portBuilders.values()) { children.add(child.newCreatedModification()); } return newKeyedModification(null, build(), children); } | /**
* Create a new data object modification that represents creation of
* this vtn-node.
*
* @return A {@link DataObjectModification} instance.
*/ | Create a new data object modification that represents creation of this vtn-node | newCreatedModification | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/test/java/org/opendaylight/vtn/manager/internal/inventory/VtnNodeBuildHelper.java",
"license": "epl-1.0",
"size": 7702
} | [
"java.util.ArrayList",
"java.util.List",
"org.opendaylight.controller.md.sal.binding.api.DataObjectModification",
"org.opendaylight.vtn.manager.internal.TestBase",
"org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.impl.inventory.rev150209.vtn.nodes.VtnNode"
] | import java.util.ArrayList; import java.util.List; import org.opendaylight.controller.md.sal.binding.api.DataObjectModification; import org.opendaylight.vtn.manager.internal.TestBase; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.impl.inventory.rev150209.vtn.nodes.VtnNode; | import java.util.*; import org.opendaylight.controller.md.sal.binding.api.*; import org.opendaylight.vtn.manager.internal.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.vtn.impl.inventory.rev150209.vtn.nodes.*; | [
"java.util",
"org.opendaylight.controller",
"org.opendaylight.vtn",
"org.opendaylight.yang"
] | java.util; org.opendaylight.controller; org.opendaylight.vtn; org.opendaylight.yang; | 1,714,883 |
@Deprecated
void createTemporaryQueue(SimpleString address,
SimpleString queueName,
SimpleString filter) throws ActiveMQException; | void createTemporaryQueue(SimpleString address, SimpleString queueName, SimpleString filter) throws ActiveMQException; | /**
* Creates a <em>temporary</em> queue with a filter.
*
* @param address the queue will be bound to this address
* @param queueName the name of the queue
* @param filter only messages which match this filter will be put in the queue
* @throws ActiveMQException in an exception occurs while... | Creates a temporary queue with a filter | createTemporaryQueue | {
"repo_name": "tabish121/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java",
"license": "apache-2.0",
"size": 54407
} | [
"org.apache.activemq.artemis.api.core.ActiveMQException",
"org.apache.activemq.artemis.api.core.SimpleString"
] | import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.SimpleString; | import org.apache.activemq.artemis.api.core.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,555,923 |
private void addChannelSenderListenerIfAny(
WebSocketProxy webSocketProxy, HandshakeConfig handshakeConfig) {
List<WebSocketSenderListener> webSocketSenderListenerList =
handshakeConfig.getWebSocketSenderListeners();
if (webSocketSenderListenerList != null) {
... | void function( WebSocketProxy webSocketProxy, HandshakeConfig handshakeConfig) { List<WebSocketSenderListener> webSocketSenderListenerList = handshakeConfig.getWebSocketSenderListeners(); if (webSocketSenderListenerList != null) { for (WebSocketSenderListener senderListener : webSocketSenderListenerList) { webSocketPro... | /**
* Set other sender listeners and handshake reference, before starting listeners
*
* @param webSocketProxy
* @param handshakeConfig
*/ | Set other sender listeners and handshake reference, before starting listeners | addChannelSenderListenerIfAny | {
"repo_name": "kingthorin/zap-extensions",
"path": "addOns/websocket/src/main/java/org/zaproxy/zap/extension/websocket/client/ServerConnectionEstablisher.java",
"license": "apache-2.0",
"size": 14478
} | [
"java.util.List",
"org.zaproxy.zap.extension.websocket.WebSocketProxy",
"org.zaproxy.zap.extension.websocket.WebSocketSenderListener"
] | import java.util.List; import org.zaproxy.zap.extension.websocket.WebSocketProxy; import org.zaproxy.zap.extension.websocket.WebSocketSenderListener; | import java.util.*; import org.zaproxy.zap.extension.websocket.*; | [
"java.util",
"org.zaproxy.zap"
] | java.util; org.zaproxy.zap; | 2,358,135 |
@SuppressWarnings("unchecked")
private Iterable<AbstractTreeNode<C, K, ?>> sentinelSafeChildren(AbstractTreeNode<?, ?, ?> n) {
if (n instanceof SentinelNode) {
return ImmutableList.of();
} else {
return (Iterable<AbstractTreeNode<C, K, ?>>) n.children();
}
} | @SuppressWarnings(STR) Iterable<AbstractTreeNode<C, K, ?>> function(AbstractTreeNode<?, ?, ?> n) { if (n instanceof SentinelNode) { return ImmutableList.of(); } else { return (Iterable<AbstractTreeNode<C, K, ?>>) n.children(); } } | /**
* Return existing children of node, unless node is a sentinel node, in which
* case the empty list is returned.
* @param n node
* @return child list of n, or the empty iterable for sentinel nodes.
*/ | Return existing children of node, unless node is a sentinel node, in which case the empty list is returned | sentinelSafeChildren | {
"repo_name": "hczhang/htmlmerge",
"path": "java/com/google/documents/core/treesync/TreeMerger.java",
"license": "apache-2.0",
"size": 34973
} | [
"com.google.common.collect.ImmutableList"
] | import com.google.common.collect.ImmutableList; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,894,966 |
public Map<String, Object> getMetrics() {
return metrics;
}
private static final ConstructingObjectParser<TopMetrics, Void> PARSER = new ConstructingObjectParser<>("top", true,
(args, name) -> {
@SuppressWarnings("unchecked")
L... | Map<String, Object> function() { return metrics; } private static final ConstructingObjectParser<TopMetrics, Void> PARSER = new ConstructingObjectParser<>("top", true, (args, name) -> { @SuppressWarnings(STR) List<Object> sort = (List<Object>) args[0]; @SuppressWarnings(STR) Map<String, Object> metrics = (Map<String, O... | /**
* The top metric values returned by the aggregation.
*/ | The top metric values returned by the aggregation | getMetrics | {
"repo_name": "ern/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/analytics/ParsedTopMetrics.java",
"license": "apache-2.0",
"size": 4506
} | [
"java.util.List",
"java.util.Map",
"org.elasticsearch.common.xcontent.ConstructingObjectParser",
"org.elasticsearch.common.xcontent.ObjectParser",
"org.elasticsearch.common.xcontent.XContentParserUtils"
] | import java.util.List; import java.util.Map; import org.elasticsearch.common.xcontent.ConstructingObjectParser; import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentParserUtils; | import java.util.*; import org.elasticsearch.common.xcontent.*; | [
"java.util",
"org.elasticsearch.common"
] | java.util; org.elasticsearch.common; | 2,424,858 |
@MediumTest
@Feature({"Browser", "Main"})
@Restriction(ChromeRestriction.RESTRICTION_TYPE_GOOGLE_PLAY_SERVICES)
public void testTranslateNeverPanel() throws InterruptedException {
loadUrl(mTestServer.getURL(TRANSLATE_PAGE));
assertTrue("InfoBar not opened.", mListener.addInfoBarAnimation... | @Feature({STR, "Main"}) @Restriction(ChromeRestriction.RESTRICTION_TYPE_GOOGLE_PLAY_SERVICES) void function() throws InterruptedException { loadUrl(mTestServer.getURL(TRANSLATE_PAGE)); assertTrue(STR, mListener.addInfoBarAnimationFinished()); InfoBar infoBar = mInfoBarContainer.getInfoBarsForTesting().get(0); assertTru... | /**
* Test the "never translate" panel.
*/ | Test the "never translate" panel | testTranslateNeverPanel | {
"repo_name": "axinging/chromium-crosswalk",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/translate/TranslateInfoBarTest.java",
"license": "bsd-3-clause",
"size": 5139
} | [
"org.chromium.base.test.util.Feature",
"org.chromium.base.test.util.Restriction",
"org.chromium.chrome.browser.infobar.InfoBar",
"org.chromium.chrome.test.util.ChromeRestriction",
"org.chromium.chrome.test.util.InfoBarUtil",
"org.chromium.chrome.test.util.TranslateUtil"
] | import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction; import org.chromium.chrome.browser.infobar.InfoBar; import org.chromium.chrome.test.util.ChromeRestriction; import org.chromium.chrome.test.util.InfoBarUtil; import org.chromium.chrome.test.util.TranslateUtil; | import org.chromium.base.test.util.*; import org.chromium.chrome.browser.infobar.*; import org.chromium.chrome.test.util.*; | [
"org.chromium.base",
"org.chromium.chrome"
] | org.chromium.base; org.chromium.chrome; | 78,253 |
EReference getCallList_AsynchCall(); | EReference getCallList_AsynchCall(); | /**
* Returns the meta object for the containment reference list '{@link lqn.CallList#getAsynchCall <em>Asynch Call</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Asynch Call</em>'.
* @see lqn.CallList#getAsynchCall()
* @see #getCa... | Returns the meta object for the containment reference list '<code>lqn.CallList#getAsynchCall Asynch Call</code>'. | getCallList_AsynchCall | {
"repo_name": "aciancone/klapersuite",
"path": "klapersuite.metamodel.lqn/src/lqn/LqnPackage.java",
"license": "epl-1.0",
"size": 116938
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,131,675 |
protected void connect(InetAddress address, int port) throws IOException {
this.port = port;
this.address = address;
try {
connectToAddress(address, port, timeout);
return;
} catch (IOException e) {
// everything failed
close();
... | void function(InetAddress address, int port) throws IOException { this.port = port; this.address = address; try { connectToAddress(address, port, timeout); return; } catch (IOException e) { close(); throw e; } } | /**
* Creates a socket and connects it to the specified address on
* the specified port.
* @param address the address
* @param port the specified port
*/ | Creates a socket and connects it to the specified address on the specified port | connect | {
"repo_name": "universsky/openjdk",
"path": "jdk/src/java.base/share/classes/java/net/AbstractPlainSocketImpl.java",
"license": "gpl-2.0",
"size": 23431
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,763,306 |
public ServiceFuture<VpnGatewayInner> beginUpdateTagsAsync(String resourceGroupName, String gatewayName, Map<String, String> tags, final ServiceCallback<VpnGatewayInner> serviceCallback) {
return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags), servic... | ServiceFuture<VpnGatewayInner> function(String resourceGroupName, String gatewayName, Map<String, String> tags, final ServiceCallback<VpnGatewayInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, gatewayName, tags), serviceCallback); } | /**
* Updates virtual wan vpn gateway tags.
*
* @param resourceGroupName The resource group name of the VpnGateway.
* @param gatewayName The name of the gateway.
* @param tags Resource tags.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
... | Updates virtual wan vpn gateway tags | beginUpdateTagsAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/VpnGatewaysInner.java",
"license": "mit",
"size": 120434
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.Map"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,533,474 |
public RowSet findOutputRowSet(String targetStep) throws KettleStepException {
// Check to see that "targetStep" only runs in a single copy
// Otherwise you'll see problems during execution.
//
StepMeta targetStepMeta = transMeta.findStep(targetStep);
if (targetStepMeta==null) {
thr... | RowSet function(String targetStep) throws KettleStepException { if (targetStepMeta==null) { throw new KettleStepException(BaseMessages.getString(PKG, STR, targetStep)); } if (targetStepMeta.getCopies()>1) { throw new KettleStepException(BaseMessages.getString(PKG, STR, targetStep, Integer.toString(targetStepMeta.getCop... | /**
* Find output row set.
*
* @param targetStep the target step
* @return the row set
* @throws KettleStepException the kettle step exception
*/ | Find output row set | findOutputRowSet | {
"repo_name": "bsspirit/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/trans/step/BaseStep.java",
"license": "apache-2.0",
"size": 116654
} | [
"org.pentaho.di.core.RowSet",
"org.pentaho.di.core.exception.KettleStepException",
"org.pentaho.di.i18n.BaseMessages"
] | import org.pentaho.di.core.RowSet; import org.pentaho.di.core.exception.KettleStepException; import org.pentaho.di.i18n.BaseMessages; | import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.i18n.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 896,650 |
@Test
public void snapshotClusterWithNullNodePools() {
Cluster emptyCluster = new Cluster().setNodePools(null);
ClusterSnapshot snapshot = new ClusterSnapshotter(this.mockedClient, emptyCluster).call();
assertThat(snapshot, is(new ClusterSnapshot(emptyCluster, null, UtcTime.now())));
... | void function() { Cluster emptyCluster = new Cluster().setNodePools(null); ClusterSnapshot snapshot = new ClusterSnapshotter(this.mockedClient, emptyCluster).call(); assertThat(snapshot, is(new ClusterSnapshot(emptyCluster, null, UtcTime.now()))); verifyZeroInteractions(this.mockedClient); } | /**
* {@link Cluster} can lack node pools (for example, while it is being
* created). In such cases, the snapshotter should just return an empty
* {@link ClusterSnapshot}.
*/ | <code>Cluster</code> can lack node pools (for example, while it is being created). In such cases, the snapshotter should just return an empty <code>ClusterSnapshot</code> | snapshotClusterWithNullNodePools | {
"repo_name": "Eeemil/scale.cloudpool",
"path": "google/container/src/test/java/com/elastisys/scale/cloudpool/google/container/TestClusterSnapshotter.java",
"license": "apache-2.0",
"size": 6000
} | [
"com.elastisys.scale.cloudpool.google.container.client.ClusterSnapshot",
"com.elastisys.scale.commons.util.time.UtcTime",
"com.google.api.services.container.model.Cluster",
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"org.mockito.Mockito"
] | import com.elastisys.scale.cloudpool.google.container.client.ClusterSnapshot; import com.elastisys.scale.commons.util.time.UtcTime; import com.google.api.services.container.model.Cluster; import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.mockito.Mockito; | import com.elastisys.scale.cloudpool.google.container.client.*; import com.elastisys.scale.commons.util.time.*; import com.google.api.services.container.model.*; import org.hamcrest.*; import org.junit.*; import org.mockito.*; | [
"com.elastisys.scale",
"com.google.api",
"org.hamcrest",
"org.junit",
"org.mockito"
] | com.elastisys.scale; com.google.api; org.hamcrest; org.junit; org.mockito; | 28,930 |
private void tdsOrderByToken()
throws IOException
{
// Skip this packet type
int pktLen = in.readShort();
in.skip(pktLen);
} | void function() throws IOException { int pktLen = in.readShort(); in.skip(pktLen); } | /**
* Process an order by token.
* <p>Sent to describe columns in an order by clause.
* @throws IOException
*/ | Process an order by token. Sent to describe columns in an order by clause | tdsOrderByToken | {
"repo_name": "kassak/jtds",
"path": "src/main/net/sourceforge/jtds/jdbc/TdsCore.java",
"license": "lgpl-2.1",
"size": 169087
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 191,382 |
public static void renderAutoScrollHiddenInput(FacesContext facesContext,
ResponseWriter writer) throws IOException
{
writer.startElement(HTML.INPUT_ELEM, null);
writer.writeAttribute(HTML.TYPE_ATTR, "hidden", null);
writer.writeAttribute(HTML.NAME_ATTR, AUTO_SCROLL_PARAM, nu... | static void function(FacesContext facesContext, ResponseWriter writer) throws IOException { writer.startElement(HTML.INPUT_ELEM, null); writer.writeAttribute(HTML.TYPE_ATTR, STR, null); writer.writeAttribute(HTML.NAME_ATTR, AUTO_SCROLL_PARAM, null); writer.endElement(HTML.INPUT_ELEM); } | /**
* Renders the hidden form input that is necessary for the autoscroll feature.
*/ | Renders the hidden form input that is necessary for the autoscroll feature | renderAutoScrollHiddenInput | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/renderkit/html/HtmlJavaScriptUtils.java",
"license": "epl-1.0",
"size": 26012
} | [
"java.io.IOException",
"javax.faces.context.FacesContext",
"javax.faces.context.ResponseWriter"
] | import java.io.IOException; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; | import java.io.*; import javax.faces.context.*; | [
"java.io",
"javax.faces"
] | java.io; javax.faces; | 2,224,362 |
@Override
public final Object lookup(Name name)
throws NamingException {
return lookup(name.toString());
} | final Object function(Name name) throws NamingException { return lookup(name.toString()); } | /**
* Retrieves the named object. If name is empty, returns a new instance
* of this context (which represents the same naming context as this
* context, but its environment may be modified independently and it may
* be accessed concurrently).
*
* @param name the name of the object to ... | Retrieves the named object. If name is empty, returns a new instance of this context (which represents the same naming context as this context, but its environment may be modified independently and it may be accessed concurrently) | lookup | {
"repo_name": "GazeboHub/ghub-portal-doc",
"path": "doc/modelio/GHub Portal/mda/JavaDesigner/res/java/tomcat/java/org/apache/naming/resources/BaseDirContext.java",
"license": "epl-1.0",
"size": 61067
} | [
"javax.naming.Name",
"javax.naming.NamingException"
] | import javax.naming.Name; import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 89,683 |
public void testEquals() {
DefaultCategoryDataset d1 = new DefaultCategoryDataset();
d1.setValue(23.4, "R1", "C1");
DefaultCategoryDataset d2 = new DefaultCategoryDataset();
d2.setValue(23.4, "R1", "C1");
assertTrue(d1.equals(d2));
assertTrue(d2.equals(d1));
... | void function() { DefaultCategoryDataset d1 = new DefaultCategoryDataset(); d1.setValue(23.4, "R1", "C1"); DefaultCategoryDataset d2 = new DefaultCategoryDataset(); d2.setValue(23.4, "R1", "C1"); assertTrue(d1.equals(d2)); assertTrue(d2.equals(d1)); d1.setValue(36.5, "R1", "C2"); assertFalse(d1.equals(d2)); d2.setValue... | /**
* Confirm that the equals method can distinguish all the required fields.
*/ | Confirm that the equals method can distinguish all the required fields | testEquals | {
"repo_name": "integrated/jfreechart",
"path": "tests/org/jfree/data/category/junit/DefaultCategoryDatasetTests.java",
"license": "lgpl-2.1",
"size": 12218
} | [
"org.jfree.data.category.DefaultCategoryDataset"
] | import org.jfree.data.category.DefaultCategoryDataset; | import org.jfree.data.category.*; | [
"org.jfree.data"
] | org.jfree.data; | 1,830,430 |
public void handleEvent(Event evt) {
handleDOMChildNodeRemovedEvent((MutationEvent)evt);
}
}
protected DOMSubtreeModifiedEventListener subtreeModifiedEventListener;
protected class DOMSubtreeModifiedEventListener implements EventListener { | void function(Event evt) { handleDOMChildNodeRemovedEvent((MutationEvent)evt); } } protected DOMSubtreeModifiedEventListener subtreeModifiedEventListener; protected class DOMSubtreeModifiedEventListener implements EventListener { | /**
* Handles 'DOMNodeRemoved' event type.
*/ | Handles 'DOMNodeRemoved' event type | handleEvent | {
"repo_name": "sflyphotobooks/crp-batik",
"path": "sources/org/apache/batik/bridge/SVGTextElementBridge.java",
"license": "apache-2.0",
"size": 114566
} | [
"org.w3c.dom.events.Event",
"org.w3c.dom.events.EventListener",
"org.w3c.dom.events.MutationEvent"
] | import org.w3c.dom.events.Event; import org.w3c.dom.events.EventListener; import org.w3c.dom.events.MutationEvent; | import org.w3c.dom.events.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,201,973 |
public static MozuUrl assignDiscountUrl(String couponSetCode)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/couponsets/{couponSetCode}/assigneddiscounts");
formatter.formatUrl("couponSetCode", couponSetCode);
return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TEN... | static MozuUrl function(String couponSetCode) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, couponSetCode); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } | /**
* Get Resource Url for AssignDiscount
* @param couponSetCode The unique identifier of the coupon set.
* @return String Resource Url
*/ | Get Resource Url for AssignDiscount | assignDiscountUrl | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/couponsets/AssignedDiscountUrl.java",
"license": "mit",
"size": 2036
} | [
"com.mozu.api.MozuUrl",
"com.mozu.api.utils.UrlFormatter"
] | import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; | import com.mozu.api.*; import com.mozu.api.utils.*; | [
"com.mozu.api"
] | com.mozu.api; | 177,838 |
public final boolean weakCompareAndSet(int i, double expect, double update) {
return longs.weakCompareAndSet(i,
doubleToRawLongBits(expect),
doubleToRawLongBits(update));
} | final boolean function(int i, double expect, double update) { return longs.weakCompareAndSet(i, doubleToRawLongBits(expect), doubleToRawLongBits(update)); } | /**
* Atomically sets the element at position {@code i} to the given
* updated value
* if the current value is <a href="#bitEquals">bitwise equal</a>
* to the expected value.
*
* <p>May <a
* href="http://download.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/package-summary.html#Spurious... | Atomically sets the element at position i to the given updated value if the current value is bitwise equal to the expected value. May fail spuriously and does not provide ordering guarantees, so is only rarely an appropriate alternative to compareAndSet | weakCompareAndSet | {
"repo_name": "geekboxzone/lollipop_external_guava",
"path": "guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java",
"license": "apache-2.0",
"size": 8134
} | [
"java.lang.Double"
] | import java.lang.Double; | import java.lang.*; | [
"java.lang"
] | java.lang; | 1,560,997 |
void run() throws BOMException;
| void run() throws BOMException; | /**
* Runs this action.
*
* @throws BOMException
*/ | Runs this action | run | {
"repo_name": "aktion-hip/relations",
"path": "org.elbe.relations/src/org/elbe/relations/db/IAction.java",
"license": "gpl-3.0",
"size": 1433
} | [
"org.elbe.relations.data.bom.BOMException"
] | import org.elbe.relations.data.bom.BOMException; | import org.elbe.relations.data.bom.*; | [
"org.elbe.relations"
] | org.elbe.relations; | 2,501,759 |
public void existsAsync(GetIndexRequest request, RequestOptions options, ActionListener<Boolean> listener) {
restHighLevelClient.performRequestAsync(
request,
IndicesRequestConverters::indicesExist,
options,
RestHighLevelClient::convertExistsRe... | void function(GetIndexRequest request, RequestOptions options, ActionListener<Boolean> listener) { restHighLevelClient.performRequestAsync( request, IndicesRequestConverters::indicesExist, options, RestHighLevelClient::convertExistsResponse, listener, Collections.emptySet() ); } | /**
* Asynchronously checks if the index (indices) exists or not.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
* Indices Exists API on elastic.co</a>
* @param request the request
* @param options the request options (e.g. headers), use {@l... | Asynchronously checks if the index (indices) exists or not. See Indices Exists API on elastic.co | existsAsync | {
"repo_name": "strapdata/elassandra",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesClient.java",
"license": "apache-2.0",
"size": 103949
} | [
"java.util.Collections",
"org.elasticsearch.action.ActionListener",
"org.elasticsearch.client.indices.GetIndexRequest"
] | import java.util.Collections; import org.elasticsearch.action.ActionListener; import org.elasticsearch.client.indices.GetIndexRequest; | import java.util.*; import org.elasticsearch.action.*; import org.elasticsearch.client.indices.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.client"
] | java.util; org.elasticsearch.action; org.elasticsearch.client; | 1,888,950 |
private void addNewSourceFile(String finalFilename, String sourceFilename) throws FileNotFoundException {
File sourceFile = new File(sourceDir, sourceFilename);
addNewSourceFile(finalFilename, sourceFile);
}
| void function(String finalFilename, String sourceFilename) throws FileNotFoundException { File sourceFile = new File(sourceDir, sourceFilename); addNewSourceFile(finalFilename, sourceFile); } | /**
* Logs an addition of a new source file.
*
* @param finalFilename the final file name
* @param sourceFilename the source file name
* @throws FileNotFoundException when the given source file does not exist
*/ | Logs an addition of a new source file | addNewSourceFile | {
"repo_name": "agabrys/minify-maven-plugin",
"path": "src/main/java/com/samaxes/maven/minify/plugin/ProcessFilesTask.java",
"license": "apache-2.0",
"size": 13295
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 1,477,752 |
public static String getXML(final NodeInfo nodeInfo) {
try {
final StringWriter sw = new StringWriter();
final StreamResult sr = new StreamResult(sw);
QueryResult.serialize(nodeInfo, sr, getOutputProperties());
return sw.toString();
} catch (final XPat... | static String function(final NodeInfo nodeInfo) { try { final StringWriter sw = new StringWriter(); final StreamResult sr = new StreamResult(sw); QueryResult.serialize(nodeInfo, sr, getOutputProperties()); return sw.toString(); } catch (final XPathException RuntimeException e) { throw new ProcessException(e.getMessage(... | /**
* Creates an XML string from the event stack captured for the matched
* record.
*/ | Creates an XML string from the event stack captured for the matched record | getXML | {
"repo_name": "gchq/stroom",
"path": "stroom-pipeline/src/main/java/stroom/pipeline/xml/event/EventListUtils.java",
"license": "apache-2.0",
"size": 7452
} | [
"java.io.StringWriter",
"javax.xml.transform.stream.StreamResult",
"net.sf.saxon.om.NodeInfo",
"net.sf.saxon.query.QueryResult",
"net.sf.saxon.trans.XPathException"
] | import java.io.StringWriter; import javax.xml.transform.stream.StreamResult; import net.sf.saxon.om.NodeInfo; import net.sf.saxon.query.QueryResult; import net.sf.saxon.trans.XPathException; | import java.io.*; import javax.xml.transform.stream.*; import net.sf.saxon.om.*; import net.sf.saxon.query.*; import net.sf.saxon.trans.*; | [
"java.io",
"javax.xml",
"net.sf.saxon"
] | java.io; javax.xml; net.sf.saxon; | 384,599 |
public void setContextValves(Collection<? extends Valve> contextValves) {
Assert.notNull(contextValves, "Valves must not be null");
this.contextValves = new ArrayList<Valve>(contextValves);
} | void function(Collection<? extends Valve> contextValves) { Assert.notNull(contextValves, STR); this.contextValves = new ArrayList<Valve>(contextValves); } | /**
* Set {@link Valve}s that should be applied to the Tomcat {@link Context}. Calling
* this method will replace any existing valves.
* @param contextValves the valves to set
*/ | Set <code>Valve</code>s that should be applied to the Tomcat <code>Context</code>. Calling this method will replace any existing valves | setContextValves | {
"repo_name": "jvz/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java",
"license": "apache-2.0",
"size": 30815
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.apache.catalina.Valve",
"org.springframework.util.Assert"
] | import java.util.ArrayList; import java.util.Collection; import org.apache.catalina.Valve; import org.springframework.util.Assert; | import java.util.*; import org.apache.catalina.*; import org.springframework.util.*; | [
"java.util",
"org.apache.catalina",
"org.springframework.util"
] | java.util; org.apache.catalina; org.springframework.util; | 70,023 |
boolean assertConnection() {
try {
if (getDatabaseConnection() == null || getDatabaseConnection().getConnection() == null) {
return error(loc("no-current-connection"));
}
if (getDatabaseConnection().getConnection().isClosed()) {
return error(loc("connection-is-closed"));
}
... | boolean assertConnection() { try { if (getDatabaseConnection() == null getDatabaseConnection().getConnection() == null) { return error(loc(STR)); } if (getDatabaseConnection().getConnection().isClosed()) { return error(loc(STR)); } } catch (SQLException sqle) { return error(loc(STR)); } return true; } | /**
* Assert that we have an active, living connection. Print
* an error message if we do not.
*
* @return true if there is a current, active connection
*/ | Assert that we have an active, living connection. Print an error message if we do not | assertConnection | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "beeline/src/java/org/apache/hive/beeline/BeeLine.java",
"license": "apache-2.0",
"size": 69017
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 343,339 |
public void initMetaData() {
EiColumn eiColumn;
eiColumn = new EiColumn("segNo");
eiColumn.setPrimaryKey(true);
eiColumn.setFieldLength(20);
eiColumn.setDescName("业务单元代码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("sDraftId");
eiColumn.setPrimaryKey(true);
eiColumn.setFieldLen... | void function() { EiColumn eiColumn; eiColumn = new EiColumn("segNo"); eiColumn.setPrimaryKey(true); eiColumn.setFieldLength(20); eiColumn.setDescName(STR); eiMetadata.addMeta(eiColumn); eiColumn = new EiColumn(STR); eiColumn.setPrimaryKey(true); eiColumn.setFieldLength(20); eiColumn.setDescName("销售草约号"); eiMetadata.ad... | /**
* initialize the metadata
*/ | initialize the metadata | initMetaData | {
"repo_name": "stserp/erp1",
"path": "source/src/com/baosight/sts/st/xs/domain/STXS0202.java",
"license": "apache-2.0",
"size": 123037
} | [
"com.baosight.iplat4j.core.ei.EiColumn"
] | import com.baosight.iplat4j.core.ei.EiColumn; | import com.baosight.iplat4j.core.ei.*; | [
"com.baosight.iplat4j"
] | com.baosight.iplat4j; | 841,582 |
private JTextField getTxtUser() {
if (txtUser == null) {
txtUser = new JTextField();
txtUser.setPreferredSize(new java.awt.Dimension(170, 19));
txtUser.setName("txtUser");
}
return txtUser;
} | JTextField function() { if (txtUser == null) { txtUser = new JTextField(); txtUser.setPreferredSize(new java.awt.Dimension(170, 19)); txtUser.setName(STR); } return txtUser; } | /**
* This method initializes txtUser
*
* @return javax.swing.JTextField
*/ | This method initializes txtUser | getTxtUser | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/vectorialdb/ConnectionPanel.java",
"license": "gpl-3.0",
"size": 23674
} | [
"java.awt.Dimension",
"javax.swing.JTextField"
] | import java.awt.Dimension; import javax.swing.JTextField; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 520,716 |
public Index getIndex(int id) {
if (id >= indices.length) {
return null;
}
return indices[id];
} | Index function(int id) { if (id >= indices.length) { return null; } return indices[id]; } | /**
* Get a single index from the cache.
* @param id The id of the index to get.
* @return The index instance.
*/ | Get a single index from the cache | getIndex | {
"repo_name": "Displee/RS2-Cache-Library",
"path": "src/main/java/org/displee/CacheLibrary.java",
"license": "mit",
"size": 11677
} | [
"org.displee.cache.index.Index"
] | import org.displee.cache.index.Index; | import org.displee.cache.index.*; | [
"org.displee.cache"
] | org.displee.cache; | 2,014,499 |
public void clear();
public static class Entry {
public byte[] data;
public String etag;
public long serverDate;
public long lastModified;
public long ttl;
public long softTtl;
publ... | void function(); public static class Entry { public byte[] data; public String etag; public long serverDate; public long lastModified; public long ttl; public long softTtl; public Map<String, String> responseHeaders = Collections.emptyMap(); | /**
* Empties the cache.
*/ | Empties the cache | clear | {
"repo_name": "YoungPeanut/YoungNews",
"path": "youngnews/src/main/java/com/android/volley/Cache.java",
"license": "apache-2.0",
"size": 2932
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,427,310 |
void setDueDate(String taskId, Date dueDate); | void setDueDate(String taskId, Date dueDate); | /**
* Changes the due date of the task
*
* @param taskId
* id of the task, cannot be null.
* @param dueDate
* the new due date for the task
* @throws ActivitiException
* when the task doesn't exist.
*/ | Changes the due date of the task | setDueDate | {
"repo_name": "robsoncardosoti/flowable-engine",
"path": "modules/flowable5-engine/src/main/java/org/activiti/engine/TaskService.java",
"license": "apache-2.0",
"size": 24405
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,779,623 |
public List<MBeanOperationInfo> getOperationList(Environment targetEnv) {
setNeedReset(false);
List<MBeanOperationInfo> operationList =
new ArrayList<MBeanOperationInfo>();
if (targetEnv != null) {
operationList.add(OP_CLEAN_INFO);
... | List<MBeanOperationInfo> function(Environment targetEnv) { setNeedReset(false); List<MBeanOperationInfo> operationList = new ArrayList<MBeanOperationInfo>(); if (targetEnv != null) { operationList.add(OP_CLEAN_INFO); operationList.add(OP_EVICT_INFO); operationList.add(OP_ENV_STAT_INFO); operationList.add(OP_DB_NAMES_IN... | /**
* Get mbean operation metadata for this environment.
*
* @param targetEnv The target JE environment. May be null if the
* environment is not open.
* @return List of MBeanOperationInfo describing available operations.
*/ | Get mbean operation metadata for this environment | getOperationList | {
"repo_name": "prat0318/dbms",
"path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/jmx/JEMBeanHelper.java",
"license": "mit",
"size": 31637
} | [
"com.sleepycat.je.DatabaseException",
"com.sleepycat.je.Environment",
"com.sleepycat.je.EnvironmentConfig",
"java.util.ArrayList",
"java.util.List",
"javax.management.MBeanOperationInfo"
] | import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Environment; import com.sleepycat.je.EnvironmentConfig; import java.util.ArrayList; import java.util.List; import javax.management.MBeanOperationInfo; | import com.sleepycat.je.*; import java.util.*; import javax.management.*; | [
"com.sleepycat.je",
"java.util",
"javax.management"
] | com.sleepycat.je; java.util; javax.management; | 885,170 |
private void readUsedComponent(CommonACAction dbac, VM_Bean vm, boolean isStatFilter, String orderBy)
{
Vector<CommonACBean> vAC = dbac.getAssociated(vmData.getCurationServlet().getConn(), vm.getVM_IDSEQ(), isStatFilter, orderBy);
//set data to vm
dbac.setUsedAttributes(vm, vAC, isStatFilter, null... | void function(CommonACAction dbac, VM_Bean vm, boolean isStatFilter, String orderBy) { Vector<CommonACBean> vAC = dbac.getAssociated(vmData.getCurationServlet().getConn(), vm.getVM_IDSEQ(), isStatFilter, orderBy); dbac.setUsedAttributes(vm, vAC, isStatFilter, null); } | /**
* action to read one used component at a time
* @param dbac CommonACAction object action file common to all ACs
* @param vm VM_Bean name of the vm bean
* @param isStatFilter boolean to check if should the query filter the data by workflow status
* @param orderBy String sort the query at the time of ... | action to read one used component at a time | readUsedComponent | {
"repo_name": "NCIP/cadsr-cdecurate",
"path": "src/gov/nih/nci/cadsr/cdecurate/tool/VMServlet.java",
"license": "bsd-3-clause",
"size": 44641
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,375,746 |
@GET
@ResponseParser(ParseOptionsFromJsonResponse.class)
@Path("/common/lookup/list")
@QueryParams(keys = LOOKUP_LIST_KEY, values = "loadbalancer.datacenter")
Set<Option> getDatacenters(); | @ResponseParser(ParseOptionsFromJsonResponse.class) @Path(STR) @QueryParams(keys = LOOKUP_LIST_KEY, values = STR) Set<Option> getDatacenters(); | /**
* Retrieves the list of supported Datacenters to launch servers into. The objects will have
* datacenter ID, name and description. In most cases, id or name will be used for
* {@link #addLoadBalancer}.
*
* @return supported datacenters
*/ | Retrieves the list of supported Datacenters to launch servers into. The objects will have datacenter ID, name and description. In most cases, id or name will be used for <code>#addLoadBalancer</code> | getDatacenters | {
"repo_name": "yanzhijun/jclouds-aliyun",
"path": "providers/gogrid/src/main/java/org/jclouds/gogrid/features/GridLoadBalancerApi.java",
"license": "apache-2.0",
"size": 7370
} | [
"java.util.Set",
"javax.ws.rs.Path",
"org.jclouds.gogrid.domain.Option",
"org.jclouds.gogrid.functions.ParseOptionsFromJsonResponse",
"org.jclouds.rest.annotations.QueryParams",
"org.jclouds.rest.annotations.ResponseParser"
] | import java.util.Set; import javax.ws.rs.Path; import org.jclouds.gogrid.domain.Option; import org.jclouds.gogrid.functions.ParseOptionsFromJsonResponse; import org.jclouds.rest.annotations.QueryParams; import org.jclouds.rest.annotations.ResponseParser; | import java.util.*; import javax.ws.rs.*; import org.jclouds.gogrid.domain.*; import org.jclouds.gogrid.functions.*; import org.jclouds.rest.annotations.*; | [
"java.util",
"javax.ws",
"org.jclouds.gogrid",
"org.jclouds.rest"
] | java.util; javax.ws; org.jclouds.gogrid; org.jclouds.rest; | 1,222,006 |
@Test
public void test111AssignAccountMorgan() throws Exception {
final String TEST_NAME = "test111AssignAccountMorgan";
TestUtil.displayTestTile(this, TEST_NAME);
// GIVEN
Task task = taskManager.createTaskInstance(ConsistencyTest.class.getName() + "." + TEST_NAME);
Ope... | void function() throws Exception { final String TEST_NAME = STR; TestUtil.displayTestTile(this, TEST_NAME); Task task = taskManager.createTaskInstance(ConsistencyTest.class.getName() + "." + TEST_NAME); OperationResult result = task.getResult(); dummyAuditService.clear(); Entry entry = openDJController.addEntryFromLdif... | /**
* assign account to the user morgan. Account with the same 'uid' (not dn, nut other secondary identifier already exists)
* account should be linked to the user.
* @throws Exception
*/ | assign account to the user morgan. Account with the same 'uid' (not dn, nut other secondary identifier already exists) account should be linked to the user | test111AssignAccountMorgan | {
"repo_name": "gureronder/midpoint",
"path": "testing/consistency-mechanism/src/test/java/com/evolveum/midpoint/testing/consistency/ConsistencyTest.java",
"license": "apache-2.0",
"size": 116472
} | [
"com.evolveum.midpoint.prism.PrismObject",
"com.evolveum.midpoint.prism.PrismReference",
"com.evolveum.midpoint.prism.delta.ObjectDelta",
"com.evolveum.midpoint.prism.path.ItemPath",
"com.evolveum.midpoint.prism.xnode.PrimitiveXNode",
"com.evolveum.midpoint.schema.processor.ResourceAttribute",
"com.evol... | import com.evolveum.midpoint.prism.PrismObject; import com.evolveum.midpoint.prism.PrismReference; import com.evolveum.midpoint.prism.delta.ObjectDelta; import com.evolveum.midpoint.prism.path.ItemPath; import com.evolveum.midpoint.prism.xnode.PrimitiveXNode; import com.evolveum.midpoint.schema.processor.ResourceAttrib... | import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.delta.*; import com.evolveum.midpoint.prism.path.*; import com.evolveum.midpoint.prism.xnode.*; import com.evolveum.midpoint.schema.processor.*; import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.schema.util.*; import com.e... | [
"com.evolveum.midpoint",
"com.evolveum.prism",
"java.util",
"javax.xml",
"org.opends.server",
"org.testng"
] | com.evolveum.midpoint; com.evolveum.prism; java.util; javax.xml; org.opends.server; org.testng; | 1,445,772 |
private static int getColorIndex(List<Color> list, Color item) {
int pos = list.indexOf(item);
if (pos==-1) {
list.add(item);
pos = list.size()-1;
}
return pos;
}
| static int function(List<Color> list, Color item) { int pos = list.indexOf(item); if (pos==-1) { list.add(item); pos = list.size()-1; } return pos; } | /**
* Returns the index of the specified item in a list. If the item
* is not in the list, it is added, and its new index is returned.
*
* @param list The list (possibly) containing the item.
* @param item The item to get the index of.
* @return The index of the item.
*/ | Returns the index of the specified item in a list. If the item is not in the list, it is added, and its new index is returned | getColorIndex | {
"repo_name": "Thecarisma/powertext",
"path": "Power Text/src/com/power/text/ui/pteditor/RtfGenerator.java",
"license": "gpl-3.0",
"size": 13717
} | [
"java.awt.Color",
"java.util.List"
] | import java.awt.Color; import java.util.List; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,750,455 |
protected ReturnedURL autoCreateSub(CSPRequestCredentials creds,
CSPRequestCache cache, JSONObject jsonObject, Document doc, String savePrefix, Record r)
throws JSONException, UnderlyingStorageException,
ConnectionException, ExistException {
ReturnedURL url;
Map<String,Document> parts=new HashMap<String... | ReturnedURL function(CSPRequestCredentials creds, CSPRequestCache cache, JSONObject jsonObject, Document doc, String savePrefix, Record r) throws JSONException, UnderlyingStorageException, ConnectionException, ExistException { ReturnedURL url; Map<String,Document> parts=new HashMap<String,Document>(); Document doc2 = d... | /**
* create sub records so can be connected to their parent record
* e.g. blob/media contact/person
* @param creds
* @param cache
* @param jsonObject
* @param doc
* @param savePrefix
* @param r
* @return
* @throws JSONException
* @throws UnderlyingStorageException
* @throws ConnectionException... | create sub records so can be connected to their parent record e.g. blob/media contact/person | autoCreateSub | {
"repo_name": "cherryhill/collectionspace-application",
"path": "cspi-services/src/main/java/org/collectionspace/chain/csp/persistence/services/GenericStorage.java",
"license": "apache-2.0",
"size": 93300
} | [
"java.util.HashMap",
"java.util.Map",
"org.collectionspace.chain.csp.persistence.services.connection.ConnectionException",
"org.collectionspace.chain.csp.persistence.services.connection.RequestMethod",
"org.collectionspace.chain.csp.persistence.services.connection.ReturnedURL",
"org.collectionspace.chain.... | import java.util.HashMap; import java.util.Map; import org.collectionspace.chain.csp.persistence.services.connection.ConnectionException; import org.collectionspace.chain.csp.persistence.services.connection.RequestMethod; import org.collectionspace.chain.csp.persistence.services.connection.ReturnedURL; import org.colle... | import java.util.*; import org.collectionspace.chain.csp.persistence.services.connection.*; import org.collectionspace.chain.csp.schema.*; import org.collectionspace.csp.api.core.*; import org.collectionspace.csp.api.persistence.*; import org.dom4j.*; import org.json.*; | [
"java.util",
"org.collectionspace.chain",
"org.collectionspace.csp",
"org.dom4j",
"org.json"
] | java.util; org.collectionspace.chain; org.collectionspace.csp; org.dom4j; org.json; | 1,472,962 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.