method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private ExampleSet createExampleSet(int limitOfReadLines) throws OperatorException { List<Attribute> activeAttributes = new ArrayList<>(); // load the attribute names/value types/ roles/... which are defined by // the user if (attributeNamesDefinedByUser()) { loadMetaDataFromParameters(); } else...
ExampleSet function(int limitOfReadLines) throws OperatorException { List<Attribute> activeAttributes = new ArrayList<>(); if (attributeNamesDefinedByUser()) { loadMetaDataFromParameters(); } else { clearAllReaderSettings(); if (!skipGuessingValueTypes) { guessValueTypes(null); } } DataSet set = null; try { set = getDa...
/** * Creates an {@link ExampleSet} with the given {@link ExampleSetMetaData} and reads at the most * <code>limitOfReadLines</code> lines. * * * @param metaData * @param limitOfReadLines * max number of read lines. * @return * @throws OperatorException */
Creates an <code>ExampleSet</code> with the given <code>ExampleSetMetaData</code> and reads at the most <code>limitOfReadLines</code> lines
createExampleSet
{ "repo_name": "rapidminer/rapidminer-studio", "path": "src/main/java/com/rapidminer/operator/io/AbstractDataReader.java", "license": "agpl-3.0", "size": 59032 }
[ "com.rapidminer.example.Attribute", "com.rapidminer.example.ExampleSet", "com.rapidminer.example.utils.ExampleSetBuilder", "com.rapidminer.example.utils.ExampleSets", "com.rapidminer.operator.OperatorException", "com.rapidminer.operator.ProcessStoppedException", "com.rapidminer.operator.UserError", "j...
import com.rapidminer.example.Attribute; import com.rapidminer.example.ExampleSet; import com.rapidminer.example.utils.ExampleSetBuilder; import com.rapidminer.example.utils.ExampleSets; import com.rapidminer.operator.OperatorException; import com.rapidminer.operator.ProcessStoppedException; import com.rapidminer.opera...
import com.rapidminer.example.*; import com.rapidminer.example.utils.*; import com.rapidminer.operator.*; import java.io.*; import java.util.*;
[ "com.rapidminer.example", "com.rapidminer.operator", "java.io", "java.util" ]
com.rapidminer.example; com.rapidminer.operator; java.io; java.util;
2,223,480
// user profiles public void updateUserProfile (IPerson person,IUserProfile profile);
void function (IPerson person,IUserProfile profile);
/** update user profile * * @param person User * @param profile profile update */
update user profile
updateUserProfile
{ "repo_name": "vbonamy/esup-uportal", "path": "uportal-war/src/main/java/org/jasig/portal/layout/IUserLayoutStore.java", "license": "apache-2.0", "size": 8980 }
[ "org.jasig.portal.IUserProfile", "org.jasig.portal.security.IPerson" ]
import org.jasig.portal.IUserProfile; import org.jasig.portal.security.IPerson;
import org.jasig.portal.*; import org.jasig.portal.security.*;
[ "org.jasig.portal" ]
org.jasig.portal;
1,461,968
@GuardedBy("seek(Record, Byteable...)") public void seek(L locator, Record<L, K, V> record) { seek(record, locator); }
@GuardedBy(STR) void function(L locator, Record<L, K, V> record) { seek(record, locator); }
/** * Seek revisions that contain any key in {@code locator} and append them to * {@code record} if it is <em>likely</em> that those revisions exist in * this Block. * * @param locator * @param record */
Seek revisions that contain any key in locator and append them to record if it is likely that those revisions exist in this Block
seek
{ "repo_name": "hcuffy/concourse", "path": "concourse-server/src/main/java/com/cinchapi/concourse/server/storage/db/Block.java", "license": "apache-2.0", "size": 30849 }
[ "javax.annotation.concurrent.GuardedBy" ]
import javax.annotation.concurrent.GuardedBy;
import javax.annotation.concurrent.*;
[ "javax.annotation" ]
javax.annotation;
232,520
public static int nextInt(Random random) { return random.nextInt(); }
static int function(Random random) { return random.nextInt(); }
/** * <p>Returns the next pseudorandom, uniformly distributed int value * from the given <code>random</code> sequence.</p> * * @param random the Random sequence generator. * @return the random int */
Returns the next pseudorandom, uniformly distributed int value from the given <code>random</code> sequence
nextInt
{ "repo_name": "glorycloud/GloryMail", "path": "CloudyMail/lib_src/org/apache/commons/lang/math/RandomUtils.java", "license": "apache-2.0", "size": 5719 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
1,407,147
@Override public void onBackPressed() { dismiss(); for (TimeEntryDialogListener listener : listeners) listener.cancelled(); } private Activity cr_activity; private LinkedList<TimeEntryDialogListener> listeners; private Dial_Entry time_entry_clock; private int number_complete, ...
void function() { dismiss(); for (TimeEntryDialogListener listener : listeners) listener.cancelled(); } private Activity cr_activity; private LinkedList<TimeEntryDialogListener> listeners; private Dial_Entry time_entry_clock; private int number_complete, number_total;
/** * When the user presses the back button, we assume s/he wants to quit the quiz. * This calls crc_view's quiz_cancelled() routine. */
When the user presses the back button, we assume s/he wants to quit the quiz. This calls crc_view's quiz_cancelled() routine
onBackPressed
{ "repo_name": "johnperry-math/Chinese-Remainder-Clock", "path": "app/src/main/java/name/cantanima/chineseremainderclock/TimeEntryDialog.java", "license": "gpl-3.0", "size": 4167 }
[ "android.app.Activity", "java.util.LinkedList" ]
import android.app.Activity; import java.util.LinkedList;
import android.app.*; import java.util.*;
[ "android.app", "java.util" ]
android.app; java.util;
865
public Invoker<S, R, A> setMethod(Method method) { this.method = method; return this; }
Invoker<S, R, A> function(Method method) { this.method = method; return this; }
/** * Sets the method to invoke * @param method The method to set * @return This instance to allow fluent expression */
Sets the method to invoke
setMethod
{ "repo_name": "forty9/fluent-proxy", "path": "src/main/java/com/forty9/fluent/util/Invoker.java", "license": "apache-2.0", "size": 3624 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,783,553
private void populateSplitRevs() { for (NavigableMap<Revision, String> splitMap : committedChanges.values()) { // keep the most recent changes in the main document if (!splitMap.isEmpty()) { Revision r = splitMap.lastKey(); splitMap.remove(r); ...
void function() { for (NavigableMap<Revision, String> splitMap : committedChanges.values()) { if (!splitMap.isEmpty()) { Revision r = splitMap.lastKey(); splitMap.remove(r); splitRevs.addAll(splitMap.keySet()); mostRecentRevs.add(r); } if (splitMap.isEmpty()) { continue; } trackHigh(splitMap.lastKey()); trackLow(splitM...
/** * Populate the {@link #splitRevs} with the revisions of the committed * changes that will be moved to a previous document. For each property, * all but the most recent change will be moved. */
Populate the <code>#splitRevs</code> with the revisions of the committed changes that will be moved to a previous document. For each property, all but the most recent change will be moved
populateSplitRevs
{ "repo_name": "leftouterjoin/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/SplitOperations.java", "license": "apache-2.0", "size": 21762 }
[ "java.util.NavigableMap" ]
import java.util.NavigableMap;
import java.util.*;
[ "java.util" ]
java.util;
2,880,368
protected AbstractHighlighter createMatchHighlighter() { return new ColorHighlighter(HighlightPredicate.NEVER, Color.YELLOW.brighter(), null, Color.YELLOW.brighter(), null); }
AbstractHighlighter function() { return new ColorHighlighter(HighlightPredicate.NEVER, Color.YELLOW.brighter(), null, Color.YELLOW.brighter(), null); }
/** * Creates and returns the Highlighter used as match marker. * * @return a highlighter used for matching */
Creates and returns the Highlighter used as match marker
createMatchHighlighter
{ "repo_name": "sing-group/aibench-project", "path": "aibench-pluginmanager/src/main/java/org/jdesktop/swingx/search/AbstractSearchable.java", "license": "lgpl-3.0", "size": 24267 }
[ "java.awt.Color", "org.jdesktop.swingx.decorator.AbstractHighlighter", "org.jdesktop.swingx.decorator.ColorHighlighter", "org.jdesktop.swingx.decorator.HighlightPredicate" ]
import java.awt.Color; import org.jdesktop.swingx.decorator.AbstractHighlighter; import org.jdesktop.swingx.decorator.ColorHighlighter; import org.jdesktop.swingx.decorator.HighlightPredicate;
import java.awt.*; import org.jdesktop.swingx.decorator.*;
[ "java.awt", "org.jdesktop.swingx" ]
java.awt; org.jdesktop.swingx;
2,762,362
EEnum getFeatureItemsContainer();
EEnum getFeatureItemsContainer();
/** * Returns the meta object for enum '{@link org.nasdanika.codegen.ecore.web.ui.model.FeatureItemsContainer <em>Feature Items Container</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for enum '<em>Feature Items Container</em>'. * @see org.nasdanika.codegen.ecore.web...
Returns the meta object for enum '<code>org.nasdanika.codegen.ecore.web.ui.model.FeatureItemsContainer Feature Items Container</code>'.
getFeatureItemsContainer
{ "repo_name": "Nasdanika/codegen-ecore-web-ui", "path": "org.nasdanika.codegen.ecore.web.ui.model/src/org/nasdanika/codegen/ecore/web/ui/model/ModelPackage.java", "license": "epl-1.0", "size": 78619 }
[ "org.eclipse.emf.ecore.EEnum" ]
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,169,566
private static Map<TypeVariable<?>, Type> getTypeArguments(final Type type, final Class<?> toClass, final Map<TypeVariable<?>, Type> subtypeVarAssigns) { if (type instanceof Class<?>) { return getTypeArguments((Class<?>) type, toClass, subtypeVarAssigns); } if (type ...
static Map<TypeVariable<?>, Type> function(final Type type, final Class<?> toClass, final Map<TypeVariable<?>, Type> subtypeVarAssigns) { if (type instanceof Class<?>) { return getTypeArguments((Class<?>) type, toClass, subtypeVarAssigns); } if (type instanceof ParameterizedType) { return getTypeArguments((Parameterize...
/** * <p>Return a map of the type arguments of {@code type} in the context of {@code toClass}.</p> * * @param type the type in question * @param toClass the class * @param subtypeVarAssigns a map with type variables * @return the {@code Map} with type arguments */
Return a map of the type arguments of type in the context of toClass
getTypeArguments
{ "repo_name": "ManfredTremmel/gwt-commons-lang3", "path": "src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java", "license": "apache-2.0", "size": 71732 }
[ "java.lang.reflect.GenericArrayType", "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type", "java.lang.reflect.TypeVariable", "java.lang.reflect.WildcardType", "java.util.Map" ]
import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; import java.util.Map;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,098,317
public CompletableFuture<Optional<CliReply>> setPortConfig(Integer portNumber, PortConfigDto config) { PortConfig.Builder builder = PortConfig.newBuilder() .setPortno(portNumber); if (config.getQueueId() != null) { builder.setQueueid(config.getQueueId()); } ...
CompletableFuture<Optional<CliReply>> function(Integer portNumber, PortConfigDto config) { PortConfig.Builder builder = PortConfig.newBuilder() .setPortno(portNumber); if (config.getQueueId() != null) { builder.setQueueid(config.getQueueId()); } if (config.getMinRate() != null) { builder.setMinrate(config.getMinRate())...
/** * Sets a port configuration. * * @param portNumber a port number. * @param config a port configuration data. * @return {@link CompletableFuture} with operation result. */
Sets a port configuration
setPortConfig
{ "repo_name": "jonvestal/open-kilda", "path": "src-java/grpc-speaker/grpc-service/src/main/java/org/openkilda/grpc/speaker/client/GrpcSession.java", "license": "apache-2.0", "size": 17314 }
[ "io.grpc.noviflow.CliReply", "io.grpc.noviflow.OnOff", "io.grpc.noviflow.PortConfig", "io.grpc.noviflow.PortMode", "io.grpc.noviflow.PortPause", "io.grpc.noviflow.PortSpeed", "java.util.Optional", "java.util.concurrent.CompletableFuture", "org.openkilda.grpc.speaker.model.PortConfigDto" ]
import io.grpc.noviflow.CliReply; import io.grpc.noviflow.OnOff; import io.grpc.noviflow.PortConfig; import io.grpc.noviflow.PortMode; import io.grpc.noviflow.PortPause; import io.grpc.noviflow.PortSpeed; import java.util.Optional; import java.util.concurrent.CompletableFuture; import org.openkilda.grpc.speaker.model.P...
import io.grpc.noviflow.*; import java.util.*; import java.util.concurrent.*; import org.openkilda.grpc.speaker.model.*;
[ "io.grpc.noviflow", "java.util", "org.openkilda.grpc" ]
io.grpc.noviflow; java.util; org.openkilda.grpc;
2,055,247
private void checkMessagesForLanguage(Map<String, Map<String, String>> missingLabelsPerBundle, Map<String, Map<String, String>> missingLabelsPerBundle2, Properties messages, String bundlePath,String language) throws IOException { Properties messagesFr = new Properties(); String languageB...
void function(Map<String, Map<String, String>> missingLabelsPerBundle, Map<String, Map<String, String>> missingLabelsPerBundle2, Properties messages, String bundlePath,String language) throws IOException { Properties messagesFr = new Properties(); String languageBundle = bundlePath+"_"+language+ STR; InputStream inputS...
/** * Check messages are available in language * @param missingLabelsPerBundle2 * @param missingLabelsPerBundle * @param messages Properties messages in english * @param language Language * @throws IOException */
Check messages are available in language
checkMessagesForLanguage
{ "repo_name": "hemikak/jmeter", "path": "test/src/org/apache/jmeter/resources/PackageTest.java", "license": "apache-2.0", "size": 19754 }
[ "java.io.IOException", "java.io.InputStream", "java.util.HashMap", "java.util.Iterator", "java.util.Map", "java.util.Properties", "java.util.TreeMap" ]
import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.TreeMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
117,958
@Nonnull public SettingStateDeviceSummaryRequestBuilder deviceSettingStateSummaries(@Nonnull final String id) { return new SettingStateDeviceSummaryRequestBuilder(getRequestUrlWithAdditionalSegment("deviceSettingStateSummaries") + "/" + id, getClient(), null); }
SettingStateDeviceSummaryRequestBuilder function(@Nonnull final String id) { return new SettingStateDeviceSummaryRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id, getClient(), null); }
/** * Gets a request builder for the SettingStateDeviceSummary item * * @return the request builder * @param id the item identifier */
Gets a request builder for the SettingStateDeviceSummary item
deviceSettingStateSummaries
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/Windows10MobileCompliancePolicyRequestBuilder.java", "license": "mit", "size": 8962 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
238,395
protected Collection<ContractsAndGrantsBillingAward> getAwardsFromLookupResultsSequenceNumber(String lookupResultsSequenceNumber, String personId) throws Exception { KualiModuleService kualiModuleService = SpringContext.getBean(KualiModuleService.class); Collection<ContractsAndGrantsBillingAward> aw...
Collection<ContractsAndGrantsBillingAward> function(String lookupResultsSequenceNumber, String personId) throws Exception { KualiModuleService kualiModuleService = SpringContext.getBean(KualiModuleService.class); Collection<ContractsAndGrantsBillingAward> awards = new ArrayList<ContractsAndGrantsBillingAward>(); List<S...
/** * Get the Awards based on what the user selected in the lookup results. * * @param lookupResultsSequenceNumber sequence number used to retrieve the lookup results * @param personId person who performed the lookup * @return Collection of ContractsAndGrantsBillingAwards * @throws Excepti...
Get the Awards based on what the user selected in the lookup results
getAwardsFromLookupResultsSequenceNumber
{ "repo_name": "bhutchinson/kfs", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/web/struts/ContractsGrantsInvoiceSummaryAction.java", "license": "agpl-3.0", "size": 13802 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.HashMap", "java.util.List", "java.util.Map", "org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward", "org.kuali.kfs.sys.KFSPropertyConstants", "org.kuali.kfs.sys.context.SpringContext", "org.kuali.rice.krad.service.KualiModuleService",...
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.krad.se...
import java.util.*; import org.kuali.kfs.integration.cg.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.krad.service.*; import org.kuali.rice.krad.util.*;
[ "java.util", "org.kuali.kfs", "org.kuali.rice" ]
java.util; org.kuali.kfs; org.kuali.rice;
2,860,306
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || !(obj instanceof Address)) { return false; } return Arrays.areEqual(bytes, ((Address) obj).bytes) && type == ((Address) obj).type; }
boolean function(Object obj) { if (this == obj) { return true; } if (obj == null !(obj instanceof Address)) { return false; } return Arrays.areEqual(bytes, ((Address) obj).bytes) && type == ((Address) obj).type; }
/** * Compare addresses. Note that it is non-standard such that it makes P2Key Address equals LegacyAddress * * @param obj the other address * @return true if equals */
Compare addresses. Note that it is non-standard such that it makes P2Key Address equals LegacyAddress
equals
{ "repo_name": "DigitalAssetCom/hlp-candidate", "path": "client/api/src/main/java/org/hyperledger/common/Address.java", "license": "apache-2.0", "size": 4696 }
[ "org.bouncycastle.util.Arrays" ]
import org.bouncycastle.util.Arrays;
import org.bouncycastle.util.*;
[ "org.bouncycastle.util" ]
org.bouncycastle.util;
1,949,843
public Feature lookupFeatureOrFail(String name) throws IOException { Feature f = builder.getNamedFeature(name); if (f == null) { lexer.reportError("Feature " + name + " not found,"); } return f; }
Feature function(String name) throws IOException { Feature f = builder.getNamedFeature(name); if (f == null) { lexer.reportError(STR + name + STR); } return f; }
/** * Look up a named feature. Fail with an IOException if it's not found. * This can be called from a forward reference. * * @see ForwardReference **/
Look up a named feature. Fail with an IOException if it's not found. This can be called from a forward reference
lookupFeatureOrFail
{ "repo_name": "oliverlietz/bd-j", "path": "AuthoringTools/com.hdcookbook.grin/com.hdcookbook.grin-se/src/main/java/com/hdcookbook/grin/io/text/ShowParser.java", "license": "bsd-3-clause", "size": 115846 }
[ "com.hdcookbook.grin.Feature", "java.io.IOException" ]
import com.hdcookbook.grin.Feature; import java.io.IOException;
import com.hdcookbook.grin.*; import java.io.*;
[ "com.hdcookbook.grin", "java.io" ]
com.hdcookbook.grin; java.io;
620,353
public boolean hasUserDataPermission(Request request, Response response, SecurityConstraint []constraint) throws IOException;
boolean function(Request request, Response response, SecurityConstraint []constraint) throws IOException;
/** * Enforce any user data constraint required by the security constraint * guarding this request URI. Return <code>true</code> if this constraint * was not violated and processing should continue, or <code>false</code> * if we have created a response already. * * @param request Re...
Enforce any user data constraint required by the security constraint guarding this request URI. Return <code>true</code> if this constraint was not violated and processing should continue, or <code>false</code> if we have created a response already
hasUserDataPermission
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/Realm.java", "license": "apache-2.0", "size": 7361 }
[ "java.io.IOException", "org.apache.catalina.connector.Request", "org.apache.catalina.connector.Response", "org.apache.tomcat.util.descriptor.web.SecurityConstraint" ]
import java.io.IOException; import org.apache.catalina.connector.Request; import org.apache.catalina.connector.Response; import org.apache.tomcat.util.descriptor.web.SecurityConstraint;
import java.io.*; import org.apache.catalina.connector.*; import org.apache.tomcat.util.descriptor.web.*;
[ "java.io", "org.apache.catalina", "org.apache.tomcat" ]
java.io; org.apache.catalina; org.apache.tomcat;
1,771,963
public Range getVisibleRowRange() { if (!body.visualRowOrder.isEmpty()) { return Range.withLength(body.getTopRowLogicalIndex(), body.visualRowOrder.size()); } else { return Range.withLength(0, 0); } }
Range function() { if (!body.visualRowOrder.isEmpty()) { return Range.withLength(body.getTopRowLogicalIndex(), body.visualRowOrder.size()); } else { return Range.withLength(0, 0); } }
/** * Gets the logical index range of currently visible rows. * * @return logical index range of visible rows */
Gets the logical index range of currently visible rows
getVisibleRowRange
{ "repo_name": "jdahlstrom/vaadin.react", "path": "client/src/main/java/com/vaadin/client/widgets/Escalator.java", "license": "apache-2.0", "size": 267307 }
[ "com.vaadin.shared.ui.grid.Range" ]
import com.vaadin.shared.ui.grid.Range;
import com.vaadin.shared.ui.grid.*;
[ "com.vaadin.shared" ]
com.vaadin.shared;
2,905,782
private boolean populateQueue () { while (queue.isEmpty ()) { if (!iterator.hasNext ()) { return false; } final GenericFeature feature = iterator.next (); filter.processFeature (feature, outputStream, errorStream); } return true; } }
boolean function () { while (queue.isEmpty ()) { if (!iterator.hasNext ()) { return false; } final GenericFeature feature = iterator.next (); filter.processFeature (feature, outputStream, errorStream); } return true; } }
/** * Reads values from the input iterator and filters them until the queue is no longer empty. * * @return true if items have been added to the queue, false if the input iterator is exhausted. */
Reads values from the input iterator and filters them until the queue is no longer empty
populateQueue
{ "repo_name": "CDS-INSPIRE/InSpider", "path": "etl-proces/src/main/java/nl/ipo/cds/etl/featurecollection/FilteringFeatureCollection.java", "license": "gpl-3.0", "size": 3373 }
[ "nl.ipo.cds.etl.GenericFeature" ]
import nl.ipo.cds.etl.GenericFeature;
import nl.ipo.cds.etl.*;
[ "nl.ipo.cds" ]
nl.ipo.cds;
2,832,596
public ImmutableMultimap<String, Property> getProperties () { return properties; }
ImmutableMultimap<String, Property> function () { return properties; }
/** * Returns the properties of this component. * * @return the properties of this component. Never {@code null}, contains zero * or more entries, all keys and values non {@code null}. */
Returns the properties of this component
getProperties
{ "repo_name": "calebrichardson/spiff", "path": "src/main/java/com/outerspacecat/icalendar/Component.java", "license": "apache-2.0", "size": 11221 }
[ "com.google.common.collect.ImmutableMultimap" ]
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
875,165
private static synchronized void loadActionsCache(SecurityImpl security, SlideToken token) { ActionsCache cache = getActionsCache(security); try { cache.aggregation = new HashMap(); cache.aggregationClosure = new HashMap(); String actionsPath = security.namespaceC...
static synchronized void function(SecurityImpl security, SlideToken token) { ActionsCache cache = getActionsCache(security); try { cache.aggregation = new HashMap(); cache.aggregationClosure = new HashMap(); String actionsPath = security.namespaceConfig.getActionsPath(); Uri actionsPathUri = security.namespace.getUri(t...
/** * Populate the actions cache. * * @param namespace * @param namespaceConfig */
Populate the actions cache
loadActionsCache
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/share/org/apache/slide/security/SecurityImpl.java", "license": "apache-2.0", "size": 60874 }
[ "java.util.Enumeration", "java.util.HashMap", "java.util.Iterator", "java.util.Set", "org.apache.slide.common.SlideToken", "org.apache.slide.common.Uri", "org.apache.slide.structure.ActionNode", "org.apache.slide.structure.ObjectNode", "org.apache.slide.util.logger.Logger" ]
import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.Set; import org.apache.slide.common.SlideToken; import org.apache.slide.common.Uri; import org.apache.slide.structure.ActionNode; import org.apache.slide.structure.ObjectNode; import org.apache.slide.util.logger.Logger;
import java.util.*; import org.apache.slide.common.*; import org.apache.slide.structure.*; import org.apache.slide.util.logger.*;
[ "java.util", "org.apache.slide" ]
java.util; org.apache.slide;
362,555
Optional<BuildTarget> configurationTarget = targetConfiguration.getConfigurationTarget(); String key = configurationTarget.isPresent() ? configurationTarget.get().getFullyQualifiedName() : targetConfiguration.getClass().getName(); return mCache.computeIfAbsent( key, ...
Optional<BuildTarget> configurationTarget = targetConfiguration.getConfigurationTarget(); String key = configurationTarget.isPresent() ? configurationTarget.get().getFullyQualifiedName() : targetConfiguration.getClass().getName(); return mCache.computeIfAbsent( key, k -> { Hasher hasher = Hashing.murmur3_128().newHashe...
/** * Hashes a target configuration. * * @param targetConfiguration * @return A 128-bit murmur3 hash of the fully qualified name of the configuration target. If * there is no configuration target, a hash of the target configuration class name. */
Hashes a target configuration
hash
{ "repo_name": "zpao/buck", "path": "src/com/facebook/buck/core/model/impl/TargetConfigurationHasher.java", "license": "apache-2.0", "size": 2054 }
[ "com.facebook.buck.core.model.BuildTarget", "com.google.common.hash.Hasher", "com.google.common.hash.Hashing", "java.util.Optional" ]
import com.facebook.buck.core.model.BuildTarget; import com.google.common.hash.Hasher; import com.google.common.hash.Hashing; import java.util.Optional;
import com.facebook.buck.core.model.*; import com.google.common.hash.*; import java.util.*;
[ "com.facebook.buck", "com.google.common", "java.util" ]
com.facebook.buck; com.google.common; java.util;
1,146,385
int updateByExample(@Param("record") DictSchoolModel record, @Param("example") DictSchoolModelExample example);
int updateByExample(@Param(STR) DictSchoolModel record, @Param(STR) DictSchoolModelExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table dict_school * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table dict_school
updateByExample
{ "repo_name": "wanghongfei/taolijie", "path": "src/main/java/com/fh/taolijie/dao/mapper/DictSchoolModelMapper.java", "license": "gpl-3.0", "size": 2857 }
[ "com.fh.taolijie.domain.dict.DictSchoolModel", "com.fh.taolijie.domain.dict.DictSchoolModelExample", "org.apache.ibatis.annotations.Param" ]
import com.fh.taolijie.domain.dict.DictSchoolModel; import com.fh.taolijie.domain.dict.DictSchoolModelExample; import org.apache.ibatis.annotations.Param;
import com.fh.taolijie.domain.dict.*; import org.apache.ibatis.annotations.*;
[ "com.fh.taolijie", "org.apache.ibatis" ]
com.fh.taolijie; org.apache.ibatis;
2,470,749
public static String getReferer(HttpServletRequest request) throws IOException { String referer = request.getParameter(KEY_REFERER); if (referer == null) { referer = request.getHeader(KEY_REFERER); } else { if (!referer.contains("://")) { referer = decode(referer); ...
static String function(HttpServletRequest request) throws IOException { String referer = request.getParameter(KEY_REFERER); if (referer == null) { referer = request.getHeader(KEY_REFERER); } else { if (!referer.contains(STR: if (idx < 0) throw new IOException(STR=", idx); if (idx >= 0) referer = referer.substring(idx +...
/** * Returns the referer from parameter 'Referer' or from header parameter 'Referer'. The request * parameter 'Referer' (if set) has priority to the header referer. * * @param request * @return referer or null if not existing in neither of both * @throws IOException */
Returns the referer from parameter 'Referer' or from header parameter 'Referer'. The request parameter 'Referer' (if set) has priority to the header referer
getReferer
{ "repo_name": "sap-production/OTAService", "path": "modules/ota-webapp/src/main/java/com/sap/prd/mobile/ios/ota/webapp/Utils.java", "license": "apache-2.0", "size": 12085 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
488,594
public boolean isSyncEnabled(Account account) { if (account == null) return false; boolean returnValue; synchronized (mCachedSettings) { returnValue = mCachedMasterSyncAutomatically && mCachedSettings.getSyncAutomatically(account); } notifyObserve...
boolean function(Account account) { if (account == null) return false; boolean returnValue; synchronized (mCachedSettings) { returnValue = mCachedMasterSyncAutomatically && mCachedSettings.getSyncAutomatically(account); } notifyObserversIfAccountSettingsChanged(); return returnValue; }
/** * Checks whether sync is currently enabled from Chrome for a given account. * * It checks both the master sync for the device, and Chrome sync setting for the given account. * * @param account the account to check if Chrome sync is enabled on. * @return true if sync is on, false otherw...
Checks whether sync is currently enabled from Chrome for a given account. It checks both the master sync for the device, and Chrome sync setting for the given account
isSyncEnabled
{ "repo_name": "DirtyUnicorns/android_external_chromium-org", "path": "sync/android/java/src/org/chromium/sync/notifier/SyncStatusHelper.java", "license": "bsd-3-clause", "size": 17420 }
[ "android.accounts.Account" ]
import android.accounts.Account;
import android.accounts.*;
[ "android.accounts" ]
android.accounts;
1,376,277
boolean isRelationRemovable(PerunSession sess, Group resultGroup, Group operandGroup) throws InternalErrorException;
boolean isRelationRemovable(PerunSession sess, Group resultGroup, Group operandGroup) throws InternalErrorException;
/** * Check if the relation between given groups can be deleted. * Determined by parent flag (it flags relations created by hierarchical structure). * It matters which group is resultGroup and which is operandGroup!!! * * @return true if it can be deleted; false otherwise * * @throws cz.metacentrum.perun....
Check if the relation between given groups can be deleted. Determined by parent flag (it flags relations created by hierarchical structure). It matters which group is resultGroup and which is operandGroup!!
isRelationRemovable
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/GroupsManagerImplApi.java", "license": "bsd-2-clause", "size": 24729 }
[ "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException" ]
import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,716,039
public void setBlacklistForArtist(String artistName, boolean blacklist) { String where = SONG_ARTIST + "=" + "'" + artistName.replace("'", "''") + "'"; ContentValues values = new ContentValues(); values.put(BLACKLIST_STATUS, blacklist); getDatabase().update(MUSIC_LIBRARY_TABLE, values, where, nu...
void function(String artistName, boolean blacklist) { String where = SONG_ARTIST + "=" + "'" + artistName.replace("'", "''") + "'"; ContentValues values = new ContentValues(); values.put(BLACKLIST_STATUS, blacklist); getDatabase().update(MUSIC_LIBRARY_TABLE, values, where, null); }
/** * Sets the blacklist status of the specified artist. */
Sets the blacklist status of the specified artist
setBlacklistForArtist
{ "repo_name": "yongjiliu/MusicPlayer", "path": "ACEMusicPlayer/src/main/java/com/aniruddhc/acemusic/player/DBHelpers/DBAccessHelper.java", "license": "gpl-2.0", "size": 72380 }
[ "android.content.ContentValues" ]
import android.content.ContentValues;
import android.content.*;
[ "android.content" ]
android.content;
1,181,006
private synchronized void removeVolumes( final Collection<StorageLocation> storageLocations, boolean clearFailure) throws IOException { if (storageLocations.isEmpty()) { return; } LOG.info(String.format("Deactivating volumes (clear failure=%b): %s", clearFailure, Joiner.on(",")....
synchronized void function( final Collection<StorageLocation> storageLocations, boolean clearFailure) throws IOException { if (storageLocations.isEmpty()) { return; } LOG.info(String.format(STR, clearFailure, Joiner.on(",").join(storageLocations))); IOException ioe = null; data.removeVolumes(storageLocations, clearFail...
/** * Remove volumes from DataNode. * * It does three things: * <li> * <ul>Remove volumes and block info from FsDataset.</ul> * <ul>Remove volumes from DataStorage.</ul> * <ul>Reset configuration DATA_DIR and {@link #dataDirs} to represent * active volumes.</ul> * </li> * @param st...
Remove volumes from DataNode. It does three things: Remove volumes and block info from FsDataset. Remove volumes from DataStorage. Reset configuration DATA_DIR and <code>#dataDirs</code> to represent active volumes.
removeVolumes
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 133328 }
[ "com.google.common.base.Joiner", "java.io.IOException", "java.util.Collection", "java.util.Iterator" ]
import com.google.common.base.Joiner; import java.io.IOException; import java.util.Collection; import java.util.Iterator;
import com.google.common.base.*; import java.io.*; import java.util.*;
[ "com.google.common", "java.io", "java.util" ]
com.google.common; java.io; java.util;
705,063
public HTableInterface getTable(String tableName) throws IOException;
HTableInterface function(String tableName) throws IOException;
/** * Retrieve an HTableInterface implementation for access to a table. * The returned HTableInterface is not thread safe, a new instance should * be created for each using thread. * This is a lightweight operation, pooling or caching of the returned HTableInterface * is neither required nor desired. ...
Retrieve an HTableInterface implementation for access to a table. The returned HTableInterface is not thread safe, a new instance should be created for each using thread. This is a lightweight operation, pooling or caching of the returned HTableInterface is neither required nor desired. (created with <code>ConnectionFa...
getTable
{ "repo_name": "juwi/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnection.java", "license": "apache-2.0", "size": 23560 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,286,427
private void checkAuthPlainSupport() throws AuthenticationNotSupportedException { String mechanismsString = smartClient.getExtensions().get("AUTH"); if (mechanismsString == null) { throw new AuthenticationNotSupportedException( "Cannot authenticate, becaus...
void function() throws AuthenticationNotSupportedException { String mechanismsString = smartClient.getExtensions().get("AUTH"); if (mechanismsString == null) { throw new AuthenticationNotSupportedException( STR + STR + STR); } Set<String> mechanisms = parseMechanismsList(mechanismsString); if (!mechanisms.contains("PLA...
/** * Checks if the server supports this mechanism. * * @throws AuthenticationNotSupportedException if the server does not * support this mechanism or authentication at all. */
Checks if the server supports this mechanism
checkAuthPlainSupport
{ "repo_name": "tuzzmaniandevil/subethasmtp", "path": "src/main/java/org/subethamail/smtp/client/PlainAuthenticator.java", "license": "apache-2.0", "size": 3010 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,023,193
boolean provideProvisionResponse(byte[] response) { if (response == null || response.length == 0) { Log.e(TAG, "Invalid provision response."); return false; } try { mMediaDrm.provideProvisionResponse(response); return true; } catch (an...
boolean provideProvisionResponse(byte[] response) { if (response == null response.length == 0) { Log.e(TAG, STR); return false; } try { mMediaDrm.provideProvisionResponse(response); return true; } catch (android.media.DeniedByServerException e) { Log.e(TAG, STR, e); } catch (java.lang.IllegalStateException e) { Log.e(T...
/** * Provides the provision response to MediaDrm. * * @returns false if the response is invalid or on error, true otherwise. */
Provides the provision response to MediaDrm
provideProvisionResponse
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/media/MediaDrmBridge.java", "license": "apache-2.0", "size": 53105 }
[ "org.chromium.base.Log" ]
import org.chromium.base.Log;
import org.chromium.base.*;
[ "org.chromium.base" ]
org.chromium.base;
437,516
@Override public TTable toThrift() { TTable table = super.toThrift(); table.setTable_type(TTableType.DATA_SOURCE_TABLE); table.setData_source_table(getDataSourceTable()); return table; }
TTable function() { TTable table = super.toThrift(); table.setTable_type(TTableType.DATA_SOURCE_TABLE); table.setData_source_table(getDataSourceTable()); return table; }
/** * Returns a thrift structure representing the table. */
Returns a thrift structure representing the table
toThrift
{ "repo_name": "924060929/impala-frontend", "path": "fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java", "license": "apache-2.0", "size": 9219 }
[ "org.apache.impala.thrift.TTable", "org.apache.impala.thrift.TTableType" ]
import org.apache.impala.thrift.TTable; import org.apache.impala.thrift.TTableType;
import org.apache.impala.thrift.*;
[ "org.apache.impala" ]
org.apache.impala;
2,326,235
public void setSelectors(int selectors) { this.selectors = selectors; } /** * Sets {@link JettyServerCustomizer}s that will be applied to the {@link Server}
void function(int selectors) { this.selectors = selectors; } /** * Sets {@link JettyServerCustomizer}s that will be applied to the {@link Server}
/** * Set the number of selector threads to use. * @param selectors the number of selector threads to use * @since 1.4.0 */
Set the number of selector threads to use
setSelectors
{ "repo_name": "mevasaroj/jenkins2-course-spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactory.java", "license": "apache-2.0", "size": 32517 }
[ "org.eclipse.jetty.server.Server" ]
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.*;
[ "org.eclipse.jetty" ]
org.eclipse.jetty;
267,820
private static Entry<DetailAST, Integer> calculateDistanceInSingleScope( DetailAST semicolonAst, DetailAST variableIdentAst) { int dist = 0; boolean firstUsageFound = false; DetailAST currentAst = semicolonAst; DetailAST variableUsageAst = null; while (!firstUsag...
static Entry<DetailAST, Integer> function( DetailAST semicolonAst, DetailAST variableIdentAst) { int dist = 0; boolean firstUsageFound = false; DetailAST currentAst = semicolonAst; DetailAST variableUsageAst = null; while (!firstUsageFound && currentAst != null && currentAst.getType() != TokenTypes.RCURLY) { if (curren...
/** * Calculates distance between declaration of variable and its first usage * in single scope. * @param semicolonAst * Regular node of Ast which is checked for content of checking * variable. * @param variableIdentAst * Variable which distance is calculated for....
Calculates distance between declaration of variable and its first usage in single scope
calculateDistanceInSingleScope
{ "repo_name": "StetsiukRoman/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/VariableDeclarationUsageDistanceCheck.java", "license": "lgpl-2.1", "size": 31492 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes", "java.util.AbstractMap", "java.util.Map" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; import java.util.AbstractMap; import java.util.Map;
import com.puppycrawl.tools.checkstyle.api.*; import java.util.*;
[ "com.puppycrawl.tools", "java.util" ]
com.puppycrawl.tools; java.util;
854,589
public List<MultipartUploadSummary> getMultipartUploads() { if (this.multipartUploads == null) { this.multipartUploads = new ArrayList<MultipartUploadSummary>(); } return this.multipartUploads; }
List<MultipartUploadSummary> function() { if (this.multipartUploads == null) { this.multipartUploads = new ArrayList<MultipartUploadSummary>(); } return this.multipartUploads; }
/** * Returns the list of multipart uploads. * * @return The list of multipart uploads. */
Returns the list of multipart uploads
getMultipartUploads
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/services/bos/model/ListMultipartUploadsResponse.java", "license": "apache-2.0", "size": 10602 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,525,130
double[] itemSimilarities(long itemID1, long[] itemID2s) throws TasteException;
double[] itemSimilarities(long itemID1, long[] itemID2s) throws TasteException;
/** * <p>A bulk-get version of {@link #itemSimilarity(long, long)}.</p> * * @param itemID1 first item ID * @param itemID2s second item IDs to compute similarity with * @return similarity between itemID1 and other items * @throws org.apache.mahout.cf.taste.common.NoSuchItemException * if any item i...
A bulk-get version of <code>#itemSimilarity(long, long)</code>
itemSimilarities
{ "repo_name": "huran2014/huran.github.io", "path": "program_learning/Java/MyEclipseProfessional2014/mr/src/main/java/org/apache/mahout/cf/taste/similarity/ItemSimilarity.java", "license": "gpl-2.0", "size": 2529 }
[ "org.apache.mahout.cf.taste.common.TasteException" ]
import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.common.*;
[ "org.apache.mahout" ]
org.apache.mahout;
1,719,208
public static void loadConfiguration(final String configDir) { if (configDir == null) { LOG.warn("Given configuration directory is null, cannot load configuration"); return; } final File confDirFile = new File(configDir); if (!(confDirFile.exists())) { LOG.warn("The given configuration directory n...
static void function(final String configDir) { if (configDir == null) { LOG.warn(STR); return; } final File confDirFile = new File(configDir); if (!(confDirFile.exists())) { LOG.warn(STR + configDir + STR + confDirFile.getAbsolutePath() + STR); return; } if (confDirFile.isFile()) { final File file = new File(configDir)...
/** * Loads the configuration files from the specified directory. * <p> * XML and YAML are supported as configuration files. If both XML and YAML files exist in the configuration * directory, keys from YAML will overwrite keys from XML. * * @param configDir * the directory which contains the confi...
Loads the configuration files from the specified directory. XML and YAML are supported as configuration files. If both XML and YAML files exist in the configuration directory, keys from YAML will overwrite keys from XML
loadConfiguration
{ "repo_name": "citlab/vs.msc.ws14", "path": "flink-0-7-custom/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java", "license": "apache-2.0", "size": 14091 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,229,213
Options forLevel(DataLevel level);
Options forLevel(DataLevel level);
/** * Read all of the tablet metadata for this level. */
Read all of the tablet metadata for this level
forLevel
{ "repo_name": "keith-turner/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/metadata/schema/TabletsMetadata.java", "license": "apache-2.0", "size": 12802 }
[ "org.apache.accumulo.core.metadata.schema.Ample" ]
import org.apache.accumulo.core.metadata.schema.Ample;
import org.apache.accumulo.core.metadata.schema.*;
[ "org.apache.accumulo" ]
org.apache.accumulo;
1,654,869
private void openZip() throws Exception { try { // Get the ZIP file content. ZipInputStream zis = new ZipInputStream(new FileInputStream(this.filename)); ZipEntry ze = zis.getNextEntry(); while (ze != null) { // Check if file is in global names...
void function() throws Exception { try { ZipInputStream zis = new ZipInputStream(new FileInputStream(this.filename)); ZipEntry ze = zis.getNextEntry(); while (ze != null) { String name = ze.getName(); if (name.toLowerCase().startsWith(NS_ACS) name.toLowerCase().startsWith(NS_COLORMAPS) name.toLowerCase().startsWith(NS_...
/** * Opens the container file. */
Opens the container file
openZip
{ "repo_name": "hidensity/doomlauncher", "path": "src/org/dbb/doom/ZipManager.java", "license": "gpl-2.0", "size": 7770 }
[ "java.io.FileInputStream", "java.io.IOException", "java.nio.ByteBuffer", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream" ]
import java.io.FileInputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream;
import java.io.*; import java.nio.*; import java.util.zip.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
2,094,775
protected OAuth20TokenGeneratedResult generateAccessTokenOAuthDeviceCodeResponseType(final AccessTokenRequestDataHolder holder) { val deviceCode = holder.getDeviceCode(); if (StringUtils.isNotBlank(deviceCode)) { val deviceCodeTicket = getDeviceTokenFromTicketRegistry(deviceCode); ...
OAuth20TokenGeneratedResult function(final AccessTokenRequestDataHolder holder) { val deviceCode = holder.getDeviceCode(); if (StringUtils.isNotBlank(deviceCode)) { val deviceCodeTicket = getDeviceTokenFromTicketRegistry(deviceCode); val deviceUserCode = getDeviceUserCodeFromRegistry(deviceCodeTicket); if (deviceUserCo...
/** * Generate access token OAuth device code response type OAuth token generated result. * * @param holder the holder * @return the OAuth token generated result */
Generate access token OAuth device code response type OAuth token generated result
generateAccessTokenOAuthDeviceCodeResponseType
{ "repo_name": "leleuj/cas", "path": "support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGenerator.java", "license": "apache-2.0", "size": 14056 }
[ "java.time.ZoneOffset", "java.time.ZonedDateTime", "java.util.LinkedHashSet", "org.apache.commons.lang3.StringUtils", "org.apereo.cas.configuration.support.Beans", "org.apereo.cas.support.oauth.validator.token.device.ThrottledOAuth20DeviceUserCodeApprovalException", "org.apereo.cas.support.oauth.validat...
import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.LinkedHashSet; import org.apache.commons.lang3.StringUtils; import org.apereo.cas.configuration.support.Beans; import org.apereo.cas.support.oauth.validator.token.device.ThrottledOAuth20DeviceUserCodeApprovalException; import org.apereo.cas.s...
import java.time.*; import java.util.*; import org.apache.commons.lang3.*; import org.apereo.cas.configuration.support.*; import org.apereo.cas.support.oauth.validator.token.device.*; import org.apereo.cas.support.oauth.web.response.accesstoken.ext.*;
[ "java.time", "java.util", "org.apache.commons", "org.apereo.cas" ]
java.time; java.util; org.apache.commons; org.apereo.cas;
1,529,782
HashMap<String,HashSet<URI>> getObjectSameAsLinks(int columnName);
HashMap<String,HashSet<URI>> getObjectSameAsLinks(int columnName);
/** * For a given value that occurs in the source data, * provide the set of URIs that the promoted value will be owl:sameAs. * * This returns a view of the entire links-via graph that is loaded by {@link #getLODLinksRepositories()}. * * @param columnName * @return a mapping from literal ...
For a given value that occurs in the source data, provide the set of URIs that the promoted value will be owl:sameAs. This returns a view of the entire links-via graph that is loaded by <code>#getLODLinksRepositories()</code>
getObjectSameAsLinks
{ "repo_name": "timrdf/csv2rdf4lod", "path": "src/edu/rpi/tw/data/csv/EnhancementParameters.java", "license": "apache-2.0", "size": 18954 }
[ "java.util.HashMap", "java.util.HashSet" ]
import java.util.HashMap; import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
122,185
public static ServiceLayerMethod valueOf(final String methodIdentifier, final List<JavaType> callerParameters, final JavaType targetEntity, final JavaType idType) { // Look for matching method name and parameter types for (final ServiceLayerMethod method : values()) { ...
static ServiceLayerMethod function(final String methodIdentifier, final List<JavaType> callerParameters, final JavaType targetEntity, final JavaType idType) { for (final ServiceLayerMethod method : values()) { if (method.getKey().equals(methodIdentifier) && method.getParameterTypes(targetEntity, idType).equals( callerP...
/** * Returns the {@link ServiceLayerMethod} with the given properties, if any * * @param methodIdentifier the internal ID of the method (can be blank) * @param callerParameters the types of parameter to be passed to the method * (required) * @param targetEntity the type of enti...
Returns the <code>ServiceLayerMethod</code> with the given properties, if any
valueOf
{ "repo_name": "rwl/requestfactory-addon", "path": "addon/src/main/java/org/springframework/roo/addon/requestfactory/entity/ServiceLayerMethod.java", "license": "apache-2.0", "size": 11092 }
[ "java.util.List", "org.apache.commons.lang3.Validate", "org.springframework.roo.classpath.customdata.tagkeys.MethodMetadataCustomDataKey", "org.springframework.roo.model.JavaType" ]
import java.util.List; import org.apache.commons.lang3.Validate; import org.springframework.roo.classpath.customdata.tagkeys.MethodMetadataCustomDataKey; import org.springframework.roo.model.JavaType;
import java.util.*; import org.apache.commons.lang3.*; import org.springframework.roo.classpath.customdata.tagkeys.*; import org.springframework.roo.model.*;
[ "java.util", "org.apache.commons", "org.springframework.roo" ]
java.util; org.apache.commons; org.springframework.roo;
2,069,700
public DeletedSasDefinitionBundle deleteSasDefinition(String vaultBaseUrl, String storageAccountName, String sasDefinitionName) { return deleteSasDefinitionWithServiceResponseAsync(vaultBaseUrl, storageAccountName, sasDefinitionName).toBlocking().single().body(); }
DeletedSasDefinitionBundle function(String vaultBaseUrl, String storageAccountName, String sasDefinitionName) { return deleteSasDefinitionWithServiceResponseAsync(vaultBaseUrl, storageAccountName, sasDefinitionName).toBlocking().single().body(); }
/** * Deletes a SAS definition from a specified storage account. This operation requires the storage/deletesas permission. * * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param storageAccountName The name of the storage account. * @param sasDefinitionName...
Deletes a SAS definition from a specified storage account. This operation requires the storage/deletesas permission
deleteSasDefinition
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java", "license": "mit", "size": 884227 }
[ "com.microsoft.azure.keyvault.models.DeletedSasDefinitionBundle" ]
import com.microsoft.azure.keyvault.models.DeletedSasDefinitionBundle;
import com.microsoft.azure.keyvault.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,553,207
private Pattern generatePattern() { StringBuilder sb = new StringBuilder(); sb.append('('); for (String delim : ALL_DELIMS) { // For each delimiter if (sb.length() != 1) sb.append('|'); sb.append('\\'); sb.append(delim); } sb.append(')'); return Pattern.compile(sb.toString()...
Pattern function() { StringBuilder sb = new StringBuilder(); sb.append('('); for (String delim : ALL_DELIMS) { if (sb.length() != 1) sb.append(' '); sb.append('\\'); sb.append(delim); } sb.append(')'); return Pattern.compile(sb.toString()); } static { SET_IGNORE.add(QUERY_FIELDS); SET_IGNORE.add(QUERY_FORMAT); SET_IGNO...
/** * Generate the regex pattern to tokenize the query expression. * * @return the regex pattern */
Generate the regex pattern to tokenize the query expression
generatePattern
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java", "license": "apache-2.0", "size": 23034 }
[ "java.util.ArrayDeque", "java.util.ArrayList", "java.util.Deque", "java.util.HashSet", "java.util.List", "java.util.Set", "java.util.regex.Pattern" ]
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Deque; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.regex.Pattern;
import java.util.*; import java.util.regex.*;
[ "java.util" ]
java.util;
2,592,960
if (Strings.isNullOrEmpty(string)) { return null; } final String plain = string.trim(); if (!plain.matches("\\d+") || plain.length() > 3) { return null; } return Integer.parseInt(plain); }
if (Strings.isNullOrEmpty(string)) { return null; } final String plain = string.trim(); if (!plain.matches("\\d+") plain.length() > 3) { return null; } return Integer.parseInt(plain); }
/** * Convert string without exception. * * @param string the string * @return the integer or null if not convertible */
Convert string without exception
convert
{ "repo_name": "CymricNPG/abattle", "path": "ABattle.Common/src/net/npg/abattle/common/utils/StringUtils.java", "license": "apache-2.0", "size": 656 }
[ "com.google.common.base.Strings" ]
import com.google.common.base.Strings;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,734,448
public boolean verifySignedMessage(String message, Date timestamp, PublicKey publicKey, String signature) throws SignatureException { // get the message and timestamp into one string for verification String messageToVerify = new StringBuilder().append(message).append(":") .append(Long.toString(timestamp.g...
boolean function(String message, Date timestamp, PublicKey publicKey, String signature) throws SignatureException { String messageToVerify = new StringBuilder().append(message).append(":") .append(Long.toString(timestamp.getTime())).toString(); byte[] data = messageToVerify.getBytes(StandardCharsets.UTF_8); byte[] sign...
/** * verifies a signature generated from its content and timestamp * * @param message * the message content * @param timestamp * the message timestamp * @param publicKey * the public key of the signer * @param signature * the signature encoded in Base64 ...
verifies a signature generated from its content and timestamp
verifySignedMessage
{ "repo_name": "shilongdai/LSChatServer", "path": "src/main/java/net/viperfish/chatapplication/core/AuthenticationUtils.java", "license": "bsd-3-clause", "size": 5228 }
[ "java.nio.charset.StandardCharsets", "java.security.InvalidKeyException", "java.security.NoSuchAlgorithmException", "java.security.PublicKey", "java.security.Signature", "java.security.SignatureException", "java.util.Date", "org.springframework.util.Base64Utils" ]
import java.nio.charset.StandardCharsets; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.Signature; import java.security.SignatureException; import java.util.Date; import org.springframework.util.Base64Utils;
import java.nio.charset.*; import java.security.*; import java.util.*; import org.springframework.util.*;
[ "java.nio", "java.security", "java.util", "org.springframework.util" ]
java.nio; java.security; java.util; org.springframework.util;
822,960
public void test_ConstructorLjava_io_OutputStreamLjava_lang_StringLjava_util_Locale() throws IOException { Formatter f = null; try { f = new Formatter((OutputStream) null, Charset.defaultCharset() .name(), Locale.getDefault()); fail("shou...
void function() throws IOException { Formatter f = null; try { f = new Formatter((OutputStream) null, Charset.defaultCharset() .name(), Locale.getDefault()); fail(STR); } catch (NullPointerException e1) { } OutputStream os = null; try { os = new FileOutputStream(notExist); f = new Formatter(os, null, Locale.getDefault(...
/** * Test method for 'java.util.Formatter.Formatter(OutputStream, String, * Locale) */
Test method for 'java.util.Formatter.Formatter(OutputStream, String, Locale)
test_ConstructorLjava_io_OutputStreamLjava_lang_StringLjava_util_Locale
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/FormatterTest.java", "license": "gpl-2.0", "size": 215384 }
[ "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStream", "java.io.PipedOutputStream", "java.io.UnsupportedEncodingException", "java.nio.charset.Charset", "java.util.Formatter", "java.util.Locale" ]
import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PipedOutputStream; import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; import java.util.Formatter; import java.util.Locale;
import java.io.*; import java.nio.charset.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
2,025,153
public int getExitCode() { return exitCode; } @SuppressWarnings("serial") public static class ExitCodeException extends IOException { int exitCode; public ExitCodeException(int exitCode, String message) { super(message); this.exitCode = exitCode; }
int function() { return exitCode; } @SuppressWarnings(STR) public static class ExitCodeException extends IOException { int exitCode; public ExitCodeException(int exitCode, String message) { super(message); this.exitCode = exitCode; }
/** get the exit code * @return the exit code of the process */
get the exit code
getExitCode
{ "repo_name": "williamsbdev/zookeeper", "path": "src/java/main/org/apache/zookeeper/Shell.java", "license": "apache-2.0", "size": 15395 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,169,077
@SuppressWarnings("AutoBoxing") protected Collection<T> convertPrimitiveArrayToCollection(Object value, Class primitiveComponentType) { Collection<T> result = null; if (primitiveComponentType == int.class) { int[] array = (int[]) value; result = createCollection(array.length); for (int a : array) { ...
@SuppressWarnings(STR) Collection<T> function(Object value, Class primitiveComponentType) { Collection<T> result = null; if (primitiveComponentType == int.class) { int[] array = (int[]) value; result = createCollection(array.length); for (int a : array) { result.add(convertType(a)); } } else if (primitiveComponentType ...
/** * Converts primitive array to target collection. */
Converts primitive array to target collection
convertPrimitiveArrayToCollection
{ "repo_name": "mohanaraosv/jodd", "path": "jodd-bean/src/main/java/jodd/typeconverter/impl/CollectionConverter.java", "license": "bsd-2-clause", "size": 7606 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
120,335
public void testRunAsync_normalCompletion() { ExecutionMode[] executionModes = { ExecutionMode.ASYNC, ExecutionMode.EXECUTOR, }; for (ExecutionMode m : executionModes) { final Noop r = new Noop(m); final CompletableFuture<Void> f = m.runAsync(r); ...
void function() { ExecutionMode[] executionModes = { ExecutionMode.ASYNC, ExecutionMode.EXECUTOR, }; for (ExecutionMode m : executionModes) { final Noop r = new Noop(m); final CompletableFuture<Void> f = m.runAsync(r); assertNull(f.join()); checkCompletedNormally(f, null); r.assertInvoked(); }}
/** * runAsync completes after running Runnable */
runAsync completes after running Runnable
testRunAsync_normalCompletion
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/CompletableFutureTest.java", "license": "gpl-2.0", "size": 182910 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
114,257
@Test public void testCreateConfigWithNullConfig() { mockConfigAdminService.createApiConfig(null); replay(mockConfigAdminService); final WebTarget wt = target(); InputStream jsonStream = KubevirtApiConfigWebResourceTest.class .getResourceAsStream("kubevirt-api-co...
void function() { mockConfigAdminService.createApiConfig(null); replay(mockConfigAdminService); final WebTarget wt = target(); InputStream jsonStream = KubevirtApiConfigWebResourceTest.class .getResourceAsStream(STR); Response response = wt.path(PATH).request(MediaType.APPLICATION_JSON_TYPE) .post(Entity.json(jsonStrea...
/** * Tests the results of the REST API POST method without creating new configs operation. */
Tests the results of the REST API POST method without creating new configs operation
testCreateConfigWithNullConfig
{ "repo_name": "opennetworkinglab/onos", "path": "apps/kubevirt-node/app/src/test/java/org/onosproject/kubevirtnode/web/KubevirtApiConfigWebResourceTest.java", "license": "apache-2.0", "size": 6346 }
[ "java.io.InputStream", "javax.ws.rs.client.Entity", "javax.ws.rs.client.WebTarget", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.easymock.EasyMock", "org.hamcrest.Matchers", "org.junit.Assert" ]
import java.io.InputStream; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.easymock.EasyMock; import org.hamcrest.Matchers; import org.junit.Assert;
import java.io.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import org.easymock.*; import org.hamcrest.*; import org.junit.*;
[ "java.io", "javax.ws", "org.easymock", "org.hamcrest", "org.junit" ]
java.io; javax.ws; org.easymock; org.hamcrest; org.junit;
332,839
private static boolean validExcludeMemberType(Address.Type type) { return type == Address.Type.IPRANGE || type == Address.Type.IPMASK; }
static boolean function(Address.Type type) { return type == Address.Type.IPRANGE type == Address.Type.IPMASK; }
/** * Returns a boolean indicating if the specified address type is valid to use for an exclude * member for an addrgrp. */
Returns a boolean indicating if the specified address type is valid to use for an exclude member for an addrgrp
validExcludeMemberType
{ "repo_name": "arifogel/batfish", "path": "projects/batfish/src/main/java/org/batfish/grammar/fortios/FortiosConfigurationBuilder.java", "license": "apache-2.0", "size": 126531 }
[ "org.batfish.representation.fortios.Address", "org.batfish.representation.fortios.Interface" ]
import org.batfish.representation.fortios.Address; import org.batfish.representation.fortios.Interface;
import org.batfish.representation.fortios.*;
[ "org.batfish.representation" ]
org.batfish.representation;
242,621
@WebMethod @WebResult(name = "rval", targetNamespace = "https://www.google.com/apis/ads/publisher/v201311") @RequestWrapper(localName = "getRateCardCustomization", targetNamespace = "https://www.google.com/apis/ads/publisher/v201311", className = "com.google.api.ads.dfp.jaxws.v201311.RateCardCustomizationSe...
@WebResult(name = "rval", targetNamespace = STRgetRateCardCustomizationSTRhttps: @ResponseWrapper(localName = "getRateCardCustomizationResponseSTRhttps: RateCardCustomization function( @WebParam(name = "rateCardCustomizationIdSTRhttps: Long rateCardCustomizationId) throws ApiException_Exception ; /** * * Gets a {@link ...
/** * * Returns the {@link RateCardCustomization} object uniquely identified by the * given ID. * * @param rateCardCustomizationId the ID of the rate card customization, which * must already exist. * * * @param rateCardCustom...
Returns the <code>RateCardCustomization</code> object uniquely identified by the given ID
getRateCardCustomization
{ "repo_name": "nafae/developer", "path": "modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201311/RateCardCustomizationServiceInterface.java", "license": "apache-2.0", "size": 12066 }
[ "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
1,207,858
try { frame = new JFrame(); frame.setIconImage(ImageIO.read(new File("Files/Images/Favicon/PenroseColor.png"))); } catch (IOException exc) { exc.printStackTrace(); } }
try { frame = new JFrame(); frame.setIconImage(ImageIO.read(new File(STR))); } catch (IOException exc) { exc.printStackTrace(); } }
/** * Set icon on the frame. */
Set icon on the frame
setIconWindow
{ "repo_name": "alexandreauda/CellularAutomaton", "path": "src/main/java/com/ter/CellularAutomaton/controller/ExportScreenshotGIFFormat1DEvent.java", "license": "gpl-3.0", "size": 3842 }
[ "java.io.File", "java.io.IOException", "javax.imageio.ImageIO", "javax.swing.JFrame" ]
import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import javax.swing.JFrame;
import java.io.*; import javax.imageio.*; import javax.swing.*;
[ "java.io", "javax.imageio", "javax.swing" ]
java.io; javax.imageio; javax.swing;
2,374,717
public OpenURLResponse resolve(ServiceType serviceType, ContextObject contextObject, OpenURLRequest openURLRequest, OpenURLRequestProcessor processor) { String responseFormat = RESPONSE_TYPE; int status = HttpServletResponse.SC_NOT_FOUND; StringBuffer sb = new StringBuffer(); try { String id = ((...
OpenURLResponse function(ServiceType serviceType, ContextObject contextObject, OpenURLRequest openURLRequest, OpenURLRequestProcessor processor) { String responseFormat = RESPONSE_TYPE; int status = HttpServletResponse.SC_NOT_FOUND; StringBuffer sb = new StringBuffer(); try { String id = ((URI) contextObject.getReferen...
/** * Returns the OpenURLResponse of a JSON object defining image status. * Status Codes: * * */
Returns the OpenURLResponse of a JSON object defining image status. Status Codes:
resolve
{ "repo_name": "sul-dlss/djatoka", "path": "src/gov/lanl/adore/djatoka/openurl/OpenURLJP2Ping.java", "license": "mit", "size": 5072 }
[ "gov.lanl.util.HttpDate", "info.openurl.oom.ContextObject", "info.openurl.oom.OpenURLRequest", "info.openurl.oom.OpenURLRequestProcessor", "info.openurl.oom.OpenURLResponse", "info.openurl.oom.entities.ServiceType", "javax.servlet.http.HttpServletResponse" ]
import gov.lanl.util.HttpDate; import info.openurl.oom.ContextObject; import info.openurl.oom.OpenURLRequest; import info.openurl.oom.OpenURLRequestProcessor; import info.openurl.oom.OpenURLResponse; import info.openurl.oom.entities.ServiceType; import javax.servlet.http.HttpServletResponse;
import gov.lanl.util.*; import info.openurl.oom.*; import info.openurl.oom.entities.*; import javax.servlet.http.*;
[ "gov.lanl.util", "info.openurl.oom", "javax.servlet" ]
gov.lanl.util; info.openurl.oom; javax.servlet;
2,875,306
@Override public Collection getNotificationsForRecipientByType(String contentTypeName, String recipientId) { QueryByCriteria.Builder criteria = QueryByCriteria.Builder.create(); criteria.setPredicates(equal(NotificationConstants.BO_PROPERTY_NAMES.CONTENT_TYPE_NAME, contentTypeName), ...
Collection function(String contentTypeName, String recipientId) { QueryByCriteria.Builder criteria = QueryByCriteria.Builder.create(); criteria.setPredicates(equal(NotificationConstants.BO_PROPERTY_NAMES.CONTENT_TYPE_NAME, contentTypeName), equal(NotificationConstants.BO_PROPERTY_NAMES.RECIPIENTS_RECIPIENT_ID, recipien...
/** * This is the default implementation that uses the businessObjectDao and its findMatching method. * @see org.kuali.rice.ken.service.NotificationService#getNotificationsForRecipientByType(java.lang.String, java.lang.String) */
This is the default implementation that uses the businessObjectDao and its findMatching method
getNotificationsForRecipientByType
{ "repo_name": "ewestfal/rice", "path": "rice-middleware/impl/src/main/java/org/kuali/rice/ken/service/impl/NotificationServiceImpl.java", "license": "apache-2.0", "size": 14999 }
[ "java.util.Collection", "java.util.Collections", "org.kuali.rice.core.api.criteria.PredicateFactory", "org.kuali.rice.core.api.criteria.QueryByCriteria", "org.kuali.rice.ken.bo.NotificationBo", "org.kuali.rice.ken.util.NotificationConstants" ]
import java.util.Collection; import java.util.Collections; import org.kuali.rice.core.api.criteria.PredicateFactory; import org.kuali.rice.core.api.criteria.QueryByCriteria; import org.kuali.rice.ken.bo.NotificationBo; import org.kuali.rice.ken.util.NotificationConstants;
import java.util.*; import org.kuali.rice.core.api.criteria.*; import org.kuali.rice.ken.bo.*; import org.kuali.rice.ken.util.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,465,589
public void mouseDrag(MouseEvent mouseEvent, EditPartViewer viewer) { Tool tool = getActiveTool(); if (tool != null) tool.mouseDrag(mouseEvent, viewer); }
void function(MouseEvent mouseEvent, EditPartViewer viewer) { Tool tool = getActiveTool(); if (tool != null) tool.mouseDrag(mouseEvent, viewer); }
/** * Called when the mouse has been dragged within a Viewer. * * @param mouseEvent * The SWT mouse event * @param viewer * The source of the event. */
Called when the mouse has been dragged within a Viewer
mouseDrag
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.gef/src/org/eclipse/gef/EditDomain.java", "license": "lgpl-2.1", "size": 13211 }
[ "org.eclipse.swt.events.MouseEvent" ]
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,929,112
public ZonedDateTime getCreatedAt() { return this.createdAt; }
ZonedDateTime function() { return this.createdAt; }
/** * Time when the quiz submission was created. */
Time when the quiz submission was created
getCreatedAt
{ "repo_name": "penzance/canvas-data-tools", "path": "data_client/src/main/java/edu/harvard/data/client/canvas/tables/QuizSubmissionHistoricalDim.java", "license": "mit", "size": 8881 }
[ "java.time.ZonedDateTime" ]
import java.time.ZonedDateTime;
import java.time.*;
[ "java.time" ]
java.time;
1,362,627
@CalledByNative private static AllowedOperations getAllowedOperations(MediaPlayerBridge bridge) { MediaPlayer player = bridge.getLocalPlayer(); boolean canPause = true; boolean canSeekForward = true; boolean canSeekBackward = true; try { Method getMetadata = p...
static AllowedOperations function(MediaPlayerBridge bridge) { MediaPlayer player = bridge.getLocalPlayer(); boolean canPause = true; boolean canSeekForward = true; boolean canSeekBackward = true; try { Method getMetadata = player.getClass().getDeclaredMethod( STR, boolean.class, boolean.class); getMetadata.setAccessibl...
/** * Returns an AllowedOperations object to show all the operations that are * allowed on the media player. */
Returns an AllowedOperations object to show all the operations that are allowed on the media player
getAllowedOperations
{ "repo_name": "Nu3001/external_chromium_org", "path": "media/base/android/java/src/org/chromium/media/MediaPlayerBridge.java", "license": "bsd-3-clause", "size": 7715 }
[ "android.media.MediaPlayer", "android.util.Log", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method" ]
import android.media.MediaPlayer; import android.util.Log; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method;
import android.media.*; import android.util.*; import java.lang.reflect.*;
[ "android.media", "android.util", "java.lang" ]
android.media; android.util; java.lang;
756,414
HashMap<String, String> connectionStringPieces = new HashMap<>(); for (String connectionStringPiece : connectionString.split(";")) { String[] kvp = connectionStringPiece.split("=", 2); connectionStringPieces.put(kvp[0].toLowerCase(Locale.ROOT), kvp[1]); } String accountN...
HashMap<String, String> connectionStringPieces = new HashMap<>(); for (String connectionStringPiece : connectionString.split(";")) { String[] kvp = connectionStringPiece.split("=", 2); connectionStringPieces.put(kvp[0].toLowerCase(Locale.ROOT), kvp[1]); } String accountName = connectionStringPieces.get(ACCOUNT_NAME); S...
/** * Creates a SharedKey credential from the passed connection string. * * <p><strong>Code Samples</strong></p> * * <!-- src_embed com.azure.storage.common.StorageSharedKeyCredential.fromConnectionString#String --> * <pre> * StorageSharedKeyCredential credential = StorageSharedKeyCre...
Creates a SharedKey credential from the passed connection string. Code Samples <code> StorageSharedKeyCredential credential = StorageSharedKeyCredential.fromConnectionString&#40;connectionString&#41;; </code>
fromConnectionString
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/storage/azure-storage-common/src/main/java/com/azure/storage/common/StorageSharedKeyCredential.java", "license": "mit", "size": 12713 }
[ "com.azure.core.credential.AzureNamedKeyCredential", "com.azure.core.util.CoreUtils", "java.util.HashMap", "java.util.Locale" ]
import com.azure.core.credential.AzureNamedKeyCredential; import com.azure.core.util.CoreUtils; import java.util.HashMap; import java.util.Locale;
import com.azure.core.credential.*; import com.azure.core.util.*; import java.util.*;
[ "com.azure.core", "java.util" ]
com.azure.core; java.util;
2,552,074
public void testScanJumpStart() throws Exception { AtomicBoolean called = new AtomicBoolean(); sourceWithMockedRemoteCall("start_scan.json", "scroll_ok.json").doStart(r -> { assertFalse(r.isTimedOut()); assertEquals(FAKE_SCROLL_ID, r.getScrollId()); assertEquals(4...
void function() throws Exception { AtomicBoolean called = new AtomicBoolean(); sourceWithMockedRemoteCall(STR, STR).doStart(r -> { assertFalse(r.isTimedOut()); assertEquals(FAKE_SCROLL_ID, r.getScrollId()); assertEquals(4, r.getTotalHits()); assertThat(r.getFailures(), empty()); assertThat(r.getHits(), hasSize(1)); ass...
/** * Versions of Elasticsearch before 2.1.0 don't support sort:_doc and instead need to use search_type=scan. Scan doesn't return * documents the first iteration but reindex doesn't like that. So we jump start strait to the next iteration. */
Versions of Elasticsearch before 2.1.0 don't support sort:_doc and instead need to use search_type=scan. Scan doesn't return documents the first iteration but reindex doesn't like that. So we jump start strait to the next iteration
testScanJumpStart
{ "repo_name": "rlugojr/elasticsearch", "path": "modules/reindex/src/test/java/org/elasticsearch/index/reindex/remote/RemoteScrollableHitSourceTests.java", "license": "apache-2.0", "size": 29497 }
[ "java.util.concurrent.atomic.AtomicBoolean", "org.hamcrest.Matchers" ]
import java.util.concurrent.atomic.AtomicBoolean; import org.hamcrest.Matchers;
import java.util.concurrent.atomic.*; import org.hamcrest.*;
[ "java.util", "org.hamcrest" ]
java.util; org.hamcrest;
2,197,453
public Outage[] getOutages() { getReadLock().lock(); try { return getConfig().getOutage(); } finally { getReadLock().unlock(); } }
Outage[] function() { getReadLock().lock(); try { return getConfig().getOutage(); } finally { getReadLock().unlock(); } }
/** * Return the outages configured. * * @return the outages configured */
Return the outages configured
getOutages
{ "repo_name": "dzonekl/oss2nms", "path": "plugins/com.netxforge.oss2.config/src/com/netxforge/oss2/config/PollOutagesConfigManager.java", "license": "gpl-3.0", "size": 12306 }
[ "org.opennms.netmgt.config.poller.Outage" ]
import org.opennms.netmgt.config.poller.Outage;
import org.opennms.netmgt.config.poller.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
582,932
public InputStream dbReadBinary(String sql, Object[] fields, boolean big) throws ServerOverloadException { // Note: does not support TRANSACTION_CONNECTION -ggolden if (log.isDebugEnabled()) { log.debug("dbReadBinary(String " + sql + ", Object[] " + Arrays.toString(fields) + ", boolean " + big + ")"); }...
InputStream function(String sql, Object[] fields, boolean big) throws ServerOverloadException { if (log.isDebugEnabled()) { log.debug(STR + sql + STR + Arrays.toString(fields) + STR + big + ")"); } InputStream rv = null; long start = 0; long connectionTime = 0; int lenRead = 0; if (log.isDebugEnabled()) { String userId...
/** * Read a single field / record from the db, returning a stream on the result record / field. The stream holds the conection open - so it must be * closed or finalized quickly! * * @param sql * The sql statement. * @param fields * The array of fields for parameters. * @param big * ...
Read a single field / record from the db, returning a stream on the result record / field. The stream holds the conection open - so it must be closed or finalized quickly
dbReadBinary
{ "repo_name": "OpenCollabZA/sakai", "path": "kernel/kernel-impl/src/main/java/org/sakaiproject/db/impl/BasicSqlService.java", "license": "apache-2.0", "size": 65835 }
[ "java.io.InputStream", "java.io.UnsupportedEncodingException", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.Arrays", "org.sakaiproject.exception.ServerOverloadException" ]
import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Arrays; import org.sakaiproject.exception.ServerOverloadException;
import java.io.*; import java.sql.*; import java.util.*; import org.sakaiproject.exception.*;
[ "java.io", "java.sql", "java.util", "org.sakaiproject.exception" ]
java.io; java.sql; java.util; org.sakaiproject.exception;
1,104,880
public Producto addProductoPorRestaurante(Long idRestaurante, Producto producto) throws Exception { DAOTablaProductos daoProductos = new DAOTablaProductos(); try { ////// transaccion this.conn = darConexion(); daoProductos.setConn(conn); daoProductos.addProducto(producto); } catch (SQLException e)...
Producto function(Long idRestaurante, Producto producto) throws Exception { DAOTablaProductos daoProductos = new DAOTablaProductos(); try { this.conn = darConexion(); daoProductos.setConn(conn); daoProductos.addProducto(producto); } catch (SQLException e) { System.err.println(STR + e.getMessage()); e.printStackTrace();...
/** * Metodo que modela la transaccion que retorna todos los usuarios de la base de * datos. * * @return ListaUsuarios - objeto que modela un arreglo de usuarios. este * arreglo contiene el resultado de la busqueda * @throws Exception * - cualquier error que se genere durante la trans...
Metodo que modela la transaccion que retorna todos los usuarios de la base de datos
addProductoPorRestaurante
{ "repo_name": "Dexcrash/Iteracion2Sistrans", "path": "src/tm/RotondAndesTM.java", "license": "mit", "size": 62645 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,902,391
public Date getDatefield_unsafe() { return datefield; }
Date function() { return datefield; }
/** * Retrieves the <code>Datefield</code> value, without locking, * for this <code>EverythingNormal</code> <code>Persistent</code>. * * see org.melati.poem.prepro.FieldDef#generateBaseMethods * @return the Date datefield */
Retrieves the <code>Datefield</code> value, without locking, for this <code>EverythingNormal</code> <code>Persistent</code>. see org.melati.poem.prepro.FieldDef#generateBaseMethods
getDatefield_unsafe
{ "repo_name": "timp21337/melati-old", "path": "poem/src/test/java/org/melati/poem/test/generated/EverythingNormalBase.java", "license": "gpl-2.0", "size": 37388 }
[ "java.sql.Date" ]
import java.sql.Date;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,703,385
private static CcToolchainVariables calculateModuleVariable( NestedSet<Artifact> potentialModules) { ImmutableList.Builder<String> usedModulePaths = ImmutableList.builder(); for (Artifact input : potentialModules.toList()) { if (input.isFileType(CppFileTypes.CPP_MODULE)) { usedModulePaths....
static CcToolchainVariables function( NestedSet<Artifact> potentialModules) { ImmutableList.Builder<String> usedModulePaths = ImmutableList.builder(); for (Artifact input : potentialModules.toList()) { if (input.isFileType(CppFileTypes.CPP_MODULE)) { usedModulePaths.add(input.getExecPathString()); } } CcToolchainVariab...
/** * Extracts all module (.pcm) files from potentialModules and returns a Variables object where * their exec paths are added to the value "module_files". */
Extracts all module (.pcm) files from potentialModules and returns a Variables object where their exec paths are added to the value "module_files"
calculateModuleVariable
{ "repo_name": "perezd/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java", "license": "apache-2.0", "size": 80832 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
500,601
private boolean updateLocalCheckpoint( final String allocationId, final long localCheckpoint, ObjectLongMap<String> map, final String reason) { final int index = map.indexOf(allocationId); if (index >= 0) { final long current = map.indexGet(index); if (current < l...
boolean function( final String allocationId, final long localCheckpoint, ObjectLongMap<String> map, final String reason) { final int index = map.indexOf(allocationId); if (index >= 0) { final long current = map.indexGet(index); if (current < localCheckpoint) { map.indexReplace(index, localCheckpoint); logger.trace(STR,...
/** * Update the local checkpoint for the specified allocation ID in the specified tracking map. If the checkpoint is lower than the * currently known one, this is a no-op. If the allocation ID is not tracked, it is ignored. * * @param allocationId the allocation ID of the shard to update the local ...
Update the local checkpoint for the specified allocation ID in the specified tracking map. If the checkpoint is lower than the currently known one, this is a no-op. If the allocation ID is not tracked, it is ignored
updateLocalCheckpoint
{ "repo_name": "LeoYao/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/seqno/GlobalCheckpointTracker.java", "license": "apache-2.0", "size": 28283 }
[ "com.carrotsearch.hppc.ObjectLongMap" ]
import com.carrotsearch.hppc.ObjectLongMap;
import com.carrotsearch.hppc.*;
[ "com.carrotsearch.hppc" ]
com.carrotsearch.hppc;
311,849
public static <T> T call(Callable<T> callable) throws IOException { try { return callable.call(); } catch (Exception e) { throw ProtobufUtil.handleRemoteException(e); } }
static <T> T function(Callable<T> callable) throws IOException { try { return callable.call(); } catch (Exception e) { throw ProtobufUtil.handleRemoteException(e); } }
/** * Contain ServiceException inside here. Take a callable that is doing our pb rpc and run it. * @throws IOException */
Contain ServiceException inside here. Take a callable that is doing our pb rpc and run it
call
{ "repo_name": "ultratendency/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 132790 }
[ "java.io.IOException", "java.util.concurrent.Callable" ]
import java.io.IOException; import java.util.concurrent.Callable;
import java.io.*; import java.util.concurrent.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,562,132
protected static List<String> getTagletClassNames( File jarFile ) throws IOException, ClassNotFoundException, NoClassDefFoundError { List<String> classes = getClassNamesFromJar( jarFile ); ClassLoader cl; // Needed to find com.sun.tools.doclets.Taglet class File t...
static List<String> function( File jarFile ) throws IOException, ClassNotFoundException, NoClassDefFoundError { List<String> classes = getClassNamesFromJar( jarFile ); ClassLoader cl; File tools = new File( System.getProperty( STR ), STR ); if ( tools.exists() && tools.isFile() ) { cl = new URLClassLoader( new URL[] { ...
/** * Auto-detect the class names of the implementation of <code>com.sun.tools.doclets.Taglet</code> class from a * given jar file. * <br/> * <b>Note</b>: <code>JAVA_HOME/lib/tools.jar</code> is a requirement to find * <code>com.sun.tools.doclets.Taglet</code> class. * * @param...
Auto-detect the class names of the implementation of <code>com.sun.tools.doclets.Taglet</code> class from a given jar file. Note: <code>JAVA_HOME/lib/tools.jar</code> is a requirement to find <code>com.sun.tools.doclets.Taglet</code> class
getTagletClassNames
{ "repo_name": "mcculls/maven-plugins", "path": "maven-javadoc-plugin/src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java", "license": "apache-2.0", "size": 65609 }
[ "java.io.File", "java.io.IOException", "java.lang.reflect.Modifier", "java.net.URLClassLoader", "java.util.ArrayList", "java.util.List" ]
import java.io.File; import java.io.IOException; import java.lang.reflect.Modifier; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.lang.reflect.*; import java.net.*; import java.util.*;
[ "java.io", "java.lang", "java.net", "java.util" ]
java.io; java.lang; java.net; java.util;
1,655,760
public Rect getFramingRectInPreview() { if (framingRectInPreview == null) { Rect rect = new Rect(getFramingRect()); Point cameraResolution = configManager.getCameraResolution(); Point screenResolution = configManager.getScreenResolution(); rect.left = rect.left * cameraResolution.x / scree...
Rect function() { if (framingRectInPreview == null) { Rect rect = new Rect(getFramingRect()); Point cameraResolution = configManager.getCameraResolution(); Point screenResolution = configManager.getScreenResolution(); rect.left = rect.left * cameraResolution.x / screenResolution.x; rect.right = rect.right * cameraResol...
/** * Like {@link #getFramingRect} but coordinates are in terms of the preview frame, * not UI / screen. */
Like <code>#getFramingRect</code> but coordinates are in terms of the preview frame, not UI / screen
getFramingRectInPreview
{ "repo_name": "saqimtiaz/BibSearch", "path": "com.google.zxing.client.android.CaptureActivity/src/com/google/zxing/client/android/camera/CameraManager.java", "license": "mit", "size": 11623 }
[ "android.graphics.Point", "android.graphics.Rect" ]
import android.graphics.Point; import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
777,644
private void captureImageWithPermission() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { int rc = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA); if (rc == PackageManager.PERMISSION_GRANTED) { captureImage(); } else { ...
void function() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { int rc = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA); if (rc == PackageManager.PERMISSION_GRANTED) { captureImage(); } else { Log.w(TAG, STR); requestCameraPermission(); } } else { captureImage(); } }
/** * Request for camera permission */
Request for camera permission
captureImageWithPermission
{ "repo_name": "florianPOLARSTEPS/android-image-picker", "path": "imagepicker/src/main/java/com/esafirm/imagepicker/features/ImagePickerActivity.java", "license": "mit", "size": 24862 }
[ "android.content.pm.PackageManager", "android.os.Build", "android.support.v4.app.ActivityCompat", "android.util.Log" ]
import android.content.pm.PackageManager; import android.os.Build; import android.support.v4.app.ActivityCompat; import android.util.Log;
import android.content.pm.*; import android.os.*; import android.support.v4.app.*; import android.util.*;
[ "android.content", "android.os", "android.support", "android.util" ]
android.content; android.os; android.support; android.util;
874,152
public static List<PersistentFeature> filterFeatureTypes( List<PersistentFeature> featuresToFilter, FeatureType selectedFeatureType ) { Set<FeatureType> featureTypeSet = new HashSet<>(); featureTypeSet.add( selectedFeatureType ); return Utils.filterFeatureTypes( featuresToFil...
static List<PersistentFeature> function( List<PersistentFeature> featuresToFilter, FeatureType selectedFeatureType ) { Set<FeatureType> featureTypeSet = new HashSet<>(); featureTypeSet.add( selectedFeatureType ); return Utils.filterFeatureTypes( featuresToFilter, featureTypeSet ); } }
/** * Creates a new array list of the genomic features, which are of the * allowed feature type. All features, whose feature type is different * than the <code>selectedFeatureType</code> is dismissed. * <p> * @param featuresToFilter the list of features to filter ...
Creates a new array list of the genomic features, which are of the allowed feature type. All features, whose feature type is different than the <code>selectedFeatureType</code> is dismissed.
filterFeatureTypes
{ "repo_name": "rhilker/ReadXplorer", "path": "readxplorer-databackend/src/main/java/de/cebitec/readxplorer/databackend/dataobjects/PersistentFeature.java", "license": "gpl-3.0", "size": 19180 }
[ "de.cebitec.readxplorer.api.enums.FeatureType", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import de.cebitec.readxplorer.api.enums.FeatureType; import java.util.HashSet; import java.util.List; import java.util.Set;
import de.cebitec.readxplorer.api.enums.*; import java.util.*;
[ "de.cebitec.readxplorer", "java.util" ]
de.cebitec.readxplorer; java.util;
1,894,369
protected void saveAssertions(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveAssertions()) { AssertionResult[] assertionResults = res.getAssertionResults(); for (AssertionResult assertionResult :...
void function(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveAssertions()) { AssertionResult[] assertionResults = res.getAssertionResults(); for (AssertionResult assertionResult : assertionResults) { writeItem(assertionResult, context, writer)...
/** * Save assertion results from the sample result into the stream * * @param writer * stream to save objects into * @param context * context for xstream to allow nested objects * @param res * sample to be saved * @param save * ...
Save assertion results from the sample result into the stream
saveAssertions
{ "repo_name": "benbenw/jmeter", "path": "src/core/src/main/java/org/apache/jmeter/save/converters/SampleResultConverter.java", "license": "apache-2.0", "size": 20790 }
[ "com.thoughtworks.xstream.converters.MarshallingContext", "com.thoughtworks.xstream.io.HierarchicalStreamWriter", "org.apache.jmeter.assertions.AssertionResult", "org.apache.jmeter.samplers.SampleResult", "org.apache.jmeter.samplers.SampleSaveConfiguration" ]
import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import org.apache.jmeter.assertions.AssertionResult; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.samplers.SampleSaveConfiguration;
import com.thoughtworks.xstream.converters.*; import com.thoughtworks.xstream.io.*; import org.apache.jmeter.assertions.*; import org.apache.jmeter.samplers.*;
[ "com.thoughtworks.xstream", "org.apache.jmeter" ]
com.thoughtworks.xstream; org.apache.jmeter;
1,117,831
public void setResourceType(ResourceTypes type) { this.resourceType = type; }
void function(ResourceTypes type) { this.resourceType = type; }
/** * Set the resource type. * * @param type the resource type */
Set the resource type
setResourceType
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ResourceInformation.java", "license": "apache-2.0", "size": 9583 }
[ "org.apache.hadoop.yarn.api.protocolrecords.ResourceTypes" ]
import org.apache.hadoop.yarn.api.protocolrecords.ResourceTypes;
import org.apache.hadoop.yarn.api.protocolrecords.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
298,767
public Iterator<E> iterator() { return new DeqIterator(); }
Iterator<E> function() { return new DeqIterator(); }
/** * Returns an iterator over the elements in this deque. The elements * will be ordered from first (head) to last (tail). This is the same * order that elements would be dequeued (via successive calls to * {@link #remove} or popped (via successive calls to {@link #pop}). * * @return an...
Returns an iterator over the elements in this deque. The elements will be ordered from first (head) to last (tail). This is the same order that elements would be dequeued (via successive calls to <code>#remove</code> or popped (via successive calls to <code>#pop</code>)
iterator
{ "repo_name": "techfirm/CpfPdfViewer", "path": "src/jp/co/techfirm/cpf/pdfviewer/ArrayDeque.java", "license": "agpl-3.0", "size": 29205 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,386,023
private PDFObject readName() throws IOException { // we've already read the / that begins the name. // all we have to check for is #hh hex notations. StringBuffer sb = new StringBuffer(); int c; while (isRegularCharacter(c = this.buf.get())) { if (c < '!' && c > '~') { break; // out-of-range, should...
PDFObject function() throws IOException { StringBuffer sb = new StringBuffer(); int c; while (isRegularCharacter(c = this.buf.get())) { if (c < '!' && c > '~') { break; } if (c == '#' && (this.majorVersion != 1 && this.minorVersion != 1)) { int hex = readHexPair(); if (hex >= 0) { c = hex; } else { throw new PDFParseEx...
/** * read a /name. The / has already been read. */
read a /name. The / has already been read
readName
{ "repo_name": "Pixplicity/PDFrenderer", "path": "src/com/sun/pdfview/PDFFile.java", "license": "lgpl-2.1", "size": 58087 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,692,597
public boolean remove() { Entry e = flushedEntry; if (e == null) { clearNioBuffers(); return false; } Object msg = e.msg; ChannelPromise promise = e.promise; int size = e.pendingSize; removeEntry(e); if (!e.cancelled) { ...
boolean function() { Entry e = flushedEntry; if (e == null) { clearNioBuffers(); return false; } Object msg = e.msg; ChannelPromise promise = e.promise; int size = e.pendingSize; removeEntry(e); if (!e.cancelled) { ReferenceCountUtil.safeRelease(msg); safeSuccess(promise); decrementPendingOutboundBytes(size, false, tru...
/** * Will remove the current message, mark its {@link ChannelPromise} as success and return {@code true}. If no * flushed message exists at the time this method is called it will return {@code false} to signal that no more * messages are ready to be handled. */
Will remove the current message, mark its <code>ChannelPromise</code> as success and return true. If no flushed message exists at the time this method is called it will return false to signal that no more messages are ready to be handled
remove
{ "repo_name": "Techcable/netty", "path": "transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java", "license": "apache-2.0", "size": 30165 }
[ "io.netty.util.ReferenceCountUtil" ]
import io.netty.util.ReferenceCountUtil;
import io.netty.util.*;
[ "io.netty.util" ]
io.netty.util;
732,432
private void startUpdateViewAnimation() { // Create and start a fade in anmiation for the mUpdatedView. Re-use the current alpha // to avoid restarting a previous or current fade in animation. Animation in = new AlphaAnimation(mUpdatedView.getAlpha(), 1.0f); in.se...
void function() { Animation in = new AlphaAnimation(mUpdatedView.getAlpha(), 1.0f); in.setDuration(UPDATE_TEXT_ANIMATION_DURATION_MS); in.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN_INTERPOLATOR); in.setFillAfter(true); mUpdatedView.startAnimation(in); mHandler.removeCallbacks(mFadeOutRunnable); mHandler.postDelay...
/** * Starts the animation to make the update text view fade in then fade out. */
Starts the animation to make the update text view fade in then fade out
startUpdateViewAnimation
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/payments/ui/PaymentRequestSection.java", "license": "bsd-3-clause", "size": 70951 }
[ "android.view.animation.AlphaAnimation", "android.view.animation.Animation", "org.chromium.components.browser_ui.widget.animation.Interpolators" ]
import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import org.chromium.components.browser_ui.widget.animation.Interpolators;
import android.view.animation.*; import org.chromium.components.browser_ui.widget.animation.*;
[ "android.view", "org.chromium.components" ]
android.view; org.chromium.components;
2,118,912
@Override public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ProducerInfo info = (ProducerInfo) o; info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn)); inf...
void function(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { super.looseUnmarshal(wireFormat, o, dataIn); ProducerInfo info = (ProducerInfo) o; info.setProducerId((ProducerId) looseUnmarsalCachedObject(wireFormat, dataIn)); info.setDestination((OpenWireDestination) looseUnmarsalCachedObject...
/** * Un-marshal an object instance from the data input stream * * @param o * the object to un-marshal * @param dataIn * the data input stream to build the object from * @throws IOException */
Un-marshal an object instance from the data input stream
looseUnmarshal
{ "repo_name": "tabish121/OpenWire", "path": "openwire-legacy/src/main/java/io/openwire/codec/v3/ProducerInfoMarshaller.java", "license": "apache-2.0", "size": 6086 }
[ "io.openwire.codec.OpenWireFormat", "io.openwire.commands.BrokerId", "io.openwire.commands.OpenWireDestination", "io.openwire.commands.ProducerId", "io.openwire.commands.ProducerInfo", "java.io.DataInput", "java.io.IOException" ]
import io.openwire.codec.OpenWireFormat; import io.openwire.commands.BrokerId; import io.openwire.commands.OpenWireDestination; import io.openwire.commands.ProducerId; import io.openwire.commands.ProducerInfo; import java.io.DataInput; import java.io.IOException;
import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*;
[ "io.openwire.codec", "io.openwire.commands", "java.io" ]
io.openwire.codec; io.openwire.commands; java.io;
1,853,855
@Pure public Resource eResource() { return getSarlInterface().eResource(); }
Resource function() { return getSarlInterface().eResource(); }
/** Replies the resource to which the SarlInterface is attached. */
Replies the resource to which the SarlInterface is attached
eResource
{ "repo_name": "gallandarakhneorg/sarl", "path": "eclipse-sarl/plugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/appenders/SarlInterfaceSourceAppender.java", "license": "apache-2.0", "size": 4996 }
[ "org.eclipse.emf.ecore.resource.Resource" ]
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
645,426
protected void loadInitialData(final int firstPort, ProgressListener progressListener) throws UserError { ProcessContext context = getContext(); if (context.getInputRepositoryLocations().isEmpty()) { if (progressListener != null) { progressListener.complete(); } return; } if (progressListener !=...
void function(final int firstPort, ProgressListener progressListener) throws UserError { ProcessContext context = getContext(); if (context.getInputRepositoryLocations().isEmpty()) { if (progressListener != null) { progressListener.complete(); } return; } if (progressListener != null) { progressListener.setTotal(contex...
/** * Loads results from the repository if specified in the {@link ProcessContext}. Will also show * the progress of loading if a {@link ProgressListener} is specified. * * @param firstPort * Specifies the first port which is read from the ProcessContext. This enables the * possibility...
Loads results from the repository if specified in the <code>ProcessContext</code>. Will also show the progress of loading if a <code>ProgressListener</code> is specified
loadInitialData
{ "repo_name": "boob-sbcm/3838438", "path": "src/main/java/com/rapidminer/Process.java", "license": "agpl-3.0", "size": 59717 }
[ "com.rapidminer.operator.IOObject", "com.rapidminer.operator.PortUserError", "com.rapidminer.operator.UserError", "com.rapidminer.repository.RepositoryException", "com.rapidminer.tools.ProgressListener" ]
import com.rapidminer.operator.IOObject; import com.rapidminer.operator.PortUserError; import com.rapidminer.operator.UserError; import com.rapidminer.repository.RepositoryException; import com.rapidminer.tools.ProgressListener;
import com.rapidminer.operator.*; import com.rapidminer.repository.*; import com.rapidminer.tools.*;
[ "com.rapidminer.operator", "com.rapidminer.repository", "com.rapidminer.tools" ]
com.rapidminer.operator; com.rapidminer.repository; com.rapidminer.tools;
610,816
public Instruction copy() { return this; } /** * Dump instruction as byte code to stream out. A {@link MarkerInstruction}
Instruction function() { return this; } /** * Dump instruction as byte code to stream out. A {@link MarkerInstruction}
/** * Produce a copy of the instruction. By default a * {@link MarkerInstruction} has no parameters, so the base implementation * of {@link #copy()} returns the instruction itself. * @return The instruction itself. */
Produce a copy of the instruction. By default a <code>MarkerInstruction</code> has no parameters, so the base implementation of <code>#copy()</code> returns the instruction itself
copy
{ "repo_name": "md-5/jdk10", "path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java", "license": "gpl-2.0", "size": 3700 }
[ "com.sun.org.apache.bcel.internal.generic.Instruction" ]
import com.sun.org.apache.bcel.internal.generic.Instruction;
import com.sun.org.apache.bcel.internal.generic.*;
[ "com.sun.org" ]
com.sun.org;
2,663,580
public ConfigBundle buildUnvalidated() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ZipOutputStream zos = new ZipOutputStream(baos)) { addZipEntry(zos, ConfigBundle.CHECKSUMS_FILE_NAME, checksumsFileContent.toString().getBytes(St...
ConfigBundle function() throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ZipOutputStream zos = new ZipOutputStream(baos)) { addZipEntry(zos, ConfigBundle.CHECKSUMS_FILE_NAME, checksumsFileContent.toString().getBytes(StandardCharsets.UTF_8)); if (tzDataVersion != null) { addZipEntry(zo...
/** * For use in tests. Use {@link #build()}. */
For use in tests. Use <code>#build()</code>
buildUnvalidated
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "tzdata/tools/src/main/libcore/tzdata/update/tools/TzDataBundleBuilder.java", "license": "gpl-2.0", "size": 4464 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.nio.charset.StandardCharsets", "java.util.zip.ZipOutputStream" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.zip.ZipOutputStream;
import java.io.*; import java.nio.charset.*; import java.util.zip.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,377,802
@Test @Category({BoxSDKTest.class, SlowTest.class}) public void all() throws DropExporterException, DropImporterException, BoxSDKServiceException { assumeTrue(StringUtils.isNotEmpty(boxSDKServiceConfigFromProperties.getRootFolderId())); logger.debug("Test initial creation"); BoxDro...
@Category({BoxSDKTest.class, SlowTest.class}) void function() throws DropExporterException, DropImporterException, BoxSDKServiceException { assumeTrue(StringUtils.isNotEmpty(boxSDKServiceConfigFromProperties.getRootFolderId())); logger.debug(STR); BoxDropExporter boxDropExporter = new BoxDropExporter(); String groupNam...
/** * All function in one test as it takes long time to create the directories * on Box */
All function in one test as it takes long time to create the directories on Box
all
{ "repo_name": "box/mojito", "path": "webapp/src/test/java/com/box/l10n/mojito/service/drop/exporter/BoxDropExporterTest.java", "license": "apache-2.0", "size": 4074 }
[ "com.box.l10n.mojito.boxsdk.BoxSDKServiceException", "com.box.l10n.mojito.service.drop.importer.BoxDropImporter", "com.box.l10n.mojito.service.drop.importer.DropImporterException", "com.box.l10n.mojito.test.category.BoxSDKTest", "com.box.l10n.mojito.test.category.SlowTest", "com.box.sdk.BoxFile", "java....
import com.box.l10n.mojito.boxsdk.BoxSDKServiceException; import com.box.l10n.mojito.service.drop.importer.BoxDropImporter; import com.box.l10n.mojito.service.drop.importer.DropImporterException; import com.box.l10n.mojito.test.category.BoxSDKTest; import com.box.l10n.mojito.test.category.SlowTest; import com.box.sdk.B...
import com.box.l10n.mojito.boxsdk.*; import com.box.l10n.mojito.service.drop.importer.*; import com.box.l10n.mojito.test.category.*; import com.box.sdk.*; import java.text.*; import java.util.*; import org.apache.commons.lang3.*; import org.junit.*; import org.junit.experimental.categories.*;
[ "com.box.l10n", "com.box.sdk", "java.text", "java.util", "org.apache.commons", "org.junit", "org.junit.experimental" ]
com.box.l10n; com.box.sdk; java.text; java.util; org.apache.commons; org.junit; org.junit.experimental;
2,804,069
@Deprecated public MplsLabel mplsLabel() { return label(); }
MplsLabel function() { return label(); }
/** * Extracts the MPLS label from the instruction. * * @return MPLS label * @deprecated deprecated in 1.5.0 Falcon */
Extracts the MPLS label from the instruction
mplsLabel
{ "repo_name": "lsinfo3/onos", "path": "core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java", "license": "apache-2.0", "size": 12523 }
[ "org.onlab.packet.MplsLabel" ]
import org.onlab.packet.MplsLabel;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
6,763
public List<? extends ResourceEnvRef> getResourceEnvRefs() { return getJNDIEnvironmentRefs(ResourceEnvRef.class); }
List<? extends ResourceEnvRef> function() { return getJNDIEnvironmentRefs(ResourceEnvRef.class); }
/** * Returns a list of Resource Environment References (&lt;resource-env-ref>) * configured for the component. **/
Returns a list of Resource Environment References (&lt;resource-env-ref>) configured for the component
getResourceEnvRefs
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.injection.core/src/com/ibm/wsspi/injectionengine/ComponentNameSpaceConfiguration.java", "license": "epl-1.0", "size": 48728 }
[ "com.ibm.ws.javaee.dd.common.ResourceEnvRef", "java.util.List" ]
import com.ibm.ws.javaee.dd.common.ResourceEnvRef; import java.util.List;
import com.ibm.ws.javaee.dd.common.*; import java.util.*;
[ "com.ibm.ws", "java.util" ]
com.ibm.ws; java.util;
952,096
public void setSpy(User cooked) throws AccessPoemException { _getProtectedTable(). getSpyColumn(). getType().assertValidCooked(cooked); writeLock(); if (cooked == null) setSpy_unsafe(null); else { cooked.existenceLock(); setSpy_unsafe(cooked.troid()); } }
void function(User cooked) throws AccessPoemException { _getProtectedTable(). getSpyColumn(). getType().assertValidCooked(cooked); writeLock(); if (cooked == null) setSpy_unsafe(null); else { cooked.existenceLock(); setSpy_unsafe(cooked.troid()); } }
/** * Set the Spy. * * Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods * @param cooked a validated <code>User</code> * @throws AccessPoemException * if the current <code>AccessToken</code> * does not confer write access rights */
Set the Spy. Generated by org.melati.poem.prepro.ReferenceFieldDef#generateBaseMethods
setSpy
{ "repo_name": "timp21337/melati-old", "path": "poem/src/test/java/org/melati/poem/test/generated/ProtectedBase.java", "license": "gpl-2.0", "size": 28567 }
[ "org.melati.poem.AccessPoemException", "org.melati.poem.User" ]
import org.melati.poem.AccessPoemException; import org.melati.poem.User;
import org.melati.poem.*;
[ "org.melati.poem" ]
org.melati.poem;
1,864,534
protected synchronized void configureStop() { if (log.isDebugEnabled()) log.debug(sm.getString("contextConfig.stop")); int i; // Removing children Container[] children = context.findChildren(); for (i = 0; i < children.length; i++) { context.removeC...
synchronized void function() { if (log.isDebugEnabled()) log.debug(sm.getString(STR)); int i; Container[] children = context.findChildren(); for (i = 0; i < children.length; i++) { context.removeChild(children[i]); } SecurityConstraint[] securityConstraints = context.findConstraints(); for (i = 0; i < securityConstrain...
/** * Process a "stop" event for this Context. */
Process a "stop" event for this Context
configureStop
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/ContextConfig.java", "license": "mit", "size": 84935 }
[ "java.io.File", "org.apache.catalina.Container", "org.apache.catalina.Host", "org.apache.catalina.deploy.ErrorPage", "org.apache.catalina.deploy.FilterDef", "org.apache.catalina.deploy.FilterMap", "org.apache.catalina.deploy.SecurityConstraint" ]
import java.io.File; import org.apache.catalina.Container; import org.apache.catalina.Host; import org.apache.catalina.deploy.ErrorPage; import org.apache.catalina.deploy.FilterDef; import org.apache.catalina.deploy.FilterMap; import org.apache.catalina.deploy.SecurityConstraint;
import java.io.*; import org.apache.catalina.*; import org.apache.catalina.deploy.*;
[ "java.io", "org.apache.catalina" ]
java.io; org.apache.catalina;
2,644,430
public static void removeOperator(Operator<?> op) { if (op.getNumParent() != 0) { List<Operator<? extends OperatorDesc>> allParent = Lists.newArrayList(op.getParentOperators()); for (Operator<?> parentOp : allParent) { parentOp.removeChild(op); } } if (op.getNumChil...
static void function(Operator<?> op) { if (op.getNumParent() != 0) { List<Operator<? extends OperatorDesc>> allParent = Lists.newArrayList(op.getParentOperators()); for (Operator<?> parentOp : allParent) { parentOp.removeChild(op); } } if (op.getNumChild() != 0) { List<Operator<? extends OperatorDesc>> allChildren = Li...
/** * Remove operator from the tree, disconnecting it from its * parents and children. */
Remove operator from the tree, disconnecting it from its parents and children
removeOperator
{ "repo_name": "nishantmonu51/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java", "license": "apache-2.0", "size": 26621 }
[ "com.google.common.collect.Lists", "java.util.List", "org.apache.hadoop.hive.ql.plan.OperatorDesc" ]
import com.google.common.collect.Lists; import java.util.List; import org.apache.hadoop.hive.ql.plan.OperatorDesc;
import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hive.ql.plan.*;
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
1,397,913
List<CustomerDTO> selectCustomers();
List<CustomerDTO> selectCustomers();
/** * Returns all customers currently registered. <br> Return value is a list * of CustomerDTO's. Note: this is a "disconnected" view - namely, list is * obtained by reading the customers table, loading it into memory, then * closing the DB connection. * @throws StorageException */
Returns all customers currently registered. Return value is a list of CustomerDTO's. Note: this is a "disconnected" view - namely, list is obtained by reading the customers table, loading it into memory, then closing the DB connection
selectCustomers
{ "repo_name": "veltzer/demos-java", "path": "projects/Ejb/src/ejb/exercises/solutions/source/daos/BookstoreDAO.java", "license": "gpl-3.0", "size": 4182 }
[ "ejb.exercises.solutions.source.dtos.CustomerDTO", "java.util.List" ]
import ejb.exercises.solutions.source.dtos.CustomerDTO; import java.util.List;
import ejb.exercises.solutions.source.dtos.*; import java.util.*;
[ "ejb.exercises.solutions", "java.util" ]
ejb.exercises.solutions; java.util;
1,701,258
void markCompletedJob(JobInProgress job) { for (TaskInProgress tip : job.getTasks(TaskType.JOB_SETUP)) { for (TaskStatus taskStatus : tip.getTaskStatuses()) { if (taskStatus.getRunState() != TaskStatus.State.RUNNING && taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING && ...
void markCompletedJob(JobInProgress job) { for (TaskInProgress tip : job.getTasks(TaskType.JOB_SETUP)) { for (TaskStatus taskStatus : tip.getTaskStatuses()) { if (taskStatus.getRunState() != TaskStatus.State.RUNNING && taskStatus.getRunState() != TaskStatus.State.COMMIT_PENDING && taskStatus.getRunState() != TaskStatus...
/** * Mark all 'non-running' jobs of the job for pruning. * This function assumes that the JobTracker is locked on entry. * * @param job the completed job */
Mark all 'non-running' jobs of the job for pruning. This function assumes that the JobTracker is locked on entry
markCompletedJob
{ "repo_name": "karahiyo/hanoi-hadoop-2.0.0-cdh", "path": "src/mapred/org/apache/hadoop/mapred/JobTracker.java", "license": "apache-2.0", "size": 178893 }
[ "org.apache.hadoop.mapreduce.TaskType", "org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker" ]
import org.apache.hadoop.mapreduce.TaskType; import org.apache.hadoop.mapreduce.server.jobtracker.TaskTracker;
import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.server.jobtracker.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,900,689
public DateTime freeOfferExpirationTime() { return this.freeOfferExpirationTime; }
DateTime function() { return this.freeOfferExpirationTime; }
/** * Get the time when the server farm free offer expires. * * @return the freeOfferExpirationTime value */
Get the time when the server farm free offer expires
freeOfferExpirationTime
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/appservice/v2019_08_01/implementation/AppServicePlanInner.java", "license": "mit", "size": 15191 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,893,100
public void associateWithSubnet(@Nonnull String firewallId, @Nonnull String withSubnetId) throws CloudException, InternalException;
void function(@Nonnull String firewallId, @Nonnull String withSubnetId) throws CloudException, InternalException;
/** * Associates the specified firewall with the specified subnet. * @param firewallId the firewall to be associated * @param withSubnetId the subnet with which the firewall is to be associated * @throws CloudException an error occurred with the cloud provider while performing the operation * @...
Associates the specified firewall with the specified subnet
associateWithSubnet
{ "repo_name": "OSS-TheWeatherCompany/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/network/NetworkFirewallSupport.java", "license": "apache-2.0", "size": 21262 }
[ "javax.annotation.Nonnull", "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException" ]
import javax.annotation.Nonnull; import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException;
import javax.annotation.*; import org.dasein.cloud.*;
[ "javax.annotation", "org.dasein.cloud" ]
javax.annotation; org.dasein.cloud;
469,904
@RequestMapping(method = RequestMethod.POST, value = "/{query}", produces = {APPLICATION_JSON_UTF8_VALUE}) @ApiOperation(value = "run parametrized query", notes = "run the specified named query passing in scalar values for query parameters in the GemFire cluster") @ApiResponses({@ApiResponse(code = 20...
@RequestMapping(method = RequestMethod.POST, value = STR, produces = {APPLICATION_JSON_UTF8_VALUE}) @ApiOperation(value = STR, notes = STR) @ApiResponses({@ApiResponse(code = 200, message = STR), @ApiResponse(code = 401, message = STR), @ApiResponse(code = 403, message = STR), @ApiResponse(code = 400, message = STR), @...
/** * Run named parametrized Query with ID * * @param queryId id of the OQL string * @param arguments query bind params required while executing query * @return query result as a JSON document */
Run named parametrized Query with ID
runNamedQuery
{ "repo_name": "smgoller/geode", "path": "geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/QueryAccessController.java", "license": "apache-2.0", "size": 16813 }
[ "io.swagger.annotations.ApiOperation", "io.swagger.annotations.ApiResponse", "io.swagger.annotations.ApiResponses", "org.apache.geode.cache.query.FunctionDomainException", "org.apache.geode.cache.query.NameResolutionException", "org.apache.geode.cache.query.Query", "org.apache.geode.cache.query.QueryExe...
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import org.apache.geode.cache.query.FunctionDomainException; import org.apache.geode.cache.query.NameResolutionException; import org.apache.geode.cache.query.Query; import org.apache.geode....
import io.swagger.annotations.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.*; import org.apache.geode.rest.internal.web.exception.*; import org.apache.geode.rest.internal.web.util.*; import org.springframework.http.*; import org.springframework.security.access.prepost.*; import...
[ "io.swagger.annotations", "org.apache.geode", "org.springframework.http", "org.springframework.security", "org.springframework.web" ]
io.swagger.annotations; org.apache.geode; org.springframework.http; org.springframework.security; org.springframework.web;
1,517,675
public AudioAttributes getAudioAttributes() { return audioAttributes; }
AudioAttributes function() { return audioAttributes; }
/** * Returns the attributes for audio playback. */
Returns the attributes for audio playback
getAudioAttributes
{ "repo_name": "ebr11/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/SimpleExoPlayer.java", "license": "apache-2.0", "size": 36452 }
[ "com.google.android.exoplayer2.audio.AudioAttributes" ]
import com.google.android.exoplayer2.audio.AudioAttributes;
import com.google.android.exoplayer2.audio.*;
[ "com.google.android" ]
com.google.android;
712,260
private void assertIsOriginal(Path path, boolean expected) throws FileNotFoundException, IOException { FileSystem fs = FileSystem.get(hiveConf); RemoteIterator<LocatedFileStatus> lfs = fs.listFiles(path, true); boolean foundAnyFile = false; while (lfs.hasNext()) { LocatedFileStatus lf = lfs.next...
void function(Path path, boolean expected) throws FileNotFoundException, IOException { FileSystem fs = FileSystem.get(hiveConf); RemoteIterator<LocatedFileStatus> lfs = fs.listFiles(path, true); boolean foundAnyFile = false; while (lfs.hasNext()) { LocatedFileStatus lf = lfs.next(); Path file = lf.getPath(); if (!file....
/** * Checks if the file format is original or ACID file based on OrcInputFormat static methods. * @param path The file to check * @param expected The expected result of the isOriginal * @throws IOException Error when reading the file */
Checks if the file format is original or ACID file based on OrcInputFormat static methods
assertIsOriginal
{ "repo_name": "alanfgates/hive", "path": "itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/TestAcidOnTez.java", "license": "apache-2.0", "size": 54454 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.LocatedFileStatus", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.RemoteIterator", "org.apache.hadoop.hive.ql.io.orc.OrcFile", "org.apache.had...
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.LocatedFileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.RemoteIterator; import org.apache.hadoop.hive.ql.io.orc.OrcF...
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.ql.io.orc.*; import org.apache.orc.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.apache.orc", "org.junit" ]
java.io; org.apache.hadoop; org.apache.orc; org.junit;
1,938,211
public boolean hasWarnings() { return diagsCollector.diagsByKind.containsKey(Diagnostic.Kind.WARNING); }
boolean function() { return diagsCollector.diagsByKind.containsKey(Diagnostic.Kind.WARNING); }
/** * Did this task generate any warning diagnostics? */
Did this task generate any warning diagnostics
hasWarnings
{ "repo_name": "md-5/jdk10", "path": "test/langtools/tools/javac/lib/combo/ComboTask.java", "license": "gpl-2.0", "size": 15595 }
[ "javax.tools.Diagnostic" ]
import javax.tools.Diagnostic;
import javax.tools.*;
[ "javax.tools" ]
javax.tools;
699,828
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<OperationInner>> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( "Parameter thi...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<OperationInner>> function(Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR; context = this.client.mergeContext(context); return service .list(this.client.getEndp...
/** * Lists available operations for the Microsoft.Batch provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @thr...
Lists available operations for the Microsoft.Batch provider
listSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java", "license": "mit", "size": 12147 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.batch.fluent.models.OperationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.OperationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.batch.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,204,918
@Test public void getFoldersInclude() { try { // folderList should contain those entries String[] expectedFolders = { "APM Vendor Sites", "Caterpillar", "Customer Sites", "NML", "OPMS Testing", ...
void function() { try { String[] expectedFolders = { STR, STR, STR, "NML", STR, "Tests" }; StringBuffer buf = new StringBuffer(); for (int i = 0; i < expectedFolders.length; ++i) { if (i > 0) { buf.append(','); } buf.append(expectedFolders[i]); } Properties props = EpaUtils.getProperties(); props.setProperty(INCLUDE_FO...
/** * Test getFolders() with include property. */
Test getFolders() with include property
getFoldersInclude
{ "repo_name": "CA-APM/ca-apm-fieldpack-asm", "path": "asm-monitor/src/test/java/com/ca/apm/swat/epaplugins/asm/FolderTest.java", "license": "epl-1.0", "size": 8391 }
[ "com.wily.introscope.epagent.EpaUtils", "java.util.Properties", "org.junit.Assert" ]
import com.wily.introscope.epagent.EpaUtils; import java.util.Properties; import org.junit.Assert;
import com.wily.introscope.epagent.*; import java.util.*; import org.junit.*;
[ "com.wily.introscope", "java.util", "org.junit" ]
com.wily.introscope; java.util; org.junit;
2,470,462
@Override public final int hashCode() { return super.hashCode(); } /** * Resolves a deserialized instance to the correct constant attribute. * * @return the {@code Attribute} this instance represents. * @throws InvalidObjectException ...
final int function() { return super.hashCode(); } /** * Resolves a deserialized instance to the correct constant attribute. * * @return the {@code Attribute} this instance represents. * @throws InvalidObjectException * if this instance is not of type {@code Attribute.class}
/** * Calculates the hash code for objects of type {@code Attribute}. It * is defined final so all sub types calculate their hash code * identically. * * @return the hash code for this instance of {@code Attribute}. */
Calculates the hash code for objects of type Attribute. It is defined final so all sub types calculate their hash code identically
hashCode
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/java/text/AttributedCharacterIterator.java", "license": "apache-2.0", "size": 8416 }
[ "java.io.InvalidObjectException" ]
import java.io.InvalidObjectException;
import java.io.*;
[ "java.io" ]
java.io;
1,369,091