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 static Set<Class<?>> allPrimitiveTypes() { return PRIMITIVE_TO_WRAPPER_TYPE.keySet(); }
static Set<Class<?>> function() { return PRIMITIVE_TO_WRAPPER_TYPE.keySet(); }
/** * Returns an immutable set of all nine primitive types (including {@code * void}). Note that a simpler way to test whether a {@code Class} instance * is a member of this set is to call {@link Class#isPrimitive}. * * @since 3.0 */
Returns an immutable set of all nine primitive types (including void). Note that a simpler way to test whether a Class instance is a member of this set is to call <code>Class#isPrimitive</code>
allPrimitiveTypes
{ "repo_name": "ben-manes/guava", "path": "guava/src/com/google/common/primitives/Primitives.java", "license": "apache-2.0", "size": 4606 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
672,582
@Column(name = "manager") public String getManager() { return (String) getValue(1); }
@Column(name = STR) String function() { return (String) getValue(1); }
/** * Getter for <code>public.sales_by_store.manager</code>. */
Getter for <code>public.sales_by_store.manager</code>
getManager
{ "repo_name": "mesan/fag-ark-persistering-test-jooq", "path": "fag-ark-persistering-test-jooq-spring/src/main/java/no/mesan/ark/persistering/generated/tables/records/SalesByStoreRecord.java", "license": "unlicense", "size": 4075 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,065,922
public static File getOutputMediaFile(int type){ // To be safe, you should check that the SDCard is mounted // using Environment.getExternalStorageState() before doing this. if (!Environment.getExternalStorageState().equalsIgnoreCase(Environment.MEDIA_MOUNTED)) { return null; ...
static File function(int type){ if (!Environment.getExternalStorageState().equalsIgnoreCase(Environment.MEDIA_MOUNTED)) { return null; } File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), STR); if (! mediaStorageDir.exists()){ if (! mediaStorageDir.mkdirs()) ...
/** * Creates a media file in the {@code Environment.DIRECTORY_PICTURES} directory. The directory * is persistent and available to other applications like gallery. * * @param type Media type. Can be video or image. * @return A file object pointing to the newly created file. */
Creates a media file in the Environment.DIRECTORY_PICTURES directory. The directory is persistent and available to other applications like gallery
getOutputMediaFile
{ "repo_name": "nixplay/cordova-plugin-camera", "path": "src/android/CameraHelper.java", "license": "apache-2.0", "size": 5801 }
[ "android.os.Environment", "android.util.Log", "java.io.File", "java.text.SimpleDateFormat", "java.util.Date", "java.util.Locale" ]
import android.os.Environment; import android.util.Log; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale;
import android.os.*; import android.util.*; import java.io.*; import java.text.*; import java.util.*;
[ "android.os", "android.util", "java.io", "java.text", "java.util" ]
android.os; android.util; java.io; java.text; java.util;
707,114
public static long[] read(ObjectInput in) throws IOException { int size = in.readInt(); long[] ret = POOL.getArray(size); for (int i = 0; i < size; i++) { ret[i] = in.readLong(); } return ret; }
static long[] function(ObjectInput in) throws IOException { int size = in.readInt(); long[] ret = POOL.getArray(size); for (int i = 0; i < size; i++) { ret[i] = in.readLong(); } return ret; }
/** * Reads a long array from a stream. * @param in input stream * @return the long array. * @throws IOException if reading fails */
Reads a long array from a stream
read
{ "repo_name": "tzaeschke/phtree", "path": "src/main/java/ch/ethz/globis/phtree/util/RefsLong.java", "license": "apache-2.0", "size": 6251 }
[ "java.io.IOException", "java.io.ObjectInput" ]
import java.io.IOException; import java.io.ObjectInput;
import java.io.*;
[ "java.io" ]
java.io;
2,417,341
@Override public void addLifecycleListener(LifecycleListener listener) { lifecycle.addLifecycleListener(listener); }
void function(LifecycleListener listener) { lifecycle.addLifecycleListener(listener); }
/** * Add a lifecycle event listener to this component. * * @param listener * The listener to add */
Add a lifecycle event listener to this component
addLifecycleListener
{ "repo_name": "bulain/redis-session-manager", "path": "tc7/src/main/java/com/bulain/tomcat7/redissessions/RedisSessionManager.java", "license": "mit", "size": 30231 }
[ "org.apache.catalina.LifecycleListener" ]
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,487,024
@Test public void testCustomRecordDelimiters() throws IOException, InterruptedException, ClassNotFoundException { Configuration conf = new Configuration(); conf.set("textinputformat.record.delimiter", "\t\n"); FileSystem localFs = FileSystem.getLocal(conf); // cleanup localFs.delete(workDi...
void function() throws IOException, InterruptedException, ClassNotFoundException { Configuration conf = new Configuration(); conf.set(STR, "\t\n"); FileSystem localFs = FileSystem.getLocal(conf); localFs.delete(workDir, true); createInputFile(conf); createAndRunJob(conf); String expected = STR; assertEquals(expected, r...
/** * Test the case when a custom record delimiter is specified using the * textinputformat.record.delimiter configuration property * * @throws IOException * @throws InterruptedException * @throws ClassNotFoundException */
Test the case when a custom record delimiter is specified using the textinputformat.record.delimiter configuration property
testCustomRecordDelimiters
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestLineRecordReaderJobs.java", "license": "apache-2.0", "size": 4482 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.junit.Assert" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
575,840
@Override public String toEscapedString(Dialect dialect, OperatorsContext operatorsContext) { StringBuilder sb = new StringBuilder(); if(isList()) { sb.append("["); List<String> members = new ArrayList<>(); for(Term term : asList()) { members.add(term.toEscapedString(dialect, operatorsContext)); ...
String function(Dialect dialect, OperatorsContext operatorsContext) { StringBuilder sb = new StringBuilder(); if(isList()) { sb.append("["); List<String> members = new ArrayList<>(); for(Term term : asList()) { members.add(term.toEscapedString(dialect, operatorsContext)); } sb.append(Joiner.on(STR).join(members)); sb.a...
/** * Returns a prefix functional representation of a Compound of the form id(arg1,...), * * @return string representation of an Compound */
Returns a prefix functional representation of a Compound of the form id(arg1,...)
toEscapedString
{ "repo_name": "java-prolog-connectivity/jpc", "path": "src/main/java/org/jpc/term/Compound.java", "license": "apache-2.0", "size": 8588 }
[ "com.google.common.base.Joiner", "java.util.ArrayList", "java.util.List", "org.jpc.engine.dialect.Dialect", "org.jpc.engine.prolog.Operator", "org.jpc.engine.prolog.OperatorsContext" ]
import com.google.common.base.Joiner; import java.util.ArrayList; import java.util.List; import org.jpc.engine.dialect.Dialect; import org.jpc.engine.prolog.Operator; import org.jpc.engine.prolog.OperatorsContext;
import com.google.common.base.*; import java.util.*; import org.jpc.engine.dialect.*; import org.jpc.engine.prolog.*;
[ "com.google.common", "java.util", "org.jpc.engine" ]
com.google.common; java.util; org.jpc.engine;
2,885,812
public OutputStream openOutputStream() throws IOException, UnsupportedEncodingException { if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT) throw new IllegalStateException(); OutputStream out = getFileObjectForOutput(path).openOutputStream(); r...
OutputStream function() throws IOException, UnsupportedEncodingException { if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT) throw new IllegalStateException(); OutputStream out = getFileObjectForOutput(path).openOutputStream(); return new BufferedOutputStream(out); }
/** * Open an output stream for the file. * The file must have been created with a location of * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path. */
Open an output stream for the file. The file must have been created with a location of <code>DocumentationTool.Location#DOCUMENTATION_OUTPUT</code> and a corresponding relative path
openOutputStream
{ "repo_name": "arafalov/Javadoc-IFramed", "path": "src/main/java/com/outerthoughts/javadoc/iframed/internal/toolkit/util/StandardDocFileFactory.java", "license": "gpl-2.0", "size": 12275 }
[ "java.io.BufferedOutputStream", "java.io.IOException", "java.io.OutputStream", "java.io.UnsupportedEncodingException", "javax.tools.DocumentationTool", "javax.tools.JavaFileManager" ]
import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.UnsupportedEncodingException; import javax.tools.DocumentationTool; import javax.tools.JavaFileManager;
import java.io.*; import javax.tools.*;
[ "java.io", "javax.tools" ]
java.io; javax.tools;
615,199
@SuppressWarnings({ "rawtypes", "unchecked" }) public <V, T, K> Index2<V, T, K> queryMapValueIndex(Class<T> targetType, String fieldName, Class<V> valueType, Class<K> keyType) { final IndexQueryInfo info = this.jdb.getIndexQueryInfo( new IndexQueryInfoKey(fieldName, false, targetType, va...
@SuppressWarnings({ STR, STR }) <V, T, K> Index2<V, T, K> function(Class<T> targetType, String fieldName, Class<V> valueType, Class<K> keyType) { final IndexQueryInfo info = this.jdb.getIndexQueryInfo( new IndexQueryInfoKey(fieldName, false, targetType, valueType, keyType)); if (!(info.indexInfo instanceof MapValueInde...
/** * Get the composite index on a map value field that includes map keys. * * @param targetType type containing the indexed field; may also be any super-type (e.g., an interface type), * as long as {@code fieldName} is not ambiguous among all sub-types * @param fieldName name of the indexed f...
Get the composite index on a map value field that includes map keys
queryMapValueIndex
{ "repo_name": "permazen/permazen", "path": "permazen-main/src/main/java/io/permazen/JTransaction.java", "license": "apache-2.0", "size": 116588 }
[ "com.google.common.base.Converter", "io.permazen.core.CoreIndex2", "io.permazen.core.ObjId", "io.permazen.index.Index2" ]
import com.google.common.base.Converter; import io.permazen.core.CoreIndex2; import io.permazen.core.ObjId; import io.permazen.index.Index2;
import com.google.common.base.*; import io.permazen.core.*; import io.permazen.index.*;
[ "com.google.common", "io.permazen.core", "io.permazen.index" ]
com.google.common; io.permazen.core; io.permazen.index;
1,545,265
public void writeCITelephoneTypeElements(XMLStreamWriter writer, CITelephone bean) throws XMLStreamException { int numItems; // voice numItems = bean.getVoiceList().size(); for (int i = 0; i < numItems; i++) { String item = bean.getVoiceList().get(i);...
void function(XMLStreamWriter writer, CITelephone bean) throws XMLStreamException { int numItems; numItems = bean.getVoiceList().size(); for (int i = 0; i < numItems; i++) { String item = bean.getVoiceList().get(i); writer.writeStartElement(NS_URI, "voice"); ns1Bindings.writeCharacterString(writer, item); writer.writeE...
/** * Writes elements of CITelephoneType complex type */
Writes elements of CITelephoneType complex type
writeCITelephoneTypeElements
{ "repo_name": "sensiasoft/lib-sensorml", "path": "sensorml-core/src/main/java/org/isotc211/v2005/gmd/bind/XMLStreamBindings.java", "license": "mpl-2.0", "size": 80004 }
[ "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamWriter", "org.isotc211.v2005.gmd.CITelephone" ]
import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.isotc211.v2005.gmd.CITelephone;
import javax.xml.stream.*; import org.isotc211.v2005.gmd.*;
[ "javax.xml", "org.isotc211.v2005" ]
javax.xml; org.isotc211.v2005;
2,643,578
public static void doCloseSession(Session ses, @Nullable ContentSource contentSource) { if (!(contentSource instanceof SmartContentSource) || ((SmartContentSource) contentSource).shouldClose(ses)) { ses.close(); } }
static void function(Session ses, @Nullable ContentSource contentSource) { if (!(contentSource instanceof SmartContentSource) ((SmartContentSource) contentSource).shouldClose(ses)) { ses.close(); } }
/** * Close the Session, unless a {@link SmartContentSource} doesn't want us to. * @param ses the Session to close if necessary * @param contentSource the ContentSource that the Session was obtained from * @see Session#close() * @see SmartContentSource#shouldClose(Session) */
Close the Session, unless a <code>SmartContentSource</code> doesn't want us to
doCloseSession
{ "repo_name": "stoussaint/spring-data-marklogic", "path": "src/main/java/com/_4dconcept/springframework/data/marklogic/datasource/ContentSourceUtils.java", "license": "apache-2.0", "size": 19626 }
[ "com.marklogic.xcc.ContentSource", "com.marklogic.xcc.Session", "org.springframework.lang.Nullable" ]
import com.marklogic.xcc.ContentSource; import com.marklogic.xcc.Session; import org.springframework.lang.Nullable;
import com.marklogic.xcc.*; import org.springframework.lang.*;
[ "com.marklogic.xcc", "org.springframework.lang" ]
com.marklogic.xcc; org.springframework.lang;
2,026,565
public void runIdleVerifyCheckCrcFailsOnNotIdleCluster(boolean allowOverwrite) throws Exception { IgniteEx ig = startGrids(2); ig.cluster().active(true); int cntPreload = 100; int maxItems = 100000; createCacheAndPreload(ig, DEFAULT_CACHE_NAME, cntPreload, 1, new CachePre...
void function(boolean allowOverwrite) throws Exception { IgniteEx ig = startGrids(2); ig.cluster().active(true); int cntPreload = 100; int maxItems = 100000; createCacheAndPreload(ig, DEFAULT_CACHE_NAME, cntPreload, 1, new CachePredicate(F.asList(ig.name()))); if (persistenceEnable()) { forceCheckpoint(); enableCheckpo...
/** * Check idle on busy cluster. * * @param allowOverwrite Overwrite param for datastreamer. * @throws Exception */
Check idle on busy cluster
runIdleVerifyCheckCrcFailsOnNotIdleCluster
{ "repo_name": "ascherbakoff/ignite", "path": "modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerIndexingTest.java", "license": "apache-2.0", "size": 10865 }
[ "java.util.List", "java.util.concurrent.CountDownLatch", "java.util.concurrent.atomic.AtomicBoolean", "org.apache.ignite.IgniteDataStreamer", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.IgniteEx", "org.apache.ignite.internal.IgniteInternalFuture", "org.apache.ignite.internal.u...
import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.ignite.IgniteDataStreamer; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.IgniteInternalFuture; import org.a...
import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.lang.*; import org.apache.ignite.testframework.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,070,334
public AtomicInteger getAvailableCredits() { return availableCredits; }
AtomicInteger function() { return availableCredits; }
/** * To be used on tests only */
To be used on tests only
getAvailableCredits
{ "repo_name": "mnovak1/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerConsumerImpl.java", "license": "apache-2.0", "size": 47779 }
[ "java.util.concurrent.atomic.AtomicInteger" ]
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
2,621,085
@Override public List<InputSplit> getSplits(JobContext context, int minSplitCountHint) throws IOException, InterruptedException { KeyFactory kFact = null; try { kFact = (KeyFactory) getKeyFactoryClass().newInstance(); } catch (InstantiationException e) { LOG.error("Key factory was not in...
List<InputSplit> function(JobContext context, int minSplitCountHint) throws IOException, InterruptedException { KeyFactory kFact = null; try { kFact = (KeyFactory) getKeyFactoryClass().newInstance(); } catch (InstantiationException e) { LOG.error(STR); LOG.error(e.getMessage()); e.printStackTrace(); } catch (IllegalAcc...
/** * Gets the splits for a data store. * @param context JobContext * @param minSplitCountHint Hint for a minimum split count * @return List<InputSplit> A list of splits */
Gets the splits for a data store
getSplits
{ "repo_name": "dcrankshaw/giraph", "path": "giraph-gora/src/main/java/org/apache/giraph/io/gora/GoraEdgeInputFormat.java", "license": "apache-2.0", "size": 12128 }
[ "java.io.IOException", "java.util.List", "org.apache.giraph.io.gora.utils.GoraUtils", "org.apache.giraph.io.gora.utils.KeyFactory", "org.apache.gora.query.Query", "org.apache.hadoop.mapreduce.InputSplit", "org.apache.hadoop.mapreduce.JobContext" ]
import java.io.IOException; import java.util.List; import org.apache.giraph.io.gora.utils.GoraUtils; import org.apache.giraph.io.gora.utils.KeyFactory; import org.apache.gora.query.Query; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.JobContext;
import java.io.*; import java.util.*; import org.apache.giraph.io.gora.utils.*; import org.apache.gora.query.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "java.util", "org.apache.giraph", "org.apache.gora", "org.apache.hadoop" ]
java.io; java.util; org.apache.giraph; org.apache.gora; org.apache.hadoop;
1,480,645
// ----------------------------------------------------------------------- public static boolean isFileNewer(File file, File reference) { if (reference == null) { throw new IllegalArgumentException( "No specified reference file"); } if (!reference.exists()) { throw new IllegalArgumentException( ...
static boolean function(File file, File reference) { if (reference == null) { throw new IllegalArgumentException( STR); } if (!reference.exists()) { throw new IllegalArgumentException( STR + reference + STR); } return isFileNewer(file, reference.lastModified()); }
/** * Tests if the specified <code>File</code> is newer than the reference * <code>File</code>. * @param file the <code>File</code> of which the modification date must be * compared, must not be <code>null</code> * @param reference the <code>File</code> of which the modification date is * used, must...
Tests if the specified <code>File</code> is newer than the reference <code>File</code>
isFileNewer
{ "repo_name": "Odyno/icaro-rca", "path": "swing/src/main/java/net/staniscia/rca/swing/common/SomeFileUtils.java", "license": "gpl-2.0", "size": 69011 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,252,020
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(NamedElement.class)) { case OntoumlPackage.NAMED_ELEMENT__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); re...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(NamedElement.class)) { case OntoumlPackage.NAMED_ELEMENT__NAME: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); }
/** * 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": "MenthorTools/ontouml-metamodel", "path": "net.menthor.onto2.ontouml.edit/src-gen/net/menthor/onto2/ontouml/provider/NamedElementItemProvider.java", "license": "mit", "size": 3644 }
[ "net.menthor.onto2.ontouml.NamedElement", "net.menthor.onto2.ontouml.OntoumlPackage", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import net.menthor.onto2.ontouml.NamedElement; import net.menthor.onto2.ontouml.OntoumlPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import net.menthor.onto2.ontouml.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "net.menthor.onto2", "org.eclipse.emf" ]
net.menthor.onto2; org.eclipse.emf;
1,393,502
private boolean fixHashGroupsForRoute(ArrayList<DeviceId> route, boolean revoke) { DeviceId targetSw = route.get(0); if (route.size() < 2) { log.warn("Cannot fixHashGroupsForRoute - no dstSw in route {}", route); return false; ...
boolean function(ArrayList<DeviceId> route, boolean revoke) { DeviceId targetSw = route.get(0); if (route.size() < 2) { log.warn(STR, route); return false; } DeviceId destSw = route.get(1); if (!seenBeforeRoutes.containsEntry(destSw, targetSw)) { log.warn(STR, targetSw, destSw); return false; } log.debug(STR, targetSw,...
/** * Edits hash groups in the src-switch (targetSw) of a route-path by * calling the groupHandler to either add or remove buckets in an existing * hash group. * * @param route a single list representing a route-path where the first element * is the src-switch (targetSw) o...
Edits hash groups in the src-switch (targetSw) of a route-path by calling the groupHandler to either add or remove buckets in an existing hash group
fixHashGroupsForRoute
{ "repo_name": "oplinkoms/onos", "path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/DefaultRoutingHandler.java", "license": "apache-2.0", "size": 103484 }
[ "java.util.ArrayList", "java.util.Set", "org.onosproject.net.DeviceId", "org.onosproject.segmentrouting.grouphandler.DefaultGroupHandler" ]
import java.util.ArrayList; import java.util.Set; import org.onosproject.net.DeviceId; import org.onosproject.segmentrouting.grouphandler.DefaultGroupHandler;
import java.util.*; import org.onosproject.net.*; import org.onosproject.segmentrouting.grouphandler.*;
[ "java.util", "org.onosproject.net", "org.onosproject.segmentrouting" ]
java.util; org.onosproject.net; org.onosproject.segmentrouting;
1,196,379
@SuppressWarnings("unchecked") public V pop() { if (size > 0) { V first = (V) objects[0]; System.arraycopy(objects, 1, objects, 0, size - 1); System.arraycopy(values, 1, values, 0, size - 1); --size; return first; } else { ...
@SuppressWarnings(STR) V function() { if (size > 0) { V first = (V) objects[0]; System.arraycopy(objects, 1, objects, 0, size - 1); System.arraycopy(values, 1, values, 0, size - 1); --size; return first; } else { throw new NoSuchElementException(STR); } }
/** * <p> * Pops the first object (the one with the best value) from the Container. * In other words, removes and returns the first object of this container. * </p> * * @return The first object of this container. * @throws NoSuchElementException * - If this c...
Pops the first object (the one with the best value) from the Container. In other words, removes and returns the first object of this container.
pop
{ "repo_name": "AKSW/topicmodeling", "path": "topicmodeling.commons/src/main/java/org/dice_research/topicmodeling/commons/collections/TopDoubleObjectCollection.java", "license": "lgpl-3.0", "size": 10665 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,308,988
public void updatePatient(StudyLocal study, Dataset attrs) { String pid = attrs.getString(Tags.PatientID); // If the patient id is not included, then we don't have to do any // patient update. Although patient id is type 2 in DICOM, but for DC, // we enforce this. if (pid == null || pid.length() == 0) ...
void function(StudyLocal study, Dataset attrs) { String pid = attrs.getString(Tags.PatientID); if (pid == null pid.length() == 0) return; PatientLocal newPatient = updateOrCreate(attrs); if(study.getPatient().getPatientId().equals(pid)) return; study.setPatient(newPatient); }
/** * Update patient data as well as relink study with the patient if the patient * is different than original one. * * @ejb.interface-method */
Update patient data as well as relink study with the patient if the patient is different than original one
updatePatient
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4jboss-all/tags/DCM4CHEE_2_10_9/dcm4jboss-ejb/src/java/org/dcm4chex/archive/ejb/session/PatientUpdateBean.java", "license": "apache-2.0", "size": 7931 }
[ "org.dcm4che.data.Dataset", "org.dcm4che.dict.Tags", "org.dcm4chex.archive.ejb.interfaces.PatientLocal", "org.dcm4chex.archive.ejb.interfaces.StudyLocal" ]
import org.dcm4che.data.Dataset; import org.dcm4che.dict.Tags; import org.dcm4chex.archive.ejb.interfaces.PatientLocal; import org.dcm4chex.archive.ejb.interfaces.StudyLocal;
import org.dcm4che.data.*; import org.dcm4che.dict.*; import org.dcm4chex.archive.ejb.interfaces.*;
[ "org.dcm4che.data", "org.dcm4che.dict", "org.dcm4chex.archive" ]
org.dcm4che.data; org.dcm4che.dict; org.dcm4chex.archive;
772,838
private void doFireMetaObjectChanged(final MetaObjectChangeEvent moce, final Change change) { if (moce.getSource() == null) { throw new IllegalArgumentException("MetaObjectChangeEvent objects without source are illegal"); // NOI18N } final Iterator<MetaObjectChangeListener> it; ...
void function(final MetaObjectChangeEvent moce, final Change change) { if (moce.getSource() == null) { throw new IllegalArgumentException(STR); } final Iterator<MetaObjectChangeListener> it; synchronized (listeners) { it = new HashSet<MetaObjectChangeListener>(listeners).iterator(); } while (it.hasNext()) { if (Change....
/** * Assures that the source of the {@link MetaObjectChangeEvent} has been set and fires an appropriate change to all * listeners. * * @param moce DOCUMENT ME! * @param change DOCUMENT ME! * * @throws IllegalArgumentException if the <code>MetaObjectChangeEvent</code> does n...
Assures that the source of the <code>MetaObjectChangeEvent</code> has been set and fires an appropriate change to all listeners
doFireMetaObjectChanged
{ "repo_name": "cismet/cids-navigator", "path": "src/main/java/Sirius/navigator/tools/MetaObjectChangeSupport.java", "license": "gpl-3.0", "size": 7547 }
[ "java.util.HashSet", "java.util.Iterator" ]
import java.util.HashSet; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,010,060
public static JmeterKeyStore getInstance(String type) throws KeyStoreException { return getInstance(type, 0, 0, null); }
static JmeterKeyStore function(String type) throws KeyStoreException { return getInstance(type, 0, 0, null); }
/** * Create a keystore which returns the first alias only. * * @param type * of the store e.g. JKS * @return the keystore * @throws KeyStoreException * when the type of the store is not supported */
Create a keystore which returns the first alias only
getInstance
{ "repo_name": "ubikfsabbe/jmeter", "path": "src/core/org/apache/jmeter/util/keystore/JmeterKeyStore.java", "license": "apache-2.0", "size": 12304 }
[ "java.security.KeyStoreException" ]
import java.security.KeyStoreException;
import java.security.*;
[ "java.security" ]
java.security;
1,812,523
public Calendar getBirthday() { return birthday; }
Calendar function() { return birthday; }
/** * Getter for birthday. * * @return birthday */
Getter for birthday
getBirthday
{ "repo_name": "wolfdog007/aruzhev", "path": "chapter_005/src/main/java/ru/job4j/map/User.java", "license": "apache-2.0", "size": 2163 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
2,415,093
if(Logger.DEBUG)Logger.d("APP", "main()"); if( args.length == 0 ){ System.out.println("ERR! Argument missing : Configuration_file "); System.exit(1); return; } // Step 1:: parse the configuration file // parse configuration file to data structure new ConfigFileReader().parseConfigFile(arg...
if(Logger.DEBUG)Logger.d("APP", STR); if( args.length == 0 ){ System.out.println(STR); System.exit(1); return; } new ConfigFileReader().parseConfigFile(args[0]); NodeManager.getInstance().init(); }
/** * This method begin execution of Bully Election Algorithm. * * @param args A String Array of arguments as an input. The first * argument should be filename with set of Nodes */
This method begin execution of Bully Election Algorithm
main
{ "repo_name": "msimar/ElectionAlgorithm", "path": "src/App.java", "license": "gpl-2.0", "size": 995 }
[ "com.mps.pearl.ConfigFileReader", "com.mps.pearl.core.NodeManager", "com.mps.pearl.util.Logger" ]
import com.mps.pearl.ConfigFileReader; import com.mps.pearl.core.NodeManager; import com.mps.pearl.util.Logger;
import com.mps.pearl.*; import com.mps.pearl.core.*; import com.mps.pearl.util.*;
[ "com.mps.pearl" ]
com.mps.pearl;
2,681,483
protected void visitTabularMeasure( TabularMeasureHandle obj ) { visitMeasure( obj ); }
void function( TabularMeasureHandle obj ) { visitMeasure( obj ); }
/** * Visits the measure element. * * @param obj * the measure element to traverse */
Visits the measure element
visitTabularMeasure
{ "repo_name": "rrimmana/birt-1", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/DesignVisitorImpl.java", "license": "epl-1.0", "size": 33442 }
[ "org.eclipse.birt.report.model.api.olap.TabularMeasureHandle" ]
import org.eclipse.birt.report.model.api.olap.TabularMeasureHandle;
import org.eclipse.birt.report.model.api.olap.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
58,728
public void setDoNotShareClinicalDocumentTypeCodes( Set<TypeCodesDto> doNotShareClinicalDocumentTypeCodes) { this.doNotShareClinicalDocumentTypeCodes = doNotShareClinicalDocumentTypeCodes; }
void function( Set<TypeCodesDto> doNotShareClinicalDocumentTypeCodes) { this.doNotShareClinicalDocumentTypeCodes = doNotShareClinicalDocumentTypeCodes; }
/** * Sets the do not share clinical document type codes. * * @param doNotShareClinicalDocumentTypeCodes the new do not share clinical document type codes */
Sets the do not share clinical document type codes
setDoNotShareClinicalDocumentTypeCodes
{ "repo_name": "OBHITA/Consent2Share", "path": "DS4P/consent2share/service/src/main/java/gov/samhsa/consent2share/service/consentexport/ConsentExportDto.java", "license": "bsd-3-clause", "size": 13316 }
[ "gov.samhsa.consent.TypeCodesDto", "java.util.Set" ]
import gov.samhsa.consent.TypeCodesDto; import java.util.Set;
import gov.samhsa.consent.*; import java.util.*;
[ "gov.samhsa.consent", "java.util" ]
gov.samhsa.consent; java.util;
312,326
@Override public Enumeration<Option> listOptions() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option("\tTurns off all checks - use with caution!\n" + "\tTurning them off assumes that data is purely numeric, doesn't\n" + "\tcontain any missing values, and has a nomina...
Enumeration<Option> function() { Vector<Option> result = new Vector<Option>(); result.addElement(new Option(STR + STR + STR + STR + STR + STR + STR, STR, 0, STR)); result.addElement(new Option( STR, "F", 1, STR)); result.addElement(new Option( STR + STR, "C", 1, STR)); result.addElement(new Option(STR + STR, "K", 1, ST...
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */
Returns an enumeration describing the available options
listOptions
{ "repo_name": "Scauser/j2ee", "path": "Weka_Parallel_Test/weka/weka/filters/unsupervised/attribute/KernelFilter.java", "license": "apache-2.0", "size": 27891 }
[ "java.util.Collections", "java.util.Enumeration", "java.util.Vector" ]
import java.util.Collections; import java.util.Enumeration; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,780,028
protected FacesServletMapping getFacesServletMapping(FacesContext context) { Map<Object, Object> attributes = context.getAttributes(); // Has the mapping already been determined during this request? FacesServletMapping mapping = (FacesServletMapping) attributes.get(CACHED_SERVLET_MAPPIN...
FacesServletMapping function(FacesContext context) { Map<Object, Object> attributes = context.getAttributes(); FacesServletMapping mapping = (FacesServletMapping) attributes.get(CACHED_SERVLET_MAPPING); if (mapping == null) { ExternalContext externalContext = context.getExternalContext(); mapping = calculateFacesServle...
/** * Read the web.xml file that is in the classpath and parse its internals to * figure out how the FacesServlet is mapped for the current webapp. */
Read the web.xml file that is in the classpath and parse its internals to figure out how the FacesServlet is mapped for the current webapp
getFacesServletMapping
{ "repo_name": "kulinski/myfaces", "path": "impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java", "license": "apache-2.0", "size": 27307 }
[ "java.util.Map", "javax.faces.context.ExternalContext", "javax.faces.context.FacesContext", "org.apache.myfaces.shared.application.FacesServletMapping" ]
import java.util.Map; import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import org.apache.myfaces.shared.application.FacesServletMapping;
import java.util.*; import javax.faces.context.*; import org.apache.myfaces.shared.application.*;
[ "java.util", "javax.faces", "org.apache.myfaces" ]
java.util; javax.faces; org.apache.myfaces;
1,598,090
public double[][] convertToDoubleMatrix(String input, int rows, int cols) throws IOException { double[][] ret = null; try { //read input matrix InputStream is = new ByteArrayInputStream(input.getBytes("UTF-8")); ReaderTextCell reader = (ReaderTextCell)MatrixReaderFactory.createMatrixReader(Inp...
double[][] function(String input, int rows, int cols) throws IOException { double[][] ret = null; try { InputStream is = new ByteArrayInputStream(input.getBytes("UTF-8")); ReaderTextCell reader = (ReaderTextCell)MatrixReaderFactory.createMatrixReader(InputInfo.TextCellInputInfo); MatrixBlock mb = reader.readMatrixFromI...
/** * Converts an input string representation of a matrix in textcell format * into a dense double array. The number of rows and columns need to be * specified because textcell only represents non-zero values and hence * does not define the dimensions in the general case. * * @param input a string repres...
Converts an input string representation of a matrix in textcell format into a dense double array. The number of rows and columns need to be specified because textcell only represents non-zero values and hence does not define the dimensions in the general case
convertToDoubleMatrix
{ "repo_name": "aloknsingh/systemml", "path": "system-ml/src/main/java/com/ibm/bi/dml/api/jmlc/Connection.java", "license": "apache-2.0", "size": 6597 }
[ "com.ibm.bi.dml.parser.DMLTranslator", "com.ibm.bi.dml.runtime.DMLRuntimeException", "com.ibm.bi.dml.runtime.io.MatrixReaderFactory", "com.ibm.bi.dml.runtime.io.ReaderTextCell", "com.ibm.bi.dml.runtime.matrix.data.InputInfo", "com.ibm.bi.dml.runtime.matrix.data.MatrixBlock", "com.ibm.bi.dml.runtime.util...
import com.ibm.bi.dml.parser.DMLTranslator; import com.ibm.bi.dml.runtime.DMLRuntimeException; import com.ibm.bi.dml.runtime.io.MatrixReaderFactory; import com.ibm.bi.dml.runtime.io.ReaderTextCell; import com.ibm.bi.dml.runtime.matrix.data.InputInfo; import com.ibm.bi.dml.runtime.matrix.data.MatrixBlock; import com.ibm...
import com.ibm.bi.dml.parser.*; import com.ibm.bi.dml.runtime.*; import com.ibm.bi.dml.runtime.io.*; import com.ibm.bi.dml.runtime.matrix.data.*; import com.ibm.bi.dml.runtime.util.*; import java.io.*;
[ "com.ibm.bi", "java.io" ]
com.ibm.bi; java.io;
877,114
public static void analyze(VisitorState state, LockEventListener listener) { new LockScanner(state, listener).scan(state.getPath(), HeldLockSet.empty()); } private static class LockScanner extends TreePathScanner<Void, HeldLockSet> { private final VisitorState visitorState; private final LockEventLi...
static void function(VisitorState state, LockEventListener listener) { new LockScanner(state, listener).scan(state.getPath(), HeldLockSet.empty()); } private static class LockScanner extends TreePathScanner<Void, HeldLockSet> { private final VisitorState visitorState; private final LockEventListener listener; private s...
/** * Analyzes a method body, tracking the set of held locks and checking accesses to guarded * members. */
Analyzes a method body, tracking the set of held locks and checking accesses to guarded members
analyze
{ "repo_name": "ropik/error-prone", "path": "core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/HeldLockAnalyzer.java", "license": "apache-2.0", "size": 15832 }
[ "com.google.errorprone.VisitorState", "com.sun.source.util.TreePathScanner" ]
import com.google.errorprone.VisitorState; import com.sun.source.util.TreePathScanner;
import com.google.errorprone.*; import com.sun.source.util.*;
[ "com.google.errorprone", "com.sun.source" ]
com.google.errorprone; com.sun.source;
564,897
public void mouseDragged(final MouseEvent e) { if (fGrowBase != null) { Point loc = fComponent.getLocationOnScreen(); int width = Math.max(2, loc.x + e.getX() - fGrowBase.x); int height = Math.max(2, loc.y + e.getY() - fGrowBase.y); if (e.isShiftDown() && fImage != null) { // Make...
void function(final MouseEvent e) { if (fGrowBase != null) { Point loc = fComponent.getLocationOnScreen(); int width = Math.max(2, loc.x + e.getX() - fGrowBase.x); int height = Math.max(2, loc.y + e.getY() - fGrowBase.y); if (e.isShiftDown() && fImage != null) { float imgWidth = fImage.getWidth(this); float imgHeight =...
/** * Resize image if initial click was in grow-box: * @param e Mouse event */
Resize image if initial click was in grow-box:
mouseDragged
{ "repo_name": "GenomicParisCentre/doelan", "path": "src/main/java/fr/ens/transcriptome/doelan/gui/MyImageView.java", "license": "gpl-2.0", "size": 27126 }
[ "java.awt.Point", "java.awt.event.MouseEvent" ]
import java.awt.Point; import java.awt.event.MouseEvent;
import java.awt.*; import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,081,895
public Request add(Request request) { // Tag the request as belonging to this queue and add it to the set of current requests. request.setRequestQueue(this); synchronized (mCurrentRequests) { mCurrentRequests.add(request); } // Process requests in the order they ...
Request function(Request request) { request.setRequestQueue(this); synchronized (mCurrentRequests) { mCurrentRequests.add(request); } request.setSequence(getSequenceNumber()); request.addMarker(STR); if (!request.shouldCache()) { mNetworkQueue.add(request); return request; } synchronized (mWaitingRequests) { String cac...
/** * Adds a Request to the dispatch queue. * @param request The request to service * @return The passed-in request */
Adds a Request to the dispatch queue
add
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/support/volley/src/com/android/volley/RequestQueue.java", "license": "gpl-2.0", "size": 10326 }
[ "java.util.LinkedList", "java.util.Queue" ]
import java.util.LinkedList; import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
2,640,521
@Test public void testOnReferralWithOrWithoutManageDsaItControl() throws Exception { LDAPConnection conn = new LDAPConnection(); LDAPConstraints constraints = new LDAPConstraints(); constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, Strings.EMPTY_BYTES ) )...
void function() throws Exception { LDAPConnection conn = new LDAPConnection(); LDAPConstraints constraints = new LDAPConstraints(); constraints.setClientControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, Strings.EMPTY_BYTES ) ); constraints.setServerControls( new LDAPControl( LDAPControl.MANAGEDSAIT, true, Strin...
/** * Tests bind operation on referral entry. */
Tests bind operation on referral entry
testOnReferralWithOrWithoutManageDsaItControl
{ "repo_name": "lucastheisen/apache-directory-server", "path": "server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java", "license": "apache-2.0", "size": 6407 }
[ "org.apache.directory.api.util.Strings", "org.junit.Assert" ]
import org.apache.directory.api.util.Strings; import org.junit.Assert;
import org.apache.directory.api.util.*; import org.junit.*;
[ "org.apache.directory", "org.junit" ]
org.apache.directory; org.junit;
562,557
public byte[] asBytes() throws OspfParseException { byte[] lsaMessage = null; byte[] lsaHeader = getLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; }
byte[] function() throws OspfParseException { byte[] lsaMessage = null; byte[] lsaHeader = getLsaHeaderAsByteArray(); byte[] lsaBody = getLsaBodyAsByteArray(); lsaMessage = Bytes.concat(lsaHeader, lsaBody); return lsaMessage; }
/** * Gets LSA bytes as array. * * @return LSA message as bytes * @throws OspfParseException might throws exception while parsing packet */
Gets LSA bytes as array
asBytes
{ "repo_name": "sonu283304/onos", "path": "protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/types/AsbrSummaryLsa.java", "license": "apache-2.0", "size": 6643 }
[ "com.google.common.primitives.Bytes", "org.onosproject.ospf.exceptions.OspfParseException" ]
import com.google.common.primitives.Bytes; import org.onosproject.ospf.exceptions.OspfParseException;
import com.google.common.primitives.*; import org.onosproject.ospf.exceptions.*;
[ "com.google.common", "org.onosproject.ospf" ]
com.google.common; org.onosproject.ospf;
1,578,999
private static void tryCloseCursor(Cursor c) { if (c != null && !c.isClosed()) { c.close(); } }
static void function(Cursor c) { if (c != null && !c.isClosed()) { c.close(); } }
/** * Closes the cursor if it is not null and not closed. */
Closes the cursor if it is not null and not closed
tryCloseCursor
{ "repo_name": "teneighty/authup", "path": "AuthUp/src/main/java/io/authup/android/apps/authenticator/AccountDb.java", "license": "apache-2.0", "size": 13984 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
2,059,979
public void onUnpublication() { Collection col = m_instances.values(); Iterator it = col.iterator(); while (it.hasNext()) { m_handler.getInstanceManager().deletePojoObject(it.next()); } m_instances.clear(); } /...
void function() { Collection col = m_instances.values(); Iterator it = col.iterator(); while (it.hasNext()) { m_handler.getInstanceManager().deletePojoObject(it.next()); } m_instances.clear(); } /** * OSGi Service Factory getService method. * @param arg0 the asking bundle * @param arg1 the service registration * @retur...
/** * The service is going to be unregistered. * The instance map is cleared. Created object are disposed. * @see org.apache.felix.ipojo.handlers.providedservice.CreationStrategy#onUnpublication() */
The service is going to be unregistered. The instance map is cleared. Created object are disposed
onUnpublication
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/providedservice/ProvidedService.java", "license": "apache-2.0", "size": 39685 }
[ "java.util.Collection", "java.util.Iterator", "org.apache.felix.ipojo.IPOJOServiceFactory" ]
import java.util.Collection; import java.util.Iterator; import org.apache.felix.ipojo.IPOJOServiceFactory;
import java.util.*; import org.apache.felix.ipojo.*;
[ "java.util", "org.apache.felix" ]
java.util; org.apache.felix;
1,486,120
public boolean setPassword(String password) { try { byte[] currentPasswordHash = decodeKey(getConfig(CONFIG_PASSWORD_HASH)); if (password!=null) { byte[] newPasswordHash = getPasswordHash(password); if (currentPasswordHash.length==0 || Arrays.equals(getHash(newPasswordHash), currentPas...
boolean function(String password) { try { byte[] currentPasswordHash = decodeKey(getConfig(CONFIG_PASSWORD_HASH)); if (password!=null) { byte[] newPasswordHash = getPasswordHash(password); if (currentPasswordHash.length==0 Arrays.equals(getHash(newPasswordHash), currentPasswordHash)) { passwordHash=newPasswordHash; ret...
/** * Sets password used to encrypt/decrypt secrets. */
Sets password used to encrypt/decrypt secrets
setPassword
{ "repo_name": "zanhecht/lenharo-google-authenticator", "path": "src/com/google/android/apps/authenticator/AccountDb.java", "license": "apache-2.0", "size": 25325 }
[ "android.util.Log", "com.google.android.apps.authenticator.Base32String", "java.util.Arrays" ]
import android.util.Log; import com.google.android.apps.authenticator.Base32String; import java.util.Arrays;
import android.util.*; import com.google.android.apps.authenticator.*; import java.util.*;
[ "android.util", "com.google.android", "java.util" ]
android.util; com.google.android; java.util;
852,648
@Override public void processSerialData(String data) { logger.trace("Received raw datatagram '{}'", data); String[] dataElements = data.split("@"); if (dataElements.length == 11) { int airFlow = Integer.valueOf(defaultIfBlank(dataElements[0], "0")); float tempera...
void function(String data) { logger.trace(STR, data); String[] dataElements = data.split("@"); if (dataElements.length == 11) { int airFlow = Integer.valueOf(defaultIfBlank(dataElements[0], "0")); float temperature = Float.valueOf(defaultIfBlank(dataElements[1], "0")); float skinConductance = Float.valueOf(defaultIfBla...
/** * Processes a datagram being read from the serial port. A datagram comprises of eleven * data elements separated by '@'. * * @param data the new datagram to process/parse */
Processes a datagram being read from the serial port. A datagram comprises of eleven data elements separated by '@'
processSerialData
{ "repo_name": "jowiho/openhab", "path": "bundles/binding/org.openhab.binding.ehealth/src/main/java/org/openhab/binding/ehealth/internal/EHealthBinding.java", "license": "epl-1.0", "size": 5457 }
[ "org.openhab.binding.ehealth.protocol.EHealthDatagram" ]
import org.openhab.binding.ehealth.protocol.EHealthDatagram;
import org.openhab.binding.ehealth.protocol.*;
[ "org.openhab.binding" ]
org.openhab.binding;
2,527,038
@Test public void testCloseChannelOnExceptionCaught() throws Exception { KvStateRegistry registry = new KvStateRegistry(); AtomicKvStateRequestStats stats = new AtomicKvStateRequestStats(); MessageSerializer<KvStateInternalRequest, KvStateResponse> serializer = new MessageSerializer<>(new KvStateInternal...
void function() throws Exception { KvStateRegistry registry = new KvStateRegistry(); AtomicKvStateRequestStats stats = new AtomicKvStateRequestStats(); MessageSerializer<KvStateInternalRequest, KvStateResponse> serializer = new MessageSerializer<>(new KvStateInternalRequest.KvStateInternalRequestDeserializer(), new KvS...
/** * Tests that the channel is closed if an Exception reaches the channel handler. */
Tests that the channel is closed if an Exception reaches the channel handler
testCloseChannelOnExceptionCaught
{ "repo_name": "haohui/flink", "path": "flink-queryable-state/flink-queryable-state-java/src/test/java/org/apache/flink/queryablestate/network/KvStateServerHandlerTest.java", "license": "apache-2.0", "size": 28627 }
[ "org.apache.flink.queryablestate.messages.KvStateInternalRequest", "org.apache.flink.queryablestate.messages.KvStateResponse", "org.apache.flink.queryablestate.network.messages.MessageSerializer", "org.apache.flink.queryablestate.network.messages.MessageType", "org.apache.flink.queryablestate.server.KvState...
import org.apache.flink.queryablestate.messages.KvStateInternalRequest; import org.apache.flink.queryablestate.messages.KvStateResponse; import org.apache.flink.queryablestate.network.messages.MessageSerializer; import org.apache.flink.queryablestate.network.messages.MessageType; import org.apache.flink.queryablestate....
import org.apache.flink.queryablestate.messages.*; import org.apache.flink.queryablestate.network.messages.*; import org.apache.flink.queryablestate.server.*; import org.apache.flink.runtime.query.*; import org.apache.flink.runtime.query.netty.*; import org.apache.flink.shaded.netty4.io.netty.buffer.*; import org.apach...
[ "org.apache.flink", "org.junit" ]
org.apache.flink; org.junit;
1,137,319
public OSCMessage freeMsg() { return new OSCMessage( "/n_free", new Object[] { new Integer( getNodeID() )}); }
OSCMessage function() { return new OSCMessage( STR, new Object[] { new Integer( getNodeID() )}); }
/** * Creates an OSC <code>/n_free</code> message for the node. * * @return an <code>OSCMessage</code> which can be sent to the server * * @see #free() */
Creates an OSC <code>/n_free</code> message for the node
freeMsg
{ "repo_name": "rjmarsan/GestureSound", "path": "libs/JCollider/src/de/sciss/jcollider/Node.java", "license": "gpl-2.0", "size": 59354 }
[ "de.sciss.net.OSCMessage" ]
import de.sciss.net.OSCMessage;
import de.sciss.net.*;
[ "de.sciss.net" ]
de.sciss.net;
2,352,986
List<SnapshotDataStoreVO> listAllByVolumeAndDataStore(long volumeId, DataStoreRole role);
List<SnapshotDataStoreVO> listAllByVolumeAndDataStore(long volumeId, DataStoreRole role);
/** * List all snapshots in 'snapshot_store_ref' by volume and data store role. Therefore, it is possible to list all snapshots that are in the primary storage or in the secondary storage. */
List all snapshots in 'snapshot_store_ref' by volume and data store role. Therefore, it is possible to list all snapshots that are in the primary storage or in the secondary storage
listAllByVolumeAndDataStore
{ "repo_name": "DaanHoogland/cloudstack", "path": "engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/SnapshotDataStoreDao.java", "license": "apache-2.0", "size": 3131 }
[ "com.cloud.storage.DataStoreRole", "java.util.List" ]
import com.cloud.storage.DataStoreRole; import java.util.List;
import com.cloud.storage.*; import java.util.*;
[ "com.cloud.storage", "java.util" ]
com.cloud.storage; java.util;
2,264,534
protected void transferFrom(ReadableByteChannel in, long position, long size) throws ApfloatRuntimeException { this.fileStorage.transferFrom(in, position, size); }
void function(ReadableByteChannel in, long position, long size) throws ApfloatRuntimeException { this.fileStorage.transferFrom(in, position, size); }
/** * Transfer from a readable channel, possibly in multiple chunks. * * @param in Input channel. * @param position Start position of transfer. * @param size Total number of bytes to transfer. */
Transfer from a readable channel, possibly in multiple chunks
transferFrom
{ "repo_name": "karlmutch/WebAlgo-Java-Class", "path": "apFloat/source/org/apfloat/internal/DiskDataStorage.java", "license": "lgpl-2.1", "size": 15312 }
[ "java.nio.channels.ReadableByteChannel", "org.apfloat.ApfloatRuntimeException" ]
import java.nio.channels.ReadableByteChannel; import org.apfloat.ApfloatRuntimeException;
import java.nio.channels.*; import org.apfloat.*;
[ "java.nio", "org.apfloat" ]
java.nio; org.apfloat;
1,002,400
private static native final void setParent(Widget widget, Grid<?> parent) ;
static native final void function(Widget widget, Grid<?> parent) ;
/** * Accesses the package private method Widget#setParent() * * @param widget * The widget to access * @param parent * The parent to set */
Accesses the package private method Widget#setParent()
setParent
{ "repo_name": "travisfw/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 285859 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
2,033,185
public Iterator getClasses() { return classList.iterator(); }
Iterator function() { return classList.iterator(); }
/** * Obtain an iterator over the collection of test case classes loaded by <code>loadTestCases</code>. * @return Iterator on loaded classes list */
Obtain an iterator over the collection of test case classes loaded by <code>loadTestCases</code>
getClasses
{ "repo_name": "9fevrier/displaytag", "path": "displaytag/src/test/java/org/displaytag/test/TestAll.java", "license": "artistic-2.0", "size": 8748 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
474,499
public void logAndThrowRestLiServiceException(HttpStatus status, String msg, Exception e) { if (e != null) { LOG.error(msg, e); throw new RestLiServiceException(status, msg + " cause = " + e.getMessage()); } else { LOG.error(msg); throw new RestLiServiceException(status, msg); } ...
void function(HttpStatus status, String msg, Exception e) { if (e != null) { LOG.error(msg, e); throw new RestLiServiceException(status, msg + STR + e.getMessage()); } else { LOG.error(msg); throw new RestLiServiceException(status, msg); } }
/** * Logs message and throws Rest.li exception * @param status HTTP status code * @param msg error message * @param e exception */
Logs message and throws Rest.li exception
logAndThrowRestLiServiceException
{ "repo_name": "sahilTakiar/gobblin", "path": "gobblin-restli/gobblin-flow-config-service/gobblin-flow-config-service-server/src/main/java/gobblin/service/FlowConfigsResource.java", "license": "apache-2.0", "size": 12006 }
[ "com.linkedin.restli.common.HttpStatus", "com.linkedin.restli.server.RestLiServiceException" ]
import com.linkedin.restli.common.HttpStatus; import com.linkedin.restli.server.RestLiServiceException;
import com.linkedin.restli.common.*; import com.linkedin.restli.server.*;
[ "com.linkedin.restli" ]
com.linkedin.restli;
2,474,263
public void register() { if (mInputDriver == null) { UserDriverManager manager = UserDriverManager.getManager(); mInputDriver = buildInputDriver(); manager.registerInputDriver(mInputDriver); } }
void function() { if (mInputDriver == null) { UserDriverManager manager = UserDriverManager.getManager(); mInputDriver = buildInputDriver(); manager.registerInputDriver(mInputDriver); } }
/** * Register this driver with the Android input framework. */
Register this driver with the Android input framework
register
{ "repo_name": "Ic-ks/contrib-drivers", "path": "cap12xx/src/main/java/com/google/android/things/contrib/driver/cap12xx/Cap12xxInputDriver.java", "license": "apache-2.0", "size": 9438 }
[ "com.google.android.things.userdriver.UserDriverManager" ]
import com.google.android.things.userdriver.UserDriverManager;
import com.google.android.things.userdriver.*;
[ "com.google.android" ]
com.google.android;
1,103,352
@Test public void testLongRunningThumbnails() throws Exception { logger.debug("Starting testLongRunningThumbnails"); performLongRunningThumbnailTest( Collections.singletonList(ExpectedThumbnail.withName("imgpreview")), Collections.singletonList(new ExpectedAssoc(Reg...
void function() throws Exception { logger.debug(STR); performLongRunningThumbnailTest( Collections.singletonList(ExpectedThumbnail.withName(STR)), Collections.singletonList(new ExpectedAssoc(RegexQNamePattern.MATCH_ALL, STR, 1)), new EmptyLongRunningConcurrentWork(), 60, null); }
/** * Verifies that our long-running test setup passes with simple behavior of * a single thumbnail requested with no other concurrent work. * * @throws Exception */
Verifies that our long-running test setup passes with simple behavior of a single thumbnail requested with no other concurrent work
testLongRunningThumbnails
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/test/java/org/alfresco/repo/thumbnail/ThumbnailServiceImplTest.java", "license": "lgpl-3.0", "size": 74560 }
[ "java.util.Collections", "org.alfresco.service.namespace.RegexQNamePattern" ]
import java.util.Collections; import org.alfresco.service.namespace.RegexQNamePattern;
import java.util.*; import org.alfresco.service.namespace.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
1,325,604
@Override public Response applicationsApplicationIdPut(String applicationId, ApplicationDTO body, String ifMatch, MessageContext messageContext) { String username = RestApiCommonUtil.getLoggedInUsername(); try { APIConsumer apiConsumer = APIManagerFactory.getInstance().getAPIConsumer...
Response function(String applicationId, ApplicationDTO body, String ifMatch, MessageContext messageContext) { String username = RestApiCommonUtil.getLoggedInUsername(); try { APIConsumer apiConsumer = APIManagerFactory.getInstance().getAPIConsumer(username); Application oldApplication = apiConsumer.getApplicationByUUID...
/** * Update an application by Id * * @param applicationId application identifier * @param body request body containing application details * @param ifMatch If-Match header value * @return response containing the updated application object */
Update an application by Id
applicationsApplicationIdPut
{ "repo_name": "uvindra/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/impl/ApplicationsApiServiceImpl.java", "license": "apache-2.0", "size": 71652 }
[ "javax.ws.rs.core.Response", "org.apache.cxf.jaxrs.ext.MessageContext", "org.wso2.carbon.apimgt.api.APIConsumer", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.Application", "org.wso2.carbon.apimgt.impl.APIManagerFactory", "org.wso2.carbon.apimgt.rest.api.common....
import javax.ws.rs.core.Response; import org.apache.cxf.jaxrs.ext.MessageContext; import org.wso2.carbon.apimgt.api.APIConsumer; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Application; import org.wso2.carbon.apimgt.impl.APIManagerFactory; import org.wso2.carbon.api...
import javax.ws.rs.core.*; import org.apache.cxf.jaxrs.ext.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.apimgt.rest.api.common.*; import org.wso2.carbon.apimgt.rest.api.store.v1.dto.*; import org.wso2.carbon.apimgt.rest.a...
[ "javax.ws", "org.apache.cxf", "org.wso2.carbon" ]
javax.ws; org.apache.cxf; org.wso2.carbon;
2,148,818
checkNotNull(options); PipelineOptionsValidator.validate(PipelineOptions.class, options); // (Re-)register standard FileSystems. Clobbers any prior credentials. FileSystems.setDefaultPipelineOptions(options); @SuppressWarnings("unchecked") PipelineRunner<? extends PipelineResult> result = ...
checkNotNull(options); PipelineOptionsValidator.validate(PipelineOptions.class, options); FileSystems.setDefaultPipelineOptions(options); @SuppressWarnings(STR) PipelineRunner<? extends PipelineResult> result = InstanceBuilder.ofType(PipelineRunner.class) .fromClass(options.getRunner()) .fromFactoryMethod(STR) .withArg...
/** * Constructs a runner from the provided {@link PipelineOptions}. * * @return The newly created runner. */
Constructs a runner from the provided <code>PipelineOptions</code>
fromOptions
{ "repo_name": "lukecwik/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/PipelineRunner.java", "license": "apache-2.0", "size": 3244 }
[ "org.apache.beam.sdk.io.FileSystems", "org.apache.beam.sdk.options.PipelineOptions", "org.apache.beam.sdk.options.PipelineOptionsValidator", "org.apache.beam.sdk.util.InstanceBuilder" ]
import org.apache.beam.sdk.io.FileSystems; import org.apache.beam.sdk.options.PipelineOptions; import org.apache.beam.sdk.options.PipelineOptionsValidator; import org.apache.beam.sdk.util.InstanceBuilder;
import org.apache.beam.sdk.io.*; import org.apache.beam.sdk.options.*; import org.apache.beam.sdk.util.*;
[ "org.apache.beam" ]
org.apache.beam;
369,297
public static void setInstance(final GameSettingsManagerBean thisInstance) { ourInstance = thisInstance; }
static void function(final GameSettingsManagerBean thisInstance) { ourInstance = thisInstance; }
/** * Set the global instance of the manager. Used for the integration with Spring. * * @param thisInstance the manager bean. */
Set the global instance of the manager. Used for the integration with Spring
setInstance
{ "repo_name": "EaW1805/data", "path": "src/main/java/com/eaw1805/data/managers/GameSettingsManager.java", "license": "mit", "size": 3207 }
[ "com.eaw1805.data.managers.beans.GameSettingsManagerBean" ]
import com.eaw1805.data.managers.beans.GameSettingsManagerBean;
import com.eaw1805.data.managers.beans.*;
[ "com.eaw1805.data" ]
com.eaw1805.data;
1,001,804
public void handleEvent(Event event) { if( event.widget == rdBtnDecimal ) { lblShowNumberSystem.setText("0 1 2 3 4 5 6 7 8 9"); } if( event.widget == rdBtnOctal ) { lblShowNumberSystem.setText("0 1 2 3 4 5 6 7"); } if( event.widget == rdBtnBinary ) { lblShowNumberSystem.setText("0 1"); }...
void function(Event event) { if( event.widget == rdBtnDecimal ) { lblShowNumberSystem.setText(STR); } if( event.widget == rdBtnOctal ) { lblShowNumberSystem.setText(STR); } if( event.widget == rdBtnBinary ) { lblShowNumberSystem.setText(STR); } if( event.widget == rdBtnHexa ) { lblShowNumberSystem.setText(STR); } if( e...
/** * Event handling for radio buttons in the number system group */
Event handling for radio buttons in the number system group
handleEvent
{ "repo_name": "jcryptool/incubator", "path": "org.jcryptool.crypto.classic.vernam/src/org/jcryptool/crypto/classic/vernam/ui/VernamWizardPage.java", "license": "epl-1.0", "size": 19719 }
[ "org.eclipse.swt.widgets.Event" ]
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,200,656
void onTrigger(int whichAction, SipCallSession call);
void onTrigger(int whichAction, SipCallSession call);
/** * Called when the user make an action * * @param whichAction what action has been done */
Called when the user make an action
onTrigger
{ "repo_name": "ther12k/android-client", "path": "phone/src/com/voiceblue/phone/ui/incall/IOnCallActionTrigger.java", "license": "gpl-3.0", "size": 3457 }
[ "com.voiceblue.phone.api.SipCallSession" ]
import com.voiceblue.phone.api.SipCallSession;
import com.voiceblue.phone.api.*;
[ "com.voiceblue.phone" ]
com.voiceblue.phone;
1,316,776
public UserRow[] getDirectUsersOfGroupUserRole(int groupUserRoleId) throws AdminPersistenceException { List<UserRow> rows = getRows(SELECT_USERS_IN_GROUPUSERROLE, groupUserRoleId); return rows.toArray(new UserRow[rows.size()]); } static final private String SELECT_USERS_IN_GROUPUSERROLE = "select " ...
UserRow[] function(int groupUserRoleId) throws AdminPersistenceException { List<UserRow> rows = getRows(SELECT_USERS_IN_GROUPUSERROLE, groupUserRoleId); return rows.toArray(new UserRow[rows.size()]); } static final private String SELECT_USERS_IN_GROUPUSERROLE = STR + USER_COLUMNS + STR + STR;
/** * Returns all the Users having directly a given group userRole. * @param groupUserRoleId * @return all the Users having directly a given group userRole. * @throws AdminPersistenceException */
Returns all the Users having directly a given group userRole
getDirectUsersOfGroupUserRole
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/webactiv/organization/UserTable.java", "license": "agpl-3.0", "size": 27597 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,417,091
public interface ITagsStorage { void loadSharedTags(ITaggable aTaggable);
interface ITagsStorage { void function(ITaggable aTaggable);
/** * Loads shared tags in the way, specific to this storage. * * @param aTaggable taggable object. * * @throws NullPointerException if object isn't specified. */
Loads shared tags in the way, specific to this storage
loadSharedTags
{ "repo_name": "pitosalas/blogbridge", "path": "src/com/salas/bb/tags/net/ITagsStorage.java", "license": "gpl-2.0", "size": 1740 }
[ "com.salas.bb.domain.ITaggable" ]
import com.salas.bb.domain.ITaggable;
import com.salas.bb.domain.*;
[ "com.salas.bb" ]
com.salas.bb;
2,778,097
@Generated @Selector("removeTimeRange:") public native void removeTimeRange(@ByValue CMTimeRange timeRange);
@Selector(STR) native void function(@ByValue CMTimeRange timeRange);
/** * removeTimeRange: * <p> * Removes a specified time range from a track. * * @param timeRange The time range to be removed. */
removeTimeRange: Removes a specified time range from a track
removeTimeRange
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/avfoundation/AVMutableMovieTrack.java", "license": "apache-2.0", "size": 31103 }
[ "org.moe.natj.general.ann.ByValue", "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.general.ann.ByValue; import org.moe.natj.objc.ann.Selector;
import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
781,855
public void onUpdate() { this.lastTickPosX = this.posX; this.lastTickPosY = this.posY; this.lastTickPosZ = this.posZ; super.onUpdate(); if (this.throwableShake > 0) { --this.throwableShake; } if (this.inGround) { i...
void function() { this.lastTickPosX = this.posX; this.lastTickPosY = this.posY; this.lastTickPosZ = this.posZ; super.onUpdate(); if (this.throwableShake > 0) { --this.throwableShake; } if (this.inGround) { int i = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile); if (i == this.inTile) { ++this.ticksInGround...
/** * Called to update the entity's position/logic. */
Called to update the entity's position/logic
onUpdate
{ "repo_name": "DrSideburns/Modjam-3-Winter-Warfare-Mod", "path": "src/Dr_Sideburns/winterWarMod/entity/EntityExplodingSnowball1.java", "license": "mit", "size": 13506 }
[ "java.util.List", "net.minecraft.block.Block", "net.minecraft.entity.Entity", "net.minecraft.entity.EntityLivingBase", "net.minecraft.util.AxisAlignedBB", "net.minecraft.util.EnumMovingObjectType", "net.minecraft.util.MathHelper", "net.minecraft.util.MovingObjectPosition", "net.minecraft.util.Vec3" ...
import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.EnumMovingObjectType; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import...
import java.util.*; import net.minecraft.block.*; import net.minecraft.entity.*; import net.minecraft.util.*;
[ "java.util", "net.minecraft.block", "net.minecraft.entity", "net.minecraft.util" ]
java.util; net.minecraft.block; net.minecraft.entity; net.minecraft.util;
1,213,622
protected static synchronized void createInstance(Cache cache, int maximumTimeBetweenPings, CacheClientNotifierStats stats) { refCount++; if (_instance != null) { return; } _instance = new ClientHealthMonitor(cache, maximumTimeBetweenPings, stats); } private ClientHealthMonitor(Cac...
static synchronized void function(Cache cache, int maximumTimeBetweenPings, CacheClientNotifierStats stats) { refCount++; if (_instance != null) { return; } _instance = new ClientHealthMonitor(cache, maximumTimeBetweenPings, stats); } private ClientHealthMonitor(Cache cache, int maximumTimeBetweenPings, CacheClientNoti...
/** * Creates the singleton <code>CacheClientNotifier</code> instance. * * @param cache * The GemFire <code>Cache</code> * @param maximumTimeBetweenPings * The maximum time allowed between pings before determining the * client has died and interrupting its sockets. */
Creates the singleton <code>CacheClientNotifier</code> instance
createInstance
{ "repo_name": "papicella/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java", "license": "apache-2.0", "size": 36867 }
[ "com.gemstone.gemfire.cache.Cache", "com.gemstone.gemfire.internal.i18n.LocalizedStrings", "java.util.HashMap" ]
import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import java.util.HashMap;
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.i18n.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
129,824
public int getCollectsSize(int regency) { HashSet<SignedObject> c = collects.get(regency); return c == null ? 0 : c.size(); }
int function(int regency) { HashSet<SignedObject> c = collects.get(regency); return c == null ? 0 : c.size(); }
/** * Get the quantity of stored collect information * @param regency Regency to be considered * @return quantity of stored collect information for given regency */
Get the quantity of stored collect information
getCollectsSize
{ "repo_name": "bergerch/library", "path": "src/main/java/bftsmart/tom/leaderchange/LCManager.java", "license": "apache-2.0", "size": 32261 }
[ "java.security.SignedObject", "java.util.HashSet" ]
import java.security.SignedObject; import java.util.HashSet;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
1,340,347
public void setData(Map<String,Object> value);
void function(Map<String,Object> value);
/** * Setter for <code>cattle.cluster.data</code>. */
Setter for <code>cattle.cluster.data</code>
setData
{ "repo_name": "rancherio/cattle", "path": "modules/model/src/main/java/io/cattle/platform/core/model/Cluster.java", "license": "apache-2.0", "size": 4840 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,007,738
public Date toDate(String format, Object obj) { return toDate(format, obj, getLocale(), getTimeZone()); } /** * Converts an object to an instance of {@link Date} using the * specified format and {@link Locale} if the object is not already * an instance of Date, Calendar, or Long....
Date function(String format, Object obj) { return toDate(format, obj, getLocale(), getTimeZone()); } /** * Converts an object to an instance of {@link Date} using the * specified format and {@link Locale} if the object is not already * an instance of Date, Calendar, or Long. * * @param format - the format the date is i...
/** * Converts an object to an instance of {@link Date} using the * specified format,the {@link Locale} returned by * {@link #getLocale()}, and the {@link TimeZone} returned by * {@link #getTimeZone()} if the object is not already an instance * of Date, Calendar, or Long. * * @param f...
Converts an object to an instance of <code>Date</code> using the specified format,the <code>Locale</code> returned by <code>#getLocale()</code>, and the <code>TimeZone</code> returned by <code>#getTimeZone()</code> if the object is not already an instance of Date, Calendar, or Long
toDate
{ "repo_name": "gogamoga/velocity-tools-1.4", "path": "src/java/org/apache/velocity/tools/generic/DateTool.java", "license": "apache-2.0", "size": 32705 }
[ "java.util.Calendar", "java.util.Date", "java.util.Locale" ]
import java.util.Calendar; import java.util.Date; import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
190,742
public ArrayList<RediscoverySubSample> getSubSamples() { ArrayList<ControlledVoc> parts = getPartsAsCV(); ArrayList<RediscoverySubSample> subsamples = new ArrayList<RediscoverySubSample>(); Integer itemCount = this.getItemCount().toBigInteger().intValue(); if(parts.size()==0) { // No parts record...
ArrayList<RediscoverySubSample> function() { ArrayList<ControlledVoc> parts = getPartsAsCV(); ArrayList<RediscoverySubSample> subsamples = new ArrayList<RediscoverySubSample>(); Integer itemCount = this.getItemCount().toBigInteger().intValue(); if(parts.size()==0) { RediscoverySubSample ss = new RediscoverySubSample();...
/** * Use some logic to determine the number of samples * * @return */
Use some logic to determine the number of samples
getSubSamples
{ "repo_name": "petebrew/tellervo", "path": "src/main/java/com/rediscov/util/RediscoveryExportEx.java", "license": "gpl-3.0", "size": 44584 }
[ "java.util.ArrayList", "org.tellervo.desktop.util.DictionaryUtil", "org.tridas.schema.ControlledVoc" ]
import java.util.ArrayList; import org.tellervo.desktop.util.DictionaryUtil; import org.tridas.schema.ControlledVoc;
import java.util.*; import org.tellervo.desktop.util.*; import org.tridas.schema.*;
[ "java.util", "org.tellervo.desktop", "org.tridas.schema" ]
java.util; org.tellervo.desktop; org.tridas.schema;
1,540,486
void addActionDefinition(String tenantId, ActionDefinition actionDefinition) throws Exception;
void addActionDefinition(String tenantId, ActionDefinition actionDefinition) throws Exception;
/** * Create a new ActionDefinition * * @param tenantId Tenant where actions are stored * @param actionDefinition the ActionDefinition object to add * @throws Exception on any problem */
Create a new ActionDefinition
addActionDefinition
{ "repo_name": "tsegismont/hawkular-alerts", "path": "hawkular-alerts-api/src/main/java/org/hawkular/alerts/api/services/DefinitionsService.java", "license": "apache-2.0", "size": 30339 }
[ "org.hawkular.alerts.api.model.action.ActionDefinition" ]
import org.hawkular.alerts.api.model.action.ActionDefinition;
import org.hawkular.alerts.api.model.action.*;
[ "org.hawkular.alerts" ]
org.hawkular.alerts;
951,962
public void setDeliveryMode(int deliveryMode) throws JMSException { if (_session == null || _session.isClosed()) throw new javax.jms.IllegalStateException(L.l("setDeliveryMode(): message producer is closed.")); _deliveryMode = deliveryMode; }
void function(int deliveryMode) throws JMSException { if (_session == null _session.isClosed()) throw new javax.jms.IllegalStateException(L.l(STR)); _deliveryMode = deliveryMode; }
/** * Sets the default delivery mode. */
Sets the default delivery mode
setDeliveryMode
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/jms/connection/MessageProducerImpl.java", "license": "gpl-2.0", "size": 8871 }
[ "javax.jms.JMSException" ]
import javax.jms.JMSException;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
1,104,605
void write(OutputStream out) throws IOException;
void write(OutputStream out) throws IOException;
/** * Writes out the slideshow file the is represented by an instance of this * class * * @param out * The OutputStream to write to. * @throws IOException * If there is an unexpected IOException from the passed in * OutputStream */
Writes out the slideshow file the is represented by an instance of this class
write
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/java/org/apache/poi/sl/usermodel/SlideShow.java", "license": "apache-2.0", "size": 3879 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
784,531
void setPostDateAsDate(Date postDate);
void setPostDateAsDate(Date postDate);
/** * Sets the entry post date. * * @param postDate the entry post date. */
Sets the entry post date
setPostDateAsDate
{ "repo_name": "jeraymond/orber.io", "path": "src/main/java/io/orber/site/web/gwt/shared/requestfactory/BlogEntryProxy.java", "license": "apache-2.0", "size": 4609 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
334,775
public LongStream longs() { return StreamSupport.longStream (new RandomLongsSpliterator (this, 0L, Long.MAX_VALUE, Long.MAX_VALUE, 0L), false); } /** * Returns a stream producing the given {@code streamSize} number of * pseudorandom {@code long} value...
LongStream function() { return StreamSupport.longStream (new RandomLongsSpliterator (this, 0L, Long.MAX_VALUE, Long.MAX_VALUE, 0L), false); } /** * Returns a stream producing the given {@code streamSize} number of * pseudorandom {@code long} values from this generator and/or one split * from it; each value conforms to ...
/** * Returns an effectively unlimited stream of pseudorandom {@code * long} values from this generator and/or one split from it. * * @implNote This method is implemented to be equivalent to {@code * longs(Long.MAX_VALUE)}. * * @return a stream of pseudorandom {@code long} values ...
Returns an effectively unlimited stream of pseudorandom long values from this generator and/or one split from it
longs
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.base/share/classes/java/util/SplittableRandom.java", "license": "gpl-2.0", "size": 39557 }
[ "java.util.stream.LongStream", "java.util.stream.StreamSupport" ]
import java.util.stream.LongStream; import java.util.stream.StreamSupport;
import java.util.stream.*;
[ "java.util" ]
java.util;
2,024,794
public String[] getAvailableTypeNames() { checkWidget(); int[] types1 = getAvailableClipboardTypes(); int[] types2 = getAvailablePrimaryTypes(); String[] result = new String[types1.length + types2.length]; int count = 0; for (int i = 0; i < types1.length; i++) { int pName = OS.gdk_atom_name(types1[i]); if (p...
String[] function() { checkWidget(); int[] types1 = getAvailableClipboardTypes(); int[] types2 = getAvailablePrimaryTypes(); String[] result = new String[types1.length + types2.length]; int count = 0; for (int i = 0; i < types1.length; i++) { int pName = OS.gdk_atom_name(types1[i]); if (pName == 0) { continue; } byte[]...
/** * Returns a platform specific list of the data types currently available on the * system clipboard. * * <p>Note: <code>getAvailableTypeNames</code> is a utility for writing a Transfer * sub-class. It should NOT be used within an application because it provides * platform specific information.</p> * * ...
Returns a platform specific list of the data types currently available on the system clipboard. Note: <code>getAvailableTypeNames</code> is a utility for writing a Transfer sub-class. It should NOT be used within an application because it provides platform specific information
getAvailableTypeNames
{ "repo_name": "neelance/swt4ruby", "path": "swt4ruby/src/linux-x86_32/org/eclipse/swt/dnd/Clipboard.java", "license": "epl-1.0", "size": 23737 }
[ "org.eclipse.swt.internal.Converter", "org.eclipse.swt.internal.gtk.OS" ]
import org.eclipse.swt.internal.Converter; import org.eclipse.swt.internal.gtk.OS;
import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.gtk.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
55,455
@Test public void testOneRuleImplicitCycleJava() throws Exception { Package pkg = createScratchPackageForImplicitCycle( "cycle", "java_library(name='jcyc',", " srcs = ['libjcyc.jar', 'foo.java'])"); try { pkg.getTarget("jcyc"); fail(); } catch (NoSuchTargetException ...
void function() throws Exception { Package pkg = createScratchPackageForImplicitCycle( "cycle", STR, STR); try { pkg.getTarget("jcyc"); fail(); } catch (NoSuchTargetException e) { } assertTrue(pkg.containsErrors()); assertContainsEvent(STR + STR); }
/** * Test to detect implicit input/output file overlap in rules. */
Test to detect implicit input/output file overlap in rules
testOneRuleImplicitCycleJava
{ "repo_name": "iamthearm/bazel", "path": "src/test/java/com/google/devtools/build/lib/analysis/CircularDependencyTest.java", "license": "apache-2.0", "size": 7635 }
[ "com.google.devtools.build.lib.packages.NoSuchTargetException", "com.google.devtools.build.lib.packages.Package", "org.junit.Assert" ]
import com.google.devtools.build.lib.packages.NoSuchTargetException; import com.google.devtools.build.lib.packages.Package; import org.junit.Assert;
import com.google.devtools.build.lib.packages.*; import org.junit.*;
[ "com.google.devtools", "org.junit" ]
com.google.devtools; org.junit;
619,049
public void setTimeSeriesDataSource(String timeSeriesDataSource) { JodaBeanUtils.notEmpty(timeSeriesDataSource, "timeSeriesDataSource"); this._timeSeriesDataSource = timeSeriesDataSource; }
void function(String timeSeriesDataSource) { JodaBeanUtils.notEmpty(timeSeriesDataSource, STR); this._timeSeriesDataSource = timeSeriesDataSource; }
/** * Sets the data source name used when querying time series. * @param timeSeriesDataSource the new value of the property, not empty */
Sets the data source name used when querying time series
setTimeSeriesDataSource
{ "repo_name": "jeorme/OG-Platform", "path": "sesame/sesame-component/src/main/java/com/opengamma/sesame/component/HistoricalMarketDataFactoryComponentFactory.java", "license": "apache-2.0", "size": 14404 }
[ "org.joda.beans.JodaBeanUtils" ]
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,662,556
public final void setConfig(final Map<String, Object> config) { this.config = config; }
final void function(final Map<String, Object> config) { this.config = config; }
/** * Sets the objects configuration data. * * @param config the configuration data */
Sets the objects configuration data
setConfig
{ "repo_name": "fvogler/TweetwallFX", "path": "util/src/main/java/org/tweetwallfx/util/ConfigurableObjectBase.java", "license": "mit", "size": 2570 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,339,381
@Column(name = "description", length = 128) public String getDescription() { return m_description; }
@Column(name = STR, length = 128) String function() { return m_description; }
/** * --# description : A free-form description. * * @return a {@link java.lang.String} object. */
--# description : A free-form description
getDescription
{ "repo_name": "rfdrake/opennms", "path": "opennms-model/src/main/java/org/opennms/netmgt/model/OnmsAssetRecord.java", "license": "gpl-2.0", "size": 47897 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,438,326
return Collections.singletonList(method); }
return Collections.singletonList(method); }
/** * Returns a singleton list of the {@link Method} provided in the * constructor. */
Returns a singleton list of the <code>Method</code> provided in the constructor
getMethods
{ "repo_name": "kidaa/isis", "path": "core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/collections/modify/CollectionRemoveFromFacetViaAccessor.java", "license": "apache-2.0", "size": 3257 }
[ "java.util.Collections" ]
import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
1,499,173
boolean next() throws IOException;
boolean next() throws IOException;
/** * Returns whether the next page exists or not. * @return {@code true} if the next page exists * @throws IOException if I/O error was occurred while reading the next page */
Returns whether the next page exists or not
next
{ "repo_name": "ashigeru/asakusafw-m3bp", "path": "bridge/runtime/src/main/java/com/asakusafw/m3bp/mirror/PageDataInput.java", "license": "apache-2.0", "size": 2071 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,825,054
@Test public void testAttachmentWithContentAndLinktype() throws Exception { Asset testAsset = AssetUtils.getTestAsset(); Asset returnedAsset = repository.addAssetNoAttachments(testAsset); Attachment attachmentWithContent = AssetUtils.getTestAttachmentWithContent(); attachmentWit...
void function() throws Exception { Asset testAsset = AssetUtils.getTestAsset(); Asset returnedAsset = repository.addAssetNoAttachments(testAsset); Attachment attachmentWithContent = AssetUtils.getTestAttachmentWithContent(); attachmentWithContent.setLinkType(STR); String attachmentName = STR; byte[] content = STR.getBy...
/** * Tries to upload an attachment that has both content and a linkType. Verifies that the server * does not allow this. */
Tries to upload an attachment that has both content and a linkType. Verifies that the server does not allow this
testAttachmentWithContentAndLinktype
{ "repo_name": "ashleyrobertson/tool.lars", "path": "server/src/fat/java/com/ibm/ws/lars/rest/ApiTest.java", "license": "apache-2.0", "size": 60868 }
[ "com.ibm.ws.lars.rest.model.Asset", "com.ibm.ws.lars.rest.model.Attachment", "org.apache.http.entity.ContentType" ]
import com.ibm.ws.lars.rest.model.Asset; import com.ibm.ws.lars.rest.model.Attachment; import org.apache.http.entity.ContentType;
import com.ibm.ws.lars.rest.model.*; import org.apache.http.entity.*;
[ "com.ibm.ws", "org.apache.http" ]
com.ibm.ws; org.apache.http;
509,485
QName getRequiredCapabilityType();
QName getRequiredCapabilityType();
/** * Returns the value of the '<em><b>Required Capability Type</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Required Capability Type</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the valu...
Returns the value of the 'Required Capability Type' attribute. If the meaning of the 'Required Capability Type' attribute isn't clear, there really should be more of a description here...
getRequiredCapabilityType
{ "repo_name": "alexander-bergmayr/caml2tosca", "path": "projects/eu.artist.migration.deployment.tosca/src/eu/artist/migration/deployment/tosca/TRequirementType.java", "license": "epl-1.0", "size": 2484 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
558,837
protected void processConverts(List<ConvertMetadata> converts, DatabaseMapping mapping, MetadataClass referenceClass, boolean isForMapKey) { if (converts != null) { for (ConvertMetadata convert : converts) { convert.process(mapping, referenceClass, getClassAccessor(), isForMapKey...
void function(List<ConvertMetadata> converts, DatabaseMapping mapping, MetadataClass referenceClass, boolean isForMapKey) { if (converts != null) { for (ConvertMetadata convert : converts) { convert.process(mapping, referenceClass, getClassAccessor(), isForMapKey); } } }
/** * INTERNAL: * Process the JPA defined convert(s) */
Process the JPA defined convert(s)
processConverts
{ "repo_name": "gameduell/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/metadata/accessors/mappings/MappingAccessor.java", "license": "epl-1.0", "size": 96402 }
[ "java.util.List", "org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass", "org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata", "org.eclipse.persistence.mappings.DatabaseMapping" ]
import java.util.List; import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataClass; import org.eclipse.persistence.internal.jpa.metadata.converters.ConvertMetadata; import org.eclipse.persistence.mappings.DatabaseMapping;
import java.util.*; import org.eclipse.persistence.internal.jpa.metadata.accessors.objects.*; import org.eclipse.persistence.internal.jpa.metadata.converters.*; import org.eclipse.persistence.mappings.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
2,180,107
comboLocation = new Combo(container, SWT.READ_ONLY); comboLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); comboLocation.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent arg0) ...
comboLocation = new Combo(container, SWT.READ_ONLY); comboLocation.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1)); comboLocation.addSelectionListener(new SelectionAdapter() { void function(SelectionEvent arg0) { lblDelimiter.setVisible(true); comboDelimiter.setVisible(true); lblQuote.setVisible(tr...
/** * Resets {@link customSeparator} and evaluates page */
Resets <code>customSeparator</code> and evaluates page
widgetSelected
{ "repo_name": "fstahnke/arx", "path": "src/gui/org/deidentifier/arx/gui/view/impl/wizard/ImportWizardPageCSV.java", "license": "apache-2.0", "size": 30999 }
[ "org.deidentifier.arx.gui.resources.Resources", "org.eclipse.swt.events.SelectionAdapter", "org.eclipse.swt.events.SelectionEvent", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Button", "org.eclipse.swt.widgets.Combo" ]
import org.deidentifier.arx.gui.resources.Resources; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Combo;
import org.deidentifier.arx.gui.resources.*; import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "org.deidentifier.arx", "org.eclipse.swt" ]
org.deidentifier.arx; org.eclipse.swt;
2,290,383
public InBandBytestreamSession establishSession(String targetJID, String sessionID) throws XMPPException { Open byteStreamRequest = new Open(sessionID, this.defaultBlockSize, this.stanza); byteStreamRequest.setTo(targetJID); // sending packet will throw exception on timeout or error reply Sync...
InBandBytestreamSession function(String targetJID, String sessionID) throws XMPPException { Open byteStreamRequest = new Open(sessionID, this.defaultBlockSize, this.stanza); byteStreamRequest.setTo(targetJID); SyncPacketSend.getReply(this.connection, byteStreamRequest); InBandBytestreamSession inBandBytestreamSession =...
/** * Establishes an In-Band Bytestream with the given user using the given * session ID and returns the session to send/receive data to/from the user. * * @param targetJID * the JID of the user an In-Band Bytestream should be * established * @param sessionID * ...
Establishes an In-Band Bytestream with the given user using the given session ID and returns the session to send/receive data to/from the user
establishSession
{ "repo_name": "ikantech/xmppsupport_v2", "path": "src/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java", "license": "gpl-2.0", "size": 20740 }
[ "org.jivesoftware.smack.XMPPException", "org.jivesoftware.smack.util.SyncPacketSend", "org.jivesoftware.smackx.bytestreams.ibb.packet.Open" ]
import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.util.SyncPacketSend; import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
import org.jivesoftware.smack.*; import org.jivesoftware.smack.util.*; import org.jivesoftware.smackx.bytestreams.ibb.packet.*;
[ "org.jivesoftware.smack", "org.jivesoftware.smackx" ]
org.jivesoftware.smack; org.jivesoftware.smackx;
404,097
@Test public void testFilterDoneFalse() { PostFilterCommand command = new PostFilterCommand(); // Path is not important for security MultivaluedMap<String, String> pathParams = new MultivaluedMapImpl<String>(); // Set up oData parameters MultivaluedMap<String, String> queryParams = new MultivaluedMapIm...
void function() { PostFilterCommand command = new PostFilterCommand(); MultivaluedMap<String, String> pathParams = new MultivaluedMapImpl<String>(); MultivaluedMap<String, String> queryParams = new MultivaluedMapImpl<String>(); InteractionContext ctx = new InteractionContext(mock(UriInfo.class), mock(HttpHeaders.class)...
/** * Check that filtering is done if filterDone false. */
Check that filtering is done if filterDone false
testFilterDoneFalse
{ "repo_name": "schwadorf/IRIS", "path": "interaction-commands-authorization/src/test/java/com/temenos/interaction/authorization/command/PostFilterCommandTest.java", "license": "agpl-3.0", "size": 5745 }
[ "com.temenos.interaction.authorization.exceptions.AuthorizationException", "com.temenos.interaction.commands.odata.ODataAttributes", "com.temenos.interaction.core.MultivaluedMapImpl", "com.temenos.interaction.core.command.InteractionContext", "com.temenos.interaction.core.entity.Metadata", "com.temenos.in...
import com.temenos.interaction.authorization.exceptions.AuthorizationException; import com.temenos.interaction.commands.odata.ODataAttributes; import com.temenos.interaction.core.MultivaluedMapImpl; import com.temenos.interaction.core.command.InteractionContext; import com.temenos.interaction.core.entity.Metadata; impo...
import com.temenos.interaction.authorization.exceptions.*; import com.temenos.interaction.commands.odata.*; import com.temenos.interaction.core.*; import com.temenos.interaction.core.command.*; import com.temenos.interaction.core.entity.*; import com.temenos.interaction.core.hypermedia.*; import com.temenos.interaction...
[ "com.temenos.interaction", "javax.ws", "org.junit", "org.mockito", "org.odata4j.producer" ]
com.temenos.interaction; javax.ws; org.junit; org.mockito; org.odata4j.producer;
1,551,023
public void addParams(String params, int index) { try { //Retrieve selected method String s = (String) listMethod.get(index); //Add parameters inside '()' in selected method StringTokenizer token = new StringTokenizer(s, ")"); String output = token.nextToken() + params + ")" + token.nextElement(...
void function(String params, int index) { try { String s = (String) listMethod.get(index); StringTokenizer token = new StringTokenizer(s, ")"); String output = token.nextToken() + params + ")" + token.nextElement(); listMethod.set(index, output); } catch (ArrayIndexOutOfBoundsException e) { JOptionPane.showMessageDialo...
/** * Adds the parameter(s) created in the Parameter Editor dialog to the * selected method * @param params - String of all parameters created in the Parameter Editor ({@link uk.ac.aber.dcs.cs124.clg11.frame.ParamWindow}) * @param index - Position of selected method in method listbox */
Adds the parameter(s) created in the Parameter Editor dialog to the selected method
addParams
{ "repo_name": "craighep/UMLater", "path": "source/uk/ac/aber/dcs/cs124/clg11/frame/AddClassDialog.java", "license": "mit", "size": 19485 }
[ "java.util.StringTokenizer", "javax.swing.JFrame", "javax.swing.JOptionPane" ]
import java.util.StringTokenizer; import javax.swing.JFrame; import javax.swing.JOptionPane;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
210,507
private boolean hasShortCircuitTag(final DetailAST ast, final List<JavadocTag> tags) { // Check if it contains {@inheritDoc} tag if (tags.size() != 1 || !tags.get(0).isInheritDocTag()) { return false; } // Invalid if private, a constructor, or...
boolean function(final DetailAST ast, final List<JavadocTag> tags) { if (tags.size() != 1 !tags.get(0).isInheritDocTag()) { return false; } if (!JavadocTagInfo.INHERIT_DOC.isValidOn(ast)) { log(ast, MSG_INVALID_INHERIT_DOC); } return true; }
/** * Validates whether the Javadoc has a short circuit tag. Currently this is * the inheritTag. Any errors are logged. * * @param ast the construct being checked * @param tags the list of Javadoc tags associated with the construct * @return true if the construct has a short circuit tag. ...
Validates whether the Javadoc has a short circuit tag. Currently this is the inheritTag. Any errors are logged
hasShortCircuitTag
{ "repo_name": "attatrol/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocMethodCheck.java", "license": "lgpl-2.1", "size": 36711 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "java.util.List" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import java.util.List;
import com.puppycrawl.tools.checkstyle.api.*; import java.util.*;
[ "com.puppycrawl.tools", "java.util" ]
com.puppycrawl.tools; java.util;
446,395
public void zoom_in(java.awt.geom.Point2D p_position) { zoom(c_zoom_factor, p_position); }
void function(java.awt.geom.Point2D p_position) { zoom(c_zoom_factor, p_position); }
/** * zooms in at p_position */
zooms in at p_position
zoom_in
{ "repo_name": "freerouting/freerouting", "path": "src/main/java/app/freerouting/gui/BoardPanel.java", "license": "gpl-3.0", "size": 18037 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
123,704
public boolean end(Writer writer, String body) { evaluateParams(); try { addParameter("body", body); mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate())); } catch (Exception e) { LOG.error("error when rendering", e); } ...
boolean function(Writer writer, String body) { evaluateParams(); try { addParameter("body", body); mergeTemplate(writer, buildTemplateName(template, getDefaultTemplate())); } catch (Exception e) { LOG.error(STR, e); } finally { popComponentStack(); } return false; }
/** * Overrides to be able to render body in a template rather than always before the template */
Overrides to be able to render body in a template rather than always before the template
end
{ "repo_name": "TheTypoMaster/struts-2.3.24", "path": "src/plugins/dojo/src/main/java/org/apache/struts2/dojo/components/Submit.java", "license": "apache-2.0", "size": 17934 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
445,308
//~ Methods ------------------------------------------------------------------------------------ public static Map<String, SimpleNamespaceResolver> getFileNameToResolverMap ( final File outputDirectory) throws MojoExecutionException { final Map<String, SimpleNamespaceResolv...
static Map<String, SimpleNamespaceResolver> function ( final File outputDirectory) throws MojoExecutionException { final Map<String, SimpleNamespaceResolver> toReturn = new TreeMap<String, SimpleNamespaceResolver>();
/** * Acquires a map relating generated schema filename to its SimpleNamespaceResolver. * * @param outputDirectory The output directory of the generated schema files. * @return a map relating generated schema filename to an initialized SimpleNamespaceResolver. * @throws MojoExecutionException i...
Acquires a map relating generated schema filename to its SimpleNamespaceResolver
getFileNameToResolverMap
{ "repo_name": "Audiveris/audiveris", "path": "schemas/src/main/java/org/audiveris/schema/MyXsdGeneratorHelper.java", "license": "agpl-3.0", "size": 29879 }
[ "java.io.File", "java.util.Map", "java.util.TreeMap", "org.apache.maven.plugin.MojoExecutionException", "org.codehaus.mojo.jaxb2.schemageneration.postprocessing.schemaenhancement.SimpleNamespaceResolver" ]
import java.io.File; import java.util.Map; import java.util.TreeMap; import org.apache.maven.plugin.MojoExecutionException; import org.codehaus.mojo.jaxb2.schemageneration.postprocessing.schemaenhancement.SimpleNamespaceResolver;
import java.io.*; import java.util.*; import org.apache.maven.plugin.*; import org.codehaus.mojo.jaxb2.schemageneration.postprocessing.schemaenhancement.*;
[ "java.io", "java.util", "org.apache.maven", "org.codehaus.mojo" ]
java.io; java.util; org.apache.maven; org.codehaus.mojo;
1,445,178
@SuppressWarnings({ "unchecked" }) public static <T> Provider<T> seededKeyProvider() { return (Provider<T>) SEEDED_KEY_PROVIDER; }
@SuppressWarnings({ STR }) static <T> Provider<T> function() { return (Provider<T>) SEEDED_KEY_PROVIDER; }
/** * Returns a provider that always throws an exception complaining that the * object in question must be seeded before it can be injected. * * @return typed provider */
Returns a provider that always throws an exception complaining that the object in question must be seeded before it can be injected
seededKeyProvider
{ "repo_name": "donskifarrell/hubblog", "path": "Hubblog/src/com/github/mobile/Accounts/ScopeBase.java", "license": "mit", "size": 2150 }
[ "com.google.inject.Provider" ]
import com.google.inject.Provider;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
30,390
public static String getIconPath(Identifier identifier) { String artifactPath = APIConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + identifier.getProviderName() + RegistryConstants.PATH_SEPARATOR + identifier.getName() + RegistryConstants.PATH_SEPARATOR + ide...
static String function(Identifier identifier) { String artifactPath = APIConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + identifier.getProviderName() + RegistryConstants.PATH_SEPARATOR + identifier.getName() + RegistryConstants.PATH_SEPARATOR + identifier.getVersion(); return artifactPath + RegistryCon...
/** * Utility method for creating storage path for an icon. * * @param identifier Identifier * @return Icon storage path. */
Utility method for creating storage path for an icon
getIconPath
{ "repo_name": "tharikaGitHub/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java", "license": "apache-2.0", "size": 563590 }
[ "org.wso2.carbon.apimgt.api.model.Identifier", "org.wso2.carbon.apimgt.impl.APIConstants", "org.wso2.carbon.registry.core.RegistryConstants" ]
import org.wso2.carbon.apimgt.api.model.Identifier; import org.wso2.carbon.apimgt.impl.APIConstants; import org.wso2.carbon.registry.core.RegistryConstants;
import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.*; import org.wso2.carbon.registry.core.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,323,669
private void unSetDescendantConstraintList() throws TagValidationException { if (this.hasDescendantConstraintLists()) { // pop operation, remove last item from list. this.allowedDescendantsList.remove(this.allowedDescendantsList.size() - 1); this.setHasDescendantConstraintLists(false); } }
void function() throws TagValidationException { if (this.hasDescendantConstraintLists()) { this.allowedDescendantsList.remove(this.allowedDescendantsList.size() - 1); this.setHasDescendantConstraintLists(false); } }
/** * Updates the allowed descendants list if a tag introduced constraints. This * is called when exiting a tag. * * @throws TagValidationException the TagValidationException. */
Updates the allowed descendants list if a tag introduced constraints. This is called when exiting a tag
unSetDescendantConstraintList
{ "repo_name": "taboola/amphtml", "path": "validator/java/src/main/java/dev/amp/validator/TagStack.java", "license": "apache-2.0", "size": 21478 }
[ "dev.amp.validator.exception.TagValidationException" ]
import dev.amp.validator.exception.TagValidationException;
import dev.amp.validator.exception.*;
[ "dev.amp.validator" ]
dev.amp.validator;
1,538,426
@Override public ResourceLocator getResourceLocator() { return FoundationEditPlugin.INSTANCE; }
ResourceLocator function() { return FoundationEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "Nasdanika/amur-it-js", "path": "org.nasdanika.amur.it.js.foundation.edit/src/org/nasdanika/amur/it/js/foundation/provider/SuiteItemProvider.java", "license": "epl-1.0", "size": 7494 }
[ "org.eclipse.emf.common.util.ResourceLocator" ]
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,261,183
public static interface CloseButtonCallback extends IClusterable { public boolean onCloseButtonClicked(AjaxRequestTarget target); }
static interface CloseButtonCallback extends IClusterable { public boolean function(AjaxRequestTarget target); }
/** * Methods invoked after the button has been clicked. The invocation is done using an ajax * call, so <code>{@link org.apache.wicket.ajax.AjaxRequestTarget}</code> instance is available. * * @param target * <code>{@link org.apache.wicket.ajax.AjaxRequestTarget}</code> instance bound with t...
Methods invoked after the button has been clicked. The invocation is done using an ajax call, so <code><code>org.apache.wicket.ajax.AjaxRequestTarget</code></code> instance is available
onCloseButtonClicked
{ "repo_name": "martin-g/wicket-osgi", "path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java", "license": "apache-2.0", "size": 34983 }
[ "org.apache.wicket.ajax.AjaxRequestTarget", "org.apache.wicket.util.io.IClusterable" ]
import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.util.io.IClusterable;
import org.apache.wicket.ajax.*; import org.apache.wicket.util.io.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,699,120
private boolean existsUnique(Class<? extends BusinessObject> boType, String propertyName, String keyField) { if (keyField != null) { BusinessObjectService businessObjectService = KraServiceLocator.getService(BusinessObjectService.class); Map<String, String> fieldValues = new HashMap<...
boolean function(Class<? extends BusinessObject> boType, String propertyName, String keyField) { if (keyField != null) { BusinessObjectService businessObjectService = KraServiceLocator.getService(BusinessObjectService.class); Map<String, String> fieldValues = new HashMap<String, String>(); fieldValues.put(propertyName,...
/** * Returns true if exactly one instance of a given business object type exists in the Database; false otherwise. * * @param boType * @param propertyName the name of the BO field to query * @param keyField the field to test against. * @return true if one object exists; false if no objec...
Returns true if exactly one instance of a given business object type exists in the Database; false otherwise
existsUnique
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/protocol/actions/submit/ProtocolSubmitActionRuleBase.java", "license": "apache-2.0", "size": 8837 }
[ "java.util.HashMap", "java.util.Map", "org.kuali.kra.infrastructure.KraServiceLocator", "org.kuali.rice.krad.bo.BusinessObject", "org.kuali.rice.krad.service.BusinessObjectService" ]
import java.util.HashMap; import java.util.Map; import org.kuali.kra.infrastructure.KraServiceLocator; import org.kuali.rice.krad.bo.BusinessObject; import org.kuali.rice.krad.service.BusinessObjectService;
import java.util.*; import org.kuali.kra.infrastructure.*; import org.kuali.rice.krad.bo.*; import org.kuali.rice.krad.service.*;
[ "java.util", "org.kuali.kra", "org.kuali.rice" ]
java.util; org.kuali.kra; org.kuali.rice;
1,479,503
public ThreadTaskDaemon queueTaskForUI(Runnable aTask, Activity aAct) throws InterruptedException { if ( aTask == null ) { throw new IllegalArgumentException("Queuing up a NULL task, the shame!"); } pushTask(TaskToRun.prepThisTaskOnUI(aTask, aAct)); return this; }
ThreadTaskDaemon function(Runnable aTask, Activity aAct) throws InterruptedException { if ( aTask == null ) { throw new IllegalArgumentException(STR); } pushTask(TaskToRun.prepThisTaskOnUI(aTask, aAct)); return this; }
/** * Add task that needs to be run on the UI thread to the queue. Builder-chain friendly. * @param aTask - the task to add to the queue * @param aAct - Activity of the UI thread. * @return Returns this object so that a chain-call can be continued. * @throws InterruptedException a blocking queue might get int...
Add task that needs to be run on the UI thread to the queue. Builder-chain friendly
queueTaskForUI
{ "repo_name": "baracudda/androidBits", "path": "lib_androidBits/src/main/java/com/blackmoonit/androidbits/concurrent/ThreadTaskDaemon.java", "license": "apache-2.0", "size": 10767 }
[ "android.app.Activity" ]
import android.app.Activity;
import android.app.*;
[ "android.app" ]
android.app;
678,149
public void dumpState( DeviceWebDriver webDriver, String name, int historicalCount, int deviationPercentage) throws Exception { KeyWordStep step = createStep( "STATE", "", "", new String[ 0 ]); step.addParameter( new KeyWordParameter( ParameterType.STATIC, name, "checkPointName", null ) ); ...
void function( DeviceWebDriver webDriver, String name, int historicalCount, int deviationPercentage) throws Exception { KeyWordStep step = createStep( "STATE", STRSTRcheckPointName", null ) ); step.addParameter( new KeyWordParameter( ParameterType.STATIC, historicalCount + STRhistoricalCount", null ) ); step.addParamet...
/** * Captures the state (image and source) of the running application and compares it for deviation against the previous historical values * * @param webDriver the web driver * @param name the name * @param historicalCount The number of historical records to compare to * @param devi...
Captures the state (image and source) of the running application and compares it for deviation against the previous historical values
dumpState
{ "repo_name": "xframium/xframium-java", "path": "framework/src/org/xframium/device/ng/AbstractSeleniumTest.java", "license": "gpl-3.0", "size": 38807 }
[ "org.xframium.device.factory.DeviceWebDriver", "org.xframium.page.keyWord.KeyWordParameter", "org.xframium.page.keyWord.KeyWordStep" ]
import org.xframium.device.factory.DeviceWebDriver; import org.xframium.page.keyWord.KeyWordParameter; import org.xframium.page.keyWord.KeyWordStep;
import org.xframium.device.factory.*; import org.xframium.page.*;
[ "org.xframium.device", "org.xframium.page" ]
org.xframium.device; org.xframium.page;
1,269,238
@Override @SuppressWarnings("unused") public JComponent getEditor(JTree tree, FilterTreeNode node) { // accept current node currentNode = (DuplicateFilterNode) node; return editor; }
@SuppressWarnings(STR) JComponent function(JTree tree, FilterTreeNode node) { currentNode = (DuplicateFilterNode) node; return editor; }
/** * prepaire and return editor * * @see org.jimcat.gui.smartlisteditor.editor.BaseNodeEditor#getEditor(javax.swing.JTree, * org.jimcat.gui.smartlisteditor.model.FilterTreeNode) */
prepaire and return editor
getEditor
{ "repo_name": "HerbertJordan/JimCat", "path": "src/org/jimcat/gui/smartlisteditor/editor/DuplicateFilterEditor.java", "license": "gpl-2.0", "size": 2230 }
[ "javax.swing.JComponent", "javax.swing.JTree", "org.jimcat.gui.smartlisteditor.model.DuplicateFilterNode", "org.jimcat.gui.smartlisteditor.model.FilterTreeNode" ]
import javax.swing.JComponent; import javax.swing.JTree; import org.jimcat.gui.smartlisteditor.model.DuplicateFilterNode; import org.jimcat.gui.smartlisteditor.model.FilterTreeNode;
import javax.swing.*; import org.jimcat.gui.smartlisteditor.model.*;
[ "javax.swing", "org.jimcat.gui" ]
javax.swing; org.jimcat.gui;
2,100,977
public java.sql.SQLWarning getWarnings() throws SQLException { checkClosed(); try { return this.mc.getWarnings(); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } return null; // we don't reach this code, compiler ca...
java.sql.SQLWarning function() throws SQLException { checkClosed(); try { return this.mc.getWarnings(); } catch (SQLException sqlException) { checkAndFireConnectionError(sqlException); } return null; }
/** * Passes call to method on physical connection instance. Notifies listeners * of any caught exceptions before re-throwing to client. * * @see java.sql.Connection#getWarnings */
Passes call to method on physical connection instance. Notifies listeners of any caught exceptions before re-throwing to client
getWarnings
{ "repo_name": "richardgutkowski/ansible-roles", "path": "stash/files/mysql-connector-java-5.1.35/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java", "license": "mit", "size": 86356 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,674,256
public String uploadPart(String vaultName, String uploadId, byte[] partBytes, String checksum, long startContentRange) { long endContentRange = startContentRange + partBytes.length - 1L; String contentRangeRFC2616 = String.format("bytes %s-%s/*", Long.toString(startContentRange), Long ...
String function(String vaultName, String uploadId, byte[] partBytes, String checksum, long startContentRange) { long endContentRange = startContentRange + partBytes.length - 1L; String contentRangeRFC2616 = String.format(STR, Long.toString(startContentRange), Long .toString(endContentRange)); AmazonGlacierClient client...
/** * Uploads part of archive. * * @param vaultName * @param uploadId * @param partBytes * @param checksum * @param contentRangeRFC2616 * @return the checksum of the uploaded part, as returned by AWS */
Uploads part of archive
uploadPart
{ "repo_name": "lekkas/glacier-jclient", "path": "src/main/java/org/glacierjclient/operations/archive/MultipartUploadArchive.java", "license": "mit", "size": 14350 }
[ "com.amazonaws.services.glacier.AmazonGlacierClient", "com.amazonaws.services.glacier.model.UploadMultipartPartRequest", "com.amazonaws.services.glacier.model.UploadMultipartPartResult", "java.io.ByteArrayInputStream" ]
import com.amazonaws.services.glacier.AmazonGlacierClient; import com.amazonaws.services.glacier.model.UploadMultipartPartRequest; import com.amazonaws.services.glacier.model.UploadMultipartPartResult; import java.io.ByteArrayInputStream;
import com.amazonaws.services.glacier.*; import com.amazonaws.services.glacier.model.*; import java.io.*;
[ "com.amazonaws.services", "java.io" ]
com.amazonaws.services; java.io;
826,697
public AnnotatedTypeBuilder<X> removeFromClass(Class<? extends Annotation> annotationType) { typeAnnotations.remove(annotationType); return this; }
AnnotatedTypeBuilder<X> function(Class<? extends Annotation> annotationType) { typeAnnotations.remove(annotationType); return this; }
/** * Remove an annotation from the type * * @param annotationType the annotation type to remove * @throws IllegalArgumentException if the annotationType */
Remove an annotation from the type
removeFromClass
{ "repo_name": "kenfinnigan/DeltaSpike", "path": "deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/metadata/builder/AnnotatedTypeBuilder.java", "license": "apache-2.0", "size": 39728 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
1,874,870
return doGetOutputStream(); } /** * Appends the {@code char} representation of {@code b} to the {@code JTextArea} and writes it to the decorated {@code OutputStream}. * <p> * If * the decorated {@code OutputStream} throws an {@code IOException}, the same {@code IOException} will be thrown by this method. ...
return doGetOutputStream(); } /** * Appends the {@code char} representation of {@code b} to the {@code JTextArea} and writes it to the decorated {@code OutputStream}. * <p> * If * the decorated {@code OutputStream} throws an {@code IOException}, the same {@code IOException} will be thrown by this method. * * @param b t...
/** * Returns the decorated {@code OutputStream}. * * @return the decorated {@code OutputStream} */
Returns the decorated OutputStream
getOutputStream
{ "repo_name": "WavePropagation/org.macroing.common", "path": "src/main/org/macroing/common/swing/JTextAreaOutputStreamDecorator.java", "license": "gpl-3.0", "size": 3637 }
[ "java.io.IOException", "java.io.OutputStream", "javax.swing.JTextArea" ]
import java.io.IOException; import java.io.OutputStream; import javax.swing.JTextArea;
import java.io.*; import javax.swing.*;
[ "java.io", "javax.swing" ]
java.io; javax.swing;
960,081
protected void checkTaskOffloaded(ExecutionGraph eg, JobVertexID jobVertexId) throws Exception { assertTrue(eg.getJobVertex(jobVertexId).getTaskInformationOrBlobKey().isLeft()); }
void function(ExecutionGraph eg, JobVertexID jobVertexId) throws Exception { assertTrue(eg.getJobVertex(jobVertexId).getTaskInformationOrBlobKey().isLeft()); }
/** * Checks that the task information for the job vertex has been offloaded successfully (if * offloading is used). * * @param eg the execution graph that was created * @param jobVertexId job vertex ID */
Checks that the task information for the job vertex has been offloaded successfully (if offloading is used)
checkTaskOffloaded
{ "repo_name": "xiaokuangkuang/kuangjingxiangmu", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphDeploymentTest.java", "license": "apache-2.0", "size": 32078 }
[ "junit.framework.TestCase", "org.apache.flink.runtime.jobgraph.JobVertexID" ]
import junit.framework.TestCase; import org.apache.flink.runtime.jobgraph.JobVertexID;
import junit.framework.*; import org.apache.flink.runtime.jobgraph.*;
[ "junit.framework", "org.apache.flink" ]
junit.framework; org.apache.flink;
2,033,293
private void processMatsEndpointSetup(MatsEndpointSetup matsEndpointSetup, Method method, Object bean) { if (log.isDebugEnabled()) log.debug(LOG_PREFIX + "Processing @MatsEndpointSetup method '" + simpleMethodDescription(method) + "':#: Annotation:[" + matsEndpointSetup + "]"); // ?...
void function(MatsEndpointSetup matsEndpointSetup, Method method, Object bean) { if (log.isDebugEnabled()) log.debug(LOG_PREFIX + STR + simpleMethodDescription(method) + STR + matsEndpointSetup + "]"); if (matsEndpointSetup.endpointId().equals(STRThe STR is missing endpointId (or 'value')STRThe STR must have at least o...
/** * Process a method annotated with {@link MatsEndpointSetup @MatsEndpointSetup} - note that one method can have * multiple such annotations, and this method will be invoked for each of them. */
Process a method annotated with <code>MatsEndpointSetup @MatsEndpointSetup</code> - note that one method can have multiple such annotations, and this method will be invoked for each of them
processMatsEndpointSetup
{ "repo_name": "stolsvik/mats", "path": "mats-spring/src/main/java/io/mats3/spring/MatsSpringAnnotationRegistration.java", "license": "apache-2.0", "size": 83942 }
[ "io.mats3.MatsEndpoint", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method" ]
import io.mats3.MatsEndpoint; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import io.mats3.*; import java.lang.reflect.*;
[ "io.mats3", "java.lang" ]
io.mats3; java.lang;
1,792,736
protected JPopupMenu createPopupMenu() { JPopupMenu menu = new JPopupMenu(); JMenuItem menuItem; menuItem = new JMenuItem(undoAction); menuItem.setAccelerator(null); menuItem.setToolTipText(null); menu.add(menuItem); menuItem = new JMenuItem(redoAction); ...
JPopupMenu function() { JPopupMenu menu = new JPopupMenu(); JMenuItem menuItem; menuItem = new JMenuItem(undoAction); menuItem.setAccelerator(null); menuItem.setToolTipText(null); menu.add(menuItem); menuItem = new JMenuItem(redoAction); menuItem.setAccelerator(null); menuItem.setToolTipText(null); menu.add(menuItem); ...
/** * Creates the right-click popup menu. Subclasses can override this method to replace or augment the popup menu * returned. * * @return The popup menu. * @see #setPopupMenu(JPopupMenu) * @see #configurePopupMenu(JPopupMenu) */
Creates the right-click popup menu. Subclasses can override this method to replace or augment the popup menu returned
createPopupMenu
{ "repo_name": "kevinmcgoldrick/Tank", "path": "tools/agent_debugger/src/main/java/org/fife/ui/rtextarea/RTextArea.java", "license": "epl-1.0", "size": 54300 }
[ "javax.swing.JMenuItem", "javax.swing.JPopupMenu" ]
import javax.swing.JMenuItem; import javax.swing.JPopupMenu;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,121,237
@Benchmark public long getAndAdd(SequenceState state) { int key = ThreadLocalRandom.current().nextInt(state.randomBound) + 1; return state.seq.getAndAdd(key); }
long function(SequenceState state) { int key = ThreadLocalRandom.current().nextInt(state.randomBound) + 1; return state.seq.getAndAdd(key); }
/** * Benchmark for {@link IgniteAtomicSequence#getAndAdd(long)} operation. * * @return Long previous value. */
Benchmark for <code>IgniteAtomicSequence#getAndAdd(long)</code> operation
getAndAdd
{ "repo_name": "samaitra/ignite", "path": "modules/benchmarks/src/main/java/org/apache/ignite/internal/benchmarks/jmh/sequence/JmhSequenceBenchmark.java", "license": "apache-2.0", "size": 6793 }
[ "java.util.concurrent.ThreadLocalRandom" ]
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,789,730