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
@JsonProperty( "aws_ap_southeast_1" ) public String getAwsApSoutheast1() { return awsApSoutheast1; }
@JsonProperty( STR ) String function() { return awsApSoutheast1; }
/** * Gets aws ap southeast 1. * * @return the aws ap southeast 1 */
Gets aws ap southeast 1
getAwsApSoutheast1
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/policies/models/PolicySettings.java", "license": "mit", "size": 90382 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,164,762
public final BigInteger getCrtCoefficient() { return this.crtCoefficient; }
final BigInteger function() { return this.crtCoefficient; }
/** * Returns the prime's crtCoefficient. * * @return the crtCoefficient. */
Returns the prime's crtCoefficient
getCrtCoefficient
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/java/security/spec/RSAOtherPrimeInfo.java", "license": "mit", "size": 3738 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,893,836
public synchronized void done(TaskAttemptID taskid) throws IOException { TaskInProgress tip = tasks.get(taskid); commitResponses.remove(taskid); if (tip != null) { tip.reportDone(); } else { LOG.warn("Unknown child task done: "+taskid+". Ignored."); } }
synchronized void function(TaskAttemptID taskid) throws IOException { TaskInProgress tip = tasks.get(taskid); commitResponses.remove(taskid); if (tip != null) { tip.reportDone(); } else { LOG.warn(STR+taskid+STR); } }
/** * The task is done. */
The task is done
done
{ "repo_name": "zyguan/HDFS-503-on-0.20.2", "path": "src/mapred/org/apache/hadoop/mapred/TaskTracker.java", "license": "apache-2.0", "size": 112048 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
448,486
public void removeChangeListener (ChangeListener listener) { _listeners.remove(listener); }
void function (ChangeListener listener) { _listeners.remove(listener); }
/** * Removes the specified listener from the model. */
Removes the specified listener from the model
removeChangeListener
{ "repo_name": "samskivert/jme-bui", "path": "src/main/java/com/jmex/bui/BoundedRangeModel.java", "license": "lgpl-2.1", "size": 6396 }
[ "com.jmex.bui.event.ChangeListener" ]
import com.jmex.bui.event.ChangeListener;
import com.jmex.bui.event.*;
[ "com.jmex.bui" ]
com.jmex.bui;
2,395,543
@NonNull public final String getNameShort() { switch (this) { case JANUARY: return getCalendar(new DateItem(2000, 0, 1)).getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault()); case FEBRUARY: return getCalen...
final String function() { switch (this) { case JANUARY: return getCalendar(new DateItem(2000, 0, 1)).getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault()); case FEBRUARY: return getCalendar(new DateItem(2000, 1, 1)).getDisplayName(Calendar.MONTH, Calendar.SHORT, Locale.getDefault()); case MARCH: return ge...
/** * Auto Translated * * @return Abbreviated month name */
Auto Translated
getNameShort
{ "repo_name": "morris-james/appbaselibrary", "path": "src/main/java/com/jamesmorrisstudios/appbaselibrary/time/UtilsTime.java", "license": "apache-2.0", "size": 47649 }
[ "java.util.Calendar", "java.util.Locale" ]
import java.util.Calendar; import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,458,529
List<Asset> findAssetsByLikeLabel(String label); // ========================= METHODS: RESOURCES (lazy-initialized, find*() methods)
List<Asset> findAssetsByLikeLabel(String label);
/** * Find assets that match (LIKE) an asset label. * * @param label * asset label (description) substring * @return list matching resources */
Find assets that match (LIKE) an asset label
findAssetsByLikeLabel
{ "repo_name": "openfurther/further-open-core", "path": "mdr/mdr-api/src/main/java/edu/utah/further/mdr/api/service/asset/AssetService.java", "license": "apache-2.0", "size": 10422 }
[ "edu.utah.further.mdr.api.domain.asset.Asset", "java.util.List" ]
import edu.utah.further.mdr.api.domain.asset.Asset; import java.util.List;
import edu.utah.further.mdr.api.domain.asset.*; import java.util.*;
[ "edu.utah.further", "java.util" ]
edu.utah.further; java.util;
2,228,739
public List<String> toList(){ return paramList; }
List<String> function(){ return paramList; }
/** * Returns the param list * @return */
Returns the param list
toList
{ "repo_name": "impetus-opensource/jumbune", "path": "common/src/main/java/org/jumbune/common/utils/ArrayParamBuilder.java", "license": "lgpl-3.0", "size": 827 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,009,034
public DatanodeInfo getCurrentDatanode() { return currentNode; }
DatanodeInfo function() { return currentNode; }
/** * Returns the datanode from which the stream is currently reading. */
Returns the datanode from which the stream is currently reading
getCurrentDatanode
{ "repo_name": "yelshater/hadoop-2.3.0", "path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java", "license": "apache-2.0", "size": 62394 }
[ "org.apache.hadoop.hdfs.protocol.DatanodeInfo" ]
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import org.apache.hadoop.hdfs.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
264,627
@SuppressWarnings("unchecked") public static <K, V> MultiValueMap<K, V> unmodifiableMultiValueMap(MultiValueMap<? extends K, ? extends V> map) { Assert.notNull(map, "'map' must not be null"); Map<K, List<V>> result = new LinkedHashMap<K, List<V>>(map.size()); for (Map.Entry<? extends K, ? extends List<? exten...
@SuppressWarnings(STR) static <K, V> MultiValueMap<K, V> function(MultiValueMap<? extends K, ? extends V> map) { Assert.notNull(map, STR); Map<K, List<V>> result = new LinkedHashMap<K, List<V>>(map.size()); for (Map.Entry<? extends K, ? extends List<? extends V>> entry : map.entrySet()) { List<? extends V> values = Col...
/** * Return an unmodifiable view of the specified multi-value map. * @param map the map for which an unmodifiable view is to be returned. * @return an unmodifiable view of the specified multi-value map. * @since 3.1 */
Return an unmodifiable view of the specified multi-value map
unmodifiableMultiValueMap
{ "repo_name": "lj654548718/ispring", "path": "src/main/java/io/ispring/ori/utils/CollectionUtils.java", "license": "apache-2.0", "size": 14810 }
[ "java.util.Collections", "java.util.Enumeration", "java.util.Iterator", "java.util.LinkedHashMap", "java.util.List", "java.util.Map" ]
import java.util.Collections; import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
629,401
public T caseBinaryCondition(BinaryCondition object) { return null; }
T function(BinaryCondition object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>Binary Condition</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result o...
Returns the result of interpreting the object as an instance of 'Binary Condition'. This implementation returns null; returning a non-null result will terminate the switch.
caseBinaryCondition
{ "repo_name": "nhnghia/schora", "path": "src/fr/lri/schora/expr/util/ExprSwitch.java", "license": "gpl-2.0", "size": 21477 }
[ "fr.lri.schora.expr.BinaryCondition" ]
import fr.lri.schora.expr.BinaryCondition;
import fr.lri.schora.expr.*;
[ "fr.lri.schora" ]
fr.lri.schora;
1,117,382
public void getResourceStatus(String stopId, ApiCallback<List<ResourceStatus>> callback) { Call<ApiResponse<List<ResourceStatus>>> call = api.getResourceStatus(stopId, VERSION, key); call.enqueue(wrapCallback(callback)); }
void function(String stopId, ApiCallback<List<ResourceStatus>> callback) { Call<ApiResponse<List<ResourceStatus>>> call = api.getResourceStatus(stopId, VERSION, key); call.enqueue(wrapCallback(callback)); }
/** * Get the resource status of a stopId such as a car park or bike dock * @param stopId * @param callback */
Get the resource status of a stopId such as a car park or bike dock
getResourceStatus
{ "repo_name": "urbanthings/urbanthings-sdk-android", "path": "urbanthings-android/src/main/java/io/urbanthings/api/transit/TransitApi.java", "license": "apache-2.0", "size": 12561 }
[ "io.urbanthings.api.ApiCallback", "io.urbanthings.api.transit.model.ApiResponse", "io.urbanthings.api.transit.model.ResourceStatus", "java.util.List" ]
import io.urbanthings.api.ApiCallback; import io.urbanthings.api.transit.model.ApiResponse; import io.urbanthings.api.transit.model.ResourceStatus; import java.util.List;
import io.urbanthings.api.*; import io.urbanthings.api.transit.model.*; import java.util.*;
[ "io.urbanthings.api", "java.util" ]
io.urbanthings.api; java.util;
2,682,272
@Test public void findMatchingProjectFindsParentProject() { // Given String aConfig = "cfg", aGroup = "x.y.x", aName = "nnn", aVersion = "666"; ModuleDependencySpec aDependencySpec = new ModuleDependencySpec(aConfig, aGroup, aName, aVersion); Project aProject = ProjectBuilder...
void function() { String aConfig = "cfg", aGroup = "x.y.x", aName = "nnn", aVersion = "666"; ModuleDependencySpec aDependencySpec = new ModuleDependencySpec(aConfig, aGroup, aName, aVersion); Project aProject = ProjectBuilder.builder().withName(aName).build(); aProject.setGroup(aGroup); aProject.setVersion(aVersion); P...
/** * {@code findMatchingProject()} should return a sub-project of the starting project if it * matches the dependency specification. */
findMatchingProject() should return a sub-project of the starting project if it matches the dependency specification
findMatchingProjectFindsParentProject
{ "repo_name": "handmadecode/quill", "path": "src/test/java/org/myire/quill/dependency/DependenciesTest.java", "license": "apache-2.0", "size": 8135 }
[ "org.gradle.api.Project", "org.gradle.testfixtures.ProjectBuilder", "org.junit.Assert" ]
import org.gradle.api.Project; import org.gradle.testfixtures.ProjectBuilder; import org.junit.Assert;
import org.gradle.api.*; import org.gradle.testfixtures.*; import org.junit.*;
[ "org.gradle.api", "org.gradle.testfixtures", "org.junit" ]
org.gradle.api; org.gradle.testfixtures; org.junit;
2,084,195
public CellValueRecordInterface[] getValueRecords() { List<CellValueRecordInterface> temp = new ArrayList<CellValueRecordInterface>(); for (int rowIx = 0; rowIx < records.length; rowIx++) { CellValueRecordInterface[] rowCells = records[rowIx]; if (rowCells == null) { continue; } for (int colIx =...
CellValueRecordInterface[] function() { List<CellValueRecordInterface> temp = new ArrayList<CellValueRecordInterface>(); for (int rowIx = 0; rowIx < records.length; rowIx++) { CellValueRecordInterface[] rowCells = records[rowIx]; if (rowCells == null) { continue; } for (int colIx = 0; colIx < rowCells.length; colIx++) ...
/** * Gets all the cell records contained in this aggregate. * Note {@link BlankRecord}s appear separate (not in {@link MulBlankRecord}s). */
Gets all the cell records contained in this aggregate. Note <code>BlankRecord</code>s appear separate (not in <code>MulBlankRecord</code>s)
getValueRecords
{ "repo_name": "tobyclemson/msci-project", "path": "vendor/poi-3.6/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java", "license": "mit", "size": 10322 }
[ "java.util.ArrayList", "java.util.List", "org.apache.poi.hssf.record.CellValueRecordInterface" ]
import java.util.ArrayList; import java.util.List; import org.apache.poi.hssf.record.CellValueRecordInterface;
import java.util.*; import org.apache.poi.hssf.record.*;
[ "java.util", "org.apache.poi" ]
java.util; org.apache.poi;
2,133,565
@Api(1.0) @NonNull public Halo.Installer onCreateInstaller() { return Halo.installer(this); }
@Api(1.0) Halo.Installer function() { return Halo.installer(this); }
/** * Creates the installer for Halo. * * @return The installer for Halo. */
Creates the installer for Halo
onCreateInstaller
{ "repo_name": "mobgen/halo-android", "path": "sdk/halo-sdk/src/main/java/com/mobgen/halo/android/sdk/api/HaloApplication.java", "license": "apache-2.0", "size": 2178 }
[ "com.mobgen.halo.android.framework.common.annotations.Api" ]
import com.mobgen.halo.android.framework.common.annotations.Api;
import com.mobgen.halo.android.framework.common.annotations.*;
[ "com.mobgen.halo" ]
com.mobgen.halo;
1,384,434
public void evalQueryString(RobotsPolicy policy, Robotstxt rtxt) throws IOException { CrawlURI qs = new CrawlURI(UURIFactory.getInstance("http://example.com/ok?butno=something")); assertFalse("ignoring query-string", policy.allows("Mozilla allowbot2 99.9", qs, rtxt)); }
void function(RobotsPolicy policy, Robotstxt rtxt) throws IOException { CrawlURI qs = new CrawlURI(UURIFactory.getInstance(STRignoring query-stringSTRMozilla allowbot2 99.9", qs, rtxt)); }
/** * HER-1976: query-string disallow * * @param policy * @param r * @throws IOException */
HER-1976: query-string disallow
evalQueryString
{ "repo_name": "searchtechnologies/heritrix-connector", "path": "engine-3.1.1/modules/src/test/java/org/archive/modules/net/RobotsPolicyTest.java", "license": "apache-2.0", "size": 1663 }
[ "java.io.IOException", "org.archive.modules.CrawlURI", "org.archive.net.UURIFactory" ]
import java.io.IOException; import org.archive.modules.CrawlURI; import org.archive.net.UURIFactory;
import java.io.*; import org.archive.modules.*; import org.archive.net.*;
[ "java.io", "org.archive.modules", "org.archive.net" ]
java.io; org.archive.modules; org.archive.net;
2,099,676
public void addRoute(HttpMethod httpMethod, String path, Object controller, Method method) { // validate signature Class<?>[] paramTypes = method.getParameterTypes(); if (paramTypes.length != 2 || !paramTypes[0].equals(Request.class) || !paramTypes[1].equals(Response.class)) { throw new RoutesException("Exp...
void function(HttpMethod httpMethod, String path, Object controller, Method method) { Class<?>[] paramTypes = method.getParameterTypes(); if (paramTypes.length != 2 !paramTypes[0].equals(Request.class) !paramTypes[1].equals(Response.class)) { throw new RoutesException(STR + STR); } method.setAccessible(true); routes.ad...
/** * Creates a {@link Route} object from the received arguments and adds it to the list of routes. * * @param httpMethod the HTTP method to which this route is going to respond. * @param path the path to which this route is going to respond. * @param controller the object that will be invoked when this route...
Creates a <code>Route</code> object from the received arguments and adds it to the list of routes
addRoute
{ "repo_name": "elibom/jogger", "path": "src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java", "license": "mit", "size": 13551 }
[ "com.elibom.jogger.http.Request", "com.elibom.jogger.http.Response", "com.elibom.jogger.middleware.router.Route", "java.lang.reflect.Method" ]
import com.elibom.jogger.http.Request; import com.elibom.jogger.http.Response; import com.elibom.jogger.middleware.router.Route; import java.lang.reflect.Method;
import com.elibom.jogger.http.*; import com.elibom.jogger.middleware.router.*; import java.lang.reflect.*;
[ "com.elibom.jogger", "java.lang" ]
com.elibom.jogger; java.lang;
2,232,709
public int fillPointWithCoords(Point p);
int function(Point p);
/** * Get the mouse pointer coordinates and store them in p (obviously non-null) * returns the index of the current screen device of the mouse. */
Get the mouse pointer coordinates and store them in p (obviously non-null) returns the index of the current screen device of the mouse
fillPointWithCoords
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/awt/peer/MouseInfoPeer.java", "license": "gpl-2.0", "size": 2293 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,835,674
public void saveNamespace(boolean renewCheckpointTime) throws IOException { saveNamespace(false, renewCheckpointTime); }
void function(boolean renewCheckpointTime) throws IOException { saveNamespace(false, renewCheckpointTime); }
/** * Save the contents of the FS image * and create empty edits. */
Save the contents of the FS image and create empty edits
saveNamespace
{ "repo_name": "rvadali/fb-raid-refactoring", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java", "license": "apache-2.0", "size": 83874 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,442,063
List<String> findDataFormatNames(String filter);
List<String> findDataFormatNames(String filter);
/** * Find all the data format names from the Camel catalog that matches the label */
Find all the data format names from the Camel catalog that matches the label
findDataFormatNames
{ "repo_name": "gilfernandes/camel", "path": "platforms/catalog/src/main/java/org/apache/camel/catalog/CamelCatalog.java", "license": "apache-2.0", "size": 13809 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
645,331
protected void validateCloneSolution(SolutionG originalSolution, SolutionG cloneSolution) { for (PropertyAccessor propertyAccessor : solutionDescriptor.getEntityPropertyAccessorMap().values()) { Object originalProperty = propertyAccessor.executeGetter(originalSolu...
void function(SolutionG originalSolution, SolutionG cloneSolution) { for (PropertyAccessor propertyAccessor : solutionDescriptor.getEntityPropertyAccessorMap().values()) { Object originalProperty = propertyAccessor.executeGetter(originalSolution); if (originalProperty != null) { Object cloneProperty = propertyAccessor....
/** * Fails fast if {@link #isFieldAnEntityPropertyOnSolution} assumptions were wrong. * @param originalSolution never null * @param cloneSolution never null */
Fails fast if <code>#isFieldAnEntityPropertyOnSolution</code> assumptions were wrong
validateCloneSolution
{ "repo_name": "gurhann/AutoTimeTable", "path": "optaplanner-core/src/main/java/org/optaplanner/core/impl/domain/solution/cloner/FieldAccessingSolutionCloner.java", "license": "apache-2.0", "size": 20368 }
[ "org.optaplanner.core.impl.domain.common.PropertyAccessor" ]
import org.optaplanner.core.impl.domain.common.PropertyAccessor;
import org.optaplanner.core.impl.domain.common.*;
[ "org.optaplanner.core" ]
org.optaplanner.core;
2,260,376
public void testRefsCacheAfterUpdate() throws Exception { // Do not use the defalt repo for this case. Map<String, Ref> allRefs = db.getAllRefs(); ObjectId oldValue = db.resolve("HEAD"); ObjectId newValue = db.resolve("HEAD^"); // first make HEAD refer to loose ref RefUpdate updateRef = db.updateRef(Cons...
void function() throws Exception { Map<String, Ref> allRefs = db.getAllRefs(); ObjectId oldValue = db.resolve("HEAD"); ObjectId newValue = db.resolve("HEAD^"); RefUpdate updateRef = db.updateRef(Constants.HEAD); updateRef.setForceUpdate(true); updateRef.setNewObjectId(newValue); Result update = updateRef.update(); asse...
/** * Test case originating from * <a href="http://bugs.eclipse.org/285991">bug 285991</a> * * Make sure the in memory cache is updated properly after * update of symref. This one did not fail because the * ref was packed due to implementation issues. * * @throws Exception */
Test case originating from bug 285991 Make sure the in memory cache is updated properly after update of symref. This one did not fail because the ref was packed due to implementation issues
testRefsCacheAfterUpdate
{ "repo_name": "imyousuf/jgit", "path": "org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RefUpdateTest.java", "license": "bsd-3-clause", "size": 29369 }
[ "java.util.Map", "org.eclipse.jgit.lib.RefUpdate" ]
import java.util.Map; import org.eclipse.jgit.lib.RefUpdate;
import java.util.*; import org.eclipse.jgit.lib.*;
[ "java.util", "org.eclipse.jgit" ]
java.util; org.eclipse.jgit;
231,311
default SqsEndpointConsumerBuilder headerFilterStrategy( HeaderFilterStrategy headerFilterStrategy) { doSetProperty("headerFilterStrategy", headerFilterStrategy); return this; }
default SqsEndpointConsumerBuilder headerFilterStrategy( HeaderFilterStrategy headerFilterStrategy) { doSetProperty(STR, headerFilterStrategy); return this; }
/** * To use a custom HeaderFilterStrategy to map headers to/from Camel. * * The option is a: * <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. * * Group: common */
To use a custom HeaderFilterStrategy to map headers to/from Camel. The option is a: <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: common
headerFilterStrategy
{ "repo_name": "ullgren/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/SqsEndpointBuilderFactory.java", "license": "apache-2.0", "size": 88158 }
[ "org.apache.camel.spi.HeaderFilterStrategy" ]
import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
2,372,525
public void writeScript(String dir, String filename, AggregatedValue[] data) throws IOException { Writer w = new Writer(dir, filename); // write script header List<String> script = this.getScript(); for (String line : script) { w.writeln(line); } // write script data for (int i = 0; i < data.le...
void function(String dir, String filename, AggregatedValue[] data) throws IOException { Writer w = new Writer(dir, filename); List<String> script = this.getScript(); for (String line : script) { w.writeln(line); } for (int i = 0; i < data.length; i++) { String temp = STRPLOTDATA_DELIMITERSTREOF"); w.close(); }
/** * Writes the gnuplot script for an array of AggregatedValue objects to the * destination directory * * @param dir * destination directory * @param filename * script filename * @param data * input data gathered in Plotting.plotValue * @throws IOException * ...
Writes the gnuplot script for an array of AggregatedValue objects to the destination directory
writeScript
{ "repo_name": "Rwilmes/DNA3", "path": "src/dna/plot/Plot.java", "license": "gpl-3.0", "size": 12126 }
[ "dna.io.Writer", "dna.series.aggdata.AggregatedValue", "java.io.IOException", "java.util.List" ]
import dna.io.Writer; import dna.series.aggdata.AggregatedValue; import java.io.IOException; import java.util.List;
import dna.io.*; import dna.series.aggdata.*; import java.io.*; import java.util.*;
[ "dna.io", "dna.series.aggdata", "java.io", "java.util" ]
dna.io; dna.series.aggdata; java.io; java.util;
829,076
protected void reset(long offset, int bufferSize, int maxRecords) { ByteBuffer data = ByteBuffer.allocate(bufferSize); ByteBuffer offsets = ByteBuffer.allocate((maxRecords + 1) * Long.BYTES); ByteBuffer keys = ByteBuffer.allocate(maxRecords * Long.BYTES); reset(offset, data, offsets,...
void function(long offset, int bufferSize, int maxRecords) { ByteBuffer data = ByteBuffer.allocate(bufferSize); ByteBuffer offsets = ByteBuffer.allocate((maxRecords + 1) * Long.BYTES); ByteBuffer keys = ByteBuffer.allocate(maxRecords * Long.BYTES); reset(offset, data, offsets, keys); }
/** * Resets the buffer contents. * @param offset the address offset * @param bufferSize the buffer size * @param maxRecords the max record count */
Resets the buffer contents
reset
{ "repo_name": "asakusafw/asakusafw-m3bp", "path": "bridge/runtime/src/test/java/com/asakusafw/m3bp/mirror/MockPageDataOutput.java", "license": "apache-2.0", "size": 3923 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
687,641
public int hashCode() { int result = 31*declaringClass.hashCode() + methodName.hashCode(); result = 31*result + Objects.hashCode(fileName); result = 31*result + lineNumber; return result; } private static final long serialVersionUID = 6992337162326171013L;
int function() { int result = 31*declaringClass.hashCode() + methodName.hashCode(); result = 31*result + Objects.hashCode(fileName); result = 31*result + lineNumber; return result; } private static final long serialVersionUID = 6992337162326171013L;
/** * Returns a hash code value for this stack trace element. */
Returns a hash code value for this stack trace element
hashCode
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/java/lang/StackTraceElement.java", "license": "apache-2.0", "size": 8481 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
246,857
private static BufferedImage loadImageResource(final String name) { try (InputStream imgStream = Images.class.getResourceAsStream(RES_DIRECTORY + name)) { HANDLER.setFormatter(new OwnFormatter()); LOGGER.addHandler(HANDLER); // Decompress image ...
static BufferedImage function(final String name) { try (InputStream imgStream = Images.class.getResourceAsStream(RES_DIRECTORY + name)) { HANDLER.setFormatter(new OwnFormatter()); LOGGER.addHandler(HANDLER); return ImageIO.read(imgStream); } catch (IOException e) { LOGGER.severe(STR); throw new RuntimeException(STR + n...
/** * Loads an image from the resources directory. * * @param name image name * @return the loaded image */
Loads an image from the resources directory
loadImageResource
{ "repo_name": "ecoparts/Prak5", "path": "src/uk/ac/york/minesweeper/Images.java", "license": "apache-2.0", "size": 2416 }
[ "java.awt.image.BufferedImage", "java.io.IOException", "java.io.InputStream", "javax.imageio.ImageIO" ]
import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import javax.imageio.ImageIO;
import java.awt.image.*; import java.io.*; import javax.imageio.*;
[ "java.awt", "java.io", "javax.imageio" ]
java.awt; java.io; javax.imageio;
1,530,208
protected void addR3namePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_DestinationData_r3name_feature"), getString("_UI_PropertyDescriptor_...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), RfcPackage.Literals.DESTINATION_DATA__R3NAME, true, false, false, ItemPropertyDescriptor.GENERIC_...
/** * This adds a property descriptor for the R3name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the R3name feature.
addR3namePropertyDescriptor
{ "repo_name": "janstey/fuse-1", "path": "components/camel-sap/org.fusesource.camel.component.sap.model.edit/src/org/fusesource/camel/component/sap/model/rfc/provider/DestinationDataItemProvider.java", "license": "apache-2.0", "size": 44078 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.fusesource.camel.component.sap.model.rfc.RfcPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.fusesource.camel.component.sap.model.rfc.RfcPackage;
import org.eclipse.emf.edit.provider.*; import org.fusesource.camel.component.sap.model.rfc.*;
[ "org.eclipse.emf", "org.fusesource.camel" ]
org.eclipse.emf; org.fusesource.camel;
2,764,052
public void setCharacterEncoding(String env) throws UnsupportedEncodingException;
void function(String env) throws UnsupportedEncodingException;
/** * Overrides the name of the character encoding used in the body of this request. This method * must be called prior to reading request parameters or reading input using getReader(). * * @param env a <code>String</code> containing the name of the character encoding. * @throws java.io.UnsupportedEncod...
Overrides the name of the character encoding used in the body of this request. This method must be called prior to reading request parameters or reading input using getReader()
setCharacterEncoding
{ "repo_name": "dalinhuang/suduforum", "path": "src/net/jforum/context/RequestContext.java", "license": "bsd-3-clause", "size": 16813 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,104,208
public void saveToRMF(ArrayList pointList, IRasterDataSource dataset) { if (!RasterToolsUtil.messageBoxYesOrNot("sobreescribir_puntos", null)) return; GeoPointList geoPointList = new GeoPointList(); for (int i = 0; i < pointList.size(); i++) geoPointList.add(((GPGraphic) pointList.get(i)).getGeoPoint())...
void function(ArrayList pointList, IRasterDataSource dataset) { if (!RasterToolsUtil.messageBoxYesOrNot(STR, null)) return; GeoPointList geoPointList = new GeoPointList(); for (int i = 0; i < pointList.size(); i++) geoPointList.add(((GPGraphic) pointList.get(i)).getGeoPoint()); try { for (int i = 0; i < dataset.getData...
/** * Salva a rmf la lista de puntos * @param pointList * @param parent * @param dataset */
Salva a rmf la lista de puntos
saveToRMF
{ "repo_name": "iCarto/siga", "path": "extGeoreferencing/src/org/gvsig/georeferencing/main/GeoPointsPersistence.java", "license": "gpl-3.0", "size": 8841 }
[ "java.util.ArrayList", "org.gvsig.georeferencing.ui.zoom.layers.GPGraphic", "org.gvsig.raster.dataset.IRasterDataSource", "org.gvsig.raster.dataset.serializer.RmfSerializerException", "org.gvsig.raster.datastruct.GeoPointList", "org.gvsig.raster.util.RasterToolsUtil" ]
import java.util.ArrayList; import org.gvsig.georeferencing.ui.zoom.layers.GPGraphic; import org.gvsig.raster.dataset.IRasterDataSource; import org.gvsig.raster.dataset.serializer.RmfSerializerException; import org.gvsig.raster.datastruct.GeoPointList; import org.gvsig.raster.util.RasterToolsUtil;
import java.util.*; import org.gvsig.georeferencing.ui.zoom.layers.*; import org.gvsig.raster.dataset.*; import org.gvsig.raster.dataset.serializer.*; import org.gvsig.raster.datastruct.*; import org.gvsig.raster.util.*;
[ "java.util", "org.gvsig.georeferencing", "org.gvsig.raster" ]
java.util; org.gvsig.georeferencing; org.gvsig.raster;
145,966
public int getProgramId(IProgressMonitor progressMonitor, int pid) throws IOException { int progpid = 0; if (progressMonitor == null) { throw new NullPointerException(); } if (!isKilled() && (pm != null)) { try { // Connect to prog...
int function(IProgressMonitor progressMonitor, int pid) throws IOException { int progpid = 0; if (progressMonitor == null) { throw new NullPointerException(); } if (!isKilled() && (pm != null)) { try { pm.connect(); if (progressMonitor.isCanceled()) { throw new OperationCanceledException(); } progpid = pmHandler.getPro...
/** * Translate a process, block, or segment ID to a program ID if this target * is connected and has a program manager. * * @param progressMonitor the progress monitor used for cancellation. * @param pid a process, block, or segment ID. * @return the corresponding program ID, or 0...
Translate a process, block, or segment ID to a program ID if this target is connected and has a program manager
getProgramId
{ "repo_name": "debabratahazra/OptimaLA", "path": "Optima/com.ose.system/src/com/ose/system/Target.java", "license": "epl-1.0", "size": 501290 }
[ "java.io.IOException", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.core.runtime.OperationCanceledException" ]
import java.io.IOException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.OperationCanceledException;
import java.io.*; import org.eclipse.core.runtime.*;
[ "java.io", "org.eclipse.core" ]
java.io; org.eclipse.core;
598,733
Arrays.fill(velocity, 0); best = present = ValuePoint.at(Point.random(function.getDimension(), min, max), function); }
Arrays.fill(velocity, 0); best = present = ValuePoint.at(Point.random(function.getDimension(), min, max), function); }
/** * Generates randomly positioned particle within the given bounds. Sets zero velocity. * @param min Lower limit on particle's position. * @param max Upper limit on particle's position. */
Generates randomly positioned particle within the given bounds. Sets zero velocity
init
{ "repo_name": "dhonza/JCOOL", "path": "jcool/benchmark/src/main/java/cz/cvut/felk/cig/jcool/benchmark/method/hgapso/Individual.java", "license": "lgpl-3.0", "size": 3743 }
[ "cz.cvut.felk.cig.jcool.core.Point", "cz.cvut.felk.cig.jcool.core.ValuePoint", "java.util.Arrays" ]
import cz.cvut.felk.cig.jcool.core.Point; import cz.cvut.felk.cig.jcool.core.ValuePoint; import java.util.Arrays;
import cz.cvut.felk.cig.jcool.core.*; import java.util.*;
[ "cz.cvut.felk", "java.util" ]
cz.cvut.felk; java.util;
1,514,166
private int storeItemStack(ItemStack par1ItemStack) { for (int var2 = 0; var2 < this.mainInventory.length; ++var2) { if (this.mainInventory[var2] != null && this.mainInventory[var2].itemID == par1ItemStack.itemID && this.mainInventory[var2].isStackable() && this.mainInventory[var2].stackSize < t...
int function(ItemStack par1ItemStack) { for (int var2 = 0; var2 < this.mainInventory.length; ++var2) { if (this.mainInventory[var2] != null && this.mainInventory[var2].itemID == par1ItemStack.itemID && this.mainInventory[var2].isStackable() && this.mainInventory[var2].stackSize < this.mainInventory[var2].getMaxStackSiz...
/** * stores an itemstack in the users inventory */
stores an itemstack in the users inventory
storeItemStack
{ "repo_name": "DirectCodeGraveyard/Minetweak", "path": "src/main/java/net/minecraft/inventory/InventoryPlayer.java", "license": "lgpl-3.0", "size": 20067 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
879,166
@Generated @ImportedCapacityFeature(Logging.class) protected void debug(final Object message) { getSkill(io.sarl.core.Logging.class).debug(message); }
@ImportedCapacityFeature(Logging.class) void function(final Object message) { getSkill(io.sarl.core.Logging.class).debug(message); }
/** * See the capacity {@link io.sarl.core.Logging#debug(java.lang.Object)}. * * @see io.sarl.core.Logging#debug(java.lang.Object) */
See the capacity <code>io.sarl.core.Logging#debug(java.lang.Object)</code>
debug
{ "repo_name": "trollmcqueen/eurock_vi51", "path": "EuroSim/src/main/generated-sources/xtend/fr/utbm/info/vi51/framework/environment/EnvironmentAgent.java", "license": "gpl-2.0", "size": 24780 }
[ "io.sarl.core.Logging", "io.sarl.lang.annotation.ImportedCapacityFeature" ]
import io.sarl.core.Logging; import io.sarl.lang.annotation.ImportedCapacityFeature;
import io.sarl.core.*; import io.sarl.lang.annotation.*;
[ "io.sarl.core", "io.sarl.lang" ]
io.sarl.core; io.sarl.lang;
274,107
protected void postProcess(BeanDefinitionBuilder beanDefinition, Element element) { }
void function(BeanDefinitionBuilder beanDefinition, Element element) { }
/** * Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete. * <p> * The default implementation does nothing. * * @param beanDefinition the parsed (and probably totally defined) bean definition being built * @param element the X...
Hook method that derived classes can implement to inspect/change a bean definition after parsing is complete. The default implementation does nothing
postProcess
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-spring-security/src/main/java/org/apache/camel/component/spring/security/config/BeanDefinitionParser.java", "license": "apache-2.0", "size": 4833 }
[ "org.springframework.beans.factory.support.BeanDefinitionBuilder", "org.w3c.dom.Element" ]
import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.w3c.dom.Element;
import org.springframework.beans.factory.support.*; import org.w3c.dom.*;
[ "org.springframework.beans", "org.w3c.dom" ]
org.springframework.beans; org.w3c.dom;
2,279,531
EAttribute getDependencyNode_Selected();
EAttribute getDependencyNode_Selected();
/** * Returns the meta object for the attribute '{@link org.sourcepit.maven.dependency.model.DependencyNode#isSelected * <em>Selected</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @return the meta object for the attribute '<em>Selected</em>'. * @see org.sourcepit.maven.depen...
Returns the meta object for the attribute '<code>org.sourcepit.maven.dependency.model.DependencyNode#isSelected Selected</code>'.
getDependencyNode_Selected
{ "repo_name": "sourcepit/maven-dependency-model", "path": "gen/main/emf/org/sourcepit/maven/dependency/model/DependencyModelPackage.java", "license": "apache-2.0", "size": 25206 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,769,452
public static ComponentUI createUI(JComponent a) { ComponentUI mui = new MultiTreeUI(); return MultiLookAndFeel.createUIs(mui, ((MultiTreeUI) mui).uis, a); }
static ComponentUI function(JComponent a) { ComponentUI mui = new MultiTreeUI(); return MultiLookAndFeel.createUIs(mui, ((MultiTreeUI) mui).uis, a); }
/** * Returns a multiplexing UI instance if any of the auxiliary * <code>LookAndFeel</code>s supports this UI. Otherwise, just returns the * UI object obtained from the default <code>LookAndFeel</code>. */
Returns a multiplexing UI instance if any of the auxiliary <code>LookAndFeel</code>s supports this UI. Otherwise, just returns the UI object obtained from the default <code>LookAndFeel</code>
createUI
{ "repo_name": "shun634501730/java_source_cn", "path": "src_en/javax/swing/plaf/multi/MultiTreeUI.java", "license": "apache-2.0", "size": 11329 }
[ "javax.swing.JComponent", "javax.swing.plaf.ComponentUI" ]
import javax.swing.JComponent; import javax.swing.plaf.ComponentUI;
import javax.swing.*; import javax.swing.plaf.*;
[ "javax.swing" ]
javax.swing;
837,612
private void ackReceived(final List<AndesAckEvent> ackEventList) throws AndesException { for (AndesAckEvent ack : ackEventList) { ack.setMetadataReference(); boolean messageRemovable = ack.processEvent(); if (messageRemovable) { messagesToRemove.add(ack...
void function(final List<AndesAckEvent> ackEventList) throws AndesException { for (AndesAckEvent ack : ackEventList) { ack.setMetadataReference(); boolean messageRemovable = ack.processEvent(); if (messageRemovable) { messagesToRemove.add(ack.getMetadataReference()); } } if (!messageStoresUnavailable) { deleteMessagesF...
/** * Updates the state of Andes and deletes relevant messages. (For topics * message deletion will happen only when * all the clients acknowledges) * * @param ackEventList * inboundEvent list */
Updates the state of Andes and deletes relevant messages. (For topics message deletion will happen only when all the clients acknowledges)
ackReceived
{ "repo_name": "indikasampath2000/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/disruptor/inbound/AckHandler.java", "license": "apache-2.0", "size": 7150 }
[ "java.util.List", "org.wso2.andes.kernel.AndesAckEvent", "org.wso2.andes.kernel.AndesException" ]
import java.util.List; import org.wso2.andes.kernel.AndesAckEvent; import org.wso2.andes.kernel.AndesException;
import java.util.*; import org.wso2.andes.kernel.*;
[ "java.util", "org.wso2.andes" ]
java.util; org.wso2.andes;
1,969,807
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == REQUEST_READ_CONTACTS) { if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_...
void function(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode == REQUEST_READ_CONTACTS) { if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { populateAutoComplete(); } } }
/** * Callback received when a permissions request has been completed. */
Callback received when a permissions request has been completed
onRequestPermissionsResult
{ "repo_name": "devruach/chaitea", "path": "app/src/main/java/com/devruach/chaitea/LoginActivity.java", "license": "apache-2.0", "size": 11260 }
[ "android.content.pm.PackageManager", "android.support.annotation.NonNull" ]
import android.content.pm.PackageManager; import android.support.annotation.NonNull;
import android.content.pm.*; import android.support.annotation.*;
[ "android.content", "android.support" ]
android.content; android.support;
364,922
@RequestMapping(method = RequestMethod.POST, value = "/{projectId}/suitabilityScenarios/{id}/wms", produces = "application/json") @ResponseStatus(HttpStatus.NO_CONTENT) public void getWMSOutcome( @RequestHeader(HEADER_USER_ID_KEY) final String roleId, @PathVariable("projectId") final String projectId,...
@RequestMapping(method = RequestMethod.POST, value = STR, produces = STR) @ResponseStatus(HttpStatus.NO_CONTENT) void function( @RequestHeader(HEADER_USER_ID_KEY) final String roleId, @PathVariable(STR) final String projectId, @PathVariable("id") final String id, @RequestBody final Map<String, String> getWmsOutcomePara...
/** * Gets the wMS outcome. * * @param roleId * the role id * @param projectId * the project id * @param id * the id * @param getWmsOutcomeParams * the get wms outcome params * @return the wMS outcome * @throws WifInvalidInputException * ...
Gets the wMS outcome
getWMSOutcome
{ "repo_name": "tosseto/online-whatif", "path": "src/main/java/au/org/aurin/wif/controller/suitability/SuitabilityScenarioController.java", "license": "mit", "size": 24728 }
[ "au.org.aurin.wif.exception.config.ParsingException", "au.org.aurin.wif.exception.config.WifInvalidConfigException", "au.org.aurin.wif.exception.validate.SuitabilityAnalysisFailedException", "au.org.aurin.wif.exception.validate.WifInvalidInputException", "com.vividsolutions.jts.io.ParseException", "java.i...
import au.org.aurin.wif.exception.config.ParsingException; import au.org.aurin.wif.exception.config.WifInvalidConfigException; import au.org.aurin.wif.exception.validate.SuitabilityAnalysisFailedException; import au.org.aurin.wif.exception.validate.WifInvalidInputException; import com.vividsolutions.jts.io.ParseExcepti...
import au.org.aurin.wif.exception.config.*; import au.org.aurin.wif.exception.validate.*; import com.vividsolutions.jts.io.*; import java.io.*; import java.util.*; import org.geotools.filter.text.cql2.*; import org.opengis.geometry.*; import org.opengis.referencing.*; import org.opengis.referencing.operation.*; import ...
[ "au.org.aurin", "com.vividsolutions.jts", "java.io", "java.util", "org.geotools.filter", "org.opengis.geometry", "org.opengis.referencing", "org.springframework.http", "org.springframework.web" ]
au.org.aurin; com.vividsolutions.jts; java.io; java.util; org.geotools.filter; org.opengis.geometry; org.opengis.referencing; org.springframework.http; org.springframework.web;
2,016,734
Logger.init(TAG); }
Logger.init(TAG); }
/** * initialize the logger. */
initialize the logger
init
{ "repo_name": "Loofer/WeRead", "path": "base/src/main/java/org/loofer/framework/utils/L.java", "license": "apache-2.0", "size": 1632 }
[ "com.orhanobut.logger.Logger" ]
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.*;
[ "com.orhanobut.logger" ]
com.orhanobut.logger;
1,742,313
private void select() throws SQLException { String sql = "SELECT * FROM ItemPriceLimit WHERE id = ?"; DataTable dt = conn.executeQuery(sql, id); if(dt.hasRows()) { exists = true; minPrice = Formatter.format(conn, "precision.currency", dt.getBigDecimal...
void function() throws SQLException { String sql = STR; DataTable dt = conn.executeQuery(sql, id); if(dt.hasRows()) { exists = true; minPrice = Formatter.format(conn, STR, dt.getBigDecimal(STR), accountId); warnPrice = Formatter.format(conn, STR, dt.getBigDecimal(STR), accountId); overridePrice = Formatter.format(conn,...
/** * Performs a SQL SELECT operation on this object. * * @throws SQLException if a database access error occurs */
Performs a SQL SELECT operation on this object
select
{ "repo_name": "mordigaldj/SmartRegister", "path": "src/main/java/com/djm/smartreg/data/DBItemPriceLimit.java", "license": "mit", "size": 8413 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,239,978
Boolean instantiateTriggerCallback() { if (_sessionCallbackClassName != null && !_sessionCallbackClassName.isEmpty()) try { Class<?> c = Class.forName(_sessionCallbackClassName); _callback = (SessionCallback) c.newInstance(); } catch (ClassNotFoundException e) { _log.error("A ClassNotFoundExc...
Boolean instantiateTriggerCallback() { if (_sessionCallbackClassName != null && !_sessionCallbackClassName.isEmpty()) try { Class<?> c = Class.forName(_sessionCallbackClassName); _callback = (SessionCallback) c.newInstance(); } catch (ClassNotFoundException e) { _log.error(STR + this._sessionCallbackClassName); e.print...
/** * Instantiates the trigger callback handler class * * @return */
Instantiates the trigger callback handler class
instantiateTriggerCallback
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Service/src/main/java/com/gdn/venice/facade/FrdParameterRule4SessionEJBBean.java", "license": "apache-2.0", "size": 18742 }
[ "com.gdn.venice.facade.callback.SessionCallback" ]
import com.gdn.venice.facade.callback.SessionCallback;
import com.gdn.venice.facade.callback.*;
[ "com.gdn.venice" ]
com.gdn.venice;
2,038,029
void enterMatchRecogPatternAtom(@NotNull EsperEPL2GrammarParser.MatchRecogPatternAtomContext ctx); void exitMatchRecogPatternAtom(@NotNull EsperEPL2GrammarParser.MatchRecogPatternAtomContext ctx);
void enterMatchRecogPatternAtom(@NotNull EsperEPL2GrammarParser.MatchRecogPatternAtomContext ctx); void exitMatchRecogPatternAtom(@NotNull EsperEPL2GrammarParser.MatchRecogPatternAtomContext ctx);
/** * Exit a parse tree produced by {@link EsperEPL2GrammarParser#matchRecogPatternAtom}. * @param ctx the parse tree */
Exit a parse tree produced by <code>EsperEPL2GrammarParser#matchRecogPatternAtom</code>
exitMatchRecogPatternAtom
{ "repo_name": "georgenicoll/esper", "path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java", "license": "gpl-2.0", "size": 114105 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,636,965
public Rectangle getBoundingBox(){ if(boundingBox == null) boundingBox = new Rectangle(x-5, y-1, text.length()*9+10 + graphWidth, graphHeight > 20 ? graphHeight : 20); return boundingBox; }
Rectangle function(){ if(boundingBox == null) boundingBox = new Rectangle(x-5, y-1, text.length()*9+10 + graphWidth, graphHeight > 20 ? graphHeight : 20); return boundingBox; }
/** * Get the bounding box for this label. Mostly used for mouseOver-like * events. * @return The bounding box for this label. */
Get the bounding box for this label. Mostly used for mouseOver-like events
getBoundingBox
{ "repo_name": "zedutchgandalf/March-RTS", "path": "src/be/zedutchgandalf/RTS/util/Label.java", "license": "gpl-3.0", "size": 6976 }
[ "org.newdawn.slick.geom.Rectangle" ]
import org.newdawn.slick.geom.Rectangle;
import org.newdawn.slick.geom.*;
[ "org.newdawn.slick" ]
org.newdawn.slick;
23,438
public void whileActive(final Command command) { new ButtonScheduler() { boolean pressedLast = grab();
void function(final Command command) { new ButtonScheduler() { boolean pressedLast = grab();
/** * Constantly starts the given command while the button is held. * * {@link Command#start()} will be called repeatedly while the trigger is active, * and will be canceled when the trigger becomes inactive. * * @param command the command to start */
Constantly starts the given command while the button is held. <code>Command#start()</code> will be called repeatedly while the trigger is active, and will be canceled when the trigger becomes inactive
whileActive
{ "repo_name": "multiplemonomials/FRC-Test", "path": "src/edu/wpi/first/wpilibj/buttons/Trigger.java", "license": "gpl-3.0", "size": 6180 }
[ "edu.wpi.first.wpilibj.command.Command" ]
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.*;
[ "edu.wpi.first" ]
edu.wpi.first;
2,174,729
@Test public void testObserveSuccess() { try { TestHystrixCommand<?> command = getCommand(ExecutionIsolationStrategy.THREAD, AbstractTestHystrixCommand.ExecutionResult.SUCCESS); assertEquals(0, command.getBuilder().metrics.getRollingCount(HystrixRollingNumberEvent.FAILURE)); ...
void function() { try { TestHystrixCommand<?> command = getCommand(ExecutionIsolationStrategy.THREAD, AbstractTestHystrixCommand.ExecutionResult.SUCCESS); assertEquals(0, command.getBuilder().metrics.getRollingCount(HystrixRollingNumberEvent.FAILURE)); assertEquals(0, command.getBuilder().metrics.getRollingCount(Hystri...
/** * Test a successful command execution. */
Test a successful command execution
testObserveSuccess
{ "repo_name": "davidkarlsen/Hystrix", "path": "hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTest.java", "license": "apache-2.0", "size": 282697 }
[ "com.netflix.hystrix.HystrixCommandProperties", "com.netflix.hystrix.util.HystrixRollingNumberEvent", "org.junit.Assert" ]
import com.netflix.hystrix.HystrixCommandProperties; import com.netflix.hystrix.util.HystrixRollingNumberEvent; import org.junit.Assert;
import com.netflix.hystrix.*; import com.netflix.hystrix.util.*; import org.junit.*;
[ "com.netflix.hystrix", "org.junit" ]
com.netflix.hystrix; org.junit;
2,046,027
@Test public void testReassingInvalidMin1() throws RemoteException { int expectedNumOfServers = 1; final DynamicFPSetManager dfm = new DynamicFPSetManager(expectedNumOfServers); for (int i = 0; i < expectedNumOfServers; i++) { dfm.register(new MemFPSet(), "localhost" + i); } // invalid input try { ...
void function() throws RemoteException { int expectedNumOfServers = 1; final DynamicFPSetManager dfm = new DynamicFPSetManager(expectedNumOfServers); for (int i = 0; i < expectedNumOfServers; i++) { dfm.register(new MemFPSet(), STR + i); } try { dfm.reassign(-1); } catch (IllegalArgumentException e){ return; } fail(); ...
/** * Tests that reassign doesn't accept invalid values */
Tests that reassign doesn't accept invalid values
testReassingInvalidMin1
{ "repo_name": "tlaplus/tlaplus", "path": "tlatools/org.lamport.tlatools/test/tlc2/tool/distributed/fp/DynamicFPSetManagerTest.java", "license": "mit", "size": 15924 }
[ "java.rmi.RemoteException", "org.junit.Assert" ]
import java.rmi.RemoteException; import org.junit.Assert;
import java.rmi.*; import org.junit.*;
[ "java.rmi", "org.junit" ]
java.rmi; org.junit;
2,816,467
@TruffleBoundary public static RSyntaxNode createReadVariableNode(String name) { return RContext.getASTBuilder().lookup(RSyntaxNode.SOURCE_UNAVAILABLE, name, false); }
static RSyntaxNode function(String name) { return RContext.getASTBuilder().lookup(RSyntaxNode.SOURCE_UNAVAILABLE, name, false); }
/** * Creates a standard {@link ReadVariableNode}. */
Creates a standard <code>ReadVariableNode</code>
createReadVariableNode
{ "repo_name": "jjfumero/fastr", "path": "com.oracle.truffle.r.nodes/src/com/oracle/truffle/r/nodes/RASTUtils.java", "license": "gpl-2.0", "size": 10225 }
[ "com.oracle.truffle.r.runtime.context.RContext", "com.oracle.truffle.r.runtime.nodes.RSyntaxNode" ]
import com.oracle.truffle.r.runtime.context.RContext; import com.oracle.truffle.r.runtime.nodes.RSyntaxNode;
import com.oracle.truffle.r.runtime.context.*; import com.oracle.truffle.r.runtime.nodes.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
2,230,482
@Override protected boolean processCustomRouteDocumentBusinessRules(MaintenanceDocument document) { boolean success = true; LOG.debug("Entering processCustomRouteDocumentBusinessRules()"); success &= checkClearingAccountIsActive(); // success &= checkWireAccountIsActive(); ...
boolean function(MaintenanceDocument document) { boolean success = true; LOG.debug(STR); success &= checkClearingAccountIsActive(); success &= checkLockboxNumberIsUnique(); return success; }
/** * This performs the following checks on document route: * <ul> * <ul> * <li>{@link SystemInformationRule#checkClearingAccountIsActive()}</li> * </ul> * </ul> * This rule fails on rule failure * * @see org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase#proce...
This performs the following checks on document route: <code>SystemInformationRule#checkClearingAccountIsActive()</code> This rule fails on rule failure
processCustomRouteDocumentBusinessRules
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/validation/impl/SystemInformationRule.java", "license": "agpl-3.0", "size": 7134 }
[ "org.kuali.kfs.kns.document.MaintenanceDocument" ]
import org.kuali.kfs.kns.document.MaintenanceDocument;
import org.kuali.kfs.kns.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
816,466
private void searchShops(double latitude, double longitude, int radius) { String apiKey = getContext().getString(R.string.google_maps_key); Retrofit retrofit = new Retrofit.Builder() .baseUrl(ConnectionVariables.MAPS_BASE_URL) .addConverterFactory(GsonConverterFacto...
void function(double latitude, double longitude, int radius) { String apiKey = getContext().getString(R.string.google_maps_key); Retrofit retrofit = new Retrofit.Builder() .baseUrl(ConnectionVariables.MAPS_BASE_URL) .addConverterFactory(GsonConverterFactory.create()) .build(); MapsService mapsServices = retrofit.create...
/** * It searches using Google Maps API the text "MEAT SHOP" within a radius with latitude and longitude as center * Once done, it adds markers to the Google Map * * @param latitude Latitude coordinate * @param longitude Longitude coordinate * @param radius Radius (in meters) */
It searches using Google Maps API the text "MEAT SHOP" within a radius with latitude and longitude as center Once done, it adds markers to the Google Map
searchShops
{ "repo_name": "spanishdev/MeatApp-OS-", "path": "app/src/main/java/com/jordic/meatapp/fragments/MapFragment.java", "license": "apache-2.0", "size": 7110 }
[ "android.util.Log", "com.jordic.meatapp.POJO", "com.jordic.meatapp.Retrofit", "com.jordic.meatapp.Utils" ]
import android.util.Log; import com.jordic.meatapp.POJO; import com.jordic.meatapp.Retrofit; import com.jordic.meatapp.Utils;
import android.util.*; import com.jordic.meatapp.*;
[ "android.util", "com.jordic.meatapp" ]
android.util; com.jordic.meatapp;
1,465,956
private void endGesture(InputCursor inputEndedMotion, InputCursor leftOverMotion, IMTComponent3D comp){ lockedMotions.clear(); unUsedMotions.add(leftOverMotion); this.unLock(leftOverMotion); this.fireGestureEvent(new ZoomEvent(this, MTGestureEvent.GESTURE_ENDED, comp, inputEndedMotion, leftOverMotion, 0f, co...
void function(InputCursor inputEndedMotion, InputCursor leftOverMotion, IMTComponent3D comp){ lockedMotions.clear(); unUsedMotions.add(leftOverMotion); this.unLock(leftOverMotion); this.fireGestureEvent(new ZoomEvent(this, MTGestureEvent.GESTURE_ENDED, comp, inputEndedMotion, leftOverMotion, 0f, comp.getViewingCamera()...
/** * End gesture. * * @param inputEndedMotion the input ended motion * @param leftOverMotion the left over motion * @param comp the comp */
End gesture
endGesture
{ "repo_name": "Max90/MT4j_Breakout", "path": "src/org/mt4j/input/inputProcessors/componentProcessors/zoomProcessor/ZoomProcessor.java", "license": "gpl-2.0", "size": 11439 }
[ "org.mt4j.components.interfaces.IMTComponent3D", "org.mt4j.input.inputData.InputCursor", "org.mt4j.input.inputProcessors.MTGestureEvent" ]
import org.mt4j.components.interfaces.IMTComponent3D; import org.mt4j.input.inputData.InputCursor; import org.mt4j.input.inputProcessors.MTGestureEvent;
import org.mt4j.components.interfaces.*; import org.mt4j.input.*;
[ "org.mt4j.components", "org.mt4j.input" ]
org.mt4j.components; org.mt4j.input;
873,290
// Traverse through class and all parent classes, looking for // fields declared with the @Autowired annotation and using // dependency injection to set them as appropriate Class<?> cls = caller.getClass(); while(cls != null) { String packageName = cls.getPackage().getName()...
Class<?> cls = caller.getClass(); while(cls != null) { String packageName = cls.getPackage().getName(); if(!isQualifiedPackage(packageName)) break; for(Field field : cls.getDeclaredFields()) { if(field.getAnnotation(Autowired.class) != null) { field.setAccessible(true); try { handleField(caller, field); } catch (Illega...
/** * Perform dependency injection in the caller object * * @param caller * object to perform DI on */
Perform dependency injection in the caller object
inject
{ "repo_name": "eric-stanley/astrid", "path": "api/src/com/todoroo/andlib/service/DependencyInjectionService.java", "license": "gpl-3.0", "size": 5865 }
[ "java.lang.reflect.Field" ]
import java.lang.reflect.Field;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,889,338
private CoordinateReferenceSystem findPropertyCRS(PropertyName propertyName) { Object o = propertyName.evaluate(featureType); if (o instanceof GeometryDescriptor) { GeometryDescriptor gat = (GeometryDescriptor) o; return gat.getCoordinateReferenceSystem(); } else { ...
CoordinateReferenceSystem function(PropertyName propertyName) { Object o = propertyName.evaluate(featureType); if (o instanceof GeometryDescriptor) { GeometryDescriptor gat = (GeometryDescriptor) o; return gat.getCoordinateReferenceSystem(); } else { return null; } }
/** * Returns the CRS associated to a property in the feature type. May be null * if the property is not geometric, or if the CRS is not set * * @param propertyName * @return */
Returns the CRS associated to a property in the feature type. May be null if the property is not geometric, or if the CRS is not set
findPropertyCRS
{ "repo_name": "FUNCATE/TerraMobile", "path": "sldparser/src/main/geotools/filter/spatial/ReprojectingFilterVisitor.java", "license": "apache-2.0", "size": 20190 }
[ "org.opengis.feature.type.GeometryDescriptor", "org.opengis.filter.expression.PropertyName", "org.opengis.referencing.crs.CoordinateReferenceSystem" ]
import org.opengis.feature.type.GeometryDescriptor; import org.opengis.filter.expression.PropertyName; import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.feature.type.*; import org.opengis.filter.expression.*; import org.opengis.referencing.crs.*;
[ "org.opengis.feature", "org.opengis.filter", "org.opengis.referencing" ]
org.opengis.feature; org.opengis.filter; org.opengis.referencing;
2,100,032
private int readPrivateDataStreamType(ParsableByteArray data, int length) { int streamType = -1; int descriptorsEndPosition = data.getPosition() + length; while (data.getPosition() < descriptorsEndPosition) { int descriptorTag = data.readUnsignedByte(); int descriptorLength = data....
int function(ParsableByteArray data, int length) { int streamType = -1; int descriptorsEndPosition = data.getPosition() + length; while (data.getPosition() < descriptorsEndPosition) { int descriptorTag = data.readUnsignedByte(); int descriptorLength = data.readUnsignedByte(); if (descriptorTag == 0x05) { long formatIde...
/** * Returns the stream type read from a registration descriptor in private data, or -1 if no * stream type is present. Sets {@code data}'s position to the end of the descriptors. * * @param data A buffer with its position set to the start of the first descriptor. * @param length The length of...
Returns the stream type read from a registration descriptor in private data, or -1 if no stream type is present. Sets data's position to the end of the descriptors
readPrivateDataStreamType
{ "repo_name": "malizadehq/MyTelegram", "path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/extractor/ts/TsExtractor.java", "license": "gpl-2.0", "size": 24185 }
[ "org.telegram.messenger.exoplayer.util.ParsableBitArray", "org.telegram.messenger.exoplayer.util.ParsableByteArray" ]
import org.telegram.messenger.exoplayer.util.ParsableBitArray; import org.telegram.messenger.exoplayer.util.ParsableByteArray;
import org.telegram.messenger.exoplayer.util.*;
[ "org.telegram.messenger" ]
org.telegram.messenger;
2,284,018
EAttribute getAttributeSpecification_Class();
EAttribute getAttributeSpecification_Class();
/** * Returns the meta object for the attribute '{@link net.mlanoe.language.vhdl.declaration.AttributeSpecification#getClass_ <em>Class</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Class</em>'. * @see net.mlanoe.language.vhdl.declaration.AttributeS...
Returns the meta object for the attribute '<code>net.mlanoe.language.vhdl.declaration.AttributeSpecification#getClass_ Class</code>'.
getAttributeSpecification_Class
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl/src-gen/net/mlanoe/language/vhdl/declaration/DeclarationPackage.java", "license": "gpl-3.0", "size": 102415 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
343,035
protected synchronized void release(File file) { if ((file != null) && file.exists() && file.getParentFile().getAbsolutePath().equals(activePath)) { boolean ok = file.delete(); } }
synchronized void function(File file) { if ((file != null) && file.exists() && file.getParentFile().getAbsolutePath().equals(activePath)) { boolean ok = file.delete(); } }
/** * Release a file from the active directory. Note that the * file may have moved, so it is possible that the file will * no longer exist. This method only deletes the file if it * is still in the active directory. * @param file the file to be released, which must be the original file * supplied by the Ex...
Release a file from the active directory. Note that the file may have moved, so it is possible that the file will no longer exist. This method only deletes the file if it is still in the active directory
release
{ "repo_name": "blezek/Notion", "path": "src/main/java/org/rsna/ctp/pipeline/AbstractQueuedExportService.java", "license": "bsd-3-clause", "size": 7005 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,102,175
@Override public @RawRes Integer getPreview(){ return R.raw.preview; }
@RawRes Integer function(){ return R.raw.preview; }
/** * Start the preview. * * @return true if the preview successfully started */
Start the preview
getPreview
{ "repo_name": "leodejevga/breathy", "path": "Breathy/Fade/src/main/java/com/apps/philipps/fade/Fade.java", "license": "gpl-3.0", "size": 687 }
[ "android.support.annotation.RawRes" ]
import android.support.annotation.RawRes;
import android.support.annotation.*;
[ "android.support" ]
android.support;
897,965
public void setTransformer(Transformer t) { m_transformer = t; // If this transformer object implements the SerializerTrace interface // then assign m_tracer to the transformer object so it can be used // to fire trace events. if ((m_transformer instanceof SerializerTrac...
void function(Transformer t) { m_transformer = t; if ((m_transformer instanceof SerializerTrace) && (((SerializerTrace) m_transformer).hasTraceListeners())) { m_tracer = (SerializerTrace) m_transformer; } else { m_tracer = null; } }
/** * Sets the transformer associated with this serializer * @param t the transformer associated with this serializer. * @see SerializationHandler#setTransformer(Transformer) */
Sets the transformer associated with this serializer
setTransformer
{ "repo_name": "itgeeker/jdk", "path": "src/com/sun/org/apache/xml/internal/serializer/SerializerBase.java", "license": "apache-2.0", "size": 44104 }
[ "javax.xml.transform.Transformer" ]
import javax.xml.transform.Transformer;
import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
2,654,035
Run r = optCurrentlyBuilding(); if (r==null) throw new IllegalStateException("This CLI command works only when invoked from inside a build"); return r; }
Run r = optCurrentlyBuilding(); if (r==null) throw new IllegalStateException(STR); return r; }
/** * This method makes sense only when called from within the build kicked by Jenkins. * We use the environment variables that Jenkins sets to determine the build that is being run. */
This method makes sense only when called from within the build kicked by Jenkins. We use the environment variables that Jenkins sets to determine the build that is being run
getCurrentlyBuilding
{ "repo_name": "andresrc/jenkins", "path": "core/src/main/java/hudson/cli/CommandDuringBuild.java", "license": "mit", "size": 3904 }
[ "hudson.model.Run" ]
import hudson.model.Run;
import hudson.model.*;
[ "hudson.model" ]
hudson.model;
438,846
public List<WSIOEntry> getInitBlock() { return initBlock; }
List<WSIOEntry> function() { return initBlock; }
/** * Gets the init part of a task. * * @return Returns the initBlock. */
Gets the init part of a task
getInitBlock
{ "repo_name": "OurGrid/OurGrid", "path": "src/main/java/org/ourgrid/broker/controlws/WSTaskSpec.java", "license": "lgpl-3.0", "size": 6792 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,216,211
public void requestUserAttention( int type, Object data) throws PlatformManagerException;
void function( int type, Object data) throws PlatformManagerException;
/** * Requests the user's attention such as bouncing the application icon on OSX * * @param type * @param data * @throws PlatformManagerException */
Requests the user's attention such as bouncing the application icon on OSX
requestUserAttention
{ "repo_name": "alejandroarturom/frostwire-desktop", "path": "src/org/gudy/azureus2/platform/PlatformManager.java", "license": "gpl-3.0", "size": 4729 }
[ "org.gudy.azureus2.plugins.platform.PlatformManagerException" ]
import org.gudy.azureus2.plugins.platform.PlatformManagerException;
import org.gudy.azureus2.plugins.platform.*;
[ "org.gudy.azureus2" ]
org.gudy.azureus2;
697,287
@After public void cleanEnv() throws IOException { // Clean up the local directory. FileUtils.deleteDirectory(LOCAL_TEMP_PATH.toFile()); }
void function() throws IOException { FileUtils.deleteDirectory(LOCAL_TEMP_PATH.toFile()); }
/** * Cleans up the test environment. */
Cleans up the test environment
cleanEnv
{ "repo_name": "seoj/herd", "path": "herd-code/herd-service/src/test/java/org/finra/herd/service/helper/HerdHelperTest.java", "license": "apache-2.0", "size": 34251 }
[ "java.io.IOException", "org.apache.commons.io.FileUtils" ]
import java.io.IOException; import org.apache.commons.io.FileUtils;
import java.io.*; import org.apache.commons.io.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
2,713,630
public void execute() throws BaseException { try { URL url = _file.toURI().toURL(); FileViewerFactory factory = FileViewerFactory.getInstance(); HtmlViewerSheet viewer = factory.getViewer(_app.getMainFrame(), url); viewer.setVisible(true); viewer.toFront(); viewer.requestFocus(); } catch (...
void function() throws BaseException { try { URL url = _file.toURI().toURL(); FileViewerFactory factory = FileViewerFactory.getInstance(); HtmlViewerSheet viewer = factory.getViewer(_app.getMainFrame(), url); viewer.setVisible(true); viewer.toFront(); viewer.requestFocus(); } catch (IOException ex) { final String msg =...
/** * Display the Dialog */
Display the Dialog
execute
{ "repo_name": "sdgdsffdsfff/bigtable-sql", "path": "src/main/java/net/sourceforge/squirrel_sql/client/mainframe/action/ViewFileCommand.java", "license": "apache-2.0", "size": 3101 }
[ "java.io.IOException", "net.sourceforge.squirrel_sql.client.gui.FileViewerFactory", "net.sourceforge.squirrel_sql.client.gui.HtmlViewerSheet", "net.sourceforge.squirrel_sql.fw.util.BaseException" ]
import java.io.IOException; import net.sourceforge.squirrel_sql.client.gui.FileViewerFactory; import net.sourceforge.squirrel_sql.client.gui.HtmlViewerSheet; import net.sourceforge.squirrel_sql.fw.util.BaseException;
import java.io.*; import net.sourceforge.squirrel_sql.client.gui.*; import net.sourceforge.squirrel_sql.fw.util.*;
[ "java.io", "net.sourceforge.squirrel_sql" ]
java.io; net.sourceforge.squirrel_sql;
1,728,357
public void clearUnverifiedList() { synchronized (unverifiedList) { try { Tuple tuple; while ( (tuple=unverifiedList.findGreaterOrEqual("")) != null) { unverifiedList.remove(tuple.getKey()); } } catch (Exception abort) { } } }
void function() { synchronized (unverifiedList) { try { Tuple tuple; while ( (tuple=unverifiedList.findGreaterOrEqual("")) != null) { unverifiedList.remove(tuple.getKey()); } } catch (Exception abort) { } } }
/** * Remove all the entries in the unverified list * without deleting the list and recreating it. * This method does a commit on the database. */
Remove all the entries in the unverified list without deleting the list and recreating it. This method does a commit on the database
clearUnverifiedList
{ "repo_name": "blezek/Notion", "path": "src/main/java/org/rsna/ctp/stdstages/DatabaseVerifier.java", "license": "bsd-3-clause", "size": 10701 }
[ "jdbm.helper.Tuple" ]
import jdbm.helper.Tuple;
import jdbm.helper.*;
[ "jdbm.helper" ]
jdbm.helper;
1,389,081
OutputPort port(String name);
OutputPort port(String name);
/** * Returns an output port.<p> * * If the port doesn't already exist then the input collector will lazily * create the port. Ports can be referenced prior to the output event starting * up, and once the output starts ports will be properly configured. * * @param name The name of the port to load....
Returns an output port. If the port doesn't already exist then the input collector will lazily create the port. Ports can be referenced prior to the output event starting up, and once the output starts ports will be properly configured
port
{ "repo_name": "kuujo/vertigo", "path": "core/src/main/java/net/kuujo/vertigo/io/OutputCollector.java", "license": "apache-2.0", "size": 1578 }
[ "net.kuujo.vertigo.io.port.OutputPort" ]
import net.kuujo.vertigo.io.port.OutputPort;
import net.kuujo.vertigo.io.port.*;
[ "net.kuujo.vertigo" ]
net.kuujo.vertigo;
2,219,305
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);
/** * Deletes a disk offering * * @param cmd * - the command specifying disk offering id * @return true or false * @throws */
Deletes a disk offering
deleteDiskOffering
{ "repo_name": "cinderella/incubator-cloudstack", "path": "api/src/com/cloud/configuration/ConfigurationService.java", "license": "apache-2.0", "size": 8568 }
[ "com.cloud.api.commands.DeleteDiskOfferingCmd" ]
import com.cloud.api.commands.DeleteDiskOfferingCmd;
import com.cloud.api.commands.*;
[ "com.cloud.api" ]
com.cloud.api;
2,449,537
public static void printf(Locale locale, String format, Object... args) { out.printf(locale, format, args); out.flush(); }
static void function(Locale locale, String format, Object... args) { out.printf(locale, format, args); out.flush(); }
/** * Print a formatted string to standard output using the specified * locale, format string, and arguments, and flush standard output. */
Print a formatted string to standard output using the specified locale, format string, and arguments, and flush standard output
printf
{ "repo_name": "ChrisZou/algorithms", "path": "src/com/chriszou/algorithms/stdlib/StdOut.java", "license": "apache-2.0", "size": 5751 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
481,091
public Stopwatch stop() { long tick = ticker.read(); checkState(isRunning, "This stopwatch is already stopped; it cannot be stopped more than once."); isRunning = false; elapsedNanos += tick - startTick; return this; }
Stopwatch function() { long tick = ticker.read(); checkState(isRunning, STR); isRunning = false; elapsedNanos += tick - startTick; return this; }
/** * Stops the stopwatch. Future reads will return the fixed duration that had * elapsed up to this point. * * @return this {@code Stopwatch} instance * @throws IllegalStateException if the stopwatch is already stopped. */
Stops the stopwatch. Future reads will return the fixed duration that had elapsed up to this point
stop
{ "repo_name": "newrelic/guava-libraries", "path": "guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Stopwatch.java", "license": "apache-2.0", "size": 6791 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,837,402
public void updateAllAsyncInternal0( UUID nodeId, GridNearAtomicUpdateRequest req, CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb ) { GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(), nodeId, req.futureVersion(), ...
void function( UUID nodeId, GridNearAtomicUpdateRequest req, CI2<GridNearAtomicUpdateRequest, GridNearAtomicUpdateResponse> completionCb ) { GridNearAtomicUpdateResponse res = new GridNearAtomicUpdateResponse(ctx.cacheId(), nodeId, req.futureVersion(), ctx.deploymentEnabled()); List<KeyCacheObject> keys = req.keys(); a...
/** * Executes local update after preloader fetched values. * * @param nodeId Node ID. * @param req Update request. * @param completionCb Completion callback. */
Executes local update after preloader fetched values
updateAllAsyncInternal0
{ "repo_name": "tkpanther/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java", "license": "apache-2.0", "size": 129179 }
[ "java.util.Collection", "java.util.List", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException", "org.apache.ignite.internal.processors.cache.GridCacheReturn", "org.apache.ignite.internal.processo...
import java.util.Collection; import java.util.List; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; import org.apache.ignite.internal.processors.cache.GridCacheReturn; import org.apache.igni...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.cache.distributed.dht.*; import org.apache.ignite.internal.processors.cache.version.*; import org.apache.ignite.internal.util.typedef.int...
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,188,110
public void testReplace() { ConcurrentNavigableMap map = map5(); assertNull(map.replace(six, "Z")); assertFalse(map.containsKey(six)); }
void function() { ConcurrentNavigableMap map = map5(); assertNull(map.replace(six, "Z")); assertFalse(map.containsKey(six)); }
/** * replace fails when the given key is not present */
replace fails when the given key is not present
testReplace
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ConcurrentSkipListSubMapTest.java", "license": "gpl-2.0", "size": 43284 }
[ "java.util.concurrent.ConcurrentNavigableMap" ]
import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,835,445
private class HookedJGroupsTransport extends JGroupsTransport { @Override protected void startJGroupsChannelIfNeeded() { log.trace("My index is " + mySlaveIndex + " and these slaves should be reachable: " + initiallyReachable); if (mySlaveIndex >= 0 && initiallyReachable != null) { ...
class HookedJGroupsTransport extends JGroupsTransport { protected void function() { log.trace(STR + mySlaveIndex + STR + initiallyReachable); if (mySlaveIndex >= 0 && initiallyReachable != null) { List<JChannel> channels = getChannels((JChannel) this.channel); log.trace(STR + channels.size() + STR); for (JChannel chann...
/** * This is called after the channel is initialized but before it is connected */
This is called after the channel is initialized but before it is connected
startJGroupsChannelIfNeeded
{ "repo_name": "rhusar/radargun", "path": "plugins/infinispan51/src/main/java/org/radargun/service/InfinispanPartitionableLifecycle.java", "license": "apache-2.0", "size": 3261 }
[ "java.util.List", "org.infinispan.remoting.transport.jgroups.JGroupsTransport", "org.jgroups.JChannel" ]
import java.util.List; import org.infinispan.remoting.transport.jgroups.JGroupsTransport; import org.jgroups.JChannel;
import java.util.*; import org.infinispan.remoting.transport.jgroups.*; import org.jgroups.*;
[ "java.util", "org.infinispan.remoting", "org.jgroups" ]
java.util; org.infinispan.remoting; org.jgroups;
584,159
public void testSnapshotCanceledOnRemovedShard() throws Exception { final int numPrimaries = 1; final int numReplicas = 1; final int numDocs = 100; final String repo = "test-repo"; final String index = "test-idx"; final String snapshot = "test-snap"; assertAc...
void function() throws Exception { final int numPrimaries = 1; final int numReplicas = 1; final int numDocs = 100; final String repo = STR; final String index = STR; final String snapshot = STR; assertAcked(prepareCreate(index, 1, Settings.builder().put(STR, numPrimaries).put(STR, numReplicas))); logger.info(STR); for ...
/** * This test ensures that when a shard is removed from a node (perhaps due to the node * leaving the cluster, then returning), all snapshotting of that shard is aborted, so * all Store references held onto by the snapshot are released. * * See https://github.com/elastic/elasticsearch/issues/...
This test ensures that when a shard is removed from a node (perhaps due to the node leaving the cluster, then returning), all snapshotting of that shard is aborted, so all Store references held onto by the snapshot are released. See HREF
testSnapshotCanceledOnRemovedShard
{ "repo_name": "ZTE-PaaS/elasticsearch", "path": "core/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java", "license": "apache-2.0", "size": 159866 }
[ "org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.routing.IndexRoutingTable", "org.elasticsearch.common.settings.Settings", "org.elasticsearch.common.unit.TimeValue", "org.elasticsearch.index.IndexService",...
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.IndexRoutingTable; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.ind...
import org.elasticsearch.action.admin.cluster.repositories.put.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.index.*; import org.elasticsearch.indices.*; import org.elasticse...
[ "org.elasticsearch.action", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.index", "org.elasticsearch.indices", "org.elasticsearch.test" ]
org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.indices; org.elasticsearch.test;
2,113,509
protected int checkMaximumDaysInFebruary() { int maxDays; Calendar februaryMonthlyDateCalendar = Calendar.getInstance(); februaryMonthlyDateCalendar.set(Calendar.MONTH, Calendar.FEBRUARY); maxDays = februaryMonthlyDateCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); ...
int function() { int maxDays; Calendar februaryMonthlyDateCalendar = Calendar.getInstance(); februaryMonthlyDateCalendar.set(Calendar.MONTH, Calendar.FEBRUARY); maxDays = februaryMonthlyDateCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); return maxDays; }
/** * This method will check and return either maximum days in the month as 28 or 29 for leap year. * It first sets the month to February and then checks the maximum days.. * @return maxDays Maximum number of days in the month of February for calendar. */
This method will check and return either maximum days in the month as 28 or 29 for leap year. It first sets the month to February and then checks the maximum days.
checkMaximumDaysInFebruary
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/endow/businessobject/lookup/CalculateProcessDateUsingFrequencyCodeService.java", "license": "apache-2.0", "size": 14296 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
636,117
private String getPeerPrincipalName(Subject peerSubject) { if (peerSubject == null) { return null; } assert peerSubject.isReadOnly(); Principal p = (Principal) peerSubject.getPrincipals().iterator().next(); return p.getName(); }
String function(Subject peerSubject) { if (peerSubject == null) { return null; } assert peerSubject.isReadOnly(); Principal p = (Principal) peerSubject.getPrincipals().iterator().next(); return p.getName(); }
/** * Returns the name of the principal for the peer subject, which should be * read-only if it is not null. */
Returns the name of the principal for the peer subject, which should be read-only if it is not null
getPeerPrincipalName
{ "repo_name": "pfirmstone/JGDMS", "path": "JGDMS/jgdms-jeri/src/main/java/net/jini/jeri/ssl/ServerAuthManager.java", "license": "apache-2.0", "size": 14569 }
[ "java.security.Principal", "javax.security.auth.Subject" ]
import java.security.Principal; import javax.security.auth.Subject;
import java.security.*; import javax.security.auth.*;
[ "java.security", "javax.security" ]
java.security; javax.security;
2,626,081
public static ECSigner newSHA384Signer(String privateKey, String kid, CryptoProvider cryptoProvider) { return new ECSigner(Algorithm.ES384, privateKey, kid, cryptoProvider); }
static ECSigner function(String privateKey, String kid, CryptoProvider cryptoProvider) { return new ECSigner(Algorithm.ES384, privateKey, kid, cryptoProvider); }
/** * Build a new EC signer using a SHA-384 hash. * * @param privateKey The private key PEM expected to be in PKCS#1 or PKCS#8 format. * @param kid The key identifier. This will be used by the JWTEncoder to write the 'kid' header. * @param cryptoProvider The crypto provider used to get the...
Build a new EC signer using a SHA-384 hash
newSHA384Signer
{ "repo_name": "inversoft/prime-jwt", "path": "src/main/java/io/fusionauth/jwt/ec/ECSigner.java", "license": "apache-2.0", "size": 8753 }
[ "io.fusionauth.jwt.domain.Algorithm", "io.fusionauth.security.CryptoProvider" ]
import io.fusionauth.jwt.domain.Algorithm; import io.fusionauth.security.CryptoProvider;
import io.fusionauth.jwt.domain.*; import io.fusionauth.security.*;
[ "io.fusionauth.jwt", "io.fusionauth.security" ]
io.fusionauth.jwt; io.fusionauth.security;
841,380
EList<MobaFriend> getFriends();
EList<MobaFriend> getFriends();
/** * Returns the value of the '<em><b>Friends</b></em>' containment reference list. * The list contents are of type {@link org.mobadsl.semantic.model.moba.MobaFriend}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Friends</em>' containment reference list isn't clear, * there really should be...
Returns the value of the 'Friends' containment reference list. The list contents are of type <code>org.mobadsl.semantic.model.moba.MobaFriend</code>. If the meaning of the 'Friends' containment reference list isn't clear, there really should be more of a description here...
getFriends
{ "repo_name": "florianpirchner/mobadsl", "path": "org.mobadsl.semantic.model/src/org/mobadsl/semantic/model/moba/MobaFriendsAble.java", "license": "apache-2.0", "size": 1761 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,671,383
public double[] getSortedValues() { double[] sort = getValues(); Arrays.sort(sort); return sort; }
double[] function() { double[] sort = getValues(); Arrays.sort(sort); return sort; }
/** * Returns the current set of values in an array of double primitives, * sorted in ascending order. The returned array is a fresh * copy of the underlying data -- i.e., it is not a reference to the * stored data. * @return returns the current set of * numbers sorted in ascending ...
Returns the current set of values in an array of double primitives, sorted in ascending order. The returned array is a fresh copy of the underlying data -- i.e., it is not a reference to the stored data
getSortedValues
{ "repo_name": "SpoonLabs/astor", "path": "examples/Math-issue-309/src/main/java/org/apache/commons/math/stat/descriptive/DescriptiveStatistics.java", "license": "gpl-2.0", "size": 24917 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,408,069
private void waitUntilChangeHappens(final long regionId, final int maxWaitTime, final TimeUnit timeUnit, final Predicate<Set<Long>> predicate) throws TimeoutException, InterruptedException { final Stopwatch stopwatch = Stopwatch.createStarted(); final long waitTimeInMilis = timeUnit.toMillis(maxWait...
void function(final long regionId, final int maxWaitTime, final TimeUnit timeUnit, final Predicate<Set<Long>> predicate) throws TimeoutException, InterruptedException { final Stopwatch stopwatch = Stopwatch.createStarted(); final long waitTimeInMilis = timeUnit.toMillis(maxWaitTime); while(! predicate.test(getAllRegion...
/** * Test until a change happens * @param regionId * @param maxWaitTime * @param timeUnit * @param predicate * @throws TimeoutException * @throws InterruptedException */
Test until a change happens
waitUntilChangeHappens
{ "repo_name": "jnidzwetzki/bboxdb", "path": "bboxdb-server/src/main/java/org/bboxdb/distribution/region/DistributionRegionIdMapper.java", "license": "apache-2.0", "size": 8048 }
[ "com.google.common.base.Stopwatch", "java.util.Set", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException", "java.util.function.Predicate" ]
import com.google.common.base.Stopwatch; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.function.Predicate;
import com.google.common.base.*; import java.util.*; import java.util.concurrent.*; import java.util.function.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
56,182
private static boolean unlinkProjectFromCascadingParents(ICascadingJob cascadingProject, Set<String> projectsToUnlink) throws IOException { if (null != cascadingProject && null != projectsToUnlink) { for (String toUnlink : projectsToUnlink) { cascadingProject.removeCa...
static boolean function(ICascadingJob cascadingProject, Set<String> projectsToUnlink) throws IOException { if (null != cascadingProject && null != projectsToUnlink) { for (String toUnlink : projectsToUnlink) { cascadingProject.removeCascadingChild(toUnlink); } if (cascadingProject.hasCascadingProject()) { unlinkProject...
/** * Recursively unlink set of projects from cascading hierarchy. * * @param cascadingProject cascading project to start from. * @param projectsToUnlink projects that should be unlinked. * @return if project was unlinked * @throws java.io.IOException if cascading project couldn't be saved...
Recursively unlink set of projects from cascading hierarchy
unlinkProjectFromCascadingParents
{ "repo_name": "bboyfeiyu/hudson.core", "path": "hudson-core/src/main/java/hudson/util/CascadingUtil.java", "license": "apache-2.0", "size": 24923 }
[ "java.io.IOException", "java.util.Set", "org.eclipse.hudson.api.model.ICascadingJob" ]
import java.io.IOException; import java.util.Set; import org.eclipse.hudson.api.model.ICascadingJob;
import java.io.*; import java.util.*; import org.eclipse.hudson.api.model.*;
[ "java.io", "java.util", "org.eclipse.hudson" ]
java.io; java.util; org.eclipse.hudson;
2,471,387
public StringIdItem intern(StringIdItem string) { if (string == null) { throw new NullPointerException("string == null"); } throwIfPrepared(); CstUtf8 value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { ...
StringIdItem function(StringIdItem string) { if (string == null) { throw new NullPointerException(STR); } throwIfPrepared(); CstUtf8 value = string.getValue(); StringIdItem already = strings.get(value); if (already != null) { return already; } strings.put(value, string); return string; }
/** * Interns an element into this instance. * * @param string {@code non-null;} the string to intern * @return {@code non-null;} the interned string */
Interns an element into this instance
intern
{ "repo_name": "MoSync/MoSync", "path": "tools/android/dx/src/com/android/dx/dex/file/StringIdsSection.java", "license": "gpl-2.0", "size": 5742 }
[ "com.android.dx.rop.cst.CstUtf8" ]
import com.android.dx.rop.cst.CstUtf8;
import com.android.dx.rop.cst.*;
[ "com.android.dx" ]
com.android.dx;
1,361,824
private int selectVantagePoint(List<Pair<Double, Integer>> S) { int vpIndex = selectVantagePointIndex(S); return S.remove(vpIndex).getSecondItem(); }
int function(List<Pair<Double, Integer>> S) { int vpIndex = selectVantagePointIndex(S); return S.remove(vpIndex).getSecondItem(); }
/** * Determines what point from the data set will become a vantage point, and removes it from the list * @param S the set to select a vantage point from * @return the index of thevantage point removed from the set */
Determines what point from the data set will become a vantage point, and removes it from the list
selectVantagePoint
{ "repo_name": "sureddy/JSAT", "path": "JSAT/src/jsat/linear/vectorcollection/VPTree.java", "license": "gpl-3.0", "size": 21950 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
407,749
void onFilteringChanged(SettingsFiltering filteringChosen);
void onFilteringChanged(SettingsFiltering filteringChosen);
/** * Invokes when user is changing the filtering setting * @param filteringChosen - one of SettingsFiltering options * @see SettingsFiltering */
Invokes when user is changing the filtering setting
onFilteringChanged
{ "repo_name": "trident2710/ComicBookReader", "path": "app/src/main/java/com/dev/trident/comicbookreader/activities/settings/presenter/SettingsPresenter.java", "license": "gpl-3.0", "size": 623 }
[ "com.dev.trident.comicbookreader.activities.settings.model.SettingsFiltering" ]
import com.dev.trident.comicbookreader.activities.settings.model.SettingsFiltering;
import com.dev.trident.comicbookreader.activities.settings.model.*;
[ "com.dev.trident" ]
com.dev.trident;
441,482
public void registerPluginValueType(String keyName, ValueType valueType) { assertUnlocked(); if (_log.isInfoEnabled()) { _log.info("...Registering plug-in valueType: " + keyName + " = " + valueType); } TnValueTypes.registerPluginValueType(currentDBDef(), keyName, valueTyp...
void function(String keyName, ValueType valueType) { assertUnlocked(); if (_log.isInfoEnabled()) { _log.info(STR + keyName + STR + valueType); } TnValueTypes.registerPluginValueType(currentDBDef(), keyName, valueType); }
/** * Register the plug-in value type. <br> * This setting is shared per DBMS in the same class loader. * @param keyName The name as key. (NotNull) * @param valueType The plug-in value type. (NotNull) */
Register the plug-in value type. This setting is shared per DBMS in the same class loader
registerPluginValueType
{ "repo_name": "XenonAbe/dbflute-play-guice-java-example", "path": "dbflute/src/main/java/dbflute/allcommon/DBFluteConfig.java", "license": "unlicense", "size": 39091 }
[ "org.dbflute.jdbc.ValueType", "org.dbflute.s2dao.valuetype.TnValueTypes" ]
import org.dbflute.jdbc.ValueType; import org.dbflute.s2dao.valuetype.TnValueTypes;
import org.dbflute.jdbc.*; import org.dbflute.s2dao.valuetype.*;
[ "org.dbflute.jdbc", "org.dbflute.s2dao" ]
org.dbflute.jdbc; org.dbflute.s2dao;
1,636,392
interface WithIpAllocations { WithCreate withIpAllocations(List<SubResource> ipAllocations); }
interface WithIpAllocations { WithCreate withIpAllocations(List<SubResource> ipAllocations); }
/** * Specifies ipAllocations. * @param ipAllocations Array of IpAllocation which reference this subnet * @return the next definition stage */
Specifies ipAllocations
withIpAllocations
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/Subnet.java", "license": "mit", "size": 17703 }
[ "com.microsoft.azure.SubResource", "java.util.List" ]
import com.microsoft.azure.SubResource; import java.util.List;
import com.microsoft.azure.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
7,589
public FSArray getDependentPhrases() { if (Phrase_Type.featOkTst && ((Phrase_Type)jcasType).casFeat_dependentPhrases == null) jcasType.jcas.throwFeatMissing("dependentPhrases", "com.textocat.textokit.phrrecog.cas.Phrase"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(ad...
FSArray function() { if (Phrase_Type.featOkTst && ((Phrase_Type)jcasType).casFeat_dependentPhrases == null) jcasType.jcas.throwFeatMissing(STR, STR); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Phrase_Type)jcasType).casFeatCode_dependentPhrases)));}
/** getter for dependentPhrases - gets * @generated * @return value of the feature */
getter for dependentPhrases - gets
getDependentPhrases
{ "repo_name": "Denis220795/Textokit", "path": "Textokit.PhraseRecognizer/src/main/jcas/com/textocat/textokit/phrrecog/cas/Phrase.java", "license": "apache-2.0", "size": 8054 }
[ "org.apache.uima.jcas.cas.FSArray" ]
import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.cas.*;
[ "org.apache.uima" ]
org.apache.uima;
2,091,474
public final void testUpdateExistingWaypointWithEmptyCoordsFromNoteWithSamePrefix() { final Geocache cache = new Geocache(); final String geocode = "Test" + System.nanoTime(); cache.setGeocode(geocode); cache.setCoords(new Geopoint(40.0, 8.0)); final Waypoint userWaypoint = n...
final void function() { final Geocache cache = new Geocache(); final String geocode = "Test" + System.nanoTime(); cache.setGeocode(geocode); cache.setCoords(new Geopoint(40.0, 8.0)); final Waypoint userWaypoint = new Waypoint("Test", WaypointType.OWN, true); userWaypoint.setCoords(null); userWaypoint.setPrefix("S1"); c...
/** * Waypoint with empty coordinates exist. Update waypointlist from note. * The waypoint has same prefix, but different name and coordinates. * So expected size is 1: * - existing waypoint with original name, but new coordinates. */
Waypoint with empty coordinates exist. Update waypointlist from note. The waypoint has same prefix, but different name and coordinates. So expected size is 1: - existing waypoint with original name, but new coordinates
testUpdateExistingWaypointWithEmptyCoordsFromNoteWithSamePrefix
{ "repo_name": "rsudev/c-geo-opensource", "path": "tests/src-android/cgeo/geocaching/models/GeocacheTest.java", "license": "apache-2.0", "size": 45938 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,646,527
EList<Symbol> getSubSymbols();
EList<Symbol> getSubSymbols();
/** * Returns the value of the '<em><b>Sub Symbols</b></em>' containment reference list. * The list contents are of type {@link org.mendix.crossx.mm.crossx.Symbol}. * It is bidirectional and its opposite is '{@link org.mendix.crossx.mm.crossx.Symbol#getParent <em>Parent</em>}'. * <!-- begin-user...
Returns the value of the 'Sub Symbols' containment reference list. The list contents are of type <code>org.mendix.crossx.mm.crossx.Symbol</code>. It is bidirectional and its opposite is '<code>org.mendix.crossx.mm.crossx.Symbol#getParent Parent</code>'. If the meaning of the 'Sub Symbols' containment reference list isn...
getSubSymbols
{ "repo_name": "mendix/Mendix-Core", "path": "ServiceDsl/org.mod4j.dsl.service.mm/oaw/org/mod4j/org.mod4j.crossx.mm/src/org/mod4j/crossx/mm/crossx/Symbol.java", "license": "epl-1.0", "size": 6661 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,601,584
public boolean isRefuted() { return getVerificationStatus() == VerificationStatus.REFUTED; }
boolean function() { return getVerificationStatus() == VerificationStatus.REFUTED; }
/** * Does this view have at least one refutation? * * @return True if this view is refuted. */
Does this view have at least one refutation
isRefuted
{ "repo_name": "googlegsa/secmgr", "path": "src/main/java/com/google/enterprise/secmgr/authncontroller/SessionView.java", "license": "apache-2.0", "size": 20003 }
[ "com.google.enterprise.secmgr.identity.VerificationStatus" ]
import com.google.enterprise.secmgr.identity.VerificationStatus;
import com.google.enterprise.secmgr.identity.*;
[ "com.google.enterprise" ]
com.google.enterprise;
604,435
public static PreferTag emptyTag() { return new PreferTag((String)null); } public PreferTag(final PreferTag preferTag) { tag = preferTag.getTag(); value = preferTag.getValue(); params = preferTag.getParams(); } public PreferTag(final HttpHeaderReader reade...
static PreferTag function() { return new PreferTag((String)null); } public PreferTag(final PreferTag preferTag) { tag = preferTag.getTag(); value = preferTag.getValue(); params = preferTag.getParams(); } public PreferTag(final HttpHeaderReader reader) { reader.hasNext(); if (reader.hasNext()) { try { tag = Optional.ofN...
/** * Create an empty PreferTag * @return the empty PreferTag */
Create an empty PreferTag
emptyTag
{ "repo_name": "emetsger/fcrepo4", "path": "fcrepo-http-commons/src/main/java/org/fcrepo/http/commons/domain/PreferTag.java", "license": "apache-2.0", "size": 4983 }
[ "java.text.ParseException", "java.util.HashMap", "java.util.Optional", "org.glassfish.jersey.message.internal.HttpHeaderReader" ]
import java.text.ParseException; import java.util.HashMap; import java.util.Optional; import org.glassfish.jersey.message.internal.HttpHeaderReader;
import java.text.*; import java.util.*; import org.glassfish.jersey.message.internal.*;
[ "java.text", "java.util", "org.glassfish.jersey" ]
java.text; java.util; org.glassfish.jersey;
2,624,019
public Authentication getAuthentication(String authName) { return authentications.get(authName); }
Authentication function(String authName) { return authentications.get(authName); }
/** * Get authentication for the given name. * * @param authName The authentication name * @return The authentication, null if not found */
Get authentication for the given name
getAuthentication
{ "repo_name": "telefonicaid/netphony-topology", "path": "src/main/java/es/tid/topologyModuleBase/COPServiceTopology/client/ApiClient.java", "license": "apache-2.0", "size": 18788 }
[ "es.tid.topologyModuleBase.COPServiceTopology" ]
import es.tid.topologyModuleBase.COPServiceTopology;
import es.tid.*;
[ "es.tid" ]
es.tid;
903,659
public static Object callWithTCCL(Callable<?> call, ClassLoader classloader) throws Exception { ClassLoader tccl = Thread.currentThread().getContextClassLoader(); try { if (classloader != null) { Thread.currentThread().setContextClassLoader(classloader); } ...
static Object function(Callable<?> call, ClassLoader classloader) throws Exception { ClassLoader tccl = Thread.currentThread().getContextClassLoader(); try { if (classloader != null) { Thread.currentThread().setContextClassLoader(classloader); } return call.call(); } finally { if (tccl != null) { Thread.currentThread()...
/** * Calling the Callable with the setting of TCCL with a given classloader. * * @param call the Callable instance * @param classloader the class loader * @return the result of Callable return */
Calling the Callable with the setting of TCCL with a given classloader
callWithTCCL
{ "repo_name": "pkletsko/camel", "path": "camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java", "license": "apache-2.0", "size": 79019 }
[ "java.util.concurrent.Callable" ]
import java.util.concurrent.Callable;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
920,730
public static Driver getProxy( Class<? extends Driver> intf, final Driver obj, Class driverInvocationHandlerClass ) { driverProxyClassLoader = obj.getClass().getClassLoader(); if ( !initialized ) { init(); } InvocationHandler invocationHandler = new DriverInvocationHandler( obj ); try { ...
static Driver function( Class<? extends Driver> intf, final Driver obj, Class driverInvocationHandlerClass ) { driverProxyClassLoader = obj.getClass().getClassLoader(); if ( !initialized ) { init(); } InvocationHandler invocationHandler = new DriverInvocationHandler( obj ); try { Constructor driverHandler = driverInvoc...
/** * Gets the proxy. * * @param intf the intf * @param obj the obj * @return the proxy */
Gets the proxy
getProxy
{ "repo_name": "mkambol/pentaho-hadoop-shims", "path": "common-fragment-V1/src/main/java/org/pentaho/hadoop/shim/common/DriverProxyInvocationChain.java", "license": "apache-2.0", "size": 9007 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.InvocationHandler", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Proxy", "java.sql.Driver", "org.pentaho.hadoop.shim.common.invocationhandler.DriverInvocationHandler" ]
import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Proxy; import java.sql.Driver; import org.pentaho.hadoop.shim.common.invocationhandler.DriverInvocationHandler;
import java.lang.reflect.*; import java.sql.*; import org.pentaho.hadoop.shim.common.invocationhandler.*;
[ "java.lang", "java.sql", "org.pentaho.hadoop" ]
java.lang; java.sql; org.pentaho.hadoop;
2,812,125
public static boolean isValidStructureHandle( StructureHandle structHandle ) { if ( structHandle == null ) return true; Structure struct = (Structure) structHandle.getStructure( ); if ( struct == null ) return false; StructureContext context = struct.getContext( ); // the local structure is droppe...
static boolean function( StructureHandle structHandle ) { if ( structHandle == null ) return true; Structure struct = (Structure) structHandle.getStructure( ); if ( struct == null ) return false; StructureContext context = struct.getContext( ); if ( context == null ) return false; DesignElement hostElement = context.ge...
/** * Determines whether the cached structure handle is valid or not. If the * structure is not in the design tree any more, then the handle is invalid; * otherwise valid. * * @param structHandle * @return */
Determines whether the cached structure handle is valid or not. If the structure is not in the design tree any more, then the handle is invalid; otherwise valid
isValidStructureHandle
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/StructureContextUtil.java", "license": "epl-1.0", "size": 8442 }
[ "org.eclipse.birt.report.model.api.StructureHandle", "org.eclipse.birt.report.model.core.DesignElement", "org.eclipse.birt.report.model.core.Structure", "org.eclipse.birt.report.model.core.StructureContext" ]
import org.eclipse.birt.report.model.api.StructureHandle; import org.eclipse.birt.report.model.core.DesignElement; import org.eclipse.birt.report.model.core.Structure; import org.eclipse.birt.report.model.core.StructureContext;
import org.eclipse.birt.report.model.api.*; import org.eclipse.birt.report.model.core.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,263,611
public int getAscent(Font font) { FontMetrics fm = FigureUtilities.getFontMetrics(font); return fm.getHeight() - fm.getDescent(); }
int function(Font font) { FontMetrics fm = FigureUtilities.getFontMetrics(font); return fm.getHeight() - fm.getDescent(); }
/** * Gets the font's ascent. * * @param font * @return the font's ascent */
Gets the font's ascent
getAscent
{ "repo_name": "archimatetool/archi", "path": "org.eclipse.draw2d/src/org/eclipse/draw2d/TextUtilities.java", "license": "mit", "size": 3770 }
[ "org.eclipse.swt.graphics.Font", "org.eclipse.swt.graphics.FontMetrics" ]
import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontMetrics;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,291,581
public static void refreshMetadata() { AnalyticsMetadata metadata = new AnalyticsMetadata(); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(WordPress.getContext()); metadata.setSessionCount(preferences.getInt(AnalyticsTrackerMixpanel.SESSION_COUNT, 0)); ...
static void function() { AnalyticsMetadata metadata = new AnalyticsMetadata(); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(WordPress.getContext()); metadata.setSessionCount(preferences.getInt(AnalyticsTrackerMixpanel.SESSION_COUNT, 0)); metadata.setUserConnected(AccountHelper.isSignedI...
/** * Utility method to refresh mixpanel metadata. */
Utility method to refresh mixpanel metadata
refreshMetadata
{ "repo_name": "karambir252/WordPress-Android", "path": "WordPress/src/main/java/org/wordpress/android/util/AnalyticsUtils.java", "license": "gpl-2.0", "size": 7059 }
[ "android.content.SharedPreferences", "android.preference.PreferenceManager", "org.wordpress.android.WordPress", "org.wordpress.android.analytics.AnalyticsMetadata", "org.wordpress.android.analytics.AnalyticsTracker", "org.wordpress.android.analytics.AnalyticsTrackerMixpanel", "org.wordpress.android.mode...
import android.content.SharedPreferences; import android.preference.PreferenceManager; import org.wordpress.android.WordPress; import org.wordpress.android.analytics.AnalyticsMetadata; import org.wordpress.android.analytics.AnalyticsTracker; import org.wordpress.android.analytics.AnalyticsTrackerMixpanel; import org.wo...
import android.content.*; import android.preference.*; import org.wordpress.android.*; import org.wordpress.android.analytics.*; import org.wordpress.android.models.*;
[ "android.content", "android.preference", "org.wordpress.android" ]
android.content; android.preference; org.wordpress.android;
2,310,867
public void markUsed(AcroFields parentFields, int writeFlags) { if ((writeFlags & WRITE_VALUE) != 0) { for (int i = 0; i < size(); ++i) { parentFields.markUsed(getValue(i)); } } if ((writeFlags & WRITE_WIDGET) != 0) { for (int i = 0; i < size(); ++i) { parentFields.markUsed(getWidget...
void function(AcroFields parentFields, int writeFlags) { if ((writeFlags & WRITE_VALUE) != 0) { for (int i = 0; i < size(); ++i) { parentFields.markUsed(getValue(i)); } } if ((writeFlags & WRITE_WIDGET) != 0) { for (int i = 0; i < size(); ++i) { parentFields.markUsed(getWidget(i)); } } } public ArrayList values = new A...
/** * Mark all the item dictionaries used matching the given flags * * @since 2.1.5 * @param writeFlags * WRITE_MERGED is ignored */
Mark all the item dictionaries used matching the given flags
markUsed
{ "repo_name": "bullda/DroidText", "path": "src/core/com/lowagie/text/pdf/AcroFields.java", "license": "lgpl-3.0", "size": 84860 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
338,688
YangNode node = manager.getDataModel("src/test/resources/ValueStatement.yang"); // Check whether the data model tree returned is of type module. assertThat((node instanceof YangModule), is(true)); // Check whether the node type is set properly to module. assertThat(node.getNode...
YangNode node = manager.getDataModel(STR); assertThat((node instanceof YangModule), is(true)); assertThat(node.getNodeType(), is(YangNodeType.MODULE_NODE)); YangModule yangNode = (YangModule) node; assertThat(yangNode.getName(), is("Test")); ListIterator<YangLeaf> leafIterator = yangNode.getListOfLeaf().listIterator();...
/** * Checks explicitly configured value. */
Checks explicitly configured value
processValueStatement
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "utils/yangutils/plugin/src/test/java/org/onosproject/yangutils/parser/impl/listeners/ValueListenerTest.java", "license": "apache-2.0", "size": 9047 }
[ "java.util.ListIterator", "java.util.Set", "org.hamcrest.MatcherAssert", "org.hamcrest.core.Is", "org.junit.Test", "org.onosproject.yangutils.datamodel.YangEnum", "org.onosproject.yangutils.datamodel.YangEnumeration", "org.onosproject.yangutils.datamodel.YangLeaf", "org.onosproject.yangutils.datamod...
import java.util.ListIterator; import java.util.Set; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.junit.Test; import org.onosproject.yangutils.datamodel.YangEnum; import org.onosproject.yangutils.datamodel.YangEnumeration; import org.onosproject.yangutils.datamodel.YangLeaf; import org.ono...
import java.util.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.junit.*; import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.datamodel.utils.builtindatatype.*;
[ "java.util", "org.hamcrest", "org.hamcrest.core", "org.junit", "org.onosproject.yangutils" ]
java.util; org.hamcrest; org.hamcrest.core; org.junit; org.onosproject.yangutils;
764,383
private ListContainersCmd executeListContainersRequest(DockerClient client, Message message) { LOGGER.debug("Executing Docker List Container Request"); ListContainersCmd listContainersCmd = client.listContainersCmd(); String before = DockerHelper.getProperty(DockerConstants.DOCKER_BEFORE,...
ListContainersCmd function(DockerClient client, Message message) { LOGGER.debug(STR); ListContainersCmd listContainersCmd = client.listContainersCmd(); String before = DockerHelper.getProperty(DockerConstants.DOCKER_BEFORE, configuration, message, String.class); if (before != null) { listContainersCmd.withBefore(before...
/** * Produces a list containers request * * @param client * @param message * @return */
Produces a list containers request
executeListContainersRequest
{ "repo_name": "sabre1041/camel", "path": "components/camel-docker/src/main/java/org/apache/camel/component/docker/producer/DockerProducer.java", "license": "apache-2.0", "size": 38109 }
[ "com.github.dockerjava.api.DockerClient", "com.github.dockerjava.api.command.ListContainersCmd", "org.apache.camel.Message", "org.apache.camel.component.docker.DockerConstants", "org.apache.camel.component.docker.DockerHelper" ]
import com.github.dockerjava.api.DockerClient; import com.github.dockerjava.api.command.ListContainersCmd; import org.apache.camel.Message; import org.apache.camel.component.docker.DockerConstants; import org.apache.camel.component.docker.DockerHelper;
import com.github.dockerjava.api.*; import com.github.dockerjava.api.command.*; import org.apache.camel.*; import org.apache.camel.component.docker.*;
[ "com.github.dockerjava", "org.apache.camel" ]
com.github.dockerjava; org.apache.camel;
1,336,280
public static String getSubtype(ICS ics, String c, String cid) { return getSubtype(ics, new AssetIdImpl(c, Long.valueOf(cid))); }
static String function(ICS ics, String c, String cid) { return getSubtype(ics, new AssetIdImpl(c, Long.valueOf(cid))); }
/** * Get the subtype of the specified asset. The asset does not need to be * loaded. * * @param ics ICS context * @param c the type of the asset to return the subtype for. * @param cid the id of the asset to return the subtype for. * @return subtype on success */
Get the subtype of the specified asset. The asset does not need to be loaded
getSubtype
{ "repo_name": "dolfdijkstra/gst-foundation", "path": "gsf-legacy/src/main/java/com/fatwire/gst/foundation/facade/runtag/asset/GetSubtype.java", "license": "apache-2.0", "size": 3248 }
[ "com.openmarket.xcelerate.asset.AssetIdImpl" ]
import com.openmarket.xcelerate.asset.AssetIdImpl;
import com.openmarket.xcelerate.asset.*;
[ "com.openmarket.xcelerate" ]
com.openmarket.xcelerate;
1,521,798
public static String[] listFiles(File envDirFile, String[] suffixes, boolean envMultiSubDir) { String[] names = envDirFile.list(new JEFileFilter(suffixes)); ArrayList<String> subFileNames = new ArrayList<String>(); if...
static String[] function(File envDirFile, String[] suffixes, boolean envMultiSubDir) { String[] names = envDirFile.list(new JEFileFilter(suffixes)); ArrayList<String> subFileNames = new ArrayList<String>(); if (envMultiSubDir) { for (File file : envDirFile.listFiles()) { if (file.isDirectory() && file.getName().startsW...
/** * Find JE files, flavor for unit test support. * * @param suffix which type of file we're looking for * @return array of file names */
Find JE files, flavor for unit test support
listFiles
{ "repo_name": "prat0318/dbms", "path": "mini_dbms/je-5.0.103/src/com/sleepycat/je/log/FileManager.java", "license": "mit", "size": 119870 }
[ "java.io.File", "java.util.ArrayList", "java.util.Arrays" ]
import java.io.File; import java.util.ArrayList; import java.util.Arrays;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,225,426