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
@Override public Object convertToNormalStorageType( Object object ) throws KettleValueException { if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return object; case STORAGE_TYPE_BINARY_STRING: return convertBinaryStringToNativ...
Object function( Object object ) throws KettleValueException { if ( object == null ) { return null; } switch ( storageType ) { case STORAGE_TYPE_NORMAL: return object; case STORAGE_TYPE_BINARY_STRING: return convertBinaryStringToNativeType( (byte[]) object ); case STORAGE_TYPE_INDEXED: return index[(Integer) object]; d...
/** * Converts the specified data object to the normal storage type. * * @param object * the data object to convert * @return the data in a normal storage type * @throws KettleValueException * In case there is a data conversion error. */
Converts the specified data object to the normal storage type
convertToNormalStorageType
{ "repo_name": "nantunes/pentaho-kettle", "path": "core/src/org/pentaho/di/core/row/value/ValueMetaBase.java", "license": "apache-2.0", "size": 170529 }
[ "org.pentaho.di.core.exception.KettleValueException" ]
import org.pentaho.di.core.exception.KettleValueException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
939,337
private long readBigUInt() throws IOException { smallByteBuf.clear(); raf.readFully( smallByteBuf.array(), 0, 4 ); // Read a signed int, then discard sign // by casting to long and hacking off bits. long result = smallByteBuf.getInt( 0 ); result &= 0x00000000FFFFFFFFL; return result; }
long function() throws IOException { smallByteBuf.clear(); raf.readFully( smallByteBuf.array(), 0, 4 ); long result = smallByteBuf.getInt( 0 ); result &= 0x00000000FFFFFFFFL; return result; }
/** * Reads a big-endian unsigned int. * * Java doesn't have an unsigned int primitive, * so a long holds the value instead. */
Reads a big-endian unsigned int. Java doesn't have an unsigned int primitive, so a long holds the value instead
readBigUInt
{ "repo_name": "kartoFlane/superluminal2", "path": "src/java/net/vhati/ftldat/PkgPack.java", "license": "gpl-2.0", "size": 29283 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
456,336
public Builder addAllExpand(List<String> elements) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.addAll(elements); return this; }
Builder function(List<String> elements) { if (this.expand == null) { this.expand = new ArrayList<>(); } this.expand.addAll(elements); return this; }
/** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link * CreditNoteRetrieveParams#expand} for the field documentation. */
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. See <code>CreditNoteRetrieveParams#expand</code> for the field documentation
addAllExpand
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/param/CreditNoteRetrieveParams.java", "license": "mit", "size": 3415 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,868,895
@Override public String getText(Object object) { String label = ((MMESPVersionedItemPlatformSwPackage)object).getVersion(); return label == null || label.length() == 0 ? getString("_UI_MMESPVersionedItem_version") : getString("_UI_MMESPVersionedItem_version") + ": " + label; }
String function(Object object) { String label = ((MMESPVersionedItemPlatformSwPackage)object).getVersion(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + STR + label; }
/** * This returns the label text for the adapted class. * @generated NOT */
This returns the label text for the adapted class
getText
{ "repo_name": "parraman/micobs", "path": "mesp/es.uah.aut.srg.micobs.mesp/src/es/uah/aut/srg/micobs/mesp/library/mesplibrary/provider/MMESPVersionedItemPlatformSwPackageItemProvider.java", "license": "epl-1.0", "size": 3477 }
[ "es.uah.aut.srg.micobs.mesp.library.mesplibrary.MMESPVersionedItemPlatformSwPackage" ]
import es.uah.aut.srg.micobs.mesp.library.mesplibrary.MMESPVersionedItemPlatformSwPackage;
import es.uah.aut.srg.micobs.mesp.library.mesplibrary.*;
[ "es.uah.aut" ]
es.uah.aut;
1,290,202
@NonNull HeadFilterDecision head(Node node, int depth);
HeadFilterDecision head(Node node, int depth);
/** * Callback for when a node is first visited. * * @param node * the node being visited. * @param depth * the depth of the node, relative to the root node. E.g., the root node has depth 0, and a child node * of that will have depth 1. * * @return Fi...
Callback for when a node is first visited
head
{ "repo_name": "k9mail/k-9", "path": "app/core/src/main/java/com/fsck/k9/helper/jsoup/NodeFilter.java", "license": "apache-2.0", "size": 3500 }
[ "org.jsoup.nodes.Node" ]
import org.jsoup.nodes.Node;
import org.jsoup.nodes.*;
[ "org.jsoup.nodes" ]
org.jsoup.nodes;
184,425
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // Read the non-static and non-transient fields. in.defaultReadObject(); // Read the operation name String operationName = (String)in.readObject(); // Try to get the OperationDescriptor regist...
void function(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); String operationName = (String)in.readObject(); odesc = (OperationDescriptor)JAI.getDefaultInstance(). getOperationRegistry(). getDescriptor(modeName, operationName); if (odesc == null) { throw new NotSerializableEx...
/** * Deserialize the <code>ParameterBlockJAI</code>. * * @throws IOException * @throws NotSerializableException if no OperationDescriptor is * registered with the current OperationRegistry under the * deserialized operation name. */
Deserialize the <code>ParameterBlockJAI</code>
readObject
{ "repo_name": "RoProducts/rastertheque", "path": "JAILibrary/src/javax/media/jai/ParameterBlockJAI.java", "license": "gpl-2.0", "size": 43925 }
[ "java.io.IOException", "java.io.NotSerializableException", "java.io.ObjectInputStream" ]
import java.io.IOException; import java.io.NotSerializableException; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
493,735
public JobStatus parseJobStatus(String jobID, String rawOutput)throws GFacException;
JobStatus function(String jobID, String rawOutput)throws GFacException;
/** * This can be used to get the job status from the output * @param jobID * @param rawOutput */
This can be used to get the job status from the output
parseJobStatus
{ "repo_name": "gouravshenoy/airavata", "path": "modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cluster/OutputParser.java", "license": "apache-2.0", "size": 2357 }
[ "org.apache.airavata.gfac.core.GFacException", "org.apache.airavata.model.status.JobStatus" ]
import org.apache.airavata.gfac.core.GFacException; import org.apache.airavata.model.status.JobStatus;
import org.apache.airavata.gfac.core.*; import org.apache.airavata.model.status.*;
[ "org.apache.airavata" ]
org.apache.airavata;
608,829
String createMobFileName(String oldFileName) { MobFileName mobFileName = MobFileName.create(oldFileName); String startKey = mobFileName.getStartKey(); String date = mobFileName.getDate(); return MobFileName.create(startKey, date, UUID.randomUUID().toString().replaceAll("-", "")) .getFileName(); ...
String createMobFileName(String oldFileName) { MobFileName mobFileName = MobFileName.create(oldFileName); String startKey = mobFileName.getStartKey(); String date = mobFileName.getDate(); return MobFileName.create(startKey, date, UUID.randomUUID().toString().replaceAll("-", "")) .getFileName(); }
/** * Creates a new mob file name by the old one. * @param oldFileName The old mob file name. * @return The new mob file name. */
Creates a new mob file name by the old one
createMobFileName
{ "repo_name": "JingchengDu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/BaseTestHBaseFsck.java", "license": "apache-2.0", "size": 23243 }
[ "java.util.UUID", "org.apache.hadoop.hbase.mob.MobFileName" ]
import java.util.UUID; import org.apache.hadoop.hbase.mob.MobFileName;
import java.util.*; import org.apache.hadoop.hbase.mob.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
469,621
public void setViewRequestParameters(Map<String, String> viewRequestParameters);
void function(Map<String, String> viewRequestParameters);
/** * Setter for the view's request parameter map * * @param viewRequestParameters map of request parameters */
Setter for the view's request parameter map
setViewRequestParameters
{ "repo_name": "bhutchinson/rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/view/ViewModel.java", "license": "apache-2.0", "size": 21665 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,839,045
boolean sendGesture( int type, long timeMs, int x, int y, Bundle extraParams);
boolean sendGesture( int type, long timeMs, int x, int y, Bundle extraParams);
/** * Send a gesture event to the native side. * @param type The type of the gesture event. * @param timeMs The time the gesture event occurred at. * @param x The x location for the gesture event. * @param y The y location for the gesture event. * @param extraParams...
Send a gesture event to the native side
sendGesture
{ "repo_name": "leiferikb/bitpop-private", "path": "content/public/android/java/src/org/chromium/content/browser/ContentViewGestureHandler.java", "license": "bsd-3-clause", "size": 38956 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,581,372
DatasetInfo getDataset(DatasetId datasetId);
DatasetInfo getDataset(DatasetId datasetId);
/** * Get a dataset by Id */
Get a dataset by Id
getDataset
{ "repo_name": "rouzwawi/flo", "path": "contrib/flo-bigquery/src/main/java/com/spotify/flo/contrib/bigquery/FloBigQueryClient.java", "license": "apache-2.0", "size": 2418 }
[ "com.google.cloud.bigquery.DatasetId", "com.google.cloud.bigquery.DatasetInfo" ]
import com.google.cloud.bigquery.DatasetId; import com.google.cloud.bigquery.DatasetInfo;
import com.google.cloud.bigquery.*;
[ "com.google.cloud" ]
com.google.cloud;
396,168
public T xpath(String text, Namespaces namespaces) { return delegate.xpath(text, namespaces); }
T function(String text, Namespaces namespaces) { return delegate.xpath(text, namespaces); }
/** * Evaluates an <a href="http://camel.apache.org/xpath.html">XPath * expression</a> with the specified set of namespace prefixes and URIs * * @param text the expression to be evaluated * @param namespaces the namespace prefix and URIs to use * @return the builder to continue processing...
Evaluates an XPath expression with the specified set of namespace prefixes and URIs
xpath
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java", "license": "apache-2.0", "size": 39490 }
[ "org.apache.camel.builder.xml.Namespaces" ]
import org.apache.camel.builder.xml.Namespaces;
import org.apache.camel.builder.xml.*;
[ "org.apache.camel" ]
org.apache.camel;
586,967
public boolean isExternalStorageEmulated() throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.t...
boolean function() throws RemoteException { Parcel _data = Parcel.obtain(); Parcel _reply = Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_isExternalStorageEmulated, _data, _reply, 0); _reply.readException(); _result = 0 != _reply.readInt(); } finally { ...
/** * Returns whether the external storage is emulated. */
Returns whether the external storage is emulated
isExternalStorageEmulated
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/os/storage/IMountService.java", "license": "apache-2.0", "size": 57298 }
[ "android.os.Parcel", "android.os.RemoteException" ]
import android.os.Parcel; import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
1,475,868
@Test public void testDecode16() { for (int i = 0; i < test16.length; i++) { Assert.assertTrue(Arrays.equals(test16[i][0].getBytes(), Base16.decode(test16[i][1].toUpperCase()))); Assert.assertTrue(Arrays.equals(test16[i][0].getBytes(), Base16.decode(test16[i][1].toLowerCase())));...
void function() { for (int i = 0; i < test16.length; i++) { Assert.assertTrue(Arrays.equals(test16[i][0].getBytes(), Base16.decode(test16[i][1].toUpperCase()))); Assert.assertTrue(Arrays.equals(test16[i][0].getBytes(), Base16.decode(test16[i][1].toLowerCase()))); } Assert.assertEquals(null, Base16.decode(null)); } priv...
/** * Tests base-16 decoding. */
Tests base-16 decoding
testDecode16
{ "repo_name": "GuardTime/ksi-java-sdk", "path": "ksi-common/src/test/java/com/guardtime/ksi/util/BaseTest.java", "license": "apache-2.0", "size": 8844 }
[ "java.util.Arrays", "org.testng.Assert" ]
import java.util.Arrays; import org.testng.Assert;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
2,407,415
protected int getIntValue(final ConfigurableFactoryContext ctx, final String key) { return ctx.getInt(key, -1); }
int function(final ConfigurableFactoryContext ctx, final String key) { return ctx.getInt(key, -1); }
/** * Extract integer value from a context. * * @param ctx * The configuration context. * @param key * The key to search for. * @return * The integer value of the key, or <code>null</code> if none. * @throws IllegalArgumentException * ...
Extract integer value from a context
getIntValue
{ "repo_name": "sourceress-project/archestica", "path": "src/games/stendhal/server/entity/mapstuff/portal/AccessCheckingPortalFactory.java", "license": "gpl-2.0", "size": 3499 }
[ "games.stendhal.server.core.config.factory.ConfigurableFactoryContext" ]
import games.stendhal.server.core.config.factory.ConfigurableFactoryContext;
import games.stendhal.server.core.config.factory.*;
[ "games.stendhal.server" ]
games.stendhal.server;
2,869,239
public static void crashVoltDB(String reason, String traces[], String filename, int lineno) { VoltLogger hostLog = new VoltLogger("HOST"); String fn = (filename == null) ? "unknown" : filename; String re = (reason == null) ? "Fatal EE error." : reason; hostLog.fatal(re + " In " ...
static void function(String reason, String traces[], String filename, int lineno) { VoltLogger hostLog = new VoltLogger("HOST"); String fn = (filename == null) ? STR : filename; String re = (reason == null) ? STR : reason; hostLog.fatal(re + STR + fn + ":" + lineno); if (traces != null) { for ( String trace : traces) {...
/** * Call VoltDB.crashVoltDB on behalf of the EE * @param reason Reason the EE crashed */
Call VoltDB.crashVoltDB on behalf of the EE
crashVoltDB
{ "repo_name": "zheguang/voltdb", "path": "src/frontend/org/voltdb/jni/ExecutionEngine.java", "license": "agpl-3.0", "size": 39186 }
[ "org.voltcore.logging.VoltLogger", "org.voltdb.VoltDB" ]
import org.voltcore.logging.VoltLogger; import org.voltdb.VoltDB;
import org.voltcore.logging.*; import org.voltdb.*;
[ "org.voltcore.logging", "org.voltdb" ]
org.voltcore.logging; org.voltdb;
273,055
public static <K, V> KafkaSpoutConfig.Builder configure( KafkaSpoutConfig.Builder<K, V> builder , Map<String, Object> config ) { for(SpoutConfiguration spoutConfig : SpoutConfiguration.values()) { ...
static <K, V> KafkaSpoutConfig.Builder function( KafkaSpoutConfig.Builder<K, V> builder , Map<String, Object> config ) { for(SpoutConfiguration spoutConfig : SpoutConfiguration.values()) { if(config.containsKey(spoutConfig.key)) { Container container = new Container(config, builder, config.get(spoutConfig.key)); spoutC...
/** * Configure a builder from a configuration. * @param builder * @param config * @param <K> * @param <V> * @return */
Configure a builder from a configuration
configure
{ "repo_name": "iraghumitra/incubator-metron", "path": "metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SpoutConfiguration.java", "license": "apache-2.0", "size": 5206 }
[ "java.util.Map", "org.apache.storm.kafka.spout.KafkaSpoutConfig" ]
import java.util.Map; import org.apache.storm.kafka.spout.KafkaSpoutConfig;
import java.util.*; import org.apache.storm.kafka.spout.*;
[ "java.util", "org.apache.storm" ]
java.util; org.apache.storm;
2,056,359
public static ProcessTree get() { if(!enabled) return DEFAULT; try { if(File.pathSeparatorChar==';') return new Windows(); String os = Util.fixNull(System.getProperty("os.name")); if(os.equals("Linux")) return new Linu...
static ProcessTree function() { if(!enabled) return DEFAULT; try { if(File.pathSeparatorChar==';') return new Windows(); String os = Util.fixNull(System.getProperty(STR)); if(os.equals("Linux")) return new Linux(); if(os.equals("SunOS")) return new Solaris(); if(os.equals(STR)) return new Darwin(); } catch (LinkageErro...
/** * Gets the {@link ProcessTree} of the current system * that JVM runs in, or in the worst case return the default one * that's not capable of killing descendants at all. */
Gets the <code>ProcessTree</code> of the current system that JVM runs in, or in the worst case return the default one that's not capable of killing descendants at all
get
{ "repo_name": "0814jimmy/jenkins", "path": "core/src/main/java/hudson/util/ProcessTree.java", "license": "mit", "size": 46967 }
[ "java.io.File", "java.util.logging.Level" ]
import java.io.File; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,549,002
public void setMaxTorque1(float val) { if ( maxTorque1 == null ) { maxTorque1 = (SFFloat)getField( "maxTorque1" ); } maxTorque1.setValue( val ); }
void function(float val) { if ( maxTorque1 == null ) { maxTorque1 = (SFFloat)getField( STR ); } maxTorque1.setValue( val ); }
/** Set the maxTorque1 field. * @param val The float to set. */
Set the maxTorque1 field
setMaxTorque1
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/internal/node/rigidbodyphysics/SAIDoubleAxisHingeJoint.java", "license": "gpl-2.0", "size": 15538 }
[ "org.web3d.x3d.sai.SFFloat" ]
import org.web3d.x3d.sai.SFFloat;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
1,178,678
@Api public void setUpHandler(UpHandler upHandler) { this.upHandler = upHandler; }
void function(UpHandler upHandler) { this.upHandler = upHandler; }
/** * Set the closure that handles mouse up or touch end events. * * @param upHandler the closure */
Set the closure that handles mouse up or touch end events
setUpHandler
{ "repo_name": "geomajas/geomajas-project-client-gwt", "path": "plugin/editing/editing-javascript-api/src/main/java/org/geomajas/plugin/editing/jsapi/client/handler/JsGeometryIndexMapHandlerFactory.java", "license": "agpl-3.0", "size": 6711 }
[ "org.geomajas.plugin.jsapi.client.map.controller.UpHandler" ]
import org.geomajas.plugin.jsapi.client.map.controller.UpHandler;
import org.geomajas.plugin.jsapi.client.map.controller.*;
[ "org.geomajas.plugin" ]
org.geomajas.plugin;
2,347,568
public static int getIDFromKey(String key) throws VorbisCommentReaderException { if (key.length() >= CHAPTERXXX_LENGTH) { // >= CHAPTERxxx try { String strId = key.substring(8, 10); return Integer.parseInt(strId); } catch (NumberFormatException e) { throw new VorbisCommentReaderException(e); ...
static int function(String key) throws VorbisCommentReaderException { if (key.length() >= CHAPTERXXX_LENGTH) { try { String strId = key.substring(8, 10); return Integer.parseInt(strId); } catch (NumberFormatException e) { throw new VorbisCommentReaderException(e); } } throw new VorbisCommentReaderException(STR + key + ...
/** * Return the id of a vorbiscomment chapter from a string like CHAPTERxxx* * * @return the id of the chapter key or -1 if the id couldn't be read. * @throws VorbisCommentReaderException * */
Return the id of a vorbiscomment chapter from a string like CHAPTERxxx
getIDFromKey
{ "repo_name": "narakai/DemoApp2", "path": "core/src/main/java/com/clem/ipoca1/core/feed/VorbisCommentChapter.java", "license": "mit", "size": 2895 }
[ "com.clem.ipoca1.core.util.vorbiscommentreader.VorbisCommentReaderException" ]
import com.clem.ipoca1.core.util.vorbiscommentreader.VorbisCommentReaderException;
import com.clem.ipoca1.core.util.vorbiscommentreader.*;
[ "com.clem.ipoca1" ]
com.clem.ipoca1;
2,549,892
private List<Discussion> getDiscussions(List<Element> discussionEle, String sessionId, String moduleId, Date fromDate) { List<Discussion> discussions = new ArrayList<Discussion>(); for (Element ele : discussionEle) { Discussion discus = new Discussion(); discus.setId(ele.attr...
List<Discussion> function(List<Element> discussionEle, String sessionId, String moduleId, Date fromDate) { List<Discussion> discussions = new ArrayList<Discussion>(); for (Element ele : discussionEle) { Discussion discus = new Discussion(); discus.setId(ele.attributeValue("id")); discus.setForumId(ele.attributeValue(ST...
/** * When given a list of XML discussion elements, a session id, module id and * date to filter from, return a list of discussions * * @param discussionEle list of discussion elements * @param sessionId * @param moduleId * @param fromDate * @return */
When given a list of XML discussion elements, a session id, module id and date to filter from, return a list of discussions
getDiscussions
{ "repo_name": "Unipoole/unipoole-service", "path": "src/main/java/coza/opencollab/unipoole/service/lms/impl/SakaiYaftHandler.java", "license": "apache-2.0", "size": 22023 }
[ "java.util.ArrayList", "java.util.Date", "java.util.List", "org.dom4j.Element" ]
import java.util.ArrayList; import java.util.Date; import java.util.List; import org.dom4j.Element;
import java.util.*; import org.dom4j.*;
[ "java.util", "org.dom4j" ]
java.util; org.dom4j;
1,579,152
private void recalculateAttributeStatistics(List<Attribute> attributeList) { // do nothing if not desired if (attributeList.size() == 0) { return; } else { // init statistics for (Attribute attribute : attributeList) { Iterator<Statistics> stats = attribute.getAllStatistics(); while (s...
void function(List<Attribute> attributeList) { if (attributeList.size() == 0) { return; } else { for (Attribute attribute : attributeList) { Iterator<Statistics> stats = attribute.getAllStatistics(); while (stats.hasNext()) { Statistics statistics = stats.next(); statistics.startCounting(attribute); } } Attribute weigh...
/** * Here the Example Set is parsed only once, all the information is retained * for each example set. */
Here the Example Set is parsed only once, all the information is retained for each example set
recalculateAttributeStatistics
{ "repo_name": "aborg0/rapidminer-vega", "path": "src/com/rapidminer/example/set/AbstractExampleSet.java", "license": "agpl-3.0", "size": 20103 }
[ "com.rapidminer.example.Attribute", "com.rapidminer.example.Example", "com.rapidminer.example.Statistics", "java.util.Iterator", "java.util.LinkedList", "java.util.List" ]
import com.rapidminer.example.Attribute; import com.rapidminer.example.Example; import com.rapidminer.example.Statistics; import java.util.Iterator; import java.util.LinkedList; import java.util.List;
import com.rapidminer.example.*; import java.util.*;
[ "com.rapidminer.example", "java.util" ]
com.rapidminer.example; java.util;
923,727
@Nonnull public DriveItemRestoreRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final DriveItemRestoreRequest request = new DriveItemRestoreRequest( getRequestUrl(), getClient(), requestOpt...
DriveItemRestoreRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final DriveItemRestoreRequest request = new DriveItemRestoreRequest( getRequestUrl(), getClient(), requestOptions); request.body = this.body; return request; }
/** * Creates the DriveItemRestoreRequest with specific requestOptions instead of the existing requestOptions * * @param requestOptions the options for the request * @return the DriveItemRestoreRequest instance */
Creates the DriveItemRestoreRequest with specific requestOptions instead of the existing requestOptions
buildRequest
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/DriveItemRestoreRequestBuilder.java", "license": "mit", "size": 3272 }
[ "com.microsoft.graph.requests.DriveItemRestoreRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.DriveItemRestoreRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
1,004,194
public static IoBuffer wrap(byte[] byteArray) { return wrap(ByteBuffer.wrap(byteArray)); }
static IoBuffer function(byte[] byteArray) { return wrap(ByteBuffer.wrap(byteArray)); }
/** * Wraps the specified byte array into MINA heap buffer. */
Wraps the specified byte array into MINA heap buffer
wrap
{ "repo_name": "EArdeleanu/gateway", "path": "mina.core/core/src/main/java/org/apache/mina/core/buffer/IoBuffer.java", "license": "apache-2.0", "size": 44329 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,863,787
static public CellImg< DoubleType, ? > loadDouble( final IHDF5Reader reader, final String dataset, final int[] cellDimensions ) { final IHDF5DoubleReader float64Reader = reader.float64(); final long[] dimensions = reorder( reader.object().getDimensions( dataset ) ); final int n = dimensions.length; ...
static CellImg< DoubleType, ? > function( final IHDF5Reader reader, final String dataset, final int[] cellDimensions ) { final IHDF5DoubleReader float64Reader = reader.float64(); final long[] dimensions = reorder( reader.object().getDimensions( dataset ) ); final int n = dimensions.length; final CellImg< DoubleType, ? ...
/** * Load an HDF5 float64 dataset into a {@link CellImg} of {@link DoubleType}. * * @param reader * @param dataset * @param cellDimensions */
Load an HDF5 float64 dataset into a <code>CellImg</code> of <code>DoubleType</code>
loadDouble
{ "repo_name": "hanslovsky/bigcat", "path": "src/main/java/bdv/img/h5/H5Utils.java", "license": "gpl-2.0", "size": 51530 }
[ "ch.systemsx.cisd.base.mdarray.MDDoubleArray", "ch.systemsx.cisd.hdf5.IHDF5DoubleReader", "ch.systemsx.cisd.hdf5.IHDF5Reader", "net.imglib2.RandomAccessibleInterval", "net.imglib2.img.cell.CellImg", "net.imglib2.img.cell.CellImgFactory", "net.imglib2.type.numeric.real.DoubleType", "net.imglib2.util.Ut...
import ch.systemsx.cisd.base.mdarray.MDDoubleArray; import ch.systemsx.cisd.hdf5.IHDF5DoubleReader; import ch.systemsx.cisd.hdf5.IHDF5Reader; import net.imglib2.RandomAccessibleInterval; import net.imglib2.img.cell.CellImg; import net.imglib2.img.cell.CellImgFactory; import net.imglib2.type.numeric.real.DoubleType; imp...
import ch.systemsx.cisd.base.mdarray.*; import ch.systemsx.cisd.hdf5.*; import net.imglib2.*; import net.imglib2.img.cell.*; import net.imglib2.type.numeric.real.*; import net.imglib2.util.*; import net.imglib2.view.*;
[ "ch.systemsx.cisd", "net.imglib2", "net.imglib2.img", "net.imglib2.type", "net.imglib2.util", "net.imglib2.view" ]
ch.systemsx.cisd; net.imglib2; net.imglib2.img; net.imglib2.type; net.imglib2.util; net.imglib2.view;
2,574,937
public BatchOutputConfig input(@NonNull String variable, @NonNull INDArray placeholder){ Preconditions.checkState(!placeholders.containsKey(variable), "Placeholder for variable %s already specified", variable); Preconditions.checkNotNull(sd.getVariable(variable), "Va...
BatchOutputConfig function(@NonNull String variable, @NonNull INDArray placeholder){ Preconditions.checkState(!placeholders.containsKey(variable), STR, variable); Preconditions.checkNotNull(sd.getVariable(variable), STR, variable); placeholders.put(variable, placeholder); return this; } /** * See {@link #input(String, ...
/** * Add a placeholder value for a specified variable */
Add a placeholder value for a specified variable
input
{ "repo_name": "RobAltena/deeplearning4j", "path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/config/BatchOutputConfig.java", "license": "apache-2.0", "size": 4805 }
[ "org.nd4j.base.Preconditions", "org.nd4j.linalg.api.ndarray.INDArray" ]
import org.nd4j.base.Preconditions; import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.base.*; import org.nd4j.linalg.api.ndarray.*;
[ "org.nd4j.base", "org.nd4j.linalg" ]
org.nd4j.base; org.nd4j.linalg;
942,748
public F getInstance(final String pattern, TimeZone timeZone, Locale locale) { if (pattern == null) { throw new NullPointerException("pattern must not be null"); } if (timeZone == null) { timeZone = TimeZone.getDefault(); } if (locale == null) { ...
F function(final String pattern, TimeZone timeZone, Locale locale) { if (pattern == null) { throw new NullPointerException(STR); } if (timeZone == null) { timeZone = TimeZone.getDefault(); } if (locale == null) { locale = Locale.getDefault(); } final MultipartKey key = new MultipartKey(pattern, timeZone, locale); F for...
/** * <p>Gets a formatter instance using the specified pattern, time zone * and locale.</p> * * @param pattern {@link SimpleDateFormat} compatible * pattern, non-null * @param timeZone the time zone, null means use the default TimeZone * @param locale the locale, nu...
Gets a formatter instance using the specified pattern, time zone and locale
getInstance
{ "repo_name": "sadegh-arfa/igramApp", "path": "TMessagesProj/src/main/java/org/telegram/messenger/time/FormatCache.java", "license": "gpl-2.0", "size": 11391 }
[ "java.util.Locale", "java.util.TimeZone" ]
import java.util.Locale; import java.util.TimeZone;
import java.util.*;
[ "java.util" ]
java.util;
1,263,437
public void addURLPattern(String pattern) { if (pattern.indexOf('\n') > -1) { throw new ConfigException(L.l("'url-pattern' cannot contain newline")); } _mappingList.add(new Mapping(pattern, null)); // server/13f4 if (getServletNameDefault() == null) setServletNameDefault(pattern); ...
void function(String pattern) { if (pattern.indexOf('\n') > -1) { throw new ConfigException(L.l(STR)); } _mappingList.add(new Mapping(pattern, null)); if (getServletNameDefault() == null) setServletNameDefault(pattern); }
/** * Sets the url pattern */
Sets the url pattern
addURLPattern
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/server/dispatch/ServletMapping.java", "license": "gpl-2.0", "size": 8702 }
[ "com.caucho.config.ConfigException" ]
import com.caucho.config.ConfigException;
import com.caucho.config.*;
[ "com.caucho.config" ]
com.caucho.config;
2,577,237
public void setTreeModel(TreeModel model);
void function(TreeModel model);
/** * Set the tree model to which this checking model is (possibly) bound. * A checking model may use a tree model to propagate the checking. A * checking model may also listen to the model, to adjust the checking * upon model events. The current checking is cleared. */
Set the tree model to which this checking model is (possibly) bound. A checking model may use a tree model to propagate the checking. A checking model may also listen to the model, to adjust the checking upon model events. The current checking is cleared
setTreeModel
{ "repo_name": "virtualcitySYSTEMS/importer-exporter", "path": "src/org/citydb/gui/components/checkboxtree/TreeCheckingModel.java", "license": "lgpl-3.0", "size": 7391 }
[ "javax.swing.tree.TreeModel" ]
import javax.swing.tree.TreeModel;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
691,665
@Override @QosPriority(priority = HConstants.ADMIN_QOS) public CompactRegionResponse compactRegion(final RpcController controller, final CompactRegionRequest request) throws ServiceException { try { checkOpen(); requestCount.increment(); HRegion region = getRegion(request.getRegion());...
@QosPriority(priority = HConstants.ADMIN_QOS) CompactRegionResponse function(final RpcController controller, final CompactRegionRequest request) throws ServiceException { try { checkOpen(); requestCount.increment(); HRegion region = getRegion(request.getRegion()); if (QuotaUtil.isQuotaEnabled(getConfiguration()) && !Su...
/** * Compact a region on the region server. * * @param controller the RPC controller * @param request the request * @throws ServiceException */
Compact a region on the region server
compactRegion
{ "repo_name": "Eshcar/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java", "license": "apache-2.0", "size": 165436 }
[ "java.io.IOException", "org.apache.hadoop.hbase.DoNotRetryIOException", "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.hbase.ipc.QosPriority", "org.apache.hadoop.hbase.ipc.RpcServer", "org.apache.hadoop.hbase.quotas.QuotaUtil", "org.apache.hadoop.hbase.regionserver.Region", "org.apache.hadoo...
import java.io.IOException; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.ipc.QosPriority; import org.apache.hadoop.hbase.ipc.RpcServer; import org.apache.hadoop.hbase.quotas.QuotaUtil; import org.apache.hadoop.hbase.regionserver.Region; ...
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.ipc.*; import org.apache.hadoop.hbase.quotas.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.regionserver.compactions.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.hbase.shaded.pr...
[ "java.io", "org.apache.hadoop", "org.apache.hbase" ]
java.io; org.apache.hadoop; org.apache.hbase;
2,424,421
public void testSPParse() throws Exception { if (versionMeetsMinimum(5, 0)) { @SuppressWarnings("unused") CallableStatement storedProc = null; createProcedure("testSpParse", "(IN FOO VARCHAR(15))\n" + "BEGIN\n" + "SELECT 1;\n" + "end\n"); storedProc = this.conn.prepareCall("{call testSpParse()...
void function() throws Exception { if (versionMeetsMinimum(5, 0)) { @SuppressWarnings(STR) CallableStatement storedProc = null; createProcedure(STR, STR + STR + STR + "end\n"); storedProc = this.conn.prepareCall(STR); } }
/** * Tests parsing of stored procedures * * @throws Exception * if an error occurs. */
Tests parsing of stored procedures
testSPParse
{ "repo_name": "suthat/signal", "path": "vendor/mysql-connector-java-5.1.26/src/testsuite/simple/CallableStatementTest.java", "license": "apache-2.0", "size": 13805 }
[ "java.sql.CallableStatement" ]
import java.sql.CallableStatement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,816,974
public T get(); } static class AnnotatedMembers { //Class type; Collection<Method> annMethods; Collection<Field> annFields;
T function(); } static class AnnotatedMembers { Collection<Method> annMethods; Collection<Field> annFields;
/** Return the object to be injected. */
Return the object to be injected
get
{ "repo_name": "bnguyen82/stuff-projects", "path": "jta-stripse-integration/src/main/java/com/pocketgorilla/stripesem/Injector.java", "license": "mit", "size": 5937 }
[ "java.lang.reflect.Field", "java.lang.reflect.Method", "java.util.Collection" ]
import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.Collection;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,462,391
public void init() throws ServletException { // Put your code here }
void function() throws ServletException { }
/** * Initialization of the servlet. <br> * * @throws ServletException if an error occurs */
Initialization of the servlet.
init
{ "repo_name": "htzy/te", "path": "envirMonitor/src/com/monitor/servlet/ChangeUnitTypeServlet.java", "license": "apache-2.0", "size": 3139 }
[ "javax.servlet.ServletException" ]
import javax.servlet.ServletException;
import javax.servlet.*;
[ "javax.servlet" ]
javax.servlet;
2,103,999
public com.squareup.okhttp.Call speciesListGETCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarP...
com.squareup.okhttp.Call function(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; String localVarPath = STR; List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> l...
/** * Build call for speciesListGET * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */
Build call for speciesListGET
speciesListGETCall
{ "repo_name": "3D-e-Chem/knime-gpcrdb", "path": "client/src/main/java/nl/esciencecenter/e3dchem/gpcrdb/client/ServicesspeciesApi.java", "license": "apache-2.0", "size": 13115 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "nl.esciencecenter.e3dchem.gpcrdb.client.ApiException", "nl.esciencecenter.e3dchem.gpcrdb.client.Pair", "nl.esciencecenter.e3dchem.gpcrdb.client.ProgressRequestBody", "nl.esciencecenter.e3dchem.gpcrdb.client.ProgressRespons...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import nl.esciencecenter.e3dchem.gpcrdb.client.ApiException; import nl.esciencecenter.e3dchem.gpcrdb.client.Pair; import nl.esciencecenter.e3dchem.gpcrdb.client.ProgressRequestBody; import nl.esciencecenter.e3dchem.gpcrdb...
import java.util.*; import nl.esciencecenter.e3dchem.gpcrdb.client.*;
[ "java.util", "nl.esciencecenter.e3dchem" ]
java.util; nl.esciencecenter.e3dchem;
2,035,692
static AccountGroup getExistingGroupFromReviewDb(ReviewDb db, AccountGroup.UUID groupUuid) throws OrmException, NoSuchGroupException { Optional<AccountGroup> group = getGroupFromReviewDb(db, groupUuid); return group.orElseThrow(() -> new NoSuchGroupException(groupUuid)); } /** * Returns the {@co...
static AccountGroup getExistingGroupFromReviewDb(ReviewDb db, AccountGroup.UUID groupUuid) throws OrmException, NoSuchGroupException { Optional<AccountGroup> group = getGroupFromReviewDb(db, groupUuid); return group.orElseThrow(() -> new NoSuchGroupException(groupUuid)); } /** * Returns the {@code AccountGroup} for the...
/** * Returns the {@code AccountGroup} for the specified UUID. * * @param db the {@code ReviewDb} instance to use for lookups * @param groupUuid the UUID of the group * @return the {@code AccountGroup} which has the specified UUID * @throws OrmDuplicateKeyException if multiple groups are found for the...
Returns the AccountGroup for the specified UUID
getExistingGroupFromReviewDb
{ "repo_name": "gerrit-review/gerrit", "path": "java/com/google/gerrit/server/group/db/Groups.java", "license": "apache-2.0", "size": 14067 }
[ "com.google.gerrit.common.errors.NoSuchGroupException", "com.google.gerrit.reviewdb.client.AccountGroup", "com.google.gerrit.reviewdb.server.ReviewDb", "com.google.gwtorm.server.OrmException", "java.util.Optional" ]
import com.google.gerrit.common.errors.NoSuchGroupException; import com.google.gerrit.reviewdb.client.AccountGroup; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gwtorm.server.OrmException; import java.util.Optional;
import com.google.gerrit.common.errors.*; import com.google.gerrit.reviewdb.client.*; import com.google.gerrit.reviewdb.server.*; import com.google.gwtorm.server.*; import java.util.*;
[ "com.google.gerrit", "com.google.gwtorm", "java.util" ]
com.google.gerrit; com.google.gwtorm; java.util;
2,176,193
protected void checkException(EDriverExceptionType expectedType, String... directoryNames) { try { loadConfiguration(directoryNames); fail("expected exception"); } catch (BundleException e) { assertEquals(expectedType, e.getType()); } }
void function(EDriverExceptionType expectedType, String... directoryNames) { try { loadConfiguration(directoryNames); fail(STR); } catch (BundleException e) { assertEquals(expectedType, e.getType()); } }
/** * Load configuration and check if an exception of the specified type is * thrown. * * Configuration loading is done according to the enabledBuildlets. * * @param expectedType * expected exception type * @param directoryNames * bundle locations. */
Load configuration and check if an exception of the specified type is thrown. Configuration loading is done according to the enabledBuildlets
checkException
{ "repo_name": "vimaier/conqat", "path": "org.conqat.engine.core/test-src/org/conqat/engine/core/bundle/BundleTestBase.java", "license": "apache-2.0", "size": 5579 }
[ "org.conqat.engine.core.driver.error.EDriverExceptionType" ]
import org.conqat.engine.core.driver.error.EDriverExceptionType;
import org.conqat.engine.core.driver.error.*;
[ "org.conqat.engine" ]
org.conqat.engine;
1,724,847
public void write(ByteAppendable os, char ch) throws IOException { os.write(ch < 0x100 ? ch : 0x3f); }
void function(ByteAppendable os, char ch) throws IOException { os.write(ch < 0x100 ? ch : 0x3f); }
/** * Writes a character to the output stream with the correct encoding. * * @param ch the character to write. */
Writes a character to the output stream with the correct encoding
write
{ "repo_name": "baratine/baratine", "path": "web/src/main/java/com/caucho/v5/io/i18n/ISO8859_1Writer.java", "license": "gpl-2.0", "size": 3410 }
[ "com.caucho.v5.io.ByteAppendable", "java.io.IOException" ]
import com.caucho.v5.io.ByteAppendable; import java.io.IOException;
import com.caucho.v5.io.*; import java.io.*;
[ "com.caucho.v5", "java.io" ]
com.caucho.v5; java.io;
1,834,458
public ApplicationGatewayInner withAuthenticationCertificates(List<ApplicationGatewayAuthenticationCertificate> authenticationCertificates) { this.authenticationCertificates = authenticationCertificates; return this; }
ApplicationGatewayInner function(List<ApplicationGatewayAuthenticationCertificate> authenticationCertificates) { this.authenticationCertificates = authenticationCertificates; return this; }
/** * Set authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](https://docs.microsoft.com/azure/azure-subscription-service-limits#application-gateway-limits). * * @param authenticationCertificates the authenticationCertificates value to set...
Set authentication certificates of the application gateway resource. For default limits, see [Application Gateway limits](HREF)
withAuthenticationCertificates
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/ApplicationGatewayInner.java", "license": "mit", "size": 31499 }
[ "com.microsoft.azure.management.network.v2019_04_01.ApplicationGatewayAuthenticationCertificate", "java.util.List" ]
import com.microsoft.azure.management.network.v2019_04_01.ApplicationGatewayAuthenticationCertificate; import java.util.List;
import com.microsoft.azure.management.network.v2019_04_01.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
777,200
void setHostBuffer(ByteBuffer hostBuffer);
void setHostBuffer(ByteBuffer hostBuffer);
/** * Set the underlying host buffer, very fast method of copying on RAM side and not using cublas (SLOW) * @param hostBuffer */
Set the underlying host buffer, very fast method of copying on RAM side and not using cublas (SLOW)
setHostBuffer
{ "repo_name": "nchinth/nd4j", "path": "nd4j-jcublas-parent/nd4j-jcublas-common/src/main/java/org/nd4j/linalg/jcublas/buffer/JCudaBuffer.java", "license": "apache-2.0", "size": 3734 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
978,168
protected void writeHeader(DataOutputStream dataOutStream) throws IOException { dataOutStream.writeInt(getLength()); dataOutStream.writeInt(getId()); dataOutStream.writeByte(getFlags()); writeSpecificHeaderFields(dataOutStream); }
void function(DataOutputStream dataOutStream) throws IOException { dataOutStream.writeInt(getLength()); dataOutStream.writeInt(getId()); dataOutStream.writeByte(getFlags()); writeSpecificHeaderFields(dataOutStream); }
/** * Writes header of packet. */
Writes header of packet
writeHeader
{ "repo_name": "Kwestor/scala-ide", "path": "org.scala-ide.sdt.debug.tests/src/org/scalaide/debug/internal/spy/JdwpPacket.java", "license": "bsd-3-clause", "size": 5548 }
[ "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
863,474
List<? extends VcsCommitMetadata> readMetadata(@NotNull VirtualFile root, @NotNull List<String> hashes) throws VcsException;
List<? extends VcsCommitMetadata> readMetadata(@NotNull VirtualFile root, @NotNull List<String> hashes) throws VcsException;
/** * Reads those details of the given commits, which are necessary to be shown in the log table and commit details. */
Reads those details of the given commits, which are necessary to be shown in the log table and commit details
readMetadata
{ "repo_name": "leafclick/intellij-community", "path": "platform/vcs-log/api/src/com/intellij/vcs/log/VcsLogProvider.java", "license": "apache-2.0", "size": 8530 }
[ "com.intellij.openapi.vcs.VcsException", "com.intellij.openapi.vfs.VirtualFile", "java.util.List", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; import java.util.List; import org.jetbrains.annotations.NotNull;
import com.intellij.openapi.vcs.*; import com.intellij.openapi.vfs.*; import java.util.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "java.util", "org.jetbrains.annotations" ]
com.intellij.openapi; java.util; org.jetbrains.annotations;
2,022,424
@NotNull PsiClass[] getSupers();
@NotNull PsiClass[] getSupers();
/** * Returns the list of classes and interfaces extended or implemented by the class. * * @return the list of classes or interfaces. May return zero elements when jdk is * not configured, so no java.lang.Object is found */
Returns the list of classes and interfaces extended or implemented by the class
getSupers
{ "repo_name": "android-ia/platform_tools_idea", "path": "java/java-psi-api/src/com/intellij/psi/PsiClass.java", "license": "apache-2.0", "size": 11944 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
116,105
@Override public void getData(SWFOutputStream sos) { throw new Error("TagStub.getData call is not supported."); }
void function(SWFOutputStream sos) { throw new Error(STR); }
/** * Gets data bytes * * @param sos SWF output stream */
Gets data bytes
getData
{ "repo_name": "Jackkal/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/tags/TagStub.java", "license": "gpl-3.0", "size": 1827 }
[ "com.jpexs.decompiler.flash.SWFOutputStream" ]
import com.jpexs.decompiler.flash.SWFOutputStream;
import com.jpexs.decompiler.flash.*;
[ "com.jpexs.decompiler" ]
com.jpexs.decompiler;
2,667,612
public boolean hasErrors() { return !getErrorList().isEmpty(); }
boolean function() { return !getErrorList().isEmpty(); }
/** * This will return true if there were errors in the package building and * compiling phase */
This will return true if there were errors in the package building and compiling phase
hasErrors
{ "repo_name": "mdproctor/drools", "path": "drools-compiler/src/main/java/org/drools/compiler/builder/impl/KnowledgeBuilderImpl.java", "license": "apache-2.0", "size": 103800 }
[ "org.drools.core.util.StringUtils" ]
import org.drools.core.util.StringUtils;
import org.drools.core.util.*;
[ "org.drools.core" ]
org.drools.core;
2,562,039
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) { List codecs = getFormatConversionProviders(); for(int i = 0; i < codecs.size(); i++) { FormatConversionProvide...
static AudioInputStream function(AudioFormat.Encoding targetEncoding, AudioInputStream sourceStream) { List codecs = getFormatConversionProviders(); for(int i = 0; i < codecs.size(); i++) { FormatConversionProvider codec = (FormatConversionProvider) codecs.get(i); if( codec.isConversionSupported( targetEncoding, source...
/** * Obtains an audio input stream of the indicated encoding, by converting the * provided audio input stream. * @param targetEncoding the desired encoding after conversion * @param sourceStream the stream to be converted * @return an audio input stream of the indicated encoding * @throws...
Obtains an audio input stream of the indicated encoding, by converting the provided audio input stream
getAudioInputStream
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jdk/src/share/classes/javax/sound/sampled/AudioSystem.java", "license": "gpl-2.0", "size": 64588 }
[ "java.util.List", "javax.sound.sampled.spi.FormatConversionProvider" ]
import java.util.List; import javax.sound.sampled.spi.FormatConversionProvider;
import java.util.*; import javax.sound.sampled.spi.*;
[ "java.util", "javax.sound" ]
java.util; javax.sound;
1,551,521
public void setMethodResourceManagers(List<MethodResourceManager> methodResourceManagers) { this.methodResourceManagers = methodResourceManagers; }
void function(List<MethodResourceManager> methodResourceManagers) { this.methodResourceManagers = methodResourceManagers; }
/** * Set the method-based resource managers that will be notified of the statistics. * * @param methodResourceManagers a list of resource managers - may be null or empty */
Set the method-based resource managers that will be notified of the statistics
setMethodResourceManagers
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/repo/transaction/SingleEntryTransactionResourceInterceptor.java", "license": "lgpl-3.0", "size": 11825 }
[ "java.util.List", "org.alfresco.util.resource.MethodResourceManager" ]
import java.util.List; import org.alfresco.util.resource.MethodResourceManager;
import java.util.*; import org.alfresco.util.resource.*;
[ "java.util", "org.alfresco.util" ]
java.util; org.alfresco.util;
2,721,328
void onTracksSelected(boolean isDisabled, List<SelectionOverride> overrides); } private final Context context; @StyleRes private int themeResId; private final CharSequence title; private final MappedTrackInfo mappedTrackInfo; private final int rendererIndex; private final DialogCallback callback; ...
void onTracksSelected(boolean isDisabled, List<SelectionOverride> overrides); } private final Context context; @StyleRes private int themeResId; private final CharSequence title; private final MappedTrackInfo mappedTrackInfo; private final int rendererIndex; private final DialogCallback callback; private boolean allowA...
/** * Called when tracks are selected. * * @param isDisabled Whether the renderer is disabled. * @param overrides List of selected track selection overrides for the renderer. */
Called when tracks are selected
onTracksSelected
{ "repo_name": "androidx/media", "path": "libraries/ui/src/main/java/androidx/media3/ui/TrackSelectionDialogBuilder.java", "license": "apache-2.0", "size": 12512 }
[ "android.content.Context", "androidx.annotation.Nullable", "androidx.annotation.StyleRes", "androidx.media3.common.Format", "androidx.media3.common.TrackGroupArray", "androidx.media3.common.util.Assertions", "androidx.media3.exoplayer.trackselection.DefaultTrackSelector", "androidx.media3.exoplayer.tr...
import android.content.Context; import androidx.annotation.Nullable; import androidx.annotation.StyleRes; import androidx.media3.common.Format; import androidx.media3.common.TrackGroupArray; import androidx.media3.common.util.Assertions; import androidx.media3.exoplayer.trackselection.DefaultTrackSelector; import andro...
import android.content.*; import androidx.annotation.*; import androidx.media3.common.*; import androidx.media3.common.util.*; import androidx.media3.exoplayer.trackselection.*; import java.util.*;
[ "android.content", "androidx.annotation", "androidx.media3", "java.util" ]
android.content; androidx.annotation; androidx.media3; java.util;
2,528,210
public Map<String, ServerInfo> getServers();
Map<String, ServerInfo> function();
/** * Get the configuration all servers which may be accessible via the proxy. * * @return all accessible servers, keyed by name */
Get the configuration all servers which may be accessible via the proxy
getServers
{ "repo_name": "starlis/BungeeCord", "path": "api/src/main/java/net/md_5/bungee/api/config/ConfigurationAdapter.java", "license": "bsd-3-clause", "size": 2332 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,678,344
ListenableFuture<Boolean> deleteTopology(String topologyName);
ListenableFuture<Boolean> deleteTopology(String topologyName);
/** * Delete the topology definition for the given topology * * @return Boolean - Success or Failure */
Delete the topology definition for the given topology
deleteTopology
{ "repo_name": "lucperkins/heron", "path": "heron/spi/src/java/com/twitter/heron/spi/statemgr/IStateManager.java", "license": "apache-2.0", "size": 9653 }
[ "com.google.common.util.concurrent.ListenableFuture" ]
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.*;
[ "com.google.common" ]
com.google.common;
1,069,190
static void value(StringBuilder sb, String type, JsonElement value) { switch (type) { case "UINT8": case "UINT16": case "UINT32": case "UINT64": case "INT8": case "INT16": case "INT32": case "INT64": case "FLOAT32": case "FLOAT6...
static void value(StringBuilder sb, String type, JsonElement value) { switch (type) { case "UINT8": case STR: case STR: case STR: case "INT8": case "INT16": case "INT32": case "INT64": case STR: case STR: numberLiteral(sb, value.getAsJsonPrimitive(), type); break; case STR: stringLiteral(sb, value.getAsString()); break...
/** * Add a single value of a known type. */
Add a single value of a known type
value
{ "repo_name": "ddebrunner/streamsx.topology", "path": "java/src/com/ibm/streamsx/topology/generator/spl/SPLGenerator.java", "license": "apache-2.0", "size": 53294 }
[ "com.google.gson.JsonElement", "com.ibm.streamsx.topology.builder.JParamTypes" ]
import com.google.gson.JsonElement; import com.ibm.streamsx.topology.builder.JParamTypes;
import com.google.gson.*; import com.ibm.streamsx.topology.builder.*;
[ "com.google.gson", "com.ibm.streamsx" ]
com.google.gson; com.ibm.streamsx;
1,919,787
public void setHeight(int height) { LayoutScaleBar.this.setHeight(height); } // </editor-fold> } public static class LayoutScaleBarBeanBeanInfo extends BaseBeanInfo { public LayoutScaleBarBeanBeanInfo() { super(LayoutScaleBarBean.class); ...
void function(int height) { LayoutScaleBar.this.setHeight(height); } } public static class LayoutScaleBarBeanBeanInfo extends BaseBeanInfo { public LayoutScaleBarBeanBeanInfo() { super(LayoutScaleBarBean.class); ExtendedPropertyDescriptor e = addProperty(STR); e.setCategory(STR).setDisplayName(STR); e.setPropertyEditor...
/** * Set height * * @param height Height */
Set height
setHeight
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/layout/LayoutScaleBar.java", "license": "lgpl-3.0", "size": 22272 }
[ "com.l2fprod.common.beans.BaseBeanInfo", "com.l2fprod.common.beans.ExtendedPropertyDescriptor", "com.l2fprod.common.beans.editor.ComboBoxPropertyEditor", "java.awt.Font" ]
import com.l2fprod.common.beans.BaseBeanInfo; import com.l2fprod.common.beans.ExtendedPropertyDescriptor; import com.l2fprod.common.beans.editor.ComboBoxPropertyEditor; import java.awt.Font;
import com.l2fprod.common.beans.*; import com.l2fprod.common.beans.editor.*; import java.awt.*;
[ "com.l2fprod.common", "java.awt" ]
com.l2fprod.common; java.awt;
1,252,428
public void doAttachUpload(RunData data) { // save the current input before leaving the page SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); saveSubmitInputs(state, data.getParameters ()); doAttachUpload(data, false); }
void function(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); saveSubmitInputs(state, data.getParameters ()); doAttachUpload(data, false); }
/** * multiple file upload * @param data */
multiple file upload
doAttachUpload
{ "repo_name": "harfalm/Sakai-10.1", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 605178 }
[ "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
1,498,660
return actual instanceof Throwable ? new ShouldNotBeInstance((Throwable) actual, type) : new ShouldNotBeInstance(actual, type); } private ShouldNotBeInstance(Object actual, Class<?> type) { super("%nExpecting:%n <%s>%nnot to be an instance of:<%s>", actual, type); } private ShouldNotBeInstance(Throw...
return actual instanceof Throwable ? new ShouldNotBeInstance((Throwable) actual, type) : new ShouldNotBeInstance(actual, type); } private ShouldNotBeInstance(Object actual, Class<?> type) { super(STR, actual, type); } private ShouldNotBeInstance(Throwable throwable, Class<?> type) { super(STR, getStackTrace(throwable),...
/** * Creates a new </code>{@link ShouldNotBeInstance}</code>. * @param actual the actual value in the failed assertion. * @param type the type {@code actual} is expected to belong to. * @return the created {@code ErrorMessageFactory}. */
Creates a new </code><code>ShouldNotBeInstance</code></code>
shouldNotBeInstance
{ "repo_name": "bric3/assertj-core", "path": "src/main/java/org/assertj/core/error/ShouldNotBeInstance.java", "license": "apache-2.0", "size": 1744 }
[ "org.assertj.core.util.Throwables" ]
import org.assertj.core.util.Throwables;
import org.assertj.core.util.*;
[ "org.assertj.core" ]
org.assertj.core;
1,856,284
@Override public String getTopologyConf(String id) throws NotAliveException, TException { String rtn; try { Map<Object, Object> topologyConf = StormConfig .read_nimbus_topology_conf(conf, id); rtn = JStormUtils.to_json(topologyConf); } catch (IOException e) { LOG.info("Failed to get configura...
String function(String id) throws NotAliveException, TException { String rtn; try { Map<Object, Object> topologyConf = StormConfig .read_nimbus_topology_conf(conf, id); rtn = JStormUtils.to_json(topologyConf); } catch (IOException e) { LOG.info(STR + id, e); throw new TException(e); } return rtn; }
/** * get topology configuration * * @param id * String: topology id * @return String */
get topology configuration
getTopologyConf
{ "repo_name": "zhangjunfang/jstorm-0.9.6.3-", "path": "jstorm-server/src/main/java/com/alibaba/jstorm/daemon/nimbus/ServiceHandler.java", "license": "apache-2.0", "size": 41095 }
[ "com.alibaba.jstorm.cluster.StormConfig", "com.alibaba.jstorm.utils.JStormUtils", "java.io.IOException", "java.util.Map", "org.apache.thrift7.TException" ]
import com.alibaba.jstorm.cluster.StormConfig; import com.alibaba.jstorm.utils.JStormUtils; import java.io.IOException; import java.util.Map; import org.apache.thrift7.TException;
import com.alibaba.jstorm.cluster.*; import com.alibaba.jstorm.utils.*; import java.io.*; import java.util.*; import org.apache.thrift7.*;
[ "com.alibaba.jstorm", "java.io", "java.util", "org.apache.thrift7" ]
com.alibaba.jstorm; java.io; java.util; org.apache.thrift7;
232,446
IPieEvent event = Mockito.mock(IPieEvent.class); Map<Class, Class> map = Mockito.mock(Map.class); IPieEventTask task = Mockito.mock(IPieEventTask.class); IBeanService beanService = Mockito.mock(IBeanService.class); Mockito.when(map.get(event.getClass())).thenReturn(task.getClass()); Class clazz = task.getC...
IPieEvent event = Mockito.mock(IPieEvent.class); Map<Class, Class> map = Mockito.mock(Map.class); IPieEventTask task = Mockito.mock(IPieEventTask.class); IBeanService beanService = Mockito.mock(IBeanService.class); Mockito.when(map.get(event.getClass())).thenReturn(task.getClass()); Class clazz = task.getClass(); Mocki...
/** * Test of handlePieEvent method, of class PieExecutorService. */
Test of handlePieEvent method, of class PieExecutorService
testHandlePieEvent
{ "repo_name": "vauvenal5/pieShare", "path": "pieUtilities/src/test/java/org/pieShare/pieTools/pieUtilities/service/pieExecutorService/PieExecutorTaskFactoryTest.java", "license": "apache-2.0", "size": 5226 }
[ "java.util.Map", "org.mockito.Mockito", "org.testng.Assert" ]
import java.util.Map; import org.mockito.Mockito; import org.testng.Assert;
import java.util.*; import org.mockito.*; import org.testng.*;
[ "java.util", "org.mockito", "org.testng" ]
java.util; org.mockito; org.testng;
1,293,023
public static IDataType createDataType(String type) { return component.core().createDataType(type); }
static IDataType function(String type) { return component.core().createDataType(type); }
/** * Creates a DataType based on a type.<br> * Possible types:<br> * - Boolean <br> * - Integer <br> * - Long <br> * - Float <br> * - String <br> * - Datetime <br> * - {code#id} (enumeration key) <br> * - ModuleName.ObjectName (IMendixObject)<br> * - [ModuleName.ObjectName] (List<IMendixObject>) ...
Creates a DataType based on a type. Possible types: - Boolean - Integer - Long - Float - String - Datetime - {code#id} (enumeration key) - ModuleName.ObjectName (IMendixObject) - [ModuleName.ObjectName] (List)
createDataType
{ "repo_name": "tieniber/FileDocumentLink", "path": "test/javasource/com/mendix/core/Core.java", "license": "apache-2.0", "size": 77610 }
[ "com.mendix.systemwideinterfaces.core.IDataType" ]
import com.mendix.systemwideinterfaces.core.IDataType;
import com.mendix.systemwideinterfaces.core.*;
[ "com.mendix.systemwideinterfaces" ]
com.mendix.systemwideinterfaces;
2,264,518
public void clearAllStateAfterForTestingOnly() { stateAfterClearedForTesting = true; weakenFrameStateVerification(FrameStateVerification.NONE); for (Node node : getNodes()) { if (node instanceof StateSplit) { FrameState stateAfter = ((StateSplit) node).stateAfter(...
void function() { stateAfterClearedForTesting = true; weakenFrameStateVerification(FrameStateVerification.NONE); for (Node node : getNodes()) { if (node instanceof StateSplit) { FrameState stateAfter = ((StateSplit) node).stateAfter(); if (stateAfter != null) { assert !(node instanceof ExceptionObjectNode) : STR; ((Sta...
/** * For use in tests to clear all stateAfter frame states. */
For use in tests to clear all stateAfter frame states
clearAllStateAfterForTestingOnly
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.nodes/src/org/graalvm/compiler/nodes/StructuredGraph.java", "license": "gpl-2.0", "size": 47593 }
[ "org.graalvm.compiler.graph.Node", "org.graalvm.compiler.nodes.java.ExceptionObjectNode", "org.graalvm.compiler.nodes.util.GraphUtil" ]
import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.java.ExceptionObjectNode; import org.graalvm.compiler.nodes.util.GraphUtil;
import org.graalvm.compiler.graph.*; import org.graalvm.compiler.nodes.java.*; import org.graalvm.compiler.nodes.util.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
1,282,427
@Override public void setAdapter(ListAdapter adapter) { if (null != mAdapter) { mAdapter.unregisterDataSetObserver(mDataSetObserver); } resetList(); mRecycler.clear(); if (mHeaderViewInfos.size() > 0 || mFooterViewInfos.size() > 0) { mAdapter = n...
void function(ListAdapter adapter) { if (null != mAdapter) { mAdapter.unregisterDataSetObserver(mDataSetObserver); } resetList(); mRecycler.clear(); if (mHeaderViewInfos.size() > 0 mFooterViewInfos.size() > 0) { mAdapter = new PLA_HeaderViewListAdapter(mHeaderViewInfos, mFooterViewInfos, adapter); } else { mAdapter = a...
/** * Sets the data behind this ListView. * * The adapter passed to this method may be wrapped by a * {@link WrapperListAdapter}, depending on the ListView features currently * in use. For instance, adding headers and/or footers will cause the * adapter to be wrapped. * * @para...
Sets the data behind this ListView. The adapter passed to this method may be wrapped by a <code>WrapperListAdapter</code>, depending on the ListView features currently in use. For instance, adding headers and/or footers will cause the adapter to be wrapped
setAdapter
{ "repo_name": "longwei243/viewlibrary", "path": "ViewLibrary/src/org/longwei/view/pinterestlike/PLA_ListView.java", "license": "apache-2.0", "size": 76727 }
[ "android.widget.ListAdapter" ]
import android.widget.ListAdapter;
import android.widget.*;
[ "android.widget" ]
android.widget;
485,303
public void stop(InetAddress addr, int port) throws java.net.ConnectException { try { ShutdownRequest request = new ShutdownRequest(); requestToServer(addr, port, request, DEFAULT_REQUEST_TIMEOUT); } catch (java.net.ConnectException ce) { // must not be running, rethrow so the caller can han...
void function(InetAddress addr, int port) throws java.net.ConnectException { try { ShutdownRequest request = new ShutdownRequest(); requestToServer(addr, port, request, DEFAULT_REQUEST_TIMEOUT); } catch (java.net.ConnectException ce) { throw ce; } catch (Exception ex) { logger.error( STR + addr + ":" + port + STR + ex)...
/** * Stops the Locator running on a given host and port */
Stops the Locator running on a given host and port
stop
{ "repo_name": "davebarnes97/geode", "path": "geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpClient.java", "license": "apache-2.0", "size": 11912 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
671,207
protected void setName(@NotNull final V name) { immutableSetName(name); } /** * {@inheritDoc}
void function(@NotNull final V name) { immutableSetName(name); } /** * {@inheritDoc}
/** * Specifies the name. * @param name such name. */
Specifies the name
setName
{ "repo_name": "rydnr/queryj-rt", "path": "queryj-core/src/main/java/org/acmsl/queryj/metadata/vo/AbstractTable.java", "license": "gpl-2.0", "size": 13867 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
193,979
@JsonProperty("totalAmountNeg") private Double totalAmountNeg; public StatementLinesResponse unreconciledAmountPos(Double unreconciledAmountPos) { this.unreconciledAmountPos = unreconciledAmountPos; return this; }
@JsonProperty(STR) Double totalAmountNeg; public StatementLinesResponse function(Double unreconciledAmountPos) { this.unreconciledAmountPos = unreconciledAmountPos; return this; }
/** * Sum of the amounts of all statement lines where both the reconciled flag is set to FALSE, and * the amount is positive. * * @param unreconciledAmountPos Double * @return StatementLinesResponse */
Sum of the amounts of all statement lines where both the reconciled flag is set to FALSE, and the amount is positive
unreconciledAmountPos
{ "repo_name": "XeroAPI/Xero-Java", "path": "src/main/java/com/xero/models/finance/StatementLinesResponse.java", "license": "mit", "size": 30674 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
123,242
@Override public void onCheckedChanged(CompoundButton switchView, boolean isChecked) { if (!isResumed()) { // very important, setChecked(...) is called automatically during // Fragment recreation on device rotations return; }
void function(CompoundButton switchView, boolean isChecked) { if (!isResumed()) { return; }
/** * Called by R.id.shareViaLinkHideListPermissionSwitch to set or clear the edit permission. * * @param switchView {@link SwitchCompat} toggled by the user, R.id.shareViaLinkHideListPermissionSwitch * @param isChecked New switch state. */
Called by R.id.shareViaLinkHideListPermissionSwitch to set or clear the edit permission
onCheckedChanged
{ "repo_name": "Flole998/android", "path": "src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java", "license": "gpl-2.0", "size": 38198 }
[ "android.widget.CompoundButton" ]
import android.widget.CompoundButton;
import android.widget.*;
[ "android.widget" ]
android.widget;
777,268
public Enumeration<String> list() throws IOException { if (!connected) { connect(); } if ((resource == null) && (collection == null)) { throw new FileNotFoundException(); } Vector<String> result = new Vector<String>()...
Enumeration<String> function() throws IOException { if (!connected) { connect(); } if ((resource == null) && (collection == null)) { throw new FileNotFoundException(); } Vector<String> result = new Vector<String>(); if (collection != null) { try { String file = getURL().getFile(); int start; if(context instanceof Proxy...
/** * List children of this collection. The names given are relative to this * URI's path. The full uri of the children is then : path + "/" + name. */
List children of this collection. The names given are relative to this URI's path. The full uri of the children is then : path + "/" + name
list
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/DirContextURLConnection.java", "license": "mit", "size": 12934 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.Enumeration", "java.util.Vector", "javax.naming.NameClassPair", "javax.naming.NamingEnumeration", "javax.naming.NamingException" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.util.Enumeration; import java.util.Vector; import javax.naming.NameClassPair; import javax.naming.NamingEnumeration; import javax.naming.NamingException;
import java.io.*; import java.util.*; import javax.naming.*;
[ "java.io", "java.util", "javax.naming" ]
java.io; java.util; javax.naming;
2,704,453
private void updateInList(List<StreamEvent> candidateEvents, int[] mappingPosition) { for (StreamEvent streamEvent : candidateEvents) { if (outsideTimeWindow(streamEvent)) { break; } if (execute(streamEvent)) { int streamEventIndex = candid...
void function(List<StreamEvent> candidateEvents, int[] mappingPosition) { for (StreamEvent streamEvent : candidateEvents) { if (outsideTimeWindow(streamEvent)) { break; } if (execute(streamEvent)) { int streamEventIndex = candidateEvents.indexOf(streamEvent); for (int i = 0, size = mappingPosition.length; i < size; i++...
/** * Called when updating events in a List of stream events. * * @param candidateEvents List of candidate stream events. * @param mappingPosition Mapping positions array. */
Called when updating events in a List of stream events
updateInList
{ "repo_name": "rajeev3001/siddhi", "path": "modules/siddhi-extensions/event-table/src/main/java/org/wso2/siddhi/extension/eventtable/hazelcast/HazelcastOperator.java", "license": "apache-2.0", "size": 24273 }
[ "java.util.List", "org.wso2.siddhi.core.event.stream.StreamEvent" ]
import java.util.List; import org.wso2.siddhi.core.event.stream.StreamEvent;
import java.util.*; import org.wso2.siddhi.core.event.stream.*;
[ "java.util", "org.wso2.siddhi" ]
java.util; org.wso2.siddhi;
2,111,177
protected Environment getEnvironment() { Assert.state(applicationContext != null, "ApplicationContext must be set before accessing getEnvironment()"); return applicationContext.getEnvironment(); }
Environment function() { Assert.state(applicationContext != null, STR); return applicationContext.getEnvironment(); }
/** * Return the {@link Environment} to access property sources during Spring Vault * bootstrapping. Requires {@link #setApplicationContext(ApplicationContext) * ApplicationContext} to be set. * * @return the {@link Environment} to access property sources during Spring Vault * bootstrapping. */
Return the <code>Environment</code> to access property sources during Spring Vault bootstrapping. Requires <code>#setApplicationContext(ApplicationContext) ApplicationContext</code> to be set
getEnvironment
{ "repo_name": "mp911de/spring-vault", "path": "spring-vault-core/src/main/java/org/springframework/vault/config/AbstractVaultConfiguration.java", "license": "apache-2.0", "size": 9679 }
[ "org.springframework.core.env.Environment", "org.springframework.util.Assert" ]
import org.springframework.core.env.Environment; import org.springframework.util.Assert;
import org.springframework.core.env.*; import org.springframework.util.*;
[ "org.springframework.core", "org.springframework.util" ]
org.springframework.core; org.springframework.util;
602,149
private void registerInstanceInterfaces0(final Object instance) { if (instance instanceof Lifecycle) { registerLifecycle0((Lifecycle) instance); } else { findAndRegisterLifeCycle(instance); } if (instance instanceof ServletContextAware) { registerServletContextAware0((ServletContextA...
void function(final Object instance) { if (instance instanceof Lifecycle) { registerLifecycle0((Lifecycle) instance); } else { findAndRegisterLifeCycle(instance); } if (instance instanceof ServletContextAware) { registerServletContextAware0((ServletContextAware) instance); } }
/** * Registers the {@code Lifecycle}, {@code Phased} and * {@code ServletContextAware} aspects of the specified instance. * * @param instance the object to examine, not null */
Registers the Lifecycle, Phased and ServletContextAware aspects of the specified instance
registerInstanceInterfaces0
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/ComponentRepository.java", "license": "apache-2.0", "size": 34442 }
[ "org.springframework.context.Lifecycle", "org.springframework.web.context.ServletContextAware" ]
import org.springframework.context.Lifecycle; import org.springframework.web.context.ServletContextAware;
import org.springframework.context.*; import org.springframework.web.context.*;
[ "org.springframework.context", "org.springframework.web" ]
org.springframework.context; org.springframework.web;
891,294
if (toUri().isAbsolute() && !isUriPathAbsolute()) { throw new HadoopIllegalArgumentException( "Unsupported name: has scheme but relative path-part"); } }
if (toUri().isAbsolute() && !isUriPathAbsolute()) { throw new HadoopIllegalArgumentException( STR); } }
/** * Test whether this Path uses a scheme and is relative. * Pathnames with scheme and relative path are illegal. */
Test whether this Path uses a scheme and is relative. Pathnames with scheme and relative path are illegal
checkNotSchemeWithRelative
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/Path.java", "license": "apache-2.0", "size": 18091 }
[ "org.apache.hadoop.HadoopIllegalArgumentException" ]
import org.apache.hadoop.HadoopIllegalArgumentException;
import org.apache.hadoop.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,951,580
@Override public void showNoiseInSector(String user, Point p) { mMainFrame.showNoiseInSector(user, p); }
void function(String user, Point p) { mMainFrame.showNoiseInSector(user, p); }
/** Show noise action on map * * @see it.polimi.ingsw.client.View#showNoiseInSector(java.lang.String, java.awt.Point) */
Show noise action on map
showNoiseInSector
{ "repo_name": "carpikes/ingsw1-eftaios", "path": "ingsw/src/main/java/it/polimi/ingsw/client/gui/GUIView.java", "license": "mit", "size": 12339 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
849,461
protected Size2D arrangeFR(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { Size2D s = arrangeFN(container, g2, constraint); if (constraint.getHeightRange().contains(s.height)) { return s; } else { Rect...
Size2D function(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { Size2D s = arrangeFN(container, g2, constraint); if (constraint.getHeightRange().contains(s.height)) { return s; } else { RectangleConstraint c = constraint.toFixedHeight( constraint.getHeightRange().constrain(s.getHeight()) ); r...
/** * Arranges the blocks in the container with a fixed width and a range * constraint on the height. * * @param container the container. * @param constraint the constraint. * @param g2 the graphics device. * * @return The size following the arrangement. */
Arranges the blocks in the container with a fixed width and a range constraint on the height
arrangeFR
{ "repo_name": "jfree/jfreechart", "path": "src/main/java/org/jfree/chart/block/FlowArrangement.java", "license": "lgpl-2.1", "size": 15441 }
[ "java.awt.Graphics2D" ]
import java.awt.Graphics2D;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,808,336
public Object clone() throws CloneNotSupportedException { NumberAxis clone = (NumberAxis) super.clone(); if (this.numberFormatOverride != null) { clone.numberFormatOverride = (NumberFormat) this.numberFormatOverride.clone(); } return clone; }
Object function() throws CloneNotSupportedException { NumberAxis clone = (NumberAxis) super.clone(); if (this.numberFormatOverride != null) { clone.numberFormatOverride = (NumberFormat) this.numberFormatOverride.clone(); } return clone; }
/** * Returns a clone of the axis. * * @return A clone * * @throws CloneNotSupportedException if some component of the axis does * not support cloning. */
Returns a clone of the axis
clone
{ "repo_name": "JSansalone/JFreeChart", "path": "source/org/jfree/chart/axis/NumberAxis.java", "license": "lgpl-2.1", "size": 55672 }
[ "java.text.NumberFormat" ]
import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,777,550
public interface GanttTask { public Serializable getId();
interface GanttTask { public Serializable function();
/** * Identifier, if needed by the implementation (such as task id). */
Identifier, if needed by the implementation (such as task id)
getId
{ "repo_name": "micromata/projectforge-webapp", "path": "src/main/java/org/projectforge/gantt/GanttTask.java", "license": "gpl-3.0", "size": 6191 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
119,764
public ChartValue[] getChartValues(ReportChart reportChart, Map parameters) throws ProviderException { Connection conn = null; PreparedStatement pStmt = null; ResultSet rs = null; try { ReportDataSource dataSource = reportChart.getDataSou...
ChartValue[] function(ReportChart reportChart, Map parameters) throws ProviderException { Connection conn = null; PreparedStatement pStmt = null; ResultSet rs = null; try { ReportDataSource dataSource = reportChart.getDataSource(); conn = dataSourceProvider.getConnection(dataSource.getId()); JRDesignQuery query = new J...
/** * Executes the Chart query and builds an array of ChartValues from the results. */
Executes the Chart query and builds an array of ChartValues from the results
getChartValues
{ "repo_name": "mtpettyp/openreports", "path": "src/main/java/org/efs/openreports/engine/ChartReportEngine.java", "license": "gpl-2.0", "size": 36713 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.text.SimpleDateFormat", "java.util.ArrayList", "java.util.Map", "net.sf.jasperreports.engine.design.JRDesignQuery", "net.sf.jasperreports.engine.util.JRQueryExecuter", "org.efs.openreports.objects.ReportChart", "org.e...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Map; import net.sf.jasperreports.engine.design.JRDesignQuery; import net.sf.jasperreports.engine.util.JRQueryExecuter; import org.efs.openreports.obje...
import java.sql.*; import java.text.*; import java.util.*; import net.sf.jasperreports.engine.design.*; import net.sf.jasperreports.engine.util.*; import org.efs.openreports.objects.*; import org.efs.openreports.objects.chart.*; import org.efs.openreports.providers.*; import org.efs.openreports.util.*;
[ "java.sql", "java.text", "java.util", "net.sf.jasperreports", "org.efs.openreports" ]
java.sql; java.text; java.util; net.sf.jasperreports; org.efs.openreports;
2,051,191
properties = new PropertiesLoader().getProperties(); }
properties = new PropertiesLoader().getProperties(); }
/** * Setup for testing the file System manager * this loads the properties file for getting * the correct path for different file systems */
Setup for testing the file System manager this loads the properties file for getting the correct path for different file systems
setUp
{ "repo_name": "nate-rcl/irplus", "path": "file_db_hibernate/test/edu/ur/hibernate/file/db/HbFileInfoChecksumDAOTest.java", "license": "apache-2.0", "size": 7308 }
[ "edu.ur.hibernate.file.test.helper.PropertiesLoader" ]
import edu.ur.hibernate.file.test.helper.PropertiesLoader;
import edu.ur.hibernate.file.test.helper.*;
[ "edu.ur.hibernate" ]
edu.ur.hibernate;
1,954,558
public void unzipFrom(InputStream _in) throws IOException, InterruptedException { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UnzipFrom(in)); } private class UnzipFrom extends SecureFileCallable<Void> { private final InputStream in; UnzipFrom(Input...
void function(InputStream _in) throws IOException, InterruptedException { final InputStream in = new RemoteInputStream(_in, Flag.GREEDY); act(new UnzipFrom(in)); } private class UnzipFrom extends SecureFileCallable<Void> { private final InputStream in; UnzipFrom(InputStream in) { this.in = in; }
/** * Reads the given InputStream as a zip file and extracts it into this directory. * * @param _in * The stream will be closed by this method after it's fully read. * @since 1.283 * @see #unzip(FilePath) */
Reads the given InputStream as a zip file and extracts it into this directory
unzipFrom
{ "repo_name": "batmat/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 132867 }
[ "hudson.remoting.RemoteInputStream", "java.io.IOException", "java.io.InputStream" ]
import hudson.remoting.RemoteInputStream; import java.io.IOException; import java.io.InputStream;
import hudson.remoting.*; import java.io.*;
[ "hudson.remoting", "java.io" ]
hudson.remoting; java.io;
558,581
protected void addRemoteSchemaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_TemporalCSRefType_remoteSchema_feature"), getString("_UI_Prope...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), GmlPackage.eINSTANCE.getTemporalCSRefType_RemoteSchema(), true, false, false, ItemPropertyDescrip...
/** * This adds a property descriptor for the Remote Schema feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Remote Schema feature.
addRemoteSchemaPropertyDescriptor
{ "repo_name": "markus1978/citygml4emf", "path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TemporalCSRefTypeItemProvider.java", "license": "apache-2.0", "size": 11918 }
[ "net.opengis.gml.GmlPackage", "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import net.opengis.gml.GmlPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import net.opengis.gml.*; import org.eclipse.emf.edit.provider.*;
[ "net.opengis.gml", "org.eclipse.emf" ]
net.opengis.gml; org.eclipse.emf;
1,207,807
@Override public boolean equals(Object other) { if (this == other) { return true; } if (other instanceof OverallBucket == false) { return false; } OverallBucket that = (OverallBucket) other; return Objects.equals(this.timestamp, that.tim...
boolean function(Object other) { if (this == other) { return true; } if (other instanceof OverallBucket == false) { return false; } OverallBucket that = (OverallBucket) other; return Objects.equals(this.timestamp, that.timestamp) && this.bucketSpan == that.bucketSpan && this.overallScore == that.overallScore && Objects...
/** * Compare all the fields and embedded anomaly records (if any) */
Compare all the fields and embedded anomaly records (if any)
equals
{ "repo_name": "gingerwizard/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/results/OverallBucket.java", "license": "apache-2.0", "size": 6486 }
[ "java.io.IOException", "java.util.Objects", "org.elasticsearch.common.ParseField", "org.elasticsearch.common.io.stream.StreamInput", "org.elasticsearch.common.io.stream.Writeable", "org.elasticsearch.common.xcontent.ToXContentObject" ]
import java.io.IOException; import java.util.Objects; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.Writeable; import org.elasticsearch.common.xcontent.ToXContentObject;
import java.io.*; import java.util.*; import org.elasticsearch.common.*; import org.elasticsearch.common.io.stream.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "java.util", "org.elasticsearch.common" ]
java.io; java.util; org.elasticsearch.common;
1,916,903
@Test public void testResolveFilterEntityValidEntityIdAdmin() { ApplicationContext adminContext = getAdminContext().getBuilder() .client(ClientType.Implicit) .authenticator(AuthenticatorType.Test) .bearerToken(Scope.APPLICATION) .build(); ...
void function() { ApplicationContext adminContext = getAdminContext().getBuilder() .client(ClientType.Implicit) .authenticator(AuthenticatorType.Test) .bearerToken(Scope.APPLICATION) .build(); Mockito.doReturn(adminContext.getToken()) .when(mockContext).getUserPrincipal(); Mockito.doReturn(true).when(mockContext) .isUs...
/** * Assert that passing a valid entity ID as an admin, we get the entity. */
Assert that passing a valid entity ID as an admin, we get the entity
testResolveFilterEntityValidEntityIdAdmin
{ "repo_name": "kangaroo-server/kangaroo", "path": "kangaroo-server-authz/src/test/java/net/krotscheck/kangaroo/authz/admin/v1/resource/AbstractServiceTest.java", "license": "apache-2.0", "size": 26802 }
[ "net.krotscheck.kangaroo.authz.admin.Scope", "net.krotscheck.kangaroo.authz.common.authenticator.AuthenticatorType", "net.krotscheck.kangaroo.authz.common.database.entity.Application", "net.krotscheck.kangaroo.authz.common.database.entity.ClientType", "net.krotscheck.kangaroo.authz.test.ApplicationBuilder",...
import net.krotscheck.kangaroo.authz.admin.Scope; import net.krotscheck.kangaroo.authz.common.authenticator.AuthenticatorType; import net.krotscheck.kangaroo.authz.common.database.entity.Application; import net.krotscheck.kangaroo.authz.common.database.entity.ClientType; import net.krotscheck.kangaroo.authz.test.Applic...
import net.krotscheck.kangaroo.authz.admin.*; import net.krotscheck.kangaroo.authz.common.authenticator.*; import net.krotscheck.kangaroo.authz.common.database.entity.*; import net.krotscheck.kangaroo.authz.test.*; import org.junit.*; import org.mockito.*;
[ "net.krotscheck.kangaroo", "org.junit", "org.mockito" ]
net.krotscheck.kangaroo; org.junit; org.mockito;
583,374
void setProperty(String relPath, Value value) throws RepositoryException;
void setProperty(String relPath, Value value) throws RepositoryException;
/** * Set an arbitrary property to this <code>Authorizable</code>. * * @param relPath The relative path of the property to be added or modified. * @param value The desired value. * @throws RepositoryException If the specified property could not be set. */
Set an arbitrary property to this <code>Authorizable</code>
setProperty
{ "repo_name": "SylvesterAbreu/jackrabbit", "path": "jackrabbit-api/src/main/java/org/apache/jackrabbit/api/security/user/Authorizable.java", "license": "apache-2.0", "size": 8062 }
[ "javax.jcr.RepositoryException", "javax.jcr.Value" ]
import javax.jcr.RepositoryException; import javax.jcr.Value;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
1,769,798
public void putBytesReverse(ChannelBuffer buffer) { byte[] bytes = new byte[buffer.readableBytes()]; buffer.markReaderIndex(); try { buffer.readBytes(bytes); } finally { buffer.resetReaderIndex(); } putBytesReverse(bytes); }
void function(ChannelBuffer buffer) { byte[] bytes = new byte[buffer.readableBytes()]; buffer.markReaderIndex(); try { buffer.readBytes(bytes); } finally { buffer.resetReaderIndex(); } putBytesReverse(bytes); }
/** * Puts the bytes from the specified buffer into this packet's buffer, in * reverse. * @param buffer The source {@link ChannelBuffer}. * @throws IllegalStateException if the builder is not in byte access mode. */
Puts the bytes from the specified buffer into this packet's buffer, in reverse
putBytesReverse
{ "repo_name": "AWildridge/ProtoScape", "path": "src/org/apollo/net/codec/game/GamePacketBuilder.java", "license": "isc", "size": 13601 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
465,355
private void checkModify( ModifyOperationContext modifyContext ) throws LdapException { List<Modification> mods = modifyContext.getModItems(); Entry originalEntry = modifyContext.getEntry(); Entry targetEntry = SchemaUtils.getTargetEntry( mods, originalEntry ); // If the modifie...
void function( ModifyOperationContext modifyContext ) throws LdapException { List<Modification> mods = modifyContext.getModItems(); Entry originalEntry = modifyContext.getEntry(); Entry targetEntry = SchemaUtils.getTargetEntry( mods, originalEntry ); if ( targetEntry.contains( OBJECT_CLASS_AT, SchemaConstants.COLLECTIV...
/** * Check that we can modify an entry */
Check that we can modify an entry
checkModify
{ "repo_name": "drankye/directory-server", "path": "interceptors/collective/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.java", "license": "apache-2.0", "size": 17431 }
[ "java.util.List", "org.apache.directory.api.ldap.model.constants.SchemaConstants", "org.apache.directory.api.ldap.model.entry.Entry", "org.apache.directory.api.ldap.model.entry.Modification", "org.apache.directory.api.ldap.model.exception.LdapException", "org.apache.directory.api.ldap.model.exception.Ldap...
import java.util.List; import org.apache.directory.api.ldap.model.constants.SchemaConstants; import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.entry.Modification; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.mod...
import java.util.*; import org.apache.directory.api.ldap.model.constants.*; import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.ldap.model.schema.*; import org.apache.directory.s...
[ "java.util", "org.apache.directory" ]
java.util; org.apache.directory;
1,892,700
@Override public TestEnvironment createTestEnvironment( TestParameters tParam, PrintWriter log ) throws StatusException { XInterface oObj = null; // creation of testobject here // firs...
TestEnvironment function( TestParameters tParam, PrintWriter log ) throws StatusException { XInterface oObj = null; log.println( STR ); try { XTextFieldsSupplier oTFS = UnoRuntime.queryInterface( XTextFieldsSupplier.class, xTextDoc ); oObj = oTFS.getTextFields(); } catch (Exception ex) { log.println(STR); ex.printStack...
/** * creating a Testenvironment for the interfaces to be tested * * @param tParam class which contains additional test parameters * @param log class to log the test state and result * * @return Status class * * @see TestParameters * @see PrintWriter ...
creating a Testenvironment for the interfaces to be tested
createTestEnvironment
{ "repo_name": "Limezero/libreoffice", "path": "qadevOOo/tests/java/mod/_sw/SwXTextFieldTypes.java", "license": "gpl-3.0", "size": 4038 }
[ "com.sun.star.text.XTextFieldsSupplier", "com.sun.star.uno.UnoRuntime", "com.sun.star.uno.XInterface", "java.io.PrintWriter" ]
import com.sun.star.text.XTextFieldsSupplier; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import java.io.PrintWriter;
import com.sun.star.text.*; import com.sun.star.uno.*; import java.io.*;
[ "com.sun.star", "java.io" ]
com.sun.star; java.io;
2,458,438
@Test public final void whenSubtractOneMinusOneThenZero() { Calculator calc = new Calculator(); calc.subtract(1D, 1D); double result = calc.getResult(); double expected = 0D; assertThat(result, is(expected)); }
final void function() { Calculator calc = new Calculator(); calc.subtract(1D, 1D); double result = calc.getResult(); double expected = 0D; assertThat(result, is(expected)); }
/** * Test subtract. */
Test subtract
whenSubtractOneMinusOneThenZero
{ "repo_name": "ephemeralin/java-training", "path": "chapter_001/src/test/java/ru/job4j/calculator/CalculatorTest.java", "license": "apache-2.0", "size": 1460 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
1,734,413
public static java.util.List extractConvIdList(ims.domain.ILightweightDomainFactory domainFactory, ims.chooseandbook.vo.ConvIdVoCollection voCollection) { return extractConvIdList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.chooseandbook.vo.ConvIdVoCollection voCollection) { return extractConvIdList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.choose_book.domain.objects.ConvId list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.choose_book.domain.objects.ConvId list from the value object collection
extractConvIdList
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/chooseandbook/vo/domain/ConvIdVoAssembler.java", "license": "agpl-3.0", "size": 16427 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
968,122
Immutable<E> with(E value); /** * Retrieves the underlying value for this {@link Immutable} and * applies the given {@link Function} onto that value, after which, the * product is sent to a new {@link Immutable} replacing this one. * * <p>If the {@link Value...
Immutable<E> with(E value); /** * Retrieves the underlying value for this {@link Immutable} and * applies the given {@link Function} onto that value, after which, the * product is sent to a new {@link Immutable} replacing this one. * * <p>If the {@link ValueContainer} too is immutable, a new instance of * the {@link Va...
/** * Creates a new {@link Immutable} with the given <code>E</code> typed * value, such that if the owning {@link ValueContainer} is immutable, the * {@link ValueContainer} too is recreated as a new instance with the new * {@link Immutable}. * * @param value The val...
Creates a new <code>Immutable</code> with the given <code>E</code> typed value, such that if the owning <code>ValueContainer</code> is immutable, the <code>ValueContainer</code> too is recreated as a new instance with the new <code>Immutable</code>
with
{ "repo_name": "SpongePowered/SpongeAPI", "path": "src/main/java/org/spongepowered/api/data/value/Value.java", "license": "mit", "size": 19967 }
[ "java.util.function.Function" ]
import java.util.function.Function;
import java.util.function.*;
[ "java.util" ]
java.util;
1,511,086
public void checkSpider(ArrayList<String> argList) throws ParseException{ Boolean hasOption; hasOption = OptionFinder.hasLongOption(argList, "--spider", "wget: option doesn't require an argument '--spider'"); if (hasOption) params.put("Spider", "true"); else params.put("Spider", "false"); }
void function(ArrayList<String> argList) throws ParseException{ Boolean hasOption; hasOption = OptionFinder.hasLongOption(argList, STR, STR); if (hasOption) params.put(STR, "true"); else params.put(STR, "false"); }
/** * Finds Boolean option, removes it from list * @param argList * @throws ParseException */
Finds Boolean option, removes it from list
checkSpider
{ "repo_name": "xapharius/wget-java", "path": "src/parser/ArgParser.java", "license": "mit", "size": 4533 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,376,334
public static <T> int binaryCount(List<? extends T> objects, T needle, Comparator<? super T> comparator) { int needleIndex = binarySearch(objects, needle, comparator); if (needleIndex < 0) { return 0; } int leftIndex = -1; int rightIndex = -1; int lo = n...
static <T> int function(List<? extends T> objects, T needle, Comparator<? super T> comparator) { int needleIndex = binarySearch(objects, needle, comparator); if (needleIndex < 0) { return 0; } int leftIndex = -1; int rightIndex = -1; int lo = needleIndex + 1; int hi = needleIndex; int temp; do { temp = binarySearch(obj...
/** * Counts the number of occurrences of the needle in the given sorted list. * * @param objects Sorted objects list. * @param needle Needle. * @param comparator Comparator. * @param <T> Type. * @return Number of occurrences of the needle in the given sorted list. */
Counts the number of occurrences of the needle in the given sorted list
binaryCount
{ "repo_name": "nobullet/library", "path": "src/main/java/com/nobullet/algo/Searches.java", "license": "mit", "size": 5480 }
[ "java.util.Comparator", "java.util.List" ]
import java.util.Comparator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
684,519
public static List<DSSDocument> getPackageZipContent(DSSDocument packageZip) { List<DSSDocument> result = new ArrayList<>(); long containerSize = DSSUtils.getFileByteSize(packageZip); try (InputStream is = packageZip.openStream(); ZipInputStream packageZipInputStream = new ZipInputStream(is)) { ZipEntry ent...
static List<DSSDocument> function(DSSDocument packageZip) { List<DSSDocument> result = new ArrayList<>(); long containerSize = DSSUtils.getFileByteSize(packageZip); try (InputStream is = packageZip.openStream(); ZipInputStream packageZipInputStream = new ZipInputStream(is)) { ZipEntry entry; while ((entry = ASiCUtils.g...
/** * Returns a content of the packageZip container * @param packageZip {@link DSSDocument} ZIP container to get entries from * @return list of {@link DSSDocument}s */
Returns a content of the packageZip container
getPackageZipContent
{ "repo_name": "openlimit-signcubes/dss", "path": "dss-asic-common/src/main/java/eu/europa/esig/dss/asic/common/ASiCUtils.java", "license": "lgpl-2.1", "size": 17035 }
[ "eu.europa.esig.dss.model.DSSDocument", "eu.europa.esig.dss.model.DSSException", "eu.europa.esig.dss.spi.DSSUtils", "java.io.IOException", "java.io.InputStream", "java.util.ArrayList", "java.util.List", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream" ]
import eu.europa.esig.dss.model.DSSDocument; import eu.europa.esig.dss.model.DSSException; import eu.europa.esig.dss.spi.DSSUtils; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream;
import eu.europa.esig.dss.model.*; import eu.europa.esig.dss.spi.*; import java.io.*; import java.util.*; import java.util.zip.*;
[ "eu.europa.esig", "java.io", "java.util" ]
eu.europa.esig; java.io; java.util;
2,740,592
Collection<Study> findByAuthor(String pAuthorName);
Collection<Study> findByAuthor(String pAuthorName);
/** * Find studies whose authors match the specified text * @param pAuthorName * @return a collection of matching studies * @author mjd */
Find studies whose authors match the specified text
findByAuthor
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-core/src/main/java/org/cipres/treebase/domain/study/StudyService.java", "license": "bsd-3-clause", "size": 5326 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,355,568
public Iterator<E> iterator() { return m.navigableKeySet().iterator(); }
Iterator<E> function() { return m.navigableKeySet().iterator(); }
/** * Returns an iterator over the elements in this set in ascending order. * * @return an iterator over the elements in this set in ascending order */
Returns an iterator over the elements in this set in ascending order
iterator
{ "repo_name": "evanman/Java-Source", "path": "util/concurrent/ConcurrentSkipListSet.java", "license": "lgpl-2.1", "size": 19356 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,256,382
public static List<Map<String, Object>> retrieveUserConnectionsForLayer(final int year, final int month) throws IllegalArgumentException, OGCServStatisticsException { RetrieveUserConnectionForLayerCommand cmd = new RetrieveUserConnectionForLayerCommand(); return execute(cmd, year, month); }
static List<Map<String, Object>> function(final int year, final int month) throws IllegalArgumentException, OGCServStatisticsException { RetrieveUserConnectionForLayerCommand cmd = new RetrieveUserConnectionForLayerCommand(); return execute(cmd, year, month); }
/** * For each layer : list of users and number of connections * <pre> * * key: user * value: aUser * * key: layer * value: aLayer * * key: connections * value: aLong Value * </pre> * * @param year * @param month * * * @return List of pairs (fieldName, fieldValue) * * @th...
For each layer : list of users and number of connections <code> key: user value: aUser key: layer value: aLayer key: connections value: aLong Value </code>
retrieveUserConnectionsForLayer
{ "repo_name": "jusabatier/georchestra", "path": "ogc-server-statistics/src/main/java/org/georchestra/ogcservstatistics/calculations/OGCServiceStatistics.java", "license": "gpl-3.0", "size": 10603 }
[ "java.util.List", "java.util.Map", "org.georchestra.ogcservstatistics.OGCServStatisticsException", "org.georchestra.ogcservstatistics.dataservices.RetrieveUserConnectionForLayerCommand" ]
import java.util.List; import java.util.Map; import org.georchestra.ogcservstatistics.OGCServStatisticsException; import org.georchestra.ogcservstatistics.dataservices.RetrieveUserConnectionForLayerCommand;
import java.util.*; import org.georchestra.ogcservstatistics.*; import org.georchestra.ogcservstatistics.dataservices.*;
[ "java.util", "org.georchestra.ogcservstatistics" ]
java.util; org.georchestra.ogcservstatistics;
2,094,793
public void testBug116459() throws CoreException { workingCopies = new IJavaScriptUnit[1]; workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/p1/X.js", "package p1;\n" + "class X<T> {\n" + " X<T> gen;\n" + " X<String> param;\n" + " X raw;\n" + "}" ); IType type = workingCopies[0].getType("X"); ...
void function() throws CoreException { workingCopies = new IJavaScriptUnit[1]; workingCopies[0] = getWorkingCopy(STR, STR + STR + STR + STR + STR + "}" ); IType type = workingCopies[0].getType("X"); this.resultCollector.showRule = true; search(type, REFERENCES, ERASURE_RULE); assertSearchResults( STR + STR + STR ); }
/** * Bug 116459: [search] correct results are missing in java search * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=116459" */
Bug 116459: [search] correct results are missing in java search
testBug116459
{ "repo_name": "echoes-tech/eclipse.jsdt.core", "path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java", "license": "epl-1.0", "size": 284245 }
[ "org.eclipse.core.runtime.CoreException", "org.eclipse.wst.jsdt.core.IJavaScriptUnit", "org.eclipse.wst.jsdt.core.IType" ]
import org.eclipse.core.runtime.CoreException; import org.eclipse.wst.jsdt.core.IJavaScriptUnit; import org.eclipse.wst.jsdt.core.IType;
import org.eclipse.core.runtime.*; import org.eclipse.wst.jsdt.core.*;
[ "org.eclipse.core", "org.eclipse.wst" ]
org.eclipse.core; org.eclipse.wst;
1,633,425
public static final String NX_NAME = "name"; public static final String NX_NAME_ATTRIBUTE_SHORT_NAME = "short_name"; public IDataset getName();
static final String NX_NAME = "name"; public static final String NX_NAME_ATTRIBUTE_SHORT_NAME = STR; public IDataset function();
/** * Name of instrument * * @return the value. */
Name of instrument
getName
{ "repo_name": "jamesmudd/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXinstrument.java", "license": "epl-1.0", "size": 30156 }
[ "org.eclipse.january.dataset.IDataset" ]
import org.eclipse.january.dataset.IDataset;
import org.eclipse.january.dataset.*;
[ "org.eclipse.january" ]
org.eclipse.january;
2,616,670
@Override public Void visitTypeClassLinkSegment(final TypeClassLinkSegment segment, final VisitationArg arg) { buffer.append(getScopedEntityReferenceName(segment.getReference())); return super.visitTypeClassLinkSegment(segment, arg); }
Void function(final TypeClassLinkSegment segment, final VisitationArg arg) { buffer.append(getScopedEntityReferenceName(segment.getReference())); return super.visitTypeClassLinkSegment(segment, arg); }
/** * Generates text for the given inline type class cross-reference. * @param segment the segment to be traversed. * @param arg additional argument for the traversal. * @return null. */
Generates text for the given inline type class cross-reference
visitTypeClassLinkSegment
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Platform/src/org/openquark/cal/caldoc/CALDocToTextUtilities.java", "license": "bsd-3-clause", "size": 40030 }
[ "org.openquark.cal.compiler.CALDocComment" ]
import org.openquark.cal.compiler.CALDocComment;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
1,187,776
EClass getColorActor();
EClass getColorActor();
/** * Returns the meta object for class '{@link org.openhab.binding.tinkerforge.internal.model.ColorActor <em>Color Actor</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Color Actor</em>'. * @see org.openhab.binding.tinkerforge.internal.model.ColorActor ...
Returns the meta object for class '<code>org.openhab.binding.tinkerforge.internal.model.ColorActor Color Actor</code>'.
getColorActor
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java", "license": "epl-1.0", "size": 665067 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
63,933
protected DB createDatabase(MongoClient mongo) { final DB db = getDB(); if (db != null) { return db; } final String databaseName = getDatabaseName(); // store in variable to protect against change by subclass ArgumentChecker.notNull(databaseName, "databaseName"); return mongo.getDB(data...
DB function(MongoClient mongo) { final DB db = getDB(); if (db != null) { return db; } final String databaseName = getDatabaseName(); ArgumentChecker.notNull(databaseName, STR); return mongo.getDB(databaseName); }
/** * Creates the database. * * @param mongo the Mongo instance, not null * @return the database, may be null */
Creates the database
createDatabase
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Util/src/main/java/com/opengamma/util/mongo/MongoConnectorFactoryBean.java", "license": "apache-2.0", "size": 4378 }
[ "com.mongodb.MongoClient", "com.opengamma.util.ArgumentChecker" ]
import com.mongodb.MongoClient; import com.opengamma.util.ArgumentChecker;
import com.mongodb.*; import com.opengamma.util.*;
[ "com.mongodb", "com.opengamma.util" ]
com.mongodb; com.opengamma.util;
2,655,012
MockitoAnnotations.initMocks(this); // Mock some Data mockData = new DataResource(); mockData.dataType = new TextDataType(); }
MockitoAnnotations.initMocks(this); mockData = new DataResource(); mockData.dataType = new TextDataType(); }
/** * Test setup */
Test setup
setup
{ "repo_name": "venicegeo/pz-ingest", "path": "src/test/java/ingest/test/InspectorTests.java", "license": "apache-2.0", "size": 2071 }
[ "org.mockito.MockitoAnnotations" ]
import org.mockito.MockitoAnnotations;
import org.mockito.*;
[ "org.mockito" ]
org.mockito;
2,660,333
EAttribute getSPrototyper_TargetURI();
EAttribute getSPrototyper_TargetURI();
/** * Returns the meta object for the attribute '{@link fr.obeo.dsl.sPrototyper.SPrototyper#getTargetURI <em>Target URI</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Target URI</em>'. * @see fr.obeo.dsl.sPrototyper.SPrototyper#getTargetURI() ...
Returns the meta object for the attribute '<code>fr.obeo.dsl.sPrototyper.SPrototyper#getTargetURI Target URI</code>'.
getSPrototyper_TargetURI
{ "repo_name": "glefur/s-prototyper", "path": "plugins/fr.obeo.dsl.sprototyper/src-gen/fr/obeo/dsl/sPrototyper/SPrototyperPackage.java", "license": "apache-2.0", "size": 98928 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,402,516
public TopicConnectionFactory getTopicConnectionFactory(String topicConnFactoryName) throws ServiceLocatorException { TopicConnectionFactory factory = null; try { factory = (TopicConnectionFactory) ic.lookup(topicConnFactoryName); } catch (NamingException ne) { throw new ServiceLocatorException(ne);...
TopicConnectionFactory function(String topicConnFactoryName) throws ServiceLocatorException { TopicConnectionFactory factory = null; try { factory = (TopicConnectionFactory) ic.lookup(topicConnFactoryName); } catch (NamingException ne) { throw new ServiceLocatorException(ne); } catch (Exception e) { throw new ServiceLo...
/** * This method helps in obtaining the topic factory * * @return the factory for the factory to get topic connections from */
This method helps in obtaining the topic factory
getTopicConnectionFactory
{ "repo_name": "banq/jdonframework", "path": "JdonAccessory/jdon-struts1x/src/main/java/com/jdon/servicelocator/ejb/ServiceLocator.java", "license": "apache-2.0", "size": 6374 }
[ "com.jdon.servicelocator.ServiceLocatorException", "javax.jms.TopicConnectionFactory", "javax.naming.NamingException" ]
import com.jdon.servicelocator.ServiceLocatorException; import javax.jms.TopicConnectionFactory; import javax.naming.NamingException;
import com.jdon.servicelocator.*; import javax.jms.*; import javax.naming.*;
[ "com.jdon.servicelocator", "javax.jms", "javax.naming" ]
com.jdon.servicelocator; javax.jms; javax.naming;
1,115,622
void onEnd() throws IOException;
void onEnd() throws IOException;
/** * Receive notification of parsing end. * * @throws IOException if the parsing operation cannot end */
Receive notification of parsing end
onEnd
{ "repo_name": "dulvac/sling", "path": "bundles/scripting/sightly/engine/src/main/java/org/apache/sling/scripting/sightly/impl/html/dom/DocumentHandler.java", "license": "apache-2.0", "size": 2572 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,026,850