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
@VisibleForTesting static ShardedTargetList shardSingleTargets( List<TargetExpression> targets, BuildBinaryType buildType, int shardSize) { return BuildBatchingService.batchTargets( canonicalizeSingleTargets(targets), buildType, shardSize); }
static ShardedTargetList shardSingleTargets( List<TargetExpression> targets, BuildBinaryType buildType, int shardSize) { return BuildBatchingService.batchTargets( canonicalizeSingleTargets(targets), buildType, shardSize); }
/** * Shards a list of individual blaze targets (with no wildcard expressions other than for excluded * target patterns). */
Shards a list of individual blaze targets (with no wildcard expressions other than for excluded target patterns)
shardSingleTargets
{ "repo_name": "bazelbuild/intellij", "path": "base/src/com/google/idea/blaze/base/sync/sharding/BlazeBuildTargetSharder.java", "license": "apache-2.0", "size": 12937 }
[ "com.google.idea.blaze.base.model.primitives.TargetExpression", "com.google.idea.blaze.base.settings.BuildBinaryType", "java.util.List" ]
import com.google.idea.blaze.base.model.primitives.TargetExpression; import com.google.idea.blaze.base.settings.BuildBinaryType; import java.util.List;
import com.google.idea.blaze.base.model.primitives.*; import com.google.idea.blaze.base.settings.*; import java.util.*;
[ "com.google.idea", "java.util" ]
com.google.idea; java.util;
2,252,776
@SuppressWarnings({ "rawtypes", "unchecked" }) protected void internalSubscribe(String name, String consumerGroup, Consumer<Message<?>> consumer, Consumer<Throwable> errorHandler, ...
@SuppressWarnings({ STR, STR }) void function(String name, String consumerGroup, Consumer<Message<?>> consumer, Consumer<Throwable> errorHandler, Class<?> payloadType) {
/** * Register a message handler to receive message from the topic. A session handler will be registered if session is * enabled. * * @param name The topic name. * @param consumerGroup The consumer group. * @param consumer The consumer method. * @param errorHandler The error handler m...
Register a message handler to receive message from the topic. A session handler will be registered if session is enabled
internalSubscribe
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/spring/azure-spring-integration-servicebus/src/main/java/com/azure/spring/integration/servicebus/topic/ServiceBusTopicTemplate.java", "license": "mit", "size": 7071 }
[ "java.util.function.Consumer", "org.springframework.messaging.Message" ]
import java.util.function.Consumer; import org.springframework.messaging.Message;
import java.util.function.*; import org.springframework.messaging.*;
[ "java.util", "org.springframework.messaging" ]
java.util; org.springframework.messaging;
2,027,985
public static Object readObject(XStream xStream, VFSLeaf file) { InputStream fis = null; BufferedInputStream bis = null; try { fis = file.getInputStream(); bis = new BufferedInputStream(fis); return readObject(xStream, bis); } catch (Exception e) { throw new OLATRuntimeException(XStreamHelper.cla...
static Object function(XStream xStream, VFSLeaf file) { InputStream fis = null; BufferedInputStream bis = null; try { fis = file.getInputStream(); bis = new BufferedInputStream(fis); return readObject(xStream, bis); } catch (Exception e) { throw new OLATRuntimeException(XStreamHelper.class, STR + file.getName(), e); } ...
/** * Read an object from the given leaf using the xStream object. It is * usefull to add field and attribute mappers to the stream. * * @param xStream * The (configured) xStream. * @param file * @return */
Read an object from the given leaf using the xStream object. It is usefull to add field and attribute mappers to the stream
readObject
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/main/java/org/olat/core/util/xml/XStreamHelper.java", "license": "apache-2.0", "size": 12123 }
[ "com.thoughtworks.xstream.XStream", "java.io.BufferedInputStream", "java.io.InputStream", "org.olat.core.logging.OLATRuntimeException", "org.olat.core.util.vfs.VFSLeaf" ]
import com.thoughtworks.xstream.XStream; import java.io.BufferedInputStream; import java.io.InputStream; import org.olat.core.logging.OLATRuntimeException; import org.olat.core.util.vfs.VFSLeaf;
import com.thoughtworks.xstream.*; import java.io.*; import org.olat.core.logging.*; import org.olat.core.util.vfs.*;
[ "com.thoughtworks.xstream", "java.io", "org.olat.core" ]
com.thoughtworks.xstream; java.io; org.olat.core;
1,262,880
protected HashMap<String, Object> getNodeProperties() { HashMap<String, Object> rez = new HashMap<String, Object>(); rez.put("name", getName()); rez.put("description", getDescription()); rez.put("primColor", getPrimColor()); rez.put("secColor", getSecColor()); rez.put("paint", getPaint()); rez.put("st...
HashMap<String, Object> function() { HashMap<String, Object> rez = new HashMap<String, Object>(); rez.put("name", getName()); rez.put(STR, getDescription()); rez.put(STR, getPrimColor()); rez.put(STR, getSecColor()); rez.put("paint", getPaint()); rez.put(STR, getStrokeColor()); rez.put(STR, getStrokePaint()); rez.put(S...
/** * Koristi se kao pomocna metoda koju ce korisiti svaka naslednica ove klase * da bi napisala svoje metode <code>getProperties</code>. Ovde se konkterno * realizuje smestanje u HashMap-u atributa poznatih na ovom nivou. * * @return HashMap-u sa parametrima o Nodu koji su poznati na ovom nivou */
Koristi se kao pomocna metoda koju ce korisiti svaka naslednica ove klase da bi napisala svoje metode <code>getProperties</code>. Ovde se konkterno realizuje smestanje u HashMap-u atributa poznatih na ovom nivou
getNodeProperties
{ "repo_name": "delicb/Germ", "path": "germ/model/Node.java", "license": "apache-2.0", "size": 6532 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,851,563
private static void loadResource(String name, Texture texture) { textures.put(name, texture); }
static void function(String name, Texture texture) { textures.put(name, texture); }
/** * Carga un recurso en memoria * @param name * @param texture */
Carga un recurso en memoria
loadResource
{ "repo_name": "sfaci/libgdx", "path": "bombermanx/bombermanx/bombermanx/src/org/sfaci/bombermanx/managers/ResourceManager.java", "license": "gpl-2.0", "size": 1787 }
[ "com.badlogic.gdx.graphics.Texture" ]
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
2,270,434
public void setPrefixMap(Map<String,String> prefixMap) { this.prefixMap = prefixMap; }
void function(Map<String,String> prefixMap) { this.prefixMap = prefixMap; }
/** * Sets the prefix map. * * @param prefixMap the prefix map */
Sets the prefix map
setPrefixMap
{ "repo_name": "pipseq/semantic", "path": "src/main/org/pipseq/rdf/jena/cfg/NSPrefixManager.java", "license": "mit", "size": 4084 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,571,081
Path getTmpDir() { return new Path(getRegionDir(), REGION_TEMP_SUBDIR); }
Path getTmpDir() { return new Path(getRegionDir(), REGION_TEMP_SUBDIR); }
/** * Get the temporary directory for this region. This directory * will have its contents removed when the region is reopened. */
Get the temporary directory for this region. This directory will have its contents removed when the region is reopened
getTmpDir
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java", "license": "apache-2.0", "size": 199172 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,119,854
public ImportDropConfig importDrop(Repository repository, Long dropId, ImportDropConfig.Status status) { ImportDropConfig importDropConfig = new ImportDropConfig(); importDropConfig.setRepositoryId(repository.getId()); importDropConfig.setDropId(dropId); importDropConfig.setStatus(s...
ImportDropConfig function(Repository repository, Long dropId, ImportDropConfig.Status status) { ImportDropConfig importDropConfig = new ImportDropConfig(); importDropConfig.setRepositoryId(repository.getId()); importDropConfig.setDropId(dropId); importDropConfig.setStatus(status); String importPath = UriComponentsBuild...
/** * Imports a drop for a given {@link Repository} and Drop * * @param repository the repository the drop will be imported into * @param dropId the drop ID to be imported * @param status (optional) specific status to use when importing * translation * @return {@link ImportDropConfig}...
Imports a drop for a given <code>Repository</code> and Drop
importDrop
{ "repo_name": "box/mojito", "path": "restclient/src/main/java/com/box/l10n/mojito/rest/client/DropClient.java", "license": "apache-2.0", "size": 5909 }
[ "com.box.l10n.mojito.rest.entity.ImportDropConfig", "com.box.l10n.mojito.rest.entity.Repository", "org.springframework.web.util.UriComponentsBuilder" ]
import com.box.l10n.mojito.rest.entity.ImportDropConfig; import com.box.l10n.mojito.rest.entity.Repository; import org.springframework.web.util.UriComponentsBuilder;
import com.box.l10n.mojito.rest.entity.*; import org.springframework.web.util.*;
[ "com.box.l10n", "org.springframework.web" ]
com.box.l10n; org.springframework.web;
507,167
private void displayImagePicker () { FileChooser chooser = new FileChooser(); chooser.setTitle("Select image"); chooser.getExtensionFilters().addAll(new ExtensionFilter("Images Files", "*.png", "*.jpg", ".gif")); File s...
void function () { FileChooser chooser = new FileChooser(); chooser.setTitle(STR); chooser.getExtensionFilters().addAll(new ExtensionFilter(STR, "*.png", "*.jpg", ".gif")); File selectedFile = chooser.showOpenDialog(myStage); turtleImage.setValue(new Image(IMAGE_PATH + selectedFile.getName())); }
/** * displays a file chooser that allows user to select desired image for turtle */
displays a file chooser that allows user to select desired image for turtle
displayImagePicker
{ "repo_name": "brandonnchoii/SLogo", "path": "src/userInterface/TopMenu.java", "license": "mit", "size": 9903 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
468,441
public InnerClassAccess getInnerClassAccess(String className, String methodName) throws ClassNotFoundException { Map<String, InnerClassAccess> map = getAccessMapForClass(className); return map.get(methodName); }
InnerClassAccess function(String className, String methodName) throws ClassNotFoundException { Map<String, InnerClassAccess> map = getAccessMapForClass(className); return map.get(methodName); }
/** * Get the InnerClassAccess in given class with the given method name. * * @param className the name of the class * @param methodName the name of the access method * @return the InnerClassAccess object for the method, or null if * the method doesn't seem to be an inner class access */
Get the InnerClassAccess in given class with the given method name
getInnerClassAccess
{ "repo_name": "optivo-org/fingbugs-1.3.9-optivo", "path": "src/java/edu/umd/cs/findbugs/ba/InnerClassAccessMap.java", "license": "lgpl-2.1", "size": 11781 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,082,107
public synchronized void addChangeListener(ChangeListener listener) { changeListenerList.add(listener); }
synchronized void function(ChangeListener listener) { changeListenerList.add(listener); }
/** * Registers ChangeListener to receive events. * @param listener The listener to register. */
Registers ChangeListener to receive events
addChangeListener
{ "repo_name": "IcmVis/VisNow-Pro", "path": "src/pl/edu/icm/visnow/lib/basic/viewers/FieldViewer3D/Geometry/ReadPAC/ReadPACGUI.java", "license": "gpl-3.0", "size": 9436 }
[ "javax.swing.event.ChangeListener" ]
import javax.swing.event.ChangeListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,460,348
public Timestamp getUpdated(); public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR;
/** Get Updated. * Date this record was updated */
Get Updated. Date this record was updated
getUpdated
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_C_TaxPostal.java", "license": "gpl-2.0", "size": 4596 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,890,310
public void setProvider5(ComponentInfo provider5) { this._provider5 = provider5; }
void function(ComponentInfo provider5) { this._provider5 = provider5; }
/** * Sets the fifth provider to use. * @param provider5 the new value of the property */
Sets the fifth provider to use
setProvider5
{ "repo_name": "McLeodMoores/starling", "path": "projects/component/src/main/java/com/opengamma/component/factory/provider/DelegatingHistoricalTimeSeriesProviderComponentFactory.java", "license": "apache-2.0", "size": 22097 }
[ "com.opengamma.component.ComponentInfo" ]
import com.opengamma.component.ComponentInfo;
import com.opengamma.component.*;
[ "com.opengamma.component" ]
com.opengamma.component;
188,723
public void addDetailTags(HashMap<String, String> detailTags) { this.detailTags.putAll(detailTags); }
void function(HashMap<String, String> detailTags) { this.detailTags.putAll(detailTags); }
/** * Copies the detailTags from anther {@link StoryEntry} to this one. Doesn't replace the URL. * @param detailTags A HashMap of story detail tags. */
Copies the detailTags from anther <code>StoryEntry</code> to this one. Doesn't replace the URL
addDetailTags
{ "repo_name": "bkromhout/FictionDL", "path": "FictionDL/src/main/java/bkromhout/fdl/parsing/StoryEntry.java", "license": "mit", "size": 2147 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,249,257
@Override public DataType getDataType() { switch (variable.getDataType()) { case STRING: return DataType.STRING; case CHAR: return DataType.CHAR; case BYTE: return DataType.BYTE; case UBYTE: return DataType.UBYTE; case SHORT: return DataT...
DataType function() { switch (variable.getDataType()) { case STRING: return DataType.STRING; case CHAR: return DataType.CHAR; case BYTE: return DataType.BYTE; case UBYTE: return DataType.UBYTE; case SHORT: return DataType.SHORT; case USHORT: return DataType.USHORT; case INT: return DataType.INT; case UINT: return DataT...
/** * Returns the variable data type. * This method may return {@code UNKNOWN} if the datatype is unknown. * * @see #getAttributeType(String) */
Returns the variable data type. This method may return UNKNOWN if the datatype is unknown
getDataType
{ "repo_name": "apache/sis", "path": "storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/VariableWrapper.java", "license": "apache-2.0", "size": 27067 }
[ "org.apache.sis.internal.netcdf.DataType" ]
import org.apache.sis.internal.netcdf.DataType;
import org.apache.sis.internal.netcdf.*;
[ "org.apache.sis" ]
org.apache.sis;
2,000,053
Paint.Style getIncreasingPaintStyle();
Paint.Style getIncreasingPaintStyle();
/** * Returns paint style when open < close * * @return */
Returns paint style when open < close
getIncreasingPaintStyle
{ "repo_name": "xsingHu/xs-android-architecture", "path": "study-view/xs-MPAndroidChartDemo/MPChartLib/src/main/java/com/github/mikephil/charting/interfaces/datasets/ICandleDataSet.java", "license": "apache-2.0", "size": 1623 }
[ "android.graphics.Paint" ]
import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
238,204
private SelectionListener getHeaderListener() {
SelectionListener function() {
/** * Return the listener that updates sort values on selection. * * @return SelectionListener */
Return the listener that updates sort values on selection
getHeaderListener
{ "repo_name": "elucash/eclipse-oxygen", "path": "org.eclipse.ui.ide/src/org/eclipse/ui/internal/views/markers/ExtendedMarkersView.java", "license": "epl-1.0", "size": 48948 }
[ "org.eclipse.swt.events.SelectionListener" ]
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.events.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,798,663
private synchronized void doAggregateSync( AggregationStrategy strategy, AtomicReference<Exchange> result, Exchange exchange, Exchange inputExchange) { doAggregateInternal(strategy, result, exchange, inputExchange); }
synchronized void function( AggregationStrategy strategy, AtomicReference<Exchange> result, Exchange exchange, Exchange inputExchange) { doAggregateInternal(strategy, result, exchange, inputExchange); }
/** * Aggregate the {@link Exchange} with the current result. This method is synchronized and is called directly when * parallelAggregate is disabled (by default). * * @param strategy the aggregation strategy to use * @param result the current result * @param exchange the ...
Aggregate the <code>Exchange</code> with the current result. This method is synchronized and is called directly when parallelAggregate is disabled (by default)
doAggregateSync
{ "repo_name": "pmoerenhout/camel", "path": "core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java", "license": "apache-2.0", "size": 47367 }
[ "java.util.concurrent.atomic.AtomicReference", "org.apache.camel.AggregationStrategy", "org.apache.camel.Exchange" ]
import java.util.concurrent.atomic.AtomicReference; import org.apache.camel.AggregationStrategy; import org.apache.camel.Exchange;
import java.util.concurrent.atomic.*; import org.apache.camel.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
2,102,254
public static void writeBlob(BlobStore blobStore, String container, String blobName, Payload payload) { if (blobName != null && payload != null) { mkDirs(blobStore, container, blobName); Blob blob = blobStore.blobBuilder(blobName).payload(payload).contentType(MediaType.APPLICATION_OC...
static void function(BlobStore blobStore, String container, String blobName, Payload payload) { if (blobName != null && payload != null) { mkDirs(blobStore, container, blobName); Blob blob = blobStore.blobBuilder(blobName).payload(payload).contentType(MediaType.APPLICATION_OCTET_STREAM).contentDisposition(blobName).bui...
/** * Writes {@link Payload} to the the {@link BlobStore}. */
Writes <code>Payload</code> to the the <code>BlobStore</code>
writeBlob
{ "repo_name": "oscerd/camel", "path": "components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsBlobStoreHelper.java", "license": "apache-2.0", "size": 3936 }
[ "javax.ws.rs.core.MediaType", "org.jclouds.blobstore.BlobStore", "org.jclouds.blobstore.domain.Blob", "org.jclouds.blobstore.options.PutOptions", "org.jclouds.io.Payload" ]
import javax.ws.rs.core.MediaType; import org.jclouds.blobstore.BlobStore; import org.jclouds.blobstore.domain.Blob; import org.jclouds.blobstore.options.PutOptions; import org.jclouds.io.Payload;
import javax.ws.rs.core.*; import org.jclouds.blobstore.*; import org.jclouds.blobstore.domain.*; import org.jclouds.blobstore.options.*; import org.jclouds.io.*;
[ "javax.ws", "org.jclouds.blobstore", "org.jclouds.io" ]
javax.ws; org.jclouds.blobstore; org.jclouds.io;
1,770,902
EEnum getConstraintForm();
EEnum getConstraintForm();
/** * Returns the meta object for enum '{@link com.b2international.snowowl.snomed.mrcm.ConstraintForm <em>Constraint Form</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Constraint Form</em>'. * @see com.b2international.snowowl.snomed.mrcm.ConstraintForm * @...
Returns the meta object for enum '<code>com.b2international.snowowl.snomed.mrcm.ConstraintForm Constraint Form</code>'.
getConstraintForm
{ "repo_name": "IHTSDO/snow-owl", "path": "snomed/com.b2international.snowowl.snomed.mrcm.model/src/com/b2international/snowowl/snomed/mrcm/MrcmPackage.java", "license": "apache-2.0", "size": 82769 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,566,727
public Set<String> getAvailableNodesViaMulticast() throws IOException { collectedNodes.clear(); int sendPort = config.getInt("testnodeMulticastPort"); int receivePort = config.getInt("coordinatorMulticastPort"); String registryAddress = config.getString("registryAddress"); int registryPort = config.getInt...
Set<String> function() throws IOException { collectedNodes.clear(); int sendPort = config.getInt(STR); int receivePort = config.getInt(STR); String registryAddress = config.getString(STR); int registryPort = config.getInt(STR); MulticastSocket socket = new MulticastSocket(receivePort); InetAddress group = InetAddress.g...
/** * Discovers the available test nodes via multicast. * The method blocks until the discovery finished. * * @return a Set with unique testnode names * * @throws IOException */
Discovers the available test nodes via multicast. The method blocks until the discovery finished
getAvailableNodesViaMulticast
{ "repo_name": "kpfuchs/gMix", "path": "gMix/src/staticContent/evaluation/testbed/deploy/discovery/DiscoveryHelper.java", "license": "gpl-3.0", "size": 7774 }
[ "java.io.IOException", "java.net.DatagramPacket", "java.net.InetAddress", "java.net.MulticastSocket", "java.net.SocketTimeoutException", "java.util.Set" ]
import java.io.IOException; import java.net.DatagramPacket; import java.net.InetAddress; import java.net.MulticastSocket; import java.net.SocketTimeoutException; import java.util.Set;
import java.io.*; import java.net.*; import java.util.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
955,893
@Override public void ignorableWhitespace(char ch[], int start, int length) throws SAXException { // internal String object String text = new String(ch, start, length); // if the last character in tmpDocContent is \n and the read whitespace is // \n then don't add it to tmpDocContent... ...
void function(char ch[], int start, int length) throws SAXException { String text = new String(ch, start, length); if (tmpDocContent.length() != 0) { if (tmpDocContent.charAt(tmpDocContent.length() - 1) != '\n' !text.equalsIgnoreCase("\n")) { tmpDocContent.append(text); } } }
/** * This method is called when the SAX parser encounts white spaces */
This method is called when the SAX parser encounts white spaces
ignorableWhitespace
{ "repo_name": "GateNLP/gate-core", "path": "src/main/java/gate/xml/XmlDocumentHandler.java", "license": "lgpl-3.0", "size": 29209 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,139,257
T loadDefaultModel(String analysisGroup) throws AdeException;
T loadDefaultModel(String analysisGroup) throws AdeException;
/** * Load the default model of the given analysis group. Loads the database entry * marked as default, and then loads the model file specified in this entry. * * @param analysisGroup * the analysis group for this model * @return the default model, or null if no default model exists in t...
Load the default model of the given analysis group. Loads the database entry marked as default, and then loads the model file specified in this entry
loadDefaultModel
{ "repo_name": "openmainframeproject/ade", "path": "ade-core/src/main/java/org/openmainframe/ade/dataStore/IDataStoreModels.java", "license": "gpl-3.0", "size": 6488 }
[ "org.openmainframe.ade.exceptions.AdeException" ]
import org.openmainframe.ade.exceptions.AdeException;
import org.openmainframe.ade.exceptions.*;
[ "org.openmainframe.ade" ]
org.openmainframe.ade;
847,412
public void sort(Comparator<? super Item> comparator) { Collections.sort(mItems, comparator); if (mNotifyOnChange) { notifyDataSetChanged(); } }
void function(Comparator<? super Item> comparator) { Collections.sort(mItems, comparator); if (mNotifyOnChange) { notifyDataSetChanged(); } }
/** * Sorts the content of this adapter using the specified comparator. * * @param comparator The comparator used to sort the objects contained in * this adapter. */
Sorts the content of this adapter using the specified comparator
sort
{ "repo_name": "YakushevVladimir/BibleQuote-for-Android", "path": "bible/src/main/java/com/BibleQuote/presentation/widget/listview/ItemAdapter.java", "license": "apache-2.0", "size": 12399 }
[ "java.util.Collections", "java.util.Comparator" ]
import java.util.Collections; import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
554,671
@SuppressWarnings({"unchecked"}) public <T> T read(InputStream jsonInputStream, Configuration configuration) throws IOException { notNull(jsonInputStream, "json input stream can not be null"); notNull(configuration, "configuration can not be null"); return read(jsonInputStream, "UTF-8",...
@SuppressWarnings({STR}) <T> T function(InputStream jsonInputStream, Configuration configuration) throws IOException { notNull(jsonInputStream, STR); notNull(configuration, STR); return read(jsonInputStream, "UTF-8", configuration); }
/** * Applies this JsonPath to the provided json input stream * * @param jsonInputStream input stream to read from * @param configuration configuration to use * @param <T> expected return type * @return list of objects matched by the given path * @throws IOException ...
Applies this JsonPath to the provided json input stream
read
{ "repo_name": "lafaspot/JsonPath", "path": "json-path/src/main/java/com/jayway/jsonpath/JsonPath.java", "license": "apache-2.0", "size": 26534 }
[ "com.jayway.jsonpath.internal.Utils", "java.io.IOException", "java.io.InputStream" ]
import com.jayway.jsonpath.internal.Utils; import java.io.IOException; import java.io.InputStream;
import com.jayway.jsonpath.internal.*; import java.io.*;
[ "com.jayway.jsonpath", "java.io" ]
com.jayway.jsonpath; java.io;
1,507,906
Result<MultipleCurrencyAmount> calculatePayLegPv();
Result<MultipleCurrencyAmount> calculatePayLegPv();
/** * Calculate the swap pay leg present value. * * @return result containing the present value if successful, a Failure otherwise */
Calculate the swap pay leg present value
calculatePayLegPv
{ "repo_name": "nssales/OG-Platform", "path": "sesame/sesame-function/src/main/java/com/opengamma/sesame/irs/InterestRateSwapCalculator.java", "license": "apache-2.0", "size": 3467 }
[ "com.opengamma.util.money.MultipleCurrencyAmount", "com.opengamma.util.result.Result" ]
import com.opengamma.util.money.MultipleCurrencyAmount; import com.opengamma.util.result.Result;
import com.opengamma.util.money.*; import com.opengamma.util.result.*;
[ "com.opengamma.util" ]
com.opengamma.util;
2,034,206
try (Context context = metricRegistry() .timer(name(PostProcessingTask.class, "execution")).time()) { Map<String, Set<ConceptId>> allToPostProcess = getPostProcessingJobs(Schema.BaseType.ATTRIBUTE, configuration()); allToPostProcess.forEach((conceptIndex, conceptIds) -> { ...
try (Context context = metricRegistry() .timer(name(PostProcessingTask.class, STR)).time()) { Map<String, Set<ConceptId>> allToPostProcess = getPostProcessingJobs(Schema.BaseType.ATTRIBUTE, configuration()); allToPostProcess.forEach((conceptIndex, conceptIds) -> { Context contextSingle = metricRegistry() .timer(name(Po...
/** * Apply {@link ai.grakn.concept.Attribute} post processing jobs the concept ids in the provided configuration * * @return True if successful. */
Apply <code>ai.grakn.concept.Attribute</code> post processing jobs the concept ids in the provided configuration
start
{ "repo_name": "pluraliseseverythings/grakn", "path": "grakn-engine/src/main/java/ai/grakn/engine/postprocessing/PostProcessingTask.java", "license": "gpl-3.0", "size": 8607 }
[ "ai.grakn.Keyspace", "ai.grakn.concept.ConceptId", "ai.grakn.engine.GraknEngineConfig", "ai.grakn.util.Schema", "com.codahale.metrics.MetricRegistry", "com.codahale.metrics.Timer", "java.util.Map", "java.util.Set" ]
import ai.grakn.Keyspace; import ai.grakn.concept.ConceptId; import ai.grakn.engine.GraknEngineConfig; import ai.grakn.util.Schema; import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; import java.util.Map; import java.util.Set;
import ai.grakn.*; import ai.grakn.concept.*; import ai.grakn.engine.*; import ai.grakn.util.*; import com.codahale.metrics.*; import java.util.*;
[ "ai.grakn", "ai.grakn.concept", "ai.grakn.engine", "ai.grakn.util", "com.codahale.metrics", "java.util" ]
ai.grakn; ai.grakn.concept; ai.grakn.engine; ai.grakn.util; com.codahale.metrics; java.util;
2,844,898
protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory) { }
void function(DefaultListableBeanFactory beanFactory) { }
/** * Customize the internal bean factory of the ApplicationContext used by * this test. Called before bean definitions are read. * <p>The default implementation is empty. Can be overridden in subclasses to * customize DefaultListableBeanFactory's standard settings. * @param beanFactory the newly created...
Customize the internal bean factory of the ApplicationContext used by this test. Called before bean definitions are read. The default implementation is empty. Can be overridden in subclasses to customize DefaultListableBeanFactory's standard settings
customizeBeanFactory
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/mock/org/springframework/test/AbstractSingleSpringContextTests.java", "license": "unlicense", "size": 14523 }
[ "org.springframework.beans.factory.support.DefaultListableBeanFactory" ]
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.*;
[ "org.springframework.beans" ]
org.springframework.beans;
1,027,531
public void notifyRemotePeerRecovery(WorkerComponent component) { ObjectDeployment workerOD = workerAcceptanceUtil.getWorkerControlDeployment(); RemoteWorkerManagementClient rwmc = EasyMock. createMock(RemoteWorkerManagementClient.class); EasyMock.replay(rwmc); // Get peer bound object ...
void function(WorkerComponent component) { ObjectDeployment workerOD = workerAcceptanceUtil.getWorkerControlDeployment(); RemoteWorkerManagementClient rwmc = EasyMock. createMock(RemoteWorkerManagementClient.class); EasyMock.replay(rwmc); RemoteWorkerManagementReceiver peerMonitor = getRemoteWorkerManagementReceiver();...
/** * Creates a WorkerManagement interface mock, publishes it and notifies its recovery * * @param component The peer Component * @param peerSpec The workerSpec containing the worker attributes * @param peerPublicKey The worker public key * @return Returns the WorkerManagement OID */
Creates a WorkerManagement interface mock, publishes it and notifies its recovery
notifyRemotePeerRecovery
{ "repo_name": "OurGrid/OurGrid", "path": "src/test/java/org/ourgrid/acceptance/util/worker/Req_126_Util.java", "license": "lgpl-3.0", "size": 6019 }
[ "br.edu.ufcg.lsd.commune.container.ObjectDeployment", "br.edu.ufcg.lsd.commune.testinfra.AcceptanceTestUtil", "org.easymock.classextension.EasyMock", "org.ourgrid.common.interfaces.management.RemoteWorkerManagementClient", "org.ourgrid.worker.WorkerComponent", "org.ourgrid.worker.communication.receiver.Re...
import br.edu.ufcg.lsd.commune.container.ObjectDeployment; import br.edu.ufcg.lsd.commune.testinfra.AcceptanceTestUtil; import org.easymock.classextension.EasyMock; import org.ourgrid.common.interfaces.management.RemoteWorkerManagementClient; import org.ourgrid.worker.WorkerComponent; import org.ourgrid.worker.communic...
import br.edu.ufcg.lsd.commune.container.*; import br.edu.ufcg.lsd.commune.testinfra.*; import org.easymock.classextension.*; import org.ourgrid.common.interfaces.management.*; import org.ourgrid.worker.*; import org.ourgrid.worker.communication.receiver.*;
[ "br.edu.ufcg", "org.easymock.classextension", "org.ourgrid.common", "org.ourgrid.worker" ]
br.edu.ufcg; org.easymock.classextension; org.ourgrid.common; org.ourgrid.worker;
2,881,250
public void onTabUnselected(Tab tab, FragmentTransaction ft);
void function(Tab tab, FragmentTransaction ft);
/** * Called when a tab exits the selected state. * * @param tab * The tab that was unselected * @param ft * A {@link FragmentTransaction} for queuing fragment * operations to execute during a tab switch. This tab's * unselect and the newly se...
Called when a tab exits the selected state
onTabUnselected
{ "repo_name": "the-diamond-dogs-group-oss/ActionBarSherlock", "path": "actionbarsherlock/src/com/actionbarsherlock/app/ActionBar.java", "license": "apache-2.0", "size": 35606 }
[ "android.support.v4.app.FragmentTransaction" ]
import android.support.v4.app.FragmentTransaction;
import android.support.v4.app.*;
[ "android.support" ]
android.support;
2,605,444
public static void run( final ImmutableGraph graph, final LongArrayBitVector buckets, final int[] sccsize, final CharSequence resultsBasename, final boolean saveDegrees, final ProgressLogger pl ) throws IOException { final NodeIterator nodeIterator = graph.nodeIterator(); int[] count = IntArrays.EMPTY_ARRAY, in...
static void function( final ImmutableGraph graph, final LongArrayBitVector buckets, final int[] sccsize, final CharSequence resultsBasename, final boolean saveDegrees, final ProgressLogger pl ) throws IOException { final NodeIterator nodeIterator = graph.nodeIterator(); int[] count = IntArrays.EMPTY_ARRAY, indegree = n...
/** Computes stats for the given graph using a single traversal, storing the results in files with given basename. * * @param graph the graph to be examined. * @param buckets the set of buckets of this graph, or <code>null</code> if this information is not available. * @param sccsize the sizes of strongly conn...
Computes stats for the given graph using a single traversal, storing the results in files with given basename
run
{ "repo_name": "lhelwerd/WebGraph", "path": "src/it/unimi/dsi/webgraph/Stats.java", "license": "gpl-3.0", "size": 12698 }
[ "it.unimi.dsi.bits.Fast", "it.unimi.dsi.bits.LongArrayBitVector", "it.unimi.dsi.fastutil.ints.IntArrays", "it.unimi.dsi.fastutil.io.TextIO", "it.unimi.dsi.logging.ProgressLogger", "java.io.BufferedWriter", "java.io.FileWriter", "java.io.IOException", "java.io.PrintWriter", "java.math.BigDecimal", ...
import it.unimi.dsi.bits.Fast; import it.unimi.dsi.bits.LongArrayBitVector; import it.unimi.dsi.fastutil.ints.IntArrays; import it.unimi.dsi.fastutil.io.TextIO; import it.unimi.dsi.logging.ProgressLogger; import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; i...
import it.unimi.dsi.bits.*; import it.unimi.dsi.fastutil.ints.*; import it.unimi.dsi.fastutil.io.*; import it.unimi.dsi.logging.*; import java.io.*; import java.math.*;
[ "it.unimi.dsi", "java.io", "java.math" ]
it.unimi.dsi; java.io; java.math;
905,573
private void innerUpdateSnapshotState(final UpdateIndexShardSnapshotStatusRequest request) { logger.trace("received updated snapshot restore state [{}]", request); updatedSnapshotStateQueue.add(request); clusterService.submitStateUpdateTask("update snapshot state", new ClusterStateUpdateTas...
void function(final UpdateIndexShardSnapshotStatusRequest request) { logger.trace(STR, request); updatedSnapshotStateQueue.add(request); clusterService.submitStateUpdateTask(STR, new ClusterStateUpdateTask() { private final List<UpdateIndexShardSnapshotStatusRequest> drainedRequests = new ArrayList<>();
/** * Updates the shard status on master node * * @param request update shard status request */
Updates the shard status on master node
innerUpdateSnapshotState
{ "repo_name": "mcku/elasticsearch", "path": "core/src/main/java/org/elasticsearch/snapshots/SnapshotShardsService.java", "license": "apache-2.0", "size": 29334 }
[ "java.util.ArrayList", "java.util.List", "org.elasticsearch.cluster.ClusterStateUpdateTask" ]
import java.util.ArrayList; import java.util.List; import org.elasticsearch.cluster.ClusterStateUpdateTask;
import java.util.*; import org.elasticsearch.cluster.*;
[ "java.util", "org.elasticsearch.cluster" ]
java.util; org.elasticsearch.cluster;
2,551,715
public Formula invsForCheckin() { // sig Checkin extends RoomCardEvent { } // { // no room.occ.pre // card.k1 = room.prev.pre // holds.post = holds.pre + guest -> card // prev.post = prev.pre ++ room -> card.k2 // occ.post = occ.pre + room -> guest // // key.unchanged // } final List<Formula> invs = n...
Formula function() { final List<Formula> invs = new ArrayList<Formula>(); invs.add(Checkin.in(RoomCardEvent)); final Variable c = Variable.unary("c"); invs.add( room(c).join(occ).join(pre(c)).no().forAll(c.oneOf(Checkin)) ); invs.add( card(c).join(k1).eq(room(c).join(prev).join(pre(c))).forAll(c.oneOf(Checkin)) ); invs...
/** * Returns the invariants for Checkin and its fields. * @return invariants for Checkin and its fields. */
Returns the invariants for Checkin and its fields
invsForCheckin
{ "repo_name": "emina/kodkod", "path": "examples/kodkod/examples/alloy/Hotel.java", "license": "mit", "size": 20551 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,582,022
public static Color toRGB(float h, float s, float l, float alpha) { if (s < 0) s = 0; if (s > 100) s = 100; if (l < 0) l = 0; if (l > 100) l = 100; if (alpha < 0) alpha = 0; if (alpha > 1) alpha = 1; // Formula needs all values between 0 - 1. h = h % 360.0f; h /= 360f; s /=...
static Color function(float h, float s, float l, float alpha) { if (s < 0) s = 0; if (s > 100) s = 100; if (l < 0) l = 0; if (l > 100) l = 100; if (alpha < 0) alpha = 0; if (alpha > 1) alpha = 1; h = h % 360.0f; h /= 360f; s /= 100f; l /= 100f; float q = 0; if (l < 0.5) q = l * (1 + s); else q = (l + s) - (s * l); floa...
/** * Convert HSL values to a RGB Color. * * @param h Hue is specified as degrees in the range 0 - 360. * @param s Saturation is specified as a percentage in the range 1 - 100. * @param l Lumanance is specified as a percentage in the range 1 - 100. * @param alpha the alpha value between 0 - 1 ...
Convert HSL values to a RGB Color
toRGB
{ "repo_name": "talsma-ict/umldoclet", "path": "src/plantuml-asl/src/net/sourceforge/plantuml/ugraphic/color/HSLColor.java", "license": "apache-2.0", "size": 10654 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,995,184
public void setPet(Pet pet) { this.pet = pet; }
void function(Pet pet) { this.pet = pet; }
/** * Sets the pet. * * @param pet * The pet to set. */
Sets the pet
setPet
{ "repo_name": "OzanKurt/Citelic-742", "path": "src/com/citelic/game/entity/player/Player.java", "license": "mit", "size": 114708 }
[ "com.citelic.game.entity.npc.impl.pet.Pet" ]
import com.citelic.game.entity.npc.impl.pet.Pet;
import com.citelic.game.entity.npc.impl.pet.*;
[ "com.citelic.game" ]
com.citelic.game;
1,467,345
GenericValue makeValidValue(String entityName, Map<String, ? extends Object> fields);
GenericValue makeValidValue(String entityName, Map<String, ? extends Object> fields);
/** * Creates a Entity in the form of a GenericValue without persisting it; * only valid fields will be pulled from the fields Map */
Creates a Entity in the form of a GenericValue without persisting it; only valid fields will be pulled from the fields Map
makeValidValue
{ "repo_name": "ofbizfriends/vogue", "path": "framework/entity/src/org/ofbiz/entity/Delegator.java", "license": "apache-2.0", "size": 59465 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
343,383
Message[] pop(int n);
Message[] pop(int n);
/** * This method would pop out at most <code>n</code> messages from local store. * @param n Number of messages assumed to be popped out. * @return Array of messages. */
This method would pop out at most <code>n</code> messages from local store
pop
{ "repo_name": "NDPMediaCorp/RocketMQ", "path": "rocketmq-client/src/main/java/com/alibaba/rocketmq/client/store/LocalMessageStore.java", "license": "apache-2.0", "size": 724 }
[ "com.alibaba.rocketmq.common.message.Message" ]
import com.alibaba.rocketmq.common.message.Message;
import com.alibaba.rocketmq.common.message.*;
[ "com.alibaba.rocketmq" ]
com.alibaba.rocketmq;
2,697,628
@SuppressWarnings("unchecked") private <T extends Message> T decodeProtobufFromStream(Builder builder, DataInputStream dis) throws WrappedRpcServerException { try { builder.mergeDelimitedFrom(dis); return (T)builder.build(); } catch (Exception ioe) { Class<?> protoCla...
@SuppressWarnings(STR) <T extends Message> T function(Builder builder, DataInputStream dis) throws WrappedRpcServerException { try { builder.mergeDelimitedFrom(dis); return (T)builder.build(); } catch (Exception ioe) { Class<?> protoClass = builder.getDefaultInstanceForType().getClass(); throw new WrappedRpcServerExcep...
/** * Decode the a protobuf from the given input stream * @param builder - Builder of the protobuf to decode * @param dis - DataInputStream to read the protobuf * @return Message - decoded protobuf * @throws WrappedRpcServerException - deserialization failed */
Decode the a protobuf from the given input stream
decodeProtobufFromStream
{ "repo_name": "satishpatil2k13/ODPI-Hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/Server.java", "license": "apache-2.0", "size": 106429 }
[ "com.google.protobuf.Message", "java.io.DataInputStream", "org.apache.hadoop.ipc.protobuf.RpcHeaderProtos" ]
import com.google.protobuf.Message; import java.io.DataInputStream; import org.apache.hadoop.ipc.protobuf.RpcHeaderProtos;
import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.ipc.protobuf.*;
[ "com.google.protobuf", "java.io", "org.apache.hadoop" ]
com.google.protobuf; java.io; org.apache.hadoop;
1,943,919
public void buildVideo(ContentSystem contentSystem, URL videoURL) { videoPlayer = (VideoPlayer) contentSystem .createContentItem(VideoPlayer.class); videoPlayer.setVideoURL(videoURL); videoPlayer.setLocation(-100, -100); videoQuad = (Quad) (videoPlayer.getImplementationObject()); videoQuad.se...
void function(ContentSystem contentSystem, URL videoURL) { videoPlayer = (VideoPlayer) contentSystem .createContentItem(VideoPlayer.class); videoPlayer.setVideoURL(videoURL); videoPlayer.setLocation(-100, -100); videoQuad = (Quad) (videoPlayer.getImplementationObject()); videoQuad.setLocalTranslation(0, 5, -20); videoP...
/** * Builds the video. * * @param contentSystem * the content system * @param videoURL * the video url */
Builds the video
buildVideo
{ "repo_name": "synergynet/synergynet2.5", "path": "synergynet2.5/src/main/java/apps/threedinteraction/tv/TV.java", "license": "bsd-3-clause", "size": 5505 }
[ "com.jme.math.FastMath", "com.jme.math.Quaternion", "com.jme.math.Vector3f", "com.jme.scene.shape.Quad" ]
import com.jme.math.FastMath; import com.jme.math.Quaternion; import com.jme.math.Vector3f; import com.jme.scene.shape.Quad;
import com.jme.math.*; import com.jme.scene.shape.*;
[ "com.jme.math", "com.jme.scene" ]
com.jme.math; com.jme.scene;
514,971
SystemData systemData();
SystemData systemData();
/** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * * @return the systemData value. */
Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information
systemData
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/models/AlertRule.java", "license": "mit", "size": 1374 }
[ "com.azure.core.management.SystemData" ]
import com.azure.core.management.SystemData;
import com.azure.core.management.*;
[ "com.azure.core" ]
com.azure.core;
2,802,975
Node<K, V> find(K key, boolean create) { Comparator<? super K> comparator = this.comparator; Node<K, V> nearest = root; int comparison = 0; if (nearest != null) { // Micro-optimization: avoid polymorphic calls to Comparator.compare(). @SuppressWarnings("unchecked") // Throws a ClassCastEx...
Node<K, V> find(K key, boolean create) { Comparator<? super K> comparator = this.comparator; Node<K, V> nearest = root; int comparison = 0; if (nearest != null) { @SuppressWarnings(STR) Comparable<Object> comparableKey = (comparator == NATURAL_ORDER) ? (Comparable<Object>) key : null; while (true) { comparison = (compa...
/** * Returns the node at or adjacent to the given key, creating it if requested. * * @throws ClassCastException if {@code key} and the tree's keys aren't * mutually comparable. */
Returns the node at or adjacent to the given key, creating it if requested
find
{ "repo_name": "MarkehMe/FactionsAlias", "path": "src/com/markehme/factionsalias/libs/gson/internal/LinkedTreeMap.java", "license": "agpl-3.0", "size": 17874 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
155,130
public void setIconResource(@DrawableRes int resId) { setIconDrawable(sStatic.mResources.getDrawable(resId)); }
void function(@DrawableRes int resId) { setIconDrawable(sStatic.mResources.getDrawable(resId)); }
/** * Set an icon that will be used to represent this route. * The system may use this icon in picker UIs or similar. * * @param resId Resource ID of an icon drawable to use to represent this route */
Set an icon that will be used to represent this route. The system may use this icon in picker UIs or similar
setIconResource
{ "repo_name": "xorware/android_frameworks_base", "path": "media/java/android/media/MediaRouter.java", "license": "apache-2.0", "size": 113716 }
[ "android.annotation.DrawableRes" ]
import android.annotation.DrawableRes;
import android.annotation.*;
[ "android.annotation" ]
android.annotation;
976,945
@Override public void setEventManager(EventManager eventManager) { this.eventManager = eventManager; }
void function(EventManager eventManager) { this.eventManager = eventManager; }
/** * DealWithEvents Interface implementation. */
DealWithEvents Interface implementation
setEventManager
{ "repo_name": "fvasquezjatar/fermat-unused", "path": "CCP/plugin/identity/fermat-ccp-plugin-identity-intra-wallet-user-bitdubai/src/main/java/com/bitdubai/fermat_ccp_plugin/layer/identity/intra_wallet_user/developer/bitdubai/version_1/IntraWalletUserIdentityPluginRoot.java", "license": "mit", "size": 21645 }
[ "com.bitdubai.fermat_pip_api.layer.pip_platform_service.event_manager.interfaces.EventManager" ]
import com.bitdubai.fermat_pip_api.layer.pip_platform_service.event_manager.interfaces.EventManager;
import com.bitdubai.fermat_pip_api.layer.pip_platform_service.event_manager.interfaces.*;
[ "com.bitdubai.fermat_pip_api" ]
com.bitdubai.fermat_pip_api;
1,556,318
private IMemeboxContext configureContext(IDistributionConfiguration distConfig, File configLocation) throws ParserConfigurationException, SAXException, IOException, MemeboxException { MemeboxContext memeboxContext = new MemeboxContext(distConfig); MemeboxConfigReader configReader = new MemeboxConfigReader(c...
IMemeboxContext function(IDistributionConfiguration distConfig, File configLocation) throws ParserConfigurationException, SAXException, IOException, MemeboxException { MemeboxContext memeboxContext = new MemeboxContext(distConfig); MemeboxConfigReader configReader = new MemeboxConfigReader(configLocation); IMemeboxConf...
/** * Ordering in how we put components in context is important here because * components initialised later will want to have other components in * context, another option is SwingUtilities.invokeLater but this is * probably a bad idea * * @param distributionProps */
Ordering in how we put components in context is important here because components initialised later will want to have other components in context, another option is SwingUtilities.invokeLater but this is probably a bad idea
configureContext
{ "repo_name": "paulalesius/com.unnsvc.memebox", "path": "src/main/java/com/unnsvc/memebox/Main.java", "license": "gpl-3.0", "size": 3838 }
[ "com.unnsvc.memebox.config.IMemeboxConfig", "com.unnsvc.memebox.config.MemeboxConfigReader", "com.unnsvc.memebox.importer.MemeboxDirectoryWatcher", "com.unnsvc.memebox.importer.MemeboxDirectoryWatcherListener", "com.unnsvc.memebox.metadata.MetadataStore", "java.io.File", "java.io.IOException", "javax....
import com.unnsvc.memebox.config.IMemeboxConfig; import com.unnsvc.memebox.config.MemeboxConfigReader; import com.unnsvc.memebox.importer.MemeboxDirectoryWatcher; import com.unnsvc.memebox.importer.MemeboxDirectoryWatcherListener; import com.unnsvc.memebox.metadata.MetadataStore; import java.io.File; import java.io.IOE...
import com.unnsvc.memebox.config.*; import com.unnsvc.memebox.importer.*; import com.unnsvc.memebox.metadata.*; import java.io.*; import javax.xml.parsers.*; import org.xml.sax.*;
[ "com.unnsvc.memebox", "java.io", "javax.xml", "org.xml.sax" ]
com.unnsvc.memebox; java.io; javax.xml; org.xml.sax;
2,826,963
private static boolean hasSpecializedHandlerIntents(Context context, Intent intent) { try { PackageManager pm = context.getPackageManager(); List<ResolveInfo> handlers = pm.queryIntentActivities( intent, PackageManager.GET_RESOLVED_FILTER); ...
static boolean function(Context context, Intent intent) { try { PackageManager pm = context.getPackageManager(); List<ResolveInfo> handlers = pm.queryIntentActivities( intent, PackageManager.GET_RESOLVED_FILTER); if (handlers == null handlers.size() == 0) { return false; } for (ResolveInfo resolveInfo : handlers) { Int...
/** * Used to check whether there is a specialized handler for a given intent. * * @param intent * The intent to check with. * @return Whether there is a specialized handler for the given intent. */
Used to check whether there is a specialized handler for a given intent
hasSpecializedHandlerIntents
{ "repo_name": "k0shk0sh/FastHub", "path": "app/src/main/java/com/fastaccess/helper/CustomTabsHelper.java", "license": "gpl-3.0", "size": 5021 }
[ "android.content.Context", "android.content.Intent", "android.content.IntentFilter", "android.content.pm.PackageManager", "android.content.pm.ResolveInfo", "android.util.Log", "java.util.List" ]
import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.util.Log; import java.util.List;
import android.content.*; import android.content.pm.*; import android.util.*; import java.util.*;
[ "android.content", "android.util", "java.util" ]
android.content; android.util; java.util;
392,712
public TaskExecutionDao getTaskExecutionDao() { initialize(); return taskExecutionDao; }
TaskExecutionDao function() { initialize(); return taskExecutionDao; }
/** * Retrieves the taskExecutionDao associated with this repository. * @return the taskExecutionDao */
Retrieves the taskExecutionDao associated with this repository
getTaskExecutionDao
{ "repo_name": "trisberg/spring-cloud-task", "path": "spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/support/SimpleTaskRepository.java", "license": "apache-2.0", "size": 7424 }
[ "org.springframework.cloud.task.repository.dao.TaskExecutionDao" ]
import org.springframework.cloud.task.repository.dao.TaskExecutionDao;
import org.springframework.cloud.task.repository.dao.*;
[ "org.springframework.cloud" ]
org.springframework.cloud;
2,564,084
private Calendar getAccessWindowStart() { // Get window start time Time start = getModel().getAccessWindowStart(); if (start == null) return null; // Return within defined time zone, current day return asCalendar(Calendar.getInstance(getTimeZone()), start); ...
Calendar function() { Time start = getModel().getAccessWindowStart(); if (start == null) return null; return asCalendar(Calendar.getInstance(getTimeZone()), start); }
/** * Returns the time during the current day when this user account can start * being used. * * @return * The time during the current day when this user account can start * being used. */
Returns the time during the current day when this user account can start being used
getAccessWindowStart
{ "repo_name": "DaanWillemsen/guacamole-client", "path": "extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/user/ModeledUser.java", "license": "apache-2.0", "size": 21477 }
[ "java.sql.Time", "java.util.Calendar" ]
import java.sql.Time; import java.util.Calendar;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,309,274
private Set<W> getReadyWindows() { Set<W> readyWindows = new HashSet<>(); for (Windmill.GlobalDataId id : stepContext.getSideInputNotifications()) { if (sideInputViews.get(id.getTag()) == null) { // Side input is for a different DoFn; ignore it. continue; } for (Map.Entry<W...
Set<W> function() { Set<W> readyWindows = new HashSet<>(); for (Windmill.GlobalDataId id : stepContext.getSideInputNotifications()) { if (sideInputViews.get(id.getTag()) == null) { continue; } for (Map.Entry<W, Set<Windmill.GlobalDataRequest>> entry : blockedMap.entrySet()) { Set<Windmill.GlobalDataRequest> windowBlock...
/** * Computes the set of main input windows for which all side inputs are ready and cached. */
Computes the set of main input windows for which all side inputs are ready and cached
getReadyWindows
{ "repo_name": "Test-Betta-Inc/musical-umbrella", "path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/worker/StreamingSideInputDoFnRunner.java", "license": "apache-2.0", "size": 11725 }
[ "com.google.cloud.dataflow.sdk.runners.worker.StateFetcher", "com.google.cloud.dataflow.sdk.runners.worker.windmill.Windmill", "com.google.cloud.dataflow.sdk.values.PCollectionView", "com.google.common.base.Throwables", "java.io.IOException", "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import com.google.cloud.dataflow.sdk.runners.worker.StateFetcher; import com.google.cloud.dataflow.sdk.runners.worker.windmill.Windmill; import com.google.cloud.dataflow.sdk.values.PCollectionView; import com.google.common.base.Throwables; import java.io.IOException; import java.util.HashSet; import java.util.Map; impo...
import com.google.cloud.dataflow.sdk.runners.worker.*; import com.google.cloud.dataflow.sdk.runners.worker.windmill.*; import com.google.cloud.dataflow.sdk.values.*; import com.google.common.base.*; import java.io.*; import java.util.*;
[ "com.google.cloud", "com.google.common", "java.io", "java.util" ]
com.google.cloud; com.google.common; java.io; java.util;
1,788,071
public void close() throws IOException;
void function() throws IOException;
/** * Close the task log * @throws IOException */
Close the task log
close
{ "repo_name": "kumarrus/voltdb", "path": "src/frontend/org/voltdb/rejoin/TaskLog.java", "license": "agpl-3.0", "size": 2634 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,378,420
public void toggleSoftInputFromWindow(IBinder windowToken, int showFlags, int hideFlags) { synchronized (mH) { if (mServedView == null || mServedView.getWindowToken() != windowToken) { return; } if (mCurMethod != null) { try { ...
void function(IBinder windowToken, int showFlags, int hideFlags) { synchronized (mH) { if (mServedView == null mServedView.getWindowToken() != windowToken) { return; } if (mCurMethod != null) { try { mCurMethod.toggleSoftInput(showFlags, hideFlags); } catch (RemoteException e) { } } } }
/** * This method toggles the input method window display. * If the input window is already displayed, it gets hidden. * If not the input window will be displayed. * @param windowToken The token of the window that is making the request, * as returned by {@link View#getWindowToken() View.getWin...
This method toggles the input method window display. If the input window is already displayed, it gets hidden. If not the input window will be displayed
toggleSoftInputFromWindow
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/view/inputmethod/InputMethodManager.java", "license": "gpl-3.0", "size": 53824 }
[ "android.os.IBinder", "android.os.RemoteException" ]
import android.os.IBinder; import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
2,162,185
public void testPackage() { _package = Model.getFacade().lookupIn(_model, "testpackage"); assertNotNull("No package \"testpackage\" found in model.", _package); assertEquals("Inconsistent package name.", "testpackage", Model.getFacade().getName(_package)); assertEquals("T...
void function() { _package = Model.getFacade().lookupIn(_model, STR); assertNotNull(STRtestpackage\STR, _package); assertEquals(STR, STR, Model.getFacade().getName(_package)); assertEquals(STR, _model, Model.getFacade().getNamespace(_package)); assertTrue(STR, Model.getFacade().isAPackage(_package)); }
/** * Test if the package was processed correctly. */
Test if the package was processed correctly
testPackage
{ "repo_name": "carvalhomb/tsmells", "path": "sample/argouml/argouml/org/argouml/uml/reveng/TestJavaImportInterface.java", "license": "gpl-2.0", "size": 11868 }
[ "org.argouml.model.Model" ]
import org.argouml.model.Model;
import org.argouml.model.*;
[ "org.argouml.model" ]
org.argouml.model;
2,844,720
@WebMethod(operationName = "getRule") @WebResult(name = "rule") @Cacheable(value= RuleDefinition.Cache.NAME, key="'ruleId=' + #p0") public RuleDefinition getRule(@WebParam(name = "ruleId") String ruleId);
@WebMethod(operationName = STR) @WebResult(name = "rule") @Cacheable(value= RuleDefinition.Cache.NAME, key=STR) RuleDefinition function(@WebParam(name = STR) String ruleId);
/** * Retrieves the rule for the given ruleId. The rule includes the * propositions which define the condition that is to be evaluated on the * rule. It also defines a collection of actions which will be invoked if * the rule succeeds. * * @param ruleId the id of the rule to retrieve ...
Retrieves the rule for the given ruleId. The rule includes the propositions which define the condition that is to be evaluated on the rule. It also defines a collection of actions which will be invoked if the rule succeeds
getRule
{ "repo_name": "bhutchinson/rice", "path": "rice-middleware/krms/api/src/main/java/org/kuali/rice/krms/api/repository/RuleManagementService.java", "license": "apache-2.0", "size": 60909 }
[ "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult", "org.kuali.rice.krms.api.repository.rule.RuleDefinition", "org.springframework.cache.annotation.Cacheable" ]
import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import org.kuali.rice.krms.api.repository.rule.RuleDefinition; import org.springframework.cache.annotation.Cacheable;
import javax.jws.*; import org.kuali.rice.krms.api.repository.rule.*; import org.springframework.cache.annotation.*;
[ "javax.jws", "org.kuali.rice", "org.springframework.cache" ]
javax.jws; org.kuali.rice; org.springframework.cache;
1,034,385
protected FileSystemConfiguration fsConfiguration(String gridName) throws IgniteCheckedException { FileSystemConfiguration cfg = new FileSystemConfiguration(); cfg.setDataCacheName("partitioned"); cfg.setMetaCacheName("replicated"); cfg.setName("igfs"); cfg.setPrefetchBlocks...
FileSystemConfiguration function(String gridName) throws IgniteCheckedException { FileSystemConfiguration cfg = new FileSystemConfiguration(); cfg.setDataCacheName(STR); cfg.setMetaCacheName(STR); cfg.setName("igfs"); cfg.setPrefetchBlocks(1); cfg.setDefaultMode(mode); if (mode != PRIMARY) cfg.setSecondaryFileSystem( n...
/** * Gets IGFS configuration. * * @param gridName Grid name. * @return IGFS configuration. */
Gets IGFS configuration
fsConfiguration
{ "repo_name": "vsisko/incubator-ignite", "path": "modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopSecondaryFileSystemConfigurationTest.java", "license": "apache-2.0", "size": 18787 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.configuration.FileSystemConfiguration", "org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.configuration.FileSystemConfiguration; import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.hadoop.fs.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,127,713
Mat getBackgroundMask(Mat image, int method, int reduction, double ratio); // default ratio: infinity
Mat getBackgroundMask(Mat image, int method, int reduction, double ratio);
/** Finds retina image background mask by local variance of image or by contours of image * @param image to be processed * @param method - allowed values are BG_MASK_BY_CONTOURS = 0, BG_MASK_BY_LOCAL_VARIANCE = 1 * @param reduction is optional parameter, define reduction of dime...
Finds retina image background mask by local variance of image or by contours of image
getBackgroundMask
{ "repo_name": "lukasmakac/DIP", "path": "src/main/java/cz/vutbr/fit/strade/components/diseases/druse/DruseDetector.java", "license": "gpl-2.0", "size": 10456 }
[ "org.opencv.core.Mat" ]
import org.opencv.core.Mat;
import org.opencv.core.*;
[ "org.opencv.core" ]
org.opencv.core;
441,295
public void refreshTree() { if (shell.isDisposed()) return; if (!viewSelected) return; // Nothing to see here, move along... if (selectionTree == null || selectionTree.isDisposed()) { // ////////////////////////////////////////////////////////////////////////////////////////////////// //...
void function() { if (shell.isDisposed()) return; if (!viewSelected) return; if (selectionTree == null selectionTree.isDisposed()) { selectionTree = new Tree(variableComposite, SWT.SINGLE ); props.setLook(selectionTree); selectionTree.setLayout(new FillLayout()); TreeMemory.addTreeListener(selectionTree, STRING_SPOON_M...
/** * Refresh the object selection tree (on the left of the screen) */
Refresh the object selection tree (on the left of the screen)
refreshTree
{ "repo_name": "icholy/geokettle-2.0", "path": "src-ui/org/pentaho/di/ui/spoon/Spoon.java", "license": "lgpl-2.1", "size": 231713 }
[ "org.eclipse.swt.layout.FillLayout", "org.eclipse.swt.widgets.Tree", "org.pentaho.di.ui.core.widget.TreeMemory" ]
import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Tree; import org.pentaho.di.ui.core.widget.TreeMemory;
import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.pentaho.di.ui.core.widget.*;
[ "org.eclipse.swt", "org.pentaho.di" ]
org.eclipse.swt; org.pentaho.di;
1,240,584
public static BannerInstructions fromJson(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(DirectionsAdapterFactory.create()); return gson.create().fromJson(json, BannerInstructions.class); } @AutoValue.Builder public abstract static class Builder {
static BannerInstructions function(String json) { GsonBuilder gson = new GsonBuilder(); gson.registerTypeAdapterFactory(DirectionsAdapterFactory.create()); return gson.create().fromJson(json, BannerInstructions.class); } @AutoValue.Builder public abstract static class Builder {
/** * Create a new instance of this class by passing in a formatted valid JSON String. * * @param json a formatted valid JSON string defining a BannerInstructions * @return a new instance of this class defined by the values passed inside this static factory * method * @since 3.4.0 */
Create a new instance of this class by passing in a formatted valid JSON String
fromJson
{ "repo_name": "mapbox/mapbox-java", "path": "services-directions-models/src/main/java/com/mapbox/api/directions/v5/models/BannerInstructions.java", "license": "mit", "size": 6781 }
[ "com.google.auto.value.AutoValue", "com.google.gson.GsonBuilder", "com.mapbox.api.directions.v5.DirectionsAdapterFactory" ]
import com.google.auto.value.AutoValue; import com.google.gson.GsonBuilder; import com.mapbox.api.directions.v5.DirectionsAdapterFactory;
import com.google.auto.value.*; import com.google.gson.*; import com.mapbox.api.directions.v5.*;
[ "com.google.auto", "com.google.gson", "com.mapbox.api" ]
com.google.auto; com.google.gson; com.mapbox.api;
551,335
public String getVariance(List<Double> values) { if (values.size()==0) return "NaN"; double E_X; double sum=0, sum2=0; for (double dValue : values) { sum += dValue; sum2 += dValue*dValue; } E_X = sum / values.size(); return format(sum2/values.size() - (E_X*E_X)); }
String function(List<Double> values) { if (values.size()==0) return "NaN"; double E_X; double sum=0, sum2=0; for (double dValue : values) { sum += dValue; sum2 += dValue*dValue; } E_X = sum / values.size(); return format(sum2/values.size() - (E_X*E_X)); }
/** * Returns the variance of the values in the List. * * @param values The list of values * @return The variance of the values in the list or "NaN" if the list is * empty. */
Returns the variance of the values in the List
getVariance
{ "repo_name": "akeranen/the-one", "path": "src/report/Report.java", "license": "gpl-3.0", "size": 11730 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,652,264
String[] fields = s.split("\t"); if(fields.length != 8) { return null; } String podcast = fields[0]; String episode = fields[1]; String deviceId = fields[2]; try { Action action = Action.valueOf(fields[3]); return new Builder(podcast, e...
String[] fields = s.split("\t"); if(fields.length != 8) { return null; } String podcast = fields[0]; String episode = fields[1]; String deviceId = fields[2]; try { Action action = Action.valueOf(fields[3]); return new Builder(podcast, episode, action) .deviceId(deviceId) .timestamp(new Date(Long.parseLong(fields[4]))) ...
/** * Creates an episode action object from a String representation. The representation includes * all mandatory and optional attributes * * @param s String representation (output from {@link #writeToString()}) * @return episode action object, or null if s is invalid */
Creates an episode action object from a String representation. The representation includes all mandatory and optional attributes
readFromString
{ "repo_name": "drabux/AntennaPod", "path": "core/src/main/java/de/danoeh/antennapod/core/gpoddernet/model/GpodnetEpisodeAction.java", "license": "mit", "size": 10576 }
[ "android.util.Log", "java.util.Date" ]
import android.util.Log; import java.util.Date;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
2,484,391
public List<Integer> getAllAirportIds();
List<Integer> function();
/** * Returns ids of all airports in database. */
Returns ids of all airports in database
getAllAirportIds
{ "repo_name": "mattshobe/flightmap", "path": "preprocessing/src/com/google/flightmap/parsing/db/AviationDbReader.java", "license": "apache-2.0", "size": 1565 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,478,349
public void setStatus(Status newStatus) { if (newStatus != status) { NotificationChain msgs = null; if (status != null) msgs = ((InternalEObject)status).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CommonPackage.ACTIVITY_RECORD__STATUS, null, msgs); if (newStatus != null) msgs = ((InternalEObject...
void function(Status newStatus) { if (newStatus != status) { NotificationChain msgs = null; if (status != null) msgs = ((InternalEObject)status).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CommonPackage.ACTIVITY_RECORD__STATUS, null, msgs); if (newStatus != null) msgs = ((InternalEObject)newStatus).eInverseAdd(this, ...
/** * Sets the value of the '{@link CIM15.IEC61968.Common.ActivityRecord#getStatus <em>Status</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Status</em>' containment reference. * @see #getStatus() * @generated */
Sets the value of the '<code>CIM15.IEC61968.Common.ActivityRecord#getStatus Status</code>' containment reference.
setStatus
{ "repo_name": "SES-fortiss/SmartGridCoSimulation", "path": "core/cim15/src/CIM15/IEC61968/Common/ActivityRecord.java", "license": "apache-2.0", "size": 28481 }
[ "org.eclipse.emf.common.notify.NotificationChain", "org.eclipse.emf.ecore.InternalEObject" ]
import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.common.notify.*; import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,342,232
public static String uploadFileAndCallback(MultipartFile file, String subPath, String prefix) { if (validateFile(file)) { String fileName = file.getOriginalFilename(); String extName = getFileExtName(fileName); if(prefix == null){ prefix = ""; } String lastFileName = prefix + System.currentTime...
static String function(MultipartFile file, String subPath, String prefix) { if (validateFile(file)) { String fileName = file.getOriginalFilename(); String extName = getFileExtName(fileName); if(prefix == null){ prefix = STR/STR/STRupload file:STRinvalid.file.formatSTRinvalid.file.format") + fileName); } }
/** * Upload file and callback. * * @param file * the file * @param subPath * the sub path * @param prefix * the prefix * @return the string */
Upload file and callback
uploadFileAndCallback
{ "repo_name": "8090boy/gomall.la", "path": "legendshop_core/src/java/com/legendshop/core/helper/FileProcessor.java", "license": "apache-2.0", "size": 13218 }
[ "org.springframework.web.multipart.MultipartFile" ]
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.*;
[ "org.springframework.web" ]
org.springframework.web;
2,297,217
@Test public void testDirectedGraphBfsInvalid() { Graph<Integer> graph = createDummy(true); boolean isExisting = graph.isNodeExistingBfs(42); Assert.assertFalse(isExisting); }
void function() { Graph<Integer> graph = createDummy(true); boolean isExisting = graph.isNodeExistingBfs(42); Assert.assertFalse(isExisting); }
/** * Iterates through an undirected graph using bfs and expect a value not to be found */
Iterates through an undirected graph using bfs and expect a value not to be found
testDirectedGraphBfsInvalid
{ "repo_name": "Scavi/BrainSqueeze", "path": "src/test/java/com/scavi/brainsqueeze/tree/GraphTest.java", "license": "apache-2.0", "size": 4785 }
[ "com.scavi.brainsqueeze.util.graph.Graph", "org.junit.Assert" ]
import com.scavi.brainsqueeze.util.graph.Graph; import org.junit.Assert;
import com.scavi.brainsqueeze.util.graph.*; import org.junit.*;
[ "com.scavi.brainsqueeze", "org.junit" ]
com.scavi.brainsqueeze; org.junit;
2,781,055
public static Method getReadMethod(Class<?> beanClass, String propertyName) { return getMetadata(beanClass).readMethods.get(propertyName); }
static Method function(Class<?> beanClass, String propertyName) { return getMetadata(beanClass).readMethods.get(propertyName); }
/** * Get the read method for a specific property on a bean class. * * @param beanClass The bean class. * @param propertyName The property name. * @return The read method for the property. */
Get the read method for a specific property on a bean class
getReadMethod
{ "repo_name": "mztaylor/rice-git", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/util/ObjectPropertyUtils.java", "license": "apache-2.0", "size": 50637 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,585,277
@Override public Uri insert(Uri uri, ContentValues initialValues) { if (mUriMatcher.match(uri) != MAIN) { // Can only insert into to main URI. throw new IllegalArgumentException("Unknown URI " + uri); } ContentValues values; ...
Uri function(Uri uri, ContentValues initialValues) { if (mUriMatcher.match(uri) != MAIN) { throw new IllegalArgumentException(STR + uri); } ContentValues values; if (initialValues != null) { values = new ContentValues(initialValues); } else { values = new ContentValues(); } if (values.containsKey(MainTable.COLUMN_NAME_...
/** * Handler inserting new data. */
Handler inserting new data
insert
{ "repo_name": "luoqii/ApkLauncher", "path": "app/samples/android-21/legacy/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.java", "license": "apache-2.0", "size": 19112 }
[ "android.content.ContentValues", "android.net.Uri" ]
import android.content.ContentValues; import android.net.Uri;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
2,504,467
public PartitionDto toPartitionDto(final PartitionInfo partitionInfo) { return mapper.map(partitionInfo, PartitionDto.class); }
PartitionDto function(final PartitionInfo partitionInfo) { return mapper.map(partitionInfo, PartitionDto.class); }
/** * Converts from PartitionInfo to PartitionDto. * * @param partitionInfo connector partition info * @return partition dto */
Converts from PartitionInfo to PartitionDto
toPartitionDto
{ "repo_name": "Netflix/metacat", "path": "metacat-common-server/src/main/java/com/netflix/metacat/common/server/converter/ConverterUtil.java", "license": "apache-2.0", "size": 11217 }
[ "com.netflix.metacat.common.dto.PartitionDto", "com.netflix.metacat.common.server.connectors.model.PartitionInfo" ]
import com.netflix.metacat.common.dto.PartitionDto; import com.netflix.metacat.common.server.connectors.model.PartitionInfo;
import com.netflix.metacat.common.dto.*; import com.netflix.metacat.common.server.connectors.model.*;
[ "com.netflix.metacat" ]
com.netflix.metacat;
1,794,647
public static <TSource> Float max(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector) { return aggregate(source.select(selector), null, Extensions.FLOAT_MAX); }
static <TSource> Float function(Enumerable<TSource> source, NullableFloatFunction1<TSource> selector) { return aggregate(source.select(selector), null, Extensions.FLOAT_MAX); }
/** * Invokes a transform function on each element of a * sequence and returns the maximum nullable Float * value. */
Invokes a transform function on each element of a sequence and returns the maximum nullable Float value
max
{ "repo_name": "vlsi/calcite", "path": "linq4j/src/main/java/org/apache/calcite/linq4j/EnumerableDefaults.java", "license": "apache-2.0", "size": 156877 }
[ "org.apache.calcite.linq4j.function.NullableFloatFunction1" ]
import org.apache.calcite.linq4j.function.NullableFloatFunction1;
import org.apache.calcite.linq4j.function.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,853,261
public PacketExtension removeExtension(String elementName, String namespace) { String key = XmppStringUtils.generateKey(elementName, namespace); synchronized (packetExtensions) { return packetExtensions.remove(key); } }
PacketExtension function(String elementName, String namespace) { String key = XmppStringUtils.generateKey(elementName, namespace); synchronized (packetExtensions) { return packetExtensions.remove(key); } }
/** * Remove the packet extension with the given elementName and namespace. * * @param elementName * @param namespace * @return the removed packet extension or null. */
Remove the packet extension with the given elementName and namespace
removeExtension
{ "repo_name": "magnetsystems/message-smack", "path": "smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java", "license": "apache-2.0", "size": 15758 }
[ "org.jxmpp.util.XmppStringUtils" ]
import org.jxmpp.util.XmppStringUtils;
import org.jxmpp.util.*;
[ "org.jxmpp.util" ]
org.jxmpp.util;
1,457,281
@Generated @Selector("updatesNowPlayingInfoCenter") public native boolean updatesNowPlayingInfoCenter();
@Selector(STR) native boolean function();
/** * [@property] updatesNowPlayingInfoCenter * <p> * Whether or not the now playing info center should be updated. Default is YES. */
[@property] updatesNowPlayingInfoCenter Whether or not the now playing info center should be updated. Default is YES
updatesNowPlayingInfoCenter
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/avkit/AVPlayerViewController.java", "license": "apache-2.0", "size": 16042 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
1,583,569
protected synchronized void setupIOstreams() throws IOException, InterruptedException { if (socket != null || shouldCloseConnection.get()) { return; } try { if (LOG.isDebugEnabled()) { LOG.debug("Connecting to "+remoteId); } setupConnection(); ...
synchronized void function() throws IOException, InterruptedException { if (socket != null shouldCloseConnection.get()) { return; } try { if (LOG.isDebugEnabled()) { LOG.debug(STR+remoteId); } setupConnection(); this.in = new DataInputStream(new BufferedInputStream (new PingInputStream(NetUtils.getInputStream(socket)))...
/** Connect to the server and set up the I/O streams. It then sends * a header to the server and starts * the connection thread that waits for responses. * @throws java.io.IOException e */
Connect to the server and set up the I/O streams. It then sends a header to the server and starts the connection thread that waits for responses
setupIOstreams
{ "repo_name": "Shmuma/hbase-trunk", "path": "src/main/java/org/apache/hadoop/hbase/ipc/HBaseClient.java", "license": "apache-2.0", "size": 37596 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.DataInputStream", "java.io.DataOutputStream", "java.io.IOException", "org.apache.hadoop.net.NetUtils" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.hadoop.net.NetUtils;
import java.io.*; import org.apache.hadoop.net.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
288,799
public String getAuthenticatedAccountId() { return mAuthenticatedAccountId; } /** Returns the account ID of the {@link Mailbox} that the {@code Session}
String function() { return mAuthenticatedAccountId; } /** Returns the account ID of the {@link Mailbox} that the {@code Session}
/** Returns the account ID of the {@code Session}'s owner. * @see #getTargetAccountId() */
Returns the account ID of the Session's owner
getAuthenticatedAccountId
{ "repo_name": "nico01f/z-pec", "path": "ZimbraServer/src/java/com/zimbra/cs/session/Session.java", "license": "mit", "size": 11138 }
[ "com.zimbra.cs.mailbox.Mailbox" ]
import com.zimbra.cs.mailbox.Mailbox;
import com.zimbra.cs.mailbox.*;
[ "com.zimbra.cs" ]
com.zimbra.cs;
163,299
@Test public void testAddSmpte() { final Timecode base = Timecode.getInstance("23:29:59:05", Timebase.HZ_25); final Timecode add = Timecode.getInstance("00:59:59:22", Timebase.HZ_25); final Timecode tc = base.add(add.getSampleCount()); Assert.assertEquals("00:29:59:02", tc.toSMPTEString()); }
void function() { final Timecode base = Timecode.getInstance(STR, Timebase.HZ_25); final Timecode add = Timecode.getInstance(STR, Timebase.HZ_25); final Timecode tc = base.add(add.getSampleCount()); Assert.assertEquals(STR, tc.toSMPTEString()); }
/** * The SMPTE string shouldn't include days */
The SMPTE string shouldn't include days
testAddSmpte
{ "repo_name": "petergeneric/stdlib", "path": "stdlib/src/test/java/com/peterphi/std/types/TimecodeTest.java", "license": "mit", "size": 14406 }
[ "junit.framework.Assert", "org.junit.Assert" ]
import junit.framework.Assert; import org.junit.Assert;
import junit.framework.*; import org.junit.*;
[ "junit.framework", "org.junit" ]
junit.framework; org.junit;
1,327,538
// [TARGET ackAsync(String, String, String...)] // [VARIABLE "my_subscription_name"] // [VARIABLE "message_ack_id"] public void ackOneMessageAsync(String subscriptionName, String ackId) throws ExecutionException, InterruptedException { // [START ackOneMessageAsync] Future<Void> future = pubsub.ack...
void function(String subscriptionName, String ackId) throws ExecutionException, InterruptedException { Future<Void> future = pubsub.ackAsync(subscriptionName, ackId); future.get(); }
/** * Example of asynchronously acking one message. */
Example of asynchronously acking one message
ackOneMessageAsync
{ "repo_name": "tangiel/google-cloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/PubSubSnippets.java", "license": "apache-2.0", "size": 35770 }
[ "java.util.concurrent.ExecutionException", "java.util.concurrent.Future" ]
import java.util.concurrent.ExecutionException; import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,755,724
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length < 2) { throw new WrongUsageException("commands.enchant.usage", new Object[0]); } else { EntityLivingBase entitylivingbase = ...
void function(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length < 2) { throw new WrongUsageException(STR, new Object[0]); } else { EntityLivingBase entitylivingbase = (EntityLivingBase)getEntity(server, sender, args[0], EntityLivingBase.class); sender.setCommandStat...
/** * Callback for when the command is executed */
Callback for when the command is executed
execute
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/command/CommandEnchant.java", "license": "gpl-3.0", "size": 4794 }
[ "net.minecraft.enchantment.Enchantment", "net.minecraft.entity.EntityLivingBase", "net.minecraft.item.ItemStack", "net.minecraft.nbt.NBTTagList", "net.minecraft.server.MinecraftServer" ]
import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagList; import net.minecraft.server.MinecraftServer;
import net.minecraft.enchantment.*; import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.nbt.*; import net.minecraft.server.*;
[ "net.minecraft.enchantment", "net.minecraft.entity", "net.minecraft.item", "net.minecraft.nbt", "net.minecraft.server" ]
net.minecraft.enchantment; net.minecraft.entity; net.minecraft.item; net.minecraft.nbt; net.minecraft.server;
1,833,816
void setError(NodeEntry state, ErrorInfo errorInfo) throws InterruptedException { Preconditions.checkState(value == null, "%s %s %s", skyKey, value, errorInfo); Preconditions.checkState(this.errorInfo == null, "%s %s %s", skyKey, this.errorInfo, errorInfo); if (errorInfo.isDirectlyTransient()) { N...
void setError(NodeEntry state, ErrorInfo errorInfo) throws InterruptedException { Preconditions.checkState(value == null, STR, skyKey, value, errorInfo); Preconditions.checkState(this.errorInfo == null, STR, skyKey, this.errorInfo, errorInfo); if (errorInfo.isDirectlyTransient()) { NodeEntry errorTransienceNode = Preco...
/** * Set this node to be in error. The node's value must not have already been set. However, all * dependencies of this node <i>must</i> already have been registered, since this method may * register a dependence on the error transience node, which should always be the last dep. */
Set this node to be in error. The node's value must not have already been set. However, all dependencies of this node must already have been registered, since this method may register a dependence on the error transience node, which should always be the last dep
setError
{ "repo_name": "werkt/bazel", "path": "src/main/java/com/google/devtools/build/skyframe/SkyFunctionEnvironment.java", "license": "apache-2.0", "size": 39796 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.util.GroupedList", "com.google.devtools.build.skyframe.NodeEntry", "com.google.devtools.build.skyframe.QueryableGraph" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.util.GroupedList; import com.google.devtools.build.skyframe.NodeEntry; import com.google.devtools.build.skyframe.QueryableGraph;
import com.google.common.base.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.skyframe.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
1,406,733
return vehicleValue; } /** * Sets the value of the vehicleValue property. * * @param value * allowed object is * {@link BigInteger }
return vehicleValue; } /** * Sets the value of the vehicleValue property. * * @param value * allowed object is * {@link BigInteger }
/** * Gets the value of the vehicleValue property. * * @return * possible object is * {@link BigInteger } * */
Gets the value of the vehicleValue property
getVehicleValue
{ "repo_name": "moiarcsan/openls1.3", "path": "src/main/java/org/jvnet/ogc/VehicleTypeN.java", "license": "gpl-2.0", "size": 3426 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,942,038
@CheckForNull Resource decorate(@Nonnull Resource resource);
@CheckForNull Resource decorate(@Nonnull Resource resource);
/** * Decorate a resource. * If the service decorates the resource it should return * the new resource. If the service does not want to decorate * the resource, it should return the original resource. * Returning <code>null</code> is considered the same as * returning the original resource...
Decorate a resource. If the service decorates the resource it should return the new resource. If the service does not want to decorate the resource, it should return the original resource. Returning <code>null</code> is considered the same as returning the original resource
decorate
{ "repo_name": "Nimco/sling", "path": "bundles/api/src/main/java/org/apache/sling/api/resource/ResourceDecorator.java", "license": "apache-2.0", "size": 2595 }
[ "javax.annotation.CheckForNull", "javax.annotation.Nonnull" ]
import javax.annotation.CheckForNull; import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,831,351
public void setSessionType(final ApplicationSessionType sessionType) { this.sessionType = sessionType; }
void function(final ApplicationSessionType sessionType) { this.sessionType = sessionType; }
/** * Sets the session type. * * @param sessionType * the new session type */
Sets the session type
setSessionType
{ "repo_name": "Hack23/cia", "path": "service.api/src/main/java/com/hack23/cia/service/api/action/application/CreateApplicationSessionRequest.java", "license": "apache-2.0", "size": 4392 }
[ "com.hack23.cia.model.internal.application.system.impl.ApplicationSessionType" ]
import com.hack23.cia.model.internal.application.system.impl.ApplicationSessionType;
import com.hack23.cia.model.internal.application.system.impl.*;
[ "com.hack23.cia" ]
com.hack23.cia;
2,062,399
private InputSource resolveEntityFallback(String publicId, String systemId) throws SAXException, IOException { //if resolution failed and publicId == null, // try to make absolute file names relative and retry LOG.debug("Resolve failed, fallback scenario"); if (publicId != null) { ...
InputSource function(String publicId, String systemId) throws SAXException, IOException { LOG.debug(STR); if (publicId != null) { return null; } final URL url = new URL(systemId); if ("file".equals(url.getProtocol())) { final String path = url.getPath(); final Path f = Paths.get(path).normalize(); if (!Files.isReadable...
/** * moved from Collection.resolveEntity() revision 6144 */
moved from Collection.resolveEntity() revision 6144
resolveEntityFallback
{ "repo_name": "dizzzz/exist", "path": "exist-core/src/main/java/org/exist/validation/resolver/eXistXMLCatalogResolver.java", "license": "lgpl-2.1", "size": 8707 }
[ "java.io.IOException", "java.nio.file.Files", "java.nio.file.Path", "java.nio.file.Paths", "org.exist.util.FileUtils", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.exist.util.FileUtils; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import java.nio.file.*; import org.exist.util.*; import org.xml.sax.*;
[ "java.io", "java.nio", "org.exist.util", "org.xml.sax" ]
java.io; java.nio; org.exist.util; org.xml.sax;
1,970,003
@Override public boolean[] setChildren(List<String> paths, List<T> records, int options) { return set(paths, records, null, null, options); }
boolean[] function(List<String> paths, List<T> records, int options) { return set(paths, records, null, null, options); }
/** * async set * * TODO: rename to set * */
async set
setChildren
{ "repo_name": "kishoreg/incubator-helix", "path": "helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java", "license": "apache-2.0", "size": 32830 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
747,432
private void checkStartCallArgs(String name, String method, Object[] args, Type[] argTypes) throws VException { if ("".equals(method)) { throw new VException(String.format("Empty method name invoked on object %s", name)); } if (args.length != argTypes.length) { ...
void function(String name, String method, Object[] args, Type[] argTypes) throws VException { if (STREmpty method name invoked on object %sSTRArgument count (%d) doesn't match type count (%d) for method %s of object %s", args.length, argTypes.length, name, method)); } }
/** * Asserts that the given parameters are valid for {@code startCall} and throws {@link * VException} if they are not. */
Asserts that the given parameters are valid for startCall and throws <code>VException</code> if they are not
checkStartCallArgs
{ "repo_name": "vanadium/java", "path": "lib/src/main/java/io/v/impl/google/rpc/ClientImpl.java", "license": "bsd-3-clause", "size": 4450 }
[ "io.v.v23.verror.VException", "java.lang.reflect.Type" ]
import io.v.v23.verror.VException; import java.lang.reflect.Type;
import io.v.v23.verror.*; import java.lang.reflect.*;
[ "io.v.v23", "java.lang" ]
io.v.v23; java.lang;
2,424,196
protected List<Metric> collectMetrics(final String instanceId, final ProcessGroupStatus status, final String processGroupName, final boolean jvmMetricsCollected) { List<Metric> allMetrics = new ArrayList<>(); // dataflow process group level metrics allMetrics.addAll(AzureLogAnal...
List<Metric> function(final String instanceId, final ProcessGroupStatus status, final String processGroupName, final boolean jvmMetricsCollected) { List<Metric> allMetrics = new ArrayList<>(); allMetrics.addAll(AzureLogAnalyticsMetricsFactory.getDataFlowMetrics(status, instanceId)); final List<ConnectionStatus> connect...
/** * collect metrics to be sent to azure log analytics workspace * * @param instanceId instance id * @param status process group status * @param processGroupName process group name * @param jvmMetricsCollected whether we want to collect jvm metrics or not * @...
collect metrics to be sent to azure log analytics workspace
collectMetrics
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-azure-bundle/nifi-azure-reporting-task/src/main/java/org/apache/nifi/reporting/azure/loganalytics/AzureLogAnalyticsReportingTask.java", "license": "apache-2.0", "size": 9931 }
[ "java.util.ArrayList", "java.util.List", "org.apache.nifi.controller.status.ConnectionStatus", "org.apache.nifi.controller.status.ProcessGroupStatus", "org.apache.nifi.controller.status.ProcessorStatus", "org.apache.nifi.reporting.azure.loganalytics.api.AzureLogAnalyticsMetricsFactory" ]
import java.util.ArrayList; import java.util.List; import org.apache.nifi.controller.status.ConnectionStatus; import org.apache.nifi.controller.status.ProcessGroupStatus; import org.apache.nifi.controller.status.ProcessorStatus; import org.apache.nifi.reporting.azure.loganalytics.api.AzureLogAnalyticsMetricsFactory;
import java.util.*; import org.apache.nifi.controller.status.*; import org.apache.nifi.reporting.azure.loganalytics.api.*;
[ "java.util", "org.apache.nifi" ]
java.util; org.apache.nifi;
1,889,359
Collection<String> getExtensions();
Collection<String> getExtensions();
/** * This method gets the list of all extensions associated with this {@link ContentType} including the * {@link #getDefaultExtension() default extension} (e.g. contains ".jpg" and ".jpeg"). * * @return a {@link Collection} of all additional file-extensions. */
This method gets the list of all extensions associated with this <code>ContentType</code> including the <code>#getDefaultExtension() default extension</code> (e.g. contains ".jpg" and ".jpeg")
getExtensions
{ "repo_name": "m-m-m/util", "path": "contenttype/src/main/java/net/sf/mmm/util/contenttype/api/ContentType.java", "license": "apache-2.0", "size": 4586 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
302,461
@Nonnull public java.util.concurrent.CompletableFuture<WorkbookChartSeries> putAsync(@Nonnull final WorkbookChartSeries newWorkbookChartSeries) { return sendAsync(HttpMethod.PUT, newWorkbookChartSeries); }
java.util.concurrent.CompletableFuture<WorkbookChartSeries> function(@Nonnull final WorkbookChartSeries newWorkbookChartSeries) { return sendAsync(HttpMethod.PUT, newWorkbookChartSeries); }
/** * Creates a WorkbookChartSeries with a new object * * @param newWorkbookChartSeries the object to create/update * @return a future with the result */
Creates a WorkbookChartSeries with a new object
putAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookChartSeriesRequest.java", "license": "mit", "size": 6385 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.WorkbookChartSeries", "javax.annotation.Nonnull" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookChartSeries; import javax.annotation.Nonnull;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
379,099
public void setArguments(List<String> arguments) { this.arguments = arguments; }
void function(List<String> arguments) { this.arguments = arguments; }
/** * Sets the arguments of the message. * @param arguments The arguments to set for the message. */
Sets the arguments of the message
setArguments
{ "repo_name": "Vyserion/lodbot", "path": "src/main/java/com/vyserion/lodbot/domain/Message.java", "license": "mit", "size": 2686 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
957,771
if (message.getHeaders().containsKey(FileHeaders.REMOTE_DIRECTORY)) { String filename = (String) message.getPayload(); String remoteDirectory = (String) message.getHeaders().get(FileHeaders.REMOTE_DIRECTORY); return getPath(remoteDirectory, filename); } return null; }
if (message.getHeaders().containsKey(FileHeaders.REMOTE_DIRECTORY)) { String filename = (String) message.getPayload(); String remoteDirectory = (String) message.getHeaders().get(FileHeaders.REMOTE_DIRECTORY); return getPath(remoteDirectory, filename); } return null; }
/** * Returns a remote file path for a message with a file name as payload and {@link FileHeaders#REMOTE_DIRECTORY} * included as a message header. * * @param message the message containing the header. * @return the file path. */
Returns a remote file path for a message with a file name as payload and <code>FileHeaders#REMOTE_DIRECTORY</code> included as a message header
getRemoteFilePath
{ "repo_name": "spring-cloud-stream-app-starters/core", "path": "common/stream-apps-file-common/src/main/java/org/springframework/cloud/stream/app/file/remote/FilePathUtils.java", "license": "apache-2.0", "size": 1872 }
[ "org.springframework.integration.file.FileHeaders" ]
import org.springframework.integration.file.FileHeaders;
import org.springframework.integration.file.*;
[ "org.springframework.integration" ]
org.springframework.integration;
913,108
public SubResource virtualWan() { return this.virtualWan; }
SubResource function() { return this.virtualWan; }
/** * Get the VirtualWAN to which the vpnSite belongs. * * @return the virtualWan value */
Get the VirtualWAN to which the vpnSite belongs
virtualWan
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/VpnSiteInner.java", "license": "mit", "size": 8016 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,151,459
protected void logStatusError(String detailMsg) throws MessagingException { getLogger().error(getStatusReport(detailMsg).toString()); }
void function(String detailMsg) throws MessagingException { getLogger().error(getStatusReport(detailMsg).toString()); }
/** * Log the status the current message as ERROR. * * @param detailMsg */
Log the status the current message as ERROR
logStatusError
{ "repo_name": "imatin/James", "path": "fetchmail/src/main/java/org/apache/james/fetchmail/MessageProcessor.java", "license": "apache-2.0", "size": 58058 }
[ "javax.mail.MessagingException" ]
import javax.mail.MessagingException;
import javax.mail.*;
[ "javax.mail" ]
javax.mail;
2,915,475
public void setRecordsManagementAdminService(RecordsManagementAdminService rmAdminService) { this.rmAdminService = rmAdminService; }
void function(RecordsManagementAdminService rmAdminService) { this.rmAdminService = rmAdminService; }
/** * Sets the RecordsManagementAdminService instance * * @param rmAdminService The RecordsManagementAdminService instance */
Sets the RecordsManagementAdminService instance
setRecordsManagementAdminService
{ "repo_name": "dnacreative/records-management", "path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/forms/RecordsManagementFormFilter.java", "license": "lgpl-3.0", "size": 6370 }
[ "org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService" ]
import org.alfresco.module.org_alfresco_module_rm.admin.RecordsManagementAdminService;
import org.alfresco.module.org_alfresco_module_rm.admin.*;
[ "org.alfresco.module" ]
org.alfresco.module;
2,081,156
void rateLimitFor(Duration duration);
void rateLimitFor(Duration duration);
/** * Sets a new rate limit that will be applied to every operation performed using {@link #withLimiter(Publisher)}. * * @param duration the {@link Duration} every new operation should wait before being used */
Sets a new rate limit that will be applied to every operation performed using <code>#withLimiter(Publisher)</code>
rateLimitFor
{ "repo_name": "austinv11/Discord4J", "path": "rest/src/main/java/discord4j/rest/request/GlobalRateLimiter.java", "license": "lgpl-3.0", "size": 2799 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
1,098,283
private void clearAllUsages() { if (logger.isInfoEnabled()) { logger.info("Disabled - clear non-missing user usages ..."); } final Map<String, NodeRef> users = new HashMap<String, NodeRef>();
void function() { if (logger.isInfoEnabled()) { logger.info(STR); } final Map<String, NodeRef> users = new HashMap<String, NodeRef>();
/** * Clear content usage for all users that have a usage. */
Clear content usage for all users that have a usage
clearAllUsages
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/repo/usage/UserUsageTrackingComponent.java", "license": "lgpl-3.0", "size": 26722 }
[ "java.util.HashMap", "java.util.Map", "org.alfresco.service.cmr.repository.NodeRef" ]
import java.util.HashMap; import java.util.Map; import org.alfresco.service.cmr.repository.NodeRef;
import java.util.*; import org.alfresco.service.cmr.repository.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
1,433,206
public void add(final String source, final T destination) { // replace multiple slashes with a single slash. String path = source.replaceAll("/+", "/"); path = (path.endsWith("/") && path.length() > 1) ? path.substring(0, path.length() - 1) : path; String[] parts ...
void function(final String source, final T destination) { String path = source.replaceAll("/+", "/"); path = (path.endsWith("/") && path.length() > 1) ? path.substring(0, path.length() - 1) : path; String[] parts = path.split("/"); StringBuilder sb = new StringBuilder(); List<String> groupNames = Lists.newArrayList(); ...
/** * Add a source and destination. * * @param source Source path to be routed. Routed path can have named wild-card pattern with braces "{}". * @param destination Destination of the path. */
Add a source and destination
add
{ "repo_name": "chanakaudaya/netty-http", "path": "src/main/java/co/cask/http/PatternPathRouterWithGroups.java", "license": "apache-2.0", "size": 6553 }
[ "com.google.common.collect.Lists", "java.util.List", "java.util.regex.Matcher", "java.util.regex.Pattern" ]
import com.google.common.collect.Lists; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern;
import com.google.common.collect.*; import java.util.*; import java.util.regex.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
935,950
public DataNodeType addDataNode(String name, String host, String path, List<AdaptorType> adaptors) throws InvalidElementException { AdaptorsListType adaptorsList = new AdaptorsListType(); if (adaptors != null) { for (AdaptorType a : adaptors) { adaptorsList.getAda...
DataNodeType function(String name, String host, String path, List<AdaptorType> adaptors) throws InvalidElementException { AdaptorsListType adaptorsList = new AdaptorsListType(); if (adaptors != null) { for (AdaptorType a : adaptors) { adaptorsList.getAdaptor().add(a); } } return this.addDataNode(name, host, path, adapt...
/** * Adds a new DataNode with the given information and returns the instance of the new DataNode. * * @param name Data node name * @param host Data node host * @param path Data node path * @param adaptors Data node List of adaptor objects * @return Added Data node description * ...
Adds a new DataNode with the given information and returns the instance of the new DataNode
addDataNode
{ "repo_name": "mF2C/COMPSs", "path": "compss/runtime/config/xml/resources/src/main/java/es/bsc/compss/types/resources/ResourcesFile.java", "license": "apache-2.0", "size": 130588 }
[ "es.bsc.compss.types.resources.exceptions.InvalidElementException", "es.bsc.compss.types.resources.jaxb.AdaptorType", "es.bsc.compss.types.resources.jaxb.AdaptorsListType", "es.bsc.compss.types.resources.jaxb.AttachedDisksListType", "es.bsc.compss.types.resources.jaxb.DataNodeType", "java.util.List" ]
import es.bsc.compss.types.resources.exceptions.InvalidElementException; import es.bsc.compss.types.resources.jaxb.AdaptorType; import es.bsc.compss.types.resources.jaxb.AdaptorsListType; import es.bsc.compss.types.resources.jaxb.AttachedDisksListType; import es.bsc.compss.types.resources.jaxb.DataNodeType; import java...
import es.bsc.compss.types.resources.exceptions.*; import es.bsc.compss.types.resources.jaxb.*; import java.util.*;
[ "es.bsc.compss", "java.util" ]
es.bsc.compss; java.util;
56,448
public boolean isContentAccessible(String pid) throws IOException;
boolean function(String pid) throws IOException;
/** * Checks whether content is acessiable * * @param pid Tested object * @return true if object is accessible * @throws IOException IO error has been occurred */
Checks whether content is acessiable
isContentAccessible
{ "repo_name": "ceskaexpedice/kramerius", "path": "shared/common/src/main/java/cz/incad/kramerius/FedoraAccess.java", "license": "gpl-3.0", "size": 15804 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,750,592
Set<String> getDBTags(){ return this.hsDBTags; }
Set<String> getDBTags(){ return this.hsDBTags; }
/** * Get the set of tag names that have the "db" option attached to them. This is to be used at {@link BasePage#fillFromDB(DBFunctions)}. * * @return the set of tag names with the "db" option */
Get the set of tag names that have the "db" option attached to them. This is to be used at <code>BasePage#fillFromDB(DBFunctions)</code>
getDBTags
{ "repo_name": "costing/lazyj", "path": "src/main/java/lazyj/page/TemplateParser.java", "license": "lgpl-3.0", "size": 11664 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,563,835
public void onNack(ResponseCode responseCode, String errorString, long version) throws ChannelException; } public interface Transmitter { public final class ClientMessage { private final WaveletDelta delta; private final boolean commitRequest; public ClientMessage(WaveletD...
void function(ResponseCode responseCode, String errorString, long version) throws ChannelException; } public interface Transmitter { public final class ClientMessage { private final WaveletDelta delta; private final boolean commitRequest; public ClientMessage(WaveletDelta delta, boolean commitRequest) { this.delta = de...
/** * Called when the server rejects a delta operation sent on this * connection. * @param responseCode reason for nack * @param errorString optional explanation of error * @param version server's wavelet version at time of rejection * * @throws ChannelException if the channel fails ...
Called when the server rejects a delta operation sent on this connection
onNack
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/concurrencycontrol/channel/WaveletDeltaChannel.java", "license": "apache-2.0", "size": 5911 }
[ "org.waveprotocol.wave.concurrencycontrol.common.ChannelException", "org.waveprotocol.wave.concurrencycontrol.common.ResponseCode", "org.waveprotocol.wave.model.operation.wave.WaveletDelta" ]
import org.waveprotocol.wave.concurrencycontrol.common.ChannelException; import org.waveprotocol.wave.concurrencycontrol.common.ResponseCode; import org.waveprotocol.wave.model.operation.wave.WaveletDelta;
import org.waveprotocol.wave.concurrencycontrol.common.*; import org.waveprotocol.wave.model.operation.wave.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
460,521
public void testNeverContainsNull() { Deque<?>[] qs = { new ConcurrentLinkedDeque<Object>(), populatedDeque(2), }; for (Deque<?> q : qs) { assertFalse(q.contains(null)); try { assertFalse(q.remove(null)); should...
void function() { Deque<?>[] qs = { new ConcurrentLinkedDeque<Object>(), populatedDeque(2), }; for (Deque<?> q : qs) { assertFalse(q.contains(null)); try { assertFalse(q.remove(null)); shouldThrow(); } catch (NullPointerException success) {} try { assertFalse(q.removeFirstOccurrence(null)); shouldThrow(); } catch (Null...
/** * contains(null) always return false. * remove(null) always throws NullPointerException. */
contains(null) always return false. remove(null) always throws NullPointerException
testNeverContainsNull
{ "repo_name": "life-beam/j2objc", "path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ConcurrentLinkedDequeTest.java", "license": "apache-2.0", "size": 26542 }
[ "java.util.Deque", "java.util.concurrent.ConcurrentLinkedDeque" ]
import java.util.Deque; import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,381,456
public Date getLastUpdated( ) { return this.lastUpdated; }
Date function( ) { return this.lastUpdated; }
/** * Returns the value for the member attribute <b>lastUpdated</b> * @return Date - value of member attribute <b>lastUpdated</b>. */
Returns the value for the member attribute lastUpdated
getLastUpdated
{ "repo_name": "gzsombor/ranger", "path": "security-admin/src/main/java/org/apache/ranger/view/VXPolicyExportAudit.java", "license": "apache-2.0", "size": 7308 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
380,312
public static int getKeyFontHeight(PCAGraph graph) { FontData fd=graph.getKeyFont(); GC gc = new GC(UI.display); gc.setFont(new Font(UI.display,fd)); int height = gc.textExtent("pP").y; gc.dispose(); return height; }
static int function(PCAGraph graph) { FontData fd=graph.getKeyFont(); GC gc = new GC(UI.display); gc.setFont(new Font(UI.display,fd)); int height = gc.textExtent("pP").y; gc.dispose(); return height; }
/** * This method calculates the height of the font of the key * on the given PCA Graph * @param graph the relevant graph * @return the height of the font in the key in pixels */
This method calculates the height of the font of the key on the given PCA Graph
getKeyFontHeight
{ "repo_name": "shaze/genesis", "path": "src/pca/PCAWorkflow.java", "license": "agpl-3.0", "size": 36965 }
[ "org.eclipse.swt.graphics.Font", "org.eclipse.swt.graphics.FontData" ]
import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
319,755
private void populateSections() { if(log.isDebugEnabled()) log.debug("populating sections"); Course course = getCourse(); sections = new ArrayList<CourseSection>(); StringBuilder rowClasses = new StringBuilder(); if(StringUtils.trimToNull(category) != null) { if(log.isDebugEnabled()) log.debug("popul...
void function() { if(log.isDebugEnabled()) log.debug(STR); Course course = getCourse(); sections = new ArrayList<CourseSection>(); StringBuilder rowClasses = new StringBuilder(); if(StringUtils.trimToNull(category) != null) { if(log.isDebugEnabled()) log.debug(STR); String categoryName = getCategoryName(category); int ...
/** * Populates the section collection and row css classes. * */
Populates the section collection and row css classes
populateSections
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "sections/sections-app/src/java/org/sakaiproject/tool/section/jsf/backingbean/AddSectionsBean.java", "license": "apache-2.0", "size": 17429 }
[ "java.util.ArrayList", "org.apache.commons.lang.StringUtils", "org.sakaiproject.section.api.coursemanagement.Course", "org.sakaiproject.section.api.coursemanagement.CourseSection" ]
import java.util.ArrayList; import org.apache.commons.lang.StringUtils; import org.sakaiproject.section.api.coursemanagement.Course; import org.sakaiproject.section.api.coursemanagement.CourseSection;
import java.util.*; import org.apache.commons.lang.*; import org.sakaiproject.section.api.coursemanagement.*;
[ "java.util", "org.apache.commons", "org.sakaiproject.section" ]
java.util; org.apache.commons; org.sakaiproject.section;
1,681,621
public void setPersonSMSList(List<DetailedPerson> personSMSList) { this.personSMSList = personSMSList; }
void function(List<DetailedPerson> personSMSList) { this.personSMSList = personSMSList; }
/** * Sets the person sms list. * * @param personSMSList * the new person sms list */
Sets the person sms list
setPersonSMSList
{ "repo_name": "gudipatiharitha/medicmobile", "path": "modules/medicmobile/trunk/src/main/java/org/medicmobile/map/MapToSendSMS.java", "license": "bsd-3-clause", "size": 11263 }
[ "java.util.List", "org.medicmobile.model.DetailedPerson" ]
import java.util.List; import org.medicmobile.model.DetailedPerson;
import java.util.*; import org.medicmobile.model.*;
[ "java.util", "org.medicmobile.model" ]
java.util; org.medicmobile.model;
1,304,836