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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private FlushNewPageResult flushNewPage(DataPage page, DataPage spareDataPage) {
if (page.immutable) {
LOGGER.log(Level.SEVERE, "Attempt to flush an immutable page {0} as it was mutable", page.pageId);
throw new IllegalStateException("page " + page.pageId + " is not a new page!");
... | FlushNewPageResult function(DataPage page, DataPage spareDataPage) { if (page.immutable) { LOGGER.log(Level.SEVERE, STR, page.pageId); throw new IllegalStateException(STR + page.pageId + STR); } page.pageLock.readLock().lock(); try { if (!page.writable) { LOGGER.log(Level.INFO, STR, page.pageId); return FlushNewPageRes... | /**
* Remove the page from {@link #newPages}, set it as "unloaded" and write it to disk
* <p>
* Add as much spare data as possible to fillup the page. If added must change key to page pointers
* too for spare data
* </p>
*
* @param page new page to flush
* @param spareDa... | Remove the page from <code>#newPages</code>, set it as "unloaded" and write it to disk Add as much spare data as possible to fillup the page. If added must change key to page pointers too for spare data | flushNewPage | {
"repo_name": "diennea/herddb",
"path": "herddb-core/src/main/java/herddb/core/TableManager.java",
"license": "apache-2.0",
"size": 189507
} | [
"java.util.Iterator",
"java.util.concurrent.locks.Lock",
"java.util.logging.Level"
] | import java.util.Iterator; import java.util.concurrent.locks.Lock; import java.util.logging.Level; | import java.util.*; import java.util.concurrent.locks.*; import java.util.logging.*; | [
"java.util"
] | java.util; | 2,546,472 |
void onStart(Closeable closeable); | void onStart(Closeable closeable); | /**
* Called when the async processing starts. The passed {@link Closeable} can be used to close/interrupt the
* processing
*/ | Called when the async processing starts. The passed <code>Closeable</code> can be used to close/interrupt the processing | onStart | {
"repo_name": "sabre1041/docker-java",
"path": "src/main/java/com/github/dockerjava/api/async/ResultCallback.java",
"license": "apache-2.0",
"size": 643
} | [
"java.io.Closeable"
] | import java.io.Closeable; | import java.io.*; | [
"java.io"
] | java.io; | 808,681 |
List<String> answer = new ArrayList<String>();
for(int i = 0; i < array.length; i ++){
answer.add(array[i]);
}
return answer;
} | List<String> answer = new ArrayList<String>(); for(int i = 0; i < array.length; i ++){ answer.add(array[i]); } return answer; } | /**
* Convert an array of Strings to a List of Strings
* @param array
* @return a list of Strings
*/ | Convert an array of Strings to a List of Strings | convertStringArrayToList | {
"repo_name": "dchouzer/OOGASalad",
"path": "src/util/SaladUtil.java",
"license": "mit",
"size": 4283
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,840,784 |
@Override
public boolean incrementToken() throws IOException {
//collect all the terms into the words collection
while (input.incrementToken()) {
final String word = new String(termAtt.buffer(), 0, termAtt.length());
words.add(word);
}
//if we have a pre... | boolean function() throws IOException { while (input.incrementToken()) { final String word = new String(termAtt.buffer(), 0, termAtt.length()); words.add(word); } if (previousWord != null && words.size() > 0) { final String word = words.getFirst(); clearAttributes(); termAtt.append(previousWord).append(word); previousW... | /**
* Increments the underlying TokenStream and sets CharTermAttributes to construct an expanded set of tokens by
* concatenating tokens with the previous token.
*
* @return whether or not we have hit the end of the TokenStream
* @throws IOException is thrown when an IOException occurs
*/ | Increments the underlying TokenStream and sets CharTermAttributes to construct an expanded set of tokens by concatenating tokens with the previous token | incrementToken | {
"repo_name": "simon-eastwood/DependencyCheckCM",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/data/lucene/TokenPairConcatenatingFilter.java",
"license": "apache-2.0",
"size": 3917
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,780,983 |
public List<Event> serialize(Node data)
{
YamlSilentEmitter emitter = new YamlSilentEmitter();
Serializer serializer = new Serializer(this.serialization, emitter, this.resolver, this.dumperOptions, null);
try
{
serializer.open();
serializer.serialize(data)... | List<Event> function(Node data) { YamlSilentEmitter emitter = new YamlSilentEmitter(); Serializer serializer = new Serializer(this.serialization, emitter, this.resolver, this.dumperOptions, null); try { serializer.open(); serializer.serialize(data); serializer.close(); } catch (IOException e) { throw new YAMLException(... | /**
* Serialize the representation tree into Events.
*
* @param data
* representation tree
*
* @return Event list
*
* @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
*/ | Serialize the representation tree into Events | serialize | {
"repo_name": "GotoFinal/diorite-configs-java8",
"path": "src/main/java/org/diorite/config/serialization/snakeyaml/Yaml.java",
"license": "mit",
"size": 33096
} | [
"java.io.IOException",
"java.util.List",
"org.diorite.config.serialization.snakeyaml.emitter.Serializer",
"org.yaml.snakeyaml.error.YAMLException",
"org.yaml.snakeyaml.events.Event",
"org.yaml.snakeyaml.nodes.Node"
] | import java.io.IOException; import java.util.List; import org.diorite.config.serialization.snakeyaml.emitter.Serializer; import org.yaml.snakeyaml.error.YAMLException; import org.yaml.snakeyaml.events.Event; import org.yaml.snakeyaml.nodes.Node; | import java.io.*; import java.util.*; import org.diorite.config.serialization.snakeyaml.emitter.*; import org.yaml.snakeyaml.error.*; import org.yaml.snakeyaml.events.*; import org.yaml.snakeyaml.nodes.*; | [
"java.io",
"java.util",
"org.diorite.config",
"org.yaml.snakeyaml"
] | java.io; java.util; org.diorite.config; org.yaml.snakeyaml; | 1,599,237 |
return centers.stream()
.map(center -> center.getName() + " temperature is " + center.getTemperature(location))
.collect(Collectors.toList());
}
/**
* Using parallel stream to query temperatures
* the param and return result is same as {@code queryTemperature(String lo... | return centers.stream() .map(center -> center.getName() + STR + center.getTemperature(location)) .collect(Collectors.toList()); } /** * Using parallel stream to query temperatures * the param and return result is same as {@code queryTemperature(String location)} | /**
* Query temperatures for location {@code location} from all weather centers sequentially.
* @param location Specific location to be queried.
* @return String list represent temperatures from all weather centers.
*/ | Query temperatures for location location from all weather centers sequentially | queryTemperature | {
"repo_name": "kennylbj/concurrent-java",
"path": "src/main/java/completableFuture/Forecaster.java",
"license": "mit",
"size": 5047
} | [
"java.util.stream.Collectors"
] | import java.util.stream.Collectors; | import java.util.stream.*; | [
"java.util"
] | java.util; | 1,397,122 |
@Test
public void testHashcode() {
StandardBarPainter p1 = new StandardBarPainter();
StandardBarPainter p2 = new StandardBarPainter();
assertEquals(p1, p2);
int h1 = p1.hashCode();
int h2 = p2.hashCode();
assertEquals(h1, h2);
}
| void function() { StandardBarPainter p1 = new StandardBarPainter(); StandardBarPainter p2 = new StandardBarPainter(); assertEquals(p1, p2); int h1 = p1.hashCode(); int h2 = p2.hashCode(); assertEquals(h1, h2); } | /**
* Two objects that are equal are required to return the same hashCode.
*/ | Two objects that are equal are required to return the same hashCode | testHashcode | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/test/java/org/jfree/chart/renderer/category/StandardBarPainterTest.java",
"license": "lgpl-2.1",
"size": 3879
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 240,139 |
public void setTapListener(GestureDetector.SimpleOnGestureListener tapListener) {
mTapListenerWrapper.setListener(tapListener);
} | void function(GestureDetector.SimpleOnGestureListener tapListener) { mTapListenerWrapper.setListener(tapListener); } | /**
* Sets the tap listener.
*/ | Sets the tap listener | setTapListener | {
"repo_name": "s1rius/fresco",
"path": "samples/zoomable/src/main/java/com/facebook/samples/zoomable/ZoomableDraweeView.java",
"license": "mit",
"size": 15089
} | [
"android.view.GestureDetector"
] | import android.view.GestureDetector; | import android.view.*; | [
"android.view"
] | android.view; | 2,486,085 |
public void setSize(Dimension dimension) {
dim = dimension;
} | void function(Dimension dimension) { dim = dimension; } | /**
* Sets the size of the video.
*
* @param dimension the dimensions of the new video
*/ | Sets the size of the video | setSize | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/media/core/ScratchVideoRecorder.java",
"license": "gpl-3.0",
"size": 18911
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,889,900 |
protected ContentEncoder createContentEncoder(
final long len,
final WritableByteChannel channel,
final SessionOutputBuffer buffer,
final HttpTransportMetricsImpl metrics) {
if (len == ContentLengthStrategy.CHUNKED) {
return new ChunkEncoder(channe... | ContentEncoder function( final long len, final WritableByteChannel channel, final SessionOutputBuffer buffer, final HttpTransportMetricsImpl metrics) { if (len == ContentLengthStrategy.CHUNKED) { return new ChunkEncoder(channel, buffer, metrics, this.fragmentSizeHint); } else if (len == ContentLengthStrategy.IDENTITY) ... | /**
* Factory method for {@link ContentEncoder} instances.
*
* @param len content length, if known, {@link ContentLengthStrategy#CHUNKED} or
* {@link ContentLengthStrategy#IDENTITY}, if unknown.
* @param channel the session channel.
* @param buffer the session buffer.
* @param metri... | Factory method for <code>ContentEncoder</code> instances | createContentEncoder | {
"repo_name": "viapp/httpasyncclient-android",
"path": "src/main/java/org/apache/http/impl/nio/NHttpConnectionBase.java",
"license": "apache-2.0",
"size": 21049
} | [
"java.nio.channels.WritableByteChannel",
"org.apache.http.entity.ContentLengthStrategy",
"org.apache.http.impl.io.HttpTransportMetricsImpl",
"org.apache.http.impl.nio.codecs.ChunkEncoder",
"org.apache.http.impl.nio.codecs.IdentityEncoder",
"org.apache.http.impl.nio.codecs.LengthDelimitedEncoder",
"org.a... | import java.nio.channels.WritableByteChannel; import org.apache.http.entity.ContentLengthStrategy; import org.apache.http.impl.io.HttpTransportMetricsImpl; import org.apache.http.impl.nio.codecs.ChunkEncoder; import org.apache.http.impl.nio.codecs.IdentityEncoder; import org.apache.http.impl.nio.codecs.LengthDelimitedE... | import java.nio.channels.*; import org.apache.http.entity.*; import org.apache.http.impl.io.*; import org.apache.http.impl.nio.codecs.*; import org.apache.http.nio.*; import org.apache.http.nio.reactor.*; | [
"java.nio",
"org.apache.http"
] | java.nio; org.apache.http; | 2,483,935 |
private void storeBlock(SagaItem sagaItem) {
ArrayList<Block> storage = findLowestEmpty();
// Loaded:
if(getSagaChunk().isLoaded())
while(sagaItem.getAmount() >= 1.0 && storage.size() > 0){
// Remove block:
int index = Saga.RANDOM.nextInt(storage.size());
Block block = storage.get(index);... | void function(SagaItem sagaItem) { ArrayList<Block> storage = findLowestEmpty(); if(getSagaChunk().isLoaded()) while(sagaItem.getAmount() >= 1.0 && storage.size() > 0){ int index = Saga.RANDOM.nextInt(storage.size()); Block block = storage.get(index); block.setTypeIdAndData(sagaItem.getType().getId(), sagaItem.getData(... | /**
* Stores blocks.
*
* @param items saga block to store
*/ | Stores blocks | storeBlock | {
"repo_name": "andfRa/Saga",
"path": "src/org/saga/buildings/Warehouse.java",
"license": "gpl-3.0",
"size": 13549
} | [
"java.util.ArrayList",
"org.bukkit.block.Block",
"org.saga.Saga",
"org.saga.buildings.production.SagaItem"
] | import java.util.ArrayList; import org.bukkit.block.Block; import org.saga.Saga; import org.saga.buildings.production.SagaItem; | import java.util.*; import org.bukkit.block.*; import org.saga.*; import org.saga.buildings.production.*; | [
"java.util",
"org.bukkit.block",
"org.saga",
"org.saga.buildings"
] | java.util; org.bukkit.block; org.saga; org.saga.buildings; | 2,096,928 |
public XMLString substring(int beginIndex)
{
int len = m_length - beginIndex;
if (len <= 0)
return XString.EMPTYSTRING;
else
{
int start = m_start + beginIndex;
return new XStringForFSB(fsb(), start, len);
}
}
| XMLString function(int beginIndex) { int len = m_length - beginIndex; if (len <= 0) return XString.EMPTYSTRING; else { int start = m_start + beginIndex; return new XStringForFSB(fsb(), start, len); } } | /**
* Returns a new string that is a substring of this string. The
* substring begins with the character at the specified index and
* extends to the end of this string. <p>
* Examples:
* <blockquote><pre>
* "unhappy".substring(2) returns "happy"
* "Harbison".substring(3) returns "bison"
... | Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string. Examples: <code> "unhappy".substring(2) returns "happy" "Harbison".substring(3) returns "bison" "emptiness".substring(9) returns "" (an empty string) </code> | substring | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xpath/objects/XStringForFSB.java",
"license": "mit",
"size": 29255
} | [
"org.apache.xml.utils.XMLString"
] | import org.apache.xml.utils.XMLString; | import org.apache.xml.utils.*; | [
"org.apache.xml"
] | org.apache.xml; | 1,325,049 |
interface WithSku {
@Beta(SinceVersion.V1_4_0)
Update withBasicSku();
| interface WithSku { @Beta(SinceVersion.V1_4_0) Update withBasicSku(); | /**
* Updates the current container registry to a 'managed' registry with a 'Basic' SKU type.
* @return the next stage of the definition
*/ | Updates the current container registry to a 'managed' registry with a 'Basic' SKU type | withBasicSku | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-containerregistry/src/main/java/com/microsoft/azure/management/containerregistry/Registry.java",
"license": "mit",
"size": 12663
} | [
"com.microsoft.azure.management.apigeneration.Beta"
] | import com.microsoft.azure.management.apigeneration.Beta; | import com.microsoft.azure.management.apigeneration.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,270,214 |
VarPatternBuilder mapped = var();
if(instance.isEntity()){
mapped = map(instance.asEntity());
} else if(instance.isResource()){
mapped = map(instance.asResource());
} else if(instance.isRelation()){
mapped = map(instance.asRelation());
} else if(instan... | VarPatternBuilder mapped = var(); if(instance.isEntity()){ mapped = map(instance.asEntity()); } else if(instance.isResource()){ mapped = map(instance.asResource()); } else if(instance.isRelation()){ mapped = map(instance.asRelation()); } else if(instance.isRule()){ mapped = map(instance.asRule()); } return mapped.patte... | /**
* Map an Instance to the equivalent Graql representation
* @param instance instance to be mapped
* @return Graql representation of given instance
*/ | Map an Instance to the equivalent Graql representation | map | {
"repo_name": "alexandraorth/grakn",
"path": "grakn-migration/export/src/main/java/ai/grakn/migration/export/InstanceMapper.java",
"license": "gpl-3.0",
"size": 5895
} | [
"ai.grakn.concept.Entity",
"ai.grakn.graql.Graql",
"ai.grakn.graql.VarPattern",
"ai.grakn.graql.VarPatternBuilder",
"java.util.Map"
] | import ai.grakn.concept.Entity; import ai.grakn.graql.Graql; import ai.grakn.graql.VarPattern; import ai.grakn.graql.VarPatternBuilder; import java.util.Map; | import ai.grakn.concept.*; import ai.grakn.graql.*; import java.util.*; | [
"ai.grakn.concept",
"ai.grakn.graql",
"java.util"
] | ai.grakn.concept; ai.grakn.graql; java.util; | 2,903,680 |
public static String replace( String string, String repl, String with ) {
if ( string != null && repl != null && with != null ) {
return string.replaceAll( Pattern.quote( repl ), Matcher.quoteReplacement( with ) );
} else {
return null;
}
} | static String function( String string, String repl, String with ) { if ( string != null && repl != null && with != null ) { return string.replaceAll( Pattern.quote( repl ), Matcher.quoteReplacement( with ) ); } else { return null; } } | /**
* Replace values in a String with another.
*
* 33% Faster using replaceAll this way than original method
*
* @param string
* The original String.
* @param repl
* The text to replace
* @param with
* The new text bit
* @return The resulting string with the t... | Replace values in a String with another. 33% Faster using replaceAll this way than original method | replace | {
"repo_name": "mkambol/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/Const.java",
"license": "apache-2.0",
"size": 121415
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,908,867 |
public static <T> int combineListHash(
Iterator<? extends T> hashObjectIterator, Hasher<T> hasher) {
int hash = 0;
while (hashObjectIterator.hasNext()) {
hash += hasher.hash(hashObjectIterator.next());
hash += (hash << 10);
hash ^= (hash >> 6);
}
hash += (hash << 3);
hash ^= (hash >> 11);
has... | static <T> int function( Iterator<? extends T> hashObjectIterator, Hasher<T> hasher) { int hash = 0; while (hashObjectIterator.hasNext()) { hash += hasher.hash(hashObjectIterator.next()); hash += (hash << 10); hash ^= (hash >> 6); } hash += (hash << 3); hash ^= (hash >> 11); hash += (hash << 15); return hash; } | /**
* Combine the hash codes of a collection of objects into one in a way that
* depends on their order.
*
* The current implementation is based on the Jenkins One-at-a-Time hash,
* see http://www.burtleburtle.net/bob/hash/doobs.html and also
* http://en.wikipedia.org/wiki/Jenkins_hash_function.
*
* @... | Combine the hash codes of a collection of objects into one in a way that depends on their order. The current implementation is based on the Jenkins One-at-a-Time hash, see HREF and also HREF | combineListHash | {
"repo_name": "liveontologies/elk-reasoner",
"path": "elk-util-parent/elk-util-hashing/src/main/java/org/semanticweb/elk/util/hashing/HashGenerator.java",
"license": "apache-2.0",
"size": 9356
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,658,321 |
@Test
public void testOrganizedOperandsSingleCondnEvalMultipleLessThanInEqualities_AND() {
LogWriter logger = CacheUtils.getCache().getLogger();
try {
CompiledComparison cv[] = null;
ExecutionContext context = new QueryExecutionContext(null, CacheUtils.getCache());
this.bindIteratorsAndCre... | void function() { LogWriter logger = CacheUtils.getCache().getLogger(); try { CompiledComparison cv[] = null; ExecutionContext context = new QueryExecutionContext(null, CacheUtils.getCache()); this.bindIteratorsAndCreateIndex(context); cv = new CompiledComparison[4]; cv[0] = new CompiledComparison(new CompiledPath(new ... | /**
* Tests the functionality of organizedOperands function of a RangeJunction for various
* combinations of LESS THAN and Not equal conditions etc which results in a SingleCondnEvaluator
* or CompiledComparison for a AND junction. It checks the correctness of the operator & the
* evaluated key
*
*/ | Tests the functionality of organizedOperands function of a RangeJunction for various combinations of LESS THAN and Not equal conditions etc which results in a SingleCondnEvaluator or CompiledComparison for a AND junction. It checks the correctness of the operator & the evaluated key | testOrganizedOperandsSingleCondnEvalMultipleLessThanInEqualities_AND | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/CompiledJunctionInternalsJUnitTest.java",
"license": "apache-2.0",
"size": 163306
} | [
"java.util.Iterator",
"org.apache.geode.LogWriter",
"org.apache.geode.cache.query.CacheUtils",
"org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes",
"org.junit.Assert"
] | import java.util.Iterator; import org.apache.geode.LogWriter; import org.apache.geode.cache.query.CacheUtils; import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes; import org.junit.Assert; | import java.util.*; import org.apache.geode.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.parse.*; import org.junit.*; | [
"java.util",
"org.apache.geode",
"org.junit"
] | java.util; org.apache.geode; org.junit; | 1,010,327 |
public static java.util.Set extractCentralBatchPrintSet(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.ResultsToBePrintedVoCollection voCollection)
{
return extractCentralBatchPrintSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.ResultsToBePrintedVoCollection voCollection) { return extractCentralBatchPrintSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.ocrr.orderingresults.domain.objects.CentralBatchPrint set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.ocrr.orderingresults.domain.objects.CentralBatchPrint set from the value object collection | extractCentralBatchPrintSet | {
"repo_name": "IMS-MAXIMS/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/ocrr/vo/domain/ResultsToBePrintedVoAssembler.java",
"license": "agpl-3.0",
"size": 18183
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 177,889 |
public static void endSection() {
if (ExoPlayerLibraryInfo.TRACE_ENABLED && Util.SDK_INT >= 18) {
endSectionV18();
}
} | static void function() { if (ExoPlayerLibraryInfo.TRACE_ENABLED && Util.SDK_INT >= 18) { endSectionV18(); } } | /**
* Writes a trace message to indicate that a given section of code has ended.
*
* @see android.os.Trace#endSection()
*/ | Writes a trace message to indicate that a given section of code has ended | endSection | {
"repo_name": "gitanuj/ExoPlayer",
"path": "library/src/main/java/com/google/android/exoplayer/util/TraceUtil.java",
"license": "apache-2.0",
"size": 1693
} | [
"com.google.android.exoplayer.ExoPlayerLibraryInfo"
] | import com.google.android.exoplayer.ExoPlayerLibraryInfo; | import com.google.android.exoplayer.*; | [
"com.google.android"
] | com.google.android; | 1,768,812 |
public void setLastUpdateTimeKey(String key) {
if (TextUtils.isEmpty(key)) {
return;
}
mLastUpdateTimeKey = key;
} | void function(String key) { if (TextUtils.isEmpty(key)) { return; } mLastUpdateTimeKey = key; } | /**
* Specify the last update time by this key string
*
* @param key
*/ | Specify the last update time by this key string | setLastUpdateTimeKey | {
"repo_name": "captainbupt/android-Ultra-Pull-To-Refresh-With-Load-More",
"path": "ptr-lib/src/main/java/in/srain/cube/views/ptr/PtrClassicDefaultHeader.java",
"license": "mit",
"size": 10512
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,646,171 |
public void getData() {
if ( input.getFileName() != null ) {
wFilename.setText( input.getFileName() );
}
wServletOutput.setSelection( input.isServletOutput() );
setFlagsServletOption();
wDoNotOpenNewFileInit.setSelection( input.isDoNotOpenNewFileInit() );
wCreateParentFolder.setSelection... | void function() { if ( input.getFileName() != null ) { wFilename.setText( input.getFileName() ); } wServletOutput.setSelection( input.isServletOutput() ); setFlagsServletOption(); wDoNotOpenNewFileInit.setSelection( input.isDoNotOpenNewFileInit() ); wCreateParentFolder.setSelection( input.isCreateParentFolder() ); wExt... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "tkafalas/pentaho-kettle",
"path": "ui/src/main/java/org/pentaho/di/ui/trans/steps/textfileoutput/TextFileOutputDialog.java",
"license": "apache-2.0",
"size": 67446
} | [
"org.pentaho.di.core.Const"
] | import org.pentaho.di.core.Const; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,733,457 |
public static void createClientCache(String host, Integer port,
String name) throws Exception {
ClientInterestNotifyDUnitTest test = new ClientInterestNotifyDUnitTest();
Cache cacheClient = test.createCache(createProperties1());
AttributesFactory factory = new AttributesFactory();
factory.setSc... | static void function(String host, Integer port, String name) throws Exception { ClientInterestNotifyDUnitTest test = new ClientInterestNotifyDUnitTest(); Cache cacheClient = test.createCache(createProperties1()); AttributesFactory factory = new AttributesFactory(); factory.setScope(Scope.LOCAL); factory.setConcurrencyC... | /**
* create client with 3 regions each with a unique listener
*
*/ | create client with 3 regions each with a unique listener | createClientCache | {
"repo_name": "deepakddixit/incubator-geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java",
"license": "apache-2.0",
"size": 21329
} | [
"org.apache.geode.cache.AttributesFactory",
"org.apache.geode.cache.Cache",
"org.apache.geode.cache.RegionAttributes",
"org.apache.geode.cache.Scope"
] | import org.apache.geode.cache.AttributesFactory; import org.apache.geode.cache.Cache; import org.apache.geode.cache.RegionAttributes; import org.apache.geode.cache.Scope; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,313,729 |
public boolean deployPolicy(String content, String fileName) throws AxisFault {
File file = new File(APIConstants.POLICY_FILE_FOLDER); //WSO2Carbon_Home/repository/deployment/server
// /throttle-config
//if directory doesn't exist, make onee
if (!file.exists()) {
fi... | boolean function(String content, String fileName) throws AxisFault { File file = new File(APIConstants.POLICY_FILE_FOLDER); if (!file.exists()) { file.mkdir(); } File writeFile = new File(APIConstants.POLICY_FILE_LOCATION + fileName + APIConstants.XML_EXTENSION); FileOutputStream fos = null; try { fos = new FileOutputS... | /**
* policy is writtent in to files
*
* @param content content to be written
* @param fileName name of the file
* @throws AxisFault
*/ | policy is writtent in to files | deployPolicy | {
"repo_name": "harsha89/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/service/APIGatewayAdmin.java",
"license": "apache-2.0",
"size": 41004
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"org.apache.axis2.AxisFault",
"org.wso2.carbon.apimgt.impl.APIConstants"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.apache.axis2.AxisFault; import org.wso2.carbon.apimgt.impl.APIConstants; | import java.io.*; import org.apache.axis2.*; import org.wso2.carbon.apimgt.impl.*; | [
"java.io",
"org.apache.axis2",
"org.wso2.carbon"
] | java.io; org.apache.axis2; org.wso2.carbon; | 2,783,422 |
public String fieldsToString() {
String result = "";
for (String key : fields.keySet()) {
result += key + "=\"" + fields.get(key) + "\" ";
}
// remove the trailing whitespace
return result.substring(0, result.length() - 1);
}
}
private class MBeanConfig extends Config {
public MBeanConf... | String function() { String result = STR=\STR\" "; } return result.substring(0, result.length() - 1); } } private class MBeanConfig extends Config { public MBeanConfig() { this.name = "mbean"; } } private class MBeanAttributeConfig extends Config { public MBeanAttributeConfig() { this.name = STR; } } private class MBean... | /**
* Printable representation of all the fields of this Config
*
* @return A String with all the fields in this format <key>="<value>"
*/ | Printable representation of all the fields of this Config | fieldsToString | {
"repo_name": "ganglia/jmxetric",
"path": "src/main/java/info/ganglia/jmxetric/MBeanScanner.java",
"license": "mit",
"size": 14590
} | [
"java.io.PrintStream",
"java.util.List"
] | import java.io.PrintStream; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 557,812 |
private DataRegionConfiguration createTxLogRegion(DataStorageConfiguration dscfg) {
DataRegionConfiguration cfg = new DataRegionConfiguration();
cfg.setName(TX_LOG_CACHE_NAME);
cfg.setInitialSize(dscfg.getSystemRegionInitialSize());
cfg.setMaxSize(dscfg.getSystemRegionMaxSize());
... | DataRegionConfiguration function(DataStorageConfiguration dscfg) { DataRegionConfiguration cfg = new DataRegionConfiguration(); cfg.setName(TX_LOG_CACHE_NAME); cfg.setInitialSize(dscfg.getSystemRegionInitialSize()); cfg.setMaxSize(dscfg.getSystemRegionMaxSize()); cfg.setPersistenceEnabled(CU.isPersistenceEnabled(dscfg)... | /**
* TODO IGNITE-7966
*
* @return Data region configuration.
*/ | TODO IGNITE-7966 | createTxLogRegion | {
"repo_name": "daradurvs/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/mvcc/MvccProcessorImpl.java",
"license": "apache-2.0",
"size": 86079
} | [
"org.apache.ignite.configuration.DataRegionConfiguration",
"org.apache.ignite.configuration.DataStorageConfiguration",
"org.apache.ignite.internal.util.typedef.internal.CU"
] | import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.internal.util.typedef.internal.CU; | import org.apache.ignite.configuration.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,287,732 |
public Builder add(LocalDateTime timestamp, Duration duration){
long tsLong;
int durInt;
switch(unit){
case MINUTES:
tsLong = timestamp.toEpochSecond(ZoneOffset.UTC)/60;
durInt = duration == null ? (timestamps.size() == 0 ? 0 : -1) : (int) duration.toMinutes();
break;
case SECONDS:
... | Builder function(LocalDateTime timestamp, Duration duration){ long tsLong; int durInt; switch(unit){ case MINUTES: tsLong = timestamp.toEpochSecond(ZoneOffset.UTC)/60; durInt = duration == null ? (timestamps.size() == 0 ? 0 : -1) : (int) duration.toMinutes(); break; case SECONDS: tsLong = timestamp.toEpochSecond(ZoneOf... | /**
* Add a data point
* @param timestamp the timestamp of the data point
* @param duration the duration, can be null if the duration is the same as previous one or if this is the first data point and the duration is zero
* @return the builder itself
*/ | Add a data point | add | {
"repo_name": "james-hu/jabb-core-java8",
"path": "src/main/java/net/sf/jabb/cjtsd/CJTSD.java",
"license": "apache-2.0",
"size": 12074
} | [
"java.time.Duration",
"java.time.LocalDateTime",
"java.time.ZoneOffset"
] | import java.time.Duration; import java.time.LocalDateTime; import java.time.ZoneOffset; | import java.time.*; | [
"java.time"
] | java.time; | 2,625,408 |
public void setAmazonDDBClient(AmazonDynamoDB amazonDDBClient) {
this.amazonDDBClient = amazonDDBClient;
} | void function(AmazonDynamoDB amazonDDBClient) { this.amazonDDBClient = amazonDDBClient; } | /**
* To use the AmazonDynamoDB as the client
*/ | To use the AmazonDynamoDB as the client | setAmazonDDBClient | {
"repo_name": "isavin/camel",
"path": "components/camel-aws/src/main/java/org/apache/camel/component/aws/ddb/DdbConfiguration.java",
"license": "apache-2.0",
"size": 5344
} | [
"com.amazonaws.services.dynamodbv2.AmazonDynamoDB"
] | import com.amazonaws.services.dynamodbv2.AmazonDynamoDB; | import com.amazonaws.services.dynamodbv2.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 927,190 |
Map<T, U> map = new LinkedHashMap<>();
for (Map.Entry<T, U> entry : entries) {
map.put(entry.getKey(), entry.getValue());
}
return unmodifiableMap(map);
} | Map<T, U> map = new LinkedHashMap<>(); for (Map.Entry<T, U> entry : entries) { map.put(entry.getKey(), entry.getValue()); } return unmodifiableMap(map); } | /**
* Create new, non modifiable, map from given entries.
*
* @param entries Map entries.
* @param <T> Type of keys in map.
* @param <U> Type of values in map.
* @return The map.
*/ | Create new, non modifiable, map from given entries | newMap | {
"repo_name": "mjeanroy/node-maven-plugin",
"path": "src/test/java/com/github/mjeanroy/maven/plugins/node/tests/CollectionTestUtils.java",
"license": "mit",
"size": 2695
} | [
"java.util.Collections",
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 187,914 |
@Authorized( { PrivilegeConstants.VIEW_RELATIONSHIPS })
public List<Relationship> getRelationships(Person fromPerson, Person toPerson, RelationshipType relType,
Date startEffectiveDate, Date endEffectiveDate) throws APIException;
| @Authorized( { PrivilegeConstants.VIEW_RELATIONSHIPS }) List<Relationship> function(Person fromPerson, Person toPerson, RelationshipType relType, Date startEffectiveDate, Date endEffectiveDate) throws APIException; | /**
* Get relationships stored in the database that were active during the specified date range
*
* @param fromPerson (optional) Person to in the person_id column
* @param toPerson (optional) Person in the relative_id column
* @param relType (optional) The RelationshipType to match
* @param startEffe... | Get relationships stored in the database that were active during the specified date range | getRelationships | {
"repo_name": "Bhamni/openmrs-core",
"path": "api/src/main/java/org/openmrs/api/PersonService.java",
"license": "mpl-2.0",
"size": 41991
} | [
"java.util.Date",
"java.util.List",
"org.openmrs.Person",
"org.openmrs.Relationship",
"org.openmrs.RelationshipType",
"org.openmrs.annotation.Authorized",
"org.openmrs.util.PrivilegeConstants"
] | import java.util.Date; import java.util.List; import org.openmrs.Person; import org.openmrs.Relationship; import org.openmrs.RelationshipType; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants; | import java.util.*; import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*; | [
"java.util",
"org.openmrs",
"org.openmrs.annotation",
"org.openmrs.util"
] | java.util; org.openmrs; org.openmrs.annotation; org.openmrs.util; | 1,998,973 |
private String getIccStateReason(State state) {
switch (state) {
case PIN_REQUIRED: return IccCardConstants.INTENT_VALUE_LOCKED_ON_PIN;
case PUK_REQUIRED: return IccCardConstants.INTENT_VALUE_LOCKED_ON_PUK;
case NETWORK_LOCKED: return IccCardConstants.INTENT_VALUE_LOCKED_... | String function(State state) { switch (state) { case PIN_REQUIRED: return IccCardConstants.INTENT_VALUE_LOCKED_ON_PIN; case PUK_REQUIRED: return IccCardConstants.INTENT_VALUE_LOCKED_ON_PUK; case NETWORK_LOCKED: return IccCardConstants.INTENT_VALUE_LOCKED_NETWORK; case PERM_DISABLED: return IccCardConstants.INTENT_VALUE... | /**
* Locked state have a reason (PIN, PUK, NETWORK, PERM_DISABLED)
* @return reason
*/ | Locked state have a reason (PIN, PUK, NETWORK, PERM_DISABLED) | getIccStateReason | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/IccCardProxy.java",
"license": "apache-2.0",
"size": 28266
} | [
"com.android.internal.telephony.IccCardConstants"
] | import com.android.internal.telephony.IccCardConstants; | import com.android.internal.telephony.*; | [
"com.android.internal"
] | com.android.internal; | 781,974 |
@Override
public void onSensorChanged(SensorEvent event) {
HromatkaLog.getInstance().enter(TAG);
Log.v(TAG, "accel x,y,z = " + event.values[0] + ", " + event.values[1] + ", " + event.values[2]);
notifyListenersDataReceived(event.timestamp, event.values);
HromatkaLog.get... | void function(SensorEvent event) { HromatkaLog.getInstance().enter(TAG); Log.v(TAG, STR + event.values[0] + STR + event.values[1] + STR + event.values[2]); notifyListenersDataReceived(event.timestamp, event.values); HromatkaLog.getInstance().exit(TAG); } | /**
* This class's listener for new sensor data from the internal Android accelerometer
* implementation. Required via the SensorEventListener implementation.
*
* @param event SensorEvent data from Android
*/ | This class's listener for new sensor data from the internal Android accelerometer implementation. Required via the SensorEventListener implementation | onSensorChanged | {
"repo_name": "drakenclimber/inclinometer",
"path": "tomsinclinometer/src/main/java/com/tomhromatka/service/sensors/SensorAccelerometer.java",
"license": "apache-2.0",
"size": 4258
} | [
"android.hardware.SensorEvent",
"android.util.Log",
"com.tomhromatka.service.HromatkaLog"
] | import android.hardware.SensorEvent; import android.util.Log; import com.tomhromatka.service.HromatkaLog; | import android.hardware.*; import android.util.*; import com.tomhromatka.service.*; | [
"android.hardware",
"android.util",
"com.tomhromatka.service"
] | android.hardware; android.util; com.tomhromatka.service; | 1,837,646 |
@Override
@XmlTransient
public JSONObject toJsonObject() {
JSONObject returnVal = super.toJsonObject();
returnVal.put(JSONMapping.ENABLE_RENDER_EMPTY_TABLE, this.isEnableRenderEmptyTable());
returnVal.put(JSONMapping.ENABLE_BULK_EDIT, this.isEnableBulkEdit());
returnVal.put(JSONMapping.ATTACHMENT_THUMBNAIL... | JSONObject function() { JSONObject returnVal = super.toJsonObject(); returnVal.put(JSONMapping.ENABLE_RENDER_EMPTY_TABLE, this.isEnableRenderEmptyTable()); returnVal.put(JSONMapping.ENABLE_BULK_EDIT, this.isEnableBulkEdit()); returnVal.put(JSONMapping.ATTACHMENT_THUMBNAIL_SIZE, this.getAttachmentThumbnailSize()); retur... | /**
* Returns the local JSON object.
* Only set through constructor.
*
* @return The local set {@code JSONObject} object.
*/ | Returns the local JSON object. Only set through constructor | toJsonObject | {
"repo_name": "Koekiebox-PTY-LTD/Fluid",
"path": "fluid-api/src/main/java/com/fluidbpm/program/api/vo/webkit/viewgroup/WebKitViewGroup.java",
"license": "gpl-3.0",
"size": 15594
} | [
"org.json.JSONArray",
"org.json.JSONObject"
] | import org.json.JSONArray; import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 1,944,571 |
public Component addFill(Component component)
{
return this.add(component, CONSTRAINT_FILL);
}
| Component function(Component component) { return this.add(component, CONSTRAINT_FILL); } | /**
* Adding an element, setting the layout such that the element gets additional vertical space if available.
* @param component The component to add.
* @return The added component.
*/ | Adding an element, setting the layout such that the element gets additional vertical space if available | addFill | {
"repo_name": "langmo/youscope",
"path": "core/api/src/main/java/org/youscope/uielements/DynamicPanel.java",
"license": "gpl-2.0",
"size": 7089
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 514,107 |
@Override
public void setOwner(Path p, String username, String groupname)
throws IOException {
FileUtil.setOwner(pathToFile(p), username, groupname);
} | void function(Path p, String username, String groupname) throws IOException { FileUtil.setOwner(pathToFile(p), username, groupname); } | /**
* Use the command chown to set owner.
*/ | Use the command chown to set owner | setOwner | {
"repo_name": "tomatoKiller/Hadoop_Source_Learn",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java",
"license": "apache-2.0",
"size": 20264
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 4,852 |
private int getReadPosition(SAMRecord record, Variant variant) {
int readPosition = -1;
for(AlignmentBlock alignmentBlock : record.getAlignmentBlocks()) {
if(alignmentBlock.getReferenceStart() <= variant.getStart() + 1 && variant.getStart() + 1 <= alignmentBlock.getReferenceStart() + alignmentBlock.getLength(... | int function(SAMRecord record, Variant variant) { int readPosition = -1; for(AlignmentBlock alignmentBlock : record.getAlignmentBlocks()) { if(alignmentBlock.getReferenceStart() <= variant.getStart() + 1 && variant.getStart() + 1 <= alignmentBlock.getReferenceStart() + alignmentBlock.getLength()) { readPosition = varia... | /**
* Get ReadPosition of variant in read
* @param record
* @param variant
* @return
*/ | Get ReadPosition of variant in read | getReadPosition | {
"repo_name": "dieterich-lab/JACUSA",
"path": "tools/AddVariants/src/addvariants/AddVariants.java",
"license": "gpl-3.0",
"size": 6505
} | [
"net.sf.samtools.AlignmentBlock",
"net.sf.samtools.SAMRecord"
] | import net.sf.samtools.AlignmentBlock; import net.sf.samtools.SAMRecord; | import net.sf.samtools.*; | [
"net.sf.samtools"
] | net.sf.samtools; | 771,195 |
boolean play(Device device, String path); | boolean play(Device device, String path); | /**
* Play the video with the video path.
*
* @param device
* The device be controlled.
* @param path
* The path of the video.
* @return If is success to play the video.
*/ | Play the video with the video path | play | {
"repo_name": "lxxgreat/VideoPlayer",
"path": "app/src/main/java/com/shane/android/videoplayer/interf/IController.java",
"license": "mit",
"size": 3180
} | [
"org.cybergarage.upnp.Device"
] | import org.cybergarage.upnp.Device; | import org.cybergarage.upnp.*; | [
"org.cybergarage.upnp"
] | org.cybergarage.upnp; | 1,939,416 |
@Variability(id = AnnotationConstants.MONITOR_MEMORY_USAGE)
@Override
public void memoryFreed(long tag, long size) { // TODO remove size
if (isRecording) {
long tid = SystemMonitoring.getCurrentThreadId();
RecordingStack stack = Lock.THREAD_STACKS.get(tid);
... | @Variability(id = AnnotationConstants.MONITOR_MEMORY_USAGE) void function(long tag, long size) { if (isRecording) { long tid = SystemMonitoring.getCurrentThreadId(); RecordingStack stack = Lock.THREAD_STACKS.get(tid); if (null != stack) { long account = stack.top(-1); if (account >= 0) { SystemMonitoring.MEMORY_DATA_GA... | /**
* Notifies the recorder about an object freed from memory. Please note
* that dependent on the concrete instrumentation not all memory frees
* might be detected, e.g. those of immediate system classes (e.g.
* <code>Object</code> cannot be instrumented, garbage collector not called
* w... | Notifies the recorder about an object freed from memory. Please note that dependent on the concrete instrumentation not all memory frees might be detected, e.g. those of immediate system classes (e.g. <code>Object</code> cannot be instrumented, garbage collector not called when JVM is running, etc.). [Java call, native... | memoryFreed | {
"repo_name": "SSEHUB/spassMeter",
"path": "Instrumentation.ex/src/de/uni_hildesheim/sse/monitoring/runtime/recording/Recorder.java",
"license": "apache-2.0",
"size": 53045
} | [
"de.uni_hildesheim.sse.codeEraser.annotations.Variability",
"de.uni_hildesheim.sse.monitoring.runtime.AnnotationConstants"
] | import de.uni_hildesheim.sse.codeEraser.annotations.Variability; import de.uni_hildesheim.sse.monitoring.runtime.AnnotationConstants; | import de.uni_hildesheim.sse.*; import de.uni_hildesheim.sse.monitoring.runtime.*; | [
"de.uni_hildesheim.sse"
] | de.uni_hildesheim.sse; | 2,028,742 |
public BusinessActivitiesNonProfitOrganizationsClient nonProfitOrganizations() {
return (BusinessActivitiesNonProfitOrganizationsClient) getClient("nonprofitorganizations");
} | BusinessActivitiesNonProfitOrganizationsClient function() { return (BusinessActivitiesNonProfitOrganizationsClient) getClient(STR); } | /**
* <p>Retrieve the client for interacting with business activities non-profit
* organizations data.</p>
*
* @return a client for business activities non-profit organizations data
*/ | Retrieve the client for interacting with business activities non-profit organizations data | nonProfitOrganizations | {
"repo_name": "dannil/scb-java-client",
"path": "src/main/java/com/github/dannil/scbjavaclient/client/businessactivities/BusinessActivitiesClient.java",
"license": "apache-2.0",
"size": 7622
} | [
"com.github.dannil.scbjavaclient.client.businessactivities.nonprofitorganizations.BusinessActivitiesNonProfitOrganizationsClient"
] | import com.github.dannil.scbjavaclient.client.businessactivities.nonprofitorganizations.BusinessActivitiesNonProfitOrganizationsClient; | import com.github.dannil.scbjavaclient.client.businessactivities.nonprofitorganizations.*; | [
"com.github.dannil"
] | com.github.dannil; | 920,589 |
public void testLocal() {
GridCacheAdapter<String, String> cache = grid.internalCache();
GridCacheTestEntryEx entry = new GridCacheTestEntryEx(cache.context(), "1");
GridCacheVersion ver3 = version(3);
GridCacheVersion ver4 = version(4);
GridCacheVersion ver5 = version(5);
... | void function() { GridCacheAdapter<String, String> cache = grid.internalCache(); GridCacheTestEntryEx entry = new GridCacheTestEntryEx(cache.context(), "1"); GridCacheVersion ver3 = version(3); GridCacheVersion ver4 = version(4); GridCacheVersion ver5 = version(5); entry.addLocal(3, ver3, 0, true, true); Collection<Gri... | /**
* Tests remote candidates.
*/ | Tests remote candidates | testLocal | {
"repo_name": "adeelmahmood/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccSelfTest.java",
"license": "apache-2.0",
"size": 61239
} | [
"java.util.Collection",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion"
] | import java.util.Collection; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; | import java.util.*; import org.apache.ignite.internal.processors.cache.version.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,600,050 |
AffineTransform getTransform(); | AffineTransform getTransform(); | /**
* Returns the transform of this node or null if any.
*/ | Returns the transform of this node or null if any | getTransform | {
"repo_name": "sflyphotobooks/crp-batik",
"path": "sources/org/apache/batik/gvt/GraphicsNode.java",
"license": "apache-2.0",
"size": 13618
} | [
"java.awt.geom.AffineTransform"
] | import java.awt.geom.AffineTransform; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 25,212 |
public void close() throws IOException {
synchronized(closeLock) {
if (isClosed())
return;
if (created)
impl.close();
closed = true;
}
}
/**
* Returns the unique {@link java.nio.channels.ServerSocketChannel} object
... | void function() throws IOException { synchronized(closeLock) { if (isClosed()) return; if (created) impl.close(); closed = true; } } /** * Returns the unique {@link java.nio.channels.ServerSocketChannel} object * associated with this socket, if any. * * <p> A server socket will have a channel if, and only if, the chann... | /**
* Closes this socket.
*
* Any thread currently blocked in {@link #accept()} will throw
* a {@link SocketException}.
*
* <p> If this socket has an associated channel then the channel is closed
* as well.
*
* @exception IOException if an I/O error occurs when closing the... | Closes this socket. Any thread currently blocked in <code>#accept()</code> will throw a <code>SocketException</code>. If this socket has an associated channel then the channel is closed as well | close | {
"repo_name": "Taichi-SHINDO/jdk9-jdk",
"path": "src/java.base/share/classes/java/net/ServerSocket.java",
"license": "gpl-2.0",
"size": 39778
} | [
"java.io.IOException",
"java.nio.channels.ServerSocketChannel"
] | import java.io.IOException; import java.nio.channels.ServerSocketChannel; | import java.io.*; import java.nio.channels.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,969,334 |
public int compare(Movie movie1, Movie movie2, boolean ascending) {
return ascending ? (movie1.getRating() - movie2.getRating()) : (movie2.getRating() - movie1.getRating());
} | int function(Movie movie1, Movie movie2, boolean ascending) { return ascending ? (movie1.getRating() - movie2.getRating()) : (movie2.getRating() - movie1.getRating()); } | /**
* Compare the rating of two movies.
*
* @param movie1
* @param movie2
* @param ascending
* @return
*/ | Compare the rating of two movies | compare | {
"repo_name": "YAMJ/yamj-v2",
"path": "yamj/src/main/java/com/moviejukebox/model/comparator/MovieRatingComparator.java",
"license": "gpl-3.0",
"size": 1874
} | [
"com.moviejukebox.model.Movie"
] | import com.moviejukebox.model.Movie; | import com.moviejukebox.model.*; | [
"com.moviejukebox.model"
] | com.moviejukebox.model; | 1,829,502 |
public boolean containsOffset(long off) {
return off <= getLastIndexOffset();
}
}
private static class IndexTable
implements Iterable<IndexTableEntry>, Writable {
private List<IndexTableEntry> tableEntries;
public IndexTable() {
tableEntries = new ArrayList<IndexTableEntry>();... | boolean function(long off) { return off <= getLastIndexOffset(); } } private static class IndexTable implements Iterable<IndexTableEntry>, Writable { private List<IndexTableEntry> tableEntries; public IndexTable() { tableEntries = new ArrayList<IndexTableEntry>(); } public IndexTable(DataInput in) throws IOException { ... | /**
* Inform whether the user's requested offset corresponds
* to a record that starts in this IndexSegment. If this
* returns true, the requested offset may actually be in
* a previous IndexSegment.
* @param off the offset of the start of a record to test.
* @return true if the user's req... | Inform whether the user's requested offset corresponds to a record that starts in this IndexSegment. If this returns true, the requested offset may actually be in a previous IndexSegment | containsOffset | {
"repo_name": "hirohanin/sqoop-1.1.0hadoop21",
"path": "src/java/com/cloudera/sqoop/io/LobFile.java",
"license": "apache-2.0",
"size": 60820
} | [
"java.io.DataInput",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.io.Writable"
] | import java.io.DataInput; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.io.Writable; | import java.io.*; import java.util.*; import org.apache.hadoop.io.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,633,922 |
@JsonCreator
public static DataNodeService fromJson(
@JsonProperty("tier") String tier,
@JsonProperty("maxSize") long maxSize,
@JsonProperty("type") @Deprecated @Nullable ServerType type,
@JsonProperty(SERVER_TYPE_PROP_KEY) @Nullable ServerType serverType,
@JsonProperty("priority") int... | static DataNodeService function( @JsonProperty("tier") String tier, @JsonProperty(STR) long maxSize, @JsonProperty("type") @Deprecated @Nullable ServerType type, @JsonProperty(SERVER_TYPE_PROP_KEY) @Nullable ServerType serverType, @JsonProperty(STR) int priority ) { if (type == null && serverType == null) { throw new I... | /**
* This JSON creator requires for the "type" subtype key of {@link DruidService} to appear before
* the "type" property of this class in the serialized JSON. Deserialization can fail otherwise.
* See the Javadoc of this class for more details.
*/ | This JSON creator requires for the "type" subtype key of <code>DruidService</code> to appear before the "type" property of this class in the serialized JSON. Deserialization can fail otherwise. See the Javadoc of this class for more details | fromJson | {
"repo_name": "monetate/druid",
"path": "server/src/main/java/org/apache/druid/discovery/DataNodeService.java",
"license": "apache-2.0",
"size": 5828
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"javax.annotation.Nullable",
"org.apache.druid.server.coordination.ServerType"
] | import com.fasterxml.jackson.annotation.JsonProperty; import javax.annotation.Nullable; import org.apache.druid.server.coordination.ServerType; | import com.fasterxml.jackson.annotation.*; import javax.annotation.*; import org.apache.druid.server.coordination.*; | [
"com.fasterxml.jackson",
"javax.annotation",
"org.apache.druid"
] | com.fasterxml.jackson; javax.annotation; org.apache.druid; | 1,612,532 |
protected void drawVAxis(Graphics g) {
Graphics lg;
int i;
int j;
int x0,y0,x1,y1;
int direction;
int offset = 0;
double minor_step;
double minor;
Color c;
FontMetrics fm;
Color gc =... | void function(Graphics g) { Graphics lg; int i; int j; int x0,y0,x1,y1; int direction; int offset = 0; double minor_step; double minor; Color c; FontMetrics fm; Color gc = g.getColor(); Font gf = g.getFont(); double vmin = minimum*1.001; double vmax = maximum*1.001; double scale = (amax.y - amin.y)/(maximum - minimum);... | /**
* Draw a Vertical Axis.
* @param g Graphics context.
*/ | Draw a Vertical Axis | drawVAxis | {
"repo_name": "chuckre/DigitalPopulations",
"path": "PopulationRealizer/Graph2D/src/graph/Axis.java",
"license": "apache-2.0",
"size": 33849
} | [
"java.awt.Color",
"java.awt.Font",
"java.awt.FontMetrics",
"java.awt.Graphics"
] | import java.awt.Color; import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,233,886 |
public static boolean canEntitleServer(Server server, Entitlement ent) {
return canEntitleServer(server.getId(), ent);
} | static boolean function(Server server, Entitlement ent) { return canEntitleServer(server.getId(), ent); } | /**
* Tests whether or not a given server can be entitled with a specific entitlement
* @param server The server in question
* @param ent The entitlement to test
* @return Returns true or false depending on whether or not the server can be
* entitled to the passed in entitlement.
*/ | Tests whether or not a given server can be entitled with a specific entitlement | canEntitleServer | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java",
"license": "gpl-2.0",
"size": 134651
} | [
"com.redhat.rhn.domain.entitlement.Entitlement",
"com.redhat.rhn.domain.server.Server"
] | import com.redhat.rhn.domain.entitlement.Entitlement; import com.redhat.rhn.domain.server.Server; | import com.redhat.rhn.domain.entitlement.*; import com.redhat.rhn.domain.server.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 1,043,654 |
private void assertCurrentIdentityColumnValueBetween(long minValue, long maxValue) {
executeUpdate("delete from test_table1", dataSource);
executeUpdate("insert into test_table1(col2) values('test')", dataSource);
long currentValue = getItemAsLong("select col1 from test_table1 where col2 ... | void function(long minValue, long maxValue) { executeUpdate(STR, dataSource); executeUpdate(STR, dataSource); long currentValue = getItemAsLong(STR, dataSource); assertTrue(STR + minValue + STR + maxValue, (currentValue >= minValue && currentValue <= maxValue)); } | /**
* Asserts that the current value for the identity column test_table.col1 is between the given values.
*
* @param minValue The minimum value (included)
* @param maxValue The maximum value (included)
*/ | Asserts that the current value for the identity column test_table.col1 is between the given values | assertCurrentIdentityColumnValueBetween | {
"repo_name": "arteam/unitils",
"path": "unitils-test/src/test/java/org/unitils/dbmaintainer/structure/SequenceUpdaterTest.java",
"license": "apache-2.0",
"size": 14680
} | [
"org.junit.Assert",
"org.unitils.database.SQLUnitils"
] | import org.junit.Assert; import org.unitils.database.SQLUnitils; | import org.junit.*; import org.unitils.database.*; | [
"org.junit",
"org.unitils.database"
] | org.junit; org.unitils.database; | 462,068 |
@Test
public void placeInitialTokens()
{
// Setup.
final TridEnvironment environment = new TridEnvironment();
final Agent agentWhite = new DefaultAgent("white", "white", ChessTeam.WHITE);
final Agent agentBlack = new DefaultAgent("black", "black", ChessTeam.BLACK);
fi... | void function() { final TridEnvironment environment = new TridEnvironment(); final Agent agentWhite = new DefaultAgent("white", "white", ChessTeam.WHITE); final Agent agentBlack = new DefaultAgent("black", "black", ChessTeam.BLACK); final List<Agent> agents = new ArrayList<Agent>(); agents.add(agentWhite); agents.add(a... | /**
* Test the <code>placeInitialTokens()</code> method.
*/ | Test the <code>placeInitialTokens()</code> method | placeInitialTokens | {
"repo_name": "jmthompson2015/vizzini",
"path": "chess/src/test/java/org/vizzini/chess/tridimensional/TridEnvironmentTest.java",
"license": "mit",
"size": 6097
} | [
"java.util.ArrayList",
"java.util.List",
"org.vizzini.chess.ChessTeam",
"org.vizzini.chess.TokenType",
"org.vizzini.core.game.Agent",
"org.vizzini.core.game.DefaultAgent"
] | import java.util.ArrayList; import java.util.List; import org.vizzini.chess.ChessTeam; import org.vizzini.chess.TokenType; import org.vizzini.core.game.Agent; import org.vizzini.core.game.DefaultAgent; | import java.util.*; import org.vizzini.chess.*; import org.vizzini.core.game.*; | [
"java.util",
"org.vizzini.chess",
"org.vizzini.core"
] | java.util; org.vizzini.chess; org.vizzini.core; | 1,013,240 |
boolean applyMaskOnGroupRead(Node n) {
NodeProperty np = n.findProperty(VOS.PROPERTY_URI_GROUPMASK);
if (np == null || np.getPropertyValue() == null) {
return true;
}
String mask = np.getPropertyValue();
// format is rwx, each of which can also be -
if (ma... | boolean applyMaskOnGroupRead(Node n) { NodeProperty np = n.findProperty(VOS.PROPERTY_URI_GROUPMASK); if (np == null np.getPropertyValue() == null) { return true; } String mask = np.getPropertyValue(); if (mask.length() != 3) { LOG.debug(STR + mask); return true; } if (mask.charAt(0) == 'r') { LOG.debug(STR + mask); ret... | /**
* Return false if mask blocks read
*/ | Return false if mask blocks read | applyMaskOnGroupRead | {
"repo_name": "opencadc/vos",
"path": "cadc-vos-server/src/main/java/ca/nrc/cadc/vos/server/auth/VOSpaceAuthorizer.java",
"license": "agpl-3.0",
"size": 27172
} | [
"ca.nrc.cadc.vos.Node",
"ca.nrc.cadc.vos.NodeProperty"
] | import ca.nrc.cadc.vos.Node; import ca.nrc.cadc.vos.NodeProperty; | import ca.nrc.cadc.vos.*; | [
"ca.nrc.cadc"
] | ca.nrc.cadc; | 895,539 |
@RequestMapping(value = AnnotationLinks.CHILDREN, method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public PagedResources<AnnotationResource> children(@AuthenticationPrincipal UserAccountDetails principal, @PathVariable Long id, @RequestParam(name = "showRedacted", required = fals... | @RequestMapping(value = AnnotationLinks.CHILDREN, method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) PagedResources<AnnotationResource> function(@AuthenticationPrincipal UserAccountDetails principal, @PathVariable Long id, @RequestParam(name = STR, required = false) boolean showRedacted, Pageable pageable) thro... | /**
* Get child annotations by parent
*
* @param principal authenticated user
* @param id parent annotation id
* @return page of annotations
*/ | Get child annotations by parent | children | {
"repo_name": "bd2kccd/ccd-annotations",
"path": "src/main/java/edu/pitt/dbmi/ccd/anno/annotation/AnnotationController.java",
"license": "lgpl-2.1",
"size": 27123
} | [
"edu.pitt.dbmi.ccd.anno.error.AnnotationNotFoundException",
"edu.pitt.dbmi.ccd.anno.error.NotFoundException",
"edu.pitt.dbmi.ccd.db.entity.Annotation",
"edu.pitt.dbmi.ccd.db.entity.UserAccount",
"edu.pitt.dbmi.ccd.security.userDetails.UserAccountDetails",
"org.springframework.data.domain.Page",
"org.spr... | import edu.pitt.dbmi.ccd.anno.error.AnnotationNotFoundException; import edu.pitt.dbmi.ccd.anno.error.NotFoundException; import edu.pitt.dbmi.ccd.db.entity.Annotation; import edu.pitt.dbmi.ccd.db.entity.UserAccount; import edu.pitt.dbmi.ccd.security.userDetails.UserAccountDetails; import org.springframework.data.domain.... | import edu.pitt.dbmi.ccd.anno.error.*; import edu.pitt.dbmi.ccd.db.entity.*; import edu.pitt.dbmi.ccd.security.*; import org.springframework.data.domain.*; import org.springframework.hateoas.*; import org.springframework.http.*; import org.springframework.security.core.annotation.*; import org.springframework.web.bind.... | [
"edu.pitt.dbmi",
"org.springframework.data",
"org.springframework.hateoas",
"org.springframework.http",
"org.springframework.security",
"org.springframework.web"
] | edu.pitt.dbmi; org.springframework.data; org.springframework.hateoas; org.springframework.http; org.springframework.security; org.springframework.web; | 1,611,302 |
protected OptionsParser createOptionsParser(BlazeCommand command)
throws OptionsParsingException {
Command annotation = command.getClass().getAnnotation(Command.class);
List<Class<? extends OptionsBase>> allOptions = Lists.newArrayList();
allOptions.addAll(BlazeCommandUtils.getOptions(
comma... | OptionsParser function(BlazeCommand command) throws OptionsParsingException { Command annotation = command.getClass().getAnnotation(Command.class); List<Class<? extends OptionsBase>> allOptions = Lists.newArrayList(); allOptions.addAll(BlazeCommandUtils.getOptions( command.getClass(), getRuntime().getBlazeModules(), ge... | /**
* Creates an option parser using the common options classes and the
* command-specific options classes.
*
* <p>An overriding method should first call this method and can then
* override default values directly or by calling {@link
* #parseOptionsForCommand} for command-specific options.
*
* ... | Creates an option parser using the common options classes and the command-specific options classes. An overriding method should first call this method and can then override default values directly or by calling <code>#parseOptionsForCommand</code> for command-specific options | createOptionsParser | {
"repo_name": "whuwxl/bazel",
"path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java",
"license": "apache-2.0",
"size": 29358
} | [
"com.google.common.collect.Lists",
"com.google.devtools.common.options.OptionsBase",
"com.google.devtools.common.options.OptionsParser",
"com.google.devtools.common.options.OptionsParsingException",
"java.util.List"
] | import com.google.common.collect.Lists; import com.google.devtools.common.options.OptionsBase; import com.google.devtools.common.options.OptionsParser; import com.google.devtools.common.options.OptionsParsingException; import java.util.List; | import com.google.common.collect.*; import com.google.devtools.common.options.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 2,808,349 |
private boolean isAssociationExist(Connection connection, String handle) {
PreparedStatement prepStmt = null;
ResultSet results = null;
boolean result = false;
try {
prepStmt = connection.prepareStatement(OpenIDSQLQueries.CHECK_ASSOCIATION_ENTRY_EXIST);
prep... | boolean function(Connection connection, String handle) { PreparedStatement prepStmt = null; ResultSet results = null; boolean result = false; try { prepStmt = connection.prepareStatement(OpenIDSQLQueries.CHECK_ASSOCIATION_ENTRY_EXIST); prepStmt.setString(1, handle); results = prepStmt.executeQuery(); if (results.next()... | /**
* Check if the entry exist in the database
*
* @param connection
* @return boolean
* @throws SQLException
*/ | Check if the entry exist in the database | isAssociationExist | {
"repo_name": "pulasthi7/carbon-identity",
"path": "components/openid/org.wso2.carbon.identity.provider/src/main/java/org/wso2/carbon/identity/provider/openid/dao/OpenIDAssociationDAO.java",
"license": "apache-2.0",
"size": 10112
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.wso2.carbon.identity.core.util.IdentityDatabaseUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.wso2.carbon.identity.core.util.IdentityDatabaseUtil; | import java.sql.*; import org.wso2.carbon.identity.core.util.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,789,417 |
void visitFileTreeSnapshot(Collection<FileSnapshot> descendants); | void visitFileTreeSnapshot(Collection<FileSnapshot> descendants); | /**
* Visits the descendants of a {@link org.gradle.api.file.FileTree} or a {@link org.gradle.api.internal.file.collections.DirectoryFileTree}.
*/ | Visits the descendants of a <code>org.gradle.api.file.FileTree</code> or a <code>org.gradle.api.internal.file.collections.DirectoryFileTree</code> | visitFileTreeSnapshot | {
"repo_name": "gstevey/gradle",
"path": "subprojects/core/src/main/java/org/gradle/api/internal/changedetection/state/FileSnapshotVisitor.java",
"license": "apache-2.0",
"size": 1704
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,767,177 |
public void testCompareExceptionWeigth() {
float q = (float) 0.9;
int r = 10;
//int sp = 5;
a = ExpVector.EVRAND(r, 10, q);
b = ExpVector.EVRAND(r, 10, q);
int x = 0;
try {
t = new TermOrder((long[][]) null);
x = t.getDescendCompara... | void function() { float q = (float) 0.9; int r = 10; a = ExpVector.EVRAND(r, 10, q); b = ExpVector.EVRAND(r, 10, q); int x = 0; try { t = new TermOrder((long[][]) null); x = t.getDescendComparator().compare(a, b); fail(STR + x); } catch (IllegalArgumentException e) { } catch (NullPointerException e) { } } | /**
* Test compare exception weight.
*
*/ | Test compare exception weight | testCompareExceptionWeigth | {
"repo_name": "breandan/java-algebra-system",
"path": "trc/edu/jas/poly/TermOrderTest.java",
"license": "gpl-2.0",
"size": 18793
} | [
"edu.jas.poly.TermOrder"
] | import edu.jas.poly.TermOrder; | import edu.jas.poly.*; | [
"edu.jas.poly"
] | edu.jas.poly; | 2,778,138 |
@Override
public final AbstractEngine skeleton(
final Collection<Directory> withBase,
final ResultWriterFactory writerFactory,
final Configuration configuration)
throws Exception {
reporter(writerFactory).generateTemplate(withBase);
return this... | final AbstractEngine function( final Collection<Directory> withBase, final ResultWriterFactory writerFactory, final Configuration configuration) throws Exception { reporter(writerFactory).generateTemplate(withBase); return this; } | /**
* Generates a template, and writes result using given factory.
* @param withBase not null
* @param writerFactory not null
* @param configuration not null
* @return this engine, not null
* @throws Exception when generation fails
* @see AbstractEngine#skeleton(Collection, ResultWrit... | Generates a template, and writes result using given factory | skeleton | {
"repo_name": "apache/creadur-whisker",
"path": "apache-whisker-velocity/src/main/java/org/apache/creadur/whisker/out/velocity/VelocityEngine.java",
"license": "apache-2.0",
"size": 4646
} | [
"java.util.Collection",
"org.apache.creadur.whisker.app.AbstractEngine",
"org.apache.creadur.whisker.app.Configuration",
"org.apache.creadur.whisker.app.ResultWriterFactory",
"org.apache.creadur.whisker.scan.Directory"
] | import java.util.Collection; import org.apache.creadur.whisker.app.AbstractEngine; import org.apache.creadur.whisker.app.Configuration; import org.apache.creadur.whisker.app.ResultWriterFactory; import org.apache.creadur.whisker.scan.Directory; | import java.util.*; import org.apache.creadur.whisker.app.*; import org.apache.creadur.whisker.scan.*; | [
"java.util",
"org.apache.creadur"
] | java.util; org.apache.creadur; | 780,096 |
public List<Pair<BaseSong<BaseArtist, BaseAlbum>, KdTreePoint<Integer>>> getClosestSongsToPosition2(
float[] position, int number) throws DataUnavailableException {
try {
Vector<KdTreePoint<Integer>> points = preloadedDataManager.getData().getSongsCloseToPosition(position,
number);
return dbDataPorta... | List<Pair<BaseSong<BaseArtist, BaseAlbum>, KdTreePoint<Integer>>> function( float[] position, int number) throws DataUnavailableException { try { Vector<KdTreePoint<Integer>> points = preloadedDataManager.getData().getSongsCloseToPosition(position, number); return dbDataPortal.getSongListForIds2(points); } catch (KeySi... | /**
* Gets a list of {@link BaseSong} which are closest to a given position
*
* @param position
* The position (array of {@link Float}) of which the returned {@link BaseSong} should be closest to
* @param number
* Minimum number for the advanced kd tree algorithm
* @return A list of... | Gets a list of <code>BaseSong</code> which are closest to a given position | getClosestSongsToPosition2 | {
"repo_name": "kuhnmi/jukefox",
"path": "JukefoxModel/src/ch/ethz/dcg/jukefox/model/providers/SongProvider.java",
"license": "gpl-3.0",
"size": 17101
} | [
"ch.ethz.dcg.jukefox.commons.DataUnavailableException",
"ch.ethz.dcg.jukefox.commons.utils.Pair",
"ch.ethz.dcg.jukefox.commons.utils.kdtree.KdTreePoint",
"ch.ethz.dcg.jukefox.model.collection.BaseAlbum",
"ch.ethz.dcg.jukefox.model.collection.BaseArtist",
"ch.ethz.dcg.jukefox.model.collection.BaseSong",
... | import ch.ethz.dcg.jukefox.commons.DataUnavailableException; import ch.ethz.dcg.jukefox.commons.utils.Pair; import ch.ethz.dcg.jukefox.commons.utils.kdtree.KdTreePoint; import ch.ethz.dcg.jukefox.model.collection.BaseAlbum; import ch.ethz.dcg.jukefox.model.collection.BaseArtist; import ch.ethz.dcg.jukefox.model.collect... | import ch.ethz.dcg.jukefox.commons.*; import ch.ethz.dcg.jukefox.commons.utils.*; import ch.ethz.dcg.jukefox.commons.utils.kdtree.*; import ch.ethz.dcg.jukefox.model.collection.*; import edu.wlu.cs.levy.*; import java.util.*; | [
"ch.ethz.dcg",
"edu.wlu.cs",
"java.util"
] | ch.ethz.dcg; edu.wlu.cs; java.util; | 2,757,076 |
public synchronized CIMClass getClass(CIMObjectPath pClassPath) throws CIMException {
return getClass(pClassPath, true, true, false, null);
}
| synchronized CIMClass function(CIMObjectPath pClassPath) throws CIMException { return getClass(pClassPath, true, true, false, null); } | /**
* Gets a copy of a CIM class from the target CIM server.
*
* <p>
* This method produces the same results as
* <code>getClass(pClassPath, true, true, false, null)</code>
* </p>
*
* @param pClassPath
* CIM class path to the CIM class to be returned. Must be an
* i... | Gets a copy of a CIM class from the target CIM server. This method produces the same results as <code>getClass(pClassPath, true, true, false, null)</code> | getClass | {
"repo_name": "acleasby/sblim-cim-client",
"path": "cim-client-java/src/main/java/org/sblim/wbem/client/CIMClient.java",
"license": "epl-1.0",
"size": 203192
} | [
"org.sblim.wbem.cim.CIMClass",
"org.sblim.wbem.cim.CIMException",
"org.sblim.wbem.cim.CIMObjectPath"
] | import org.sblim.wbem.cim.CIMClass; import org.sblim.wbem.cim.CIMException; import org.sblim.wbem.cim.CIMObjectPath; | import org.sblim.wbem.cim.*; | [
"org.sblim.wbem"
] | org.sblim.wbem; | 268,024 |
@Named("health_monitor:update")
@PUT
@Path("/health_monitors/{id}")
@SelectJson("health_monitor")
@Fallback(NullOnNotFoundOr404.class)
@Nullable
HealthMonitor updateHealthMonitor(@PathParam("id") String id,
@WrapWith("health_monitor") HealthMonitor.UpdateHealthMonitor healthMonitor); | @Named(STR) @Path(STR) @SelectJson(STR) @Fallback(NullOnNotFoundOr404.class) HealthMonitor updateHealthMonitor(@PathParam("id") String id, @WrapWith(STR) HealthMonitor.UpdateHealthMonitor healthMonitor); | /**
* Update a HealthMonitor.
*
* @param id the id of the HealthMonitor to update.
* @param healthMonitor the HealthMonitor's attributes to update.
* @return a reference of the updated HealthMonitor.
*/ | Update a HealthMonitor | updateHealthMonitor | {
"repo_name": "asankasanjaya/stratos",
"path": "dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/extensions/lbaas/v1/LBaaSApi.java",
"license": "apache-2.0",
"size": 14416
} | [
"javax.inject.Named",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"org.jclouds.Fallbacks",
"org.jclouds.openstack.neutron.v2.domain.lbaas.v1.HealthMonitor",
"org.jclouds.rest.annotations.Fallback",
"org.jclouds.rest.annotations.SelectJson",
"org.jclouds.rest.annotations.WrapWith"
] | import javax.inject.Named; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jclouds.Fallbacks; import org.jclouds.openstack.neutron.v2.domain.lbaas.v1.HealthMonitor; import org.jclouds.rest.annotations.Fallback; import org.jclouds.rest.annotations.SelectJson; import org.jclouds.rest.annotations.WrapWit... | import javax.inject.*; import javax.ws.rs.*; import org.jclouds.*; import org.jclouds.openstack.neutron.v2.domain.lbaas.v1.*; import org.jclouds.rest.annotations.*; | [
"javax.inject",
"javax.ws",
"org.jclouds",
"org.jclouds.openstack",
"org.jclouds.rest"
] | javax.inject; javax.ws; org.jclouds; org.jclouds.openstack; org.jclouds.rest; | 2,603,916 |
public Property get(final String category, final String key, final String[] defaultValues, final String comment)
{
return get(category, key, defaultValues, comment, false, -1, (Pattern) null);
} | Property function(final String category, final String key, final String[] defaultValues, final String comment) { return get(category, key, defaultValues, comment, false, -1, (Pattern) null); } | /**
* Gets a string array Property with a comment using the default settings.
*
* @param category the config category
* @param key the Property key value
* @param defaultValues an array containing the default values
* @param comment a String comment
* @return a string array Property ... | Gets a string array Property with a comment using the default settings | get | {
"repo_name": "OreCruncher/Restructured",
"path": "src/main/java/org/blockartistry/mod/Restructured/util/JarConfiguration.java",
"license": "mit",
"size": 61536
} | [
"java.util.regex.Pattern",
"net.minecraftforge.common.config.Property"
] | import java.util.regex.Pattern; import net.minecraftforge.common.config.Property; | import java.util.regex.*; import net.minecraftforge.common.config.*; | [
"java.util",
"net.minecraftforge.common"
] | java.util; net.minecraftforge.common; | 254,443 |
public void randomIndexTemplate() throws IOException {
// TODO move settings for random directory etc here into the index based randomized settings.
if (cluster().size() > 0) {
Settings.Builder randomSettingsBuilder =
setRandomIndexSettings(random(), Settings.builder... | void function() throws IOException { if (cluster().size() > 0) { Settings.Builder randomSettingsBuilder = setRandomIndexSettings(random(), Settings.builder()); if (isInternalCluster()) { randomSettingsBuilder.put(INDEX_TEST_SEED_SETTING.getKey(), random().nextLong()); } randomSettingsBuilder.put(SETTING_NUMBER_OF_SHARD... | /**
* Creates a randomized index template. This template is used to pass in randomized settings on a
* per index basis. Allows to enable/disable the randomization for number of shards and replicas
*/ | Creates a randomized index template. This template is used to pass in randomized settings on a per index basis. Allows to enable/disable the randomization for number of shards and replicas | randomIndexTemplate | {
"repo_name": "xuzha/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 97056
} | [
"java.io.IOException",
"org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder",
"org.elasticsearch.cluster.routing.UnassignedInfo",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFac... | import java.io.IOException; import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder; import org.elasticsearch.cluster.routing.UnassignedInfo; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xco... | import java.io.*; import org.elasticsearch.action.admin.indices.template.put.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.*; import org.elasticsearch.index.codec.*; import org.elasticsearch.index.map... | [
"java.io",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.test",
"org.hamcrest"
] | java.io; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.test; org.hamcrest; | 1,479,734 |
Future<Object> asyncRequest(); | Future<Object> asyncRequest(); | /**
* Sends asynchronously to the given endpoint (InOut).
*
* @return a handle to be used to get the response in the future
*/ | Sends asynchronously to the given endpoint (InOut) | asyncRequest | {
"repo_name": "davidkarlsen/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/FluentProducerTemplate.java",
"license": "apache-2.0",
"size": 9750
} | [
"java.util.concurrent.Future"
] | import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 653,192 |
public void setA_Ins_Value (BigDecimal A_Ins_Value)
{
set_Value (COLUMNNAME_A_Ins_Value, A_Ins_Value);
} | void function (BigDecimal A_Ins_Value) { set_Value (COLUMNNAME_A_Ins_Value, A_Ins_Value); } | /** Set Insured Value.
@param A_Ins_Value Insured Value */ | Set Insured Value | setA_Ins_Value | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_A_Asset_Info_Ins.java",
"license": "gpl-2.0",
"size": 6558
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 483,840 |
static int indexOfImpl(List<?> list, @Nullable Object element) {
if (list instanceof RandomAccess) {
return indexOfRandomAccess(list, element);
} else {
ListIterator<?> listIterator = list.listIterator();
while (listIterator.hasNext()) {
if (Objects.equal(element, listIterator.next()... | static int indexOfImpl(List<?> list, @Nullable Object element) { if (list instanceof RandomAccess) { return indexOfRandomAccess(list, element); } else { ListIterator<?> listIterator = list.listIterator(); while (listIterator.hasNext()) { if (Objects.equal(element, listIterator.next())) { return listIterator.previousInd... | /**
* An implementation of {@link List#indexOf(Object)}.
*/ | An implementation of <code>List#indexOf(Object)</code> | indexOfImpl | {
"repo_name": "sunbeansoft/guava",
"path": "guava/src/com/google/common/collect/Lists.java",
"license": "apache-2.0",
"size": 39987
} | [
"com.google.common.base.Objects",
"java.util.List",
"java.util.ListIterator",
"java.util.RandomAccess",
"javax.annotation.Nullable"
] | import com.google.common.base.Objects; import java.util.List; import java.util.ListIterator; import java.util.RandomAccess; import javax.annotation.Nullable; | import com.google.common.base.*; import java.util.*; import javax.annotation.*; | [
"com.google.common",
"java.util",
"javax.annotation"
] | com.google.common; java.util; javax.annotation; | 2,841,595 |
void delete(TaskDto task); | void delete(TaskDto task); | /**
* Delete the provided task.
*
* @param task the provided task.
*/ | Delete the provided task | delete | {
"repo_name": "exoplatform/task",
"path": "services/src/main/java/org/exoplatform/task/storage/TaskStorage.java",
"license": "lgpl-3.0",
"size": 4265
} | [
"org.exoplatform.task.dto.TaskDto"
] | import org.exoplatform.task.dto.TaskDto; | import org.exoplatform.task.dto.*; | [
"org.exoplatform.task"
] | org.exoplatform.task; | 2,856,715 |
public void moveLeft() {
move(player, Direction.WEST);
} | void function() { move(player, Direction.WEST); } | /**
* Moves the player one square to the west if possible.
*/ | Moves the player one square to the west if possible | moveLeft | {
"repo_name": "wouterz/SKT",
"path": "src/main/java/nl/tudelft/jpacman/game/SinglePlayerGame.java",
"license": "apache-2.0",
"size": 1485
} | [
"nl.tudelft.jpacman.board.Direction"
] | import nl.tudelft.jpacman.board.Direction; | import nl.tudelft.jpacman.board.*; | [
"nl.tudelft.jpacman"
] | nl.tudelft.jpacman; | 1,862,793 |
@Override
public void createVolume(OmVolumeArgs args) throws IOException {
Preconditions.checkNotNull(args);
metadataManager.getLock().acquireUserLock(args.getOwnerName());
metadataManager.getLock().acquireVolumeLock(args.getVolume());
try {
byte[] dbVolumeKey = metadataManager.getVolumeKey(ar... | void function(OmVolumeArgs args) throws IOException { Preconditions.checkNotNull(args); metadataManager.getLock().acquireUserLock(args.getOwnerName()); metadataManager.getLock().acquireVolumeLock(args.getVolume()); try { byte[] dbVolumeKey = metadataManager.getVolumeKey(args.getVolume()); byte[] volumeInfo = metadataMa... | /**
* Creates a volume.
* @param args - OmVolumeArgs.
*/ | Creates a volume | createVolume | {
"repo_name": "littlezhou/hadoop",
"path": "hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/VolumeManagerImpl.java",
"license": "apache-2.0",
"size": 16218
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map",
"org.apache.hadoop.hdds.protocol.proto.HddsProtos",
"org.apache.hadoop.ozone.om.exceptions.OMException",
"org.apache.hadoop.ozone.om.helpers.OmVolumeArgs",
"org.apache.hadoop.util... | import com.google.common.base.Preconditions; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.hadoop.hdds.protocol.proto.HddsProtos; import org.apache.hadoop.ozone.om.exceptions.OMException; import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs; imp... | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.hdds.protocol.proto.*; import org.apache.hadoop.ozone.om.exceptions.*; import org.apache.hadoop.ozone.om.helpers.*; import org.apache.hadoop.util.*; import org.apache.hadoop.utils.*; import org.rocksdb.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop",
"org.rocksdb"
] | com.google.common; java.io; java.util; org.apache.hadoop; org.rocksdb; | 1,818,435 |
@Override
protected Comparator<RequestMappingInfo> getMappingComparator(final ServerWebExchange exchange) {
return (info1, info2) -> info1.compareTo(info2, exchange);
} | Comparator<RequestMappingInfo> function(final ServerWebExchange exchange) { return (info1, info2) -> info1.compareTo(info2, exchange); } | /**
* Provide a Comparator to sort RequestMappingInfos matched to a request.
*/ | Provide a Comparator to sort RequestMappingInfos matched to a request | getMappingComparator | {
"repo_name": "boggad/jdk9-sample",
"path": "sample-catalog/spring-jdk9/src/spring.web.reactive/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMapping.java",
"license": "mit",
"size": 14844
} | [
"java.util.Comparator",
"org.springframework.web.server.ServerWebExchange"
] | import java.util.Comparator; import org.springframework.web.server.ServerWebExchange; | import java.util.*; import org.springframework.web.server.*; | [
"java.util",
"org.springframework.web"
] | java.util; org.springframework.web; | 231,811 |
EAttribute getModel_ForthAsList(); | EAttribute getModel_ForthAsList(); | /**
* Returns the meta object for the attribute list '{@link org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model#getForthAsList <em>Forth As List</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Forth As List</em>'.
* @... | Returns the meta object for the attribute list '<code>org.eclipse.xtext.parser.unorderedGroups.unorderedGroupsTestLanguage.Model#getForthAsList Forth As List</code>'. | getModel_ForthAsList | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parser/unorderedGroups/unorderedGroupsTestLanguage/UnorderedGroupsTestLanguagePackage.java",
"license": "epl-1.0",
"size": 25772
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,523,125 |
@Test
public void testParameters() throws Exception {
UnivariateFunction f = new SinFunction();
try {
// bad interval
new SimpsonIntegrator().integrate(1000, f, 1, -1);
Assert.fail("Expecting NumberIsTooLargeException - bad interval");
} catch (NumberI... | void function() throws Exception { UnivariateFunction f = new SinFunction(); try { new SimpsonIntegrator().integrate(1000, f, 1, -1); Assert.fail(STR); } catch (NumberIsTooLargeException ex) { } try { new SimpsonIntegrator(5, 4); Assert.fail(STR); } catch (NumberIsTooSmallException ex) { } try { new SimpsonIntegrator(1... | /**
* Test of parameters for the integrator.
*/ | Test of parameters for the integrator | testParameters | {
"repo_name": "martingwhite/astor",
"path": "examples/math_32/src/test/java/org/apache/commons/math3/analysis/integration/SimpsonIntegratorTest.java",
"license": "gpl-2.0",
"size": 4937
} | [
"org.apache.commons.math3.analysis.SinFunction",
"org.apache.commons.math3.analysis.UnivariateFunction",
"org.apache.commons.math3.exception.NumberIsTooLargeException",
"org.apache.commons.math3.exception.NumberIsTooSmallException",
"org.junit.Assert"
] | import org.apache.commons.math3.analysis.SinFunction; import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.exception.NumberIsTooLargeException; import org.apache.commons.math3.exception.NumberIsTooSmallException; import org.junit.Assert; | import org.apache.commons.math3.analysis.*; import org.apache.commons.math3.exception.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 2,213,662 |
CompletableFuture<LogMetadataForWriter> getLog(URI uri,
String streamName,
boolean ownAllocator,
boolean createIfNotExists); | CompletableFuture<LogMetadataForWriter> getLog(URI uri, String streamName, boolean ownAllocator, boolean createIfNotExists); | /**
* Create the metadata of a log.
*
* @param uri the location to store the metadata of the log
* @param streamName the name of the log stream
* @param ownAllocator whether to use its own allocator or external allocator
* @param createIfNotExists flag to create the stream if it doesn't ex... | Create the metadata of a log | getLog | {
"repo_name": "ivankelly/bookkeeper",
"path": "stream/distributedlog/core/src/main/java/org/apache/distributedlog/metadata/LogStreamMetadataStore.java",
"license": "apache-2.0",
"size": 4658
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,843,422 |
void setRemoteType( RemoteType p ); | void setRemoteType( RemoteType p ); | /**
* Sets the remoteType attribute of the IRemoteCacheAttributes object
* <p>
* @param p The new remoteType value
*/ | Sets the remoteType attribute of the IRemoteCacheAttributes object | setRemoteType | {
"repo_name": "tikue/jcs2-snapshot",
"path": "src/java/org/apache/commons/jcs/auxiliary/remote/behavior/ICommonRemoteCacheAttributes.java",
"license": "apache-2.0",
"size": 5150
} | [
"org.apache.commons.jcs.auxiliary.remote.server.behavior.RemoteType"
] | import org.apache.commons.jcs.auxiliary.remote.server.behavior.RemoteType; | import org.apache.commons.jcs.auxiliary.remote.server.behavior.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,119,317 |
public static ByteBuffer serializeServiceData(Token<JobTokenIdentifier> jobToken) throws IOException {
//TODO these bytes should be versioned
DataOutputBuffer jobToken_dob = new DataOutputBuffer();
jobToken.write(jobToken_dob);
return ByteBuffer.wrap(jobToken_dob.getData(), 0, jobToken_dob.getLength()... | static ByteBuffer function(Token<JobTokenIdentifier> jobToken) throws IOException { DataOutputBuffer jobToken_dob = new DataOutputBuffer(); jobToken.write(jobToken_dob); return ByteBuffer.wrap(jobToken_dob.getData(), 0, jobToken_dob.getLength()); } | /**
* A helper function to serialize the JobTokenIdentifier to be sent to the
* ShuffleHandler as ServiceData.
* @param jobToken the job token to be used for authentication of
* shuffle data requests.
* @return the serialized version of the jobToken.
*/ | A helper function to serialize the JobTokenIdentifier to be sent to the ShuffleHandler as ServiceData | serializeServiceData | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleHandler.java",
"license": "apache-2.0",
"size": 22677
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"org.apache.hadoop.io.DataOutputBuffer",
"org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier",
"org.apache.hadoop.security.token.Token"
] | import java.io.IOException; import java.nio.ByteBuffer; import org.apache.hadoop.io.DataOutputBuffer; import org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier; import org.apache.hadoop.security.token.Token; | import java.io.*; import java.nio.*; import org.apache.hadoop.io.*; import org.apache.hadoop.mapreduce.security.token.*; import org.apache.hadoop.security.token.*; | [
"java.io",
"java.nio",
"org.apache.hadoop"
] | java.io; java.nio; org.apache.hadoop; | 680,682 |
public void eliminarTerreno( int x, int y )
{
try
{
finca.eliminarTerreno( x, y );
panelTerrenos.refrescar( );
}
catch( TerrenoNoExisteException e )
{
JOptionPane.showMessageDialog( this, e.getMessage( ), "Error", JOptionPane.ERROR_MESS... | void function( int x, int y ) { try { finca.eliminarTerreno( x, y ); panelTerrenos.refrescar( ); } catch( TerrenoNoExisteException e ) { JOptionPane.showMessageDialog( this, e.getMessage( ), "Error", JOptionPane.ERROR_MESSAGE ); } } | /**
* Indica que hay que eliminar productos en la finca
* @param x La celda x de la finca. x >= 0
* @param y La celda y de la finca. y >= 0
*/ | Indica que hay que eliminar productos en la finca | eliminarTerreno | {
"repo_name": "vargax/ejemplos",
"path": "java/apo/n10_cupiFinca/source/uniandes/cupi2/cupiFinca/interfaz/InterfazCupiFinca.java",
"license": "gpl-2.0",
"size": 12426
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,390,417 |
@SuppressWarnings("unused")
public List<String> deleteFolder(Exchange exchange) throws Exception {
validateRequiredHeader(exchange, CamelCMISConstants.CMIS_OBJECT_ID);
Message message = exchange.getIn();
String objectId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.clas... | @SuppressWarnings(STR) List<String> function(Exchange exchange) throws Exception { validateRequiredHeader(exchange, CamelCMISConstants.CMIS_OBJECT_ID); Message message = exchange.getIn(); String objectId = message.getHeader(CamelCMISConstants.CMIS_OBJECT_ID, String.class); Folder folder = (Folder) getSessionFacade().ge... | /**
* This method is called via reflection.
* It is not safe to delete it or rename it!
* Method's name are defined and retrieved from {@link CamelCMISActions}.
*/ | This method is called via reflection. It is not safe to delete it or rename it! Method's name are defined and retrieved from <code>CamelCMISActions</code> | deleteFolder | {
"repo_name": "objectiser/camel",
"path": "components/camel-cmis/src/main/java/org/apache/camel/component/cmis/CMISProducer.java",
"license": "apache-2.0",
"size": 19465
} | [
"java.util.List",
"org.apache.camel.Exchange",
"org.apache.camel.Message",
"org.apache.chemistry.opencmis.client.api.Folder",
"org.apache.chemistry.opencmis.commons.enums.UnfileObject"
] | import java.util.List; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.apache.chemistry.opencmis.client.api.Folder; import org.apache.chemistry.opencmis.commons.enums.UnfileObject; | import java.util.*; import org.apache.camel.*; import org.apache.chemistry.opencmis.client.api.*; import org.apache.chemistry.opencmis.commons.enums.*; | [
"java.util",
"org.apache.camel",
"org.apache.chemistry"
] | java.util; org.apache.camel; org.apache.chemistry; | 2,273,403 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<AppInner> updateAsync(String resourceGroupName, String resourceName, AppPatch appPatch) {
return beginUpdateAsync(resourceGroupName, resourceName, appPatch)
.last()
.flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<AppInner> function(String resourceGroupName, String resourceName, AppPatch appPatch) { return beginUpdateAsync(resourceGroupName, resourceName, appPatch) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Update the metadata of an IoT Central application.
*
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
* @param resourceName The ARM resource name of the IoT Central application.
* @param appPatch The IoT Central application metadata and ... | Update the metadata of an IoT Central application | updateAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iotcentral/azure-resourcemanager-iotcentral/src/main/java/com/azure/resourcemanager/iotcentral/implementation/AppsClientImpl.java",
"license": "mit",
"size": 103959
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.iotcentral.fluent.models.AppInner",
"com.azure.resourcemanager.iotcentral.models.AppPatch"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.iotcentral.fluent.models.AppInner; import com.azure.resourcemanager.iotcentral.models.AppPatch; | import com.azure.core.annotation.*; import com.azure.resourcemanager.iotcentral.fluent.models.*; import com.azure.resourcemanager.iotcentral.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 385,737 |
public int addIpRange(User loggedInUser, String ksLabel, String min,
String max) {
KickstartData ksdata = lookupKsData(ksLabel, loggedInUser.getOrg());
KickstartIpCommand com = new KickstartIpCommand(ksdata.getId(), loggedInUser);
IpAddress minIp = new IpAddress(min);
IpAddres... | int function(User loggedInUser, String ksLabel, String min, String max) { KickstartData ksdata = lookupKsData(ksLabel, loggedInUser.getOrg()); KickstartIpCommand com = new KickstartIpCommand(ksdata.getId(), loggedInUser); IpAddress minIp = new IpAddress(min); IpAddress maxIp = new IpAddress(max); if (!com.validateIpRan... | /**
* Add an ip range to a kickstart.
* @param loggedInUser The current user
* @param ksLabel the kickstart label
* @param min the min ip address of the range
* @param max the max ip address of the range
* @return 1 on success
*
* @xmlrpc.doc Add an ip range to a kickstart profile.
*... | Add an ip range to a kickstart | addIpRange | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java",
"license": "gpl-2.0",
"size": 65686
} | [
"com.redhat.rhn.common.validator.ValidatorError",
"com.redhat.rhn.domain.kickstart.KickstartData",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.xmlrpc.IpRangeConflictException",
"com.redhat.rhn.frontend.xmlrpc.ValidationException",
"com.redhat.rhn.manager.kickstart.IpAddress",
"com.redhat... | import com.redhat.rhn.common.validator.ValidatorError; import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.IpRangeConflictException; import com.redhat.rhn.frontend.xmlrpc.ValidationException; import com.redhat.rhn.manager.kickstart.IpAddres... | import com.redhat.rhn.common.validator.*; import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import com.redhat.rhn.manager.kickstart.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 2,355,780 |
void floatValueChanged(short unit, float value) throws DOMException; | void floatValueChanged(short unit, float value) throws DOMException; | /**
* Called when the float value has changed.
*/ | Called when the float value has changed | floatValueChanged | {
"repo_name": "apache/batik",
"path": "batik-css/src/main/java/org/apache/batik/css/dom/CSSOMValue.java",
"license": "apache-2.0",
"size": 46315
} | [
"org.w3c.dom.DOMException"
] | import org.w3c.dom.DOMException; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,823,857 |
public static WebApplicationContext getRequiredWebApplicationContext(FacesContext fc)
throws IllegalStateException {
WebApplicationContext wac = getWebApplicationContext(fc);
if (wac == null) {
throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?");
}
re... | static WebApplicationContext function(FacesContext fc) throws IllegalStateException { WebApplicationContext wac = getWebApplicationContext(fc); if (wac == null) { throw new IllegalStateException(STR); } return wac; } | /**
* Find the root WebApplicationContext for this web app, which is
* typically loaded via ContextLoaderListener or ContextLoaderServlet.
* <p>Will rethrow an exception that happened on root context startup,
* to differentiate between a failed context startup and no context at all.
* @param fc the FacesConte... | Find the root WebApplicationContext for this web app, which is typically loaded via ContextLoaderListener or ContextLoaderServlet. Will rethrow an exception that happened on root context startup, to differentiate between a failed context startup and no context at all | getRequiredWebApplicationContext | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-web/src/main/java/org/springframework/web/jsf/FacesContextUtils.java",
"license": "gpl-2.0",
"size": 5028
} | [
"javax.faces.context.FacesContext",
"org.springframework.web.context.WebApplicationContext"
] | import javax.faces.context.FacesContext; import org.springframework.web.context.WebApplicationContext; | import javax.faces.context.*; import org.springframework.web.context.*; | [
"javax.faces",
"org.springframework.web"
] | javax.faces; org.springframework.web; | 78,826 |
public static <T> void forwardAsync(
CompletableFuture<T> source, CompletableFuture<T> target, Executor executor) {
source.whenCompleteAsync(forwardTo(target), executor);
} | static <T> void function( CompletableFuture<T> source, CompletableFuture<T> target, Executor executor) { source.whenCompleteAsync(forwardTo(target), executor); } | /**
* Forwards the value from the source future to the target future using the provided executor.
*
* @param source future to forward the value from
* @param target future to forward the value to
* @param executor executor to forward the source value to the target future
* @param <T> type ... | Forwards the value from the source future to the target future using the provided executor | forwardAsync | {
"repo_name": "kl0u/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/concurrent/FutureUtils.java",
"license": "apache-2.0",
"size": 57033
} | [
"java.util.concurrent.CompletableFuture",
"java.util.concurrent.Executor"
] | import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,400,280 |
protected final Session getSession() {
return getSession(this.template.isAllowCreate());
} | final Session function() { return getSession(this.template.isAllowCreate()); } | /**
* Get a JCR Session, either from the current transaction or a new one. The
* latter is only allowed if the "allowCreate" setting of this bean's
* JcrTemplate is true.
*
* @return the JCR Session
* @throws DataAccessResourceFailureException
* if the Session couldn't be created
* @throws ... | Get a JCR Session, either from the current transaction or a new one. The latter is only allowed if the "allowCreate" setting of this bean's JcrTemplate is true | getSession | {
"repo_name": "esofthead/mycollab",
"path": "mycollab-jackrabbit/src/main/java/org/springframework/extensions/jcr/support/JcrDaoSupport.java",
"license": "agpl-3.0",
"size": 4965
} | [
"javax.jcr.Session"
] | import javax.jcr.Session; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 961,256 |
String subscribe(String source, String subtype, @Nullable Bundle data) throws IOException; | String subscribe(String source, String subtype, @Nullable Bundle data) throws IOException; | /**
* Subscribes to a source to start receiving messages from it.
* <p>
* This method may perform blocking I/O and should not be called on the main thread.
*
* @param source The source of the notifications to subscribe to.
* @param subtype The sub-source of the notifications.
* @param... | Subscribes to a source to start receiving messages from it. This method may perform blocking I/O and should not be called on the main thread | subscribe | {
"repo_name": "js0701/chromium-crosswalk",
"path": "components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GoogleCloudMessagingSubscriber.java",
"license": "bsd-3-clause",
"size": 1468
} | [
"android.os.Bundle",
"java.io.IOException",
"javax.annotation.Nullable"
] | import android.os.Bundle; import java.io.IOException; import javax.annotation.Nullable; | import android.os.*; import java.io.*; import javax.annotation.*; | [
"android.os",
"java.io",
"javax.annotation"
] | android.os; java.io; javax.annotation; | 1,204,221 |
public TestToolRepository getRepository() {
return repository;
} | TestToolRepository function() { return repository; } | /**
* Returns the test tool repository.
* @return the repository
* @since 0.2.3
*/ | Returns the test tool repository | getRepository | {
"repo_name": "cocoatomo/asakusafw",
"path": "testing-project/asakusa-test-driver/src/main/java/com/asakusafw/testdriver/TestDriverContext.java",
"license": "apache-2.0",
"size": 33349
} | [
"com.asakusafw.testdriver.core.TestToolRepository"
] | import com.asakusafw.testdriver.core.TestToolRepository; | import com.asakusafw.testdriver.core.*; | [
"com.asakusafw.testdriver"
] | com.asakusafw.testdriver; | 1,757,712 |
private int recursion(SequentialPattern prefix, List<PseudoSequenceBIDE> contexte) throws IOException {
// find frequent items of size 1 in the current projected database.
Set<PairBIDE> pairs = findAllFrequentPairs(prefix, contexte);
// we will keep tract of the maximum support of patterns
// tha... | int function(SequentialPattern prefix, List<PseudoSequenceBIDE> contexte) throws IOException { Set<PairBIDE> pairs = findAllFrequentPairs(prefix, contexte); int maxSupport = 0; for(PairBIDE pair : pairs){ if(pair.getCount() >= minsuppAbsolute){ SequentialPattern newPrefix; if(pair.isPostfix()){ newPrefix = appendItemTo... | /**
* Method to recursively grow a given sequential pattern.
* @param prefix the current sequential pattern that we want to try to grow
* @param database the current projected sequence database
* @throws IOException exception if there is an error writing to the output file
*/ | Method to recursively grow a given sequential pattern | recursion | {
"repo_name": "shockline/PDFAnalysis",
"path": "src/maxsp/MaxSP.java",
"license": "gpl-3.0",
"size": 27846
} | [
"java.io.IOException",
"java.util.List",
"java.util.Set"
] | import java.io.IOException; import java.util.List; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,042,429 |
protected void invalidatePackages(boolean alsoConfigs) throws InterruptedException {
skyframeExecutor.invalidateFilesUnderPathForTesting(reporter,
ModifiedFileSet.EVERYTHING_MODIFIED, rootDirectory);
if (alsoConfigs) {
try {
// Also invalidate all configurations. This is important for dy... | void function(boolean alsoConfigs) throws InterruptedException { skyframeExecutor.invalidateFilesUnderPathForTesting(reporter, ModifiedFileSet.EVERYTHING_MODIFIED, rootDirectory); if (alsoConfigs) { try { useConfiguration(configurationArgs.toArray(new String[0])); } catch (Exception e) { throw new RuntimeException(e); ... | /**
* Invalidates all existing packages. Optionally invalidates configurations too.
*
* <p>Tests should invalidate both unless they have specific reason not to.
*
* @throws InterruptedException
*/ | Invalidates all existing packages. Optionally invalidates configurations too. Tests should invalidate both unless they have specific reason not to | invalidatePackages | {
"repo_name": "mrdomino/bazel",
"path": "src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java",
"license": "apache-2.0",
"size": 77290
} | [
"com.google.devtools.build.lib.vfs.ModifiedFileSet"
] | import com.google.devtools.build.lib.vfs.ModifiedFileSet; | import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 2,373,932 |
static boolean useLaunchStoryboard(RuleContext ruleContext) {
if (!ruleContext.attributes().has("launch_storyboard", LABEL)) {
return false;
}
Artifact launchStoryboard =
ruleContext.getPrerequisiteArtifact("launch_storyboard", Mode.TARGET);
DottedVersion flagMinimumOs = objcConfiguratio... | static boolean useLaunchStoryboard(RuleContext ruleContext) { if (!ruleContext.attributes().has(STR, LABEL)) { return false; } Artifact launchStoryboard = ruleContext.getPrerequisiteArtifact(STR, Mode.TARGET); DottedVersion flagMinimumOs = objcConfiguration(ruleContext).getMinimumOs(); return launchStoryboard != null &... | /**
* Returns {@code true} if the given rule context has a launch storyboard set and its
* configuration (--ios_minimum_os) supports launch storyboards.
*/ | Returns true if the given rule context has a launch storyboard set and its configuration (--ios_minimum_os) supports launch storyboards | useLaunchStoryboard | {
"repo_name": "kamalmarhubi/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java",
"license": "apache-2.0",
"size": 51028
} | [
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.analysis.RuleConfiguredTarget",
"com.google.devtools.build.lib.analysis.RuleContext",
"com.google.devtools.build.lib.rules.apple.DottedVersion"
] | import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.rules.apple.DottedVersion; | import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.rules.apple.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,979,686 |
@EventHandler(value = "dblclick", target = "@tree")
private void onDoubleClick$tree(Event event) {
BaseComponent target = event.getTarget();
if (target instanceof Treenode) {
event.stopPropagation();
editNodeStart((Treenode) target);
}
} | @EventHandler(value = STR, target = "@tree") private void onDoubleClick$tree(Event event) { BaseComponent target = event.getTarget(); if (target instanceof Treenode) { event.stopPropagation(); editNodeStart((Treenode) target); } } | /**
* Double-clicking a tree node allows in place editing.
*
* @param event The double click event.
*/ | Double-clicking a tree node allows in place editing | onDoubleClick$tree | {
"repo_name": "carewebframework/carewebframework-core",
"path": "org.carewebframework.shell/src/main/java/org/carewebframework/shell/designer/PropertyEditorCustomTree.java",
"license": "apache-2.0",
"size": 24616
} | [
"org.fujion.annotation.EventHandler",
"org.fujion.component.BaseComponent",
"org.fujion.component.Treenode",
"org.fujion.event.Event"
] | import org.fujion.annotation.EventHandler; import org.fujion.component.BaseComponent; import org.fujion.component.Treenode; import org.fujion.event.Event; | import org.fujion.annotation.*; import org.fujion.component.*; import org.fujion.event.*; | [
"org.fujion.annotation",
"org.fujion.component",
"org.fujion.event"
] | org.fujion.annotation; org.fujion.component; org.fujion.event; | 268,557 |
void recordProcessInstanceStart(ExecutionEntity processInstance, FlowElement startElement); | void recordProcessInstanceStart(ExecutionEntity processInstance, FlowElement startElement); | /**
* Record a process-instance started and record start-event if activity history is enabled.
*/ | Record a process-instance started and record start-event if activity history is enabled | recordProcessInstanceStart | {
"repo_name": "roberthafner/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/activiti/engine/impl/history/HistoryManager.java",
"license": "apache-2.0",
"size": 8227
} | [
"org.activiti.bpmn.model.FlowElement",
"org.activiti.engine.impl.persistence.entity.ExecutionEntity"
] | import org.activiti.bpmn.model.FlowElement; import org.activiti.engine.impl.persistence.entity.ExecutionEntity; | import org.activiti.bpmn.model.*; import org.activiti.engine.impl.persistence.entity.*; | [
"org.activiti.bpmn",
"org.activiti.engine"
] | org.activiti.bpmn; org.activiti.engine; | 1,038,585 |
private int countMobCells(final Table table) throws IOException {
Scan scan = new Scan();
// Do not retrieve the mob data when scanning
scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE));
ResultScanner results = table.getScanner(scan);
int count = 0;
for (Result res : re... | int function(final Table table) throws IOException { Scan scan = new Scan(); scan.setAttribute(MobConstants.MOB_SCAN_RAW, Bytes.toBytes(Boolean.TRUE)); ResultScanner results = table.getScanner(scan); int count = 0; for (Result res : results) { count += res.size(); } results.close(); return count; } | /**
* Gets the number of cells in the given table.
* @param table to get the scanner
* @return the number of cells
*/ | Gets the number of cells in the given table | countMobCells | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestMobCompactor.java",
"license": "apache-2.0",
"size": 49830
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.Result",
"org.apache.hadoop.hbase.client.ResultScanner",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.hbase.client.Table",
"org.apache.hadoop.hbase.mob.MobConstants",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.client.Table; import org.apache.hadoop.hbase.mob.MobConstants; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.mob.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 51,511 |
public void testMaxCapacities() throws IOException {
this.setUp(4,1,1);
taskTrackerManager.addQueues(new String[] {"default"});
ArrayList<FakeQueueInfo> queues = new ArrayList<FakeQueueInfo>();
queues.add(new FakeQueueInfo("default", 25.0f, false, 1));
resConf.setFakeQueues(queues);
resConf.s... | void function() throws IOException { this.setUp(4,1,1); taskTrackerManager.addQueues(new String[] {STR}); ArrayList<FakeQueueInfo> queues = new ArrayList<FakeQueueInfo>(); queues.add(new FakeQueueInfo(STR, 25.0f, false, 1)); resConf.setFakeQueues(queues); resConf.setMaxCapacity(STR, 50.0f); scheduler.setResourceManager... | /**
* Test the max Capacity for map and reduce
* @throws IOException
*/ | Test the max Capacity for map and reduce | testMaxCapacities | {
"repo_name": "leonhong/hadoop-common",
"path": "src/contrib/capacity-scheduler/src/test/org/apache/hadoop/mapred/TestCapacityScheduler.java",
"license": "apache-2.0",
"size": 126711
} | [
"java.io.IOException",
"java.util.ArrayList"
] | import java.io.IOException; import java.util.ArrayList; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 394,944 |
public void activate(final BundleContext bundleContext, final Map<String, Object> configuration)
throws ConfigurationException {
if (configuration != null) {
updateConfiguration(configuration);
}
} | void function(final BundleContext bundleContext, final Map<String, Object> configuration) throws ConfigurationException { if (configuration != null) { updateConfiguration(configuration); } } | /**
* Called by the SCR to activate the component with its configuration read
* from CAS
*
* @param bundleContext
* BundleContext of the Bundle that defines this component
* @param configuration
* Configuration properties for this component obtained from the
... | Called by the SCR to activate the component with its configuration read from CAS | activate | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.horizon/src/main/java/org/openhab/binding/horizon/internal/HorizonBinding.java",
"license": "epl-1.0",
"size": 6197
} | [
"java.util.Map",
"javax.naming.ConfigurationException",
"org.osgi.framework.BundleContext"
] | import java.util.Map; import javax.naming.ConfigurationException; import org.osgi.framework.BundleContext; | import java.util.*; import javax.naming.*; import org.osgi.framework.*; | [
"java.util",
"javax.naming",
"org.osgi.framework"
] | java.util; javax.naming; org.osgi.framework; | 1,714,330 |
public void closeSession() {
this.session.commit();
this.session.close();
}
/**
* This method creates the sqlSessionFactory of myBatis. It integrates all the
* SQL mappers
* @return a {@link SqlSessionFactory} | void function() { this.session.commit(); this.session.close(); } /** * This method creates the sqlSessionFactory of myBatis. It integrates all the * SQL mappers * @return a {@link SqlSessionFactory} | /**
* Close session manually, to be done, if a JdbcTransactionFactory is used.
* Perhaps it is better to separate the commit and the closing mechanism ...
*/ | Close session manually, to be done, if a JdbcTransactionFactory is used. Perhaps it is better to separate the commit and the closing mechanism .. | closeSession | {
"repo_name": "eberhardmayer/taskana",
"path": "lib/taskana-core/src/main/java/org/taskana/impl/TaskanaEngineImpl.java",
"license": "apache-2.0",
"size": 5199
} | [
"org.apache.ibatis.session.SqlSessionFactory"
] | import org.apache.ibatis.session.SqlSessionFactory; | import org.apache.ibatis.session.*; | [
"org.apache.ibatis"
] | org.apache.ibatis; | 2,055,083 |
private boolean readHyphenatedWord()
{
ArrayList<Character> saved = new ArrayList<Character>();
// check for page numbers
char token;
if ( readArabicPage()||readRomanPage() )
{
// remove page number
char last = undo.get(undo.size()-1);
... | boolean function() { ArrayList<Character> saved = new ArrayList<Character>(); char token; if ( readArabicPage() readRomanPage() ) { char last = undo.get(undo.size()-1); undo.clear(); saved.add('-'); token = last; } else token = nextChar(); while ( token=='\n' token=='\r' ) { saved.add(token); token = nextChar(); } save... | /**
* Read a hyphenated word - do no harm
* @return true if it was hyphenated at line-end
*/ | Read a hyphenated word - do no harm | readHyphenatedWord | {
"repo_name": "Ecdosis/NMergeNew",
"path": "src/edu/luc/nmerge/mvd/navigator/TextNavigator.java",
"license": "gpl-2.0",
"size": 17023
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,052,233 |
@Test
public void findBaseGeometry() {
HashSet<GeometryType> set = new HashSet<GeometryType>();
set.add( LINEAR_RING );
Assert.assertEquals( LINEAR_RING, determineMinimalBaseGeometry( set ) );
set.add( RING );
Assert.assertEquals( RING, determineMinimalBaseGeometry( set ... | void function() { HashSet<GeometryType> set = new HashSet<GeometryType>(); set.add( LINEAR_RING ); Assert.assertEquals( LINEAR_RING, determineMinimalBaseGeometry( set ) ); set.add( RING ); Assert.assertEquals( RING, determineMinimalBaseGeometry( set ) ); set.add( COMPOSITE_CURVE ); set.add( LINE_STRING ); Assert.assert... | /**
* Find the base of different geometry types
*/ | Find the base of different geometry types | findBaseGeometry | {
"repo_name": "deegree/deegree3",
"path": "deegree-core/deegree-core-base/src/test/java/org/deegree/gml/schema/GeometryTypeTest.java",
"license": "lgpl-2.1",
"size": 7385
} | [
"java.util.HashSet",
"org.deegree.feature.types.property.GeometryPropertyType",
"org.junit.Assert"
] | import java.util.HashSet; import org.deegree.feature.types.property.GeometryPropertyType; import org.junit.Assert; | import java.util.*; import org.deegree.feature.types.property.*; import org.junit.*; | [
"java.util",
"org.deegree.feature",
"org.junit"
] | java.util; org.deegree.feature; org.junit; | 2,883,334 |
public static DetailAST parseWithComments(FileContents contents)
throws RecognitionException, TokenStreamException {
return appendHiddenCommentNodes(parse(contents));
} | static DetailAST function(FileContents contents) throws RecognitionException, TokenStreamException { return appendHiddenCommentNodes(parse(contents)); } | /**
* Parses Java source file. Result AST contains comment nodes.
* @param contents source file content
* @return DetailAST tree
* @throws RecognitionException if parser failed
* @throws TokenStreamException if lexer failed
*/ | Parses Java source file. Result AST contains comment nodes | parseWithComments | {
"repo_name": "AkshitaKukreja30/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java",
"license": "lgpl-2.1",
"size": 26308
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.FileContents"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.FileContents; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 2,076,403 |
public void setNoEmailPlease(Integer v)
{
if (!ObjectUtils.equals(this.noEmailPlease, v))
{
this.noEmailPlease = v;
setModified(true);
}
} | void function(Integer v) { if (!ObjectUtils.equals(this.noEmailPlease, v)) { this.noEmailPlease = v; setModified(true); } } | /**
* Set the value of NoEmailPlease
*
* @param v new value
*/ | Set the value of NoEmailPlease | setNoEmailPlease | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTPerson.java",
"license": "gpl-3.0",
"size": 1013508
} | [
"org.apache.commons.lang.ObjectUtils"
] | import org.apache.commons.lang.ObjectUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,206,740 |
private void buildBubble() {
built = true;
this.realAlignment = this.calculateAlignment(this.realAlignment);
setLayout(new BorderLayout());
setFocusable(false);
setFocusableWindowState(false);
setUndecorated(true);
if (isPerPixelTranslucencySupported) {
setBackground(COLOR_TRANSPARENT);
} else {
... | void function() { built = true; this.realAlignment = this.calculateAlignment(this.realAlignment); setLayout(new BorderLayout()); setFocusable(false); setFocusableWindowState(false); setUndecorated(true); if (isPerPixelTranslucencySupported) { setBackground(COLOR_TRANSPARENT); } else { setBackground(Color.WHITE); } init... | /**
* builds the Bubble for the first time
*/ | builds the Bubble for the first time | buildBubble | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/gui/tools/bubble/BubbleWindow.java",
"license": "gpl-3.0",
"size": 71660
} | [
"java.awt.BorderLayout",
"java.awt.Color",
"java.awt.GridBagLayout",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridBagLayout; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,341,718 |
Runfiles runfiles = Runfiles.create();
String documentationFilePath =
runfiles.rlocation("io_bazel/site/en/docs/user-manual.md");
final File documentationFile = new File(documentationFilePath);
DocumentationTestUtil.validateUserManual(
Bazel.BAZEL_MODULES,
BazelRuleClassProvider.crea... | Runfiles runfiles = Runfiles.create(); String documentationFilePath = runfiles.rlocation(STR); final File documentationFile = new File(documentationFilePath); DocumentationTestUtil.validateUserManual( Bazel.BAZEL_MODULES, BazelRuleClassProvider.create(), Files.asCharSource(documentationFile, UTF_8).read(), ImmutableSet... | /**
* Checks that the user-manual is in sync with the {@link
* com.google.devtools.build.lib.analysis.config.BuildConfigurationValue}.
*/ | Checks that the user-manual is in sync with the <code>com.google.devtools.build.lib.analysis.config.BuildConfigurationValue</code> | testBazelUserManual | {
"repo_name": "bazelbuild/bazel",
"path": "src/test/java/com/google/devtools/build/lib/packages/BazelDocumentationTest.java",
"license": "apache-2.0",
"size": 1829
} | [
"com.google.common.collect.ImmutableSet",
"com.google.common.io.Files",
"com.google.devtools.build.lib.bazel.Bazel",
"com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider",
"com.google.devtools.build.runfiles.Runfiles",
"java.io.File"
] | import com.google.common.collect.ImmutableSet; import com.google.common.io.Files; import com.google.devtools.build.lib.bazel.Bazel; import com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider; import com.google.devtools.build.runfiles.Runfiles; import java.io.File; | import com.google.common.collect.*; import com.google.common.io.*; import com.google.devtools.build.lib.bazel.*; import com.google.devtools.build.lib.bazel.rules.*; import com.google.devtools.build.runfiles.*; import java.io.*; | [
"com.google.common",
"com.google.devtools",
"java.io"
] | com.google.common; com.google.devtools; java.io; | 84,412 |
for (int p : parents) if (forbidden.contains(p)) return Double.NaN;
// if (parents.length == 0) return localScore(i);
// else if (parents.length == 1) return localScore(i, parents[0]);
double residualVariance = getCovariances().getValue(i, i);
int n = getSampleSize();
int p = par... | for (int p : parents) if (forbidden.contains(p)) return Double.NaN; double residualVariance = getCovariances().getValue(i, i); int n = getSampleSize(); int p = parents.length; TetradMatrix covxx = getSelection1(getCovariances(), parents); try { TetradMatrix covxxInv = covxx.inverse(); TetradVector covxy = getSelection2... | /**
* Calculates the sample likelihood and BIC score for i given its parents in a simple SEM model
*/ | Calculates the sample likelihood and BIC score for i given its parents in a simple SEM model | localScore | {
"repo_name": "ajsedgewick/tetrad",
"path": "tetrad-lib/src/main/java/edu/cmu/tetrad/search/SemBicScore.java",
"license": "gpl-2.0",
"size": 10999
} | [
"edu.cmu.tetrad.util.TetradMatrix",
"edu.cmu.tetrad.util.TetradVector",
"java.util.ArrayList",
"java.util.List"
] | import edu.cmu.tetrad.util.TetradMatrix; import edu.cmu.tetrad.util.TetradVector; import java.util.ArrayList; import java.util.List; | import edu.cmu.tetrad.util.*; import java.util.*; | [
"edu.cmu.tetrad",
"java.util"
] | edu.cmu.tetrad; java.util; | 141,998 |
private String readString() throws IOException {
StringBuffer sb = new StringBuffer();
int delim = lastChar;
int l = lineNo;
int c = colNo;
readChar();
while ((-1 != lastChar) && (delim != lastChar)) {
StringBuffer digitBuffer;
if (lastChar !... | String function() throws IOException { StringBuffer sb = new StringBuffer(); int delim = lastChar; int l = lineNo; int c = colNo; readChar(); while ((-1 != lastChar) && (delim != lastChar)) { StringBuffer digitBuffer; if (lastChar != '\\') { sb.append((char) lastChar); readChar(); continue; } readChar(); switch (lastCh... | /**
* Method to read a string from the JSON string, converting escapes accordingly.
*
* @return The parsed JSON string with all escapes properly converyed.
*
* @throws IOException Thrown on unterminated strings, invalid characters, bad escapes, and so on. Basically, invalid JSON.
*/ | Method to read a string from the JSON string, converting escapes accordingly | readString | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.json4j/src/com/ibm/json/java/internal/Tokenizer.java",
"license": "epl-1.0",
"size": 13676
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 531,127 |
return title = Lists.createWhenNull(title);
} | return title = Lists.createWhenNull(title); } | /**
* Returns the DublinCore module titles.
* <p>
*
* @return a list of Strings representing the DublinCore module title, an empty list if none.
*
*/ | Returns the DublinCore module titles. | getTitles | {
"repo_name": "bibliolabs/rome",
"path": "rome/src/main/java/com/rometools/rome/feed/module/DCModuleImpl.java",
"license": "apache-2.0",
"size": 26632
} | [
"com.rometools.utils.Lists"
] | import com.rometools.utils.Lists; | import com.rometools.utils.*; | [
"com.rometools.utils"
] | com.rometools.utils; | 280,062 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.