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
public void update(IBasicEntity ent) throws CachingException { EntityCachingServiceLocator.getEntityCachingService().update(ent); }
void function(IBasicEntity ent) throws CachingException { EntityCachingServiceLocator.getEntityCachingService().update(ent); }
/** * Updates the entity in the cache and notifies peer caches. * * @param ent org.apereo.portal.concurrency.IBasicEntity * @exception org.apereo.portal.concurrency.CachingException */
Updates the entity in the cache and notifies peer caches
update
{ "repo_name": "jl1955/uPortal5", "path": "uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/services/EntityCachingService.java", "license": "apache-2.0", "size": 6126 }
[ "org.apereo.portal.IBasicEntity", "org.apereo.portal.concurrency.CachingException", "org.apereo.portal.spring.locator.EntityCachingServiceLocator" ]
import org.apereo.portal.IBasicEntity; import org.apereo.portal.concurrency.CachingException; import org.apereo.portal.spring.locator.EntityCachingServiceLocator;
import org.apereo.portal.*; import org.apereo.portal.concurrency.*; import org.apereo.portal.spring.locator.*;
[ "org.apereo.portal" ]
org.apereo.portal;
1,040,262
public void setFeatureStyles(FeatureRow featureRow, FeatureStyles featureStyles) { featureStyleExtension.setFeatureStyles(featureRow, featureStyles); }
void function(FeatureRow featureRow, FeatureStyles featureStyles) { featureStyleExtension.setFeatureStyles(featureRow, featureStyles); }
/** * Set the feature styles for the feature row * * @param featureRow * feature row * @param featureStyles * feature styles */
Set the feature styles for the feature row
setFeatureStyles
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/nga/style/FeatureTableStyles.java", "license": "mit", "size": 33447 }
[ "mil.nga.geopackage.features.user.FeatureRow" ]
import mil.nga.geopackage.features.user.FeatureRow;
import mil.nga.geopackage.features.user.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
2,421,004
public static long getTotalInputFileSize (ContentSummary inputSummary, MapWork work, double highestSamplePercentage) { long totalInputFileSize = inputSummary.getLength(); if (work.getNameToSplitSample() == null || work.getNameToSplitSample().isEmpty()) { // If percentage block sampling wasn't used...
static long function (ContentSummary inputSummary, MapWork work, double highestSamplePercentage) { long totalInputFileSize = inputSummary.getLength(); if (work.getNameToSplitSample() == null work.getNameToSplitSample().isEmpty()) { return totalInputFileSize; } if (highestSamplePercentage >= 0) { totalInputFileSize = Ma...
/** * Computes the total input file size. If block sampling was used it will scale this * value by the highest sample percentage (as an estimate for input). * * @param inputSummary * @param work * @param highestSamplePercentage * @return estimated total input size for job */
Computes the total input file size. If block sampling was used it will scale this value by the highest sample percentage (as an estimate for input)
getTotalInputFileSize
{ "repo_name": "wisgood/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java", "license": "apache-2.0", "size": 136381 }
[ "org.apache.hadoop.fs.ContentSummary", "org.apache.hadoop.hive.ql.plan.MapWork" ]
import org.apache.hadoop.fs.ContentSummary; import org.apache.hadoop.hive.ql.plan.MapWork;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.ql.plan.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
257,464
@Override protected String getAdminScope() { return Scope.CLIENT_ADMIN; }
String function() { return Scope.CLIENT_ADMIN; }
/** * Return the scope required to access ALL resources on this services. * * @return A string naming the scope. */
Return the scope required to access ALL resources on this services
getAdminScope
{ "repo_name": "kangaroo-server/kangaroo", "path": "kangaroo-server-authz/src/main/java/net/krotscheck/kangaroo/authz/admin/v1/resource/ClientService.java", "license": "apache-2.0", "size": 16157 }
[ "net.krotscheck.kangaroo.authz.admin.Scope" ]
import net.krotscheck.kangaroo.authz.admin.Scope;
import net.krotscheck.kangaroo.authz.admin.*;
[ "net.krotscheck.kangaroo" ]
net.krotscheck.kangaroo;
2,603,405
default CxfRsEndpointProducerBuilder providers(List<Object> providers) { doSetProperty("providers", providers); return this; }
default CxfRsEndpointProducerBuilder providers(List<Object> providers) { doSetProperty(STR, providers); return this; }
/** * Set custom JAX-RS provider(s) list to the CxfRs endpoint. You can * specify a string with a list of providers to lookup in the registy * separated by comma. * * The option is a: * &lt;code&gt;java.util.List&amp;lt;java.lang.Object&amp;gt;&lt;/code&gt; type. ...
Set custom JAX-RS provider(s) list to the CxfRs endpoint. You can specify a string with a list of providers to lookup in the registy separated by comma. The option is a: &lt;code&gt;java.util.List&amp;lt;java.lang.Object&amp;gt;&lt;/code&gt; type. Group: common
providers
{ "repo_name": "nikhilvibhav/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CxfRsEndpointBuilderFactory.java", "license": "apache-2.0", "size": 87052 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
43,310
protected void traverse(OptionTraverser traverser, OptionTraversalPath path, Object obj) { BeanInfo bi; PropertyDescriptor[] props; Object current; try { bi = Introspector.getBeanInfo(obj.getClass()); props = bi.getPropertyDescriptors(); for (PropertyDescriptor prop: pro...
void function(OptionTraverser traverser, OptionTraversalPath path, Object obj) { BeanInfo bi; PropertyDescriptor[] props; Object current; try { bi = Introspector.getBeanInfo(obj.getClass()); props = bi.getPropertyDescriptors(); for (PropertyDescriptor prop: props) { if ((prop.getReadMethod() != null) && (prop.getWriteM...
/** * Traverses a non-ADAMS OptionHandler. * * @param traverser the object to handled the traversed options * @param path the path so far * @param obj the non-ADAMS object to traverse */
Traverses a non-ADAMS OptionHandler
traverse
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/core/option/OptionManager.java", "license": "gpl-3.0", "size": 32424 }
[ "java.beans.BeanInfo", "java.beans.Introspector", "java.beans.PropertyDescriptor" ]
import java.beans.BeanInfo; import java.beans.Introspector; import java.beans.PropertyDescriptor;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,663,304
@Beta @GwtIncompatible("To be supported") public static CacheBuilder<Object, Object> from(CacheBuilderSpec spec) { return spec.toCacheBuilder() .lenientParsing(); } /** * Constructs a new {@code CacheBuilder} instance with the settings specified in {@code spec}. * This is especially useful ...
@GwtIncompatible(STR) static CacheBuilder<Object, Object> function(CacheBuilderSpec spec) { return spec.toCacheBuilder() .lenientParsing(); } /** * Constructs a new {@code CacheBuilder} instance with the settings specified in {@code spec}. * This is especially useful for command-line configuration of a {@code CacheBuil...
/** * Constructs a new {@code CacheBuilder} instance with the settings specified in {@code spec}. * * @since 12.0 */
Constructs a new CacheBuilder instance with the settings specified in spec
from
{ "repo_name": "10045125/guava", "path": "guava/src/com/google/common/cache/CacheBuilder.java", "license": "apache-2.0", "size": 37852 }
[ "com.google.common.annotations.GwtIncompatible" ]
import com.google.common.annotations.GwtIncompatible;
import com.google.common.annotations.*;
[ "com.google.common" ]
com.google.common;
1,977,828
public void setQueueNode(LinkedNode node) { this.queueNode = node; }
void function(LinkedNode node) { this.queueNode = node; }
/** * INTENRAL: * Used to set the node that this merge manager is stored in, within the WriteLocksManager write lockers queue */
Used to set the node that this merge manager is stored in, within the WriteLocksManager write lockers queue
setQueueNode
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/MergeManager.java", "license": "epl-1.0", "size": 67603 }
[ "org.eclipse.persistence.internal.helper.linkedlist.LinkedNode" ]
import org.eclipse.persistence.internal.helper.linkedlist.LinkedNode;
import org.eclipse.persistence.internal.helper.linkedlist.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,209,341
public void lambda11() { NumberFormat nf = NumberFormat.getCurrencyInstance(); System.out.println("Product Info:"); ds.getProductList().stream() .forEach(p -> { System.out.println(String.format( "%s is in the category %s...
void function() { NumberFormat nf = NumberFormat.getCurrencyInstance(); System.out.println(STR); ds.getProductList().stream() .forEach(p -> { System.out.println(String.format( STR, p.getProductName(), p.getCategory(), nf.format(p.getUnitPrice()))); }); }
/** * This sample uses forEach to produce a sequence outputting some properties * of Products... */
This sample uses forEach to produce a sequence outputting some properties of Products..
lambda11
{ "repo_name": "brettryan/jdk8-lambda-samples", "path": "src/main/java/com/drunkendev/lambdas/ProjectionOperators.java", "license": "apache-2.0", "size": 10353 }
[ "java.text.NumberFormat" ]
import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,692,237
DistributionSetInvalidationCount countEntitiesForInvalidation( final DistributionSetInvalidation distributionSetInvalidation);
DistributionSetInvalidationCount countEntitiesForInvalidation( final DistributionSetInvalidation distributionSetInvalidation);
/** * Counts all entities for a list of {@link DistributionSet}s that will be * canceled when invalidation is called for those {@link DistributionSet}s. * * * @param distributionSetInvalidation * defines the {@link DistributionSet} and options what should be * ca...
Counts all entities for a list of <code>DistributionSet</code>s that will be canceled when invalidation is called for those <code>DistributionSet</code>s
countEntitiesForInvalidation
{ "repo_name": "eclipse/hawkbit", "path": "hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/DistributionSetInvalidationManagement.java", "license": "epl-1.0", "size": 1968 }
[ "org.eclipse.hawkbit.repository.model.DistributionSetInvalidation", "org.eclipse.hawkbit.repository.model.DistributionSetInvalidationCount" ]
import org.eclipse.hawkbit.repository.model.DistributionSetInvalidation; import org.eclipse.hawkbit.repository.model.DistributionSetInvalidationCount;
import org.eclipse.hawkbit.repository.model.*;
[ "org.eclipse.hawkbit" ]
org.eclipse.hawkbit;
100,676
public FileChecksum getFileChecksum(Path f, final long length) throws IOException { return null; }
FileChecksum function(Path f, final long length) throws IOException { return null; }
/** * Get the checksum of a file, from the beginning of the file till the * specific length. * @param f The file path * @param length The length of the file range for checksum calculation * @return The file checksum. */
Get the checksum of a file, from the beginning of the file till the specific length
getFileChecksum
{ "repo_name": "Microsoft-CISL/hadoop-prototype", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "apache-2.0", "size": 116772 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
215,860
@Override protected void restoreState(Hashtable<String,Object> state) { if (state.containsKey(BACKUP_SCRIPTOBJECT)) { m_ScriptObject = state.get(BACKUP_SCRIPTOBJECT); state.remove(BACKUP_SCRIPTOBJECT); } super.restoreState(state); }
void function(Hashtable<String,Object> state) { if (state.containsKey(BACKUP_SCRIPTOBJECT)) { m_ScriptObject = state.get(BACKUP_SCRIPTOBJECT); state.remove(BACKUP_SCRIPTOBJECT); } super.restoreState(state); }
/** * Restores the state of the actor before the variables got updated. * * @param state the backup of the state to restore from */
Restores the state of the actor before the variables got updated
restoreState
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/flow/core/AbstractScriptedActor.java", "license": "gpl-3.0", "size": 6193 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,504,048
@SuppressWarnings("unchecked") protected WizardState getWizardStateFromIntent(Intent intent) { return (intent != null) ? (WizardState) intent.getSerializableExtra(KEY_WIZARD_STATE) : null; }
@SuppressWarnings(STR) WizardState function(Intent intent) { return (intent != null) ? (WizardState) intent.getSerializableExtra(KEY_WIZARD_STATE) : null; }
/** * Extracts the state of the wizard from the provided Intent. * * @return state or {@code null} if not found. */
Extracts the state of the wizard from the provided Intent
getWizardStateFromIntent
{ "repo_name": "nelenkov/RemoteAuthenticator", "path": "src/com/google/android/apps/authenticator/wizard/WizardPageActivity.java", "license": "apache-2.0", "size": 9774 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
757,937
private String getAnswerValue(QueryQuestionNumericAnswer answer) { return answer != null && answer.getData() != null ? String.valueOf(Math.round(answer.getData())) : null; }
String function(QueryQuestionNumericAnswer answer) { return answer != null && answer.getData() != null ? String.valueOf(Math.round(answer.getData())) : null; }
/** * Returns answer value * * @param answer answer * @return answer value */
Returns answer value
getAnswerValue
{ "repo_name": "Metatavu/edelphi", "path": "reports/src/main/java/fi/metatavu/edelphi/reports/spreadsheet/comments/TimelineReportPageCommentProcessor.java", "license": "gpl-3.0", "size": 3289 }
[ "fi.metatavu.edelphi.domainmodel.querydata.QueryQuestionNumericAnswer" ]
import fi.metatavu.edelphi.domainmodel.querydata.QueryQuestionNumericAnswer;
import fi.metatavu.edelphi.domainmodel.querydata.*;
[ "fi.metatavu.edelphi" ]
fi.metatavu.edelphi;
2,048,076
@XmlElement(name = "keyboard-layout") public String getKeyboardLayout() { return keyboardLayout; }
@XmlElement(name = STR) String function() { return keyboardLayout; }
/** * Default keyboard layout used for the virtual keyboard. * * Do not set {@code null} to disable virtual keyboards. * @return */
Default keyboard layout used for the virtual keyboard. Do not set null to disable virtual keyboards
getKeyboardLayout
{ "repo_name": "zangsir/ANNIS", "path": "annis-interfaces/src/main/java/annis/libgui/InstanceConfig.java", "license": "apache-2.0", "size": 5480 }
[ "javax.xml.bind.annotation.XmlElement" ]
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.*;
[ "javax.xml" ]
javax.xml;
588,853
protected Time readAllowResubmitParams(ParameterParser params, SessionState state, Entity entity) { Time resubmitCloseTime = null; String allowResubmitNumberString = params.getString(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER); state.setAttribute(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER, params.getString...
Time function(ParameterParser params, SessionState state, Entity entity) { Time resubmitCloseTime = null; String allowResubmitNumberString = params.getString(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER); state.setAttribute(AssignmentSubmission.ALLOW_RESUBMIT_NUMBER, params.getString(AssignmentSubmission.ALLOW_RESUBMIT_N...
/** * read in the resubmit parameters into state variables * @param params * @param state * @return the time set for the resubmit close OR null if it is not set */
read in the resubmit parameters into state variables
readAllowResubmitParams
{ "repo_name": "harfalm/Sakai-10.1", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 605178 }
[ "org.sakaiproject.assignment.api.AssignmentSubmission", "org.sakaiproject.entity.api.Entity", "org.sakaiproject.event.api.SessionState", "org.sakaiproject.time.api.Time", "org.sakaiproject.time.cover.TimeService", "org.sakaiproject.util.ParameterParser", "org.sakaiproject.util.Validator" ]
import org.sakaiproject.assignment.api.AssignmentSubmission; import org.sakaiproject.entity.api.Entity; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.time.api.Time; import org.sakaiproject.time.cover.TimeService; import org.sakaiproject.util.ParameterParser; import org.sakaiproject.util.Valida...
import org.sakaiproject.assignment.api.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.event.api.*; import org.sakaiproject.time.api.*; import org.sakaiproject.time.cover.*; import org.sakaiproject.util.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.entity", "org.sakaiproject.event", "org.sakaiproject.time", "org.sakaiproject.util" ]
org.sakaiproject.assignment; org.sakaiproject.entity; org.sakaiproject.event; org.sakaiproject.time; org.sakaiproject.util;
1,498,609
public GapPolicy gapPolicy() { return gapPolicy; }
GapPolicy function() { return gapPolicy; }
/** * Gets the gap policy to use for this aggregation. */
Gets the gap policy to use for this aggregation
gapPolicy
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/main/java/org/elasticsearch/search/aggregations/pipeline/bucketselector/BucketSelectorPipelineAggregationBuilder.java", "license": "bsd-3-clause", "size": 9925 }
[ "org.elasticsearch.search.aggregations.pipeline.BucketHelpers" ]
import org.elasticsearch.search.aggregations.pipeline.BucketHelpers;
import org.elasticsearch.search.aggregations.pipeline.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,022,394
public static ParameterizedType providerOf(Type providedType) { return newParameterizedType(Provider.class, providedType); }
static ParameterizedType function(Type providedType) { return newParameterizedType(Provider.class, providedType); }
/** * Returns a type modelling a {@link Provider} that provides elements of type * {@code elementType}. * * @return a {@link java.io.Serializable serializable} parameterized type. */
Returns a type modelling a <code>Provider</code> that provides elements of type elementType
providerOf
{ "repo_name": "easyfmxu/guice", "path": "core/src/com/google/inject/util/Types.java", "license": "apache-2.0", "size": 4633 }
[ "com.google.inject.Provider", "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type" ]
import com.google.inject.Provider; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type;
import com.google.inject.*; import java.lang.reflect.*;
[ "com.google.inject", "java.lang" ]
com.google.inject; java.lang;
584,938
public MetaProperty<Currency> currency() { return currency; }
MetaProperty<Currency> function() { return currency; }
/** * The meta-property for the {@code currency} property. * @return the meta-property, not null */
The meta-property for the currency property
currency
{ "repo_name": "jmptrader/Strata", "path": "modules/product/src/main/java/com/opengamma/strata/product/swap/type/OvernightRateSwapLegConvention.java", "license": "apache-2.0", "size": 60593 }
[ "com.opengamma.strata.basics.currency.Currency", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.basics.currency.Currency; import org.joda.beans.MetaProperty;
import com.opengamma.strata.basics.currency.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
2,212,573
public static HttpClientBuilder custom() { return HttpClients.custom(); }
static HttpClientBuilder function() { return HttpClients.custom(); }
/** * Creates builder object for construction of custom * {@link CloseableHttpClient} instances. */
Creates builder object for construction of custom <code>CloseableHttpClient</code> instances
custom
{ "repo_name": "tianma8023/FreeShadowSocksSpider", "path": "src/tianma/ss/spider/http/HttpClientsProxy.java", "license": "apache-2.0", "size": 2738 }
[ "org.apache.http.impl.client.HttpClientBuilder", "org.apache.http.impl.client.HttpClients" ]
import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.client.*;
[ "org.apache.http" ]
org.apache.http;
322,824
private void initialize() { //register counting event at esper engine HashMap<String, Object> eventProperties = new HashMap<String, Object>(); eventProperties.put(MapEvent.START_KEY, Long.class); eventProperties.put(MapEvent.END_KEY, Long.class); eventProperties.put(MapEvent.CAUSALITY_KEY, Vector.clas...
void function() { HashMap<String, Object> eventProperties = new HashMap<String, Object>(); eventProperties.put(MapEvent.START_KEY, Long.class); eventProperties.put(MapEvent.END_KEY, Long.class); eventProperties.put(MapEvent.CAUSALITY_KEY, Vector.class); this.eventName = this.inputEventName + Constants.REPETIVITE_COUNT_...
/** * initializes this listener */
initializes this listener
initialize
{ "repo_name": "52North/SES", "path": "52n-ses-eml-001/src/main/java/org/n52/ses/eml/v001/filterlogic/esper/CountingListener.java", "license": "gpl-2.0", "size": 3598 }
[ "java.util.HashMap", "java.util.Vector", "org.n52.ses.api.event.MapEvent", "org.n52.ses.eml.v001.Constants" ]
import java.util.HashMap; import java.util.Vector; import org.n52.ses.api.event.MapEvent; import org.n52.ses.eml.v001.Constants;
import java.util.*; import org.n52.ses.api.event.*; import org.n52.ses.eml.v001.*;
[ "java.util", "org.n52.ses" ]
java.util; org.n52.ses;
559,027
Connection getTransportConnection();
Connection getTransportConnection();
/** * return the underlying Connection. * * @return the connection */
return the underlying Connection
getTransportConnection
{ "repo_name": "wildfly/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/spi/core/protocol/RemotingConnection.java", "license": "apache-2.0", "size": 5093 }
[ "org.apache.activemq.artemis.spi.core.remoting.Connection" ]
import org.apache.activemq.artemis.spi.core.remoting.Connection;
import org.apache.activemq.artemis.spi.core.remoting.*;
[ "org.apache.activemq" ]
org.apache.activemq;
672,411
public static <E> Set<E> unmodifiableSet(final Set<? extends E> set) { if (set instanceof Unmodifiable) { @SuppressWarnings("unchecked") // safe to upcast final Set<E> tmpSet = (Set<E>) set; return tmpSet; } return new UnmodifiableSet<E>(set); } /...
static <E> Set<E> function(final Set<? extends E> set) { if (set instanceof Unmodifiable) { @SuppressWarnings(STR) final Set<E> tmpSet = (Set<E>) set; return tmpSet; } return new UnmodifiableSet<E>(set); } @SuppressWarnings(STR) private UnmodifiableSet(final Set<? extends E> set) { super((Set<E>) set); }
/** * Factory method to create an unmodifiable set. * * @param <E> the element type * @param set the set to decorate, must not be null * @return a new unmodifiable set * @throws IllegalArgumentException if set is null * @since 4.0 */
Factory method to create an unmodifiable set
unmodifiableSet
{ "repo_name": "krivachy/compgs03_mutation_testing", "path": "src/main/java/org/apache/commons/collections4/set/UnmodifiableSet.java", "license": "apache-2.0", "size": 3540 }
[ "java.util.Set", "org.apache.commons.collections4.Unmodifiable" ]
import java.util.Set; import org.apache.commons.collections4.Unmodifiable;
import java.util.*; import org.apache.commons.collections4.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
707,254
public static Item parse(XContentParser parser, Item item) throws IOException { XContentParser.Token token; String currentFieldName = null; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) ...
static Item function(XContentParser parser, Item item) throws IOException { XContentParser.Token token; String currentFieldName = null; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { currentFieldName = parser.currentName(); } else if (currentFie...
/** * Parses and returns the given item. */
Parses and returns the given item
parse
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/query/MoreLikeThisQueryBuilder.java", "license": "apache-2.0", "size": 50007 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.elasticsearch.ElasticsearchParseException", "org.elasticsearch.action.termvectors.TermVectorsRequest", "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.common.xco...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.termvectors.TermVectorsRequest; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentParser; import org.e...
import java.io.*; import java.util.*; import org.elasticsearch.*; import org.elasticsearch.action.termvectors.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.*;
[ "java.io", "java.util", "org.elasticsearch", "org.elasticsearch.action", "org.elasticsearch.common", "org.elasticsearch.index" ]
java.io; java.util; org.elasticsearch; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.index;
1,756,116
public byte[] getBytes() throws IOException { if (dataSources == null) { return null; } InputStream is = getGunzipedInputStream(); if (is == null) { return null; } byte[] bytes = IOUtils.convertStreamToBytes(is); return bytes; }
byte[] function() throws IOException { if (dataSources == null) { return null; } InputStream is = getGunzipedInputStream(); if (is == null) { return null; } byte[] bytes = IOUtils.convertStreamToBytes(is); return bytes; }
/** Get the bytes of the uncompressed data. * * * @return * @throws IOException */
Get the bytes of the uncompressed data
getBytes
{ "repo_name": "InformaticsMatters/squonk", "path": "components/common/src/main/java/org/squonk/types/AbstractStreamType.java", "license": "apache-2.0", "size": 6800 }
[ "java.io.IOException", "java.io.InputStream", "org.squonk.util.IOUtils" ]
import java.io.IOException; import java.io.InputStream; import org.squonk.util.IOUtils;
import java.io.*; import org.squonk.util.*;
[ "java.io", "org.squonk.util" ]
java.io; org.squonk.util;
564,856
public OpenIDUserRPDO[] getOpenIDUserRPs(String userName) throws IdentityException { Connection connection = null; PreparedStatement prepStmt = null; ResultSet results = null; OpenIDUserRPDO[] rpDOs = null; List<OpenIDUserRPDO> rpdos = new ArrayList<>(); connection ...
OpenIDUserRPDO[] function(String userName) throws IdentityException { Connection connection = null; PreparedStatement prepStmt = null; ResultSet results = null; OpenIDUserRPDO[] rpDOs = null; List<OpenIDUserRPDO> rpdos = new ArrayList<>(); connection = JDBCPersistenceManager.getInstance().getDBConnection(); try { prepS...
/** * Returns relying party user settings corresponding to a given user name. * * @param userName Unique user name * @return OpenIDUserRPDO, corresponding to the provided user name and RP * url. * @throws IdentityException */
Returns relying party user settings corresponding to a given user name
getOpenIDUserRPs
{ "repo_name": "uvindra/carbon-identity", "path": "components/openid/org.wso2.carbon.identity.provider/src/main/java/org/wso2/carbon/identity/provider/openid/dao/OpenIDUserRPDAO.java", "license": "apache-2.0", "size": 15879 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.ArrayList", "java.util.List", "org.wso2.carbon.identity.base.IdentityException", "org.wso2.carbon.identity.core.model.OpenIDUserRPDO", "org.wso2.carbon.identity.core.persistence.JDBCPersist...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.core.model.OpenIDUserRPDO; import org.wso2.carbon.identity.co...
import java.sql.*; import java.util.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.core.model.*; import org.wso2.carbon.identity.core.persistence.*; import org.wso2.carbon.identity.core.util.*;
[ "java.sql", "java.util", "org.wso2.carbon" ]
java.sql; java.util; org.wso2.carbon;
2,043,403
public void setAnnotations(String annotations) { m_annotations = AnnotationTypeEnum.valueOf(annotations); }
void function(String annotations) { m_annotations = AnnotationTypeEnum.valueOf(annotations); }
/** * Sets the annotation type for the suite. If this value is not explicitly set, * the suite annotation type defaults to the default annotation type. see * setDefaultAnnotations * @param annotations one of the two string constant JAVADOC_ANNOTATION_TYPE or * JDK5_ANNOTATION_TYPE. * @see #JAVADOC_...
Sets the annotation type for the suite. If this value is not explicitly set, the suite annotation type defaults to the default annotation type. see setDefaultAnnotations
setAnnotations
{ "repo_name": "virtix/testng", "path": "src/org/testng/xml/XmlSuite.java", "license": "apache-2.0", "size": 14907 }
[ "org.testng.internal.AnnotationTypeEnum" ]
import org.testng.internal.AnnotationTypeEnum;
import org.testng.internal.*;
[ "org.testng.internal" ]
org.testng.internal;
1,171,017
public static FileMaxSCNHandler create(Config config) throws IOException, DatabusException, InvalidConfigException { return create(config.build()); }
static FileMaxSCNHandler function(Config config) throws IOException, DatabusException, InvalidConfigException { return create(config.build()); }
/** * Factory method for dependency injection * * @param config the MaxSCN handler configuration builder * @return a new handler object */
Factory method for dependency injection
create
{ "repo_name": "rahuljoshi123/databus", "path": "databus-core/databus-core-impl/src/main/java/com/linkedin/databus2/core/seq/FileMaxSCNHandler.java", "license": "apache-2.0", "size": 9943 }
[ "com.linkedin.databus.core.util.InvalidConfigException", "com.linkedin.databus2.core.DatabusException", "java.io.IOException" ]
import com.linkedin.databus.core.util.InvalidConfigException; import com.linkedin.databus2.core.DatabusException; import java.io.IOException;
import com.linkedin.databus.core.util.*; import com.linkedin.databus2.core.*; import java.io.*;
[ "com.linkedin.databus", "com.linkedin.databus2", "java.io" ]
com.linkedin.databus; com.linkedin.databus2; java.io;
191,948
public List<Contentlet> findByStructure(String structureInode, User user, boolean respectFrontendRoles, int limit, int offset) throws DotDataException, DotSecurityException;
List<Contentlet> function(String structureInode, User user, boolean respectFrontendRoles, int limit, int offset) throws DotDataException, DotSecurityException;
/** * Returns all Contentlets for a specific structure * @param structureInode * @param user * @param respectFrontendRoles * @param limit * @param offset * @return * @throws DotDataException * @throws DotSecurityException */
Returns all Contentlets for a specific structure
findByStructure
{ "repo_name": "guhb/core", "path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPI.java", "license": "gpl-3.0", "size": 64730 }
[ "com.dotmarketing.exception.DotDataException", "com.dotmarketing.exception.DotSecurityException", "com.dotmarketing.portlets.contentlet.model.Contentlet", "com.liferay.portal.model.User", "java.util.List" ]
import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.liferay.portal.model.User; import java.util.List;
import com.dotmarketing.exception.*; import com.dotmarketing.portlets.contentlet.model.*; import com.liferay.portal.model.*; import java.util.*;
[ "com.dotmarketing.exception", "com.dotmarketing.portlets", "com.liferay.portal", "java.util" ]
com.dotmarketing.exception; com.dotmarketing.portlets; com.liferay.portal; java.util;
290,452
public void addDecorators(DayViewDecorator... decorators) { addDecorators(Arrays.asList(decorators)); }
void function(DayViewDecorator... decorators) { addDecorators(Arrays.asList(decorators)); }
/** * Add several day decorators * * @param decorators decorators to add */
Add several day decorators
addDecorators
{ "repo_name": "xu6148152/binea_project_for_android", "path": "material_calendar/src/main/java/com/prolificinteractive/materialcalendarview/MaterialCalendarView.java", "license": "mit", "size": 49477 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,020,361
EClass getTraceOptions_();
EClass getTraceOptions_();
/** * Returns the meta object for class '{@link cruise.umple.umple.TraceOptions_ <em>Trace Options </em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Trace Options </em>'. * @see cruise.umple.umple.TraceOptions_ * @generated */
Returns the meta object for class '<code>cruise.umple.umple.TraceOptions_ Trace Options </code>'.
getTraceOptions_
{ "repo_name": "ahmedvc/umple", "path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java", "license": "mit", "size": 485842 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
392,383
public static Function<String,String> upper() { return StringFunctions.UPPER; }
static Function<String,String> function() { return StringFunctions.UPPER; }
/** * Get a Function for upper casing a String. * * <P>The returned function will pass through null values.</P> * * @return The upper casing function * @see String#toUpperCase() */
Get a Function for upper casing a String. The returned function will pass through null values
upper
{ "repo_name": "acmyonghua/eucalyptus", "path": "clc/modules/msgs/src/main/java/com/eucalyptus/util/Strings.java", "license": "gpl-3.0", "size": 7495 }
[ "com.google.common.base.Function" ]
import com.google.common.base.Function;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
439,330
TContext ctx = new TContext("urn:x:"); // Make it try { ctx.lookup("urn:x:y"); // Lookup a nonexistent binding fail("Got a binding that doesn't exist"); // Got something? Yikes. } catch (NameNotFoundException ignored) {} try { ctx.bind("urn:y:z", this); // Bind a...
TContext ctx = new TContext(STR); try { ctx.lookup(STR); fail(STR); } catch (NameNotFoundException ignored) {} try { ctx.bind(STR, this); fail(STR); } catch (InvalidNameException ignored) {} ctx.bind(STR, this); assertSame(this, ctx.lookup(STR)); try { ctx.bind(STR, getClass()); fail(STR); } catch (NameAlreadyBoundExce...
/** * Test various aspects of the test context. * * @throws NamingException if an error occurs. */
Test various aspects of the test context
testTestContext
{ "repo_name": "apache/oodt", "path": "commons/src/test/java/org/apache/oodt/commons/object/jndi/TestContextTest.java", "license": "apache-2.0", "size": 3851 }
[ "javax.naming.Binding", "javax.naming.InvalidNameException", "javax.naming.NameAlreadyBoundException", "javax.naming.NameClassPair", "javax.naming.NameNotFoundException", "javax.naming.NamingEnumeration" ]
import javax.naming.Binding; import javax.naming.InvalidNameException; import javax.naming.NameAlreadyBoundException; import javax.naming.NameClassPair; import javax.naming.NameNotFoundException; import javax.naming.NamingEnumeration;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
2,899,497
Map<String, Object> setUserPassword(String token, String newPassword) throws UserNotFoundException, UserExternallyManagedException, ServiceLayerException;
Map<String, Object> setUserPassword(String token, String newPassword) throws UserNotFoundException, UserExternallyManagedException, ServiceLayerException;
/** * Set user password - forgot password token * * @param token forgot password token * @param newPassword new password * @return true if uses's password is successfully set */
Set user password - forgot password token
setUserPassword
{ "repo_name": "craftercms/studio2", "path": "src/main/java/org/craftercms/studio/api/v1/service/security/SecurityService.java", "license": "gpl-3.0", "size": 5085 }
[ "java.util.Map", "org.craftercms.studio.api.v1.exception.ServiceLayerException", "org.craftercms.studio.api.v1.exception.security.UserExternallyManagedException", "org.craftercms.studio.api.v1.exception.security.UserNotFoundException" ]
import java.util.Map; import org.craftercms.studio.api.v1.exception.ServiceLayerException; import org.craftercms.studio.api.v1.exception.security.UserExternallyManagedException; import org.craftercms.studio.api.v1.exception.security.UserNotFoundException;
import java.util.*; import org.craftercms.studio.api.v1.exception.*; import org.craftercms.studio.api.v1.exception.security.*;
[ "java.util", "org.craftercms.studio" ]
java.util; org.craftercms.studio;
1,301,776
@Override @SuppressWarnings("unchecked") protected Object toReflectionType(final Object value) { FieldDescriptor descriptor = getDescriptor(); if (descriptor.isRepeated()) { if (descriptor.getJavaType() == FieldDescriptor.JavaType.ENUM) { // Must convert the whole list. ...
@SuppressWarnings(STR) Object function(final Object value) { FieldDescriptor descriptor = getDescriptor(); if (descriptor.isRepeated()) { if (descriptor.getJavaType() == FieldDescriptor.JavaType.ENUM) { final List result = new ArrayList(); for (final Object element : (List) value) { result.add(singularToReflectionType(...
/** * Convert from the type used by the native accessors to the type used * by reflection accessors. E.g., for enums, the reflection accessors use * EnumValueDescriptors but the native accessors use the generated enum * type. */
Convert from the type used by the native accessors to the type used by reflection accessors. E.g., for enums, the reflection accessors use EnumValueDescriptors but the native accessors use the generated enum type
toReflectionType
{ "repo_name": "legrosbuffle/kythe", "path": "third_party/proto/java/core/src/main/java/com/google/protobuf/GeneratedMessage.java", "license": "apache-2.0", "size": 112277 }
[ "com.google.protobuf.Descriptors", "java.util.ArrayList", "java.util.List" ]
import com.google.protobuf.Descriptors; import java.util.ArrayList; import java.util.List;
import com.google.protobuf.*; import java.util.*;
[ "com.google.protobuf", "java.util" ]
com.google.protobuf; java.util;
2,300,773
public IdScheme getIdSchemeProperty() { String scheme = getIdScheme(); return IdScheme.from( scheme ); }
IdScheme function() { String scheme = getIdScheme(); return IdScheme.from( scheme ); }
/** * Returns the general identifier scheme. IdScheme.NULL is returned if * scheme has not been set. */
Returns the general identifier scheme. IdScheme.NULL is returned if scheme has not been set
getIdSchemeProperty
{ "repo_name": "uonafya/jphes-core", "path": "dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/datavalueset/DataValueSet.java", "license": "bsd-3-clause", "size": 10762 }
[ "org.hisp.dhis.common.IdScheme" ]
import org.hisp.dhis.common.IdScheme;
import org.hisp.dhis.common.*;
[ "org.hisp.dhis" ]
org.hisp.dhis;
1,233,925
protected int readGenerationNumber() throws IOException { int retval = readInt(); if(retval < 0 || retval > GENERATION_NUMBER_THRESHOLD) { throw new IOException("Generation Number '" + retval + "' has more than 5 digits"); } return retval; }
int function() throws IOException { int retval = readInt(); if(retval < 0 retval > GENERATION_NUMBER_THRESHOLD) { throw new IOException(STR + retval + STR); } return retval; }
/** * This will read a integer from the Stream and throw an {@link IllegalArgumentException} if the integer value * has more than the maximum object revision (i.e. : bigger than {@link #GENERATION_NUMBER_THRESHOLD}) * @return the generation number being read. * @throws IOException if an I/O error oc...
This will read a integer from the Stream and throw an <code>IllegalArgumentException</code> if the integer value has more than the maximum object revision (i.e. : bigger than <code>#GENERATION_NUMBER_THRESHOLD</code>)
readGenerationNumber
{ "repo_name": "apache/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java", "license": "apache-2.0", "size": 43341 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,957,041
public int deleteCascade( PreparedQuery<SpatialReferenceSystem> preparedDelete) throws SQLException { int count = 0; if (preparedDelete != null) { List<SpatialReferenceSystem> srsList = query(preparedDelete); count = deleteCascade(srsList); } return count; }
int function( PreparedQuery<SpatialReferenceSystem> preparedDelete) throws SQLException { int count = 0; if (preparedDelete != null) { List<SpatialReferenceSystem> srsList = query(preparedDelete); count = deleteCascade(srsList); } return count; }
/** * Delete the Spatial Reference Systems matching the prepared query, * cascading * * @param preparedDelete * @return * @throws SQLException */
Delete the Spatial Reference Systems matching the prepared query, cascading
deleteCascade
{ "repo_name": "boundlessgeo/geopackage-core-java", "path": "src/main/java/mil/nga/geopackage/core/srs/SpatialReferenceSystemDao.java", "license": "mit", "size": 10622 }
[ "com.j256.ormlite.stmt.PreparedQuery", "java.sql.SQLException", "java.util.List" ]
import com.j256.ormlite.stmt.PreparedQuery; import java.sql.SQLException; import java.util.List;
import com.j256.ormlite.stmt.*; import java.sql.*; import java.util.*;
[ "com.j256.ormlite", "java.sql", "java.util" ]
com.j256.ormlite; java.sql; java.util;
2,373,100
public TIFFField[] getTIFFFields() { // Allocate return value. TIFFField[] fields = new TIFFField[numLowFields + highFields.size()]; // Copy any low-index fields. int nextIndex = 0; for(int i = 0; i <= MAX_LOW_FIELD_TAG_NUM; i++) { if(lowFields[i] != null) { ...
TIFFField[] function() { TIFFField[] fields = new TIFFField[numLowFields + highFields.size()]; int nextIndex = 0; for(int i = 0; i <= MAX_LOW_FIELD_TAG_NUM; i++) { if(lowFields[i] != null) { fields[nextIndex++] = lowFields[i]; if(nextIndex == numLowFields) break; } } if(!highFields.isEmpty()) { Iterator keys = highFiel...
/** * Retrieves all TIFF fields from the directory. * * @return An array of all TIFF fields in order of numerically increasing * tag number. */
Retrieves all TIFF fields from the directory
getTIFFFields
{ "repo_name": "stelfrich/bioformats", "path": "components/forks/jai/src/com/sun/media/imageio/plugins/tiff/TIFFDirectory.java", "license": "gpl-2.0", "size": 20161 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,043,985
public void testTailSetContents() { COWNavigableSet set = set5(); SortedSet sm = set.tailSet(two); assertFalse(sm.contains(one)); assertTrue(sm.contains(two)); assertTrue(sm.contains(three)); assertTrue(sm.contains(four)); assertTrue(sm.contains(five)); ...
void function() { COWNavigableSet set = set5(); SortedSet sm = set.tailSet(two); assertFalse(sm.contains(one)); assertTrue(sm.contains(two)); assertTrue(sm.contains(three)); assertTrue(sm.contains(four)); assertTrue(sm.contains(five)); Iterator i = sm.iterator(); Object k; k = (Integer)(i.next()); assertEquals(two, k);...
/** * tailSet returns set with keys in requested range */
tailSet returns set with keys in requested range
testTailSetContents
{ "repo_name": "kumarrus/voltdb", "path": "tests/frontend/org/voltcore/utils/TestCOWNavigableSet.java", "license": "agpl-3.0", "size": 31268 }
[ "java.util.Iterator", "java.util.Random", "java.util.SortedSet" ]
import java.util.Iterator; import java.util.Random; import java.util.SortedSet;
import java.util.*;
[ "java.util" ]
java.util;
174,974
public static long bytesToUInt32(byte[] arr, int start) { return (((long)ByteBuffer.wrap(arr, start, 4).order(ByteOrder.LITTLE_ENDIAN).getInt()) & 0xFFFFFFFFL); }
static long function(byte[] arr, int start) { return (((long)ByteBuffer.wrap(arr, start, 4).order(ByteOrder.LITTLE_ENDIAN).getInt()) & 0xFFFFFFFFL); }
/** * Returns the unsigned int value for the specified bytes array in little endian format, * from a specified index start in the array and 4 bytes length. * * @param arr input bytes array that contains the value to convert * @param start start index in the array of the...
Returns the unsigned int value for the specified bytes array in little endian format, from a specified index start in the array and 4 bytes length
bytesToUInt32
{ "repo_name": "flyloong/BlueSTSDK", "path": "BlueSTSDK/src/main/java/com/st/BlueSTSDK/Utils/NumberConversion.java", "license": "bsd-3-clause", "size": 18443 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
884,717
public ScriptNode copy(ScriptNode destination) { ScriptNode copy = copy(destination, false); // ALF-9517 fix if (copy != null && copy.hasAspect(ContentModel.ASPECT_VERSIONABLE.toString())) { copy.ensureVersioningEnabled(true, true); } return copy; ...
ScriptNode function(ScriptNode destination) { ScriptNode copy = copy(destination, false); if (copy != null && copy.hasAspect(ContentModel.ASPECT_VERSIONABLE.toString())) { copy.ensureVersioningEnabled(true, true); } return copy; }
/** * Copy this Node to a new parent destination. Note that children of the source Node are not copied. * * @param destination Node * * @return The newly copied Node instance or null if failed to copy. */
Copy this Node to a new parent destination. Note that children of the source Node are not copied
copy
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/jscript/ScriptNode.java", "license": "lgpl-3.0", "size": 153865 }
[ "org.alfresco.model.ContentModel" ]
import org.alfresco.model.ContentModel;
import org.alfresco.model.*;
[ "org.alfresco.model" ]
org.alfresco.model;
1,281,830
@Override public NodeState reset(@Nonnull NodeBuilder builder) { checkArgument(builder instanceof MemoryNodeBuilder); NodeState head = getRoot(); ((MemoryNodeBuilder) builder).reset(head); return head; }
NodeState function(@Nonnull NodeBuilder builder) { checkArgument(builder instanceof MemoryNodeBuilder); NodeState head = getRoot(); ((MemoryNodeBuilder) builder).reset(head); return head; }
/** * This implementation is equal resetting the builder to the root of the store and returning * the resulting node state from the builder. * @param builder the builder to reset * @return the node state resulting from the reset. * @throws IllegalArgumentException if the builder is not acquired...
This implementation is equal resetting the builder to the root of the store and returning the resulting node state from the builder
reset
{ "repo_name": "chetanmeh/jackrabbit-oak", "path": "oak-store-spi/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java", "license": "apache-2.0", "size": 11449 }
[ "com.google.common.base.Preconditions", "javax.annotation.Nonnull", "org.apache.jackrabbit.oak.spi.state.NodeBuilder", "org.apache.jackrabbit.oak.spi.state.NodeState" ]
import com.google.common.base.Preconditions; import javax.annotation.Nonnull; import org.apache.jackrabbit.oak.spi.state.NodeBuilder; import org.apache.jackrabbit.oak.spi.state.NodeState;
import com.google.common.base.*; import javax.annotation.*; import org.apache.jackrabbit.oak.spi.state.*;
[ "com.google.common", "javax.annotation", "org.apache.jackrabbit" ]
com.google.common; javax.annotation; org.apache.jackrabbit;
927,268
@Override protected void createDocuments(WebScriptResponse res, String store, InputStream in) { try { DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document document; document = documentBuilder.parse(i...
void function(WebScriptResponse res, String store, InputStream in) { try { DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document document; document = documentBuilder.parse(in); Element docEl = document.getDocumentElement(); Transformer transformer = ADMRemoteStore.this.tr...
/** * Creates multiple XML documents encapsulated in a single one. * * @param res WebScriptResponse * @param store String * @param in XML document containing multiple document contents to write */
Creates multiple XML documents encapsulated in a single one
createDocuments
{ "repo_name": "Alfresco/community-edition", "path": "projects/remote-api/source/java/org/alfresco/repo/web/scripts/bean/ADMRemoteStore.java", "license": "lgpl-3.0", "size": 48679 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.InputStream", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.transform.Transformer", "javax.xml.transform.dom.DOMSource", "javax.xml.transform.stream.StreamResult", "org.alfresco.er...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.Transformer; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResu...
import java.io.*; import javax.xml.parsers.*; import javax.xml.transform.*; import javax.xml.transform.dom.*; import javax.xml.transform.stream.*; import org.alfresco.error.*; import org.alfresco.repo.security.permissions.*; import org.alfresco.service.cmr.model.*; import org.springframework.extensions.webscripts.*; im...
[ "java.io", "javax.xml", "org.alfresco.error", "org.alfresco.repo", "org.alfresco.service", "org.springframework.extensions", "org.w3c.dom" ]
java.io; javax.xml; org.alfresco.error; org.alfresco.repo; org.alfresco.service; org.springframework.extensions; org.w3c.dom;
752,194
@Test public void testApply() { Vector x = Vector.of(1.0, 1.0, 1.0); //test global minimum assertEquals(-1.0, function.f(x), EPSILON); //test another point x.setReal(0, 0.5); x.setReal(1, 1.0); x.setReal(2, 0.5); assertEquals(-0.845039, function....
void function() { Vector x = Vector.of(1.0, 1.0, 1.0); assertEquals(-1.0, function.f(x), EPSILON); x.setReal(0, 0.5); x.setReal(1, 1.0); x.setReal(2, 0.5); assertEquals(-0.845039, function.f(x), EPSILON); }
/** * Test of evaluate method, of class {@link Norwegian}. */
Test of evaluate method, of class <code>Norwegian</code>
testApply
{ "repo_name": "filinep/cilib", "path": "library/src/test/java/net/sourceforge/cilib/functions/continuous/unconstrained/NorwegianTest.java", "license": "gpl-3.0", "size": 1107 }
[ "net.sourceforge.cilib.type.types.container.Vector", "org.junit.Assert" ]
import net.sourceforge.cilib.type.types.container.Vector; import org.junit.Assert;
import net.sourceforge.cilib.type.types.container.*; import org.junit.*;
[ "net.sourceforge.cilib", "org.junit" ]
net.sourceforge.cilib; org.junit;
2,239,915
public static boolean fillPartitionId(final CompactionPartitionId id, final Date firstDayOfCurrentMonth, final Date firstDayOfCurrentWeek, final String dateStr, final MobCompactPartitionPolicy policy, final Calendar calendar, final long threshold) { boolean skipCompcation = false; id.setThreshold...
static boolean function(final CompactionPartitionId id, final Date firstDayOfCurrentMonth, final Date firstDayOfCurrentWeek, final String dateStr, final MobCompactPartitionPolicy policy, final Calendar calendar, final long threshold) { boolean skipCompcation = false; id.setThreshold(threshold); if (threshold <= 0) { id...
/** * fill out partition id based on compaction policy and date, threshold... * @param id Partition id to be filled out * @param firstDayOfCurrentMonth The first day in the current month * @param firstDayOfCurrentWeek The first day in the current week * @param dateStr Date string from the mob file * @...
fill out partition id based on compaction policy and date, threshold..
fillPartitionId
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobUtils.java", "license": "apache-2.0", "size": 40751 }
[ "java.text.ParseException", "java.util.Calendar", "java.util.Date", "org.apache.hadoop.hbase.client.MobCompactPartitionPolicy", "org.apache.hadoop.hbase.mob.compactions.PartitionedMobCompactionRequest" ]
import java.text.ParseException; import java.util.Calendar; import java.util.Date; import org.apache.hadoop.hbase.client.MobCompactPartitionPolicy; import org.apache.hadoop.hbase.mob.compactions.PartitionedMobCompactionRequest;
import java.text.*; import java.util.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.mob.compactions.*;
[ "java.text", "java.util", "org.apache.hadoop" ]
java.text; java.util; org.apache.hadoop;
1,170,183
@ServiceMethod(returns = ReturnType.SINGLE) boolean checkExistence( String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion);
@ServiceMethod(returns = ReturnType.SINGLE) boolean checkExistence( String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion);
/** * Checks whether a resource exists. * * @param resourceGroupName The name of the resource group containing the resource to check. The name is case * insensitive. * @param resourceProviderNamespace The resource provider of the resource to check. * @param parentResourcePath The paren...
Checks whether a resource exists
checkExistence
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java", "license": "mit", "size": 94978 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
1,917,026
private static void insertNewElevation(Connection con, LatLng coord, double elev) { String query = "INSERT INTO Elevations VALUES(" + coord.getLat() + "," + coord.getLng() + "," + LatLng.round(elev) + ")"; PreparedStatement stmt = null; try { stmt = con.prepareStatement(query); stmt.execute(); ...
static void function(Connection con, LatLng coord, double elev) { String query = STR + coord.getLat() + "," + coord.getLng() + "," + LatLng.round(elev) + ")"; PreparedStatement stmt = null; try { stmt = con.prepareStatement(query); stmt.execute(); stmt.clearBatch(); stmt.close(); } catch (SQLException e) { e.printStack...
/** * Returns a SQL query to insert the elevation of the coordinates into the * database * * @param con * Connection to the DataBase * @param coord * Coordinates of the point to insert * @param elev * Elevation of the point */
Returns a SQL query to insert the elevation of the coordinates into the database
insertNewElevation
{ "repo_name": "ablanco/dissim", "path": "elevation/Elevation.java", "license": "gpl-3.0", "size": 9415 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
518,297
public DelaneySymbol<Integer> getOutcome() { return outcome; }
DelaneySymbol<Integer> function() { return outcome; }
/** * If no decision was made, returns the last result of manipulating the * input symbol in order to find one on which euclidicity can be determined * easier. In the current implementation, this is derived from a * pseudo-toroidal cover of the input symbol by applying a * {@link Simplifier}. ...
If no decision was made, returns the last result of manipulating the input symbol in order to find one on which euclidicity can be determined easier. In the current implementation, this is derived from a pseudo-toroidal cover of the input symbol by applying a <code>Simplifier</code>
getOutcome
{ "repo_name": "odf/gavrog", "path": "src/org/gavrog/joss/dsyms/derived/EuclidicityTester.java", "license": "apache-2.0", "size": 17210 }
[ "org.gavrog.joss.dsyms.basic.DelaneySymbol" ]
import org.gavrog.joss.dsyms.basic.DelaneySymbol;
import org.gavrog.joss.dsyms.basic.*;
[ "org.gavrog.joss" ]
org.gavrog.joss;
2,134,530
@Override protected void startDownload(int blocks) { if (blocks == 0) { doneDownload(); } else { synchronized (lockObject) { blocksToDownloadAtStart = blocks; String startDownloadText; if (blocks <= CRITERIA...
void function(int blocks) { if (blocks == 0) { doneDownload(); } else { synchronized (lockObject) { blocksToDownloadAtStart = blocks; String startDownloadText; if (blocks <= CRITERIA_LARGE_NUMBER_OF_BLOCKS) { startDownloadText = controller.getLocaliser().getString(STR, new Object[] {blocks}); } else { startDownloadText...
/** * Called when download is initiated. * * @param blocks * the number of blocks to download, estimated */
Called when download is initiated
startDownload
{ "repo_name": "GroestlCoin/MultiGroestl", "path": "src/main/java/org/multibit/network/MultiBitDownloadListener.java", "license": "mit", "size": 8423 }
[ "org.multibit.message.Message", "org.multibit.message.MessageManager", "org.multibit.viewsystem.swing.view.walletlist.SingleWalletPanelDownloadListener" ]
import org.multibit.message.Message; import org.multibit.message.MessageManager; import org.multibit.viewsystem.swing.view.walletlist.SingleWalletPanelDownloadListener;
import org.multibit.message.*; import org.multibit.viewsystem.swing.view.walletlist.*;
[ "org.multibit.message", "org.multibit.viewsystem" ]
org.multibit.message; org.multibit.viewsystem;
355,084
public static boolean reverseByteOrder( Class libraryClass ) { if( libraryClass == null ) { errorMessage( "Parameter 'libraryClass' null in method" + "'reverseByteOrder'" ); return false; } if( !Library.class.isAssignableFrom( lib...
static boolean function( Class libraryClass ) { if( libraryClass == null ) { errorMessage( STR + STR ); return false; } if( !Library.class.isAssignableFrom( libraryClass ) ) { errorMessage( STR + STR ); return false; } Object o = runMethod( libraryClass, STR, new Class[0], new Object[0] ); if( o == null ) { errorMessag...
/** * Return whether or not requires reversal of audio data byte-order. * @param libraryClass Derivitive of class 'Library'. * @return True if byte-order reversal is required. */
Return whether or not requires reversal of audio data byte-order
reverseByteOrder
{ "repo_name": "etyllica/etyllica", "path": "src/main/java/sound/paulscode/SoundSystemConfig.java", "license": "lgpl-3.0", "size": 35538 }
[ "java.lang.Boolean" ]
import java.lang.Boolean;
import java.lang.*;
[ "java.lang" ]
java.lang;
1,017,112
private static void writeLicenseList(String version, String releaseDate, ISpdxListedLicenseProvider licenseProvider, List<String> warnings, File dir, File textFolder, File htmlFolder, File templateFolder) throws SpdxListedLicenseException, IOException, LicenseTemplateRuleException, MustacheException { Charse...
static void function(String version, String releaseDate, ISpdxListedLicenseProvider licenseProvider, List<String> warnings, File dir, File textFolder, File htmlFolder, File templateFolder) throws SpdxListedLicenseException, IOException, LicenseTemplateRuleException, MustacheException { Charset utf8 = Charset.forName("U...
/** * Writes the index.html file and the individual license list HTML files * @param version License list version * @param releaseDate License list release date * @param licenseProvider Provides the licensing information * @param warnings Populated with any warnings if they occur * @param dir Directory stor...
Writes the index.html file and the individual license list HTML files
writeLicenseList
{ "repo_name": "romeara/spdx-tools", "path": "src/org/spdx/tools/LicenseRDFAGenerator.java", "license": "apache-2.0", "size": 18924 }
[ "com.github.mustachejava.MustacheException", "com.google.common.collect.Maps", "com.google.common.io.Files", "java.io.File", "java.io.IOException", "java.nio.charset.Charset", "java.util.Iterator", "java.util.List", "java.util.Map", "org.spdx.compare.LicenseCompareHelper", "org.spdx.html.License...
import com.github.mustachejava.MustacheException; import com.google.common.collect.Maps; import com.google.common.io.Files; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.Iterator; import java.util.List; import java.util.Map; import org.spdx.compare.LicenseCompareHelp...
import com.github.mustachejava.*; import com.google.common.collect.*; import com.google.common.io.*; import java.io.*; import java.nio.charset.*; import java.util.*; import org.spdx.*; import org.spdx.compare.*; import org.spdx.html.*; import org.spdx.rdfparser.license.*; import org.spdx.spdxspreadsheet.*;
[ "com.github.mustachejava", "com.google.common", "java.io", "java.nio", "java.util", "org.spdx", "org.spdx.compare", "org.spdx.html", "org.spdx.rdfparser", "org.spdx.spdxspreadsheet" ]
com.github.mustachejava; com.google.common; java.io; java.nio; java.util; org.spdx; org.spdx.compare; org.spdx.html; org.spdx.rdfparser; org.spdx.spdxspreadsheet;
517,358
void resetTempDir() throws IOException { // cleanup any existing snapshots. Path tmpdir = SnapshotDescriptionUtils.getWorkingSnapshotDir(rootDir); if (master.getMasterFileSystem().getFileSystem().exists(tmpdir)) { if (!master.getMasterFileSystem().getFileSystem().delete(tmpdir, true)) { LOG....
void resetTempDir() throws IOException { Path tmpdir = SnapshotDescriptionUtils.getWorkingSnapshotDir(rootDir); if (master.getMasterFileSystem().getFileSystem().exists(tmpdir)) { if (!master.getMasterFileSystem().getFileSystem().delete(tmpdir, true)) { LOG.warn(STR + tmpdir); } } }
/** * Cleans up any snapshots in the snapshot/.tmp directory that were left from failed * snapshot attempts. * * @throws IOException if we can't reach the filesystem */
Cleans up any snapshots in the snapshot/.tmp directory that were left from failed snapshot attempts
resetTempDir
{ "repo_name": "vincentpoon/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/snapshot/SnapshotManager.java", "license": "apache-2.0", "size": 49514 }
[ "java.io.IOException", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils" ]
import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.snapshot.SnapshotDescriptionUtils;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.snapshot.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,373,186
private void init() { this.setLayout(new BorderLayout()); // HEADER Box boxV = Box.createVerticalBox(); // DIALS/HTML+Bars Box boxH = Box.createHorizontalBox(); // DIALS Box boxV1 = Box.createVerticalBox(); // HTML/Bars Box boxV2 = Box.createVerticalBox(); // barChart Box boxH1 = Box...
void function() { this.setLayout(new BorderLayout()); Box boxV = Box.createVerticalBox(); Box boxH = Box.createHorizontalBox(); Box boxV1 = Box.createVerticalBox(); Box boxV2 = Box.createVerticalBox(); Box boxH1 = Box.createHorizontalBox(); boxV2.setPreferredSize(new Dimension(120, 120)); for (int i = 0; i < m_goals.le...
/** * Static/Dynamic Init */
Static/Dynamic Init
init
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/client/src/main/java-legacy/org/adempiere/apps/graph/PAPanel.java", "license": "gpl-2.0", "size": 5665 }
[ "java.awt.BorderLayout", "java.awt.Dimension", "javax.swing.Box", "javax.swing.JScrollPane", "javax.swing.ScrollPaneConstants" ]
import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.Box; import javax.swing.JScrollPane; import javax.swing.ScrollPaneConstants;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,665,011
Map<Class<?>, Mapper<?>> mappers = getMappers(manager, managerClass); Mapper<T> mapper = (Mapper<T>)mappers.get(klass); if (mapper == null) { synchronized (mappers) { mapper = (Mapper<T>)mappers.get(klass); if (mapper == null) { EntityMapp...
Map<Class<?>, Mapper<?>> mappers = getMappers(manager, managerClass); Mapper<T> mapper = (Mapper<T>)mappers.get(klass); if (mapper == null) { synchronized (mappers) { mapper = (Mapper<T>)mappers.get(klass); if (mapper == null) { EntityMapper<T> entityMapper = getEntityMapper(klass, manager); try { mapper = (Mapper<T>)i...
/** * Intercepter method for {@link MappingManager#getMapper} method that * modifies behavior of the original factory method and returns * {@link AuditManager} instance instead of {@link Mapper}. * * @param klass * @param manager * @param managerClass * @return */
Intercepter method for <code>MappingManager#getMapper</code> method that modifies behavior of the original factory method and returns <code>AuditManager</code> instance instead of <code>Mapper</code>
getMapper
{ "repo_name": "smartcat-labs/cassandra-audit", "path": "src/main/java/com/datastax/driver/mapping/AuditMappingManagerInterceptor.java", "license": "apache-2.0", "size": 5194 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,894,877
Intent createMarketSearchIntent(String query) { Uri marketSearchUri = Uri.parse("market://search") .buildUpon() .appendQueryParameter("c", "apps") .appendQueryParameter("q", query) .build(); return new Intent(Intent.ACTION_VIEW).setData...
Intent createMarketSearchIntent(String query) { Uri marketSearchUri = Uri.parse(STRcSTRappsSTRq", query) .build(); return new Intent(Intent.ACTION_VIEW).setData(marketSearchUri); } public interface Callbacks {
/** * Creates a new market search intent. */
Creates a new market search intent
createMarketSearchIntent
{ "repo_name": "enricocid/LaunchEnr", "path": "Launcher3-O-r12/src/main/java/com/enrico/launcher3/allapps/AllAppsSearchBarController.java", "license": "gpl-3.0", "size": 6384 }
[ "android.content.Intent", "android.net.Uri" ]
import android.content.Intent; import android.net.Uri;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
1,209,304
public static JsonEncoder createJsonStream(@Nonnull Appendable out, JsonSerializationContext context) { return new JsonEncoder(out, null, context); }
static JsonEncoder function(@Nonnull Appendable out, JsonSerializationContext context) { return new JsonEncoder(out, null, context); }
/** * Creates a Json instance that is suitable for output streaming, one * element at a time. This can help avoid building up an entire JavaScript * AST all in memory before it gets serialized, which can help cut down * memory use.<br> * * @param out The Appendable to which to write the se...
Creates a Json instance that is suitable for output streaming, one element at a time. This can help avoid building up an entire JavaScript AST all in memory before it gets serialized, which can help cut down memory use
createJsonStream
{ "repo_name": "forcedotcom/aura", "path": "aura-util/src/main/java/org/auraframework/util/json/JsonEncoder.java", "license": "apache-2.0", "size": 32866 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,497,731
EReference getSecurityConstraintSum_RTO();
EReference getSecurityConstraintSum_RTO();
/** * Returns the meta object for the reference '{@link CIM.IEC61970.Informative.MarketOperations.SecurityConstraintSum#getRTO <em>RTO</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>RTO</em>'. * @see CIM.IEC61970.Informative.MarketOperations.Security...
Returns the meta object for the reference '<code>CIM.IEC61970.Informative.MarketOperations.SecurityConstraintSum#getRTO RTO</code>'.
getSecurityConstraintSum_RTO
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java", "license": "mit", "size": 688294 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,431,859
public PrivateEndpoint privateEndpoint() { return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); }
PrivateEndpoint function() { return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); }
/** * Get the privateEndpoint property: Properties of the private endpoint object. * * @return the privateEndpoint value. */
Get the privateEndpoint property: Properties of the private endpoint object
privateEndpoint
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/models/PrivateEndpointConnectionInner.java", "license": "mit", "size": 5038 }
[ "com.azure.resourcemanager.keyvault.models.PrivateEndpoint" ]
import com.azure.resourcemanager.keyvault.models.PrivateEndpoint;
import com.azure.resourcemanager.keyvault.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,884,950
protected void visitBody(Node n) throws JasperException { if (n.getBody() != null) { n.getBody().visit(this); } }
void function(Node n) throws JasperException { if (n.getBody() != null) { n.getBody().visit(this); } }
/** * Visit the body of a node, using the current visitor */
Visit the body of a node, using the current visitor
visitBody
{ "repo_name": "mayonghui2112/helloWorld", "path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/jasper/compiler/Node.java", "license": "apache-2.0", "size": 76726 }
[ "org.apache.jasper.JasperException" ]
import org.apache.jasper.JasperException;
import org.apache.jasper.*;
[ "org.apache.jasper" ]
org.apache.jasper;
1,925,671
public RewardProvider createView(Configuration config) { return new RewardProvider(this, config); }
RewardProvider function(Configuration config) { return new RewardProvider(this, config); }
/** * Creates a copy of this reward provider with shallow references to the same list of rewards, except with a different * internal default reward type. This allows multiple copies of the provider to reference the same rewards, but use * a different default reward service. * @param config Configuration set...
Creates a copy of this reward provider with shallow references to the same list of rewards, except with a different internal default reward type. This allows multiple copies of the provider to reference the same rewards, but use a different default reward service
createView
{ "repo_name": "aadnk/ExperienceMod", "path": "ExperienceMod/src/main/java/com/comphenix/xp/rewards/RewardProvider.java", "license": "gpl-2.0", "size": 6498 }
[ "com.comphenix.xp.Configuration" ]
import com.comphenix.xp.Configuration;
import com.comphenix.xp.*;
[ "com.comphenix.xp" ]
com.comphenix.xp;
266,168
public int startEachIntent() { Intent[] intents = getIntents(); int activitiesStarted = 0; for (Intent i : intents) { try { context.startActivity(i); activitiesStarted++; } catch (ActivityNotFoundException | IllegalArgumentException e) ...
int function() { Intent[] intents = getIntents(); int activitiesStarted = 0; for (Intent i : intents) { try { context.startActivity(i); activitiesStarted++; } catch (ActivityNotFoundException IllegalArgumentException e) { e.printStackTrace(); } } return activitiesStarted; }
/** * Start all intents matching vendor name and API level * Exceptions are handled internally * * @return number of activities started */
Start all intents matching vendor name and API level Exceptions are handled internally
startEachIntent
{ "repo_name": "hexadec/KFGnaplo", "path": "app/src/main/java/hu/hexadec/killerwhale/OrcaManager.java", "license": "mit", "size": 5137 }
[ "android.content.ActivityNotFoundException", "android.content.Intent" ]
import android.content.ActivityNotFoundException; import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
1,610,668
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync( String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> createOrUpdateWithResponseAsync( String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters);
/** * Creates a resource. * * @param resourceGroupName The name of the resource group for the resource. The name is case insensitive. * @param resourceProviderNamespace The namespace of the resource provider. * @param parentResourcePath The parent resource identity. * @param resourceType T...
Creates a resource
createOrUpdateWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java", "license": "mit", "size": 91824 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.resources.fluent.models.GenericResourceInner", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.resources.fluent.models.GenericResourceInner; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.resources.fluent.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
2,296,249
public void serve(ServiceContext ctx);
void function(ServiceContext ctx);
/** * serve this request. input data is available in the context, and the * output data should be made available in the context. That is, this method * is meant for service to do its main processing, without worrying about * input and output data * * @param ctx */
serve this request. input data is available in the context, and the output data should be made available in the context. That is, this method is meant for service to do its main processing, without worrying about input and output data
serve
{ "repo_name": "simplity/simplity", "path": "simplity/core/src/main/java/org/simplity/core/app/IService.java", "license": "mit", "size": 6103 }
[ "org.simplity.core.service.ServiceContext" ]
import org.simplity.core.service.ServiceContext;
import org.simplity.core.service.*;
[ "org.simplity.core" ]
org.simplity.core;
2,014,332
public String getParmValue(Map<String, String> parmSet, String Tag);
String function(Map<String, String> parmSet, String Tag);
/** * Return a parameter value within an XML tag * <TAG Parameter="VALUE"> * * <br><br><b>Usage:</b> String ThisColHead=getParmValue(parmSet,"TD"); * @param parmSet set of parms to search * @param Tag Tag to search for * @return String Parameter value */
Return a parameter value within an XML tag Usage: String ThisColHead=getParmValue(parmSet,"TD")
getParmValue
{ "repo_name": "vjanmey/EpicMudfia", "path": "com/planet_ink/coffee_mud/Libraries/interfaces/XMLLibrary.java", "license": "apache-2.0", "size": 13107 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,298,251
public void removeUndoableEditListener( UndoableEditListener undoableEditListener) { undoableEditListeners.add(undoableEditListener); }
void function( UndoableEditListener undoableEditListener) { undoableEditListeners.add(undoableEditListener); }
/** * Remove the given UndoableEditListener * * @param undoableEditListener The listener to remove */
Remove the given UndoableEditListener
removeUndoableEditListener
{ "repo_name": "javagl/Flow", "path": "flow-gui/src/main/java/de/javagl/flow/gui/editor/FlowEditor.java", "license": "mit", "size": 25957 }
[ "javax.swing.event.UndoableEditListener" ]
import javax.swing.event.UndoableEditListener;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
2,719,596
public List<DhcpOption> findAllByIdentityAssocId(long identityAssocId);
List<DhcpOption> function(long identityAssocId);
/** * Find all by identity assoc id. * * @param identityAssocId the identity assoc id * * @return the list< dhcp option> */
Find all by identity assoc id
findAllByIdentityAssocId
{ "repo_name": "marosmars/dhcp", "path": "Jagornet-DHCP/src/com/jagornet/dhcp/db/DhcpOptionDAO.java", "license": "gpl-3.0", "size": 2117 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,889,862
private void logRenewDelegationToken(DelegationTokenIdentifier id, long expiryTime) throws IOException { synchronized (this) { getEditLog().logRenewDelegationToken(id, expiryTime); } getEditLog().logSync(); }
void function(DelegationTokenIdentifier id, long expiryTime) throws IOException { synchronized (this) { getEditLog().logRenewDelegationToken(id, expiryTime); } getEditLog().logSync(); }
/** * Log the renewDelegationToken operation to edit logs * * @param id identifer of the delegation token being renewed * @param expiryTime when delegation token expires */
Log the renewDelegationToken operation to edit logs
logRenewDelegationToken
{ "repo_name": "zhaobj/MyHadoop", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 214078 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier" ]
import java.io.IOException; import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
import java.io.*; import org.apache.hadoop.hdfs.security.token.delegation.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,348,028
public static ExternalToolInvoker runWMLScope( String installName, String resourcePath, boolean showProgress, OutputStream[] stdout, OutputStream[] stderr ) { Paths paths = Preferences.getPaths( installName ); if( ! ResourceUtils.isValidFilePath( resourcePath ) || ! ...
static ExternalToolInvoker function( String installName, String resourcePath, boolean showProgress, OutputStream[] stdout, OutputStream[] stderr ) { Paths paths = Preferences.getPaths( installName ); if( ! ResourceUtils.isValidFilePath( resourcePath ) ! checkWMLTool( paths, Tools.WMLSCOPE.toString( ) ) ) { return null;...
/** * Runs "wmlscope" on the specified resource (directory/file) * * @param installName * The name of the install to use when using the wmlscope script * @param resourcePath * the full path of the target where "wmlindent" will be runned * on * @param showPro...
Runs "wmlscope" on the specified resource (directory/file)
runWMLScope
{ "repo_name": "asimonov-im/wesnoth", "path": "utils/umc_dev/org.wesnoth/src/org/wesnoth/utils/WMLTools.java", "license": "gpl-2.0", "size": 24334 }
[ "java.io.File", "java.io.OutputStream", "java.util.ArrayList", "java.util.List", "org.wesnoth.preferences.Preferences" ]
import java.io.File; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import org.wesnoth.preferences.Preferences;
import java.io.*; import java.util.*; import org.wesnoth.preferences.*;
[ "java.io", "java.util", "org.wesnoth.preferences" ]
java.io; java.util; org.wesnoth.preferences;
1,420,827
public void setWebSocketsEnabled(final Boolean webSocketsEnabledValue) { this.webSocketsEnabled = webSocketsEnabledValue; } public WebSiteGetConfigurationResponse() { this.setAppSettings(new LazyHashMap<String, String>()); this.setConnectionStrings(new LazyArrayList<Connect...
void function(final Boolean webSocketsEnabledValue) { this.webSocketsEnabled = webSocketsEnabledValue; } public WebSiteGetConfigurationResponse() { this.setAppSettings(new LazyHashMap<String, String>()); this.setConnectionStrings(new LazyArrayList<ConnectionStringInfo>()); this.setDefaultDocuments(new LazyArrayList<Str...
/** * Optional. True if Web Sockets are enabled; otherwise, false. * @param webSocketsEnabledValue The WebSocketsEnabled value. */
Optional. True if Web Sockets are enabled; otherwise, false
setWebSocketsEnabled
{ "repo_name": "southworkscom/azure-sdk-for-java", "path": "resource-management/azure-mgmt-websites/src/main/java/com/microsoft/azure/management/websites/models/WebSiteGetConfigurationResponse.java", "license": "apache-2.0", "size": 19797 }
[ "com.microsoft.windowsazure.core.LazyArrayList", "com.microsoft.windowsazure.core.LazyHashMap" ]
import com.microsoft.windowsazure.core.LazyArrayList; import com.microsoft.windowsazure.core.LazyHashMap;
import com.microsoft.windowsazure.core.*;
[ "com.microsoft.windowsazure" ]
com.microsoft.windowsazure;
2,432,989
public Exchange createOnAcceptAlertNotificationExchange(AlertNotification alertNotification) { return createOnAcceptAlertNotificationExchange(getExchangePattern(), alertNotification); }
Exchange function(AlertNotification alertNotification) { return createOnAcceptAlertNotificationExchange(getExchangePattern(), alertNotification); }
/** * Create a new exchange for communicating with this endpoint from a SMSC * * @param alertNotification the received message from the SMSC * @return a new exchange */
Create a new exchange for communicating with this endpoint from a SMSC
createOnAcceptAlertNotificationExchange
{ "repo_name": "punkhorn/camel-upstream", "path": "components/camel-smpp/src/main/java/org/apache/camel/component/smpp/SmppEndpoint.java", "license": "apache-2.0", "size": 7239 }
[ "org.apache.camel.Exchange", "org.jsmpp.bean.AlertNotification" ]
import org.apache.camel.Exchange; import org.jsmpp.bean.AlertNotification;
import org.apache.camel.*; import org.jsmpp.bean.*;
[ "org.apache.camel", "org.jsmpp.bean" ]
org.apache.camel; org.jsmpp.bean;
921,952
void addResource(Collection<RawResource> r);
void addResource(Collection<RawResource> r);
/** * Add or replace multiple resources */
Add or replace multiple resources
addResource
{ "repo_name": "hawkular/hawkular-commons", "path": "hawkular-inventory-parent/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/InventoryService.java", "license": "apache-2.0", "size": 5161 }
[ "java.util.Collection", "org.hawkular.inventory.api.model.RawResource" ]
import java.util.Collection; import org.hawkular.inventory.api.model.RawResource;
import java.util.*; import org.hawkular.inventory.api.model.*;
[ "java.util", "org.hawkular.inventory" ]
java.util; org.hawkular.inventory;
2,103,851
List<LockException> getAllLockExceptions();
List<LockException> getAllLockExceptions();
/** * Returns all lock exceptions * * @return List of all the lock exceptions */
Returns all lock exceptions
getAllLockExceptions
{ "repo_name": "mortenoh/dhis2-core", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java", "license": "bsd-3-clause", "size": 14270 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,636,630
Error getRequiredGlobalQuery() throws ErrorException, IOException, IllegalArgumentException;
Error getRequiredGlobalQuery() throws ErrorException, IOException, IllegalArgumentException;
/** * Test implicitly required query parameter. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Error object if suc...
Test implicitly required query parameter
getRequiredGlobalQuery
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/Implicits.java", "license": "mit", "size": 12192 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
880,679
// Does not appear to be used externally; called by #loadProjectFile() public static boolean insertLoadedTree(final int id, final HashTree tree, final boolean merging) throws IllegalUserActionException { // convertTree(tree); if (tree == null) { throw new IllegalUserActionException("...
static boolean function(final int id, final HashTree tree, final boolean merging) throws IllegalUserActionException { if (tree == null) { throw new IllegalUserActionException(STR); } final boolean isTestPlan = tree.getArray()[0] instanceof TestPlan; final GuiPackage guiInstance = GuiPackage.getInstance(); if(isTestPlan...
/** * Inserts (or merges) the tree into the GUI. * Does not check if the previous tree has been saved. * Clears the existing GUI test plan if we are inserting a complete plan. * @param id the id for the ActionEvent that is created * @param tree the tree to load * @param merging true if the...
Inserts (or merges) the tree into the GUI. Does not check if the previous tree has been saved. Clears the existing GUI test plan if we are inserting a complete plan
insertLoadedTree
{ "repo_name": "lxw0109/Jmeter_lxw", "path": "src/core/org/apache/jmeter/gui/action/Load.java", "license": "apache-2.0", "size": 10560 }
[ "java.awt.event.ActionEvent", "javax.swing.JTree", "javax.swing.tree.TreePath", "org.apache.jmeter.exceptions.IllegalUserActionException", "org.apache.jmeter.gui.GuiPackage", "org.apache.jmeter.gui.tree.JMeterTreeNode", "org.apache.jmeter.gui.util.FocusRequester", "org.apache.jmeter.gui.util.MenuFacto...
import java.awt.event.ActionEvent; import javax.swing.JTree; import javax.swing.tree.TreePath; import org.apache.jmeter.exceptions.IllegalUserActionException; import org.apache.jmeter.gui.GuiPackage; import org.apache.jmeter.gui.tree.JMeterTreeNode; import org.apache.jmeter.gui.util.FocusRequester; import org.apache.jm...
import java.awt.event.*; import javax.swing.*; import javax.swing.tree.*; import org.apache.jmeter.exceptions.*; import org.apache.jmeter.gui.*; import org.apache.jmeter.gui.tree.*; import org.apache.jmeter.gui.util.*; import org.apache.jmeter.testelement.*; import org.apache.jorphan.collections.*;
[ "java.awt", "javax.swing", "org.apache.jmeter", "org.apache.jorphan" ]
java.awt; javax.swing; org.apache.jmeter; org.apache.jorphan;
2,022,197
super.onCreate(savedInstanceState); setContentView(R.layout.activity_album); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); }
super.onCreate(savedInstanceState); setContentView(R.layout.activity_album); getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); }
/** * Called when the activity is first created. */
Called when the activity is first created
onCreate
{ "repo_name": "sregg/spotify-tv", "path": "app/src/main/java/com/sregg/android/tv/spotifyPlayer/activities/AlbumActivity.java", "license": "gpl-2.0", "size": 1042 }
[ "android.view.WindowManager" ]
import android.view.WindowManager;
import android.view.*;
[ "android.view" ]
android.view;
580,573
public void sendNotification(int id, Notification notif) { if (mSettings.getBoolean(BeemApplication.NOTIFICATION_VIBRATE_KEY, true)) notif.defaults |= Notification.DEFAULT_VIBRATE; notif.defaults |= Notification.DEFAULT_LIGHTS; String ringtoneStr = mSettings.getString(BeemApplication.NOTIFICATION_SO...
void function(int id, Notification notif) { if (mSettings.getBoolean(BeemApplication.NOTIFICATION_VIBRATE_KEY, true)) notif.defaults = Notification.DEFAULT_VIBRATE; notif.defaults = Notification.DEFAULT_LIGHTS; String ringtoneStr = mSettings.getString(BeemApplication.NOTIFICATION_SOUND_KEY, ""); notif.sound = Uri.parse...
/** * Show a notification using the preference of the user. * * @param id the id of the notification. * @param notif the notification to show */
Show a notification using the preference of the user
sendNotification
{ "repo_name": "kontinuity/beemotr", "path": "src/com/beem/project/beem/BeemService.java", "license": "gpl-3.0", "size": 17965 }
[ "android.app.Notification", "android.net.Uri" ]
import android.app.Notification; import android.net.Uri;
import android.app.*; import android.net.*;
[ "android.app", "android.net" ]
android.app; android.net;
2,568,343
void onProcessTypedValues(Context context, TypedArray typedArray) { processTintValues(context, typedArray); }
void onProcessTypedValues(Context context, TypedArray typedArray) { processTintValues(context, typedArray); }
/** * Invoked from {@link #processAttributes(Context, AttributeSet, int, int)} to process all values * from the given <var>typedArray</var> that are related to the attached widgets. * * @param context The context that can be used to access resource values. * @param typedArray The typed array obtained for t...
Invoked from <code>#processAttributes(Context, AttributeSet, int, int)</code> to process all values from the given typedArray that are related to the attached widgets
onProcessTypedValues
{ "repo_name": "android-libraries/android_ui", "path": "library/src/base/java/com/albedinsky/android/ui/widget/WidgetDecorator.java", "license": "apache-2.0", "size": 18859 }
[ "android.content.Context", "android.content.res.TypedArray" ]
import android.content.Context; import android.content.res.TypedArray;
import android.content.*; import android.content.res.*;
[ "android.content" ]
android.content;
951,342
public static LocalIncomingServerSession createSession(String serverName, XMPPPacketReader reader, SocketConnection connection, boolean directTLS) throws XmlPullParserException, IOException { XmlPullParser xpp = reader.getXPPParser(); String version = xpp.getAttributeVal...
static LocalIncomingServerSession function(String serverName, XMPPPacketReader reader, SocketConnection connection, boolean directTLS) throws XmlPullParserException, IOException { XmlPullParser xpp = reader.getXPPParser(); String version = xpp.getAttributeValue(STRversion"); String fromDomain = xpp.getAttributeValue(ST...
/** * Creates a new session that will receive packets. The new session will be authenticated * before being returned. If the authentication process fails then the answer will be * {@code null}.<p> * * @param serverName hostname of this server. * @param reader reader on the new established ...
Creates a new session that will receive packets. The new session will be authenticated before being returned. If the authentication process fails then the answer will be null
createSession
{ "repo_name": "GregDThomas/Openfire", "path": "xmppserver/src/main/java/org/jivesoftware/openfire/session/LocalIncomingServerSession.java", "license": "apache-2.0", "size": 17861 }
[ "java.io.IOException", "org.dom4j.io.XMPPPacketReader", "org.jivesoftware.openfire.Connection", "org.jivesoftware.openfire.StreamID", "org.jivesoftware.openfire.net.SocketConnection", "org.xmlpull.v1.XmlPullParser", "org.xmlpull.v1.XmlPullParserException" ]
import java.io.IOException; import org.dom4j.io.XMPPPacketReader; import org.jivesoftware.openfire.Connection; import org.jivesoftware.openfire.StreamID; import org.jivesoftware.openfire.net.SocketConnection; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException;
import java.io.*; import org.dom4j.io.*; import org.jivesoftware.openfire.*; import org.jivesoftware.openfire.net.*; import org.xmlpull.v1.*;
[ "java.io", "org.dom4j.io", "org.jivesoftware.openfire", "org.xmlpull.v1" ]
java.io; org.dom4j.io; org.jivesoftware.openfire; org.xmlpull.v1;
1,272,119
public List<DimensionalItemObject> getReportingRates() { return ImmutableList.copyOf( AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.REPORTING_RATE, getDimensionOptions( DATA_X_DIM_ID ) ) ); }
List<DimensionalItemObject> function() { return ImmutableList.copyOf( AnalyticsUtils.getByDataDimensionItemType( DataDimensionItemType.REPORTING_RATE, getDimensionOptions( DATA_X_DIM_ID ) ) ); }
/** * Returns all reporting rates part of the data dimension. */
Returns all reporting rates part of the data dimension
getReportingRates
{ "repo_name": "hispindia/dhis2-Core", "path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java", "license": "bsd-3-clause", "size": 105104 }
[ "com.google.common.collect.ImmutableList", "java.util.List", "org.hisp.dhis.analytics.util.AnalyticsUtils", "org.hisp.dhis.common.DataDimensionItemType", "org.hisp.dhis.common.DimensionalItemObject" ]
import com.google.common.collect.ImmutableList; import java.util.List; import org.hisp.dhis.analytics.util.AnalyticsUtils; import org.hisp.dhis.common.DataDimensionItemType; import org.hisp.dhis.common.DimensionalItemObject;
import com.google.common.collect.*; import java.util.*; import org.hisp.dhis.analytics.util.*; import org.hisp.dhis.common.*;
[ "com.google.common", "java.util", "org.hisp.dhis" ]
com.google.common; java.util; org.hisp.dhis;
775,193
public void enableTab(E tabContent) { Integer index = new Integer(m_tabPanel.getWidgetIndex(tabContent)); Element tab = getTabElement(index.intValue()); if ((tab != null) && m_disabledTabIndexes.containsKey(index)) { tab.removeClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss(...
void function(E tabContent) { Integer index = new Integer(m_tabPanel.getWidgetIndex(tabContent)); Element tab = getTabElement(index.intValue()); if ((tab != null) && m_disabledTabIndexes.containsKey(index)) { tab.removeClassName(I_CmsLayoutBundle.INSTANCE.tabbedPanelCss().tabDisabled()); tab.setTitle(m_disabledTabIndex...
/** * Enables the tab with the given index.<p> * * @param tabContent the content of the tab that should be enabled */
Enables the tab with the given index
enableTab
{ "repo_name": "sbonoc/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/CmsTabbedPanel.java", "license": "lgpl-2.1", "size": 22895 }
[ "com.google.gwt.dom.client.Element", "com.google.gwt.user.client.ui.TabLayoutPanel" ]
import com.google.gwt.dom.client.Element; import com.google.gwt.user.client.ui.TabLayoutPanel;
import com.google.gwt.dom.client.*; import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,306,427
public List<?> getAllMessages() { throw new UnsupportedOperationException(); }
List<?> function() { throw new UnsupportedOperationException(); }
/** * Not supported. Used by GreenMail class. */
Not supported. Used by GreenMail class
getAllMessages
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/imap/AlfrescoImapHostManager.java", "license": "lgpl-3.0", "size": 15916 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,381,057
public void setManualActual (BigDecimal ManualActual);
void function (BigDecimal ManualActual);
/** Set Manual Actual. * Manually entered actual value */
Set Manual Actual. Manually entered actual value
setManualActual
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_PA_Measure.java", "license": "gpl-2.0", "size": 8866 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,237,192
@Test public void testGetBooleanProperty() { try { Message message = senderSession.createMessage(); Assert.assertEquals(false, message.getBooleanProperty("prop")); } catch (JMSException e) { fail(e); } }
void function() { try { Message message = senderSession.createMessage(); Assert.assertEquals(false, message.getBooleanProperty("prop")); } catch (JMSException e) { fail(e); } }
/** * Test that an attempt to get a <code>boolean</code> property which does not exist * returns <code>false</code> */
Test that an attempt to get a <code>boolean</code> property which does not exist returns <code>false</code>
testGetBooleanProperty
{ "repo_name": "cshannon/activemq-artemis", "path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyTest.java", "license": "apache-2.0", "size": 10237 }
[ "javax.jms.JMSException", "javax.jms.Message", "org.junit.Assert" ]
import javax.jms.JMSException; import javax.jms.Message; import org.junit.Assert;
import javax.jms.*; import org.junit.*;
[ "javax.jms", "org.junit" ]
javax.jms; org.junit;
2,358,375
public ServiceCall<Map<String, DateTime>> getDateTimeInvalidNullAsync(final ServiceCallback<Map<String, DateTime>> serviceCallback) { return ServiceCall.fromResponse(getDateTimeInvalidNullWithServiceResponseAsync(), serviceCallback); }
ServiceCall<Map<String, DateTime>> function(final ServiceCallback<Map<String, DateTime>> serviceCallback) { return ServiceCall.fromResponse(getDateTimeInvalidNullWithServiceResponseAsync(), serviceCallback); }
/** * Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": null}. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Get date dictionary value {"0": "2000-12-01t00:00:01z", "1": null}
getDateTimeInvalidNullAsync
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 210563 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback", "java.util.Map", "org.joda.time.DateTime" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; import org.joda.time.DateTime;
import com.microsoft.rest.*; import java.util.*; import org.joda.time.*;
[ "com.microsoft.rest", "java.util", "org.joda.time" ]
com.microsoft.rest; java.util; org.joda.time;
2,119,911
public GridWindowHelper selectTab(final String tableName, final String whereClauseFragment) { Assert.assertNotNull("tableName is null", tableName); Assert.assertNotNull("gridWindow is null", gridWindow); for (int i = 0; i < gridWindow.getTabCount(); i++) { GridTab gridTab = gridWindow.getTab(i); if ...
GridWindowHelper function(final String tableName, final String whereClauseFragment) { Assert.assertNotNull(STR, tableName); Assert.assertNotNull(STR, gridWindow); for (int i = 0; i < gridWindow.getTabCount(); i++) { GridTab gridTab = gridWindow.getTab(i); if (!gridTab.get_TableName().equals(tableName)) { continue; } if...
/** * Find grid tab by table name and a piece of its whereClause. Use this method if a window contains two or more tabs * with the same table. * * @param tableName * @param whereClauseFragment * may be <code>null</code>. If set, then the tab to select must have a where clause that contains the ...
Find grid tab by table name and a piece of its whereClause. Use this method if a window contains two or more tabs with the same table
selectTab
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.ait/src/main/java/de/metas/adempiere/ait/helper/GridWindowHelper.java", "license": "gpl-2.0", "size": 13420 }
[ "org.adempiere.util.Check", "org.compiere.model.GridTab", "org.junit.Assert" ]
import org.adempiere.util.Check; import org.compiere.model.GridTab; import org.junit.Assert;
import org.adempiere.util.*; import org.compiere.model.*; import org.junit.*;
[ "org.adempiere.util", "org.compiere.model", "org.junit" ]
org.adempiere.util; org.compiere.model; org.junit;
2,434,709
private int[] getHorizontalRange() { mHorizontalRange[0] = mMargin; mHorizontalRange[1] = mRecyclerViewWidth - mMargin; return mHorizontalRange; } private class AnimatorListener extends AnimatorListenerAdapter { private boolean mCanceled = false; AnimatorListener()...
int[] function() { mHorizontalRange[0] = mMargin; mHorizontalRange[1] = mRecyclerViewWidth - mMargin; return mHorizontalRange; } private class AnimatorListener extends AnimatorListenerAdapter { private boolean mCanceled = false; AnimatorListener() { }
/** * Gets the (min, max) horizontal positions of the horizontal scroll bar. */
Gets the (min, max) horizontal positions of the horizontal scroll bar
getHorizontalRange
{ "repo_name": "CzBiX/Telegram", "path": "TMessagesProj/src/main/java/androidx/recyclerview/widget/FastScroller.java", "license": "gpl-2.0", "size": 22188 }
[ "android.animation.AnimatorListenerAdapter" ]
import android.animation.AnimatorListenerAdapter;
import android.animation.*;
[ "android.animation" ]
android.animation;
385,440
public void test_copyOf_$JI() throws Exception { long[] result = Arrays.copyOf(longArray, arraySize * 2); int i = 0; for (; i < arraySize; i++) { assertEquals(longArray[i], result[i]); } for (; i < result.length; i++) { assertEquals(0, result[i]); ...
public void test_copyOf_$JI() throws Exception { long[] result = Arrays.copyOf(longArray, arraySize * 2); int i = 0; for (; i < arraySize; i++) { assertEquals(longArray[i], result[i]); } for (; i < result.length; i++) { assertEquals(0, result[i]); } result = Arrays.copyOf(longArray, arraySize / 2); i = 0; for (; i < re...
/** * {@link java.util.Arrays#copyOf(long[], int) */
{@link java.util.Arrays#copyOf(long[], int)
test_copyOf_$JI
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java", "license": "apache-2.0", "size": 207868 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,183,389
public XMLElement parse(String name, InputStream in) throws SlickXMLException { try { if (factory == null) { factory = DocumentBuilderFactory.newInstance(); } DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(in); return new XMLElement(doc.getDocumentElemen...
XMLElement function(String name, InputStream in) throws SlickXMLException { try { if (factory == null) { factory = DocumentBuilderFactory.newInstance(); } DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(in); return new XMLElement(doc.getDocumentElement()); } catch (Exception e) { th...
/** * Parse the XML document that can be read from the given input stream * * @param name The name of the document * @param in The input stream from which the document can be read * @return The root element of the newly parse document * @throws SlickXMLException Indicates a failure to parse the XML, most l...
Parse the XML document that can be read from the given input stream
parse
{ "repo_name": "TomyLobo/Slick", "path": "src/main/java/org/newdawn/slick/util/xml/XMLParser.java", "license": "bsd-3-clause", "size": 1920 }
[ "java.io.InputStream", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "org.w3c.dom.Document" ]
import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document;
import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*;
[ "java.io", "javax.xml", "org.w3c.dom" ]
java.io; javax.xml; org.w3c.dom;
2,687,700
@JsonProperty("isTruncated") public void setTruncated(boolean isTruncated) { this.isTruncated = isTruncated; }
@JsonProperty(STR) void function(boolean isTruncated) { this.isTruncated = isTruncated; }
/** * Sets whether this listing is truncated, and additional requests need to * be made to get more results. * * @param isTruncated true if the listing is truncated, and additional requests need * to be made to get more results. */
Sets whether this listing is truncated, and additional requests need to be made to get more results
setTruncated
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/services/bos/model/ListMultipartUploadsResponse.java", "license": "apache-2.0", "size": 10602 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,525,129
private TreeMap getGroupsForSite(String siteId){ TreeMap sortedGroups = new TreeMap(); Site site = null; try { site = SiteService.getSite(siteId); Collection groups = site.getGroups(); if (groups != null && groups.size() > 0) { Iterator groupIter = groups.iterator(); while (groupIter.hasNext()...
TreeMap function(String siteId){ TreeMap sortedGroups = new TreeMap(); Site site = null; try { site = SiteService.getSite(siteId); Collection groups = site.getGroups(); if (groups != null && groups.size() > 0) { Iterator groupIter = groups.iterator(); while (groupIter.hasNext()) { Group group = (Group) groupIter.next()...
/** * added by Sam Ottenhoff Feb 2010 * Returns all groups for site * @param siteId * @return */
added by Sam Ottenhoff Feb 2010 Returns all groups for site
getGroupsForSite
{ "repo_name": "whumph/sakai", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/PublishedAssessmentFacadeQueries.java", "license": "apache-2.0", "size": 130942 }
[ "java.util.Collection", "java.util.Iterator", "java.util.TreeMap", "org.sakaiproject.exception.IdUnusedException", "org.sakaiproject.site.api.Group", "org.sakaiproject.site.api.Site", "org.sakaiproject.site.cover.SiteService" ]
import java.util.Collection; import java.util.Iterator; import java.util.TreeMap; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.site.api.Group; import org.sakaiproject.site.api.Site; import org.sakaiproject.site.cover.SiteService;
import java.util.*; import org.sakaiproject.exception.*; import org.sakaiproject.site.api.*; import org.sakaiproject.site.cover.*;
[ "java.util", "org.sakaiproject.exception", "org.sakaiproject.site" ]
java.util; org.sakaiproject.exception; org.sakaiproject.site;
2,287,367
public static void checkHBaseAvailable(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, ServiceException, IOException { Configuration copyOfConf = HBaseConfiguration.create(conf); // We set it to make it fail as soon as possible if HBase is not available copyOfConf....
static void function(Configuration conf) throws MasterNotRunningException, ZooKeeperConnectionException, ServiceException, IOException { Configuration copyOfConf = HBaseConfiguration.create(conf); copyOfConf.setInt(STR, 1); copyOfConf.setInt(STR, 0); HConnectionManager.HConnectionImplementation connection = (HConnectio...
/** * Check to see if HBase is running. Throw an exception if not. * We consider that HBase is running if ZooKeeper and Master are running. * * @param conf system configuration * @throws MasterNotRunningException if the master is not running * @throws ZooKeeperConnectionException if unable to connect ...
Check to see if HBase is running. Throw an exception if not. We consider that HBase is running if ZooKeeper and Master are running
checkHBaseAvailable
{ "repo_name": "francisliu/hbase_namespace", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java", "license": "apache-2.0", "size": 118566 }
[ "com.google.protobuf.ServiceException", "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.HBaseConfiguration", "org.apache.hadoop.hbase.exceptions.MasterNotRunningException", "org.apache.hadoop.hbase.exceptions.ZooKeeperConnectionException", "org.apache.zookeeper.Ke...
import com.google.protobuf.ServiceException; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.exceptions.MasterNotRunningException; import org.apache.hadoop.hbase.exceptions.ZooKeeperConnectionException; import org...
import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.exceptions.*; import org.apache.zookeeper.*;
[ "com.google.protobuf", "java.io", "org.apache.hadoop", "org.apache.zookeeper" ]
com.google.protobuf; java.io; org.apache.hadoop; org.apache.zookeeper;
694,522
private void startZeroMqClient(int clientSocket, byte[] topic) throws InterruptedException, UnsupportedEncodingException { try (ZMQ.Context context = ZMQ.context(1); ZMQ.Socket socket = context.socket(clientSocket)) { socket.bind(ADDR); if (ZMQ.PUB == clientSoc...
void function(int clientSocket, byte[] topic) throws InterruptedException, UnsupportedEncodingException { try (ZMQ.Context context = ZMQ.context(1); ZMQ.Socket socket = context.socket(clientSocket)) { socket.bind(ADDR); if (ZMQ.PUB == clientSocket) Thread.sleep(500); for (int i = 0; i < CACHE_ENTRY_COUNT; i++) { if (ZM...
/** * Starts ZeroMQ client for testing. * * @param clientSocket ZeroMQ socket type. * @param topic Topic name for PUB-SUB. */
Starts ZeroMQ client for testing
startZeroMqClient
{ "repo_name": "WilliamDo/ignite", "path": "modules/zeromq/src/test/java/org/apache/ignite/stream/zeromq/IgniteZeroMqStreamerTest.java", "license": "apache-2.0", "size": 7574 }
[ "java.io.UnsupportedEncodingException", "org.zeromq.ZMQ" ]
import java.io.UnsupportedEncodingException; import org.zeromq.ZMQ;
import java.io.*; import org.zeromq.*;
[ "java.io", "org.zeromq" ]
java.io; org.zeromq;
1,265,952
public void setLabelOutlinePaint(Paint paint) { this.labelOutlinePaint = paint; notifyListeners(new PlotChangeEvent(this)); }
void function(Paint paint) { this.labelOutlinePaint = paint; notifyListeners(new PlotChangeEvent(this)); }
/** * Sets the section label outline paint and sends a {@link PlotChangeEvent} to all * registered listeners. * * @param paint the paint (<code>null</code> permitted). */
Sets the section label outline paint and sends a <code>PlotChangeEvent</code> to all registered listeners
setLabelOutlinePaint
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart0921/source/org/jfree/chart/plot/PiePlot.java", "license": "lgpl-3.0", "size": 73902 }
[ "java.awt.Paint", "org.jfree.chart.event.PlotChangeEvent" ]
import java.awt.Paint; import org.jfree.chart.event.PlotChangeEvent;
import java.awt.*; import org.jfree.chart.event.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
975,674
private Object getTargetObject(T t, String name) { Object target = null; if (t != null) { Field[] fields = t.getClass().getDeclaredFields(); for (int i = 0, fieldsLength = fields.length; target == null && i < fieldsLength; i++) ...
Object function(T t, String name) { Object target = null; if (t != null) { Field[] fields = t.getClass().getDeclaredFields(); for (int i = 0, fieldsLength = fields.length; target == null && i < fieldsLength; i++) { Field field = fields[i]; if (field.isAnnotationPresent(Property.class) && field.getAnnotation(Property.cl...
/** * Gets the value of the field marked as property <i>name</i>, or null if it can't be found. * * @param t the object containing the information * @param name the identifier for that information * @return the value of the property */
Gets the value of the field marked as property name, or null if it can't be found
getTargetObject
{ "repo_name": "schaloner/tabula-rasa", "path": "app/controllers/tabularasa/FallbackObjectValueMapper.java", "license": "apache-2.0", "size": 5420 }
[ "be.objectify.led.Property", "java.lang.reflect.Field" ]
import be.objectify.led.Property; import java.lang.reflect.Field;
import be.objectify.led.*; import java.lang.reflect.*;
[ "be.objectify.led", "java.lang" ]
be.objectify.led; java.lang;
1,657,365
@VisibleForTesting public static SourceBuilder forTesting(FeatureSet features) { return new SourceBuilder(new RuntimeReflection(getSystemClassLoader()), features); } private static final String LINE_SEPARATOR = System.getProperty("line.separator"); private final CompilationUnitBuilder source; private...
static SourceBuilder function(FeatureSet features) { return new SourceBuilder(new RuntimeReflection(getSystemClassLoader()), features); } private static final String LINE_SEPARATOR = System.getProperty(STR); private final CompilationUnitBuilder source; private SourceBuilder(Reflection reflect, FeatureSet features) { so...
/** * Returns a {@link SourceBuilder} using {@code features}. The system classloader will be * inspected for potential import collisions. */
Returns a <code>SourceBuilder</code> using features. The system classloader will be inspected for potential import collisions
forTesting
{ "repo_name": "inferred/FreeBuilder", "path": "src/main/java/org/inferred/freebuilder/processor/source/SourceBuilder.java", "license": "apache-2.0", "size": 7287 }
[ "javax.lang.model.element.PackageElement", "javax.lang.model.element.TypeElement", "javax.lang.model.type.DeclaredType", "org.inferred.freebuilder.processor.source.ScopeHandler", "org.inferred.freebuilder.processor.source.feature.FeatureSet" ]
import javax.lang.model.element.PackageElement; import javax.lang.model.element.TypeElement; import javax.lang.model.type.DeclaredType; import org.inferred.freebuilder.processor.source.ScopeHandler; import org.inferred.freebuilder.processor.source.feature.FeatureSet;
import javax.lang.model.element.*; import javax.lang.model.type.*; import org.inferred.freebuilder.processor.source.*; import org.inferred.freebuilder.processor.source.feature.*;
[ "javax.lang", "org.inferred.freebuilder" ]
javax.lang; org.inferred.freebuilder;
881,491
public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(ConnectfourEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ConnectfourEdito...
void function(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(ConnectfourEditorPlugin.INSTANCE.getString(STR)); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ConnectfourEditorPlugin.INSTANCE.getImage(STR)));...
/** * This just records the information. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This just records the information.
init
{ "repo_name": "ejuliot/PlayWithSirius", "path": "connectfour/plugins/org.obeonetwork.dsl.connectfour.editor/src/org/obeonetwork/dsl/connectfour/presentation/ConnectfourModelWizard.java", "license": "epl-1.0", "size": 18579 }
[ "org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry", "org.eclipse.jface.viewers.IStructuredSelection", "org.eclipse.ui.IWorkbench" ]
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IWorkbench;
import org.eclipse.emf.edit.ui.provider.*; import org.eclipse.jface.viewers.*; import org.eclipse.ui.*;
[ "org.eclipse.emf", "org.eclipse.jface", "org.eclipse.ui" ]
org.eclipse.emf; org.eclipse.jface; org.eclipse.ui;
1,746,180
public DruidQuerySignature asAggregateSignature(RowSignature sourceSignature) { return new DruidQuerySignature( sourceSignature, virtualColumnPrefix, virtualColumnsByExpression, virtualColumnsByName, true ); }
DruidQuerySignature function(RowSignature sourceSignature) { return new DruidQuerySignature( sourceSignature, virtualColumnPrefix, virtualColumnsByExpression, virtualColumnsByName, true ); }
/** * Create as an "immutable" "aggregate" signature for a grouping, so that post aggregations and having filters * can not define new virtual columns * @param sourceSignature * @return */
Create as an "immutable" "aggregate" signature for a grouping, so that post aggregations and having filters can not define new virtual columns
asAggregateSignature
{ "repo_name": "knoguchi/druid", "path": "sql/src/main/java/org/apache/druid/sql/calcite/rel/DruidQuerySignature.java", "license": "apache-2.0", "size": 4830 }
[ "org.apache.druid.sql.calcite.table.RowSignature" ]
import org.apache.druid.sql.calcite.table.RowSignature;
import org.apache.druid.sql.calcite.table.*;
[ "org.apache.druid" ]
org.apache.druid;
2,194,351
BindingGraph convert(LegacyBindingGraph legacyBindingGraph, boolean isFullBindingGraph) { MutableNetwork<Node, Edge> network = asNetwork(legacyBindingGraph); ComponentNode rootNode = rootComponentNode(network); // When bindings are copied down into child graphs because they transitively depend on local ...
BindingGraph convert(LegacyBindingGraph legacyBindingGraph, boolean isFullBindingGraph) { MutableNetwork<Node, Edge> network = asNetwork(legacyBindingGraph); ComponentNode rootNode = rootComponentNode(network); if (!isFullBindingGraph) { unreachableNodes(network.asGraph(), rootNode).forEach(network::removeNode); } TopL...
/** * Creates the external {@link dagger.spi.model.BindingGraph} representing the given internal * {@link BindingGraph}. */
Creates the external <code>dagger.spi.model.BindingGraph</code> representing the given internal <code>BindingGraph</code>
convert
{ "repo_name": "dushmis/dagger", "path": "java/dagger/internal/codegen/binding/BindingGraphConverter.java", "license": "apache-2.0", "size": 16709 }
[ "com.google.common.graph.ImmutableNetwork", "com.google.common.graph.MutableNetwork" ]
import com.google.common.graph.ImmutableNetwork; import com.google.common.graph.MutableNetwork;
import com.google.common.graph.*;
[ "com.google.common" ]
com.google.common;
2,829,859
@SuppressWarnings("unchecked") public void setAll(Properties properties) { Enumeration<String> names = (Enumeration<String>) properties.propertyNames(); while (names.hasMoreElements()) { String name = names.nextElement(); metadata.put(name, new String[] { prop...
@SuppressWarnings(STR) void function(Properties properties) { Enumeration<String> names = (Enumeration<String>) properties.propertyNames(); while (names.hasMoreElements()) { String name = names.nextElement(); metadata.put(name, new String[] { properties.getProperty(name) }); } }
/** * Copy All key-value pairs from properties. * * @param properties * properties to copy from */
Copy All key-value pairs from properties
setAll
{ "repo_name": "wseemann/JavaPlaylistParser", "path": "src/wseemann/media/jplaylistparser/playlist/PlaylistEntry.java", "license": "apache-2.0", "size": 7507 }
[ "java.util.Enumeration", "java.util.Properties" ]
import java.util.Enumeration; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,785,739