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 void processEndOfStream() throws ExoPlaybackException { switch (codecDrainAction) { case DRAIN_ACTION_REINITIALIZE: releaseCodec(); maybeInitCodec(); break; case DRAIN_ACTION_FLUSH: flushOrReinitCodec(); break; case DRAIN_ACTION_NONE: default...
void function() throws ExoPlaybackException { switch (codecDrainAction) { case DRAIN_ACTION_REINITIALIZE: releaseCodec(); maybeInitCodec(); break; case DRAIN_ACTION_FLUSH: flushOrReinitCodec(); break; case DRAIN_ACTION_NONE: default: outputStreamEnded = true; renderToEndOfStream(); break; } }
/** * Processes an end of stream signal. * * @throws ExoPlaybackException If an error occurs processing the signal. */
Processes an end of stream signal
processEndOfStream
{ "repo_name": "Jamesits/Moegram", "path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/mediacodec/MediaCodecRenderer.java", "license": "gpl-2.0", "size": 68067 }
[ "com.google.android.exoplayer2.ExoPlaybackException" ]
import com.google.android.exoplayer2.ExoPlaybackException;
import com.google.android.exoplayer2.*;
[ "com.google.android" ]
com.google.android;
645,671
@Test public void testCorrectCompactionsAreDeleted() { // Test that compactions are only deleted when the chosen compaction is behind FCT. // As it is, a new compaction is not started if a compaction exists outside of FCT. // So, when the most effective compaction is found to be behind F...
void function() { long now = System.currentTimeMillis(); MetricRegistry metricRegistry = new MetricRegistry(); Counter archiveDeltaSize = metricRegistry.counter(MetricRegistry.name(STR, STR, STR)); Compactor compactor = new DistributedCompactor(archiveDeltaSize, false, metricRegistry); final Key key = mock(Key.class); ...
/** * Test that compactions are only deleted when the chosen compaction is behind FCT. **/
Test that compactions are only deleted when the chosen compaction is behind FCT
testCorrectCompactionsAreDeleted
{ "repo_name": "bazaarvoice/emodb", "path": "sor/src/test/java/com/bazaarvoice/emodb/sor/core/MultiDCCompactionTest.java", "license": "apache-2.0", "size": 9398 }
[ "com.bazaarvoice.emodb.common.uuid.TimeUUIDs", "com.bazaarvoice.emodb.common.uuid.UUIDs", "com.bazaarvoice.emodb.sor.api.Compaction", "com.bazaarvoice.emodb.sor.db.Key", "com.bazaarvoice.emodb.sor.db.Record", "com.bazaarvoice.emodb.sor.db.test.DeltaClusteringKey", "com.bazaarvoice.emodb.sor.delta.Delta"...
import com.bazaarvoice.emodb.common.uuid.TimeUUIDs; import com.bazaarvoice.emodb.common.uuid.UUIDs; import com.bazaarvoice.emodb.sor.api.Compaction; import com.bazaarvoice.emodb.sor.db.Key; import com.bazaarvoice.emodb.sor.db.Record; import com.bazaarvoice.emodb.sor.db.test.DeltaClusteringKey; import com.bazaarvoice.em...
import com.bazaarvoice.emodb.common.uuid.*; import com.bazaarvoice.emodb.sor.api.*; import com.bazaarvoice.emodb.sor.db.*; import com.bazaarvoice.emodb.sor.db.test.*; import com.bazaarvoice.emodb.sor.delta.*; import com.bazaarvoice.emodb.sor.test.*; import com.codahale.metrics.*; import com.google.common.base.*; import...
[ "com.bazaarvoice.emodb", "com.codahale.metrics", "com.google.common", "java.util", "org.mockito", "org.testng" ]
com.bazaarvoice.emodb; com.codahale.metrics; com.google.common; java.util; org.mockito; org.testng;
2,336,273
public void setLine(Shape line) { ParamChecks.nullNotPermitted(line, "line"); this.line = line; }
void function(Shape line) { ParamChecks.nullNotPermitted(line, "line"); this.line = line; }
/** * Sets the line. * * @param line the line (<code>null</code> not permitted). * * @see #getLine() * @since 1.0.14 */
Sets the line
setLine
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/main/java/org/jfree/chart/LegendItem.java", "license": "lgpl-2.1", "size": 38332 }
[ "java.awt.Shape", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Shape; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
471,367
public static <T> Condition<T> anyOf(Iterable<? extends Condition<? super T>> conditions) { return AnyOf.anyOf(conditions); }
static <T> Condition<T> function(Iterable<? extends Condition<? super T>> conditions) { return AnyOf.anyOf(conditions); }
/** * Creates a new <code>{@link AnyOf}</code> * * @param <T> the type of object the given condition accept. * @param conditions the conditions to evaluate. * @return the created {@code AnyOf}. * @throws NullPointerException if the given iterable is {@code null}. * @throws NullPointerException if a...
Creates a new <code><code>AnyOf</code></code>
anyOf
{ "repo_name": "AlexBischof/assertj-core", "path": "src/main/java/org/assertj/core/api/Assertions.java", "license": "apache-2.0", "size": 45871 }
[ "org.assertj.core.condition.AnyOf" ]
import org.assertj.core.condition.AnyOf;
import org.assertj.core.condition.*;
[ "org.assertj.core" ]
org.assertj.core;
343,851
NestedSet<Artifact> buildMandatoryInputs() { NestedSetBuilder<Artifact> realMandatoryInputsBuilder = NestedSetBuilder.compileOrder(); realMandatoryInputsBuilder.addTransitive(mandatoryInputsBuilder.build()); realMandatoryInputsBuilder.addAll(getBuiltinIncludeFiles()); if (useHeaderModules() && !should...
NestedSet<Artifact> buildMandatoryInputs() { NestedSetBuilder<Artifact> realMandatoryInputsBuilder = NestedSetBuilder.compileOrder(); realMandatoryInputsBuilder.addTransitive(mandatoryInputsBuilder.build()); realMandatoryInputsBuilder.addAll(getBuiltinIncludeFiles()); if (useHeaderModules() && !shouldScanIncludes) { re...
/** * Returns the list of mandatory inputs for the {@link CppCompileAction} as configured. */
Returns the list of mandatory inputs for the <code>CppCompileAction</code> as configured
buildMandatoryInputs
{ "repo_name": "bazelbuild/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java", "license": "apache-2.0", "size": 23199 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet", "com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.common.base.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
477,149
protected void doSetup(Context context) { Configuration conf = context.getConfiguration(); // If a custom separator has been used, // decode it back from Base64 encoding. separator = conf.get(ImportTsv.SEPARATOR_CONF_KEY); if (separator == null) { separator = ImportTsv.DEFAULT_SEPARATOR; ...
void function(Context context) { Configuration conf = context.getConfiguration(); separator = conf.get(ImportTsv.SEPARATOR_CONF_KEY); if (separator == null) { separator = ImportTsv.DEFAULT_SEPARATOR; } else { separator = new String(Base64.decode(separator)); } ts = conf.getLong(ImportTsv.TIMESTAMP_CONF_KEY, 0); skipBad...
/** * Handles common parameter initialization that a subclass might want to leverage. * @param context */
Handles common parameter initialization that a subclass might want to leverage
doSetup
{ "repo_name": "throughsky/lywebank", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TextSortReducer.java", "license": "apache-2.0", "size": 7491 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.util.Base64" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,970,038
@SuppressWarnings("java:S3776") public PulsarSource<OUT> build() { // Ensure the topic subscriber for pulsar. checkNotNull(subscriber, "No topic names or topic pattern are provided."); SubscriptionType subscriptionType = configBuilder.get(PULSAR_SUBSCRIPTION_TYPE); if (subscrip...
@SuppressWarnings(STR) PulsarSource<OUT> function() { checkNotNull(subscriber, STR); SubscriptionType subscriptionType = configBuilder.get(PULSAR_SUBSCRIPTION_TYPE); if (subscriptionType == SubscriptionType.Key_Shared) { if (rangeGenerator == null) { LOG.warn( STR + STR); this.rangeGenerator = new UniformRangeGenerator...
/** * Build the {@link PulsarSource}. * * @return a PulsarSource with the settings made for this builder. */
Build the <code>PulsarSource</code>
build
{ "repo_name": "apache/flink", "path": "flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/PulsarSourceBuilder.java", "license": "apache-2.0", "size": 23647 }
[ "java.lang.Boolean", "org.apache.flink.api.connector.source.Boundedness", "org.apache.flink.connector.pulsar.source.config.SourceConfiguration", "org.apache.flink.connector.pulsar.source.enumerator.topic.range.FullRangeGenerator", "org.apache.flink.connector.pulsar.source.enumerator.topic.range.UniformRange...
import java.lang.Boolean; import org.apache.flink.api.connector.source.Boundedness; import org.apache.flink.connector.pulsar.source.config.SourceConfiguration; import org.apache.flink.connector.pulsar.source.enumerator.topic.range.FullRangeGenerator; import org.apache.flink.connector.pulsar.source.enumerator.topic.rang...
import java.lang.*; import org.apache.flink.api.connector.source.*; import org.apache.flink.connector.pulsar.source.config.*; import org.apache.flink.connector.pulsar.source.enumerator.topic.range.*; import org.apache.flink.util.*; import org.apache.pulsar.client.api.*;
[ "java.lang", "org.apache.flink", "org.apache.pulsar" ]
java.lang; org.apache.flink; org.apache.pulsar;
1,345,887
public static String i18nInstancePropertyLabel( final String property, final Object instance, final boolean shortLabel, final ResourceBundleLoadStrategy strategy) { return i18nPropertyLabel(property, instance.getClass(), shortLabel,...
static String function( final String property, final Object instance, final boolean shortLabel, final ResourceBundleLoadStrategy strategy) { return i18nPropertyLabel(property, instance.getClass(), shortLabel, strategy); } public static final String I18N_PROPERTY_LABEL_KEY_PREFIX = STR; public static final String I18N_S...
/** * <p>Return a label for a property with name <code>property</code> * of a type <code>instance.getClass()</code>.</p> * * @see #i18nPropertyLabel(String, Class, boolean, ResourceBundleLoadStrategy) * * @param property * The name of the property to return an i18n'ed label for. * @para...
Return a label for a property with name <code>property</code> of a type <code>instance.getClass()</code>
i18nInstancePropertyLabel
{ "repo_name": "jandppw/ppwcode-recovered-from-google-code", "path": "java/vernacular/semantics/dev/d20080929-1840/src/main/java/org/ppwcode/vernacular/semantics_VI/i18n/I18nLabelHelpers.java", "license": "apache-2.0", "size": 16546 }
[ "org.ppwcode.vernacular.resourcebundle_II.ResourceBundleLoadStrategy" ]
import org.ppwcode.vernacular.resourcebundle_II.ResourceBundleLoadStrategy;
import org.ppwcode.vernacular.*;
[ "org.ppwcode.vernacular" ]
org.ppwcode.vernacular;
127,339
public Date getMinTime();
Date function();
/** * Gets the minimum time for the dataset. * * @return The minimum time. */
Gets the minimum time for the dataset
getMinTime
{ "repo_name": "codeaudit/Foundry", "path": "Components/LearningCore/Source/gov/sandia/cognition/data/temporal/BatchTemporalDataSource.java", "license": "bsd-3-clause", "size": 2289 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,418,760
@Test(expectedExceptions = { LDAPException.class }) public void testDecodeWithValue() throws Exception { new ListConfigurationsExtendedRequest( new ExtendedRequest("1.3.6.1.4.1.30221.2.6.26", new ASN1OctetString("foo"))); }
@Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { new ListConfigurationsExtendedRequest( new ExtendedRequest(STR, new ASN1OctetString("foo"))); }
/** * Tests the behavior when trying to decode an extended request that has a * value. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior when trying to decode an extended request that has a value
testDecodeWithValue
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/ListConfigurationsExtendedRequestTestCase.java", "license": "gpl-2.0", "size": 4850 }
[ "com.unboundid.asn1.ASN1OctetString", "com.unboundid.ldap.sdk.ExtendedRequest", "com.unboundid.ldap.sdk.LDAPException", "org.testng.annotations.Test" ]
import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.ExtendedRequest; import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test;
import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.asn1", "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations;
254,672
public boolean isShowPlatformOverviewDirectory() throws RemoteException;
boolean function() throws RemoteException;
/** * Determines if a directory column is generated for the Test Case Summary table in the Platform * Overview section. * * @return get attribute platformOverviewDirectory * * @throws RemoteException * remote communication problem */
Determines if a directory column is generated for the Test Case Summary table in the Platform Overview section
isShowPlatformOverviewDirectory
{ "repo_name": "jenkinsci/piketec-tpt-plugin", "path": "src/main/java/com/piketec/tpt/api/AdvancedReportSettings.java", "license": "mit", "size": 27649 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
427,815
public List<Integer> grouper(List<Object> values) { if (GrouperType.global.equals(grouptype)) { // send to task which taskId is 0 return JStormUtils.mk_list(out_tasks.get(0)); } else if (GrouperType.fields.equals(grouptype)) { // field grouping return ...
List<Integer> function(List<Object> values) { if (GrouperType.global.equals(grouptype)) { return JStormUtils.mk_list(out_tasks.get(0)); } else if (GrouperType.fields.equals(grouptype)) { return fields_grouper.grouper(values); } else if (GrouperType.all.equals(grouptype)) { return out_tasks; } else if (GrouperType.shuff...
/** * get which task should tuple be sent to * * @param values * @return */
get which task should tuple be sent to
grouper
{ "repo_name": "haoyanjun21/jstorm", "path": "jstorm-core/src/main/java/com/alibaba/jstorm/task/group/MkGrouper.java", "license": "apache-2.0", "size": 9511 }
[ "com.alibaba.jstorm.utils.JStormUtils", "java.util.ArrayList", "java.util.List" ]
import com.alibaba.jstorm.utils.JStormUtils; import java.util.ArrayList; import java.util.List;
import com.alibaba.jstorm.utils.*; import java.util.*;
[ "com.alibaba.jstorm", "java.util" ]
com.alibaba.jstorm; java.util;
2,360,149
public String getName() { return getAttribute(Constants.ATTR_NAME); }
String function() { return getAttribute(Constants.ATTR_NAME); }
/** * Return the name. * * @return the name */
Return the name
getName
{ "repo_name": "moravianlibrary/MEditor", "path": "editor-common/editor-common-client/src/main/java/cz/mzk/editor/client/view/other/ScanRecord.java", "license": "gpl-2.0", "size": 3684 }
[ "cz.mzk.editor.client.util.Constants" ]
import cz.mzk.editor.client.util.Constants;
import cz.mzk.editor.client.util.*;
[ "cz.mzk.editor" ]
cz.mzk.editor;
2,299,093
public void setTags(List<String> tags) { if (tags == null) { throw new IllegalArgumentException("Parameter tags must not be null."); } for (String tag : tags) { if (!this.tags.contains(tag)) { insertTagDb(tag); } } for (St...
void function(List<String> tags) { if (tags == null) { throw new IllegalArgumentException(STR); } for (String tag : tags) { if (!this.tags.contains(tag)) { insertTagDb(tag); } } for (String tag : this.tags) { if (!tags.contains(tag)) { deleteTagDb(tag); } } this.tags = new ArrayList<>(tags); notifyEvent(HistoryReferenc...
/** * Sets the tags for the HTTP message. * * @param tags the new tags. * @throws IllegalArgumentException if the given parameter is {@code null}. * @since 2.7.0 * @see #addTag(String) * @see #deleteTag(String) */
Sets the tags for the HTTP message
setTags
{ "repo_name": "Ali-Razmjoo/zaproxy", "path": "zap/src/main/java/org/parosproxy/paros/model/HistoryReference.java", "license": "apache-2.0", "size": 30481 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,751,486
@Override protected Element handle(Document document, XmlElement operationElement, NetconfOperationRouter opRouter) throws NetconfDocumentedException { opRouter.close(); return document.createElement(XmlNetconfConstants.OK); }
Element function(Document document, XmlElement operationElement, NetconfOperationRouter opRouter) throws NetconfDocumentedException { opRouter.close(); return document.createElement(XmlNetconfConstants.OK); }
/** * Close netconf operation router associated to this session, which in turn * closes NetconfOperationServiceSnapshot with all NetconfOperationService * instances */
Close netconf operation router associated to this session, which in turn closes NetconfOperationServiceSnapshot with all NetconfOperationService instances
handle
{ "repo_name": "xiaohanz/softcontroller", "path": "opendaylight/netconf/netconf-impl/src/main/java/org/opendaylight/controller/netconf/impl/mapping/operations/DefaultCloseSession.java", "license": "epl-1.0", "size": 2461 }
[ "org.opendaylight.controller.netconf.api.NetconfDocumentedException", "org.opendaylight.controller.netconf.api.NetconfOperationRouter", "org.opendaylight.controller.netconf.util.xml.XmlElement", "org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants", "org.w3c.dom.Document", "org.w3c.dom.Elemen...
import org.opendaylight.controller.netconf.api.NetconfDocumentedException; import org.opendaylight.controller.netconf.api.NetconfOperationRouter; import org.opendaylight.controller.netconf.util.xml.XmlElement; import org.opendaylight.controller.netconf.util.xml.XmlNetconfConstants; import org.w3c.dom.Document; import o...
import org.opendaylight.controller.netconf.api.*; import org.opendaylight.controller.netconf.util.xml.*; import org.w3c.dom.*;
[ "org.opendaylight.controller", "org.w3c.dom" ]
org.opendaylight.controller; org.w3c.dom;
706,061
public static int parseJavaVersion(String version) { String majorVersion; if (version.startsWith("1.")) { majorVersion = version.substring(2, 3); } else { Pattern majorVersion9PlusPattern = Pattern.compile("(\\d+).*"); Matcher m = majorVersion9PlusPattern....
static int function(String version) { String majorVersion; if (version.startsWith("1.")) { majorVersion = version.substring(2, 3); } else { Pattern majorVersion9PlusPattern = Pattern.compile(STR); Matcher m = majorVersion9PlusPattern.matcher(version); if (m.find()) { majorVersion = m.group(1); } else { throw new Illega...
/** * Returns the major version parsed from the provided Java version string (e.g. {@code "1.8.0.231"} -> {@code 8}). * * @param version the Java version string * @return the major version as an int */
Returns the major version parsed from the provided Java version string (e.g. "1.8.0.231" -> 8)
parseJavaVersion
{ "repo_name": "YolandaMDavis/nifi", "path": "nifi-commons/nifi-security-utils/src/main/java/org/apache/nifi/security/util/CertificateUtils.java", "license": "apache-2.0", "size": 32423 }
[ "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,207,047
public void serverOffline(Server server);
void function(Server server);
/** * Notifies that a servers has gone down * * @param server Server that is now offline */
Notifies that a servers has gone down
serverOffline
{ "repo_name": "jacarrichan/j2ep", "path": "src/main/java/net/sf/j2ep/servers/ServerStatusListener.java", "license": "apache-2.0", "size": 1439 }
[ "net.sf.j2ep.model.Server" ]
import net.sf.j2ep.model.Server;
import net.sf.j2ep.model.*;
[ "net.sf.j2ep" ]
net.sf.j2ep;
394,658
public void test(TestHarness harness) { // create instance of a class Double Object o = new UnsupportedEncodingException("xyzzy"); // get a runtime class of an object "o" Class c = o.getClass(); harness.check(c.isInstance(new UnsupportedEncodingException("xyzzy"))); ...
void function(TestHarness harness) { Object o = new UnsupportedEncodingException("xyzzy"); Class c = o.getClass(); harness.check(c.isInstance(new UnsupportedEncodingException("xyzzy"))); }
/** * Runs the test using the specified harness. * * @param harness the test harness (<code>null</code> not permitted). */
Runs the test using the specified harness
test
{ "repo_name": "niloc132/mauve-gwt", "path": "src/main/java/gnu/testlet/java/io/UnsupportedEncodingException/classInfo/isInstance.java", "license": "gpl-2.0", "size": 1670 }
[ "gnu.testlet.TestHarness", "java.io.UnsupportedEncodingException" ]
import gnu.testlet.TestHarness; import java.io.UnsupportedEncodingException;
import gnu.testlet.*; import java.io.*;
[ "gnu.testlet", "java.io" ]
gnu.testlet; java.io;
1,202,130
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public ItemChoicesEntity physicalSelectOnKey(Integer choiceNo, Integer itemNo, Integer typeId) { String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/ItemChoicesDao/ItemChoicesDao_physical_selec...
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) ItemChoicesEntity function(Integer choiceNo, Integer itemNo, Integer typeId) { String sql = SQLManager.getInstance().getSql(STR); return executeQuerySingle(sql, ItemChoicesEntity.class, choiceNo, itemNo, typeId); }
/** * Select data on key. * @param choiceNo choiceNo * @param itemNo itemNo * @param typeId typeId * @return data */
Select data on key
physicalSelectOnKey
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/knowledge/dao/gen/GenItemChoicesDao.java", "license": "apache-2.0", "size": 20583 }
[ "org.support.project.aop.Aspect", "org.support.project.knowledge.entity.ItemChoicesEntity", "org.support.project.ormapping.common.SQLManager" ]
import org.support.project.aop.Aspect; import org.support.project.knowledge.entity.ItemChoicesEntity; import org.support.project.ormapping.common.SQLManager;
import org.support.project.aop.*; import org.support.project.knowledge.entity.*; import org.support.project.ormapping.common.*;
[ "org.support.project" ]
org.support.project;
592,496
void movingBucket(Region region, int bucketId, DistributedMember source, DistributedMember target);
void movingBucket(Region region, int bucketId, DistributedMember source, DistributedMember target);
/** * Indicates that a bucket is being moved from the source member to the target member. * * @param region the region * @param bucketId the bucket being moved * @param source the member the bucket is moving from * @param target the member the bucket is moving to */
Indicates that a bucket is being moved from the source member to the target member
movingBucket
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/control/InternalResourceManager.java", "license": "apache-2.0", "size": 20867 }
[ "org.apache.geode.cache.Region", "org.apache.geode.distributed.DistributedMember" ]
import org.apache.geode.cache.Region; import org.apache.geode.distributed.DistributedMember;
import org.apache.geode.cache.*; import org.apache.geode.distributed.*;
[ "org.apache.geode" ]
org.apache.geode;
709,623
@ApiModelProperty(value = "A unique identifier of an Encoding.") public String getId() { return id; }
@ApiModelProperty(value = STR) String function() { return id; }
/** * A unique identifier of an Encoding. * @return id **/
A unique identifier of an Encoding
getId
{ "repo_name": "Telestream/telestream-cloud-java-sdk", "path": "telestream-cloud-flip-sdk/src/main/java/net/telestream/cloud/flip/Encoding.java", "license": "mit", "size": 21436 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
987,345
public T caseEDROOMDataDefinitionUnionElementUnion(EDROOMDataDefinitionUnionElementUnion object) { return null; }
T function(EDROOMDataDefinitionUnionElementUnion object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>EDROOMDataDefinitionUnionElementUnion</em>'. * @param object the target of the switch. * @return the result of interpreting the object as an instance of '<em>EDROOMDataDefinitionUnionElementUnion</em>'. * @see #doSwitch(org.eclipse.emf.e...
Returns the result of interpreting the object as an instance of 'EDROOMDataDefinitionUnionElementUnion'
caseEDROOMDataDefinitionUnionElementUnion
{ "repo_name": "parraman/micobs", "path": "mclev/domains/edroom/es.uah.aut.srg.micobs.mclev.domain.edroom/src/es/uah/aut/srg/micobs/mclev/domain/edroom/edroomdclass/util/edroomdclassSwitch.java", "license": "epl-1.0", "size": 28861 }
[ "es.uah.aut.srg.micobs.mclev.domain.edroom.edroomdclass.EDROOMDataDefinitionUnionElementUnion" ]
import es.uah.aut.srg.micobs.mclev.domain.edroom.edroomdclass.EDROOMDataDefinitionUnionElementUnion;
import es.uah.aut.srg.micobs.mclev.domain.edroom.edroomdclass.*;
[ "es.uah.aut" ]
es.uah.aut;
1,478,987
public static boolean deleteFile(String path){ return StringUtils.isNotEmpty(path) && deleteFile(new File(path)); }
static boolean function(String path){ return StringUtils.isNotEmpty(path) && deleteFile(new File(path)); }
/** * Delete a single file. * @param path Target file path * @return Delete result. */
Delete a single file
deleteFile
{ "repo_name": "motcwang/MCommon", "path": "mcommon/src/main/java/im/wangchao/mcommon/utils/FileUtils.java", "license": "gpl-2.0", "size": 11955 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,754,420
public void connectionClosed(ConnectionEvent event) { if (isActive) { try { PooledConnection conn = (PooledConnection) event.getSource(); provider.returnConnection(conn); } catch (Exception ex) { String exception = "GemFireConnPooledDataSource::connectionclosed:Exception =" + e...
void function(ConnectionEvent event) { if (isActive) { try { PooledConnection conn = (PooledConnection) event.getSource(); provider.returnConnection(conn); } catch (Exception ex) { String exception = STR + ex; if (logger.isDebugEnabled()) { logger.debug(exception, ex); } } } }
/** * Implementation of call back function from ConnectionEventListener interface. This callback will * be invoked on connection close event. * * @param event */
Implementation of call back function from ConnectionEventListener interface. This callback will be invoked on connection close event
connectionClosed
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/datasource/GemFireConnPooledDataSource.java", "license": "apache-2.0", "size": 7234 }
[ "javax.sql.ConnectionEvent", "javax.sql.PooledConnection" ]
import javax.sql.ConnectionEvent; import javax.sql.PooledConnection;
import javax.sql.*;
[ "javax.sql" ]
javax.sql;
2,734,606
public static String toHtml(Spanned text) { StringBuilder out = new StringBuilder(); withinHtml(out, text); return out.toString(); }
static String function(Spanned text) { StringBuilder out = new StringBuilder(); withinHtml(out, text); return out.toString(); }
/** * Returns an HTML representation of the provided Spanned text. */
Returns an HTML representation of the provided Spanned text
toHtml
{ "repo_name": "shiyeling/test_import", "path": "WordPress/src/main/java/org/wordpress/android/util/WPHtml.java", "license": "gpl-2.0", "size": 43269 }
[ "android.text.Spanned" ]
import android.text.Spanned;
import android.text.*;
[ "android.text" ]
android.text;
1,887,382
public String deleteInput() { setSuccessMessage(ProtExpressRegistry.getApplicationResourceBundle().getString("input.delete.success")); // If not an output of any other protocol application, can be deleted directly. // If an output of a previous protocol application, only the association s...
String function() { setSuccessMessage(ProtExpressRegistry.getApplicationResourceBundle().getString(STR)); if (getInputOutputObject().getOutputOfProtocolApplication() != null) { getInputOutputObject().setInputToProtocolApplication(null); ProtExpressRegistry.getProtExpressService().saveOrUpdate(getInputOutputObject()); }...
/** * Deletes the input data. * * @return the directive for the next action / page to be directed to */
Deletes the input data
deleteInput
{ "repo_name": "NCIP/prot-express", "path": "software/src/main/java/gov/nih/nci/protexpress/ui/actions/experiment/viewedit/InputOutputDetailsAction.java", "license": "bsd-3-clause", "size": 5375 }
[ "gov.nih.nci.protexpress.ProtExpressRegistry" ]
import gov.nih.nci.protexpress.ProtExpressRegistry;
import gov.nih.nci.protexpress.*;
[ "gov.nih.nci" ]
gov.nih.nci;
2,369,906
@DebugLog private static boolean verifyPermissions(Activity activity) { // Check if we have write permission int write_permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); int read_persmission = ActivityCompat.checkSelfPermission(activity...
static boolean function(Activity activity) { int write_permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); int read_persmission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); int camera_permission = ActivityCompat.checkSelfP...
/** * Checks if the app has permission to write to device storage or open camera * If the app does not has permission then the user will be prompted to grant permissions * * @param activity */
Checks if the app has permission to write to device storage or open camera If the app does not has permission then the user will be prompted to grant permissions
verifyPermissions
{ "repo_name": "hgs6424/Customicon", "path": "app/src/main/java/com/tzutalin/customicon/MainActivity.java", "license": "apache-2.0", "size": 16741 }
[ "android.app.Activity", "android.content.pm.PackageManager", "android.support.v4.app.ActivityCompat" ]
import android.app.Activity; import android.content.pm.PackageManager; import android.support.v4.app.ActivityCompat;
import android.app.*; import android.content.pm.*; import android.support.v4.app.*;
[ "android.app", "android.content", "android.support" ]
android.app; android.content; android.support;
2,722,483
@Test public void updateRuleViolationsTest() throws Exception { final RulesManager rulesManager = Mockito.mock(RulesManager.class); final JobContextHolderImpl jobContextHolderImpl = new JobContextHolderImpl(null,null,null,rulesManager); jobContextHolderImpl.updateRuleViolations(); Mockito.verify(rulesManage...
void function() throws Exception { final RulesManager rulesManager = Mockito.mock(RulesManager.class); final JobContextHolderImpl jobContextHolderImpl = new JobContextHolderImpl(null,null,null,rulesManager); jobContextHolderImpl.updateRuleViolations(); Mockito.verify(rulesManager,Mockito.only()).processService(); }
/** * Update rule violations test. * * @throws Exception the exception */
Update rule violations test
updateRuleViolationsTest
{ "repo_name": "Hack23/cia", "path": "service.impl/src/test/java/com/hack23/cia/service/impl/task/JobContextHolderImplTest.java", "license": "apache-2.0", "size": 2806 }
[ "com.hack23.cia.service.impl.rules.RulesManager", "org.mockito.Mockito" ]
import com.hack23.cia.service.impl.rules.RulesManager; import org.mockito.Mockito;
import com.hack23.cia.service.impl.rules.*; import org.mockito.*;
[ "com.hack23.cia", "org.mockito" ]
com.hack23.cia; org.mockito;
2,386,320
@ServiceMethod(returns = ReturnType.SINGLE) ReplicationInner update( String resourceGroupName, String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters);
@ServiceMethod(returns = ReturnType.SINGLE) ReplicationInner update( String resourceGroupName, String registryName, String replicationName, ReplicationUpdateParameters replicationUpdateParameters);
/** * Updates a replication for a container registry with the specified parameters. * * @param resourceGroupName The name of the resource group to which the container registry belongs. * @param registryName The name of the container registry. * @param replicationName The name of the replication...
Updates a replication for a container registry with the specified parameters
update
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/ReplicationsClient.java", "license": "mit", "size": 27653 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.containerregistry.fluent.models.ReplicationInner", "com.azure.resourcemanager.containerregistry.models.ReplicationUpdateParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.containerregistry.fluent.models.ReplicationInner; import com.azure.resourcemanager.containerregistry.models.ReplicationUpdateParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.containerregistry.fluent.models.*; import com.azure.resourcemanager.containerregistry.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,535,599
public Iterable<Statement> getStatements(Resource theSubject, IRI thePredicate, Value theObject) throws DataSourceException;
Iterable<Statement> function(Resource theSubject, IRI thePredicate, Value theObject) throws DataSourceException;
/** * Returns all the statements with the given subject, predicate, and object. Null parameters represent wildcards. * * @param theSubject the subject to match, or null for a wildcard * @param thePredicate the predicate to match, or null for a wildcard * @param theObject the object to match, or null for a wi...
Returns all the statements with the given subject, predicate, and object. Null parameters represent wildcards
getStatements
{ "repo_name": "mhgrove/Empire", "path": "core/main/src/com/clarkparsia/empire/ds/TripleSource.java", "license": "apache-2.0", "size": 2753 }
[ "org.openrdf.model.Resource", "org.openrdf.model.Statement", "org.openrdf.model.Value" ]
import org.openrdf.model.Resource; import org.openrdf.model.Statement; import org.openrdf.model.Value;
import org.openrdf.model.*;
[ "org.openrdf.model" ]
org.openrdf.model;
1,316,367
public static Stream<FilePath> collectInvalidTFVCPaths(@NotNull TFSVcs vcs, @NotNull Stream<FilePath> paths) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(vcs.getProject()); List<FilePath> mappings = vcsManager.getDirectoryMappings(vcs).stream() .map(mappin...
static Stream<FilePath> function(@NotNull TFSVcs vcs, @NotNull Stream<FilePath> paths) { ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(vcs.getProject()); List<FilePath> mappings = vcsManager.getDirectoryMappings(vcs).stream() .map(mapping -> new LocalFilePath(mapping.getDirectory(), true)) .col...
/** * Will return only invalid paths for TFVC (i.e. paths containing dollar in any component, or $tf / .tf service * directory). * <p> * Performs a quick check (without checking every VCS mapping) because we often need this in performance-sensitive * contexts. */
Will return only invalid paths for TFVC (i.e. paths containing dollar in any component, or $tf / .tf service directory). Performs a quick check (without checking every VCS mapping) because we often need this in performance-sensitive contexts
collectInvalidTFVCPaths
{ "repo_name": "Microsoft/vso-intellij", "path": "plugin/src/com/microsoft/alm/plugin/idea/tfvc/core/tfs/TFVCUtil.java", "license": "mit", "size": 5800 }
[ "com.intellij.openapi.vcs.FilePath", "com.intellij.openapi.vcs.LocalFilePath", "com.intellij.openapi.vcs.ProjectLevelVcsManager", "com.microsoft.alm.plugin.idea.tfvc.core.TFSVcs", "java.util.List", "java.util.stream.Collectors", "java.util.stream.Stream", "org.jetbrains.annotations.NotNull" ]
import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.LocalFilePath; import com.intellij.openapi.vcs.ProjectLevelVcsManager; import com.microsoft.alm.plugin.idea.tfvc.core.TFSVcs; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.jetbrains.annotati...
import com.intellij.openapi.vcs.*; import com.microsoft.alm.plugin.idea.tfvc.core.*; import java.util.*; import java.util.stream.*; import org.jetbrains.annotations.*;
[ "com.intellij.openapi", "com.microsoft.alm", "java.util", "org.jetbrains.annotations" ]
com.intellij.openapi; com.microsoft.alm; java.util; org.jetbrains.annotations;
2,527,106
public LargeFileSharesState largeFileSharesState() { return this.innerProperties() == null ? null : this.innerProperties().largeFileSharesState(); }
LargeFileSharesState function() { return this.innerProperties() == null ? null : this.innerProperties().largeFileSharesState(); }
/** * Get the largeFileSharesState property: Allow large file shares if sets to Enabled. It cannot be disabled once it * is enabled. * * @return the largeFileSharesState value. */
Get the largeFileSharesState property: Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled
largeFileSharesState
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/StorageAccountInner.java", "license": "mit", "size": 18744 }
[ "com.azure.resourcemanager.storage.models.LargeFileSharesState" ]
import com.azure.resourcemanager.storage.models.LargeFileSharesState;
import com.azure.resourcemanager.storage.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,797,176
List<T> getItems();
List<T> getItems();
/** * Get items directly form cache without subscription. Use carefully, response may be empty. */
Get items directly form cache without subscription. Use carefully, response may be empty
getItems
{ "repo_name": "Link184/Respiration", "path": "respiration-core/src/main/java/com/link184/respiration/repository/base/ListRepository.java", "license": "gpl-3.0", "size": 2806 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
148,149
public TaxaList getTaxaList();
TaxaList function();
/** * Return taxa list of this alignment. * * @return taxa list. */
Return taxa list of this alignment
getTaxaList
{ "repo_name": "yzhnasa/TASSEL-iRods", "path": "src/net/maizegenetics/dna/tag/TagsByTaxa.java", "license": "mit", "size": 4080 }
[ "net.maizegenetics.taxa.TaxaList" ]
import net.maizegenetics.taxa.TaxaList;
import net.maizegenetics.taxa.*;
[ "net.maizegenetics.taxa" ]
net.maizegenetics.taxa;
939,796
public static String getRescheduleAction(Context context) { return getPackageQualifiedAction(context, "RESCHEDULE_CHECKS"); }
static String function(Context context) { return getPackageQualifiedAction(context, STR); }
/** * The action of an {@link Intent} that (in this context) will trigger a * {@link VeecheckReceiver } to reschedule period checks for new application * versions. */
The action of an <code>Intent</code> that (in this context) will trigger a <code>VeecheckReceiver </code> to reschedule period checks for new application versions
getRescheduleAction
{ "repo_name": "makiaea/Anki-Android", "path": "src/com/tomgibara/android/veecheck/Veecheck.java", "license": "gpl-3.0", "size": 2150 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,513,740
public void compact() { ConstPool cp = compact0(); ArrayList list = methods; int n = list.size(); for (int i = 0; i < n; ++i) { MethodInfo minfo = (MethodInfo)list.get(i); minfo.compact(cp); } list = fields; n = list.size(); fo...
void function() { ConstPool cp = compact0(); ArrayList list = methods; int n = list.size(); for (int i = 0; i < n; ++i) { MethodInfo minfo = (MethodInfo)list.get(i); minfo.compact(cp); } list = fields; n = list.size(); for (int i = 0; i < n; ++i) { FieldInfo finfo = (FieldInfo)list.get(i); finfo.compact(cp); } attribut...
/** * Eliminates dead constant pool items. If a method or a field is removed, * the constant pool items used by that method/field become dead items. This * method recreates a constant pool. */
Eliminates dead constant pool items. If a method or a field is removed, the constant pool items used by that method/field become dead items. This method recreates a constant pool
compact
{ "repo_name": "oneliang/third-party-lib", "path": "javassist/javassist/bytecode/ClassFile.java", "license": "apache-2.0", "size": 26958 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,254,963
@Nonnull public DeviceCompliancePolicyAssignCollectionRequest expand(@Nonnull final String value) { addExpandOption(value); return this; }
DeviceCompliancePolicyAssignCollectionRequest function(@Nonnull final String value) { addExpandOption(value); return this; }
/** * Sets the expand clause for the request * * @param value the expand clause * @return the updated request */
Sets the expand clause for the request
expand
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/DeviceCompliancePolicyAssignCollectionRequest.java", "license": "mit", "size": 5106 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
644,151
public HashMap getActualDailyHours() { return actualDailyHours; }
HashMap function() { return actualDailyHours; }
/** * Gets the actualDailyHours attribute of the AssignmentProjectAllocation * object * * @return The actualDailyHours value */
Gets the actualDailyHours attribute of the AssignmentProjectAllocation object
getActualDailyHours
{ "repo_name": "yukoff/concourse-connect", "path": "src/main/java/com/concursive/connect/web/modules/plans/dao/AssignmentProjectAllocation.java", "license": "agpl-3.0", "size": 7453 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,418,041
public void testBookMatrixCompressionA() throws Exception { double[][] values = new double[][] { { 1.0 , -1.0 , 1.0 , 0.0}, { 0.0 , -1.0 , 0.0 , 1.0} }; boolean[] reversible = new boolean[] { true, false, false, false }; // String[] metaNames = new String[] {"A", "B", "C", "D", "E", "P"}; //...
void function() throws Exception { double[][] values = new double[][] { { 1.0 , -1.0 , 1.0 , 0.0}, { 0.0 , -1.0 , 0.0 , 1.0} }; boolean[] reversible = new boolean[] { true, false, false, false }; String[] metaNames = new String[] {"C", "D"}; String[] reacNames = new String[] {"R8", "R10", "R6", "R7"}; MetabolicNetwork ...
/** * The sample of the "System Modeling in Cellular Biology" book, * pre-compressed */
The sample of the "System Modeling in Cellular Biology" book, pre-compressed
testBookMatrixCompressionA
{ "repo_name": "mpgerstl/tEFMA", "path": "ch/javasoft/metabolic/parse/SmallTest.java", "license": "bsd-2-clause", "size": 11022 }
[ "ch.javasoft.metabolic.MetabolicNetwork", "ch.javasoft.metabolic.impl.DefaultMetabolicNetwork" ]
import ch.javasoft.metabolic.MetabolicNetwork; import ch.javasoft.metabolic.impl.DefaultMetabolicNetwork;
import ch.javasoft.metabolic.*; import ch.javasoft.metabolic.impl.*;
[ "ch.javasoft.metabolic" ]
ch.javasoft.metabolic;
289,763
public HandlerRegistration addBodyDoubleClickHandler( BodyDoubleClickHandler handler) { return addHandler(handler, doubleClickEvent.getAssociatedType()); }
HandlerRegistration function( BodyDoubleClickHandler handler) { return addHandler(handler, doubleClickEvent.getAssociatedType()); }
/** * Register a BodyDoubleClickHandler to this Grid. The event for this * handler is fired when a double click event occurs in the Body of this * Grid. * * @param handler * the double click handler to register * @return the registration for the event */
Register a BodyDoubleClickHandler to this Grid. The event for this handler is fired when a double click event occurs in the Body of this Grid
addBodyDoubleClickHandler
{ "repo_name": "fireflyc/vaadin", "path": "client/src/com/vaadin/client/widgets/Grid.java", "license": "apache-2.0", "size": 285073 }
[ "com.google.gwt.event.shared.HandlerRegistration", "com.vaadin.client.widget.grid.events.BodyDoubleClickHandler" ]
import com.google.gwt.event.shared.HandlerRegistration; import com.vaadin.client.widget.grid.events.BodyDoubleClickHandler;
import com.google.gwt.event.shared.*; import com.vaadin.client.widget.grid.events.*;
[ "com.google.gwt", "com.vaadin.client" ]
com.google.gwt; com.vaadin.client;
2,150
public void endEntity(String name) throws SAXException { // no op }
void function(String name) throws SAXException { }
/** * Report the end of an entity. * * @param name The name of the entity that is ending. * @throws SAXException The application may raise an exception. * @see #startEntity */
Report the end of an entity
endEntity
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java", "license": "gpl-2.0", "size": 78612 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
357,072
@GwtCompatible(serializable = true) @SuppressWarnings("unchecked") // TODO(kevinb): right way to explain this?? public static <C extends Comparable> Ordering<C> natural() { return (Ordering<C>) NaturalOrdering.INSTANCE; } // Static factories /** * Returns an ordering based on an <i>existing</i> com...
@GwtCompatible(serializable = true) @SuppressWarnings(STR) static <C extends Comparable> Ordering<C> function() { return (Ordering<C>) NaturalOrdering.INSTANCE; } /** * Returns an ordering based on an <i>existing</i> comparator instance. Note that it is * unnecessary to create a <i>new</i> anonymous inner class impleme...
/** * Returns a serializable ordering that uses the natural order of the values. The ordering throws * a {@link NullPointerException} when passed a null parameter. * * <p>The type specification is {@code <C extends Comparable>}, instead of the technically correct * {@code <C extends Comparable<? super C>...
Returns a serializable ordering that uses the natural order of the values. The ordering throws a <code>NullPointerException</code> when passed a null parameter. The type specification is , instead of the technically correct >, to support legacy types from before Java 5. Java 8 users: use <code>Comparator#naturalOrder</...
natural
{ "repo_name": "migue/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/collect/Ordering.java", "license": "agpl-3.0", "size": 40399 }
[ "com.google_voltpatches.common.annotations.GwtCompatible", "java.util.Comparator" ]
import com.google_voltpatches.common.annotations.GwtCompatible; import java.util.Comparator;
import com.google_voltpatches.common.annotations.*; import java.util.*;
[ "com.google_voltpatches.common", "java.util" ]
com.google_voltpatches.common; java.util;
2,126,610
public static BuildConfigurationKey withPlatformMapping( PlatformMappingValue platformMappingValue, FragmentClassSet fragments, BuildOptions options) throws OptionsParsingException { return platformMappingValue.map(withoutPlatformMapping(fragments, options)); }
static BuildConfigurationKey function( PlatformMappingValue platformMappingValue, FragmentClassSet fragments, BuildOptions options) throws OptionsParsingException { return platformMappingValue.map(withoutPlatformMapping(fragments, options)); }
/** * Creates a new configuration key based on the given options, after applying a platform mapping * transformation. * * @param platformMappingValue sky value that can transform a configuration key based on a * platform mapping * @param fragments set of options fragments this configuration should...
Creates a new configuration key based on the given options, after applying a platform mapping transformation
withPlatformMapping
{ "repo_name": "perezd/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/BuildConfigurationKey.java", "license": "apache-2.0", "size": 6004 }
[ "com.google.devtools.build.lib.analysis.config.BuildOptions", "com.google.devtools.build.lib.analysis.config.FragmentClassSet", "com.google.devtools.common.options.OptionsParsingException" ]
import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.analysis.config.FragmentClassSet; import com.google.devtools.common.options.OptionsParsingException;
import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.common.options.*;
[ "com.google.devtools" ]
com.google.devtools;
1,586,286
public static void createDirIfNotExists(File dir) throws IOException { if (!dir.exists() && !dir.mkdirs()) { throw new IOException("Unable to create directory: " + dir.toString()); } }
static void function(File dir) throws IOException { if (!dir.exists() && !dir.mkdirs()) { throw new IOException(STR + dir.toString()); } }
/** * Creates a directory if it doesn't exist yet. * * @param dir The directory to create. * @throws IOException If the creation of the directory failed. */
Creates a directory if it doesn't exist yet
createDirIfNotExists
{ "repo_name": "kmi/msm4j", "path": "msm4j-io/src/main/java/uk/ac/open/kmi/msm4j/io/util/FileUtil.java", "license": "apache-2.0", "size": 12549 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
896,118
default boolean supports(final File file) { return true; }
default boolean supports(final File file) { return true; }
/** * Supports the input stream for serialization? * * @param file the file * @return true /false */
Supports the input stream for serialization
supports
{ "repo_name": "leleuj/cas", "path": "api/cas-server-core-api-util/src/main/java/org/apereo/cas/util/serialization/StringSerializer.java", "license": "apache-2.0", "size": 3763 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,036,221
public static boolean isAddToHomeIntentSupported(Context context) { PackageManager pm = context.getPackageManager(); Intent i = new Intent(INSTALL_SHORTCUT); List<ResolveInfo> receivers = pm.queryBroadcastReceivers( i, PackageManager.GET_INTENT_FILTERS); return !recei...
static boolean function(Context context) { PackageManager pm = context.getPackageManager(); Intent i = new Intent(INSTALL_SHORTCUT); List<ResolveInfo> receivers = pm.queryBroadcastReceivers( i, PackageManager.GET_INTENT_FILTERS); return !receivers.isEmpty(); }
/** * Utility method to check if a shortcut can be added to the homescreen. * @param context Context used to get the package manager. * @return if a shortcut can be added to the homescreen under the current profile. */
Utility method to check if a shortcut can be added to the homescreen
isAddToHomeIntentSupported
{ "repo_name": "vadimtk/chrome4sdp", "path": "chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java", "license": "bsd-3-clause", "size": 15801 }
[ "android.content.Context", "android.content.Intent", "android.content.pm.PackageManager", "android.content.pm.ResolveInfo", "java.util.List" ]
import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import java.util.List;
import android.content.*; import android.content.pm.*; import java.util.*;
[ "android.content", "java.util" ]
android.content; java.util;
1,596,370
protected Collection<CacheTypeFieldMetadata> valueColumns() { return typeMeta.getValueFields(); }
Collection<CacheTypeFieldMetadata> function() { return typeMeta.getValueFields(); }
/** * Gets value columns. * * @return Value columns. */
Gets value columns
valueColumns
{ "repo_name": "vsisko/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheAbstractJdbcStore.java", "license": "apache-2.0", "size": 62015 }
[ "java.util.Collection", "org.apache.ignite.cache.CacheTypeFieldMetadata" ]
import java.util.Collection; import org.apache.ignite.cache.CacheTypeFieldMetadata;
import java.util.*; import org.apache.ignite.cache.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,285,167
public static TracksChooserDialog newInstance(MediaInfo mediaInfo) { TracksChooserDialog fragment = new TracksChooserDialog(); Bundle bundle = new Bundle(); bundle.putBundle(VideoCastManager.EXTRA_MEDIA, Utils.mediaInfoToBundle(mediaInfo)); fragment.setArguments(bundle); retu...
static TracksChooserDialog function(MediaInfo mediaInfo) { TracksChooserDialog fragment = new TracksChooserDialog(); Bundle bundle = new Bundle(); bundle.putBundle(VideoCastManager.EXTRA_MEDIA, Utils.mediaInfoToBundle(mediaInfo)); fragment.setArguments(bundle); return fragment; }
/** * Call this static method to create a new instance of the dialog. */
Call this static method to create a new instance of the dialog
newInstance
{ "repo_name": "TeamEOS/gradle_Jive", "path": "CastCompanionLibrary/src/com/google/android/libraries/cast/companionlibrary/cast/tracks/ui/TracksChooserDialog.java", "license": "apache-2.0", "size": 9443 }
[ "android.os.Bundle", "com.google.android.gms.cast.MediaInfo", "com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager", "com.google.android.libraries.cast.companionlibrary.utils.Utils" ]
import android.os.Bundle; import com.google.android.gms.cast.MediaInfo; import com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager; import com.google.android.libraries.cast.companionlibrary.utils.Utils;
import android.os.*; import com.google.android.gms.cast.*; import com.google.android.libraries.cast.companionlibrary.cast.*; import com.google.android.libraries.cast.companionlibrary.utils.*;
[ "android.os", "com.google.android" ]
android.os; com.google.android;
84,467
@Test void testFilterClauseSameAsOuterFilterGone() { // Logically equivalent to // select sum("store_sales") from "foodmart" where "store_city" = 'Seattle' String sql = "select sum(\"store_sales\") filter (where \"store_city\" = 'Seattle') " + "from \"foodmart\" where \"store_city\" = 'Seattle'"; ...
@Test void testFilterClauseSameAsOuterFilterGone() { String sql = STRstore_sales\STRstore_city\STR + STRfoodmart\STRstore_city\STR; String expectedQuery = STR + STR + STR + STR + STR; sql(sql) .queryContains(new DruidChecker(expectedQuery)) .returnsUnordered(STR); }
/** Tests that an aggregate with a filter clause that is the same as the * outer filter has no references to that filter, and that the original outer * filter remains. */
Tests that an aggregate with a filter clause that is the same as the outer filter has no references to that filter, and that the original outer
testFilterClauseSameAsOuterFilterGone
{ "repo_name": "datametica/calcite", "path": "druid/src/test/java/org/apache/calcite/test/DruidAdapter2IT.java", "license": "apache-2.0", "size": 201561 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
102,684
public void showDetails(WifiP2pDevice device) { this.device = device; this.getView().setVisibility(View.VISIBLE); TextView view = (TextView) mContentView.findViewById(R.id.device_address); view.setText(device.deviceAddress); view = (TextView) mContentView.findViewById(R.id.de...
void function(WifiP2pDevice device) { this.device = device; this.getView().setVisibility(View.VISIBLE); TextView view = (TextView) mContentView.findViewById(R.id.device_address); view.setText(device.deviceAddress); view = (TextView) mContentView.findViewById(R.id.device_info); view.setText(device.toString()); }
/** * Updates the UI with device data * * @param device the device to be displayed */
Updates the UI with device data
showDetails
{ "repo_name": "AlessioPostai/P2pAndon", "path": "java/com/own/alessio/p2pandon/ConnectionDetailFragment.java", "license": "gpl-2.0", "size": 6964 }
[ "android.net.wifi.p2p.WifiP2pDevice", "android.view.View", "android.widget.TextView" ]
import android.net.wifi.p2p.WifiP2pDevice; import android.view.View; import android.widget.TextView;
import android.net.wifi.p2p.*; import android.view.*; import android.widget.*;
[ "android.net", "android.view", "android.widget" ]
android.net; android.view; android.widget;
835,680
private void setupDatabase(String namespace, String dataProviderName, String businessObjectDefinitionName, String fileTypeCode, String businessObjectFormatUsage, Integer businessObjectFormatVersion, Integer businessObjectDataVersion, String partitionKey, String[] partitionValues) { DataProviderE...
void function(String namespace, String dataProviderName, String businessObjectDefinitionName, String fileTypeCode, String businessObjectFormatUsage, Integer businessObjectFormatVersion, Integer businessObjectDataVersion, String partitionKey, String[] partitionValues) { DataProviderEntity dataProviderEntity = new DataPr...
/** * Inserts a business object data and their FK relationships into the database. * * @param dataProviderName the data provider name. * @param businessObjectDefinitionName the business object definition name. * @param fileTypeCode the file type code. * @param businessObjectFormatUsage the...
Inserts a business object data and their FK relationships into the database
setupDatabase
{ "repo_name": "FINRAOS/herd", "path": "herd-code/herd-service/src/test/java/org/finra/herd/service/activiti/task/GetBusinessObjectDataTest.java", "license": "apache-2.0", "size": 55269 }
[ "java.util.ArrayList", "java.util.Collection", "org.finra.herd.model.jpa.BusinessObjectDataEntity", "org.finra.herd.model.jpa.BusinessObjectDataStatusEntity", "org.finra.herd.model.jpa.BusinessObjectDefinitionEntity", "org.finra.herd.model.jpa.BusinessObjectFormatEntity", "org.finra.herd.model.jpa.DataP...
import java.util.ArrayList; import java.util.Collection; import org.finra.herd.model.jpa.BusinessObjectDataEntity; import org.finra.herd.model.jpa.BusinessObjectDataStatusEntity; import org.finra.herd.model.jpa.BusinessObjectDefinitionEntity; import org.finra.herd.model.jpa.BusinessObjectFormatEntity; import org.finra....
import java.util.*; import org.finra.herd.model.jpa.*;
[ "java.util", "org.finra.herd" ]
java.util; org.finra.herd;
1,689,308
void init(String log_name, Map<String,String> args) throws Exception;
void init(String log_name, Map<String,String> args) throws Exception;
/** Called after the instance has been created * @param log_name The name of the log. Implementations can create a DB or file named after this, e.g. * /tmp/<log_name></log_name>.log * @param args A hashmap of configuration information (impl-dependent) to configure itself. May be null ...
Called after the instance has been created
init
{ "repo_name": "ligzy/jgroups-raft", "path": "src/org/jgroups/protocols/raft/Log.java", "license": "apache-2.0", "size": 4044 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,357,487
@SuppressWarnings("unchecked") @VisibleForTesting void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp = rmContext.getRMApps().get(appAttemptId.getApplica...
@SuppressWarnings(STR) void handleNMContainerStatus(NMContainerStatus containerStatus, NodeId nodeId) { ApplicationAttemptId appAttemptId = containerStatus.getContainerId().getApplicationAttemptId(); RMApp rmApp = rmContext.getRMApps().get(appAttemptId.getApplicationId()); if (rmApp == null) { LOG.error(STR + container...
/** * Helper method to handle received ContainerStatus. If this corresponds to * the completion of a master-container of a managed AM, * we call the handler for RMAppAttemptContainerFinishedEvent. */
Helper method to handle received ContainerStatus. If this corresponds to the completion of a master-container of a managed AM, we call the handler for RMAppAttemptContainerFinishedEvent
handleNMContainerStatus
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java", "license": "apache-2.0", "size": 37143 }
[ "org.apache.hadoop.yarn.api.records.ApplicationAttemptId", "org.apache.hadoop.yarn.api.records.Container", "org.apache.hadoop.yarn.api.records.ContainerState", "org.apache.hadoop.yarn.api.records.ContainerStatus", "org.apache.hadoop.yarn.api.records.NodeId", "org.apache.hadoop.yarn.server.api.protocolreco...
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId; import org.apache.hadoop.yarn.api.records.Container; import org.apache.hadoop.yarn.api.records.ContainerState; import org.apache.hadoop.yarn.api.records.ContainerStatus; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.server...
import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.api.protocolrecords.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.*; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.event.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
657,846
private int getContactType(String string) { int type = ContactsContract.CommonDataKinds.Email.TYPE_OTHER; if (string!=null) { if ("home".equals(string.toLowerCase())) { return ContactsContract.CommonDataKinds.Email.TYPE_HOME; } else if ("work".equa...
int function(String string) { int type = ContactsContract.CommonDataKinds.Email.TYPE_OTHER; if (string!=null) { if ("home".equals(string.toLowerCase())) { return ContactsContract.CommonDataKinds.Email.TYPE_HOME; } else if ("work".equals(string.toLowerCase())) { return ContactsContract.CommonDataKinds.Email.TYPE_WORK; }...
/** * Converts a string from the W3C Contact API to it's Android int value. * @param string * @return Android int value */
Converts a string from the W3C Contact API to it's Android int value
getContactType
{ "repo_name": "justsml/cordova-android", "path": "framework/src/org/apache/cordova/ContactAccessorSdk5.java", "license": "apache-2.0", "size": 84647 }
[ "android.provider.ContactsContract" ]
import android.provider.ContactsContract;
import android.provider.*;
[ "android.provider" ]
android.provider;
2,481,058
@Test(timeout=100000) public void testBalancerCliParseWithWrongParams() { String parameters[] = new String[] { "-threshold" }; String reason = "IllegalArgumentException is expected when value is not specified"; try { Balancer.Cli.parse(parameters); fail(reason); } catch (IllegalA...
@Test(timeout=100000) void function() { String parameters[] = new String[] { STR }; String reason = STR; try { Balancer.Cli.parse(parameters); fail(reason); } catch (IllegalArgumentException e) { } parameters = new String[] { STR }; try { Balancer.Cli.parse(parameters); fail(reason); } catch (IllegalArgumentException e...
/** * Test parse method in Balancer#Cli class with wrong number of params */
Test parse method in Balancer#Cli class with wrong number of params
testBalancerCliParseWithWrongParams
{ "repo_name": "dilaver/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java", "license": "apache-2.0", "size": 58618 }
[ "org.apache.hadoop.hdfs.server.balancer.Balancer", "org.junit.Assert", "org.junit.Test" ]
import org.apache.hadoop.hdfs.server.balancer.Balancer; import org.junit.Assert; import org.junit.Test;
import org.apache.hadoop.hdfs.server.balancer.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
1,426,525
public void error(Throwable throwable, String msg, Object arg0, Object arg1) { logIfEnabled(Level.ERROR, throwable, msg, arg0, arg1, UNKNOWN_ARG, null); }
void function(Throwable throwable, String msg, Object arg0, Object arg1) { logIfEnabled(Level.ERROR, throwable, msg, arg0, arg1, UNKNOWN_ARG, null); }
/** * Log a error message with a throwable. */
Log a error message with a throwable
error
{ "repo_name": "yswang0927/simplemagic", "path": "src/main/java/com/j256/simplemagic/logger/Logger.java", "license": "isc", "size": 17390 }
[ "com.j256.simplemagic.logger.Log" ]
import com.j256.simplemagic.logger.Log;
import com.j256.simplemagic.logger.*;
[ "com.j256.simplemagic" ]
com.j256.simplemagic;
1,787,156
EAttribute getProcessingUnit_Operators();
EAttribute getProcessingUnit_Operators();
/** * Returns the meta object for the attribute list '{@link turnus.model.architecture.ProcessingUnit#getOperators <em>Operators</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute list '<em>Operators</em>'. * @see turnus.model.architecture.ProcessingUnit#getO...
Returns the meta object for the attribute list '<code>turnus.model.architecture.ProcessingUnit#getOperators Operators</code>'.
getProcessingUnit_Operators
{ "repo_name": "turnus/turnus", "path": "turnus.model/src/turnus/model/architecture/ArchitecturePackage.java", "license": "gpl-3.0", "size": 44474 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,873,950
public boolean hasInput() { if (new File(this.args[0]).exists()) { this.fInput = new File(this.args[0]); return true; } else if (new File(DirectoryStructure.sActivePath() + File.separator + this.args[0]).exists()) { this.fInput = new File(DirectoryStructure.sActivePath() + File.separator + this.args[...
boolean function() { if (new File(this.args[0]).exists()) { this.fInput = new File(this.args[0]); return true; } else if (new File(DirectoryStructure.sActivePath() + File.separator + this.args[0]).exists()) { this.fInput = new File(DirectoryStructure.sActivePath() + File.separator + this.args[0]); return true; } return...
/** * Check if argument is valid, if any * @return boolean */
Check if argument is valid, if any
hasInput
{ "repo_name": "Comcast/Oscar", "path": "src/com/comcast/oscar/cli/commands/Input.java", "license": "apache-2.0", "size": 2480 }
[ "com.comcast.oscar.utilities.DirectoryStructure", "java.io.File" ]
import com.comcast.oscar.utilities.DirectoryStructure; import java.io.File;
import com.comcast.oscar.utilities.*; import java.io.*;
[ "com.comcast.oscar", "java.io" ]
com.comcast.oscar; java.io;
2,546,214
public WordIterator getWordIterator() { if (mEditor != null) { return mEditor.getWordIterator(); } else { return null; } }
WordIterator function() { if (mEditor != null) { return mEditor.getWordIterator(); } else { return null; } }
/** * This method is used by the ArrowKeyMovementMethod to jump from one word to the other. * Made available to achieve a consistent behavior. * * @hide */
This method is used by the ArrowKeyMovementMethod to jump from one word to the other. Made available to achieve a consistent behavior
getWordIterator
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/widget/TextView.java", "license": "apache-2.0", "size": 271830 }
[ "android.text.method.WordIterator" ]
import android.text.method.WordIterator;
import android.text.method.*;
[ "android.text" ]
android.text;
31,471
public static CronDefinition instanceDefinitionFor(CronType cronType){ switch (cronType){ case CRON4J: return cron4j(); case QUARTZ: return quartz(); case UNIX: return unixCrontab(); default: thro...
static CronDefinition function(CronType cronType){ switch (cronType){ case CRON4J: return cron4j(); case QUARTZ: return quartz(); case UNIX: return unixCrontab(); default: throw new RuntimeException(String.format(STR, cronType)); } }
/** * Creates CronDefinition instance matching cronType specification; * @param cronType - some cron type. If null, a RuntimeException will be raised. * @return CronDefinition instance if definition is found; a RuntimeException otherwise. */
Creates CronDefinition instance matching cronType specification
instanceDefinitionFor
{ "repo_name": "ucpwang/cron-utils", "path": "src/main/java/com/cronutils/model/definition/CronDefinitionBuilder.java", "license": "apache-2.0", "size": 6682 }
[ "com.cronutils.model.CronType" ]
import com.cronutils.model.CronType;
import com.cronutils.model.*;
[ "com.cronutils.model" ]
com.cronutils.model;
1,792,419
public MethodParameter arg(Class<?> type, Class<?>... generics) { return arg(toResolvableType(type, generics)); }
MethodParameter function(Class<?> type, Class<?>... generics) { return arg(toResolvableType(type, generics)); }
/** * Resolve the argument also matching to the given type. * @param type the expected type */
Resolve the argument also matching to the given type
arg
{ "repo_name": "pwheel/spring-security", "path": "webflux/src/test/java/org/springframework/security/web/method/ResolvableMethod.java", "license": "apache-2.0", "size": 21021 }
[ "org.springframework.core.MethodParameter" ]
import org.springframework.core.MethodParameter;
import org.springframework.core.*;
[ "org.springframework.core" ]
org.springframework.core;
1,127,261
private DictionaryNamespace parseDictionaryNamespace(Matcher m) throws IOException { // If RegEx does not match, the line is illegal. Cancel operation! if(!m.matches()) { throw new IOException("Source file contains illegal line"); } // If first group does not equal "n" this line cannot be parsed as names...
DictionaryNamespace function(Matcher m) throws IOException { if(!m.matches()) { throw new IOException(STR); } if(!m.group(1).equals("n")) { throw new IOException(STR + m.group(1)); } DataItem cborName = createCborDataItem(m.group(3), m.group(4)); DictionaryNamespace rv = new DictionaryNamespace(m.group(2), cborName); i...
/** * Parse a line containing a namespace dictionary definition. * Such a line must begin with <pre>n'</pre> to be parsed. The returned namespace entry * will contain any nested element that is defined by the description. * * @param m RegEx Matcher filled with the source line to parse * @return Namespace di...
Parse a line containing a namespace dictionary definition. Such a line must begin with <code>n'</code> to be parsed. The returned namespace entry will contain any nested element that is defined by the description
parseDictionaryNamespace
{ "repo_name": "decoit/cbor-xml-dictionary", "path": "src/main/java/de/decoit/simu/cbor/xml/dictionary/parser/DictionaryParser.java", "license": "apache-2.0", "size": 15561 }
[ "co.nstant.in.cbor.model.DataItem", "de.decoit.simu.cbor.xml.dictionary.DictionaryNamespace", "de.decoit.simu.cbor.xml.dictionary.DictionarySimpleElement", "java.io.IOException", "java.util.regex.Matcher" ]
import co.nstant.in.cbor.model.DataItem; import de.decoit.simu.cbor.xml.dictionary.DictionaryNamespace; import de.decoit.simu.cbor.xml.dictionary.DictionarySimpleElement; import java.io.IOException; import java.util.regex.Matcher;
import co.nstant.in.cbor.model.*; import de.decoit.simu.cbor.xml.dictionary.*; import java.io.*; import java.util.regex.*;
[ "co.nstant.in", "de.decoit.simu", "java.io", "java.util" ]
co.nstant.in; de.decoit.simu; java.io; java.util;
2,038,177
public BulkIndexByScrollResponseMatcher failures(Matcher<Integer> failuresMatcher) { this.failuresMatcher = failuresMatcher; return this; }
BulkIndexByScrollResponseMatcher function(Matcher<Integer> failuresMatcher) { this.failuresMatcher = failuresMatcher; return this; }
/** * Set the matcher for the size of the failures list. For more in depth * matching do it by hand. The type signatures required to match the * actual failures list here just don't work. */
Set the matcher for the size of the failures list. For more in depth matching do it by hand. The type signatures required to match the actual failures list here just don't work
failures
{ "repo_name": "GlenRSmith/elasticsearch", "path": "modules/reindex/src/test/java/org/elasticsearch/reindex/BulkIndexByScrollResponseMatcher.java", "license": "apache-2.0", "size": 5811 }
[ "org.hamcrest.Matcher" ]
import org.hamcrest.Matcher;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
2,902,186
public boolean serverSupportsFeature(String feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return supportsFeature(connection().getXMPPServiceDomain(), feature); }
boolean function(String feature) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return supportsFeature(connection().getXMPPServiceDomain(), feature); }
/** * Returns true if the server supports the given feature. * * @param feature * @return true if the server supports the given feature. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @since 4.1 ...
Returns true if the server supports the given feature
serverSupportsFeature
{ "repo_name": "u20024804/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/disco/ServiceDiscoveryManager.java", "license": "apache-2.0", "size": 35980 }
[ "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException" ]
import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
2,246,589
public static void verifyFilePermission(FileStatus stat, String owner, String group, FsAction u, FsAction g, FsAction o) { if(stat != null) { if(!Strings.isNullOrEmpty(owner)) { assertEquals(owner, stat.getOwner()); } if(!Strings.isNullOrEmpty(group)) { assertEquals(group, ...
static void function(FileStatus stat, String owner, String group, FsAction u, FsAction g, FsAction o) { if(stat != null) { if(!Strings.isNullOrEmpty(owner)) { assertEquals(owner, stat.getOwner()); } if(!Strings.isNullOrEmpty(group)) { assertEquals(group, stat.getGroup()); } FsPermission permission = stat.getPermission(...
/** * Test if the given {@link FileStatus} user, group owner and its permission * are expected, throw {@link AssertionError} if any value is not expected. */
Test if the given <code>FileStatus</code> user, group owner and its permission are expected, throw <code>AssertionError</code> if any value is not expected
verifyFilePermission
{ "repo_name": "steveloughran/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java", "license": "apache-2.0", "size": 99459 }
[ "com.google.common.base.Strings", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.permission.FsAction", "org.apache.hadoop.fs.permission.FsPermission", "org.junit.Assert" ]
import com.google.common.base.Strings; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.permission.FsAction; import org.apache.hadoop.fs.permission.FsPermission; import org.junit.Assert;
import com.google.common.base.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.junit.*;
[ "com.google.common", "org.apache.hadoop", "org.junit" ]
com.google.common; org.apache.hadoop; org.junit;
949,120
@Headers("Cache-header:public,max-age:3600") @GET("/repos/{userlogin}/{reponame}/issues?sort=updated") Observable<Response<ArrayList<Issue>>> issues(@Path("userlogin")String userlogin, @Path("reponame")String reponame, @QueryMap Map<String,String> filter, @Qu...
@Headers(STR) @GET(STR) Observable<Response<ArrayList<Issue>>> issues(@Path(STR)String userlogin, @Path(STR)String reponame, @QueryMap Map<String,String> filter, @Query("page")int page);
/** * state : Can be either open, closed, or all. Default: open * @param userlogin * @param reponame * @param filter * @param page * @return */
state : Can be either open, closed, or all. Default: open
issues
{ "repo_name": "jbm714060/Github", "path": "app2/src/main/java/com/bmj/greader/data/net/services/IssueService.java", "license": "apache-2.0", "size": 2217 }
[ "com.bmj.greader.data.model.issue.Issue", "java.util.ArrayList", "java.util.Map" ]
import com.bmj.greader.data.model.issue.Issue; import java.util.ArrayList; import java.util.Map;
import com.bmj.greader.data.model.issue.*; import java.util.*;
[ "com.bmj.greader", "java.util" ]
com.bmj.greader; java.util;
910,717
public void addToIndependentRuntimeItrMap(CompiledIteratorDef itrDef) throws TypeMismatchException, NameResolutionException { Set<RuntimeIterator> set = new HashSet<>(); computeUltimateDependencies(itrDef, set); RuntimeIterator itr = null; String rgnPath = null; // If the set is empty then a...
void function(CompiledIteratorDef itrDef) throws TypeMismatchException, NameResolutionException { Set<RuntimeIterator> set = new HashSet<>(); computeUltimateDependencies(itrDef, set); RuntimeIterator itr = null; String rgnPath = null; if (set.isEmpty()) { itr = itrDef.getRuntimeIterator(this); set.add(itr); CompiledVal...
/** * This function populates the Map itrDefToIndpndtRuntimeItrMap. It creates a Set of * RuntimeIterators to which the current CompilediteratorDef is dependent upon. Also it sets the * index_internal_id for the RuntimeIterator, which is used for calculating the canonicalized * iterator definitions for iden...
This function populates the Map itrDefToIndpndtRuntimeItrMap. It creates a Set of RuntimeIterators to which the current CompilediteratorDef is dependent upon. Also it sets the index_internal_id for the RuntimeIterator, which is used for calculating the canonicalized iterator definitions for identifying the available in...
addToIndependentRuntimeItrMap
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/ExecutionContext.java", "license": "apache-2.0", "size": 26241 }
[ "java.util.HashSet", "java.util.Set", "org.apache.geode.cache.Region", "org.apache.geode.cache.query.NameResolutionException", "org.apache.geode.cache.query.TypeMismatchException", "org.apache.geode.cache.query.internal.index.IndexManager", "org.apache.geode.cache.query.internal.index.IndexUtils", "or...
import java.util.HashSet; import java.util.Set; import org.apache.geode.cache.Region; import org.apache.geode.cache.query.NameResolutionException; import org.apache.geode.cache.query.TypeMismatchException; import org.apache.geode.cache.query.internal.index.IndexManager; import org.apache.geode.cache.query.internal.inde...
import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.index.*; import org.apache.geode.cache.query.internal.parse.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
984,300
private void readSetterConfigFile(String[] configFileNames) { XMLConfiguration xmlConfig = null; try { for (String fileName : configFileNames) { xmlConfig = new XMLConfiguration(fileName); if (xmlConfig != null) { // get all the setter nodes and iterate through them List<?> c...
void function(String[] configFileNames) { XMLConfiguration xmlConfig = null; try { for (String fileName : configFileNames) { xmlConfig = new XMLConfiguration(fileName); if (xmlConfig != null) { List<?> constructorNodes = xmlConfig.configurationsAt(STR); for (Iterator<?> it = constructorNodes.iterator(); it.hasNext();) ...
/** * Load the setter configurations from file. * * An example of the XML structure: * * <setter class="dummy.Classname"> * <argument> * <field-name>paramFieldName</field-name> * <alternative>ignore</alternative> * </argument> * <argument> * <field-name>param2FieldName</f...
Load the setter configurations from file. An example of the XML structure: paramFieldName ignore param2FieldName ignore . . . Note that the tag is currently unused, it is a placeholder for future dev is we want to substitute a setter method name
readSetterConfigFile
{ "repo_name": "davidwong/TestDataCaptureJ", "path": "src/au/com/dw/testdatacapturej/config/Configuration.java", "license": "agpl-3.0", "size": 11780 }
[ "java.util.Iterator", "java.util.List", "org.apache.commons.configuration.ConfigurationException", "org.apache.commons.configuration.HierarchicalConfiguration", "org.apache.commons.configuration.XMLConfiguration" ]
import java.util.Iterator; import java.util.List; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.HierarchicalConfiguration; import org.apache.commons.configuration.XMLConfiguration;
import java.util.*; import org.apache.commons.configuration.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
304,601
private static Resource getOrCreateResource( final ResourceResolver resolver, final String path, final String resourceType, final String intermediateResourceType, final boolean...
static Resource function( final ResourceResolver resolver, final String path, final String resourceType, final String intermediateResourceType, final boolean autoCommit) throws PersistenceException { final Map<String, Object> props; if ( resourceType == null ) { props = null; } else { props = Collections.singletonMap(R...
/** * Creates or gets the resource at the given path. * This is a copy of Sling's API ResourceUtil method to avoid a dependency on the latest * Sling API version! We can remove this once we update to Sling API > 2.8 * @param resolver The resource resolver to use for creation * @param path T...
Creates or gets the resource at the given path. This is a copy of Sling's API ResourceUtil method to avoid a dependency on the latest Sling API version! We can remove this once we update to Sling API > 2.8
getOrCreateResource
{ "repo_name": "Nimco/sling", "path": "bundles/extensions/event/src/main/java/org/apache/sling/event/impl/support/ResourceHelper.java", "license": "apache-2.0", "size": 18509 }
[ "java.util.Collections", "java.util.Map", "org.apache.sling.api.resource.PersistenceException", "org.apache.sling.api.resource.Resource", "org.apache.sling.api.resource.ResourceResolver" ]
import java.util.Collections; import java.util.Map; import org.apache.sling.api.resource.PersistenceException; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver;
import java.util.*; import org.apache.sling.api.resource.*;
[ "java.util", "org.apache.sling" ]
java.util; org.apache.sling;
2,474,900
public Output<T> data() { return data; }
Output<T> function() { return data; }
/** * Gets data. * * @return data. */
Gets data
data
{ "repo_name": "tensorflow/java", "path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/CollectiveBcastSend.java", "license": "apache-2.0", "size": 6288 }
[ "org.tensorflow.Output" ]
import org.tensorflow.Output;
import org.tensorflow.*;
[ "org.tensorflow" ]
org.tensorflow;
380,385
@SuppressWarnings("unchecked") // (1) should only fail if input stream is incorrect private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map<K, V>) in.readObject(); // (1) }
@SuppressWarnings(STR) void function(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); map = (Map<K, V>) in.readObject(); }
/** * Read the map in using a custom routine. * * @param in the input stream * @throws IOException if an error occurs while reading from the stream * @throws ClassNotFoundException if an object read from the stream can not be loaded * @since 3.1 */
Read the map in using a custom routine
readObject
{ "repo_name": "apache/commons-collections", "path": "src/main/java/org/apache/commons/collections4/map/PredicatedMap.java", "license": "apache-2.0", "size": 7084 }
[ "java.io.IOException", "java.io.ObjectInputStream", "java.util.Map" ]
import java.io.IOException; import java.io.ObjectInputStream; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
34,228
@Test public void testCreateFeatureTableWithMetadataAdditionalColumns() throws SQLException { GeoPackageTestUtils.testCreateFeatureTableWithMetadataAdditionalColumns( geoPackage); }
void function() throws SQLException { GeoPackageTestUtils.testCreateFeatureTableWithMetadataAdditionalColumns( geoPackage); }
/** * Test create feature table with metadata and additional columns * * @throws SQLException */
Test create feature table with metadata and additional columns
testCreateFeatureTableWithMetadataAdditionalColumns
{ "repo_name": "ngageoint/geopackage-java", "path": "src/test/java/mil/nga/geopackage/GeoPackageImportTest.java", "license": "mit", "size": 2147 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,728,893
private static boolean shouldIndex( final ShardSpec shardSpec, final Interval interval, final InputRow inputRow, final QueryGranularity rollupGran ) { return interval.contains(inputRow.getTimestampFromEpoch()) && shardSpec.isInChunk(rollupGran.truncate(inputRow.getTimestampF...
static boolean function( final ShardSpec shardSpec, final Interval interval, final InputRow inputRow, final QueryGranularity rollupGran ) { return interval.contains(inputRow.getTimestampFromEpoch()) && shardSpec.isInChunk(rollupGran.truncate(inputRow.getTimestampFromEpoch()), inputRow); }
/** * Should we index this inputRow? Decision is based on our interval and shardSpec. * * @param inputRow the row to check * * @return true or false */
Should we index this inputRow? Decision is based on our interval and shardSpec
shouldIndex
{ "repo_name": "nvoron23/druid", "path": "indexing-service/src/main/java/io/druid/indexing/common/task/IndexTask.java", "license": "apache-2.0", "size": 16175 }
[ "io.druid.data.input.InputRow", "io.druid.granularity.QueryGranularity", "io.druid.timeline.partition.ShardSpec", "org.joda.time.Interval" ]
import io.druid.data.input.InputRow; import io.druid.granularity.QueryGranularity; import io.druid.timeline.partition.ShardSpec; import org.joda.time.Interval;
import io.druid.data.input.*; import io.druid.granularity.*; import io.druid.timeline.partition.*; import org.joda.time.*;
[ "io.druid.data", "io.druid.granularity", "io.druid.timeline", "org.joda.time" ]
io.druid.data; io.druid.granularity; io.druid.timeline; org.joda.time;
2,892,378
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<SecurityPartnerProviderInner> listByResourceGroupAsync( String resourceGroupName, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink ->...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<SecurityPartnerProviderInner> function( String resourceGroupName, Context context) { return new PagedFlux<>( () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); }
/** * Lists all Security Partner Providers in a resource group. * * @param resourceGroupName The name of the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementExcep...
Lists all Security Partner Providers in a resource group
listByResourceGroupAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/SecurityPartnerProvidersClientImpl.java", "license": "mit", "size": 75990 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.SecurityPartnerProviderInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.SecurityPartnerProviderInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
313,018
public final Tile getLocationB() { return LOCATION_B; }
final Tile function() { return LOCATION_B; }
/** * Get the b-location of this {@link PlayerType}. * * @return The {@link LOCATION_B}. */
Get the b-location of this <code>PlayerType</code>
getLocationB
{ "repo_name": "OzanKurt/Citelic-742", "path": "src/com/citelic/game/entity/player/content/controllers/impl/distractions/soulwars/SoulWarsManager.java", "license": "mit", "size": 20364 }
[ "com.citelic.game.map.tile.Tile" ]
import com.citelic.game.map.tile.Tile;
import com.citelic.game.map.tile.*;
[ "com.citelic.game" ]
com.citelic.game;
1,893,857
public JsonRpcPromise<R> onSuccess(Runnable runnable) { checkNotNull(runnable, "JSON RPC success runnable argument must not be null"); checkState(this.successConsumer == null, "JSON RPC success field must not be set"); this.successConsumer = (s, r) -> runnable.run(); return this; }
JsonRpcPromise<R> function(Runnable runnable) { checkNotNull(runnable, STR); checkState(this.successConsumer == null, STR); this.successConsumer = (s, r) -> runnable.run(); return this; }
/** * Set runnable to be called on this promise resolution. Ths variant of promise configuration must * be used only when you need not both the value of endpoint ID and the value of response result. * * @param runnable runnable * @return the instance of this very promise */
Set runnable to be called on this promise resolution. Ths variant of promise configuration must be used only when you need not both the value of endpoint ID and the value of response result
onSuccess
{ "repo_name": "TypeFox/che", "path": "core/che-core-api-core/src/main/java/org/eclipse/che/api/core/jsonrpc/commons/JsonRpcPromise.java", "license": "epl-1.0", "size": 5667 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
265,370
public int read(ByteBuffer dst, int dstStart, int dstLength) throws IOException { final int remaining = this.length - this.position; final int read = Math.min(remaining, dstLength); final long srcAddress = this.address + this.position; if (dst.isDirect()) { final long dstAddress = Pl...
int function(ByteBuffer dst, int dstStart, int dstLength) throws IOException { final int remaining = this.length - this.position; final int read = Math.min(remaining, dstLength); final long srcAddress = this.address + this.position; if (dst.isDirect()) { final long dstAddress = PlatformDependent.directBufferAddress(dst...
/** * Reads a sequence of bytes from this file into the given buffer. * <p> * <p> Bytes are read starting at this file's current position, and * then the position is updated with the number of bytes actually read. */
Reads a sequence of bytes from this file into the given buffer. Bytes are read starting at this file's current position, and then the position is updated with the number of bytes actually read
read
{ "repo_name": "dejanb/activemq-artemis", "path": "artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/mapped/MappedFile.java", "license": "apache-2.0", "size": 8922 }
[ "io.netty.util.internal.PlatformDependent", "java.io.IOException", "java.nio.ByteBuffer" ]
import io.netty.util.internal.PlatformDependent; import java.io.IOException; import java.nio.ByteBuffer;
import io.netty.util.internal.*; import java.io.*; import java.nio.*;
[ "io.netty.util", "java.io", "java.nio" ]
io.netty.util; java.io; java.nio;
2,431,292
public static boolean doLoginCheck(String shareUrl, String login, String password) { String server = PageUtils.getAddress(shareUrl).replaceAll("(:\\d{1,5})?", ""); boolean userAuthenticated = false; try { UniAddress dc = UniAddress.getByName(server, true); ...
static boolean function(String shareUrl, String login, String password) { String server = PageUtils.getAddress(shareUrl).replaceAll(STR, STRThe network name cannot be found", e); } return userAuthenticated; }
/** * Authenticate a user. * * @param login * @param password * @param shareUrl * @return true if the given password matches the password for this user */
Authenticate a user
doLoginCheck
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/qa-share/src/main/java/org/alfresco/share/util/CifsUtil.java", "license": "lgpl-3.0", "size": 25505 }
[ "org.alfresco.po.share.util.PageUtils" ]
import org.alfresco.po.share.util.PageUtils;
import org.alfresco.po.share.util.*;
[ "org.alfresco.po" ]
org.alfresco.po;
2,225,042
public final void removeAtomicStamped(final String name) throws IgniteCheckedException { assert name != null; assert dsCacheCtx != null; awaitInitialization();
final void function(final String name) throws IgniteCheckedException { assert name != null; assert dsCacheCtx != null; awaitInitialization();
/** * Removes atomic stamped from cache. * * @param name Atomic stamped name. * @throws IgniteCheckedException If removing failed. */
Removes atomic stamped from cache
removeAtomicStamped
{ "repo_name": "apacheignite/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java", "license": "apache-2.0", "size": 77780 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,141,752
public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.UNDEAD; }
EnumCreatureAttribute function() { return EnumCreatureAttribute.UNDEAD; }
/** * Get this Entity's EnumCreatureAttribute */
Get this Entity's EnumCreatureAttribute
getCreatureAttribute
{ "repo_name": "MinecraftModArchive/Runes-And-Silver", "path": "src/main/java/Runes/Entites/EntityEskimoSkeleton.java", "license": "lgpl-3.0", "size": 14075 }
[ "net.minecraft.entity.EnumCreatureAttribute" ]
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
2,810,902
@Override public Object getAttribute(String key) { if (userAttributes == null) { return null; } final List<Object> values = userAttributes.get(key); if (values != null && values.size() > 0) { return values.get(0); } return null; }
Object function(String key) { if (userAttributes == null) { return null; } final List<Object> values = userAttributes.get(key); if (values != null && values.size() > 0) { return values.get(0); } return null; }
/** * Returns an attribute for a key. For objects represented as strings, a <code>java.lang.String * </code> will be returned. Binary values will be represented as byte arrays. * * @param key the attribute name. * @return value the attribute value identified by the key. */
Returns an attribute for a key. For objects represented as strings, a <code>java.lang.String </code> will be returned. Binary values will be represented as byte arrays
getAttribute
{ "repo_name": "jl1955/uPortal5", "path": "uPortal-core/src/main/java/org/apereo/portal/security/provider/PersonImpl.java", "license": "apache-2.0", "size": 10356 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
928,313
protected static Map<String, WriteToBigQuery.FieldInfo<KV<String, Integer>>> configureGlobalWindowBigQueryWrite() { Map<String, WriteToBigQuery.FieldInfo<KV<String, Integer>>> tableConfigure = configureBigQueryWrite(); tableConfigure.put( "processing_time", new WriteToBigQuery.F...
static Map<String, WriteToBigQuery.FieldInfo<KV<String, Integer>>> function() { Map<String, WriteToBigQuery.FieldInfo<KV<String, Integer>>> tableConfigure = configureBigQueryWrite(); tableConfigure.put( STR, new WriteToBigQuery.FieldInfo<KV<String, Integer>>( STR, (c, w) -> fmt.print(Instant.now()))); return tableConfi...
/** * Create a map of information that describes how to write pipeline output to BigQuery. This map * is used to write user score sums. */
Create a map of information that describes how to write pipeline output to BigQuery. This map is used to write user score sums
configureGlobalWindowBigQueryWrite
{ "repo_name": "vikkyrk/incubator-beam", "path": "examples/java8/src/main/java/org/apache/beam/examples/complete/game/LeaderBoard.java", "license": "apache-2.0", "size": 12714 }
[ "java.util.Map", "org.apache.beam.examples.complete.game.utils.WriteToBigQuery", "org.joda.time.Instant" ]
import java.util.Map; import org.apache.beam.examples.complete.game.utils.WriteToBigQuery; import org.joda.time.Instant;
import java.util.*; import org.apache.beam.examples.complete.game.utils.*; import org.joda.time.*;
[ "java.util", "org.apache.beam", "org.joda.time" ]
java.util; org.apache.beam; org.joda.time;
2,192,111
public static ViewDragHelper create(ViewGroup forParent, float sensitivity, Callback cb) { final ViewDragHelper helper = create(forParent, cb); helper.mTouchSlop = (int) (helper.mTouchSlop * (1 / sensitivity)); return helper; } private ViewDragHelper(Context context, ViewGroup ...
static ViewDragHelper function(ViewGroup forParent, float sensitivity, Callback cb) { final ViewDragHelper helper = create(forParent, cb); helper.mTouchSlop = (int) (helper.mTouchSlop * (1 / sensitivity)); return helper; } private ViewDragHelper(Context context, ViewGroup forParent, Callback cb) { if (forParent == null...
/** * Factory method to create a new ViewDragHelper. * * @param forParent Parent view to monitor * @param sensitivity Multiplier for how sensitive the helper should be about detecting * the start of a drag. Larger values are more sensitive. 1.0f is normal. * @param cb Ca...
Factory method to create a new ViewDragHelper
create
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/Dialer/src/com/android/dialer/widget/ViewDragHelper.java", "license": "gpl-3.0", "size": 64658 }
[ "android.content.Context", "android.view.ViewConfiguration", "android.view.ViewGroup", "android.widget.Scroller" ]
import android.content.Context; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.widget.Scroller;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
183,833
public static void setPort(ContentResolver cr, long providerId, int port) { putLongValue(cr, providerId, PORT, (long) port); }
static void function(ContentResolver cr, long providerId, int port) { putLongValue(cr, providerId, PORT, (long) port); }
/** * A convenience method to set the TCP/IP port number to connect to * * @param cr The ContentResolver to use to access the settings table * @param providerId used to identify the set of settings for a given * provider * @param port the TCP/IP port numb...
A convenience method to set the TCP/IP port number to connect to
setPort
{ "repo_name": "kden/ChatSecureAndroid", "path": "src/info/guardianproject/otr/app/im/provider/Imps.java", "license": "apache-2.0", "size": 100497 }
[ "android.content.ContentResolver" ]
import android.content.ContentResolver;
import android.content.*;
[ "android.content" ]
android.content;
1,230,397
public String analyze(String dID,Integer[] vars,Integer min_freq,Float sigmaPercent,boolean downweight) throws IOException { String aID=null; Dataset ds=datasets.get(dID); if(ds==null) throw new IOException("Dataset "+dID+" not found."); switch(vars.length) { case 3: // check if server is too busy if(t...
String function(String dID,Integer[] vars,Integer min_freq,Float sigmaPercent,boolean downweight) throws IOException { String aID=null; Dataset ds=datasets.get(dID); if(ds==null) throw new IOException(STR+dID+STR); switch(vars.length) { case 3: if(this.getNumberCurrentAnalyses()>0) throw new IOException(STR); case 1: c...
/** * Places a new analysis running, or fetches an analysis ID in case the analysis already exists. * @param dID Dataset ID * @param vars Variable codes * @param min_freq * @param sigmaPercent * @param downweight * @return An analysis ID. It can correspond to a newly created analysis, or an existing one. ...
Places a new analysis running, or fetches an analysis ID in case the analysis already exists
analyze
{ "repo_name": "miguel-porto/ecoSpace", "path": "java/src/main/java/pt/floraon/ecospace/DatasetServer.java", "license": "gpl-2.0", "size": 6770 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,745,918
public static void wait(Object _o) throws BadArgumentException { if (_o == null) { throw new BadArgumentException("Synchronizer can not be null"); } try { synchronized (_o) { _o.wait(); } } catch (InterruptedException ex) { ...
static void function(Object _o) throws BadArgumentException { if (_o == null) { throw new BadArgumentException(STR); } try { synchronized (_o) { _o.wait(); } } catch (InterruptedException ex) { } }
/** * Wrapper for wait() method on a Java object to be used from JavaScript * @param _o synchronizer object * @throws BadArgumentException if synchronizer is null */
Wrapper for wait() method on a Java object to be used from JavaScript
wait
{ "repo_name": "cambierr/SmartBricksMaster", "path": "src/main/java/org/smartbricks/core/Engine.java", "license": "mit", "size": 13595 }
[ "org.smartbricks.exceptions.BadArgumentException" ]
import org.smartbricks.exceptions.BadArgumentException;
import org.smartbricks.exceptions.*;
[ "org.smartbricks.exceptions" ]
org.smartbricks.exceptions;
561,231
public boolean compareOfWords(String wordOne, String wordTwo) { char[] one = sort(wordOne); char[] two = sort(wordTwo); return Arrays.equals(one, two); }
boolean function(String wordOne, String wordTwo) { char[] one = sort(wordOne); char[] two = sort(wordTwo); return Arrays.equals(one, two); }
/** * Compare words. * * @param wordOne - word one. * @param wordTwo - word two. * @return - result. */
Compare words
compareOfWords
{ "repo_name": "ZubovVP/ZubovVP", "path": "chapter_004/src/main/java/ru/job4j/unsert/InsertSort.java", "license": "apache-2.0", "size": 1106 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
416,995
ImageDescriptor id = create("d", type); //$NON-NLS-1$ if (id != null) action.setDisabledImageDescriptor(id); id = create("c", type); //$NON-NLS-1$ if (id != null) { action.setHoverImageDescriptor(id); action.setImageDescriptor(id); } else { action.setImageDescriptor(ImageDescriptor ...
ImageDescriptor id = create("d", type); if (id != null) action.setDisabledImageDescriptor(id); id = create("c", type); if (id != null) { action.setHoverImageDescriptor(id); action.setImageDescriptor(id); } else { action.setImageDescriptor(ImageDescriptor .getMissingImageDescriptor()); } }
/** * loads icon from c and d subdirectories! */
loads icon from c and d subdirectories
setImageDescriptors
{ "repo_name": "ckaestne/CIDE", "path": "CIDE2/src/de/ovgu/cide/ColoredIDEImages.java", "license": "gpl-3.0", "size": 3630 }
[ "org.eclipse.jface.resource.ImageDescriptor" ]
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,278,046
protected void getImagePixels() { int w = image.getWidth(); int h = image.getHeight(); int type = image.getType(); if ((w != width) || (h != height) || (type != BufferedImage.TYPE_3BYTE_BGR)) { // create new image with right size/format BufferedImage temp = new BufferedImage(width, height, BufferedImag...
void function() { int w = image.getWidth(); int h = image.getHeight(); int type = image.getType(); if ((w != width) (h != height) (type != BufferedImage.TYPE_3BYTE_BGR)) { BufferedImage temp = new BufferedImage(width, height, BufferedImage.TYPE_3BYTE_BGR); Graphics2D g = temp.createGraphics(); g.drawImage(image, 0, 0, ...
/** * Extracts image pixels into byte array "pixels" */
Extracts image pixels into byte array "pixels"
getImagePixels
{ "repo_name": "Banno/sbt-plantuml-plugin", "path": "src/main/java/net/sourceforge/plantuml/AnimatedGifEncoder.java", "license": "apache-2.0", "size": 33927 }
[ "java.awt.Graphics2D", "java.awt.image.BufferedImage", "java.awt.image.DataBufferByte" ]
import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.awt.image.DataBufferByte;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,661,567
public static final int getModuleType(final Module module) { if (module == null) return -1; if (isChildOf(Data.class, module.getClass())) return ModuleLocation.MODULE_TYPE_DATA; else if (isChildOf(Algorithm.class, module.getClass())) return ModuleLocation.MODULE_TYPE_ALGORITHM; re...
static final int function(final Module module) { if (module == null) return -1; if (isChildOf(Data.class, module.getClass())) return ModuleLocation.MODULE_TYPE_DATA; else if (isChildOf(Algorithm.class, module.getClass())) return ModuleLocation.MODULE_TYPE_ALGORITHM; return -1; }
/** * Get the type of a module. * @param module Module to test * @return the type of the module or -1 if an error occurs */
Get the type of a module
getModuleType
{ "repo_name": "GenomicParisCentre/doelan", "path": "src/main/java/fr/ens/transcriptome/nividic/platform/module/ModuleFinder.java", "license": "gpl-2.0", "size": 11520 }
[ "fr.ens.transcriptome.nividic.platform.data.Data", "fr.ens.transcriptome.nividic.platform.workflow.Algorithm" ]
import fr.ens.transcriptome.nividic.platform.data.Data; import fr.ens.transcriptome.nividic.platform.workflow.Algorithm;
import fr.ens.transcriptome.nividic.platform.data.*; import fr.ens.transcriptome.nividic.platform.workflow.*;
[ "fr.ens.transcriptome" ]
fr.ens.transcriptome;
210,697
public UserTransaction getUserTransaction() { return ivUserTran; }
UserTransaction function() { return ivUserTran; }
/** * Returns the injected UserTransaction. */
Returns the injected UserTransaction
getUserTransaction
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.managedbeans_fat/test-applications/ManagedBeanXmlEJB.jar/src/com/ibm/ws/managedbeans/fat/xml/ejb/PreDestroyManagedBean.java", "license": "epl-1.0", "size": 3155 }
[ "javax.transaction.UserTransaction" ]
import javax.transaction.UserTransaction;
import javax.transaction.*;
[ "javax.transaction" ]
javax.transaction;
298,242
public static void showFlowgraphSettingsDialog(final JFrame parent) { final ZyGraphViewSettings settings = ConfigManager.instance().getDefaultFlowGraphSettings(); final CGraphSettingsDialog dlg = new CGraphSettingsDialog(parent, "Initial Flow graph Settings", settings, true, false); dlg.setVisib...
static void function(final JFrame parent) { final ZyGraphViewSettings settings = ConfigManager.instance().getDefaultFlowGraphSettings(); final CGraphSettingsDialog dlg = new CGraphSettingsDialog(parent, STR, settings, true, false); dlg.setVisible(true); ConfigManager.instance().updateFlowgraphSettings(settings); Config...
/** * Shows the initial flow graph settings dialog. * * @param parent Parent window used for dialogs. */
Shows the initial flow graph settings dialog
showFlowgraphSettingsDialog
{ "repo_name": "google/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/MainWindow/Implementations/CSettingsDialogFunctions.java", "license": "apache-2.0", "size": 2752 }
[ "com.google.security.zynamics.binnavi.Gui", "com.google.security.zynamics.binnavi.ZyGraph", "com.google.security.zynamics.binnavi.config.ConfigManager", "javax.swing.JFrame" ]
import com.google.security.zynamics.binnavi.Gui; import com.google.security.zynamics.binnavi.ZyGraph; import com.google.security.zynamics.binnavi.config.ConfigManager; import javax.swing.JFrame;
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.config.*; import javax.swing.*;
[ "com.google.security", "javax.swing" ]
com.google.security; javax.swing;
2,213,882
boolean setBalancerRunning(final boolean on, final boolean synchronous) throws IOException;
boolean setBalancerRunning(final boolean on, final boolean synchronous) throws IOException;
/** * Turn the load balancer on or off. * * @param synchronous If true, it waits until current balance() call, if outstanding, to return. * @return Previous balancer value */
Turn the load balancer on or off
setBalancerRunning
{ "repo_name": "SeekerResource/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 60792 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,881,019
private static boolean handleGlobDepsAndPropagateFilesystemExceptions( PackageIdentifier packageIdentifier, Iterable<SkyKey> depKeys, Environment env, boolean packageWasInError) throws InternalInconsistentFilesystemException, InterruptedException { Preconditions.checkState( I...
static boolean function( PackageIdentifier packageIdentifier, Iterable<SkyKey> depKeys, Environment env, boolean packageWasInError) throws InternalInconsistentFilesystemException, InterruptedException { Preconditions.checkState( Iterables.all(depKeys, SkyFunctions.isSkyFunction(SkyFunctions.GLOB)), depKeys); boolean pa...
/** * These deps have already been marked (see {@link SkyframeHybridGlobber}) but we need to properly * handle some errors that legacy package loading can't handle gracefully. */
These deps have already been marked (see <code>SkyframeHybridGlobber</code>) but we need to properly handle some errors that legacy package loading can't handle gracefully
handleGlobDepsAndPropagateFilesystemExceptions
{ "repo_name": "hermione521/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java", "license": "apache-2.0", "size": 59390 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.cmdline.PackageIdentifier", "com.google.devtools.build.lib.packages.BuildFileNotFoundException", "com.google.devtools.build.lib.util.Preconditions", "com.google.devtools.build.skyframe.SkyKey", "com.google.devtools.build.skyframe.ValueO...
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.cmdline.PackageIdentifier; import com.google.devtools.build.lib.packages.BuildFileNotFoundException; import com.google.devtools.build.lib.util.Preconditions; import com.google.devtools.build.skyframe.SkyKey; import com.google.devtools.buil...
import com.google.common.collect.*; import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.skyframe.*; import java.io.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.io", "java.util" ]
com.google.common; com.google.devtools; java.io; java.util;
2,535,155
@Override public void write(byte b[]) throws IOException { this.write(b, 0, b.length); }
void function(byte b[]) throws IOException { this.write(b, 0, b.length); }
/** * Writes the array. If the array does not fit within the buffer, it is * not split, but rather written out as one large chunk. * @param b * @throws IOException * * @since 3.0 */
Writes the array. If the array does not fit within the buffer, it is not split, but rather written out as one large chunk
write
{ "repo_name": "andresrc/jenkins", "path": "core/src/main/java/hudson/util/ChunkedOutputStream.java", "license": "mit", "size": 6869 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,807,220
public ModelImport<M> getConflict(M model) throws RestrictionEvaluationException { return getConflict(model, new HashSet<M>()); }
ModelImport<M> function(M model) throws RestrictionEvaluationException { return getConflict(model, new HashSet<M>()); }
/** * Returns the first conflict <code>model</code> and its (recursive) imports have with the conflict import * statements collected in this context. * * @param model the model information to search for * @return the first conflict or <b>null</b> if there is none * @throws RestrictionEva...
Returns the first conflict <code>model</code> and its (recursive) imports have with the conflict import statements collected in this context
getConflict
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/VarModel/Utils/src/net/ssehub/easy/basics/modelManagement/ResolutionContext.java", "license": "apache-2.0", "size": 13125 }
[ "java.util.HashSet" ]
import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
386,659
static void setCustomSegments(Map<String,String> segments) { customSegments = new HashMap<>(); customSegments.putAll(segments); }
static void setCustomSegments(Map<String,String> segments) { customSegments = new HashMap<>(); customSegments.putAll(segments); }
/** * Adds developer provided custom segments for crash, * like versions of dependency libraries. */
Adds developer provided custom segments for crash, like versions of dependency libraries
setCustomSegments
{ "repo_name": "AlbRoehm/habitica-android", "path": "seeds-sdk/src/main/java/com/playseeds/android/sdk/CrashDetails.java", "license": "gpl-3.0", "size": 13915 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
66,838
if(containerRequest.getPath().equals("controller")){ UriBuilder builder = UriBuilder.fromUri(containerRequest.getBaseUri()) .path(SiteToSiteResource.class) .replaceQuery(containerRequest.getRequestUri().getRawQuery()); URI redirectTo = builder.bui...
if(containerRequest.getPath().equals(STR)){ UriBuilder builder = UriBuilder.fromUri(containerRequest.getBaseUri()) .path(SiteToSiteResource.class) .replaceQuery(containerRequest.getRequestUri().getRawQuery()); URI redirectTo = builder.build(); containerRequest.setUris(containerRequest.getBaseUri(), redirectTo); } retur...
/** * This method checks path of the incoming request, and * redirects following URIs: * <li>/controller -> SiteToSiteResource * @param containerRequest request to be modified * @return modified request */
This method checks path of the incoming request, and redirects following URIs: /controller -> SiteToSiteResource
filter
{ "repo_name": "ShellyLC/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/filter/RedirectResourceFilter.java", "license": "apache-2.0", "size": 2161 }
[ "javax.ws.rs.core.UriBuilder", "org.apache.nifi.web.api.SiteToSiteResource" ]
import javax.ws.rs.core.UriBuilder; import org.apache.nifi.web.api.SiteToSiteResource;
import javax.ws.rs.core.*; import org.apache.nifi.web.api.*;
[ "javax.ws", "org.apache.nifi" ]
javax.ws; org.apache.nifi;
2,094,386
static Implementation getImplementation(String baseName, String algorithm, Provider prov, Class[] ctorparamtype, Object[] ctorparam) throws InvalidAlgorithmParameterException { String alias; while ((alias = prov.getProperty("Alg.Alias." + baseName + "." +...
static Implementation getImplementation(String baseName, String algorithm, Provider prov, Class[] ctorparamtype, Object[] ctorparam) throws InvalidAlgorithmParameterException { String alias; while ((alias = prov.getProperty(STR + baseName + "." + algorithm)) != null) { algorithm = alias; } String className = prov.getPr...
/** * see if we can find an algorithm (or its alias and what it represents) in * the property table for the given provider. * * @return null if no algorithm found, an Implementation if it is. */
see if we can find an algorithm (or its alias and what it represents) in the property table for the given provider
getImplementation
{ "repo_name": "GaloisInc/hacrypto", "path": "src/Java/BouncyCastle/BouncyCastle-1.50/prov/src/main/jdk1.3/org/bouncycastle/jce/cert/CertUtil.java", "license": "bsd-3-clause", "size": 16860 }
[ "java.security.InvalidAlgorithmParameterException", "java.security.Provider" ]
import java.security.InvalidAlgorithmParameterException; import java.security.Provider;
import java.security.*;
[ "java.security" ]
java.security;
2,687,688
void seekToRow(long rowCount) throws IOException;
void seekToRow(long rowCount) throws IOException;
/** * Seek to a particular row number. */
Seek to a particular row number
seekToRow
{ "repo_name": "libin/hive-dwrf", "path": "hive-dwrf/src/main/java/com/facebook/hive/orc/RecordReader.java", "license": "apache-2.0", "size": 2104 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,891,120