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
static BigInteger randomPositiveBigInteger(int numBits) { BigInteger result; do { result = randomNonNegativeBigInteger(numBits); } while (result.signum() == 0); return result; }
static BigInteger randomPositiveBigInteger(int numBits) { BigInteger result; do { result = randomNonNegativeBigInteger(numBits); } while (result.signum() == 0); return result; }
/** * Generates values in a distribution equivalent to randomNonNegativeBigInteger but omitting zero. */
Generates values in a distribution equivalent to randomNonNegativeBigInteger but omitting zero
randomPositiveBigInteger
{ "repo_name": "rgoldberg/guava", "path": "guava-tests/test/com/google/common/math/MathBenchmarking.java", "license": "apache-2.0", "size": 4235 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
78,328
private void setSystemOut(final PrintStream out) { AccessController.doPrivileged (new java.security.PrivilegedAction(){
void function(final PrintStream out) { AccessController.doPrivileged (new java.security.PrivilegedAction(){
/** * Need to capture System.out so that we can compare it. * @param out */
Need to capture System.out so that we can compare it
setSystemOut
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/tools/SysinfoCPCheckTest.java", "license": "agpl-3.0", "size": 9583 }
[ "java.io.PrintStream", "java.security.AccessController" ]
import java.io.PrintStream; import java.security.AccessController;
import java.io.*; import java.security.*;
[ "java.io", "java.security" ]
java.io; java.security;
2,151,948
protected synchronized Connection getConnection() throws IOException, TimeoutException { if (this.conn == null || !this.conn.isOpen()) { LOG.debug("The existing connection is closed or not opened yet."); openConnection(); return this.conn; } else { ret...
synchronized Connection function() throws IOException, TimeoutException { if (this.conn == null !this.conn.isOpen()) { LOG.debug(STR); openConnection(); return this.conn; } else { return this.conn; } }
/** * Returns the exiting open connection or opens a new one */
Returns the exiting open connection or opens a new one
getConnection
{ "repo_name": "tadayosi/camel", "path": "components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQConsumer.java", "license": "apache-2.0", "size": 7975 }
[ "com.rabbitmq.client.Connection", "java.io.IOException", "java.util.concurrent.TimeoutException" ]
import com.rabbitmq.client.Connection; import java.io.IOException; import java.util.concurrent.TimeoutException;
import com.rabbitmq.client.*; import java.io.*; import java.util.concurrent.*;
[ "com.rabbitmq.client", "java.io", "java.util" ]
com.rabbitmq.client; java.io; java.util;
1,574,491
public static IntStream of(int... values) { return Arrays.stream(values); } /** * Returns an infinite sequential ordered {@code IntStream} produced by iterative * application of a function {@code f} to an initial element {@code seed}, * producing a {@code Stream} consisting of {@code...
static IntStream function(int... values) { return Arrays.stream(values); } /** * Returns an infinite sequential ordered {@code IntStream} produced by iterative * application of a function {@code f} to an initial element {@code seed}, * producing a {@code Stream} consisting of {@code seed}, {@code f(seed)}, * {@code f(f...
/** * Returns a sequential ordered stream whose elements are the specified values. * * @param values the elements of the new stream * @return the new stream */
Returns a sequential ordered stream whose elements are the specified values
of
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/src/java.base/share/classes/java/util/stream/IntStream.java", "license": "gpl-2.0", "size": 49992 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,191,034
public SubnetInner withServiceEndpoints(List<ServiceEndpointPropertiesFormat> serviceEndpoints) { if (this.innerProperties() == null) { this.innerProperties = new SubnetPropertiesFormatInner(); } this.innerProperties().withServiceEndpoints(serviceEndpoints); return this; ...
SubnetInner function(List<ServiceEndpointPropertiesFormat> serviceEndpoints) { if (this.innerProperties() == null) { this.innerProperties = new SubnetPropertiesFormatInner(); } this.innerProperties().withServiceEndpoints(serviceEndpoints); return this; }
/** * Set the serviceEndpoints property: An array of service endpoints. * * @param serviceEndpoints the serviceEndpoints value to set. * @return the SubnetInner object itself. */
Set the serviceEndpoints property: An array of service endpoints
withServiceEndpoints
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/SubnetInner.java", "license": "mit", "size": 17044 }
[ "com.azure.resourcemanager.network.models.ServiceEndpointPropertiesFormat", "java.util.List" ]
import com.azure.resourcemanager.network.models.ServiceEndpointPropertiesFormat; import java.util.List;
import com.azure.resourcemanager.network.models.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
2,665,986
public void setProperties(Map<String, Object> properties) { if (this.getTask() != null) this.getTask().setProperties(properties); }
void function(Map<String, Object> properties) { if (this.getTask() != null) this.getTask().setProperties(properties); }
/** * Set the properties. * @param properties The properties to set. */
Set the properties
setProperties
{ "repo_name": "jbundle/jbundle", "path": "base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java", "license": "gpl-3.0", "size": 67866 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,672,706
public static IsLiveLiveChannelBuilder isLive(String id) { return new IsLiveLiveChannelBuilder(id); } public static class ListLiveChannelBuilder extends ListResponseRequestBuilder<LiveChannel, LiveChannel.Tokenizer, ListLiveChannelBuilder> { public ListLiveChannelBuilder(LiveChannelFilter filter, Filt...
static IsLiveLiveChannelBuilder function(String id) { return new IsLiveLiveChannelBuilder(id); } public static class ListLiveChannelBuilder extends ListResponseRequestBuilder<LiveChannel, LiveChannel.Tokenizer, ListLiveChannelBuilder> { public ListLiveChannelBuilder(LiveChannelFilter filter, FilterPager pager) { super(...
/** * Delivering the status of a live channel (on-air/offline) * * @param id ID of the live channel */
Delivering the status of a live channel (on-air/offline)
isLive
{ "repo_name": "kaltura/KalturaGeneratedAPIClientsJava", "path": "src/main/java/com/kaltura/client/services/LiveChannelService.java", "license": "agpl-3.0", "size": 18464 }
[ "com.kaltura.client.types.FilterPager", "com.kaltura.client.types.LiveChannel", "com.kaltura.client.types.LiveChannelFilter", "com.kaltura.client.utils.request.ListResponseRequestBuilder" ]
import com.kaltura.client.types.FilterPager; import com.kaltura.client.types.LiveChannel; import com.kaltura.client.types.LiveChannelFilter; import com.kaltura.client.utils.request.ListResponseRequestBuilder;
import com.kaltura.client.types.*; import com.kaltura.client.utils.request.*;
[ "com.kaltura.client" ]
com.kaltura.client;
1,241,484
public final int count() { // if the vector has been modified if (count == -1) { int c = 0; int end = bits.length; for (int i = 0; i < end; i++) { c += BitUtil.bitCount(bits[i]); // sum bits per byte } count = c; } assert count <= size: "count=" + count + " size=...
final int function() { if (count == -1) { int c = 0; int end = bits.length; for (int i = 0; i < end; i++) { c += BitUtil.bitCount(bits[i]); } count = c; } assert count <= size: STR + count + STR + size; return count; }
/** Returns the total number of one bits in this vector. This is efficiently computed and cached, so that, if the vector is not changed, no recomputation is done for repeated calls. */
Returns the total number of one bits in this vector. This is efficiently
count
{ "repo_name": "smartan/lucene", "path": "src/main/java/org/apache/lucene/codecs/lucene40/BitVector.java", "license": "apache-2.0", "size": 12611 }
[ "org.apache.lucene.util.BitUtil" ]
import org.apache.lucene.util.BitUtil;
import org.apache.lucene.util.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,350,810
private Method getMappedMethod(Class<? extends Exception> exceptionType) { List<Class<? extends Throwable>> matches = new ArrayList<Class<? extends Throwable>>(); for (Class<? extends Throwable> mappedException : this.mappedMethods.keySet()) { if (mappedException.isAssignableFrom(exceptionType)) { matches...
Method function(Class<? extends Exception> exceptionType) { List<Class<? extends Throwable>> matches = new ArrayList<Class<? extends Throwable>>(); for (Class<? extends Throwable> mappedException : this.mappedMethods.keySet()) { if (mappedException.isAssignableFrom(exceptionType)) { matches.add(mappedException); } } if...
/** * Return the {@link Method} mapped to the given exception type, or {@code null} if none. */
Return the <code>Method</code> mapped to the given exception type, or null if none
getMappedMethod
{ "repo_name": "kingtang/spring-learn", "path": "spring-web/src/main/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolver.java", "license": "gpl-3.0", "size": 6021 }
[ "java.lang.reflect.Method", "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.springframework.core.ExceptionDepthComparator" ]
import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.springframework.core.ExceptionDepthComparator;
import java.lang.reflect.*; import java.util.*; import org.springframework.core.*;
[ "java.lang", "java.util", "org.springframework.core" ]
java.lang; java.util; org.springframework.core;
2,450,742
@ServiceMethod(returns = ReturnType.SINGLE) public Response<VirtualMachineExtensionImageInner> getWithResponse( String location, String publisherName, String type, String version, Context context) { return getWithResponseAsync(location, publisherName, type, version, context).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) Response<VirtualMachineExtensionImageInner> function( String location, String publisherName, String type, String version, Context context) { return getWithResponseAsync(location, publisherName, type, version, context).block(); }
/** * Gets a virtual machine extension image. * * @param location The name of a supported Azure region. * @param publisherName The publisherName parameter. * @param type The type parameter. * @param version The version parameter. * @param context The context to associate with this ope...
Gets a virtual machine extension image
getWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/VirtualMachineExtensionImagesClientImpl.java", "license": "mit", "size": 31356 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionImageInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineExtensionImageInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
726,383
public MatchedLine [] grep (File [] files) { List aggregate = new LinkedList(); for (int i = 0; i < files.length; i++) { try { List temp = grepList (files [i]); aggregate.addAll (temp); } catch (IOException e) { // ignore I/O exceptions } } MatchedLine matches [] = new MatchedLine [a...
MatchedLine [] function (File [] files) { List aggregate = new LinkedList(); for (int i = 0; i < files.length; i++) { try { List temp = grepList (files [i]); aggregate.addAll (temp); } catch (IOException e) { } } MatchedLine matches [] = new MatchedLine [aggregate.size()]; aggregate.toArray (matches); return (matches);...
/** * Perform a grep on the given list of files. If a given file cannot * be read, it will be ignored as if empty. * @param files An array of File objects to scan. * @return A type-safe array of Grep.MatchedLine objects describing * the lines of the file matched by the pattern. */
Perform a grep on the given list of files. If a given file cannot be read, it will be ignored as if empty
grep
{ "repo_name": "jt120/nio", "path": "src/com/ronsoft/books/nio/regex/Grep.java", "license": "apache-2.0", "size": 8804 }
[ "java.io.File", "java.io.IOException", "java.util.LinkedList", "java.util.List" ]
import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
29,069
@Override public void info(final Marker marker, final String message, final Object... params) { if (isEnabled(Level.INFO, marker, message, params)) { final Message msg = messageFactory.newMessage(message, params); log(marker, FQCN, Level.INFO, msg, msg.getThrowable()); } ...
void function(final Marker marker, final String message, final Object... params) { if (isEnabled(Level.INFO, marker, message, params)) { final Message msg = messageFactory.newMessage(message, params); log(marker, FQCN, Level.INFO, msg, msg.getThrowable()); } }
/** * Logs a message with parameters at the {@link Level#INFO INFO} level. * * @param marker the marker data specific to this log statement. * @param message the message to log. * @param params parameters to the message. */
Logs a message with parameters at the <code>Level#INFO INFO</code> level
info
{ "repo_name": "OuZhencong/log4j2", "path": "log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java", "license": "apache-2.0", "size": 66623 }
[ "org.apache.logging.log4j.Level", "org.apache.logging.log4j.Marker", "org.apache.logging.log4j.message.Message" ]
import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.*; import org.apache.logging.log4j.message.*;
[ "org.apache.logging" ]
org.apache.logging;
2,038,995
public void buildContainersHashTableAndHelper() throws SchemaChangeException { if (isSpilled) { return; } // no building for spilled partitions containers = new ArrayList<>(); hashTable.updateInitialCapacity((int) getNumInMemoryRecords()); for (int curr = 0; curr < partitionBatchesCount; curr++) { ...
void function() throws SchemaChangeException { if (isSpilled) { return; } containers = new ArrayList<>(); hashTable.updateInitialCapacity((int) getNumInMemoryRecords()); for (int curr = 0; curr < partitionBatchesCount; curr++) { VectorContainer nextBatch = tmpBatchesList.get(curr); final int currentRecordCount = nextBa...
/** * Creates the hash table and join helper for this partition. * This method should only be called after all the build side records * have been consumed. */
Creates the hash table and join helper for this partition. This method should only be called after all the build side records have been consumed
buildContainersHashTableAndHelper
{ "repo_name": "apache/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/common/HashPartition.java", "license": "apache-2.0", "size": 22510 }
[ "java.util.ArrayList", "org.apache.drill.common.exceptions.RetryAfterSpillException", "org.apache.drill.exec.exception.OutOfMemoryException", "org.apache.drill.exec.exception.SchemaChangeException", "org.apache.drill.exec.record.VectorContainer", "org.apache.drill.exec.vector.IntVector" ]
import java.util.ArrayList; import org.apache.drill.common.exceptions.RetryAfterSpillException; import org.apache.drill.exec.exception.OutOfMemoryException; import org.apache.drill.exec.exception.SchemaChangeException; import org.apache.drill.exec.record.VectorContainer; import org.apache.drill.exec.vector.IntVector;
import java.util.*; import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.exception.*; import org.apache.drill.exec.record.*; import org.apache.drill.exec.vector.*;
[ "java.util", "org.apache.drill" ]
java.util; org.apache.drill;
2,510,419
public String serialize() { String serialized = id + "," + this.ami.projectID + "," + this.ami.projectHomepage + "," + this.ami.buggyFile + "," + this.ami.repairedFile + "," + this.ami.buggyCommitID + "," + this.ami.repairedCommitID + "," + this.functionName; for(KeywordUse keyword : this.keywordMa...
String function() { String serialized = id + "," + this.ami.projectID + "," + this.ami.projectHomepage + "," + this.ami.buggyFile + "," + this.ami.repairedFile + "," + this.ami.buggyCommitID + "," + this.ami.repairedCommitID + "," + this.functionName; for(KeywordUse keyword : this.keywordMap.keySet()) { Integer uses = ...
/** * This method serializes the feature vector. This is useful when writing * a data set to the disk. * @return The serialized version of the feature vector. */
This method serializes the feature vector. This is useful when writing a data set to the disk
serialize
{ "repo_name": "qhanam/Pangor", "path": "js-learning/src/ca/ubc/ece/salt/pangor/analysis/learning/FeatureVector.java", "license": "apache-2.0", "size": 7114 }
[ "ca.ubc.ece.salt.pangor.learning.apis.KeywordUse" ]
import ca.ubc.ece.salt.pangor.learning.apis.KeywordUse;
import ca.ubc.ece.salt.pangor.learning.apis.*;
[ "ca.ubc.ece" ]
ca.ubc.ece;
2,528,466
public boolean updateModelData() { boolean result = false; try { SAXBuilder builder = new SAXBuilder(); File xmlFile = new File(this.getModelsFilePath()); org.jdom2.Document doc = (org.jdom2.Document) builder .build(xmlFile); Element rootNode = doc.getRootElement(); Iterator model = r...
boolean function() { boolean result = false; try { SAXBuilder builder = new SAXBuilder(); File xmlFile = new File(this.getModelsFilePath()); org.jdom2.Document doc = (org.jdom2.Document) builder .build(xmlFile); Element rootNode = doc.getRootElement(); Iterator model = rootNode.getChildren().iterator(); while (model.ha...
/** * Updates the model data in the model list file. * @return TRUE if the update was successful, FALSE otherwise. */
Updates the model data in the model list file
updateModelData
{ "repo_name": "omazhary/opitz", "path": "step-trace/src/entities/CADModel.java", "license": "gpl-2.0", "size": 12795 }
[ "java.io.File", "java.io.FileWriter", "java.io.IOException", "java.util.Iterator", "org.jdom2.Element", "org.jdom2.JDOMException", "org.jdom2.input.SAXBuilder", "org.jdom2.output.XMLOutputter", "org.w3c.dom.Document" ]
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Iterator; import org.jdom2.Element; import org.jdom2.JDOMException; import org.jdom2.input.SAXBuilder; import org.jdom2.output.XMLOutputter; import org.w3c.dom.Document;
import java.io.*; import java.util.*; import org.jdom2.*; import org.jdom2.input.*; import org.jdom2.output.*; import org.w3c.dom.*;
[ "java.io", "java.util", "org.jdom2", "org.jdom2.input", "org.jdom2.output", "org.w3c.dom" ]
java.io; java.util; org.jdom2; org.jdom2.input; org.jdom2.output; org.w3c.dom;
347,805
public void writePlist(Path plistPath) throws IOException { try (OutputStream out = Files.newOutputStream(plistPath)) { BinaryPropertyListWriter.write(out, merged); } }
void function(Path plistPath) throws IOException { try (OutputStream out = Files.newOutputStream(plistPath)) { BinaryPropertyListWriter.write(out, merged); } }
/** * Writes the results of a merge operation to a plist file. * @param plistPath the path of the plist to write in binary format */
Writes the results of a merge operation to a plist file
writePlist
{ "repo_name": "kamalmarhubi/bazel", "path": "src/objc_tools/plmerge/java/com/google/devtools/build/xcode/plmerge/PlistMerging.java", "license": "apache-2.0", "size": 13331 }
[ "com.dd.plist.BinaryPropertyListWriter", "java.io.IOException", "java.io.OutputStream", "java.nio.file.Files", "java.nio.file.Path" ]
import com.dd.plist.BinaryPropertyListWriter; import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path;
import com.dd.plist.*; import java.io.*; import java.nio.file.*;
[ "com.dd.plist", "java.io", "java.nio" ]
com.dd.plist; java.io; java.nio;
266,538
public NotifyInfo getMessageInfo(String name) throws Exception;
NotifyInfo function(String name) throws Exception;
/** * Gets information of a message. * * @param name Key to get the message. * @return Information which contains message and email addresses. * @throws Exception * @LevelAPI Platform */
Gets information of a message
getMessageInfo
{ "repo_name": "exoplatform/answers", "path": "service/src/main/java/org/exoplatform/faq/service/FAQService.java", "license": "lgpl-3.0", "size": 36675 }
[ "org.exoplatform.forum.common.NotifyInfo" ]
import org.exoplatform.forum.common.NotifyInfo;
import org.exoplatform.forum.common.*;
[ "org.exoplatform.forum" ]
org.exoplatform.forum;
1,007,669
private void addPersonToGroup(IPerson person, IGroupMember me, IEntityGroup eg) { if (log.isTraceEnabled()) { log.trace("Adding " + person + " to group " + eg); } try { if (eg.isEditable()) { eg.addChild(me); eg.updateMembers(); ...
void function(IPerson person, IGroupMember me, IEntityGroup eg) { if (log.isTraceEnabled()) { log.trace(STR + person + STR + eg); } try { if (eg.isEditable()) { eg.addChild(me); eg.updateMembers(); } } catch (Exception e) { log.error(STR + person + STR + eg, e); } }
/** * Add a person to a group. This method catches and logs exceptions encountered * performing the removal. * @param person person to be added (used for logging) * @param me member representing the person * @param eg group to which the user should be added */
Add a person to a group. This method catches and logs exceptions encountered performing the removal
addPersonToGroup
{ "repo_name": "apetro/uPortal", "path": "uportal-war/src/main/java/org/apereo/portal/RDBMUserIdentityStore.java", "license": "apache-2.0", "size": 39607 }
[ "org.apereo.portal.groups.IEntityGroup", "org.apereo.portal.groups.IGroupMember", "org.apereo.portal.security.IPerson" ]
import org.apereo.portal.groups.IEntityGroup; import org.apereo.portal.groups.IGroupMember; import org.apereo.portal.security.IPerson;
import org.apereo.portal.groups.*; import org.apereo.portal.security.*;
[ "org.apereo.portal" ]
org.apereo.portal;
503,070
private SolrQuery getDeviceControllerFacet() { final SolrQuery query = new SolrQuery(); query.setQuery("Connector : [ { RatedOutputCurrent : xsd:long([32 TO *]) } ]"); query.addFacetField("DeviceController_facet"); return query; }
SolrQuery function() { final SolrQuery query = new SolrQuery(); query.setQuery(STR); query.addFacetField(STR); return query; }
/** * A query that shows how to combine SIREn query with the Solr's facet feature * on a Solr field. */
A query that shows how to combine SIREn query with the Solr's facet feature on a Solr field
getDeviceControllerFacet
{ "repo_name": "rdelbru/SIREn", "path": "siren-demo/src/main/java/org/sindice/siren/demo/ncpr/NCPRQuery.java", "license": "apache-2.0", "size": 6329 }
[ "org.apache.solr.client.solrj.SolrQuery" ]
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.*;
[ "org.apache.solr" ]
org.apache.solr;
464,727
public List<Skeleton> getSkeletons() { return skeletons; }
List<Skeleton> function() { return skeletons; }
/** * Returns the list of skeletons */
Returns the list of skeletons
getSkeletons
{ "repo_name": "ArticulatedSocialAgentsPlatform/HmiCore", "path": "HmiGraphics/src/hmi/graphics/collada/InstanceController.java", "license": "lgpl-3.0", "size": 5292 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,837,192
private void initHistory() { try { new SwingWorker<Void, Void>() {
void function() { try { new SwingWorker<Void, Void>() {
/** * DOCUMENT ME! */
DOCUMENT ME
initHistory
{ "repo_name": "cismet/lagis-client", "path": "src/main/java/de/cismet/lagis/report/printing/ReportPrintingWidget.java", "license": "gpl-3.0", "size": 39970 }
[ "javax.swing.SwingWorker" ]
import javax.swing.SwingWorker;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
833,473
public static EvictionAttributes createLRUHeapAttributes(final ObjectSizer sizer, final EvictionAction evictionAction) { return new EvictionAttributesImpl() .setAlgorithm(EvictionAlgorithm.LRU_HEAP) .setAction(evictionAction) .setObjectSizer(sizer); } /** * Creates and returns {@linkplai...
static EvictionAttributes function(final ObjectSizer sizer, final EvictionAction evictionAction) { return new EvictionAttributesImpl() .setAlgorithm(EvictionAlgorithm.LRU_HEAP) .setAction(evictionAction) .setObjectSizer(sizer); } /** * Creates and returns {@linkplain EvictionAlgorithm#LRU_MEMORY memory LRU} eviction at...
/** * Creates and returns {@linkplain EvictionAlgorithm#LRU_HEAP heap LRU} eviction attributes * with the given <code>evictionAction</code> * and given <code>sizer</code>. * * @param sizer the sizer implementation used to determine the size of each entry in this region * @param evictionAction the way ...
Creates and returns EvictionAlgorithm#LRU_HEAP heap LRU eviction attributes with the given <code>evictionAction</code> and given <code>sizer</code>
createLRUHeapAttributes
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/EvictionAttributes.java", "license": "apache-2.0", "size": 24412 }
[ "com.gemstone.gemfire.cache.util.ObjectSizer", "com.gemstone.gemfire.internal.cache.EvictionAttributesImpl" ]
import com.gemstone.gemfire.cache.util.ObjectSizer; import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
import com.gemstone.gemfire.cache.util.*; import com.gemstone.gemfire.internal.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
929,736
private void checkPermissionsAndSendLogs() { if (PermissionUtils.hasPermission(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE)) { commonsLogSender.send(getActivity(), null); } else { requestExternalStoragePermissions(); } }
void function() { if (PermissionUtils.hasPermission(getActivity(), Manifest.permission.WRITE_EXTERNAL_STORAGE)) { commonsLogSender.send(getActivity(), null); } else { requestExternalStoragePermissions(); } }
/** * First checks for external storage permissions and then sends logs via email */
First checks for external storage permissions and then sends logs via email
checkPermissionsAndSendLogs
{ "repo_name": "misaochan/apps-android-commons", "path": "app/src/main/java/fr/free/nrw/commons/settings/SettingsFragment.java", "license": "apache-2.0", "size": 8417 }
[ "fr.free.nrw.commons.utils.PermissionUtils" ]
import fr.free.nrw.commons.utils.PermissionUtils;
import fr.free.nrw.commons.utils.*;
[ "fr.free.nrw" ]
fr.free.nrw;
813,182
public void setWorkflowService(WorkflowService workflowService) { this.workflowService = workflowService; }
void function(WorkflowService workflowService) { this.workflowService = workflowService; }
/** * Sets the workflow service to use * * @param workflowService WorkflowService instance */
Sets the workflow service to use
setWorkflowService
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/web-client/source/java/org/alfresco/web/bean/workflow/StartWorkflowWizard.java", "license": "lgpl-3.0", "size": 28692 }
[ "org.alfresco.service.cmr.workflow.WorkflowService" ]
import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.cmr.workflow.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,301,796
public void setEncoding(Charset value) { _encoding = value; }
void function(Charset value) { _encoding = value; }
/** the character set for encoding * * @param value the Charset */
the character set for encoding
setEncoding
{ "repo_name": "pdalbora/gosu-lang", "path": "gosu-xml/src/main/java/gw/xml/XmlSerializationOptions.java", "license": "apache-2.0", "size": 8305 }
[ "java.nio.charset.Charset" ]
import java.nio.charset.Charset;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,769,667
public EmployeeStatutorySickLeave entitlementFailureReasons( List<EntitlementFailureReasonsEnum> entitlementFailureReasons) { this.entitlementFailureReasons = entitlementFailureReasons; return this; }
EmployeeStatutorySickLeave function( List<EntitlementFailureReasonsEnum> entitlementFailureReasons) { this.entitlementFailureReasons = entitlementFailureReasons; return this; }
/** * If the leave requested was considered \&quot;not entitled\&quot;, the reasons why are listed * here. * * @param entitlementFailureReasons List&lt;&gt; * @return EmployeeStatutorySickLeave */
If the leave requested was considered \&quot;not entitled\&quot;, the reasons why are listed here
entitlementFailureReasons
{ "repo_name": "XeroAPI/Xero-Java", "path": "src/main/java/com/xero/models/payrollnz/EmployeeStatutorySickLeave.java", "license": "mit", "size": 25057 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,866,720
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>GET</code> method. * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "Esleelkartea/Gestion-de-clubes-FEDERACION-VIZCAINA-GOLF", "path": "src/java/com/Visita/visitaServlet.java", "license": "gpl-2.0", "size": 3900 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
991,848
CorrelationCase getCase(Case autopsyCase) throws CentralRepoException;
CorrelationCase getCase(Case autopsyCase) throws CentralRepoException;
/** * Retrieves Central Repo case based on an Autopsy Case * * @param autopsyCase Autopsy case to find corresponding CR case for * * @return CR Case * * @throws CentralRepoException */
Retrieves Central Repo case based on an Autopsy Case
getCase
{ "repo_name": "sleuthkit/autopsy", "path": "Core/src/org/sleuthkit/autopsy/centralrepository/datamodel/CentralRepository.java", "license": "apache-2.0", "size": 34677 }
[ "org.sleuthkit.autopsy.casemodule.Case" ]
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.*;
[ "org.sleuthkit.autopsy" ]
org.sleuthkit.autopsy;
891,968
public Map<String,Severity> getSeveritiesMap() { return Collections.unmodifiableMap(severitiesMap); }
Map<String,Severity> function() { return Collections.unmodifiableMap(severitiesMap); }
/** * Gets the java.util.Map with key = severity label and value the Severity * corresponding to the label * * @throws IOException if any. * @throws FileNotFoundException if any. * @return a {@link java.util.Map} object. */
Gets the java.util.Map with key = severity label and value the Severity corresponding to the label
getSeveritiesMap
{ "repo_name": "rfdrake/opennms", "path": "opennms-dao/src/main/java/org/opennms/web/map/config/MapPropertiesFactory.java", "license": "gpl-2.0", "size": 43340 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,276,697
public Properties getProperties() { return additional; }
Properties function() { return additional; }
/** * Returns the additional properties. * * @return Your properties. Or a blank Properties if none specified in the Constructor. */
Returns the additional properties
getProperties
{ "repo_name": "robocup-atan/atan", "path": "src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java", "license": "mit", "size": 7711 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,764,241
public String reformat(final String input) throws ParseException { return format(parseObject(input)); }
String function(final String input) throws ParseException { return format(parseObject(input)); }
/** * Parses and then reformats a String. * * @param input String to reformat * @return A reformatted String * @throws ParseException thrown by parseObject(String) call */
Parses and then reformats a String
reformat
{ "repo_name": "apache/commons-text", "path": "src/main/java/org/apache/commons/text/CompositeFormat.java", "license": "apache-2.0", "size": 3643 }
[ "java.text.ParseException" ]
import java.text.ParseException;
import java.text.*;
[ "java.text" ]
java.text;
1,106,828
@Override public String getHashCode(final String message) throws Exception { MessageDigest md = null; try { md = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw e; } md.update(message.getBytes()); byte bytes[] = md.digest(); StringBuffer sb = new StringBuffer();...
String function(final String message) throws Exception { MessageDigest md = null; try { md = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw e; } md.update(message.getBytes()); byte bytes[] = md.digest(); StringBuffer sb = new StringBuffer(); for (byte b : bytes) { sb.append(String.format...
/** * Generates MD5 hash key for the given message. * * @param message * Message for which hash key needs to be generated * @return MD5 hash key * @throws Exception */
Generates MD5 hash key for the given message
getHashCode
{ "repo_name": "iiitd-ucla-pc3/SensorActVPDS-2.0", "path": "app/edu/pc3/sensoract/vpds/profile/mongo/UserProfileImpl.java", "license": "bsd-3-clause", "size": 11796 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.security.*;
[ "java.security" ]
java.security;
2,908,791
public static float getFloatFromPreference(Context context, String key) { SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); return pref.getFloat(key, Float.MIN_VALUE); }
static float function(Context context, String key) { SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); return pref.getFloat(key, Float.MIN_VALUE); }
/** * Retrieves a float value from preference manager. If no such key exists, it will return * <code>Float.MIN_VALUE</code>. * * @param context * @param key * @return */
Retrieves a float value from preference manager. If no such key exists, it will return <code>Float.MIN_VALUE</code>
getFloatFromPreference
{ "repo_name": "guiguito/SlidesCast", "path": "CastCompanionLibrary-android-master/src/com/google/sample/castcompanionlibrary/utils/Utils.java", "license": "apache-2.0", "size": 14137 }
[ "android.content.Context", "android.content.SharedPreferences", "android.preference.PreferenceManager" ]
import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager;
import android.content.*; import android.preference.*;
[ "android.content", "android.preference" ]
android.content; android.preference;
2,734,273
public Set<FieldSet> getUniqueFields() { return this.uniqueFields; }
Set<FieldSet> function() { return this.uniqueFields; }
/** * Gets the fields whose combination is unique within the data set. * * @return The unique field combination, or <code>null</code> if nothing is unique. */
Gets the fields whose combination is unique within the data set
getUniqueFields
{ "repo_name": "hequn8128/flink", "path": "flink-optimizer/src/main/java/org/apache/flink/optimizer/dataproperties/LocalProperties.java", "license": "apache-2.0", "size": 10528 }
[ "java.util.Set", "org.apache.flink.api.common.operators.util.FieldSet" ]
import java.util.Set; import org.apache.flink.api.common.operators.util.FieldSet;
import java.util.*; import org.apache.flink.api.common.operators.util.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
2,561,146
void assign(byte[] regionName) throws IOException;
void assign(byte[] regionName) throws IOException;
/** * Assign a Region. * @param regionName Region name to assign. * @throws IOException if a remote or network exception occurs */
Assign a Region
assign
{ "repo_name": "ChinmaySKulkarni/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 101053 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,553,308
Activity a = getActivity(); if (a != null) { Intent i = new Intent(a, NBSyncService.class); a.startService(i); } }
Activity a = getActivity(); if (a != null) { Intent i = new Intent(a, NBSyncService.class); a.startService(i); } }
/** * Pokes the sync service to perform any pending sync actions. */
Pokes the sync service to perform any pending sync actions
triggerSync
{ "repo_name": "mihaip/NewsBlur", "path": "clients/android/NewsBlur/src/com/newsblur/fragment/NbFragment.java", "license": "mit", "size": 495 }
[ "android.app.Activity", "android.content.Intent", "com.newsblur.service.NBSyncService" ]
import android.app.Activity; import android.content.Intent; import com.newsblur.service.NBSyncService;
import android.app.*; import android.content.*; import com.newsblur.service.*;
[ "android.app", "android.content", "com.newsblur.service" ]
android.app; android.content; com.newsblur.service;
2,305,331
public void setOutlinePaint(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.outlinePaint = paint; notifyListeners(new DialLayerChangeEvent(this)); }
void function(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.outlinePaint = paint; notifyListeners(new DialLayerChangeEvent(this)); }
/** * Sets the outline paint and sends a {@link DialLayerChangeEvent} to all * registered listeners. * * @param paint the paint (<code>null</code> not permitted). * * @see #getOutlinePaint() */
Sets the outline paint and sends a <code>DialLayerChangeEvent</code> to all registered listeners
setOutlinePaint
{ "repo_name": "aaronc/jfreechart", "path": "source/org/jfree/chart/plot/dial/DialValueIndicator.java", "license": "lgpl-2.1", "size": 22922 }
[ "java.awt.Paint", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Paint; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
686,676
private BigDecimal getEmrClusterTotalCost(EmrClusterPriceDto emrClusterPrice) { BigDecimal totalPrice = BigDecimal.ZERO; BigDecimal masterPrice = getTotalCost(emrClusterPrice.getMasterPrice()); totalPrice = totalPrice.add(masterPrice); BigDecimal corePrice = getTotalCost(emrClu...
BigDecimal function(EmrClusterPriceDto emrClusterPrice) { BigDecimal totalPrice = BigDecimal.ZERO; BigDecimal masterPrice = getTotalCost(emrClusterPrice.getMasterPrice()); totalPrice = totalPrice.add(masterPrice); BigDecimal corePrice = getTotalCost(emrClusterPrice.getCorePrice()); totalPrice = totalPrice.add(corePrice...
/** * Gets the total cost of the given pricing. The total cost is the sum of master, core, and task prices - each multiplied by their instance count. Task * price is optional and will be ignored if not specified. * * @param emrClusterPrice The pricing information * * @return The total cost...
Gets the total cost of the given pricing. The total cost is the sum of master, core, and task prices - each multiplied by their instance count. Task price is optional and will be ignored if not specified
getEmrClusterTotalCost
{ "repo_name": "seoj/herd", "path": "herd-code/herd-dao/src/main/java/org/finra/herd/dao/helper/EmrPricingHelper.java", "license": "apache-2.0", "size": 27356 }
[ "java.math.BigDecimal", "org.finra.herd.model.dto.EmrClusterPriceDto" ]
import java.math.BigDecimal; import org.finra.herd.model.dto.EmrClusterPriceDto;
import java.math.*; import org.finra.herd.model.dto.*;
[ "java.math", "org.finra.herd" ]
java.math; org.finra.herd;
1,976,905
OWLClassExpression getExpression();
OWLClassExpression getExpression();
/** * Gets the OWL 2 class expression at this search tree node. * @return The expression at this node. */
Gets the OWL 2 class expression at this search tree node
getExpression
{ "repo_name": "AKSW/DL-Learner", "path": "components-core/src/main/java/org/dllearner/utilities/datastructures/SearchTreeNode.java", "license": "gpl-3.0", "size": 1306 }
[ "org.semanticweb.owlapi.model.OWLClassExpression" ]
import org.semanticweb.owlapi.model.OWLClassExpression;
import org.semanticweb.owlapi.model.*;
[ "org.semanticweb.owlapi" ]
org.semanticweb.owlapi;
1,509,108
public void setUpdatedDate(final Date updatedDate) { this.updatedDate = updatedDate; }
void function(final Date updatedDate) { this.updatedDate = updatedDate; }
/** * The date the controller was last updated. */
The date the controller was last updated
setUpdatedDate
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/build/webapi/BuildController.java", "license": "mit", "size": 3294 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,112,804
inputManager.addMapping(mappingName, new JoyButtonTrigger(parent.getJoyId(), buttonIndex)); }
inputManager.addMapping(mappingName, new JoyButtonTrigger(parent.getJoyId(), buttonIndex)); }
/** * Assign the mapping name to receive events from the given button index * on the joystick. * * @param mappingName The mapping to receive joystick button events. */
Assign the mapping name to receive events from the given button index on the joystick
assignButton
{ "repo_name": "PlanetWaves/clockworkengine", "path": "branches/3.0/engine/src/core/com/clockwork/input/DefaultJoystickButton.java", "license": "apache-2.0", "size": 2139 }
[ "com.clockwork.input.controls.JoyButtonTrigger" ]
import com.clockwork.input.controls.JoyButtonTrigger;
import com.clockwork.input.controls.*;
[ "com.clockwork.input" ]
com.clockwork.input;
908,737
private Component instantiateClass(String qualifiedClassName) { ComponentFactory factory = Design.getComponentFactory(); Component component = factory.createComponent(qualifiedClassName, this); if (component == null) { throw new DesignException("Got unexpected null component fro...
Component function(String qualifiedClassName) { ComponentFactory factory = Design.getComponentFactory(); Component component = factory.createComponent(qualifiedClassName, this); if (component == null) { throw new DesignException(STR + factory.getClass().getName() + STR + qualifiedClassName); } return component; }
/** * Instantiates given class via ComponentFactory. * * @param qualifiedClassName * class name to instantiate * @return instance of a given class */
Instantiates given class via ComponentFactory
instantiateClass
{ "repo_name": "Darsstar/framework", "path": "server/src/main/java/com/vaadin/ui/declarative/DesignContext.java", "license": "apache-2.0", "size": 32696 }
[ "com.vaadin.ui.Component", "com.vaadin.ui.declarative.Design" ]
import com.vaadin.ui.Component; import com.vaadin.ui.declarative.Design;
import com.vaadin.ui.*; import com.vaadin.ui.declarative.*;
[ "com.vaadin.ui" ]
com.vaadin.ui;
1,898,113
public Map.Entry<E, E> cloneMapEntry(final Map.Entry<E, E> entry) { final HashMap<E, E> map = new HashMap<>(); map.put(entry.getKey(), entry.getValue()); return map.entrySet().iterator().next(); }
Map.Entry<E, E> function(final Map.Entry<E, E> entry) { final HashMap<E, E> map = new HashMap<>(); map.put(entry.getKey(), entry.getValue()); return map.entrySet().iterator().next(); }
/** * Creates a new Map Entry that is independent of the first and the map. */
Creates a new Map Entry that is independent of the first and the map
cloneMapEntry
{ "repo_name": "nsoft/jesterj", "path": "code/ingest/src/test/java/org/jesterj/ingest/trie/AbstractCollectionTest.java", "license": "apache-2.0", "size": 51497 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,343,228
public Object getObject(final String identifier) { Object object = null; final Iterator iterator = objectList.listIterator(); while (iterator.hasNext()) { final AbstractMP3Object abstractMP3Object = (AbstractMP3Object) iterator.next(); final String currentIdentifier =...
Object function(final String identifier) { Object object = null; final Iterator iterator = objectList.listIterator(); while (iterator.hasNext()) { final AbstractMP3Object abstractMP3Object = (AbstractMP3Object) iterator.next(); final String currentIdentifier = abstractMP3Object.getIdentifier(); if (currentIdentifier.eq...
/** * Returns the object of the <code>MP3Object</code> with the specified <code>identifier</code> * * @param identifier <code>MP3Object</code> identifier * * @return the object of the <code>MP3Object</code> with the specified <code>identifier</code> */
Returns the object of the <code>MP3Object</code> with the specified <code>identifier</code>
getObject
{ "repo_name": "Gooair/groovesquid", "path": "src/main/java/org/farng/mp3/AbstractMP3FragmentBody.java", "license": "gpl-3.0", "size": 12848 }
[ "java.util.Iterator", "org.farng.mp3.object.AbstractMP3Object" ]
import java.util.Iterator; import org.farng.mp3.object.AbstractMP3Object;
import java.util.*; import org.farng.mp3.object.*;
[ "java.util", "org.farng.mp3" ]
java.util; org.farng.mp3;
284,050
public void curvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y) throws ParseException { command(SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS); param(x1); param(y1); param(x2); param(y2); p...
void function(float x1, float y1, float x2, float y2, float x, float y) throws ParseException { command(SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS); param(x1); param(y1); param(x2); param(y2); param(x); param(y); }
/** * Implements {@link * PathHandler#curvetoCubicAbs(float,float,float,float,float,float)}. */
Implements <code>PathHandler#curvetoCubicAbs(float,float,float,float,float,float)</code>
curvetoCubicAbs
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/parser/PathArrayProducer.java", "license": "apache-2.0", "size": 10360 }
[ "org.w3c.dom.svg.SVGPathSeg" ]
import org.w3c.dom.svg.SVGPathSeg;
import org.w3c.dom.svg.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,095,087
public Map<String,String> getAttributes() { return attributes; }
Map<String,String> function() { return attributes; }
/** * Answer the attributes as a Dictionary object. */
Answer the attributes as a Dictionary object
getAttributes
{ "repo_name": "mcculls/bnd", "path": "org.osgi.impl.bundle.repoindex.lib/src/org/osgi/service/indexer/impl/util/Tag.java", "license": "apache-2.0", "size": 11450 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
557,589
public int deleteIdioma(String cedula, String lenguaje){ String sql_save; sql_save="UPDATE Idioma SET estado=false WHERE cedula='" + cedula + "' AND lenguaje = '"+lenguaje+"'"; try{ Statement sentencia = conn.createStatement(); sentencia.executeUpdate(sql_save); ...
int function(String cedula, String lenguaje){ String sql_save; sql_save=STR + cedula + STR+lenguaje+"'"; try{ Statement sentencia = conn.createStatement(); sentencia.executeUpdate(sql_save); return 1; } catch(SQLException e){ System.out.println(e); return -2; } catch(Exception e){ System.out.println(e); } return -1; }
/** * Metodo que permite eliminar (cambiar estado a inactivo) un registro en la tabla Idioma de un aspirante * @param cedula: identificacion del aspitante a eliminar registro * @param lenguaje: clase de registro a eliminar , ya que depende del idioma * @return */
Metodo que permite eliminar (cambiar estado a inactivo) un registro en la tabla Idioma de un aspirante
deleteIdioma
{ "repo_name": "danielcb29/SISCONDOC", "path": "SISCONDOC/src/almacenamiento/accesodatos/DAOIdioma.java", "license": "gpl-2.0", "size": 8852 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,526,642
private boolean updateUiForKey(String configKey, int color) { if (configKey.equals(DigitalWatchFaceUtil.KEY_BACKGROUND_COLOR)) { setInteractiveBackgroundColor(color); } else if (configKey.equals(DigitalWatchFaceUtil.KEY_HOURS_COLOR)) { setInteractiveHourDi...
boolean function(String configKey, int color) { if (configKey.equals(DigitalWatchFaceUtil.KEY_BACKGROUND_COLOR)) { setInteractiveBackgroundColor(color); } else if (configKey.equals(DigitalWatchFaceUtil.KEY_HOURS_COLOR)) { setInteractiveHourDigitsColor(color); } else if (configKey.equals(DigitalWatchFaceUtil.KEY_MINUTES...
/** * Updates the color of a UI item according to the given {@code configKey}. Does nothing if * {@code configKey} isn't recognized. * * @return whether UI has been updated */
Updates the color of a UI item according to the given configKey. Does nothing if configKey isn't recognized
updateUiForKey
{ "repo_name": "ph1ash/beeplepaper", "path": "wear/src/main/java/com/ph1ash/dexter/beeplepaper/BeeplePaperWatchFaceService.java", "license": "mit", "size": 32397 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,687,775
item.setPassword(new BCryptPasswordEncoder().encode(item.getPassword())); return item; }
item.setPassword(new BCryptPasswordEncoder().encode(item.getPassword())); return item; }
/** * Creates the. * * @param item the item * @param sasUser the sas user * @return the req serv hotel */
Creates the
create
{ "repo_name": "gleb619/webcam", "path": "src/main/java/org/test/webcam/util/listner/UsersListner.java", "license": "apache-2.0", "size": 870 }
[ "org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" ]
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.bcrypt.*;
[ "org.springframework.security" ]
org.springframework.security;
845,560
@JsonProperty(required = true) @JsonPropertyDescription("Type of the field.") String getType();
@JsonProperty(required = true) @JsonPropertyDescription(STR) String getType();
/** * Return the type of the field schema. * * @return Field schema type */
Return the type of the field schema
getType
{ "repo_name": "gentics/mesh", "path": "rest-model/src/main/java/com/gentics/mesh/core/rest/schema/FieldSchema.java", "license": "apache-2.0", "size": 3294 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "com.fasterxml.jackson.annotation.JsonPropertyDescription" ]
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
586,140
public void setSelectedDisplays(List<ImageDisplay> nodes);
void function(List<ImageDisplay> nodes);
/** * Sets the selected nodes. * * @param nodes The node to set. */
Sets the selected nodes
setSelectedDisplays
{ "repo_name": "chris-allan/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowser.java", "license": "gpl-2.0", "size": 24081 }
[ "java.util.List", "org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay" ]
import java.util.List; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay;
import java.util.*; import org.openmicroscopy.shoola.agents.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
950,912
@Test public void testIncludedCollection() throws Exception { testHelper.getHomeCollection().setExcludeFreeBusyRollup(false); DavHomeCollection home = testHelper.initializeHomeResource(); FreeBusyReport report = makeReport("freebusy1.xml", DEPTH_1, home); report.runQuery(); ...
void function() throws Exception { testHelper.getHomeCollection().setExcludeFreeBusyRollup(false); DavHomeCollection home = testHelper.initializeHomeResource(); FreeBusyReport report = makeReport(STR, DEPTH_1, home); report.runQuery(); }
/** * Tests included collection. * @throws Exception - if something is wrong this exception is thrown. */
Tests included collection
testIncludedCollection
{ "repo_name": "1and1/cosmo", "path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/dav/caldav/report/FreeBusyReportTest.java", "license": "apache-2.0", "size": 4521 }
[ "org.unitedinternet.cosmo.dav.impl.DavHomeCollection" ]
import org.unitedinternet.cosmo.dav.impl.DavHomeCollection;
import org.unitedinternet.cosmo.dav.impl.*;
[ "org.unitedinternet.cosmo" ]
org.unitedinternet.cosmo;
2,384,879
public void injectPlayer(Player player) { injectChannelInternal(getChannel(player)).player = player; }
void function(Player player) { injectChannelInternal(getChannel(player)).player = player; }
/** * Add a custom channel handler to the given player's channel pipeline, allowing us to intercept sent and received packets. * <p> * This will automatically be called when a player has logged in. * * @param player - the player to inject. */
Add a custom channel handler to the given player's channel pipeline, allowing us to intercept sent and received packets. This will automatically be called when a player has logged in
injectPlayer
{ "repo_name": "HolodeckOne-Minecraft/ProtocolLib", "path": "modules/TinyProtocol/src/main/java/com/comphenix/tinyprotocol/TinyProtocol.java", "license": "gpl-2.0", "size": 16035 }
[ "org.bukkit.entity.Player" ]
import org.bukkit.entity.Player;
import org.bukkit.entity.*;
[ "org.bukkit.entity" ]
org.bukkit.entity;
2,799,286
static public Cursor getDefaultCursor() { return getPredefinedCursor(Cursor.DEFAULT_CURSOR); } @ConstructorProperties({"type"}) public Cursor(int type) { if (type < Cursor.DEFAULT_CURSOR || type > Cursor.MOVE_CURSOR) { throw new IllegalArgumentException("illegal cursor ...
static Cursor function() { return getPredefinedCursor(Cursor.DEFAULT_CURSOR); } @ConstructorProperties({"type"}) public Cursor(int type) { if (type < Cursor.DEFAULT_CURSOR type > Cursor.MOVE_CURSOR) { throw new IllegalArgumentException(STR); } this.type = type; name = Toolkit.getProperty(cursorProperties[type][0], curs...
/** * Return the system default cursor. * * @return the default cursor */
Return the system default cursor
getDefaultCursor
{ "repo_name": "shelan/jdk9-mirror", "path": "jdk/src/java.desktop/share/classes/java/awt/Cursor.java", "license": "gpl-2.0", "size": 15106 }
[ "java.beans.ConstructorProperties" ]
import java.beans.ConstructorProperties;
import java.beans.*;
[ "java.beans" ]
java.beans;
2,800,107
public static Motor addMotorAxis(Motor motor) { motor.add(MotorAxisMother.createNewMotorAxis()); return motor; }
static Motor function(Motor motor) { motor.add(MotorAxisMother.createNewMotorAxis()); return motor; }
/** * Adds a motor axis to the given motor. * * @param motor the motor the motor axis should be added to * @return the given motor with a new motor axis */
Adds a motor axis to the given motor
addMotorAxis
{ "repo_name": "eveCSS/eveCSS", "path": "tests/de.ptb.epics.eve.data.tests/src/de/ptb/epics/eve/data/tests/mothers/measuringstation/MotorMother.java", "license": "epl-1.0", "size": 1109 }
[ "de.ptb.epics.eve.data.measuringstation.Motor" ]
import de.ptb.epics.eve.data.measuringstation.Motor;
import de.ptb.epics.eve.data.measuringstation.*;
[ "de.ptb.epics" ]
de.ptb.epics;
441,216
public static void out(Location message) { try { out(message.toString()); out("\t Latitude: " + message.getLatitude()); out("\t Longitude: " + message.getLongitude()); out("\t Accuracy: " + message.getAccuracy()); } catch (Exception e) { e....
static void function(Location message) { try { out(message.toString()); out(STR + message.getLatitude()); out(STR + message.getLongitude()); out(STR + message.getAccuracy()); } catch (Exception e) { e.printStackTrace(); } }
/** * Outputs a message to the debug console * * @param message The message to output */
Outputs a message to the debug console
out
{ "repo_name": "RomainPiel/meatspace-android", "path": "Meatspace/src/main/java/com/romainpiel/lib/utils/Debug.java", "license": "bsd-3-clause", "size": 11128 }
[ "android.location.Location" ]
import android.location.Location;
import android.location.*;
[ "android.location" ]
android.location;
2,725,305
private Map<String, Object> get(final int currentPageNum, final int pageSize, final int pageCount, final Query query, final StringBuilder sql, final List<Object> paramList) throws RepositoryException { final Map<String, Object> ret = new HashMap<>(); int pageCnt = pageCount; int recordCnt = 0; final Str...
Map<String, Object> function(final int currentPageNum, final int pageSize, final int pageCount, final Query query, final StringBuilder sql, final List<Object> paramList) throws RepositoryException { final Map<String, Object> ret = new HashMap<>(); int pageCnt = pageCount; int recordCnt = 0; final StringBuilder selectSq...
/** * getQuery sql. * * @param currentPageNum * currentPageNum * @param pageSize * pageSize * @param pageCount * if the pageCount specified with {@code -1}, the returned * (pageCnt, recordCnt) value will be calculated, otherwise, the * returned ...
getQuery sql
get
{ "repo_name": "daima/solo-spring", "path": "src/main/java/org/b3log/solo/dao/repository/jdbc/JdbcRepository.java", "license": "apache-2.0", "size": 29287 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.commons.lang3.StringUtils", "org.b3log.solo.dao.repository.Query", "org.b3log.solo.dao.repository.RepositoryException", "org.b3log.solo.dao.repository.jdbc.util.JdbcRepositories", "org.b3log.solo.model.Pagination" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.b3log.solo.dao.repository.Query; import org.b3log.solo.dao.repository.RepositoryException; import org.b3log.solo.dao.repository.jdbc.util.JdbcRepositories; import org.b3log.solo.model.Paginatio...
import java.util.*; import org.apache.commons.lang3.*; import org.b3log.solo.dao.repository.*; import org.b3log.solo.dao.repository.jdbc.util.*; import org.b3log.solo.model.*;
[ "java.util", "org.apache.commons", "org.b3log.solo" ]
java.util; org.apache.commons; org.b3log.solo;
2,872,089
public XAResource[] getXAResources(ActivationSpec[] activationSpecs) throws ResourceException { return null; }
XAResource[] function(ActivationSpec[] activationSpecs) throws ResourceException { return null; }
/** * This implementation always returns <code>null</code>. */
This implementation always returns <code>null</code>
getXAResources
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/jca/context/SpringContextResourceAdapter.java", "license": "unlicense", "size": 9396 }
[ "javax.resource.ResourceException", "javax.resource.spi.ActivationSpec", "javax.transaction.xa.XAResource" ]
import javax.resource.ResourceException; import javax.resource.spi.ActivationSpec; import javax.transaction.xa.XAResource;
import javax.resource.*; import javax.resource.spi.*; import javax.transaction.xa.*;
[ "javax.resource", "javax.transaction" ]
javax.resource; javax.transaction;
1,924,655
public Object checkMinAttr (DBValue dbValue, boolean isIncluded){ if (dbValue.type()== DATE) { Date havingDate = (Date) dbValue.get(); return setMinDateValue(havingDate,isIncluded); } return dbValue.get(); }
Object function (DBValue dbValue, boolean isIncluded){ if (dbValue.type()== DATE) { Date havingDate = (Date) dbValue.get(); return setMinDateValue(havingDate,isIncluded); } return dbValue.get(); }
/** * The method checks conformity of attribute value * to types DATE and TIMESTAMP, and if necessary changes * it depending on the <code>isIncluded</code> condition * of MValue parent's object * @see com.mozartframework.db.adapter.Types * * @param dbValue min * @param isIncluded condit...
The method checks conformity of attribute value to types DATE and TIMESTAMP, and if necessary changes it depending on the <code>isIncluded</code> condition of MValue parent's object
checkMinAttr
{ "repo_name": "mozartframework/cms", "path": "src/com/mozartframework/db/handler/ExcludeLogic.java", "license": "gpl-3.0", "size": 6890 }
[ "com.mozartframework.db.base.DBValue", "java.sql.Date" ]
import com.mozartframework.db.base.DBValue; import java.sql.Date;
import com.mozartframework.db.base.*; import java.sql.*;
[ "com.mozartframework.db", "java.sql" ]
com.mozartframework.db; java.sql;
1,686,649
@Nonnull public static <T extends PlayerMoveEvent> Predicate<T> ignoreSameBlock() { return (Predicate<T>) IGNORE_SAME_BLOCK; }
static <T extends PlayerMoveEvent> Predicate<T> function() { return (Predicate<T>) IGNORE_SAME_BLOCK; }
/** * Returns a predicate which only returns true if the player has moved over a block * * @param <T> the event type * @return a predicate which only returns true if the player has moved over a block */
Returns a predicate which only returns true if the player has moved over a block
ignoreSameBlock
{ "repo_name": "lucko/helper", "path": "helper/src/main/java/me/lucko/helper/event/filter/EventFilters.java", "license": "mit", "size": 7551 }
[ "java.util.function.Predicate", "org.bukkit.event.player.PlayerMoveEvent" ]
import java.util.function.Predicate; import org.bukkit.event.player.PlayerMoveEvent;
import java.util.function.*; import org.bukkit.event.player.*;
[ "java.util", "org.bukkit.event" ]
java.util; org.bukkit.event;
1,173,741
public DSTZone buildTailZone(String id) { if (iRules.size() == 2) { Rule startRule = iRules.get(0); Rule endRule = iRules.get(1); if (startRule.getToYear() == Integer.MAX_VALUE && endRule.getToYear() == Integer.MAX_VALUE) { ...
DSTZone function(String id) { if (iRules.size() == 2) { Rule startRule = iRules.get(0); Rule endRule = iRules.get(1); if (startRule.getToYear() == Integer.MAX_VALUE && endRule.getToYear() == Integer.MAX_VALUE) { return new DSTZone(id, iStandardOffset, startRule.iRecurrence, endRule.iRecurrence); } } return null; } } pr...
/** * Returns null if none can be built. */
Returns null if none can be built
buildTailZone
{ "repo_name": "likecool21/joda-time-2.3-Testing", "path": "src/main/java/org/joda/time/tz/DateTimeZoneBuilder.java", "license": "apache-2.0", "size": 64850 }
[ "org.joda.time.DateTimeZone" ]
import org.joda.time.DateTimeZone;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,081,290
public final MetaProperty<FrequencyBean> premiumFrequency() { return _premiumFrequency; }
final MetaProperty<FrequencyBean> function() { return _premiumFrequency; }
/** * The meta-property for the {@code premiumFrequency} property. * @return the meta-property, not null */
The meta-property for the premiumFrequency property
premiumFrequency
{ "repo_name": "McLeodMoores/starling", "path": "projects/master-db/src/main/java/com/opengamma/masterdb/security/hibernate/cds/CDSSecurityBean.java", "license": "apache-2.0", "size": 33407 }
[ "com.opengamma.masterdb.security.hibernate.FrequencyBean", "org.joda.beans.MetaProperty" ]
import com.opengamma.masterdb.security.hibernate.FrequencyBean; import org.joda.beans.MetaProperty;
import com.opengamma.masterdb.security.hibernate.*; import org.joda.beans.*;
[ "com.opengamma.masterdb", "org.joda.beans" ]
com.opengamma.masterdb; org.joda.beans;
2,813,973
public static String hash(String nodePath) { MessageDigest mdigest = (MessageDigest) digest.get(); if ( mdigest == null ) { try { mdigest = MessageDigest.getInstance("SHA1"); digest.set(mdigest); } catch (NoSuchAlgorithmException e) { ...
static String function(String nodePath) { MessageDigest mdigest = (MessageDigest) digest.get(); if ( mdigest == null ) { try { mdigest = MessageDigest.getInstance("SHA1"); digest.set(mdigest); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(STR + e, e); } } byte[] b = mdigest.digest(nodePath.getBytes(...
/** * create a SHA1 hash of the path * * @param nodePath * @param encode * @return some SHA1 hash value possibly * @throws NoSuchAlgorithmException */
create a SHA1 hash of the path
hash
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "kernel/kernel-util/src/main/java/org/sakaiproject/util/PathHashUtil.java", "license": "apache-2.0", "size": 2849 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.security.*;
[ "java.security" ]
java.security;
1,503,002
private void emitLFtoc(Operator operator, Register RT, RVMField field) { Register JTOC = regpool.getPhysicalRegisterSet().getJTOC(); Offset offset = field.getOffset(); int valueLow = Bits.PPCMaskLower16(offset); Instruction s; if (Bits.fits(offset, 16)) { s = MIR_Load.create(operator, D(RT),...
void function(Operator operator, Register RT, RVMField field) { Register JTOC = regpool.getPhysicalRegisterSet().getJTOC(); Offset offset = field.getOffset(); int valueLow = Bits.PPCMaskLower16(offset); Instruction s; if (Bits.fits(offset, 16)) { s = MIR_Load.create(operator, D(RT), A(JTOC), IC(valueLow)); EMIT(s); } e...
/** * Emit code to load a float value from the JTOC. * @param operator * @param RT * @param field */
Emit code to load a float value from the JTOC
emitLFtoc
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/lir2mir/ppc/BURS_Helpers.java", "license": "epl-1.0", "size": 87005 }
[ "org.jikesrvm.classloader.RVMField", "org.jikesrvm.compilers.opt.ir.Instruction", "org.jikesrvm.compilers.opt.ir.Operator", "org.jikesrvm.compilers.opt.ir.Register", "org.jikesrvm.compilers.opt.util.Bits", "org.vmmagic.unboxed.Offset" ]
import org.jikesrvm.classloader.RVMField; import org.jikesrvm.compilers.opt.ir.Instruction; import org.jikesrvm.compilers.opt.ir.Operator; import org.jikesrvm.compilers.opt.ir.Register; import org.jikesrvm.compilers.opt.util.Bits; import org.vmmagic.unboxed.Offset;
import org.jikesrvm.classloader.*; import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.util.*; import org.vmmagic.unboxed.*;
[ "org.jikesrvm.classloader", "org.jikesrvm.compilers", "org.vmmagic.unboxed" ]
org.jikesrvm.classloader; org.jikesrvm.compilers; org.vmmagic.unboxed;
2,770,952
private void parse(QueryType queryType, InputStream in, Sink sink, List<String> fieldNames, List<ColumnMetaData.Rep> fieldTypes, Page page) { final JsonFactory factory = new JsonFactory(); final Row.RowBuilder rowBuilder = Row.newBuilder(fieldNames.size()); if (CalcitePrepareImpl.DEBUG) { try...
void function(QueryType queryType, InputStream in, Sink sink, List<String> fieldNames, List<ColumnMetaData.Rep> fieldTypes, Page page) { final JsonFactory factory = new JsonFactory(); final Row.RowBuilder rowBuilder = Row.newBuilder(fieldNames.size()); if (CalcitePrepareImpl.DEBUG) { try { final byte[] bytes = AvaticaU...
/** Parses the output of a query, sending the results to a * {@link Sink}. */
Parses the output of a query, sending the results to a
parse
{ "repo_name": "minji-kim/calcite", "path": "druid/src/main/java/org/apache/calcite/adapter/druid/DruidConnectionImpl.java", "license": "apache-2.0", "size": 24278 }
[ "com.fasterxml.jackson.core.JsonFactory", "com.fasterxml.jackson.core.JsonParser", "com.fasterxml.jackson.core.JsonToken", "java.io.ByteArrayInputStream", "java.io.IOException", "java.io.InputStream", "java.nio.charset.StandardCharsets", "java.util.List", "org.apache.calcite.avatica.AvaticaUtils", ...
import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.List; import org.apache.calcit...
import com.fasterxml.jackson.core.*; import java.io.*; import java.nio.charset.*; import java.util.*; import org.apache.calcite.avatica.*; import org.apache.calcite.interpreter.*; import org.apache.calcite.prepare.*;
[ "com.fasterxml.jackson", "java.io", "java.nio", "java.util", "org.apache.calcite" ]
com.fasterxml.jackson; java.io; java.nio; java.util; org.apache.calcite;
152,924
public void ifApplicationNameChanged(ProjectDescription current, BiConsumer<String, String> consumer) { if (!Objects.equals(this.original.getApplicationName(), current.getApplicationName())) { consumer.accept(this.original.getApplicationName(), current.getApplicationName()); } }
void function(ProjectDescription current, BiConsumer<String, String> consumer) { if (!Objects.equals(this.original.getApplicationName(), current.getApplicationName())) { consumer.accept(this.original.getApplicationName(), current.getApplicationName()); } }
/** * Calls the specified consumer if the {@code applicationName} is different on the * original source project description than the specified project description. * @param current the description to test against * @param consumer to call if the property has changed */
Calls the specified consumer if the applicationName is different on the original source project description than the specified project description
ifApplicationNameChanged
{ "repo_name": "spring-io/initializr", "path": "initializr-generator/src/main/java/io/spring/initializr/generator/project/ProjectDescriptionDiff.java", "license": "apache-2.0", "size": 8235 }
[ "java.util.Objects", "java.util.function.BiConsumer" ]
import java.util.Objects; import java.util.function.BiConsumer;
import java.util.*; import java.util.function.*;
[ "java.util" ]
java.util;
108,960
@Generated(hash = 763524340) public List<Word> getWords() { if (words == null) { final DaoSession daoSession = this.daoSession; if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } WordDao targetDao = d...
@Generated(hash = 763524340) List<Word> function() { if (words == null) { final DaoSession daoSession = this.daoSession; if (daoSession == null) { throw new DaoException(STR); } WordDao targetDao = daoSession.getWordDao(); List<Word> wordsNew = targetDao._queryAudio_Words(id); synchronized (this) { if (words == null) {...
/** * To-many relationship, resolved on first access (and after reset). * Changes to to-many relations are not persisted, make changes to the target entity. */
To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity
getWords
{ "repo_name": "literacyapp-org/literacyapp-android", "path": "contentprovider/src/main/java/org/literacyapp/contentprovider/model/content/multimedia/Audio.java", "license": "apache-2.0", "size": 10434 }
[ "java.util.List", "org.greenrobot.greendao.DaoException", "org.greenrobot.greendao.annotation.Generated", "org.literacyapp.contentprovider.dao.DaoSession", "org.literacyapp.contentprovider.dao.WordDao", "org.literacyapp.contentprovider.model.content.Word" ]
import java.util.List; import org.greenrobot.greendao.DaoException; import org.greenrobot.greendao.annotation.Generated; import org.literacyapp.contentprovider.dao.DaoSession; import org.literacyapp.contentprovider.dao.WordDao; import org.literacyapp.contentprovider.model.content.Word;
import java.util.*; import org.greenrobot.greendao.*; import org.greenrobot.greendao.annotation.*; import org.literacyapp.contentprovider.dao.*; import org.literacyapp.contentprovider.model.content.*;
[ "java.util", "org.greenrobot.greendao", "org.literacyapp.contentprovider" ]
java.util; org.greenrobot.greendao; org.literacyapp.contentprovider;
1,426,133
public Point2D getCentre() { if (units.isInMicrons()) { double tx = UIUtilities.transformSize( rectangle.getCenterX()*units.getMicronsPixelX()).getValue(); double ty = UIUtilities.transformSize( rectangle.getCenterY()*units.getMicronsPixelY()).getValue(); return new Poin...
Point2D function() { if (units.isInMicrons()) { double tx = UIUtilities.transformSize( rectangle.getCenterX()*units.getMicronsPixelX()).getValue(); double ty = UIUtilities.transformSize( rectangle.getCenterY()*units.getMicronsPixelY()).getValue(); return new Point2D.Double(tx, ty); } return new Point2D.Double(rectangle...
/** * Calculate the centre of the figure. * @return see above. */
Calculate the centre of the figure
getCentre
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/roi/figures/MeasureRectangleFigure.java", "license": "gpl-2.0", "size": 20552 }
[ "java.awt.geom.Point2D", "org.openmicroscopy.shoola.util.ui.UIUtilities" ]
import java.awt.geom.Point2D; import org.openmicroscopy.shoola.util.ui.UIUtilities;
import java.awt.geom.*; import org.openmicroscopy.shoola.util.ui.*;
[ "java.awt", "org.openmicroscopy.shoola" ]
java.awt; org.openmicroscopy.shoola;
973,732
public static Class<Object> loadValidInputTypes(String javaType, String type) { try { Class<Object> clazz = getPrimitiveWrapperClassType(type); if (clazz == null) { clazz = loadPrimitiveWrapperType(javaType); } if (clazz == null) { ...
static Class<Object> function(String javaType, String type) { try { Class<Object> clazz = getPrimitiveWrapperClassType(type); if (clazz == null) { clazz = loadPrimitiveWrapperType(javaType); } if (clazz == null) { clazz = loadStringSupportedType(javaType); } if (clazz == null) { clazz = (Class<Object>) Class.forName(ja...
/** * Converts a java type as a string to a valid input type and returns the class or null if its not supported */
Converts a java type as a string to a valid input type and returns the class or null if its not supported
loadValidInputTypes
{ "repo_name": "hekonsek/fabric8", "path": "forge/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java", "license": "apache-2.0", "size": 12424 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,588,560
public void setChannels(List<Integer> channels) { this.channels = channels; } public List<Integer> getChannels() { return channels; }
void function(List<Integer> channels) { this.channels = channels; } public List<Integer> getChannels() { return channels; }
/** * Sets the channels to user for the movie. * * @param channels The channels to use. */
Sets the channels to user for the movie
setChannels
{ "repo_name": "knabar/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/model/MovieExportParam.java", "license": "gpl-2.0", "size": 9804 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
993,547
public int indexOf(GenericTree<T> child) throws NoSuchElementException { if (child == null) throw new NoSuchElementException("null"); int idx = children.indexOf(child); if (idx > -1) { return idx; } else { throw new NoSuchElementException(child.toString()); } }
int function(GenericTree<T> child) throws NoSuchElementException { if (child == null) throw new NoSuchElementException("null"); int idx = children.indexOf(child); if (idx > -1) { return idx; } else { throw new NoSuchElementException(child.toString()); } }
/** * Returns the index of the specified child. If child is not * a child of this node, then a NoSuchElementException is * thrown. * * @param child * The child whose index we are searching for. * @return * The index of the specified child. * @throws NoSuchElementException * If the ...
Returns the index of the specified child. If child is not a child of this node, then a NoSuchElementException is thrown
indexOf
{ "repo_name": "mdippery/snodes", "path": "src/main/java/snodes/util/GenericTree.java", "license": "gpl-2.0", "size": 5769 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
713,049
public static Calendar nextMinute(Calendar origin) { return addMinutes(origin, 1); }
static Calendar function(Calendar origin) { return addMinutes(origin, 1); }
/** * Calculate the next-minute point of a supplied {@link Calendar}. * * <p> * The returned {@link Calendar} has its fields synced. * </p> * * @param origin * @return */
Calculate the next-minute point of a supplied <code>Calendar</code>. The returned <code>Calendar</code> has its fields synced.
nextMinute
{ "repo_name": "DDTH/ddth-commons", "path": "ddth-commons-core/src/main/java/com/github/ddth/commons/utils/DateTimeUtils.java", "license": "mit", "size": 25648 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
2,230,243
EClass getNoise();
EClass getNoise();
/** * Returns the meta object for class '{@link net.mlanoe.language.vhdl.ams.Noise <em>Noise</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Noise</em>'. * @see net.mlanoe.language.vhdl.ams.Noise * @generated */
Returns the meta object for class '<code>net.mlanoe.language.vhdl.ams.Noise Noise</code>'.
getNoise
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl/src-gen/net/mlanoe/language/vhdl/ams/AmsPackage.java", "license": "gpl-3.0", "size": 12721 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,079,523
public Iterator<EnumAttribute> getAllPossibleValuesIterator() { return getAllPossibleValuesSet().iterator(); } }
Iterator<EnumAttribute> function() { return getAllPossibleValuesSet().iterator(); } }
/** * Generates an iterator over the set of all possible enum attribute values of this attribute. * * @return An iterator over the set of all possible enum attribute values of this attribute. */
Generates an iterator over the set of all possible enum attribute values of this attribute
getAllPossibleValuesIterator
{ "repo_name": "rupertlssmith/lojix", "path": "lojix/power_model/src/main/com/thesett/aima/attribute/impl/EnumAttribute.java", "license": "apache-2.0", "size": 12507 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
494,267
return Stream.of(values()) .filter(keyType -> keyType.value.equalsIgnoreCase(stringValue)) .findAny(); }
return Stream.of(values()) .filter(keyType -> keyType.value.equalsIgnoreCase(stringValue)) .findAny(); }
/** * Converts operator string value into {@link FilterOperator} enum. * * @param stringValue operator string value * @return filter operator in optional container */
Converts operator string value into <code>FilterOperator</code> enum
fromValue
{ "repo_name": "data-integrations/firestore-plugins", "path": "src/main/java/io/cdap/plugin/gcp/firestore/source/util/FilterOperator.java", "license": "apache-2.0", "size": 2351 }
[ "java.util.stream.Stream" ]
import java.util.stream.Stream;
import java.util.stream.*;
[ "java.util" ]
java.util;
2,343,025
public void publish() throws NotConnectedException, InterruptedException { PubSub packet = createPubsubPacket(Type.set, new NodeExtension(PubSubElementType.PUBLISH, getId())); con.sendStanza(packet); }
void function() throws NotConnectedException, InterruptedException { PubSub packet = createPubsubPacket(Type.set, new NodeExtension(PubSubElementType.PUBLISH, getId())); con.sendStanza(packet); }
/** * Publishes an event to the node. This is an empty event * with no item. * * This is only acceptable for nodes with {@link ConfigureForm#isPersistItems()}=false * and {@link ConfigureForm#isDeliverPayloads()}=false. * * This is an asynchronous call which returns as soon as the * stanza(/packet) ...
Publishes an event to the node. This is an empty event with no item. This is only acceptable for nodes with <code>ConfigureForm#isPersistItems()</code>=false and <code>ConfigureForm#isDeliverPayloads()</code>=false. This is an asynchronous call which returns as soon as the stanza(/packet) has been sent. For synchronous...
publish
{ "repo_name": "ayne/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/LeafNode.java", "license": "apache-2.0", "size": 15261 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.packet.IQ", "org.jivesoftware.smackx.pubsub.packet.PubSub" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smackx.pubsub.packet.PubSub;
import org.jivesoftware.smack.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.smackx.pubsub.packet.*;
[ "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
org.jivesoftware.smack; org.jivesoftware.smackx;
1,328,625
@GET @Path("{id}") @Produces(MediaType.APPLICATION_JSON) public Response getMessages( @PathParam("user") String user, @PathParam("domain") String domain, @PathParam("id") Integer labelId, @QueryParam("metadata") @DefaultValue("false") boolean withMetadata, @QueryParam("includebody") @DefaultValue("...
@Path("{id}") @Produces(MediaType.APPLICATION_JSON) Response function( @PathParam("user") String user, @PathParam(STR) String domain, @PathParam("id") Integer labelId, @QueryParam(STR) @DefaultValue("false") boolean withMetadata, @QueryParam(STR) @DefaultValue("false") boolean includeBody, @QueryParam(STR) @DefaultValu...
/** * Get all messages labeled with given label * * @param account * @param labelId * @param withMetadata * @param reverse * @param start * @param count * @return */
Get all messages labeled with given label
getMessages
{ "repo_name": "elasticinbox/elasticinbox", "path": "modules/rest/src/main/java/com/elasticinbox/rest/v2/LabelResource.java", "license": "bsd-3-clause", "size": 8507 }
[ "com.elasticinbox.common.utils.JSONUtils", "com.elasticinbox.core.model.Mailbox", "javax.ws.rs.DefaultValue", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.WebApplicationException", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Respon...
import com.elasticinbox.common.utils.JSONUtils; import com.elasticinbox.core.model.Mailbox; import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.MediaType; i...
import com.elasticinbox.common.utils.*; import com.elasticinbox.core.model.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "com.elasticinbox.common", "com.elasticinbox.core", "javax.ws" ]
com.elasticinbox.common; com.elasticinbox.core; javax.ws;
782,270
CmsSitemapEntryBean internalCreateSitemapEntryBean(CmsObject cms, CmsResource resource) throws CmsException { cms = OpenCms.initCmsObject(cms); cms.getRequestContext().setSiteRoot(""); CmsJspNavBuilder navBuilder = new CmsJspNavBuilder(cms); CmsJspNavElement entry = navBuilder.getNa...
CmsSitemapEntryBean internalCreateSitemapEntryBean(CmsObject cms, CmsResource resource) throws CmsException { cms = OpenCms.initCmsObject(cms); cms.getRequestContext().setSiteRoot(""); CmsJspNavBuilder navBuilder = new CmsJspNavBuilder(cms); CmsJspNavElement entry = navBuilder.getNavigationForResource(resource.getRootP...
/** * Creates the sitemap entry bean for a resource.<p> * * @param cms the current CMS context * @param resource the resource for which the sitemap entry bean should be created * * @return the created sitemap entry bean * * @throws CmsException if something goes wrong ...
Creates the sitemap entry bean for a resource
internalCreateSitemapEntryBean
{ "repo_name": "sbonoc/opencms-core", "path": "src/org/opencms/ade/galleries/CmsGalleryService.java", "license": "lgpl-2.1", "size": 100077 }
[ "org.opencms.ade.galleries.shared.CmsSitemapEntryBean", "org.opencms.file.CmsObject", "org.opencms.file.CmsResource", "org.opencms.jsp.CmsJspNavBuilder", "org.opencms.jsp.CmsJspNavElement", "org.opencms.main.CmsException", "org.opencms.main.OpenCms" ]
import org.opencms.ade.galleries.shared.CmsSitemapEntryBean; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.jsp.CmsJspNavBuilder; import org.opencms.jsp.CmsJspNavElement; import org.opencms.main.CmsException; import org.opencms.main.OpenCms;
import org.opencms.ade.galleries.shared.*; import org.opencms.file.*; import org.opencms.jsp.*; import org.opencms.main.*;
[ "org.opencms.ade", "org.opencms.file", "org.opencms.jsp", "org.opencms.main" ]
org.opencms.ade; org.opencms.file; org.opencms.jsp; org.opencms.main;
819,843
public List<String> getConfigList( String property ) { return getConfigList( property, ListOverrideType.APPEND ); }
List<String> function( String property ) { return getConfigList( property, ListOverrideType.APPEND ); }
/** * Gets a list from a comma separated property with support for overrides, defaulting to Append behavior * * @param property the property * @return the list */
Gets a list from a comma separated property with support for overrides, defaulting to Append behavior
getConfigList
{ "repo_name": "andrei-viaryshka/pentaho-hadoop-shims", "path": "api/src/main/java/org/pentaho/hadoop/shim/api/ShimProperties.java", "license": "apache-2.0", "size": 7585 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
127,413
@JsonProperty( "patch_audit_over_telnet" ) public String getPatchAuditOverTelnet() { return patchAuditOverTelnet; }
@JsonProperty( STR ) String function() { return patchAuditOverTelnet; }
/** * Gets patch audit over telnet. * * @return the patch audit over telnet */
Gets patch audit over telnet
getPatchAuditOverTelnet
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/policies/models/PolicySettings.java", "license": "mit", "size": 90382 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,164,874
final ZAP zap = new ZAP(); zap.init(args); // Nasty hack to prevent warning messages when running from the command // line NullAppender na = new NullAppender(); Logger.getRootLogger().addAppender(na); Logger.getRootLogger().setLevel(Level.OFF); Logger.get...
final ZAP zap = new ZAP(); zap.init(args); NullAppender na = new NullAppender(); Logger.getRootLogger().addAppender(na); Logger.getRootLogger().setLevel(Level.OFF); Logger.getLogger(ConfigurationUtils.class).addAppender(na); Logger.getLogger(DefaultFileSystem.class).addAppender(na); try { Constant.getInstance(); } catc...
/** * Main method * * @param args * the arguments passed to the command line version * @throws Exception * if something wrong happens */
Main method
main
{ "repo_name": "robocoder/zaproxy", "path": "src/org/zaproxy/zap/ZAP.java", "license": "apache-2.0", "size": 33770 }
[ "org.apache.commons.configuration.ConfigurationUtils", "org.apache.commons.configuration.DefaultFileSystem", "org.apache.log4j.BasicConfigurator", "org.apache.log4j.Level", "org.apache.log4j.Logger", "org.apache.log4j.varia.NullAppender", "org.parosproxy.paros.Constant" ]
import org.apache.commons.configuration.ConfigurationUtils; import org.apache.commons.configuration.DefaultFileSystem; import org.apache.log4j.BasicConfigurator; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.varia.NullAppender; import org.parosproxy.paros.Constant;
import org.apache.commons.configuration.*; import org.apache.log4j.*; import org.apache.log4j.varia.*; import org.parosproxy.paros.*;
[ "org.apache.commons", "org.apache.log4j", "org.parosproxy.paros" ]
org.apache.commons; org.apache.log4j; org.parosproxy.paros;
1,990,360
public void setKieslijstDatabaseFP(byte[] kieslijstDatabaseFP) { sKieslijstDatabaseFP = KOAEncryptionUtil.fingerprintValueToString(kieslijstDatabaseFP); }
void function(byte[] kieslijstDatabaseFP) { sKieslijstDatabaseFP = KOAEncryptionUtil.fingerprintValueToString(kieslijstDatabaseFP); }
/** * Sets the kieslijstDatabaseFP * @param kieslijstDatabaseFP The kieslijstDatabaseFP to set */
Sets the kieslijstDatabaseFP
setKieslijstDatabaseFP
{ "repo_name": "GaloisInc/KOA", "path": "infrastructure/source/WebVotingSystem/src/ie/ucd/srg/koa/dataobjects/KiesLijstFingerprintCompareResult.java", "license": "gpl-2.0", "size": 5255 }
[ "ie.ucd.srg.koa.security.KOAEncryptionUtil" ]
import ie.ucd.srg.koa.security.KOAEncryptionUtil;
import ie.ucd.srg.koa.security.*;
[ "ie.ucd.srg" ]
ie.ucd.srg;
1,791,919
public static AuthenticationRequestCacheEntry getAuthenticationRequestFromCache(String key) { AuthenticationRequestCacheKey cacheKey = new AuthenticationRequestCacheKey(key); AuthenticationRequestCacheEntry authRequest = AuthenticationRequestCache.getInstance().getValueFromCache(cacheKey); ...
static AuthenticationRequestCacheEntry function(String key) { AuthenticationRequestCacheKey cacheKey = new AuthenticationRequestCacheKey(key); AuthenticationRequestCacheEntry authRequest = AuthenticationRequestCache.getInstance().getValueFromCache(cacheKey); return authRequest; }
/** * To get authentication cache request from cache * * @param key Key of the cache entry * @return */
To get authentication cache request from cache
getAuthenticationRequestFromCache
{ "repo_name": "dharshanaw/carbon-identity-framework", "path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/util/FrameworkUtils.java", "license": "apache-2.0", "size": 55252 }
[ "org.wso2.carbon.identity.application.authentication.framework.cache.AuthenticationRequestCache", "org.wso2.carbon.identity.application.authentication.framework.cache.AuthenticationRequestCacheEntry", "org.wso2.carbon.identity.application.authentication.framework.cache.AuthenticationRequestCacheKey" ]
import org.wso2.carbon.identity.application.authentication.framework.cache.AuthenticationRequestCache; import org.wso2.carbon.identity.application.authentication.framework.cache.AuthenticationRequestCacheEntry; import org.wso2.carbon.identity.application.authentication.framework.cache.AuthenticationRequestCacheKey;
import org.wso2.carbon.identity.application.authentication.framework.cache.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,545,985
public diropres NFSPROC_LOOKUP_2(diropargs arg1) throws OncRpcException { diropres result$ = new diropres(); client.call(nfs_prot.NFSPROC_LOOKUP_2, nfs_prot.NFS_VERSION, arg1, result$); return result$; }
diropres function(diropargs arg1) throws OncRpcException { diropres result$ = new diropres(); client.call(nfs_prot.NFSPROC_LOOKUP_2, nfs_prot.NFS_VERSION, arg1, result$); return result$; }
/** * Call remote procedure NFSPROC_LOOKUP_2. * * @param arg1 parameter (of type diropargs) to the remote procedure call. * @return Result from remote procedure call (of type diropres). * @throws OncRpcException if an ONC/RPC error occurs. */
Call remote procedure NFSPROC_LOOKUP_2
NFSPROC_LOOKUP_2
{ "repo_name": "openthinclient/openthinclient-manager", "path": "services/nfs/src/main/java/org/openthinclient/nfsd/tea/nfs_protClient.java", "license": "gpl-2.0", "size": 13387 }
[ "org.acplt.oncrpc.OncRpcException" ]
import org.acplt.oncrpc.OncRpcException;
import org.acplt.oncrpc.*;
[ "org.acplt.oncrpc" ]
org.acplt.oncrpc;
1,561,373
log(Level.INFO, message); }
log(Level.INFO, message); }
/** * Log a message with a pre-defined default logging level * * @param message Message to log */
Log a message with a pre-defined default logging level
log
{ "repo_name": "ModernDayPlayer/Survivor", "path": "src/main/java/io/anw/Survivor/Utils/LoggingUtils.java", "license": "mit", "size": 603 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
591,704
public static void addIfNotNull(JSONWriter writer, String field, String value) throws JSONException { if (value == null) return; writer.key(field); writer.value(value); }
static void function(JSONWriter writer, String field, String value) throws JSONException { if (value == null) return; writer.key(field); writer.value(value); }
/** * Adds a value to a writer if value is not <code>null</code>. * * @param writer * writer to add object to. * @param field * field name to set. * @param value * field value. * @throws JSONException * if io error occurs. */
Adds a value to a writer if value is not <code>null</code>
addIfNotNull
{ "repo_name": "redminenb/redmine-java-api", "path": "src/main/java/com/taskadapter/redmineapi/internal/json/JsonOutput.java", "license": "apache-2.0", "size": 5171 }
[ "org.json.JSONException", "org.json.JSONWriter" ]
import org.json.JSONException; import org.json.JSONWriter;
import org.json.*;
[ "org.json" ]
org.json;
1,750,193
public void assertIsBeforeOrEqualTo(AssertionInfo info, Date actual, Date other) { assertNotNull(info, actual); dateParameterIsNotNull(other); if (!isBeforeOrEqualTo(actual, other)) throw failures.failure(info, shouldBeBeforeOrEqualTo(actual, other, comparisonStrategy)); }
void function(AssertionInfo info, Date actual, Date other) { assertNotNull(info, actual); dateParameterIsNotNull(other); if (!isBeforeOrEqualTo(actual, other)) throw failures.failure(info, shouldBeBeforeOrEqualTo(actual, other, comparisonStrategy)); }
/** * Verifies that the actual {@code Date} is before or equal to the given one. * @param info contains information about the assertion. * @param actual the "actual" {@code Date}. * @param other the other date to compare actual with. * @throws AssertionError if {@code actual} is {@code null}. * @throw...
Verifies that the actual Date is before or equal to the given one
assertIsBeforeOrEqualTo
{ "repo_name": "hazendaz/assertj-core", "path": "src/main/java/org/assertj/core/internal/Dates.java", "license": "apache-2.0", "size": 39823 }
[ "java.util.Date", "org.assertj.core.api.AssertionInfo", "org.assertj.core.error.ShouldBeBeforeOrEqualTo" ]
import java.util.Date; import org.assertj.core.api.AssertionInfo; import org.assertj.core.error.ShouldBeBeforeOrEqualTo;
import java.util.*; import org.assertj.core.api.*; import org.assertj.core.error.*;
[ "java.util", "org.assertj.core" ]
java.util; org.assertj.core;
2,697,374
public static void main(String[] args) { // Check that there is at least one argument if (args.length < 1) { System.err.println("You must provide at least one command argument"); display(); System.exit(1); } // Initialise the service m...
static void function(String[] args) { if (args.length < 1) { System.err.println(STR); display(); System.exit(1); } try { kernelImpl = DSpaceKernelInit.getKernel(null); if (!kernelImpl.isRunning()) { kernelImpl.start(ConfigurationManager.getProperty(STR)); } } catch (Exception e) { try { kernelImpl.destroy(); } catch (E...
/** * Execute the DSpace script launcher * * @param args Any parameters required to be passed to the scripts it executes */
Execute the DSpace script launcher
main
{ "repo_name": "mdiggory/dryad-repo", "path": "dspace-api/src/main/java/org/dspace/app/launcher/ScriptLauncher.java", "license": "bsd-3-clause", "size": 10198 }
[ "java.lang.reflect.Method", "java.util.List", "org.dspace.core.ConfigurationManager", "org.dspace.servicemanager.DSpaceKernelInit", "org.dspace.services.RequestService", "org.jdom.Document", "org.jdom.Element" ]
import java.lang.reflect.Method; import java.util.List; import org.dspace.core.ConfigurationManager; import org.dspace.servicemanager.DSpaceKernelInit; import org.dspace.services.RequestService; import org.jdom.Document; import org.jdom.Element;
import java.lang.reflect.*; import java.util.*; import org.dspace.core.*; import org.dspace.servicemanager.*; import org.dspace.services.*; import org.jdom.*;
[ "java.lang", "java.util", "org.dspace.core", "org.dspace.servicemanager", "org.dspace.services", "org.jdom" ]
java.lang; java.util; org.dspace.core; org.dspace.servicemanager; org.dspace.services; org.jdom;
1,239,714
public boolean isLocked(Iterable<T> items) { for (T t : items) { ReentrantLock lock = syncMap.getUnchecked(t); if (!lock.isHeldByCurrentThread()) return false; } return true; }
boolean function(Iterable<T> items) { for (T t : items) { ReentrantLock lock = syncMap.getUnchecked(t); if (!lock.isHeldByCurrentThread()) return false; } return true; }
/** * Returns <code>true</code> if all the items are locked on the current * thread. * * @param items collection of items, not null */
Returns <code>true</code> if all the items are locked on the current thread
isLocked
{ "repo_name": "sh4nth/atlasdb-1", "path": "atlasdb-commons/src/main/java/com/palantir/util/MutuallyExclusiveSetLock.java", "license": "bsd-3-clause", "size": 11142 }
[ "java.util.concurrent.locks.ReentrantLock" ]
import java.util.concurrent.locks.ReentrantLock;
import java.util.concurrent.locks.*;
[ "java.util" ]
java.util;
2,461,234
@Override public ActionForward route(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { LOG.debug("route() started"); CorrectionForm correctionForm = (CorrectionForm) form; if (prepareForRoute(correctionForm)) { ...
ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { LOG.debug(STR); CorrectionForm correctionForm = (CorrectionForm) form; if (prepareForRoute(correctionForm)) { if (correctionForm.getDataLoadedFlag() && !correctionForm.isRestricted...
/** * Route the document */
Route the document
route
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/gl/document/web/struts/CorrectionAction.java", "license": "agpl-3.0", "size": 102157 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.struts.action.ActionForm", "org.apache.struts.action.ActionForward", "org.apache.struts.action.ActionMapping", "org.kuali.kfs.gl.document.CorrectionDocumentUtils", "org.kuali.kfs.sys.KFSConstants" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kfs.gl.document.CorrectionDocumentUtils; import org.kuali.kfs.sys.KFSCon...
import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kfs.gl.document.*; import org.kuali.kfs.sys.*;
[ "javax.servlet", "org.apache.struts", "org.kuali.kfs" ]
javax.servlet; org.apache.struts; org.kuali.kfs;
1,754,812
@Generated @Selector("image") public native UIImage image();
@Selector("image") native UIImage function();
/** * [@property] image * <p> * A UIImage object used to construct the message representation in the conversation transcript. * <p> * When this property and the mediaURL property are both set, the mediaURL * property will be ignored. */
[@property] image A UIImage object used to construct the message representation in the conversation transcript. When this property and the mediaURL property are both set, the mediaURL property will be ignored
image
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/messages/MSMessageTemplateLayout.java", "license": "apache-2.0", "size": 9476 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,748,589
public MediaSize getMediaSize() { return m_mediaSize; } // getMediaSize
MediaSize function() { return m_mediaSize; }
/** * Get Media Size * @return media size */
Get Media Size
getMediaSize
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/print/CPaper.java", "license": "gpl-2.0", "size": 15531 }
[ "javax.print.attribute.standard.MediaSize" ]
import javax.print.attribute.standard.MediaSize;
import javax.print.attribute.standard.*;
[ "javax.print" ]
javax.print;
2,501,661
@ServiceMethod(returns = ReturnType.SINGLE) public void deleteDnsZone(String resourceGroupName, String dnsZoneId, String privateCloudName) { deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String dnsZoneId, String privateCloudName) { deleteDnsZoneAsync(resourceGroupName, dnsZoneId, privateCloudName).block(); }
/** * Delete a DNS zone by id in a private cloud workload network. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param dnsZoneId NSX DNS Zone identifier. Generally the same as the DNS Zone's display name. * @param privateCloudName Name of the priv...
Delete a DNS zone by id in a private cloud workload network
deleteDnsZone
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java", "license": "mit", "size": 538828 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
1,416,582
public static Tie getTie (Remote target) { if (utilDelegate != null) { return utilDelegate.getTie(target); } return null; }
static Tie function (Remote target) { if (utilDelegate != null) { return utilDelegate.getTie(target); } return null; }
/** * Returns the tie (if any) for a given target object. * @return the tie or null if no tie is registered for the given target. */
Returns the tie (if any) for a given target object
getTie
{ "repo_name": "FauxFaux/jdk9-corba", "path": "src/java.corba/share/classes/javax/rmi/CORBA/Util.java", "license": "gpl-2.0", "size": 14132 }
[ "java.rmi.Remote", "javax.rmi.CORBA" ]
import java.rmi.Remote; import javax.rmi.CORBA;
import java.rmi.*; import javax.rmi.*;
[ "java.rmi", "javax.rmi" ]
java.rmi; javax.rmi;
1,508,619
public static short LASPoint_GetScanDirection(LiblasLibrary.LASPointH hPoint) { return LASPoint_GetScanDirection(Pointer.getPeer(hPoint)); }
static short function(LiblasLibrary.LASPointH hPoint) { return LASPoint_GetScanDirection(Pointer.getPeer(hPoint)); }
/** * Returns the scan direction for a given pulse.<br> * @param hPoint LASPointH instance<br> * @return the scan direction for a given pulse.<br> * Original signature : <code>short LASPoint_GetScanDirection(const LASPointH)</code><br> * <i>native declaration : liblas.h:359</i> */
Returns the scan direction for a given pulse
LASPoint_GetScanDirection
{ "repo_name": "petvana/las-bridj", "path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java", "license": "bsd-3-clause", "size": 116212 }
[ "org.bridj.Pointer" ]
import org.bridj.Pointer;
import org.bridj.*;
[ "org.bridj" ]
org.bridj;
1,558,046
public Map<String, MLArray> getContent() { return data; }
Map<String, MLArray> function() { return data; }
/** * Returns a map of <code>MLArray</code> objects that were inside MAT-file. * * MLArrays are mapped with MLArrays' names * * @return - a <code>Map</code> of MLArrays mapped with their names. */
Returns a map of <code>MLArray</code> objects that were inside MAT-file. MLArrays are mapped with MLArrays' names
getContent
{ "repo_name": "lovro-i/apro", "path": "lib/JMatIO.Mod/src/com/jmatio/io/MatFileReader.java", "license": "lgpl-3.0", "size": 42612 }
[ "com.jmatio.types.MLArray", "java.util.Map" ]
import com.jmatio.types.MLArray; import java.util.Map;
import com.jmatio.types.*; import java.util.*;
[ "com.jmatio.types", "java.util" ]
com.jmatio.types; java.util;
72,269
public void appendCreateTableSql(VersionCode sqliteVersion, StringBuilder sql, PropertyVisitor<Void, StringBuilder> propertyVisitor) { sql.append("CREATE TABLE IF NOT EXISTS ").append(getExpression()).append('('); boolean needsComma = false; for (Property<?> property : properties...
void function(VersionCode sqliteVersion, StringBuilder sql, PropertyVisitor<Void, StringBuilder> propertyVisitor) { sql.append(STR).append(getExpression()).append('('); boolean needsComma = false; for (Property<?> property : properties) { if (TableModel.ROWID.equals(property.getExpression())) { continue; } if (needsCom...
/** * Append a CREATE TABLE statement that would create this table and its columns. Users normally should not call * this method and instead let {@link com.yahoo.squidb.data.SquidDatabase} build tables automatically. */
Append a CREATE TABLE statement that would create this table and its columns. Users normally should not call this method and instead let <code>com.yahoo.squidb.data.SquidDatabase</code> build tables automatically
appendCreateTableSql
{ "repo_name": "jdkoren/squidb", "path": "squidb/src/com/yahoo/squidb/sql/Table.java", "license": "apache-2.0", "size": 5412 }
[ "com.yahoo.squidb.data.TableModel", "com.yahoo.squidb.sql.Property", "com.yahoo.squidb.utility.VersionCode" ]
import com.yahoo.squidb.data.TableModel; import com.yahoo.squidb.sql.Property; import com.yahoo.squidb.utility.VersionCode;
import com.yahoo.squidb.data.*; import com.yahoo.squidb.sql.*; import com.yahoo.squidb.utility.*;
[ "com.yahoo.squidb" ]
com.yahoo.squidb;
2,795,716
public static Path getBaseMagicTaskAttemptPath(TaskAttemptContext context, String jobUUID, Path dest) { return new Path(getMagicTaskAttemptsPath(jobUUID, dest), String.valueOf(context.getTaskAttemptID())); }
static Path function(TaskAttemptContext context, String jobUUID, Path dest) { return new Path(getMagicTaskAttemptsPath(jobUUID, dest), String.valueOf(context.getTaskAttemptID())); }
/** * Get the base Magic attempt path, without any annotations to mark relative * references. * @param context task context. * @param jobUUID unique Job ID. * @param dest The output path to commit work into * @return the path under which all attempts go */
Get the base Magic attempt path, without any annotations to mark relative references
getBaseMagicTaskAttemptPath
{ "repo_name": "apurtell/hadoop", "path": "hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/commit/CommitUtilsWithMR.java", "license": "apache-2.0", "size": 6856 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.mapreduce.TaskAttemptContext" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
973,714
Promise<Void> mkdir(String path, String perms);
Promise<Void> mkdir(String path, String perms);
/** * Create the directory represented by {@code path}, asynchronously. * <p> * The new directory will be created with permissions as specified by {@code perms}. * <p> * The permission String takes the form rwxr-x--- as specified * in <a href="http://download.oracle.com/javase/7/docs/api/j...
Create the directory represented by path, asynchronously. The new directory will be created with permissions as specified by perms. The permission String takes the form rwxr-x--- as specified in here. The operation will fail if the directory already exists
mkdir
{ "repo_name": "testn/vertx-when", "path": "vertx-when/src/main/java/com/englishtown/vertx/promises/WhenFileSystem.java", "license": "mit", "size": 11219 }
[ "com.englishtown.promises.Promise" ]
import com.englishtown.promises.Promise;
import com.englishtown.promises.*;
[ "com.englishtown.promises" ]
com.englishtown.promises;
2,678,295
public void info() { AppInfo info = new AppInfo(app, app.context); info("Application Master Overview"). _("Application ID:", info.getId()). _("Application Name:", info.getName()). _("User:", info.getUser()). _("Started on:", Times.format(info.getStartTime())). _("Elasped: ", org....
void function() { AppInfo info = new AppInfo(app, app.context); info(STR). _(STR, info.getId()). _(STR, info.getName()). _("User:", info.getUser()). _(STR, Times.format(info.getStartTime())). _(STR, org.apache.hadoop.util.StringUtils.formatTime( info.getElapsedTime() )); render(InfoPage.class); }
/** * Render the /info page with an overview of current application. */
Render the /info page with an overview of current application
info
{ "repo_name": "WIgor/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java", "license": "apache-2.0", "size": 12638 }
[ "org.apache.commons.lang.StringUtils", "org.apache.hadoop.mapreduce.v2.app.webapp.dao.AppInfo", "org.apache.hadoop.yarn.util.Times" ]
import org.apache.commons.lang.StringUtils; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.AppInfo; import org.apache.hadoop.yarn.util.Times;
import org.apache.commons.lang.*; import org.apache.hadoop.mapreduce.v2.app.webapp.dao.*; import org.apache.hadoop.yarn.util.*;
[ "org.apache.commons", "org.apache.hadoop" ]
org.apache.commons; org.apache.hadoop;
775,383