method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Set<String> getLocalNames() {
return context.keySet();
} | Set<String> function() { return context.keySet(); } | /**
* Returns all names of variables known to this scope (ignoring those of the parent scope).
*
* @return a set of all known variable names
*/ | Returns all names of variables known to this scope (ignoring those of the parent scope) | getLocalNames | {
"repo_name": "scireum/parsii",
"path": "src/main/java/parsii/eval/Scope.java",
"license": "mit",
"size": 7108
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 660,976 |
private void TypeDefsAnalyzeOk(String... typeDefs) {
for (String typeDefStr: typeDefs) {
ParseNode stmt = AnalyzesOk(String.format("CREATE TABLE t (i %s)", typeDefStr));
AnalyzesOk(String.format("CREATE TABLE t (i ARRAY<%s>)", typeDefStr));
AnalyzesOk(String.format("CREATE TABLE t (i STRUCT<f:%s... | void function(String... typeDefs) { for (String typeDefStr: typeDefs) { ParseNode stmt = AnalyzesOk(String.format(STR, typeDefStr)); AnalyzesOk(String.format(STR, typeDefStr)); AnalyzesOk(String.format(STR, typeDefStr)); Preconditions.checkState(stmt instanceof CreateTableStmt); CreateTableStmt createTableStmt = (Creat... | /**
* Wraps the given typeDefs in a CREATE TABLE stmt and runs AnalyzesOk().
* Also tests that the type is analyzes correctly in ARRAY, MAP, and STRUCT types.
*/ | Wraps the given typeDefs in a CREATE TABLE stmt and runs AnalyzesOk(). Also tests that the type is analyzes correctly in ARRAY, MAP, and STRUCT types | TypeDefsAnalyzeOk | {
"repo_name": "924060929/impala-frontend",
"path": "fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java",
"license": "apache-2.0",
"size": 183721
} | [
"com.google.common.base.Preconditions",
"org.apache.impala.catalog.Type"
] | import com.google.common.base.Preconditions; import org.apache.impala.catalog.Type; | import com.google.common.base.*; import org.apache.impala.catalog.*; | [
"com.google.common",
"org.apache.impala"
] | com.google.common; org.apache.impala; | 276,073 |
ServiceCall<Void> arrayStringCsvNullAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | ServiceCall<Void> arrayStringCsvNullAsync(List<String> arrayQuery, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | /**
* Get a null array of string using the csv-array format.
*
* @param arrayQuery a null array of string using the csv-array format
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
*... | Get a null array of string using the csv-array format | arrayStringCsvNullAsync | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/Queries.java",
"license": "mit",
"size": 45760
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.List"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 289,306 |
public void addBroader(Concept concept) {
checkNotNull(concept);
resource.addProperty(SKOS.broader, concept.getResource());
}
| void function(Concept concept) { checkNotNull(concept); resource.addProperty(SKOS.broader, concept.getResource()); } | /**
* Adds the specified concept as a parent (skos:broader) of this concept.
*
* @param concept
* the concept
*/ | Adds the specified concept as a parent (skos:broader) of this concept | addBroader | {
"repo_name": "Smartlogic-Semaphore-Limited/Java-APIs",
"path": "Semaphore-Model-Manipulation/src/main/java/com/smartlogic/semaphoremodel/Concept.java",
"license": "apache-2.0",
"size": 26583
} | [
"org.apache.jena.ext.com.google.common.base.Preconditions"
] | import org.apache.jena.ext.com.google.common.base.Preconditions; | import org.apache.jena.ext.com.google.common.base.*; | [
"org.apache.jena"
] | org.apache.jena; | 446,596 |
public TaskLabelWriter setReadinessCheck(HealthCheck readinessCheck) {
writer.put(
LabelConstants.READINESS_CHECK_LABEL,
LabelUtils.encodeHealthCheck(readinessCheck.toBuilder().setConsecutiveFailures(0).build()));
return this;
}
/**
* Updates the stored ... | TaskLabelWriter function(HealthCheck readinessCheck) { writer.put( LabelConstants.READINESS_CHECK_LABEL, LabelUtils.encodeHealthCheck(readinessCheck.toBuilder().setConsecutiveFailures(0).build())); return this; } /** * Updates the stored readiness check, if any, to have the provided environment variable. * Does nothing... | /**
* Stores an encoded version of the {@link HealthCheck} as a readiness check.
* Any existing stored readiness check is overwritten.
*/ | Stores an encoded version of the <code>HealthCheck</code> as a readiness check. Any existing stored readiness check is overwritten | setReadinessCheck | {
"repo_name": "vishnu2kmohan/dcos-commons",
"path": "sdk/scheduler/src/main/java/com/mesosphere/sdk/offer/taskdata/TaskLabelWriter.java",
"license": "apache-2.0",
"size": 6547
} | [
"com.mesosphere.sdk.offer.TaskException",
"org.apache.mesos.Protos"
] | import com.mesosphere.sdk.offer.TaskException; import org.apache.mesos.Protos; | import com.mesosphere.sdk.offer.*; import org.apache.mesos.*; | [
"com.mesosphere.sdk",
"org.apache.mesos"
] | com.mesosphere.sdk; org.apache.mesos; | 1,103,663 |
public static LongRange getReaderRestriction(CFlags flags) {
final long start = flags.isSet(CommonFlags.START_READ_ID) ? (Long) flags.getValue(CommonFlags.START_READ_ID) : LongRange.MISSING;
final long end = flags.isSet(CommonFlags.END_READ_ID) ? (Long) flags.getValue(CommonFlags.END_READ_ID) : LongRange.MISS... | static LongRange function(CFlags flags) { final long start = flags.isSet(CommonFlags.START_READ_ID) ? (Long) flags.getValue(CommonFlags.START_READ_ID) : LongRange.MISSING; final long end = flags.isSet(CommonFlags.END_READ_ID) ? (Long) flags.getValue(CommonFlags.END_READ_ID) : LongRange.MISSING; return new LongRange(sta... | /**
* Get the region defined by the start read and end read flags.
* @param flags the flags to get the region from
* @return the region to process
*/ | Get the region defined by the start read and end read flags | getReaderRestriction | {
"repo_name": "RealTimeGenomics/rtg-tools",
"path": "src/com/rtg/launcher/CommonFlags.java",
"license": "bsd-2-clause",
"size": 30102
} | [
"com.rtg.util.cli.CFlags",
"com.rtg.util.intervals.LongRange"
] | import com.rtg.util.cli.CFlags; import com.rtg.util.intervals.LongRange; | import com.rtg.util.cli.*; import com.rtg.util.intervals.*; | [
"com.rtg.util"
] | com.rtg.util; | 1,124,767 |
@SuppressWarnings("deprecation")
public static long calculateNetworkBufferMemory(long totalJavaMemorySize, Configuration config) {
Preconditions.checkArgument(totalJavaMemorySize > 0);
int segmentSize =
checkedDownCast(MemorySize.parse(config.getString(TaskManagerOptions.MEMORY_SEGMENT_SIZE)).getBytes());
... | @SuppressWarnings(STR) static long function(long totalJavaMemorySize, Configuration config) { Preconditions.checkArgument(totalJavaMemorySize > 0); int segmentSize = checkedDownCast(MemorySize.parse(config.getString(TaskManagerOptions.MEMORY_SEGMENT_SIZE)).getBytes()); final long networkBufBytes; if (TaskManagerService... | /**
* Calculates the amount of memory used for network buffers based on the total memory to use and
* the according configuration parameters.
*
* <p>The following configuration parameters are involved:
* <ul>
* <li>{@link TaskManagerOptions#NETWORK_BUFFERS_MEMORY_FRACTION},</li>
* <li>{@link TaskManager... | Calculates the amount of memory used for network buffers based on the total memory to use and the according configuration parameters. The following configuration parameters are involved: <code>TaskManagerOptions#NETWORK_BUFFERS_MEMORY_FRACTION</code>, <code>TaskManagerOptions#NETWORK_BUFFERS_MEMORY_MIN</code>, <code>Ta... | calculateNetworkBufferMemory | {
"repo_name": "ueshin/apache-flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java",
"license": "apache-2.0",
"size": 30443
} | [
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.MemorySize",
"org.apache.flink.configuration.TaskManagerOptions",
"org.apache.flink.util.MathUtils",
"org.apache.flink.util.Preconditions"
] | import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.MemorySize; import org.apache.flink.configuration.TaskManagerOptions; import org.apache.flink.util.MathUtils; import org.apache.flink.util.Preconditions; | import org.apache.flink.configuration.*; import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,191,645 |
public static Integer readInteger(DataInput in) throws IOException {
InternalDataSerializer.checkIn(in);
Integer value = in.readInt();
if (logger.isTraceEnabled(LogMarker.SERIALIZER_VERBOSE)) {
logger.trace(LogMarker.SERIALIZER_VERBOSE, "Read Integer {}", value);
}
return value;
} | static Integer function(DataInput in) throws IOException { InternalDataSerializer.checkIn(in); Integer value = in.readInt(); if (logger.isTraceEnabled(LogMarker.SERIALIZER_VERBOSE)) { logger.trace(LogMarker.SERIALIZER_VERBOSE, STR, value); } return value; } | /**
* Reads an instance of <code>Integer</code> from a <code>DataInput</code>.
*
* @throws IOException A problem occurs while reading from <code>in</code>
*/ | Reads an instance of <code>Integer</code> from a <code>DataInput</code> | readInteger | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/DataSerializer.java",
"license": "apache-2.0",
"size": 104615
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.geode.internal.InternalDataSerializer",
"org.apache.geode.internal.logging.log4j.LogMarker"
] | import java.io.DataInput; import java.io.IOException; import org.apache.geode.internal.InternalDataSerializer; import org.apache.geode.internal.logging.log4j.LogMarker; | import java.io.*; import org.apache.geode.internal.*; import org.apache.geode.internal.logging.log4j.*; | [
"java.io",
"org.apache.geode"
] | java.io; org.apache.geode; | 2,016,189 |
public final String getType(Uri url) {
IContentProvider provider = acquireExistingProvider(url);
if (provider != null) {
try {
return provider.getType(url);
} catch (RemoteException e) {
return null;
} catch (java.lang.Exception e) ... | final String function(Uri url) { IContentProvider provider = acquireExistingProvider(url); if (provider != null) { try { return provider.getType(url); } catch (RemoteException e) { return null; } catch (java.lang.Exception e) { return null; } finally { releaseProvider(provider); } } if (!SCHEME_CONTENT.equals(url.getSc... | /**
* Return the MIME type of the given content URL.
*
* @param url A Uri identifying content (either a list or specific type),
* using the content:// scheme.
* @return A MIME type for the content, or null if the URL is invalid or the type is unknown
*/ | Return the MIME type of the given content URL | getType | {
"repo_name": "lynnlyc/for-honeynet-reviewers",
"path": "CallbackDroid/android-environment/src/base/core/java/android/content/ContentResolver.java",
"license": "gpl-3.0",
"size": 59446
} | [
"android.app.ActivityManagerNative",
"android.net.Uri",
"android.os.RemoteException"
] | import android.app.ActivityManagerNative; import android.net.Uri; import android.os.RemoteException; | import android.app.*; import android.net.*; import android.os.*; | [
"android.app",
"android.net",
"android.os"
] | android.app; android.net; android.os; | 2,414,275 |
public int getMemorySize() {
// for example usage in a smart cache see nux.xom.pool.Pool
int PTR = VM.PTR;
int INT = VM.INT;
int size = 0;
size += VM.sizeOfObject(2*PTR + INT); // memory index
if (sortedFields != null) size += VM.sizeOfObjectArray(sortedFields.length);
size += VM.... | int function() { int PTR = VM.PTR; int INT = VM.INT; int size = 0; size += VM.sizeOfObject(2*PTR + INT); if (sortedFields != null) size += VM.sizeOfObjectArray(sortedFields.length); size += VM.sizeOfHashMap(fields.size()); Iterator iter = fields.entrySet().iterator(); while (iter.hasNext()) { Map.Entry entry = (Map.Ent... | /**
* Returns a reasonable approximation of the main memory [bytes] consumed by
* this instance. Useful for smart memory sensititive caches/pools. Assumes
* fieldNames are interned, whereas tokenized terms are memory-overlaid.
*
* @return the main memory consumption
*/ | Returns a reasonable approximation of the main memory [bytes] consumed by this instance. Useful for smart memory sensititive caches/pools. Assumes fieldNames are interned, whereas tokenized terms are memory-overlaid | getMemorySize | {
"repo_name": "Overruler/retired-apache-sources",
"path": "lucene-2.9.4/contrib/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java",
"license": "apache-2.0",
"size": 46725
} | [
"java.util.Iterator",
"java.util.Map"
] | import java.util.Iterator; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 318,559 |
private static int numNodes(List processSubtree) {
int nodes = 0;
for (Iterator i=processSubtree.iterator(); i.hasNext();) {
Process p = (Process)i.next();
nodes++;
nodes += numNodes(p.childList);
}
return nodes;
}
| static int function(List processSubtree) { int nodes = 0; for (Iterator i=processSubtree.iterator(); i.hasNext();) { Process p = (Process)i.next(); nodes++; nodes += numNodes(p.childList); } return nodes; } | /**
* Counts the number of nodes in the specified process tree.
*
* @param processSubtree the tree to cound nodes for
* @return the number of nodes
*/ | Counts the number of nodes in the specified process tree | numNodes | {
"repo_name": "steed717/bootchart-0.9",
"path": "src/org/bootchart/common/ProcessTree.java",
"license": "gpl-2.0",
"size": 19033
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,948,792 |
private List<String> parseString(String input){
return parseString (input, new ArrayList<String>());
} | List<String> function(String input){ return parseString (input, new ArrayList<String>()); } | /**
* Separates a string into smaller parts so that Google will not reject the request.
* @param input The string you want to separate
* @return A List<String> of the String fragments from your input..
*/ | Separates a string into smaller parts so that Google will not reject the request | parseString | {
"repo_name": "ericsonsarmento/java-speech-api",
"path": "src/com/darkprograms/speech/synthesiser/SynthesiserV2.java",
"license": "gpl-3.0",
"size": 9935
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,611,723 |
private static IProject createProject(String projectName) {
// Local Declarations
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
URI defaultProjectLocation = null;
String separator = System.getProperty("file.separator");
String userDir = System.getProperty("user.home") + separato... | static IProject function(String projectName) { IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); URI defaultProjectLocation = null; String separator = System.getProperty(STR); String userDir = System.getProperty(STR) + separator + STR + separator + STR; String projectPath = userDir + separator + ... | /**
* This operation creates a project that is used during the persistence and
* loading tests.
*
* @param projectName
* The name for the new project.
* @return The new Eclipse project.
*/ | This operation creates a project that is used during the persistence and loading tests | createProject | {
"repo_name": "eclipse/ice",
"path": "org.eclipse.ice.tests.persistence.xml/src/org/eclipse/ice/tests/persistence/xml/XMLPersistenceProviderTester.java",
"license": "epl-1.0",
"size": 14845
} | [
"java.io.File",
"org.eclipse.core.resources.IProject",
"org.eclipse.core.resources.IProjectDescription",
"org.eclipse.core.resources.IResource",
"org.eclipse.core.resources.IWorkspaceRoot",
"org.eclipse.core.resources.ResourcesPlugin",
"org.eclipse.core.runtime.CoreException",
"org.junit.Assert"
] | import java.io.File; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProjectDescription; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import ... | import java.io.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.junit.*; | [
"java.io",
"org.eclipse.core",
"org.junit"
] | java.io; org.eclipse.core; org.junit; | 819,474 |
public static Paint newGuidelinePaint() {
final Paint paint = new Paint();
paint.setColor(Color.parseColor(SEMI_TRANSPARENT));
paint.setStrokeWidth(DEFAULT_GUIDELINE_THICKNESS_PX);
return paint;
} | static Paint function() { final Paint paint = new Paint(); paint.setColor(Color.parseColor(SEMI_TRANSPARENT)); paint.setStrokeWidth(DEFAULT_GUIDELINE_THICKNESS_PX); return paint; } | /**
* Creates the Paint object for drawing the crop window guidelines.
*
* @return the new Paint object
*/ | Creates the Paint object for drawing the crop window guidelines | newGuidelinePaint | {
"repo_name": "tarksgit/Favorite-Android-Client",
"path": "Favorite/src/com/tarks/favorite/cropper/PaintUtil.java",
"license": "apache-2.0",
"size": 4408
} | [
"android.graphics.Color",
"android.graphics.Paint"
] | import android.graphics.Color; import android.graphics.Paint; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,700,253 |
IpAddress floatingIp(); | IpAddress floatingIp(); | /**
* Returns the floating ip address.
*
* @return floatingIp
*/ | Returns the floating ip address | floatingIp | {
"repo_name": "kuujo/onos",
"path": "apps/vtn/vtnrsc/src/main/java/org/onosproject/vtnrsc/FloatingIp.java",
"license": "apache-2.0",
"size": 2041
} | [
"org.onlab.packet.IpAddress"
] | import org.onlab.packet.IpAddress; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 2,510,189 |
public Certificate[] getCertificates() throws IOException
{
JarEntry entry = getJarEntry();
return entry != null ? entry.getCertificates() : null;
} | Certificate[] function() throws IOException { JarEntry entry = getJarEntry(); return entry != null ? entry.getCertificates() : null; } | /**
* Returns an array of Certificate objects for the jar file entry specified
* by this URL or null if there are none
*
* @return A Certificate array
*
* @exception IOException If an error occurs
*/ | Returns an array of Certificate objects for the jar file entry specified by this URL or null if there are none | getCertificates | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/net/JarURLConnection.java",
"license": "gpl-2.0",
"size": 7165
} | [
"java.io.IOException",
"java.security.cert.Certificate",
"java.util.jar.JarEntry"
] | import java.io.IOException; import java.security.cert.Certificate; import java.util.jar.JarEntry; | import java.io.*; import java.security.cert.*; import java.util.jar.*; | [
"java.io",
"java.security",
"java.util"
] | java.io; java.security; java.util; | 882,949 |
private static RPC.Server startRpcServer(OzoneConfiguration conf,
InetSocketAddress addr, Class<?> protocol, BlockingService instance,
int handlerCount) throws IOException {
RPC.Server rpcServer = new RPC.Builder(conf)
.setProtocol(protocol)
.setInstance(instance)
.setBindAddre... | static RPC.Server function(OzoneConfiguration conf, InetSocketAddress addr, Class<?> protocol, BlockingService instance, int handlerCount) throws IOException { RPC.Server rpcServer = new RPC.Builder(conf) .setProtocol(protocol) .setInstance(instance) .setBindAddress(addr.getHostString()) .setPort(addr.getPort()) .setNu... | /**
* Starts an RPC server, if configured.
*
* @param conf configuration
* @param addr configured address of RPC server
* @param protocol RPC protocol provided by RPC server
* @param instance RPC protocol implementation instance
* @param handlerCount RPC server handler count
*
* @return RPC s... | Starts an RPC server, if configured | startRpcServer | {
"repo_name": "szegedim/hadoop",
"path": "hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/ksm/KeySpaceManager.java",
"license": "apache-2.0",
"size": 29343
} | [
"com.google.protobuf.BlockingService",
"java.io.IOException",
"java.net.InetSocketAddress",
"org.apache.hadoop.hdds.conf.OzoneConfiguration",
"org.apache.hadoop.hdfs.DFSUtil",
"org.apache.hadoop.ipc.RPC"
] | import com.google.protobuf.BlockingService; import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.ipc.RPC; | import com.google.protobuf.*; import java.io.*; import java.net.*; import org.apache.hadoop.hdds.conf.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.ipc.*; | [
"com.google.protobuf",
"java.io",
"java.net",
"org.apache.hadoop"
] | com.google.protobuf; java.io; java.net; org.apache.hadoop; | 683,101 |
public static String getProperty(String key, String def)
{
SecurityManager sm = SecurityManager.current; // Be thread-safe.
if (sm != null)
sm.checkPropertyAccess(key);
// This handles both the null pointer exception and the illegal
// argument exception.
if (key.length() == 0)
throw... | static String function(String key, String def) { SecurityManager sm = SecurityManager.current; if (sm != null) sm.checkPropertyAccess(key); if (key.length() == 0) throw new IllegalArgumentException(STR); return SystemProperties.getProperty(key, def); } | /**
* Get a single system property by name. A security check may be performed,
* <code>checkPropertyAccess(key)</code>.
*
* @param key the name of the system property to get
* @param def the default
* @return the property, or def if not found
* @throws SecurityException if permission is denied
*... | Get a single system property by name. A security check may be performed, <code>checkPropertyAccess(key)</code> | getProperty | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/lang/System.java",
"license": "gpl-2.0",
"size": 39814
} | [
"gnu.classpath.SystemProperties"
] | import gnu.classpath.SystemProperties; | import gnu.classpath.*; | [
"gnu.classpath"
] | gnu.classpath; | 156,602 |
void multicast(Iterable<Player> players, Packet packet, boolean blocking); | void multicast(Iterable<Player> players, Packet packet, boolean blocking); | /**
* Sends a packet to multiple players.
*
* @param players Players.
* @param packet Packet.
* @param blocking If true, the method blocks until all packets are delivered.
*/ | Sends a packet to multiple players | multicast | {
"repo_name": "phxql/gamedev-server",
"path": "src/main/java/edu/hm/gamedev/server/services/communication/CommunicationService.java",
"license": "lgpl-3.0",
"size": 2346
} | [
"edu.hm.gamedev.server.model.Player",
"edu.hm.gamedev.server.packets.Packet"
] | import edu.hm.gamedev.server.model.Player; import edu.hm.gamedev.server.packets.Packet; | import edu.hm.gamedev.server.model.*; import edu.hm.gamedev.server.packets.*; | [
"edu.hm.gamedev"
] | edu.hm.gamedev; | 1,625,068 |
public static MultiLingualAnalyzer from(String spec) {
MultiLingualAnalyzerBuilder builder = builder();
Matcher matcher = Pattern.compile("(languageDetector|sentenceDetector|annotator)(?:\\.([a-z-]+))?\\s*=\\s*(\\S+)\\s*").matcher("");
for (String item : Splitter.on(';').trimResults().split(... | static MultiLingualAnalyzer function(String spec) { MultiLingualAnalyzerBuilder builder = builder(); Matcher matcher = Pattern.compile(STR).matcher(STRlanguageDetectorSTRsentenceDetectorSTRannotatorSTRProblem creating class for spec 'STR'STRProblem parsing spec 'STR'"); } } return builder.build(); } | /**
* Constructs an instance of this class from a string-based specification amenable to configuration (command line, file-based, etc). Details are in
* the class documentation.
* @param spec
* @return an instance of this class
*/ | Constructs an instance of this class from a string-based specification amenable to configuration (command line, file-based, etc). Details are in the class documentation | from | {
"repo_name": "gbierner/matchbook",
"path": "src/org/bierner/matchbook/analyzer/MultiLingualAnalyzer.java",
"license": "apache-2.0",
"size": 17688
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 211,693 |
@Override
public final int validOps() {
return SelectionKey.OP_ACCEPT;
} | final int function() { return SelectionKey.OP_ACCEPT; } | /**
* Returns an operation set identifying this channel's supported
* operations.
*
* <P> SCTP server channels only support the accepting of new
* associations, so this method returns
* {@link java.nio.channels.SelectionKey#OP_ACCEPT}.
*
* @return The valid-operation set
*/ | Returns an operation set identifying this channel's supported operations. SCTP server channels only support the accepting of new associations, so this method returns <code>java.nio.channels.SelectionKey#OP_ACCEPT</code> | validOps | {
"repo_name": "ohpauleez/soymacchiato",
"path": "src/jdk/src/share/classes/com/sun/nio/sctp/SctpServerChannel.java",
"license": "gpl-2.0",
"size": 16360
} | [
"java.nio.channels.SelectionKey"
] | import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,463,966 |
public Integer getTimeAllowed() {
return this.getInt(CommonParams.TIME_ALLOWED);
}
///////////////////////
// Utility functions
/////////////////////// | Integer function() { return this.getInt(CommonParams.TIME_ALLOWED); } | /**
* Get the maximum time allowed for this query.
*/ | Get the maximum time allowed for this query | getTimeAllowed | {
"repo_name": "Lythimus/lptv",
"path": "apache-solr-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/SolrQuery.java",
"license": "gpl-2.0",
"size": 22044
} | [
"org.apache.solr.common.params.CommonParams"
] | import org.apache.solr.common.params.CommonParams; | import org.apache.solr.common.params.*; | [
"org.apache.solr"
] | org.apache.solr; | 1,713,041 |
@SuppressWarnings("unchecked")
private <T extends Module, MT extends ModuleHandler> LinkedHashMap<T, MT> getChildHandlers(
Map<String, Object> compositeConfig, List<T> childModules, String ruleUID) {
LinkedHashMap<T, MT> mapModuleToHandler = new LinkedHashMap<T, MT>();
for (T child :... | @SuppressWarnings(STR) <T extends Module, MT extends ModuleHandler> LinkedHashMap<T, MT> function( Map<String, Object> compositeConfig, List<T> childModules, String ruleUID) { LinkedHashMap<T, MT> mapModuleToHandler = new LinkedHashMap<T, MT>(); for (T child : childModules) { ruleEngine.updateMapModuleTypeToRule(ruleUI... | /**
* This method associates module handlers to the child modules of composite module types. It links module types of
* child modules to the rule which contains this composite module. It also resolve links between child configuration
* properties and configuration of composite module see: {@link #resolve... | This method associates module handlers to the child modules of composite module types. It links module types of child modules to the rule which contains this composite module. It also resolve links between child configuration properties and configuration of composite module see: <code>#resolveConfigurationProperties(Ma... | getChildHandlers | {
"repo_name": "marinmitev/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.core/src/main/java/org/eclipse/smarthome/automation/core/internal/composite/CompositeModuleHandlerFactory.java",
"license": "epl-1.0",
"size": 9695
} | [
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"org.eclipse.smarthome.automation.Module",
"org.eclipse.smarthome.automation.core.internal.ReferenceResolverUtil",
"org.eclipse.smarthome.automation.handler.ModuleHandler",
"org.eclipse.smarthome.automation.handler.ModuleHandlerFactory"
] | import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.eclipse.smarthome.automation.Module; import org.eclipse.smarthome.automation.core.internal.ReferenceResolverUtil; import org.eclipse.smarthome.automation.handler.ModuleHandler; import org.eclipse.smarthome.automation.handler.ModuleH... | import java.util.*; import org.eclipse.smarthome.automation.*; import org.eclipse.smarthome.automation.core.internal.*; import org.eclipse.smarthome.automation.handler.*; | [
"java.util",
"org.eclipse.smarthome"
] | java.util; org.eclipse.smarthome; | 1,617,424 |
public List<Tuple3<FieldsVariant, FieldsDescribes, FieldsSubsystem>> getRelationshipIsDescribedBy(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(ids);
ar... | List<Tuple3<FieldsVariant, FieldsDescribes, FieldsSubsystem>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.add(relFields); args.add(toFie... | /**
* <p>Original spec-file function name: get_relationship_IsDescribedBy</p>
* <pre>
* </pre>
* @param ids instance of list of String
* @param fromFields instance of list of String
* @param relFields instance of list of String
* @param toFields instance of list of Str... | Original spec-file function name: get_relationship_IsDescribedBy <code> </code> | getRelationshipIsDescribedBy | {
"repo_name": "kbase/trees",
"path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java",
"license": "mit",
"size": 869221
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.Tuple3"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 1,967,549 |
void setOnKeyStatusChangeListener(@Nullable OnKeyStatusChangeListener listener); | void setOnKeyStatusChangeListener(@Nullable OnKeyStatusChangeListener listener); | /**
* Sets the listener for key status change events.
*
* <p>This is an optional method, and some implementations may only support it on certain Android
* API levels.
*
* @param listener The listener to receive events, or {@code null} to stop receiving events.
* @throws UnsupportedOperationExceptio... | Sets the listener for key status change events. This is an optional method, and some implementations may only support it on certain Android API levels | setOnKeyStatusChangeListener | {
"repo_name": "ened/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/drm/ExoMediaDrm.java",
"license": "apache-2.0",
"size": 20536
} | [
"androidx.annotation.Nullable"
] | import androidx.annotation.Nullable; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 358,236 |
protected Component createContentPanel() {
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
panel.add(new JLabel(resources.getString("AddMediumDialog.label")),
BorderLayout.WEST);
m... | Component function() { JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); panel.add(new JLabel(resources.getString(STR)), BorderLayout.WEST); medium = new JComboBox(); medium.setEditable(true); String media = resources.getString(STR); StringTokenizer tokens = ne... | /**
* Returns the panel to enter a new CSS medium.
*/ | Returns the panel to enter a new CSS medium | createContentPanel | {
"repo_name": "apache/batik",
"path": "batik-gui-util/src/main/java/org/apache/batik/util/gui/CSSMediaPanel.java",
"license": "apache-2.0",
"size": 19572
} | [
"java.awt.BorderLayout",
"java.awt.Component",
"java.util.StringTokenizer",
"javax.swing.BorderFactory",
"javax.swing.JComboBox",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import java.awt.Component; import java.util.StringTokenizer; import javax.swing.BorderFactory; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import java.util.*; import javax.swing.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 2,114,171 |
public void addBetaConstraint(BetaNodeFieldConstraint constraint) {
if ( constraint != null ) {
BetaNodeFieldConstraint[] tmp = this.betaConstraints;
this.betaConstraints = new BetaNodeFieldConstraint[tmp.length + 1];
System.arraycopy( tmp,
0... | void function(BetaNodeFieldConstraint constraint) { if ( constraint != null ) { BetaNodeFieldConstraint[] tmp = this.betaConstraints; this.betaConstraints = new BetaNodeFieldConstraint[tmp.length + 1]; System.arraycopy( tmp, 0, this.betaConstraints, 0, tmp.length ); this.betaConstraints[this.betaConstraints.length - 1]... | /**
* Adds a beta constraint to this multi field OR constraint
* @param constraint
*/ | Adds a beta constraint to this multi field OR constraint | addBetaConstraint | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/drools-master/drools-core/src/main/java/org/drools/core/rule/AbstractCompositeConstraint.java",
"license": "mit",
"size": 11064
} | [
"org.drools.core.spi.BetaNodeFieldConstraint",
"org.drools.core.spi.Constraint"
] | import org.drools.core.spi.BetaNodeFieldConstraint; import org.drools.core.spi.Constraint; | import org.drools.core.spi.*; | [
"org.drools.core"
] | org.drools.core; | 1,967,246 |
public Pair<Integer, JVar> declareClassConstField(String prefix, JType t, JExpression init,
Function<DrillBuf, ? extends ValueHolder> function) {
JVar var;
int depth = 1;
if (innerClassGenerator != null) {
Pair<Integer, JVar> nested = innerClassGen... | Pair<Integer, JVar> function(String prefix, JType t, JExpression init, Function<DrillBuf, ? extends ValueHolder> function) { JVar var; int depth = 1; if (innerClassGenerator != null) { Pair<Integer, JVar> nested = innerClassGenerator.declareClassConstField(prefix, t, init, function); depth = nested.getKey() + 1; var = ... | /**
* declare a constant field for the class.
* argument {@code function} holds the constant value which
* returns a value holder must be set to the class field when the class instance created.
* the class field innerClassField will be created if innerClassGenerator exists.
*
* @param prefix the prefi... | declare a constant field for the class. argument function holds the constant value which returns a value holder must be set to the class field when the class instance created. the class field innerClassField will be created if innerClassGenerator exists | declareClassConstField | {
"repo_name": "kkhatua/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/expr/ClassGenerator.java",
"license": "apache-2.0",
"size": 32097
} | [
"com.sun.codemodel.JExpression",
"com.sun.codemodel.JMod",
"com.sun.codemodel.JType",
"com.sun.codemodel.JVar",
"io.netty.buffer.DrillBuf",
"org.apache.calcite.util.Pair",
"org.apache.drill.exec.expr.holders.ValueHolder",
"org.apache.drill.shaded.guava.com.google.common.base.Function"
] | import com.sun.codemodel.JExpression; import com.sun.codemodel.JMod; import com.sun.codemodel.JType; import com.sun.codemodel.JVar; import io.netty.buffer.DrillBuf; import org.apache.calcite.util.Pair; import org.apache.drill.exec.expr.holders.ValueHolder; import org.apache.drill.shaded.guava.com.google.common.base.Fun... | import com.sun.codemodel.*; import io.netty.buffer.*; import org.apache.calcite.util.*; import org.apache.drill.exec.expr.holders.*; import org.apache.drill.shaded.guava.com.google.common.base.*; | [
"com.sun.codemodel",
"io.netty.buffer",
"org.apache.calcite",
"org.apache.drill"
] | com.sun.codemodel; io.netty.buffer; org.apache.calcite; org.apache.drill; | 1,352,086 |
public boolean isDatabaseConnectionUsed(DatabaseMeta databaseMeta)
{
for (int i=0;i<nrSteps();i++)
{
StepMeta stepMeta = getStep(i);
DatabaseMeta dbs[] = stepMeta.getStepMetaInterface().getUsedDatabaseConnections();
for (int d=0;d<dbs.length;d++)
{... | boolean function(DatabaseMeta databaseMeta) { for (int i=0;i<nrSteps();i++) { StepMeta stepMeta = getStep(i); DatabaseMeta dbs[] = stepMeta.getStepMetaInterface().getUsedDatabaseConnections(); for (int d=0;d<dbs.length;d++) { if (dbs[d].equals(databaseMeta)) return true; } } if (transLogTable.getDatabaseMeta()!=null &&... | /**
* This method asks all steps in the transformation whether or not the specified database connection is used.
* The connection is used in the transformation if any of the steps uses it or if it is being used to log to.
*
* @param databaseMeta The connection to check
* @return true if the co... | This method asks all steps in the transformation whether or not the specified database connection is used. The connection is used in the transformation if any of the steps uses it or if it is being used to log to | isDatabaseConnectionUsed | {
"repo_name": "lihongqiang/kettle-4.4.0-stable",
"path": "src/org/pentaho/di/trans/TransMeta.java",
"license": "apache-2.0",
"size": 249634
} | [
"java.util.List",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.trans.step.StepMeta"
] | import java.util.List; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.trans.step.StepMeta; | import java.util.*; import org.pentaho.di.core.database.*; import org.pentaho.di.trans.step.*; | [
"java.util",
"org.pentaho.di"
] | java.util; org.pentaho.di; | 643,475 |
protected SnmpAssetAdapterConfiguration getConfiguration() {
getReadLock().lock();
try {
return m_config;
} finally {
getReadLock().unlock();
}
} | SnmpAssetAdapterConfiguration function() { getReadLock().lock(); try { return m_config; } finally { getReadLock().unlock(); } } | /**
* Return the configuration object.
*
* @return a {@link org.opennms.netmgt.config.snmpAsset.adapter.SnmpAssetAdapterConfiguration} object.
*/ | Return the configuration object | getConfiguration | {
"repo_name": "tdefilip/opennms",
"path": "integrations/opennms-snmp-asset-provisioning-adapter/src/main/java/org/opennms/netmgt/config/SnmpAssetAdapterConfigManager.java",
"license": "agpl-3.0",
"size": 7433
} | [
"org.opennms.netmgt.config.snmpAsset.adapter.SnmpAssetAdapterConfiguration"
] | import org.opennms.netmgt.config.snmpAsset.adapter.SnmpAssetAdapterConfiguration; | import org.opennms.netmgt.config.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 681,492 |
@SuppressWarnings("unchecked")
private void generateMethodStub(
AST ast,
ITypeBinding scope,
List<BodyDeclaration> scopeBody,
IMethodBinding method,
Type returnType) {
MethodDeclaration decl = ast.newMethodDeclaration();
decl.setName(ast.newSimpleName(method.getName()));
/... | @SuppressWarnings(STR) void function( AST ast, ITypeBinding scope, List<BodyDeclaration> scopeBody, IMethodBinding method, Type returnType) { MethodDeclaration decl = ast.newMethodDeclaration(); decl.setName(ast.newSimpleName(method.getName())); decl.setReturnType2(returnType); for (ITypeBinding typeParamBinding : meth... | /**
* Add a method stub, the body of which throws an assertion error, to a type.
*/ | Add a method stub, the body of which throws an assertion error, to a type | generateMethodStub | {
"repo_name": "rwl/j2objc",
"path": "src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java",
"license": "apache-2.0",
"size": 34319
} | [
"java.util.List",
"org.eclipse.jdt.core.dom.Block",
"org.eclipse.jdt.core.dom.BodyDeclaration",
"org.eclipse.jdt.core.dom.IMethodBinding",
"org.eclipse.jdt.core.dom.ITypeBinding",
"org.eclipse.jdt.core.dom.MethodDeclaration",
"org.eclipse.jdt.core.dom.Modifier",
"org.eclipse.jdt.core.dom.SingleVariabl... | import java.util.List; import org.eclipse.jdt.core.dom.Block; import org.eclipse.jdt.core.dom.BodyDeclaration; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.Modifier; import org.eclipse.jdt... | import java.util.*; import org.eclipse.jdt.core.dom.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 280,804 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(DropAllForeignKeyConstraintsType.class)) {
case DbchangelogPackage.DROP_ALL_FOREIGN_KEY_CONSTRAINTS_TYPE__BASE_TABLE_CATALOG_NAME:
case DbchangelogPackage.DROP_ALL_FOREIGN_KEY_... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(DropAllForeignKeyConstraintsType.class)) { case DbchangelogPackage.DROP_ALL_FOREIGN_KEY_CONSTRAINTS_TYPE__BASE_TABLE_CATALOG_NAME: case DbchangelogPackage.DROP_ALL_FOREIGN_KEY_CONSTRAINTS_TYPE__BASE_TABLE_NAME: ca... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "dzonekl/LiquibaseEditor",
"path": "plugins/org.liquidbase.model.edit/src/org/liquibase/xml/ns/dbchangelog/provider/DropAllForeignKeyConstraintsTypeItemProvider.java",
"license": "mit",
"size": 7024
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.liquibase.xml.ns.dbchangelog.DbchangelogPackage",
"org.liquibase.xml.ns.dbchangelog.DropAllForeignKeyConstraintsType"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.liquibase.xml.ns.dbchangelog.DbchangelogPackage; import org.liquibase.xml.ns.dbchangelog.DropAllForeignKeyConstraintsType; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.liquibase.xml.ns.dbchangelog.*; | [
"org.eclipse.emf",
"org.liquibase.xml"
] | org.eclipse.emf; org.liquibase.xml; | 196,945 |
public OHttpResponseWrapper sendStream(final int iCode, final String iReason, final String iContentType,
final InputStream iContent, final long iSize, final String iFileName) throws IOException {
response.sendStream(iCode, iReason, iContentType, iContent, iSize, iFileName);
return this;
} | OHttpResponseWrapper function(final int iCode, final String iReason, final String iContentType, final InputStream iContent, final long iSize, final String iFileName) throws IOException { response.sendStream(iCode, iReason, iContentType, iContent, iSize, iFileName); return this; } | /**
* Sends the complete HTTP response in one call specifying a stream as content.
*
* @param iCode
* HTTP response's Code
* @param iReason
* Response's reason
* @param iContentType
* Response's content type
* @param iContent
* java.io.InputStream objec... | Sends the complete HTTP response in one call specifying a stream as content | sendStream | {
"repo_name": "delebash/orientdb-parent",
"path": "server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponseWrapper.java",
"license": "apache-2.0",
"size": 11003
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 334,674 |
private void saslProcess(RpcSaslProto saslMessage)
throws RpcServerException, IOException, InterruptedException {
if (saslContextEstablished) {
throw new FatalRpcServerException(
RpcErrorCodeProto.FATAL_INVALID_RPC_HEADER,
new SaslException("Negotiation is already compl... | void function(RpcSaslProto saslMessage) throws RpcServerException, IOException, InterruptedException { if (saslContextEstablished) { throw new FatalRpcServerException( RpcErrorCodeProto.FATAL_INVALID_RPC_HEADER, new SaslException(STR)); } RpcSaslProto saslResponse = null; try { try { saslResponse = processSaslMessage(s... | /**
* Process saslMessage and send saslResponse back
* @param saslMessage received SASL message
* @throws RpcServerException setup failed due to SASL negotiation
* failure, premature or invalid connection context, or other state
* errors. This exception needs to be sent to the ... | Process saslMessage and send saslResponse back | saslProcess | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java",
"license": "apache-2.0",
"size": 129104
} | [
"java.io.IOException",
"javax.security.sasl.Sasl",
"javax.security.sasl.SaslException",
"org.apache.hadoop.ipc.protobuf.RpcHeaderProtos",
"org.apache.hadoop.util.StringUtils"
] | import java.io.IOException; import javax.security.sasl.Sasl; import javax.security.sasl.SaslException; import org.apache.hadoop.ipc.protobuf.RpcHeaderProtos; import org.apache.hadoop.util.StringUtils; | import java.io.*; import javax.security.sasl.*; import org.apache.hadoop.ipc.protobuf.*; import org.apache.hadoop.util.*; | [
"java.io",
"javax.security",
"org.apache.hadoop"
] | java.io; javax.security; org.apache.hadoop; | 91,566 |
public Intent putExtras(Bundle extras) {
if (mExtras == null) {
mExtras = new Bundle();
}
mExtras.putAll(extras);
return this;
} | Intent function(Bundle extras) { if (mExtras == null) { mExtras = new Bundle(); } mExtras.putAll(extras); return this; } | /**
* Add a set of extended data to the intent. The keys must include a package
* prefix, for example the app com.android.contacts would use names
* like "com.android.contacts.ShowAll".
*
* @param extras The Bundle of extras to add to this intent.
*
* @see #putExtra
* @see #remo... | Add a set of extended data to the intent. The keys must include a package prefix, for example the app com.android.contacts would use names like "com.android.contacts.ShowAll" | putExtras | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/content/Intent.java",
"license": "gpl-3.0",
"size": 343964
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,598,446 |
void onCollectionUpdate(Object collection, Serializable key) throws CallbackException; | void onCollectionUpdate(Object collection, Serializable key) throws CallbackException; | /**
* Called before a collection is updated.
*
* @param collection The collection instance.
* @param key The collection key value.
*
* @throws CallbackException Thrown if the interceptor encounters any problems handling the callback.
*/ | Called before a collection is updated | onCollectionUpdate | {
"repo_name": "1fechner/FeatureExtractor",
"path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/Interceptor.java",
"license": "lgpl-2.1",
"size": 11158
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 839,530 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<PrivateLinkResourceInner> list(String resourceGroupName, String vaultName) {
return new PagedIterable<>(listAsync(resourceGroupName, vaultName));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<PrivateLinkResourceInner> function(String resourceGroupName, String vaultName) { return new PagedIterable<>(listAsync(resourceGroupName, vaultName)); } | /**
* Returns the list of private link resources that need to be created for Backup and SiteRecovery.
*
* @param resourceGroupName The name of the resource group where the recovery services vault is present.
* @param vaultName The name of the recovery services vault.
* @throws IllegalArgumentEx... | Returns the list of private link resources that need to be created for Backup and SiteRecovery | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/recoveryservices/azure-resourcemanager-recoveryservices/src/main/java/com/azure/resourcemanager/recoveryservices/implementation/PrivateLinkResourcesOperationsClientImpl.java",
"license": "mit",
"size": 26123
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.recoveryservices.fluent.models.PrivateLinkResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.recoveryservices.fluent.models.PrivateLinkResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.recoveryservices.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,310,574 |
public int free() {
return INSTANCE.kstat2_free_matcher_list(ref);
}
}
class Kstat2Map extends PointerType {
public Kstat2Map() {
super();
}
public Kstat2Map(Pointer p) {
super(p);
} | int function() { return INSTANCE.kstat2_free_matcher_list(ref); } } class Kstat2Map extends PointerType { public Kstat2Map() { super(); } public Kstat2Map(Pointer p) { super(p); } | /**
* Convenience method for
* {@link Kstat2#kstat2_free_matcher_list(PointerByReference)} that frees the
* resources associated with the matcher list.
*
* @return Upon successful completion, returns a int value of
* {@link Kstat2#KSTAT2_S_OK}. If an error o... | Convenience method for <code>Kstat2#kstat2_free_matcher_list(PointerByReference)</code> that frees the resources associated with the matcher list | free | {
"repo_name": "hazendaz/oshi",
"path": "oshi-core/src/main/java/oshi/jna/platform/unix/Kstat2.java",
"license": "mit",
"size": 20409
} | [
"com.sun.jna.Pointer",
"com.sun.jna.PointerType"
] | import com.sun.jna.Pointer; import com.sun.jna.PointerType; | import com.sun.jna.*; | [
"com.sun.jna"
] | com.sun.jna; | 1,753,322 |
private List<Noten> dbAbfrageAllerNoten(int idStudienfach) {
List<Noten> liste = null;
try {
//Gibt die notenListe aufsteigend sortiert zurueck (muss man spaeter nicht nochmal sortieren):
liste = (List<Noten>) em.createNativeQuery("select n.* from noten n, studienfaecher s wh... | List<Noten> function(int idStudienfach) { List<Noten> liste = null; try { liste = (List<Noten>) em.createNativeQuery(STR + idStudienfach + STR, Noten.class).getResultList(); } catch (Exception ex) { throw new RuntimeException(ex); } if (liste.size() <= 0) { throw new RuntimeException(STR + idStudienfach); } return list... | /**
* Holt Liste der Noten eines Studienfaches aus der Datenbank
* @param idStudienfach
* @return List<Noten> -> Noten aus der Datenbank, die zum Studienfach
* (idStudienfach) gehoeren
*/ | Holt Liste der Noten eines Studienfaches aus der Datenbank | dbAbfrageAllerNoten | {
"repo_name": "vi-mschreiber/notenrechner",
"path": "src/main/java/de/hof/se2/sessionBean/StatistikBean.java",
"license": "gpl-2.0",
"size": 9074
} | [
"de.hof.se2.entity.Noten",
"java.util.List"
] | import de.hof.se2.entity.Noten; import java.util.List; | import de.hof.se2.entity.*; import java.util.*; | [
"de.hof.se2",
"java.util"
] | de.hof.se2; java.util; | 2,116,447 |
public StringValue sqlstate(Env env)
{
int code = errno();
return env.createString(Mysqli.lookupSqlstate(code));
} | StringValue function(Env env) { int code = errno(); return env.createString(Mysqli.lookupSqlstate(code)); } | /**
* Returns SQLSTATE error from previous statement operation.
*
* @param env the PHP executing environment
* @return the SQLSTATE (5-characters string) for
* the last error. '00000' means no error
*/ | Returns SQLSTATE error from previous statement operation | sqlstate | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/quercus/lib/db/MysqliStatement.java",
"license": "gpl-2.0",
"size": 12173
} | [
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.StringValue"
] | import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,639,184 |
public static String createRemoteReadOnlyUrl(
IRepositoryIdProvider repository) {
return createRemoteReadOnlyUrl(repository, HOST_DEFAULT);
} | static String function( IRepositoryIdProvider repository) { return createRemoteReadOnlyUrl(repository, HOST_DEFAULT); } | /**
* Create read-only URL used for repository remote configs
*
* @param repository
* @return URL
*/ | Create read-only URL used for repository remote configs | createRemoteReadOnlyUrl | {
"repo_name": "tsagi/JekyllForAndroid",
"path": "githublib/src/main/java/org/eclipse/egit/github/core/util/UrlUtils.java",
"license": "gpl-2.0",
"size": 4836
} | [
"org.eclipse.egit.github.core.IRepositoryIdProvider"
] | import org.eclipse.egit.github.core.IRepositoryIdProvider; | import org.eclipse.egit.github.core.*; | [
"org.eclipse.egit"
] | org.eclipse.egit; | 716,865 |
public Country getCountry(String ipAddress) {
InetAddress addr;
try {
addr = InetAddress.getByName(ipAddress);
}
catch (UnknownHostException e) {
return UNKNOWN_COUNTRY;
}
return getCountry(bytesToLong(addr.getAddress()));
} | Country function(String ipAddress) { InetAddress addr; try { addr = InetAddress.getByName(ipAddress); } catch (UnknownHostException e) { return UNKNOWN_COUNTRY; } return getCountry(bytesToLong(addr.getAddress())); } | /**
* Returns the country the IP address is in.
*
* @param ipAddress String version of an IP address, i.e. "127.0.0.1"
* @return the country the IP address is from.
*/ | Returns the country the IP address is in | getCountry | {
"repo_name": "ArcasCZ/GeoIPTools-Sponge",
"path": "src/main/java/com/maxmind/geoip/LookupService.java",
"license": "lgpl-3.0",
"size": 39857
} | [
"java.net.InetAddress",
"java.net.UnknownHostException"
] | import java.net.InetAddress; import java.net.UnknownHostException; | import java.net.*; | [
"java.net"
] | java.net; | 2,315,948 |
public void testRecovery() throws IOException {
int count;
boolean shouldHaveTranslog;
if (runningAgainstOldCluster) {
count = between(200, 300);
shouldHaveTranslog = randomBoolean();
indexRandomDocuments(count, true, true, i -> jsonBuilder()... | void function() throws IOException { int count; boolean shouldHaveTranslog; if (runningAgainstOldCluster) { count = between(200, 300); shouldHaveTranslog = randomBoolean(); indexRandomDocuments(count, true, true, i -> jsonBuilder().startObject().field("field", "value").endObject()); client().performRequest("POST", STR)... | /**
* Tests recovery of an index with or without a translog and the
* statistics we gather about that.
*/ | Tests recovery of an index with or without a translog and the statistics we gather about that | testRecovery | {
"repo_name": "mohit/elasticsearch",
"path": "qa/full-cluster-restart/src/test/java/org/elasticsearch/upgrades/FullClusterRestartIT.java",
"license": "apache-2.0",
"size": 46109
} | [
"java.io.IOException",
"java.util.Collections",
"java.util.HashMap",
"java.util.Map",
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"org.elasticsearch.Version",
"org.elasticsearch.common.Booleans",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.hamcrest.Matchers"
] | import java.io.IOException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.elasticsearch.Version; import org.elasticsearch.common.Booleans; import org.elasticsearch.common.xcontent.XContentFactory; import org.hamcr... | import java.io.*; import java.util.*; import java.util.regex.*; import org.elasticsearch.*; import org.elasticsearch.common.*; import org.elasticsearch.common.xcontent.*; import org.hamcrest.*; | [
"java.io",
"java.util",
"org.elasticsearch",
"org.elasticsearch.common",
"org.hamcrest"
] | java.io; java.util; org.elasticsearch; org.elasticsearch.common; org.hamcrest; | 263,015 |
public Builder withUserLocaleFrom( Locale userLocale) { // not named withUserLocale because of ambiguous calls when passing 'null'
this.userLocale = toLanguageTag(userLocale);
return this;
}
/**
* Set the HTTP requestor to use for issuing network requests to the... | Builder function( Locale userLocale) { this.userLocale = toLanguageTag(userLocale); return this; } /** * Set the HTTP requestor to use for issuing network requests to the Dropbox servers. * * <p> Defaults to {@link StandardHttpRequestor#INSTANCE}. * * @param httpRequestor HTTP requestor to use for network requests, nev... | /**
* Set the locale of the app user. User-visible messages returned by the Dropbox servers
* will be localized to this locale.
*
* <p> Defaults to {@code null}, which means strings will be localized according to the
* user's Dropbox locale preference.
*
* ... | Set the locale of the app user. User-visible messages returned by the Dropbox servers will be localized to this locale. Defaults to null, which means strings will be localized according to the user's Dropbox locale preference | withUserLocaleFrom | {
"repo_name": "dropbox/dropbox-sdk-java",
"path": "src/main/java/com/dropbox/core/DbxRequestConfig.java",
"license": "mit",
"size": 14127
} | [
"com.dropbox.core.http.StandardHttpRequestor",
"java.util.Locale"
] | import com.dropbox.core.http.StandardHttpRequestor; import java.util.Locale; | import com.dropbox.core.http.*; import java.util.*; | [
"com.dropbox.core",
"java.util"
] | com.dropbox.core; java.util; | 849,395 |
private Map retrieveEditingModes(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) {
Map editModeMap = null;
try {
final CashManagementDocument cmDoc = (CashManagementDocument) SpringContext.getB... | Map function(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) { Map editModeMap = null; try { final CashManagementDocument cmDoc = (CashManagementDocument) SpringContext.getBean(DocumentService.class).getByDocumentHeaderId(cas... | /**
* Retrieves the edit modes for the given cash management document
*
* @param cashManagementDocId the id of the cash management document to check
* @param presentationController the presentation controller of the cash management document
* @param docAuthorizer the cash management... | Retrieves the edit modes for the given cash management document | retrieveEditingModes | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/web/struts/DepositWizardAction.java",
"license": "agpl-3.0",
"size": 49729
} | [
"java.util.Map",
"java.util.Set",
"org.kuali.kfs.fp.document.CashManagementDocument",
"org.kuali.kfs.kns.document.authorization.TransactionalDocumentAuthorizer",
"org.kuali.kfs.kns.document.authorization.TransactionalDocumentPresentationController",
"org.kuali.kfs.krad.service.DocumentService",
"org.kua... | import java.util.Map; import java.util.Set; import org.kuali.kfs.fp.document.CashManagementDocument; import org.kuali.kfs.kns.document.authorization.TransactionalDocumentAuthorizer; import org.kuali.kfs.kns.document.authorization.TransactionalDocumentPresentationController; import org.kuali.kfs.krad.service.DocumentSer... | import java.util.*; import org.kuali.kfs.fp.document.*; import org.kuali.kfs.kns.document.authorization.*; import org.kuali.kfs.krad.service.*; import org.kuali.kfs.krad.util.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kew.api.exception.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 243,468 |
default boolean requiresContentForSubIndexerEvaluation(@NotNull IndexedFile file) {
return false;
} | default boolean requiresContentForSubIndexerEvaluation(@NotNull IndexedFile file) { return false; } | /**
* Determine should we load content to provide sub-indexer.
*/ | Determine should we load content to provide sub-indexer | requiresContentForSubIndexerEvaluation | {
"repo_name": "siosio/intellij-community",
"path": "platform/indexing-api/src/com/intellij/util/indexing/CompositeDataIndexer.java",
"license": "apache-2.0",
"size": 2351
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 359,190 |
static void rcvUnlockAll(CommsByteBuffer request, Conversation conversation, int requestNumber,
boolean allocatedFromBufferPool, boolean partOfExchange)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "rcvUnlockAll",
... | static void rcvUnlockAll(CommsByteBuffer request, Conversation conversation, int requestNumber, boolean allocatedFromBufferPool, boolean partOfExchange) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, STR, new Object[] { request, conversation, STRSTRconnectionObjectIdSTRconsumerObject... | /**
* Unlocks all locked messages on the server.
*
* Fields:
*
* BIT16 ConnectionObjectId
* BIT16 ConsumerSessionId
*
* @param request
* @param conversation
* @param requestNumber
* @param allocatedFromBufferPool
* @param partOfExchange
*/ | Unlocks all locked messages on the server. Fields: BIT16 ConnectionObjectId BIT16 ConsumerSessionId | rcvUnlockAll | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/clientsupport/StaticCATConsumer.java",
"license": "epl-1.0",
"size": 55258
} | [
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.ws.sib.comms.common.CommsByteBuffer",
"com.ibm.ws.sib.comms.server.ConversationState",
"com.ibm.ws.sib.jfapchannel.Conversation",
"com.ibm.ws.sib.utils.ras.SibTr"
] | import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.sib.comms.common.CommsByteBuffer; import com.ibm.ws.sib.comms.server.ConversationState; import com.ibm.ws.sib.jfapchannel.Conversation; import com.ibm.ws.sib.utils.ras.SibTr; | import com.ibm.websphere.ras.*; import com.ibm.ws.sib.comms.common.*; import com.ibm.ws.sib.comms.server.*; import com.ibm.ws.sib.jfapchannel.*; import com.ibm.ws.sib.utils.ras.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 557,848 |
MethodExpressionProvider withMethodExpression(MethodExpression methodExpression);
public interface ELContextProvider { | MethodExpressionProvider withMethodExpression(MethodExpression methodExpression); public interface ELContextProvider { | /**
* Sets a MethodExpression to invoke.
*
* @param methodExpression the method expression to set
* @return MethodExpressionProvider
* @throws SeedException if the methodExpression is null
*/ | Sets a MethodExpression to invoke | withMethodExpression | {
"repo_name": "kavi87/seed",
"path": "el/src/main/java/org/seedstack/seed/el/ELService.java",
"license": "mpl-2.0",
"size": 3905
} | [
"javax.el.MethodExpression"
] | import javax.el.MethodExpression; | import javax.el.*; | [
"javax.el"
] | javax.el; | 159,682 |
@Override
public int getInt() {
int remaining = this.curItem.remaining();
if (remaining >= Bytes.SIZEOF_INT) {
return this.curItem.getInt();
}
int n = 0;
for (int i = 0; i < Bytes.SIZEOF_INT; i++) {
n <<= 8;
n ^= get() & 0xFF;
}
return n;
} | int function() { int remaining = this.curItem.remaining(); if (remaining >= Bytes.SIZEOF_INT) { return this.curItem.getInt(); } int n = 0; for (int i = 0; i < Bytes.SIZEOF_INT; i++) { n <<= 8; n ^= get() & 0xFF; } return n; } | /**
* Returns the int value at the current position. Also advances the position by the size of int
*
* @return the int value at the current position
*/ | Returns the int value at the current position. Also advances the position by the size of int | getInt | {
"repo_name": "ultratendency/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/nio/MultiByteBuff.java",
"license": "apache-2.0",
"size": 33659
} | [
"org.apache.hadoop.hbase.util.Bytes"
] | import org.apache.hadoop.hbase.util.Bytes; | import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,587,891 |
Map<IgniteUuid, IgniteInternalFuture<?>> activeTaskFutures() {
Map<IgniteUuid, IgniteInternalFuture<?>> res = new HashMap<>();
for (Map.Entry<ClientChannel, Map<Long, ClientComputeTask<Object>>> chTasks : activeTasks.entrySet()) {
for (Map.Entry<Long, ClientComputeTask<Object>> task : c... | Map<IgniteUuid, IgniteInternalFuture<?>> activeTaskFutures() { Map<IgniteUuid, IgniteInternalFuture<?>> res = new HashMap<>(); for (Map.Entry<ClientChannel, Map<Long, ClientComputeTask<Object>>> chTasks : activeTasks.entrySet()) { for (Map.Entry<Long, ClientComputeTask<Object>> task : chTasks.getValue().entrySet()) res... | /**
* Gets tasks future for active tasks started by client.
* Used only for tests.
*
* @return Map of active tasks keyed by their unique per client task ID.
*/ | Gets tasks future for active tasks started by client. Used only for tests | activeTaskFutures | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/client/thin/ClientComputeImpl.java",
"license": "apache-2.0",
"size": 19874
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.ignite.client.ClientCompute",
"org.apache.ignite.internal.IgniteInternalFuture",
"org.apache.ignite.lang.IgniteUuid"
] | import java.util.HashMap; import java.util.Map; import org.apache.ignite.client.ClientCompute; import org.apache.ignite.internal.IgniteInternalFuture; import org.apache.ignite.lang.IgniteUuid; | import java.util.*; import org.apache.ignite.client.*; import org.apache.ignite.internal.*; import org.apache.ignite.lang.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,482,764 |
public void PropertyChanged(String ifaceName, final String propertyName, final Variant newValue)
throws BusException {
Map<String, Variant> propsChanged = new HashMap<String, Variant>();
String[] invalidatedProps;
if (newValue == null) {
invalidatedProps = new String[] {p... | void function(String ifaceName, final String propertyName, final Variant newValue) throws BusException { Map<String, Variant> propsChanged = new HashMap<String, Variant>(); String[] invalidatedProps; if (newValue == null) { invalidatedProps = new String[] {propertyName}; } else { invalidatedProps = new String[] {}; pro... | /**
* Sends the PropertyChanged signal.
*
* @param ifaceName name of the interface the property belongs to
* @param propertyName name of the property that is changed
* @param newValue Variant containing the new property value
* @throws BusException indicating failure to send the PropertyCh... | Sends the PropertyChanged signal | PropertyChanged | {
"repo_name": "octoblu/alljoyn",
"path": "alljoyn/alljoyn_java/src/org/alljoyn/bus/PropertyChangedEmitter.java",
"license": "isc",
"size": 6525
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,267,417 |
public long getDfsUsed() throws IOException {
return volumes.getDfsUsed();
} | long function() throws IOException { return volumes.getDfsUsed(); } | /**
* Return the total space used by dfs datanode
*/ | Return the total space used by dfs datanode | getDfsUsed | {
"repo_name": "ryanobjc/hadoop-cloudera",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java",
"license": "apache-2.0",
"size": 63084
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 538,394 |
public EntityTransaction getTransaction()
{
return _aConn.getTransaction();
} | EntityTransaction function() { return _aConn.getTransaction(); } | /**
* Returns the entity manager transaction.
*/ | Returns the entity manager transaction | getTransaction | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/amber/manager/EntityManagerExtendedProxy.java",
"license": "gpl-2.0",
"size": 10182
} | [
"javax.persistence.EntityTransaction"
] | import javax.persistence.EntityTransaction; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 427,426 |
EList<GmlStroke> getGmlStrokes(); | EList<GmlStroke> getGmlStrokes(); | /**
* Returns the value of the '<em><b>Gml Strokes</b></em>' reference list.
* The list contents are of type {@link gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlStroke}.
* It is bidirectional and its opposite is '{@link gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlStroke#getGmlMarks <em>Gml Marks</e... | Returns the value of the 'Gml Strokes' reference list. The list contents are of type <code>gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlStroke</code>. It is bidirectional and its opposite is '<code>gluemodel.CIM.IEC61970.Informative.InfGMLSupport.GmlStroke#getGmlMarks Gml Marks</code>'. If the meaning of the 'Gm... | getGmlStrokes | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfGMLSupport/GmlMark.java",
"license": "mit",
"size": 5620
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 54,184 |
public void addNode(Node node) {
nodeMap.put(node.getId(), node);
graph.put(node,
new LinkedHashSet<AbstractMap.SimpleEntry<Node, Edge>>());
} | void function(Node node) { nodeMap.put(node.getId(), node); graph.put(node, new LinkedHashSet<AbstractMap.SimpleEntry<Node, Edge>>()); } | /**
* Adds a node to the graph
*
* @param node
* the node to add
*/ | Adds a node to the graph | addNode | {
"repo_name": "limespace/VaadinGraphvizComponent",
"path": "vizcomponent-root/vizcomponent/src/main/java/com/vaadin/pontus/vizcomponent/model/Subgraph.java",
"license": "apache-2.0",
"size": 13215
} | [
"java.util.AbstractMap",
"java.util.LinkedHashSet"
] | import java.util.AbstractMap; import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 490,353 |
public DateFormatsBean getDateFormatsByLocale(Locale locale) {
if (locale==null) {
locale = Locale.ENGLISH;
}
DateFormatsBean dateFormatsBean = guiDateFormatsMap.get(locale);
if (dateFormatsBean==null) {
dateFormatsBean = new DateFormatsBean();
// at the GUI, present local times respecting time zone... | DateFormatsBean function(Locale locale) { if (locale==null) { locale = Locale.ENGLISH; } DateFormatsBean dateFormatsBean = guiDateFormatsMap.get(locale); if (dateFormatsBean==null) { dateFormatsBean = new DateFormatsBean(); TimeZone tzone = TimeZone.getDefault(); Calendar calendar = Calendar.getInstance(tzone, locale);... | /**
* Used for struts1 pages (because no automatic and locale dependent type conversion is made)
* @param locale
* @return
*/ | Used for struts1 pages (because no automatic and locale dependent type conversion is made) | getDateFormatsByLocale | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/util/DateTimeUtils.java",
"license": "gpl-3.0",
"size": 26707
} | [
"java.text.DateFormat",
"java.text.SimpleDateFormat",
"java.util.Calendar",
"java.util.Locale",
"java.util.TimeZone"
] | import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 953,580 |
public NodeDefinition getDefinition()
throws RepositoryException; | NodeDefinition function() throws RepositoryException; | /**
* Returns a description of the node.
*/ | Returns a description of the node | getDefinition | {
"repo_name": "christianchristensen/resin",
"path": "modules/jcr/src/javax/jcr/Node.java",
"license": "gpl-2.0",
"size": 15758
} | [
"javax.jcr.nodetype.NodeDefinition"
] | import javax.jcr.nodetype.NodeDefinition; | import javax.jcr.nodetype.*; | [
"javax.jcr"
] | javax.jcr; | 1,218,559 |
public void addGroupingElement(XPathNode xPathNode) {
if (null == groupingElements) {
groupingElements = new ArrayList(2);
}
groupingElements.add(xPathNode);
}
| void function(XPathNode xPathNode) { if (null == groupingElements) { groupingElements = new ArrayList(2); } groupingElements.add(xPathNode); } | /**
* INTERNAL:
* If an XPathNode does not have an associated NodeValue then add it to the
* MarshalRecord as a grouping element.
* @param xPathNode
*/ | If an XPathNode does not have an associated NodeValue then add it to the MarshalRecord as a grouping element | addGroupingElement | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/record/MarshalRecord.java",
"license": "epl-1.0",
"size": 34162
} | [
"java.util.ArrayList",
"org.eclipse.persistence.internal.oxm.XPathNode"
] | import java.util.ArrayList; import org.eclipse.persistence.internal.oxm.XPathNode; | import java.util.*; import org.eclipse.persistence.internal.oxm.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 1,524,557 |
protected void addNetworkComponent(NetworkComponent networkComponent) {
this.addNetworkComponent(networkComponent, true);
}
| void function(NetworkComponent networkComponent) { this.addNetworkComponent(networkComponent, true); } | /**
* Adds a new network component to the list of components in the table.
* @param networkComponent the network component
*/ | Adds a new network component to the list of components in the table | addNetworkComponent | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.awb.env.networkModel/src/org/awb/env/networkModel/controller/ui/NetworkComponentTablePanel.java",
"license": "lgpl-2.1",
"size": 36116
} | [
"org.awb.env.networkModel.NetworkComponent"
] | import org.awb.env.networkModel.NetworkComponent; | import org.awb.env.*; | [
"org.awb.env"
] | org.awb.env; | 1,636,294 |
void containsMapEntry(@NotNull String property,
@NotNull Revision revision,
boolean exists) {
if (isNew) {
throw new IllegalStateException("Cannot use containsMapEntry() on new document");
}
Condition c = exists ? Condition.EXIS... | void containsMapEntry(@NotNull String property, @NotNull Revision revision, boolean exists) { if (isNew) { throw new IllegalStateException(STR); } Condition c = exists ? Condition.EXISTS : Condition.MISSING; getOrCreateConditions().put(new Key(property, checkNotNull(revision)), c); } | /**
* Checks if the named key exists or is absent in the document. This
* method can be used to make a conditional update.
*
* @param property the property name
* @param revision the revision
*/ | Checks if the named key exists or is absent in the document. This method can be used to make a conditional update | containsMapEntry | {
"repo_name": "stillalex/jackrabbit-oak",
"path": "oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/UpdateOp.java",
"license": "apache-2.0",
"size": 18178
} | [
"com.google.common.base.Preconditions",
"org.jetbrains.annotations.NotNull"
] | import com.google.common.base.Preconditions; import org.jetbrains.annotations.NotNull; | import com.google.common.base.*; import org.jetbrains.annotations.*; | [
"com.google.common",
"org.jetbrains.annotations"
] | com.google.common; org.jetbrains.annotations; | 312,525 |
public static ExtensionList<QueueDecisionHandler> all() {
return Jenkins.getInstance().getExtensionList(QueueDecisionHandler.class);
}
}
public static final class WaitingItem extends Item implements Comparable<WaitingItem> {
private static final AtomicInteger COUNTER = new Atomi... | static ExtensionList<QueueDecisionHandler> function() { return Jenkins.getInstance().getExtensionList(QueueDecisionHandler.class); } } public static final class WaitingItem extends Item implements Comparable<WaitingItem> { private static final AtomicInteger COUNTER = new AtomicInteger(0); public Calendar timestamp; pub... | /**
* All registered {@link QueueDecisionHandler}s
* @return
*/ | All registered <code>QueueDecisionHandler</code>s | all | {
"repo_name": "0814jimmy/jenkins",
"path": "core/src/main/java/hudson/model/Queue.java",
"license": "mit",
"size": 65554
} | [
"hudson.model.queue.FutureImpl",
"java.util.Calendar",
"java.util.List",
"java.util.concurrent.atomic.AtomicInteger"
] | import hudson.model.queue.FutureImpl; import java.util.Calendar; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; | import hudson.model.queue.*; import java.util.*; import java.util.concurrent.atomic.*; | [
"hudson.model.queue",
"java.util"
] | hudson.model.queue; java.util; | 30,161 |
protected static DynaClass createDynaClass() {
final int[] intArray = new int[0];
final String[] stringArray = new String[0];
final DynaClass dynaClass = new BasicDynaClass
("TestDynaClass", null,
new DynaProperty[]{
new D... | static DynaClass function() { final int[] intArray = new int[0]; final String[] stringArray = new String[0]; final DynaClass dynaClass = new BasicDynaClass (STR, null, new DynaProperty[]{ new DynaProperty(STR, Boolean.TYPE), new DynaProperty(STR, Boolean.TYPE), new DynaProperty(STR, Byte.TYPE), new DynaProperty(STR, Do... | /**
* Create and return a {@code DynaClass} instance for our test
* {@code DynaBean}.
*/ | Create and return a DynaClass instance for our test DynaBean | createDynaClass | {
"repo_name": "apache/commons-beanutils",
"path": "src/test/java/org/apache/commons/beanutils2/DynaBeanUtilsTestCase.java",
"license": "apache-2.0",
"size": 50243
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 867,280 |
@Test
public void testNextTag() throws XmlPullParserException, IOException {
Set<Integer> acceptableTags = new HashSet<Integer>();
acceptableTags.add(XmlResourceParser.START_TAG);
acceptableTags.add(XmlResourceParser.END_TAG);
forgeAndOpenDocument("<foo><bar/><text>message</text></foo>");
int e... | void function() throws XmlPullParserException, IOException { Set<Integer> acceptableTags = new HashSet<Integer>(); acceptableTags.add(XmlResourceParser.START_TAG); acceptableTags.add(XmlResourceParser.END_TAG); forgeAndOpenDocument(STR); int evt; do { evt = parser.next(); assertTrue(acceptableTags.contains(evt)); } whi... | /**
* Test that next tag will only return tag events.
*/ | Test that next tag will only return tag events | testNextTag | {
"repo_name": "gabrielduque/robolectric",
"path": "robolectric/src/test/java/org/robolectric/res/XmlFileLoaderTest.java",
"license": "mit",
"size": 22836
} | [
"android.content.res.XmlResourceParser",
"java.io.IOException",
"java.util.HashSet",
"java.util.Set",
"org.junit.Assert",
"org.xmlpull.v1.XmlPullParserException"
] | import android.content.res.XmlResourceParser; import java.io.IOException; import java.util.HashSet; import java.util.Set; import org.junit.Assert; import org.xmlpull.v1.XmlPullParserException; | import android.content.res.*; import java.io.*; import java.util.*; import org.junit.*; import org.xmlpull.v1.*; | [
"android.content",
"java.io",
"java.util",
"org.junit",
"org.xmlpull.v1"
] | android.content; java.io; java.util; org.junit; org.xmlpull.v1; | 703,546 |
public static String getDayName(Context context, long dateInMillis) {
// If the date is today, return the localized version of "Today" instead of the actual
// day name.
Time t = new Time();
t.setToNow();
int julianDay = Time.getJulianDay(dateInMillis, t.gmtoff);
int... | static String function(Context context, long dateInMillis) { Time t = new Time(); t.setToNow(); int julianDay = Time.getJulianDay(dateInMillis, t.gmtoff); int currentJulianDay = Time.getJulianDay(System.currentTimeMillis(), t.gmtoff); if (julianDay == currentJulianDay) { return context.getString(R.string.today); } else... | /**
* Given a day, returns just the name to use for that day.
* E.g "today", "tomorrow", "wednesday".
*
* @param context Context to use for resource localization
* @param dateInMillis The date in milliseconds
* @return
*/ | Given a day, returns just the name to use for that day. E.g "today", "tomorrow", "wednesday" | getDayName | {
"repo_name": "Devin0xFFFFFF/android-sunshine-demo",
"path": "app/src/main/java/com/example/android/sunshine/app/Utility.java",
"license": "apache-2.0",
"size": 10643
} | [
"android.content.Context",
"android.text.format.Time",
"java.text.SimpleDateFormat"
] | import android.content.Context; import android.text.format.Time; import java.text.SimpleDateFormat; | import android.content.*; import android.text.format.*; import java.text.*; | [
"android.content",
"android.text",
"java.text"
] | android.content; android.text; java.text; | 1,346,728 |
public void logout(View view) {
Log.i(TAG, "Logging out");
TextView responseText = (TextView) findViewById(R.id.response_text);
responseText.setText(R.string.Logout);
// Logs user out from Google, null parameter can be replaced with a response listener like the one implement... | void function(View view) { Log.i(TAG, STR); TextView responseText = (TextView) findViewById(R.id.response_text); responseText.setText(R.string.Logout); GoogleAuthenticationManager.getInstance().logout(getApplicationContext(), null); } | /**
* Called when logout button is pressed.
* Logs out user from MCA.
* @param view the button pressed.
*/ | Called when logout button is pressed. Logs out user from MCA | logout | {
"repo_name": "ibm-bluemix-mobile-services/bms-samples-android-helloauthentication",
"path": "helloAuthentication/app/src/main/java/com/ibm/helloauthentication/MainActivity.java",
"license": "apache-2.0",
"size": 9442
} | [
"android.util.Log",
"android.view.View",
"android.widget.TextView",
"com.ibm.mobilefirstplatform.clientsdk.android.security.googleauthentication.GoogleAuthenticationManager"
] | import android.util.Log; import android.view.View; import android.widget.TextView; import com.ibm.mobilefirstplatform.clientsdk.android.security.googleauthentication.GoogleAuthenticationManager; | import android.util.*; import android.view.*; import android.widget.*; import com.ibm.mobilefirstplatform.clientsdk.android.security.googleauthentication.*; | [
"android.util",
"android.view",
"android.widget",
"com.ibm.mobilefirstplatform"
] | android.util; android.view; android.widget; com.ibm.mobilefirstplatform; | 2,690,859 |
@SuppressWarnings({"rawtypes"})
public String toString(Node node, Object value) {
RootNode rootNode = node.getRootNode();
final Class<? extends TruffleLanguage> languageClass = AccessorInstrumentHandler.nodesAccess().findLanguage(rootNode);
final TruffleLanguage.Env e... | @SuppressWarnings({STR}) String function(Node node, Object value) { RootNode rootNode = node.getRootNode(); final Class<? extends TruffleLanguage> languageClass = AccessorInstrumentHandler.nodesAccess().findLanguage(rootNode); final TruffleLanguage.Env env = AccessorInstrumentHandler.engineAccess().findEnv(vm, language... | /**
* Uses the original language of the node to print a string representation of this value.
* The behavior of this method is undefined if a type unknown to the language is passed as
* value.
*
* @param node a node
* @param value a known value of that language
... | Uses the original language of the node to print a string representation of this value. The behavior of this method is undefined if a type unknown to the language is passed as value | toString | {
"repo_name": "azadmanesh/sl-tracer",
"path": "truffle/com.oracle.truffle.api.instrumentation/src/com/oracle/truffle/api/instrumentation/TruffleInstrument.java",
"license": "gpl-2.0",
"size": 14338
} | [
"com.oracle.truffle.api.TruffleLanguage",
"com.oracle.truffle.api.instrumentation.InstrumentationHandler",
"com.oracle.truffle.api.nodes.Node",
"com.oracle.truffle.api.nodes.RootNode",
"java.lang.annotation.ElementType",
"java.lang.annotation.Retention",
"java.lang.annotation.RetentionPolicy",
"java.l... | import com.oracle.truffle.api.TruffleLanguage; import com.oracle.truffle.api.instrumentation.InstrumentationHandler; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.nodes.RootNode; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.Retenti... | import com.oracle.truffle.api.*; import com.oracle.truffle.api.instrumentation.*; import com.oracle.truffle.api.nodes.*; import java.lang.annotation.*; | [
"com.oracle.truffle",
"java.lang"
] | com.oracle.truffle; java.lang; | 1,381,136 |
public double getFitZoomFactor()
{
double result;
Dimension drawingSize = new Dimension (getVWidth(), getVHeight());
Dimension viewportSize = getWrapper().getViewRect().getSize();
result = (int) Math.min(getPctZoom()
* (double) viewportSize.width / drawingSize.width,
getPctZoom() * (double) viewport... | double function() { double result; Dimension drawingSize = new Dimension (getVWidth(), getVHeight()); Dimension viewportSize = getWrapper().getViewRect().getSize(); result = (int) Math.min(getPctZoom() * (double) viewportSize.width / drawingSize.width, getPctZoom() * (double) viewportSize.height / drawingSize.height); ... | /**
* Calculate the zoom factor that would
* make the pathway fit in the viewport.
*/ | Calculate the zoom factor that would make the pathway fit in the viewport | getFitZoomFactor | {
"repo_name": "egonw/pathvisio",
"path": "modules/org.pathvisio.core/src/org/pathvisio/core/view/VPathway.java",
"license": "apache-2.0",
"size": 71730
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,591,765 |
private void allocateManualCapacity(AbstractMachinesSlaPolicy sla, CapacityRequirements capacityToAllocate) throws MachinesSlaEnforcementInProgressException {
CapacityRequirementsPerAgent unallocatedCapacity = getUnallocatedCapacity(sla);
allocateManualCapacity(sla, capacityToAllocate, unallocated... | void function(AbstractMachinesSlaPolicy sla, CapacityRequirements capacityToAllocate) throws MachinesSlaEnforcementInProgressException { CapacityRequirementsPerAgent unallocatedCapacity = getUnallocatedCapacity(sla); allocateManualCapacity(sla, capacityToAllocate, unallocatedCapacity); } | /**
* Allocates the specified capacity on unallocated capacity that match the specified SLA
* @throws MachinesSlaEnforcementInProgressException
*/ | Allocates the specified capacity on unallocated capacity that match the specified SLA | allocateManualCapacity | {
"repo_name": "Gigaspaces/xap-openspaces",
"path": "src/main/java/org/openspaces/grid/gsm/machines/DefaultMachinesSlaEnforcementEndpoint.java",
"license": "apache-2.0",
"size": 92250
} | [
"org.openspaces.grid.gsm.capacity.CapacityRequirements",
"org.openspaces.grid.gsm.capacity.CapacityRequirementsPerAgent",
"org.openspaces.grid.gsm.machines.exceptions.MachinesSlaEnforcementInProgressException"
] | import org.openspaces.grid.gsm.capacity.CapacityRequirements; import org.openspaces.grid.gsm.capacity.CapacityRequirementsPerAgent; import org.openspaces.grid.gsm.machines.exceptions.MachinesSlaEnforcementInProgressException; | import org.openspaces.grid.gsm.capacity.*; import org.openspaces.grid.gsm.machines.exceptions.*; | [
"org.openspaces.grid"
] | org.openspaces.grid; | 90,302 |
public static Logger getPluginLogger() {
return pLogger;
} | static Logger function() { return pLogger; } | /**
* Retrieves the plugin logger
* @return the plugin logger
*/ | Retrieves the plugin logger | getPluginLogger | {
"repo_name": "tiagoratto/Jobs",
"path": "com/gamingmesh/jobs/Jobs.java",
"license": "apache-2.0",
"size": 17709
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,437,233 |
public void setMapRectangleList(List<MapRectangle> mapRectangleList) {
this.mapRectangleList = mapRectangleList;
repaint();
}
| void function(List<MapRectangle> mapRectangleList) { this.mapRectangleList = mapRectangleList; repaint(); } | /**
* Sets the list of {@link MapRectangle}s.
* @param mapRectangleList list of {@link MapRectangle}s
*/ | Sets the list of <code>MapRectangle</code>s | setMapRectangleList | {
"repo_name": "berniejenny/MapAnalyst",
"path": "src/org/openstreetmap/gui/jmapviewer/JMapViewer.java",
"license": "gpl-2.0",
"size": 43281
} | [
"java.util.List",
"org.openstreetmap.gui.jmapviewer.interfaces.MapRectangle"
] | import java.util.List; import org.openstreetmap.gui.jmapviewer.interfaces.MapRectangle; | import java.util.*; import org.openstreetmap.gui.jmapviewer.interfaces.*; | [
"java.util",
"org.openstreetmap.gui"
] | java.util; org.openstreetmap.gui; | 800,220 |
private static String getContentFromSegments(List<String> segments) {
String contentPath = "";
for(String item : segments) {
if (item.startsWith("content://")) {
contentPath = item;
break;
}
}
return contentPath;
} | static String function(List<String> segments) { String contentPath = STRcontent: contentPath = item; break; } } return contentPath; } | /**
* Get content:// from segment list
* In the new Uri Authority of Google Photos, the last segment is not the content:// anymore
* So let's iterate through all segments and find the content uri!
*
* @param segments The list of segment
*/ | Get content:// from segment list In the new Uri Authority of Google Photos, the last segment is not the content:// anymore So let's iterate through all segments and find the content uri | getContentFromSegments | {
"repo_name": "cicixiaoyan/OA_WEBApp",
"path": "OA_WEBApp/plugins/cordova-plugin-filepath/src/android/FilePath.java",
"license": "mit",
"size": 12457
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,100,684 |
@GwtIncompatible("Array.newInstance(Class, int)")
public static <T> T[] toArray(Iterable<? extends T> iterable, Class<T> type) {
Collection<? extends T> collection = toCollection(iterable);
T[] array = ObjectArrays.newArray(type, collection.size());
return collection.toArray(array);
} | @GwtIncompatible(STR) static <T> T[] function(Iterable<? extends T> iterable, Class<T> type) { Collection<? extends T> collection = toCollection(iterable); T[] array = ObjectArrays.newArray(type, collection.size()); return collection.toArray(array); } | /**
* Copies an iterable's elements into an array.
*
* @param iterable the iterable to copy
* @param type the type of the elements
* @return a newly-allocated array into which all the elements of the iterable
* have been copied
*/ | Copies an iterable's elements into an array | toArray | {
"repo_name": "jgaltidor/VarJ",
"path": "analyzed_libs/guava-libraries-read-only/src/com/google/common/collect/Iterables.java",
"license": "mit",
"size": 34128
} | [
"com.google.common.annotations.GwtIncompatible",
"java.util.Collection"
] | import com.google.common.annotations.GwtIncompatible; import java.util.Collection; | import com.google.common.annotations.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 316,817 |
@GET
@Path("namespaces/{namespace}/replicationcontrollers/{controllerId}")
@Produces("application/json")
ReplicationController getReplicationController(@PathParam("controllerId") @NotNull String controllerId, @PathParam("namespace") String namespace); | @Path(STR) @Produces(STR) ReplicationController getReplicationController(@PathParam(STR) @NotNull String controllerId, @PathParam(STR) String namespace); | /**
* Get a specific controller
*
* @param controllerId
* @param namespace
*/ | Get a specific controller | getReplicationController | {
"repo_name": "hekonsek/fabric8",
"path": "components/kubernetes-api/src/main/java/io/fabric8/kubernetes/api/Kubernetes.java",
"license": "apache-2.0",
"size": 9137
} | [
"io.fabric8.kubernetes.api.model.ReplicationController",
"javax.validation.constraints.NotNull",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces"
] | import io.fabric8.kubernetes.api.model.ReplicationController; import javax.validation.constraints.NotNull; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; | import io.fabric8.kubernetes.api.model.*; import javax.validation.constraints.*; import javax.ws.rs.*; | [
"io.fabric8.kubernetes",
"javax.validation",
"javax.ws"
] | io.fabric8.kubernetes; javax.validation; javax.ws; | 1,680,374 |
public static String stringValue(Node node)
{
return stringValue(node, false);
} | static String function(Node node) { return stringValue(node, false); } | /**
* Computes the XPath string-value of the specified node.
*/ | Computes the XPath string-value of the specified node | stringValue | {
"repo_name": "rhuitl/uClinux",
"path": "lib/classpath/gnu/xml/xpath/Expr.java",
"license": "gpl-2.0",
"size": 16161
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 2,100,451 |
final PolygonOptions polygonOptions = new PolygonOptions();
int color;
LatLngBounds.Builder builder = new LatLngBounds.Builder();
JSONObject opts = args.getJSONObject(1);
if (opts.has("points")) {
JSONArray points = opts.getJSONArray("points");
List<LatLng... | final PolygonOptions polygonOptions = new PolygonOptions(); int color; LatLngBounds.Builder builder = new LatLngBounds.Builder(); JSONObject opts = args.getJSONObject(1); if (opts.has(STR)) { JSONArray points = opts.getJSONArray(STR); List<LatLng> path = PluginUtil.JSONArray2LatLngList(points); int i = 0; for (i = 0; i... | /**
* Create polygon
* @param args
* @param callbackContext
* @throws JSONException
*/ | Create polygon | createPolygon | {
"repo_name": "MasGaNo/gameofcode",
"path": "GameOfCode/plugins/cordova-plugin-googlemaps/src/android/plugin/google/maps/PluginPolygon.java",
"license": "apache-2.0",
"size": 7980
} | [
"com.google.android.gms.maps.model.LatLng",
"com.google.android.gms.maps.model.LatLngBounds",
"com.google.android.gms.maps.model.Polygon",
"com.google.android.gms.maps.model.PolygonOptions",
"java.util.List",
"org.json.JSONArray",
"org.json.JSONObject"
] | import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.LatLngBounds; import com.google.android.gms.maps.model.Polygon; import com.google.android.gms.maps.model.PolygonOptions; import java.util.List; import org.json.JSONArray; import org.json.JSONObject; | import com.google.android.gms.maps.model.*; import java.util.*; import org.json.*; | [
"com.google.android",
"java.util",
"org.json"
] | com.google.android; java.util; org.json; | 1,498,683 |
protected boolean useForTouch(MotionEvent event) {
return !view.onlyPenInput || (view.onlyPenInput && !Hardware.isPenEvent(event));
} | boolean function(MotionEvent event) { return !view.onlyPenInput (view.onlyPenInput && !Hardware.isPenEvent(event)); } | /**
* Whether to use the MotionEvent as finger touch
*
* @param event
* The MotionEvent
* @return Boolean. True if the event should be considered as coming from
* the user's hand, e.g. for move/zoom
*/ | Whether to use the MotionEvent as finger touch | useForTouch | {
"repo_name": "weijiang8410/android-quill",
"path": "src/name/vbraun/view/write/TouchHandlerABC.java",
"license": "gpl-3.0",
"size": 6365
} | [
"android.view.MotionEvent",
"name.vbraun.lib.pen.Hardware"
] | import android.view.MotionEvent; import name.vbraun.lib.pen.Hardware; | import android.view.*; import name.vbraun.lib.pen.*; | [
"android.view",
"name.vbraun.lib"
] | android.view; name.vbraun.lib; | 2,581,913 |
public void removeIdentity(String name) {
if ((name != null) && (identities != null)) {
Iterator<KerberosIdentityDescriptor> iterator = identities.iterator();
while (iterator.hasNext()) {
KerberosIdentityDescriptor identity = iterator.next();
if (name.equals(identity.getName())) {
... | void function(String name) { if ((name != null) && (identities != null)) { Iterator<KerberosIdentityDescriptor> iterator = identities.iterator(); while (iterator.hasNext()) { KerberosIdentityDescriptor identity = iterator.next(); if (name.equals(identity.getName())) { identity.setParent(null); iterator.remove(); } } } ... | /**
* Remove all KerberosIdentityDescriptors have have the specified name
* <p/>
* One or more KerberosIdentityDescriptors may be removed if multiple KerberosIdentityDescriptors
* have the same name.
*
* @param name a String declaring the name of the descriptors to remove
*/ | Remove all KerberosIdentityDescriptors have have the specified name One or more KerberosIdentityDescriptors may be removed if multiple KerberosIdentityDescriptors have the same name | removeIdentity | {
"repo_name": "radicalbit/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptorContainer.java",
"license": "apache-2.0",
"size": 33541
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,193,974 |
protected void persistIndexedSiteMap() {
String now = FormatUtil.formatDateUsingW3C(new Date());
// Save the leftover URL set
persistIndexedURLSetWrapper(currentURLSetWrapper);
// Build the siteMapIndex
SiteMapIndexWrapper siteMapIndexWrapper = new SiteMapIndexWrapp... | void function() { String now = FormatUtil.formatDateUsingW3C(new Date()); persistIndexedURLSetWrapper(currentURLSetWrapper); SiteMapIndexWrapper siteMapIndexWrapper = new SiteMapIndexWrapper(); for (String fileName : indexedFileNames) { SiteMapWrapper siteMapWrapper = new SiteMapWrapper(); String fileLoc = null; if (gz... | /**
* Save the site map index file.
*
* @return
*/ | Save the site map index file | persistIndexedSiteMap | {
"repo_name": "akdasari/SparkCommon",
"path": "src/main/java/org/sparkcommerce/common/sitemap/service/SiteMapBuilder.java",
"license": "apache-2.0",
"size": 6687
} | [
"java.util.Date",
"org.sparkcommerce.common.file.service.SparkFileUtils",
"org.sparkcommerce.common.sitemap.wrapper.SiteMapIndexWrapper",
"org.sparkcommerce.common.sitemap.wrapper.SiteMapWrapper",
"org.sparkcommerce.common.util.FormatUtil"
] | import java.util.Date; import org.sparkcommerce.common.file.service.SparkFileUtils; import org.sparkcommerce.common.sitemap.wrapper.SiteMapIndexWrapper; import org.sparkcommerce.common.sitemap.wrapper.SiteMapWrapper; import org.sparkcommerce.common.util.FormatUtil; | import java.util.*; import org.sparkcommerce.common.file.service.*; import org.sparkcommerce.common.sitemap.wrapper.*; import org.sparkcommerce.common.util.*; | [
"java.util",
"org.sparkcommerce.common"
] | java.util; org.sparkcommerce.common; | 475,033 |
public void setOutputDir(final String outputDir) {
this.outputPath = Paths.get(outputDir);
} | void function(final String outputDir) { this.outputPath = Paths.get(outputDir); } | /**
* Sets the output directory for charts.
*
* @param outputDir
* The output directory location.
*/ | Sets the output directory for charts | setOutputDir | {
"repo_name": "vjuranek/PerfCake",
"path": "perfcake/src/main/java/org/perfcake/reporting/destinations/ChartDestination.java",
"license": "apache-2.0",
"size": 8119
} | [
"java.nio.file.Paths"
] | import java.nio.file.Paths; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 743,369 |
public void setName(String newName) {
if (newName == null) {
return;
}
int i = -1;
if ((i = newName.indexOf(TaskId.ITERATION_SEPARATOR)) != -1) {
newName = newName.substring(0, i);
} else if ((i = newName.indexOf(TaskId.REPLICATION_SEPARATOR)) != -1) {... | void function(String newName) { if (newName == null) { return; } int i = -1; if ((i = newName.indexOf(TaskId.ITERATION_SEPARATOR)) != -1) { newName = newName.substring(0, i); } else if ((i = newName.indexOf(TaskId.REPLICATION_SEPARATOR)) != -1) { newName = newName.substring(0, i); } String n = this.getTaskNameSuffix();... | /**
* To set the name of this task.
* <p>
* The provided String will be appended the iteration and replication index
* if > 0, so that
* <code>name = name [ITERATION_SEPARATOR iteration] [REPLICATION_SEPARATOR replication]</code>.
*
* @param newName
* the name to se... | To set the name of this task. The provided String will be appended the iteration and replication index if > 0, so that <code>name = name [ITERATION_SEPARATOR iteration] [REPLICATION_SEPARATOR replication]</code> | setName | {
"repo_name": "lpellegr/scheduling",
"path": "scheduler/scheduler-server/src/main/java/org/ow2/proactive/scheduler/task/internal/InternalTask.java",
"license": "agpl-3.0",
"size": 48496
} | [
"org.ow2.proactive.scheduler.common.task.TaskId",
"org.ow2.proactive.scheduler.common.task.flow.FlowActionType",
"org.ow2.proactive.scheduler.task.TaskIdImpl"
] | import org.ow2.proactive.scheduler.common.task.TaskId; import org.ow2.proactive.scheduler.common.task.flow.FlowActionType; import org.ow2.proactive.scheduler.task.TaskIdImpl; | import org.ow2.proactive.scheduler.common.task.*; import org.ow2.proactive.scheduler.common.task.flow.*; import org.ow2.proactive.scheduler.task.*; | [
"org.ow2.proactive"
] | org.ow2.proactive; | 2,020,605 |
ArrayList<SimpleName> res= new ArrayList<SimpleName>();
BindingFinder nodeFinder= new BindingFinder(binding, res);
root.accept(nodeFinder);
return res.toArray(new SimpleName[res.size()]);
} | ArrayList<SimpleName> res= new ArrayList<SimpleName>(); BindingFinder nodeFinder= new BindingFinder(binding, res); root.accept(nodeFinder); return res.toArray(new SimpleName[res.size()]); } | /**
* Find all nodes connected to the given binding. e.g. Declaration of a field and all references.
* For types this includes also the constructor declaration, for methods also overridden methods
* or methods overriding (if existing in the same AST)
* @param root The root of the AST tree to search
* @param b... | Find all nodes connected to the given binding. e.g. Declaration of a field and all references. For types this includes also the constructor declaration, for methods also overridden methods or methods overriding (if existing in the same AST) | findByBinding | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.java",
"license": "mit",
"size": 8377
} | [
"java.util.ArrayList",
"org.eclipse.jdt.core.dom.SimpleName"
] | import java.util.ArrayList; import org.eclipse.jdt.core.dom.SimpleName; | import java.util.*; import org.eclipse.jdt.core.dom.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 765,356 |
public Integer getNodesPartitionIdForKey(int nodeId, final byte[] key) {
// this is all the partitions the key replicates to.
List<Integer> partitionIds = getReplicatingPartitionList(key);
for(Integer partitionId: partitionIds) {
// check which of the replicating partitions belon... | Integer function(int nodeId, final byte[] key) { List<Integer> partitionIds = getReplicatingPartitionList(key); for(Integer partitionId: partitionIds) { if(getNodeIdForPartitionId(partitionId) == nodeId) { return partitionId; } } return null; } | /**
* Determines the partition ID that replicates the key on the given node.
*
* @param nodeId of the node
* @param key to look up.
* @return partitionId if found, otherwise null.
*/ | Determines the partition ID that replicates the key on the given node | getNodesPartitionIdForKey | {
"repo_name": "medallia/voldemort",
"path": "src/java/voldemort/routing/StoreRoutingPlan.java",
"license": "apache-2.0",
"size": 25619
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,725,148 |
public void testMountPointsNotReadable() throws Exception {
final String userId = Integer.toString(android.os.Process.myUid() / 100000);
final List<File> mountPaths = getMountPaths();
for (File path : mountPaths) {
if (path.getAbsolutePath().startsWith("/mnt/")
... | void function() throws Exception { final String userId = Integer.toString(android.os.Process.myUid() / 100000); final List<File> mountPaths = getMountPaths(); for (File path : mountPaths) { if (path.getAbsolutePath().startsWith("/mnt/") path.getAbsolutePath().startsWith(STR)) { final File userPath = new File(path, user... | /**
* Verify that we don't have read access to any storage mountpoints.
*/ | Verify that we don't have read access to any storage mountpoints | testMountPointsNotReadable | {
"repo_name": "wiki2014/Learning-Summary",
"path": "alps/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/ExternalStorageTest.java",
"license": "gpl-3.0",
"size": 8049
} | [
"com.android.cts.externalstorageapp.CommonExternalStorageTest",
"java.io.File",
"java.util.List"
] | import com.android.cts.externalstorageapp.CommonExternalStorageTest; import java.io.File; import java.util.List; | import com.android.cts.externalstorageapp.*; import java.io.*; import java.util.*; | [
"com.android.cts",
"java.io",
"java.util"
] | com.android.cts; java.io; java.util; | 2,844,905 |
@Test
public void testDelete03() {
// given
String token = login();
String name = "app2@formkiq.com";
String secret = "secret2";
createUser(name, secret);
token = login(name, secret);
String url = getDefaultHostAndPort() + API_USER_DELETE
... | void function() { String token = login(); String name = STR; String secret = STR; createUser(name, secret); token = login(name, secret); String url = getDefaultHostAndPort() + API_USER_DELETE + STR + token + STR + name; ResponseEntity<String> entity = exchangeRest(HttpMethod.POST, url); assertEquals(SC_UNAUTHORIZED, en... | /**
* testDelete03().
* delete user - non admin
*/ | testDelete03(). delete user - non admin | testDelete03 | {
"repo_name": "formkiq/formkiq-server",
"path": "web/src/test/java/com/formkiq/web/UsersControllerIntegrationTest.java",
"license": "apache-2.0",
"size": 38086
} | [
"org.junit.Assert",
"org.springframework.http.HttpMethod",
"org.springframework.http.ResponseEntity"
] | import org.junit.Assert; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; | import org.junit.*; import org.springframework.http.*; | [
"org.junit",
"org.springframework.http"
] | org.junit; org.springframework.http; | 898,640 |
@ApiModelProperty(example = "null", value = "")
public String getSchoolTypeDesc() {
return schoolTypeDesc;
} | @ApiModelProperty(example = "null", value = "") String function() { return schoolTypeDesc; } | /**
* Get schoolTypeDesc
* @return schoolTypeDesc
**/ | Get schoolTypeDesc | getSchoolTypeDesc | {
"repo_name": "PitneyBowes/LocationIntelligenceSDK-Java",
"path": "src/main/java/pb/locationintelligence/model/School.java",
"license": "apache-2.0",
"size": 22521
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,241,201 |
private static String preparePropertyPath(Path<?> path) {
Path<?> root = path.getRoot();
return root == null || path.equals(root) ? path.toString()
: path.toString().substring(root.toString().length() + 1);
}
public static class AttributeMappingBuilder {
private final Map<String, Path<?... | static String function(Path<?> path) { Path<?> root = path.getRoot(); return root == null path.equals(root) ? path.toString() : path.toString().substring(root.toString().length() + 1); } public static class AttributeMappingBuilder { private final Map<String, Path<?>[]> attrMapping = new HashMap<String, Path<?>[]>(); /*... | /**
* Recursively creates a dot-separated path for the property path.
*
* @param path must not be {@literal null}.
* @return
*/ | Recursively creates a dot-separated path for the property path | preparePropertyPath | {
"repo_name": "DISID/springlets",
"path": "springlets-data/springlets-data-jpa/src/main/java/io/springlets/data/jpa/repository/support/QueryDslRepositorySupportExt.java",
"license": "apache-2.0",
"size": 12801
} | [
"com.querydsl.core.types.Path",
"java.util.HashMap",
"java.util.Map"
] | import com.querydsl.core.types.Path; import java.util.HashMap; import java.util.Map; | import com.querydsl.core.types.*; import java.util.*; | [
"com.querydsl.core",
"java.util"
] | com.querydsl.core; java.util; | 747,394 |
public static final Gradient create( ColorDefinition cdStart,
ColorDefinition cdEnd, double dDirectionInDegrees, boolean bCyclic )
{
final Gradient g = AttributeFactory.eINSTANCE.createGradient( );
g.setStartColor( cdStart );
g.setEndColor( cdEnd );
g.setDirection( dDirectionInDegrees );
g.setCyclic( b... | static final Gradient function( ColorDefinition cdStart, ColorDefinition cdEnd, double dDirectionInDegrees, boolean bCyclic ) { final Gradient g = AttributeFactory.eINSTANCE.createGradient( ); g.setStartColor( cdStart ); g.setEndColor( cdEnd ); g.setDirection( dDirectionInDegrees ); g.setCyclic( bCyclic ); return g; } | /**
* A convenience method provided to create a gradient instance with all
* member variables initialized
*
* @param cdStart
* @param cdEnd
* @param dDirectionInDegrees
* Must lie within the range of (90 >= 0 >= -90)
* @param bCyclic
*
* @return grandient instance with setting 'isSet' f... | A convenience method provided to create a gradient instance with all member variables initialized | create | {
"repo_name": "Charling-Huang/birt",
"path": "chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/GradientImpl.java",
"license": "epl-1.0",
"size": 17657
} | [
"org.eclipse.birt.chart.model.attribute.AttributeFactory",
"org.eclipse.birt.chart.model.attribute.ColorDefinition",
"org.eclipse.birt.chart.model.attribute.Gradient"
] | import org.eclipse.birt.chart.model.attribute.AttributeFactory; import org.eclipse.birt.chart.model.attribute.ColorDefinition; import org.eclipse.birt.chart.model.attribute.Gradient; | import org.eclipse.birt.chart.model.attribute.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,254,338 |
public void addPropertyChangeListener(VetoableChangeListener listener) {
changeSupport.addVetoableChangeListener(listener);
} | void function(VetoableChangeListener listener) { changeSupport.addVetoableChangeListener(listener); } | /**
* Adds a VetoableChangeListener, which is notified of field
* changes. This is useful for an object that needs to update
* itself each time a field changes.
*/ | Adds a VetoableChangeListener, which is notified of field changes. This is useful for an object that needs to update itself each time a field changes | addPropertyChangeListener | {
"repo_name": "iksmada/DC-UFSCar-ES2-201601-GrupoDilema",
"path": "src/main/java/net/sf/jabref/model/entry/BibEntry.java",
"license": "gpl-2.0",
"size": 21709
} | [
"java.beans.VetoableChangeListener"
] | import java.beans.VetoableChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,958,232 |
@Test
public void testInodeId() throws IOException {
Configuration conf = new Configuration();
conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY,
DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_DEFAULT);
MiniDFSCluster cluster = null;
try {
cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).bu... | void function() throws IOException { Configuration conf = new Configuration(); conf.setInt(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_DEFAULT); MiniDFSCluster cluster = null; try { cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build(); cluster.waitActive(); FSNamesystem fsn = cl... | /**
* This test verifies inode ID counter and inode map functionality.
*/ | This test verifies inode ID counter and inode map functionality | testInodeId | {
"repo_name": "fyqls/hadoop-2.4.0",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java",
"license": "apache-2.0",
"size": 39227
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hdfs.DFSConfigKeys",
"org.apache.hadoop.hdfs.DFSTestUtil",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.apache... | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.MiniDFS... | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 961,285 |
private List<Vacancy> markAbsentAsNew(Website website, List<Vacancy> vacancies) {
List<Vacancy> result = new ArrayList<>();
Set<Vacancy> presentInDb = repository.getPresent(website, vacancies);
for (Vacancy v: vacancies) {
Vacancy updatedVacancy = v.setIsNew(!presentInDb.contains... | List<Vacancy> function(Website website, List<Vacancy> vacancies) { List<Vacancy> result = new ArrayList<>(); Set<Vacancy> presentInDb = repository.getPresent(website, vacancies); for (Vacancy v: vacancies) { Vacancy updatedVacancy = v.setIsNew(!presentInDb.contains(v)); result.add(updatedVacancy); } return result; } | /**
* Check which vacancies in given list are absent in local database and return a list of
* vacancies with isNew field set to true for every vacancy absent
* @param website from which given vacancies were fetched
* @param vacancies
* @return updated vacancies with respect to presence in local... | Check which vacancies in given list are absent in local database and return a list of vacancies with isNew field set to true for every vacancy absent | markAbsentAsNew | {
"repo_name": "nevermourn/UaJobFinder",
"path": "app/src/main/java/com/domain/nvm/uajobfinder/data/sync/VacanciesSynchronizer.java",
"license": "mit",
"size": 4651
} | [
"com.domain.nvm.uajobfinder.data.Vacancy",
"com.domain.nvm.uajobfinder.data.Website",
"java.util.ArrayList",
"java.util.List",
"java.util.Set"
] | import com.domain.nvm.uajobfinder.data.Vacancy; import com.domain.nvm.uajobfinder.data.Website; import java.util.ArrayList; import java.util.List; import java.util.Set; | import com.domain.nvm.uajobfinder.data.*; import java.util.*; | [
"com.domain.nvm",
"java.util"
] | com.domain.nvm; java.util; | 2,061,338 |
@Override
void removeMapping(RegionEntry entry, int opCode)
{
throw new RuntimeException(LocalizedStrings.PartitionedIndex_NOT_SUPPORTED_ON_PARTITIONED_INDEX.toLocalizedString());
} | void removeMapping(RegionEntry entry, int opCode) { throw new RuntimeException(LocalizedStrings.PartitionedIndex_NOT_SUPPORTED_ON_PARTITIONED_INDEX.toLocalizedString()); } | /**
* Not supported on partitioned index.
*/ | Not supported on partitioned index | removeMapping | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/PartitionedIndex.java",
"license": "apache-2.0",
"size": 18966
} | [
"com.gemstone.gemfire.internal.cache.RegionEntry",
"com.gemstone.gemfire.internal.i18n.LocalizedStrings"
] | import com.gemstone.gemfire.internal.cache.RegionEntry; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; | import com.gemstone.gemfire.internal.cache.*; import com.gemstone.gemfire.internal.i18n.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 1,461,302 |
private static void setEnv(Map<String, String> newEnv, boolean overwrite) {
for (Entry<String, String> entry : newEnv.entrySet()) {
if (overwrite || System.getProperty(entry.getKey()) != null) {
System.setProperty(entry.getKey(), entry.getValue());
}
}
if (!overwrite) {
Iterator<Entry<String, St... | static void function(Map<String, String> newEnv, boolean overwrite) { for (Entry<String, String> entry : newEnv.entrySet()) { if (overwrite System.getProperty(entry.getKey()) != null) { System.setProperty(entry.getKey(), entry.getValue()); } } if (!overwrite) { Iterator<Entry<String, String>> iterator = newEnv.entrySet... | /**
* code from http://stackoverflow.com/a/7201825
*/ | code from HREF | setEnv | {
"repo_name": "fiserro/easy-config",
"path": "easy-config-core/src/main/java/com/socialbakers/config/Envio.java",
"license": "apache-2.0",
"size": 5401
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Method",
"java.util.Collections",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map"
] | import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,937,947 |
public void setStaticSize(Dimension size) {
this.setPreferredSize(size);
this.setMaximumSize(size);
this.setMinimumSize(size);
}
| void function(Dimension size) { this.setPreferredSize(size); this.setMaximumSize(size); this.setMinimumSize(size); } | /**
* Sets the size of this panel to a static size.
* @param size the size
*/ | Sets the size of this panel to a static size | setStaticSize | {
"repo_name": "dmitrykolesnikovich/dyn4j",
"path": "sandbox/src/org/dyn4j/sandbox/panels/LineGraphPanel.java",
"license": "bsd-3-clause",
"size": 13007
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,632,085 |
public static final JTable subTableExtract(JTable table, String...columnNames) {
JTable result = null;
result = new JTable();
int [] columns = new int[columnNames.length];
// add needed columns
int len = table.getColumnCount();
int cIndex = 0;
for (int i=0;i<len;i++) {
String colName = table... | static final JTable function(JTable table, String...columnNames) { JTable result = null; result = new JTable(); int [] columns = new int[columnNames.length]; int len = table.getColumnCount(); int cIndex = 0; for (int i=0;i<len;i++) { String colName = table.getColumnName(i); if (JTableUtils.containsColumn(colName,column... | /**
* Build a JTable extracted from table parameter with given list of columns
* @param table
* @param columns
* @return
*/ | Build a JTable extracted from table parameter with given list of columns | subTableExtract | {
"repo_name": "catherineverdiergo/schooliwe",
"path": "src/com/schooliwe/swing/util/JTableUtils.java",
"license": "lgpl-2.1",
"size": 2393
} | [
"javax.swing.JTable",
"javax.swing.table.TableColumn"
] | import javax.swing.JTable; import javax.swing.table.TableColumn; | import javax.swing.*; import javax.swing.table.*; | [
"javax.swing"
] | javax.swing; | 861,833 |
public static ServiceHandler getUninstallAppServiceHandler()
{
if ((uninstallAppServiceHandler == null) && (UNINSTALL_APP_SERVICE_ID != null))
{
// find the appropriate stop service handler
IDeviceType device =
DeviceTypeRegistry.getInstance().ge... | static ServiceHandler function() { if ((uninstallAppServiceHandler == null) && (UNINSTALL_APP_SERVICE_ID != null)) { IDeviceType device = DeviceTypeRegistry.getInstance().getDeviceTypeById(EmulatorPlugin.DEVICE_ID); List<IService> services = device.getServices(); for (IService service : services) { IServiceHandler hand... | /**
* Retrieves the deploy service handler.
*
* @return The currently registered stop service handler, or <null> if no handler is registered.
*/ | Retrieves the deploy service handler | getUninstallAppServiceHandler | {
"repo_name": "DmitryADP/diff_qc750",
"path": "tools/motodev/src/plugins/devices.services/src/com/motorola/studio/android/devices/services/DeviceServicesPlugin.java",
"license": "gpl-2.0",
"size": 17089
} | [
"com.motorola.studio.android.emulator.EmulatorPlugin",
"java.util.List",
"org.eclipse.sequoyah.device.framework.factory.DeviceTypeRegistry",
"org.eclipse.sequoyah.device.framework.model.IDeviceType",
"org.eclipse.sequoyah.device.framework.model.IService",
"org.eclipse.sequoyah.device.framework.model.handl... | import com.motorola.studio.android.emulator.EmulatorPlugin; import java.util.List; import org.eclipse.sequoyah.device.framework.factory.DeviceTypeRegistry; import org.eclipse.sequoyah.device.framework.model.IDeviceType; import org.eclipse.sequoyah.device.framework.model.IService; import org.eclipse.sequoyah.device.fram... | import com.motorola.studio.android.emulator.*; import java.util.*; import org.eclipse.sequoyah.device.framework.factory.*; import org.eclipse.sequoyah.device.framework.model.*; import org.eclipse.sequoyah.device.framework.model.handler.*; | [
"com.motorola.studio",
"java.util",
"org.eclipse.sequoyah"
] | com.motorola.studio; java.util; org.eclipse.sequoyah; | 1,064,605 |
@Test
public final void testNamedCell_2() throws Exception {
// setup for this testcase
String sname = "TestSheet", cname = "TestName", cvalue = "TestVal";
Workbook wb = _testDataProvider.createWorkbook();
CreationHelper factory = wb.getCreationHelper();
Sheet sheet = wb... | final void function() throws Exception { String sname = STR, cname = STR, cvalue = STR; Workbook wb = _testDataProvider.createWorkbook(); CreationHelper factory = wb.getCreationHelper(); Sheet sheet = wb.createSheet(sname); sheet.createRow(0).createCell(0).setCellValue(factory.createRichTextString(cvalue)); Name namedC... | /**
* Verifies correct functioning for "single cell named range" (aka "named cell")
*/ | Verifies correct functioning for "single cell named range" (aka "named cell") | testNamedCell_2 | {
"repo_name": "lvweiwolf/poi-3.16",
"path": "src/testcases/org/apache/poi/ss/usermodel/BaseTestNamedRange.java",
"license": "apache-2.0",
"size": 27062
} | [
"org.apache.poi.ss.util.CellReference",
"org.junit.Assert"
] | import org.apache.poi.ss.util.CellReference; import org.junit.Assert; | import org.apache.poi.ss.util.*; import org.junit.*; | [
"org.apache.poi",
"org.junit"
] | org.apache.poi; org.junit; | 2,113,204 |
public Builder market(final CountryCode market) {
assert (market != null);
return setQueryParameter("market", market);
} | Builder function(final CountryCode market) { assert (market != null); return setQueryParameter(STR, market); } | /**
* The market country code setter.
*
* @param market Optional. An ISO 3166-1 alpha-2 country code. Provide this
* parameter if you want to apply Track Relinking.
* @return A {@link GetSeveralTracksRequest.Builder}.
* @see <a href="https://en.wikipedia.org/wiki/ISO_3166-1_a... | The market country code setter | market | {
"repo_name": "thelinmichael/spotify-web-api-java",
"path": "src/main/java/com/wrapper/spotify/requests/data/tracks/GetTrackRequest.java",
"license": "mit",
"size": 3050
} | [
"com.neovisionaries.i18n.CountryCode"
] | import com.neovisionaries.i18n.CountryCode; | import com.neovisionaries.i18n.*; | [
"com.neovisionaries.i18n"
] | com.neovisionaries.i18n; | 2,189,189 |
@Test
public void testGetPassword() {
//given
//when
String result = authentication.getPassword();
//then
assertThat(result, is(password));
} | void function() { String result = authentication.getPassword(); assertThat(result, is(password)); } | /**
* Test of getPassword method, of class SshPasswordAuthentication.
*/ | Test of getPassword method, of class SshPasswordAuthentication | testGetPassword | {
"repo_name": "kemitix/kxssh",
"path": "src/test/java/net/kemitix/kxssh/SshPasswordAuthenticationTest.java",
"license": "mit",
"size": 1734
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 2,223,062 |
private InputStream getInputStreamForResource(String resourceName) throws IOException {
// Try each classpath entry, in order, until we find one
// that has the resource. Catch and ignore IOExceptions.
// FIXME: The following code should throw IOException.
//
// URL.openStream() does not seem to di... | InputStream function(String resourceName) throws IOException { for (Entry entry : entryList) { InputStream in; try { in = entry.openStream(resourceName); if (in != null) { if (URLClassPathRepository.DEBUG) { System.out.println(STR + resourceName + STR + entry.getURL()); } return in; } } catch (IOException ignore) { } }... | /**
* Open a stream to read given resource.
*
* @param resourceName name of resource to load, e.g. "java/lang/Object.class"
* @return input stream to read resource, or null if resource
* could not be found
* @throws IOException if an IO error occurs trying to determine
* whether or not the res... | Open a stream to read given resource | getInputStreamForResource | {
"repo_name": "optivo-org/fingbugs-1.3.9-optivo",
"path": "src/java/edu/umd/cs/findbugs/ba/URLClassPath.java",
"license": "lgpl-2.1",
"size": 13021
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,640,864 |
@Override
public void getDefaults(Map<String, Object> defs, Map<String, Object> params) {
initItemsMap();
String[] items_arr = getDefaultPropetyItems();
if (params.get(getPropertyKey()) != null) {
items_arr = ((String) params.get(getPropertyKey())).split(",");
for (int i = 0; i < items_arr.length; i++)... | void function(Map<String, Object> defs, Map<String, Object> params) { initItemsMap(); String[] items_arr = getDefaultPropetyItems(); if (params.get(getPropertyKey()) != null) { items_arr = ((String) params.get(getPropertyKey())).split(","); for (int i = 0; i < items_arr.length; i++) { items_arr[i] = items_arr[i].trim()... | /**
* Method description
*
*
* @param defs
* @param params
*/ | Method description | getDefaults | {
"repo_name": "fanout/tigase-server",
"path": "src/main/java/tigase/db/comp/ConfigRepository.java",
"license": "agpl-3.0",
"size": 7555
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,701,378 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.