method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public List<Boolean> getBooleanTfft() throws ServiceException {
try {
Call<ResponseBody> call = service.getBooleanTfft();
ServiceResponse<List<Boolean>> response = getBooleanTfftDelegate(call.execute(), null);
return response.getBody();
} catch (ServiceException e... | List<Boolean> function() throws ServiceException { try { Call<ResponseBody> call = service.getBooleanTfft(); ServiceResponse<List<Boolean>> response = getBooleanTfftDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex... | /**
* Get boolean array value [true, false, false, true]
*
* @return the List<Boolean> object if successful.
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/ | Get boolean array value [true, false, false, true] | getBooleanTfft | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayImpl.java",
"license": "mit",
"size": 128720
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"com.squareup.okhttp.ResponseBody",
"java.util.List"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import com.squareup.okhttp.ResponseBody; import java.util.List; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import java.util.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"java.util"
] | com.microsoft.rest; com.squareup.okhttp; java.util; | 1,406,130 |
@Override
public boolean accept(File file) {
String name = file.getName();
for (String suffix : this.suffixes) {
if (caseSensitivity.checkEndsWith(name, suffix)) {
return true;
}
}
return false;
}
| boolean function(File file) { String name = file.getName(); for (String suffix : this.suffixes) { if (caseSensitivity.checkEndsWith(name, suffix)) { return true; } } return false; } | /**
* Checks to see if the filename ends with the suffix.
*
* @param file the File to check
* @return true if the filename ends with one of our suffixes
*/ | Checks to see if the filename ends with the suffix | accept | {
"repo_name": "Giraudux/java-quel-bazar",
"path": "src/org/apache/commons/io/filefilter/SuffixFileFilter.java",
"license": "mit",
"size": 7234
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,391,615 |
public void setPrice (BigDecimal Price)
{
set_Value (COLUMNNAME_Price, Price);
} | void function (BigDecimal Price) { set_Value (COLUMNNAME_Price, Price); } | /** Set Price.
@param Price
Price
*/ | Set Price | setPrice | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_W_BasketLine.java",
"license": "gpl-2.0",
"size": 6581
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,440,529 |
public void setGradientColoring(ColorGradient colorGradient, boolean positiveColorGradient) {
this.currentColorGradient = colorGradient;
this.positiveColorGradient = positiveColorGradient;
} | void function(ColorGradient colorGradient, boolean positiveColorGradient) { this.currentColorGradient = colorGradient; this.positiveColorGradient = positiveColorGradient; } | /**
* Set the color gradient.
*
* @param colorGradient the color gradient to use, null disables the color
* gradient
* @param positiveColorGradient if true only positive values are expected
* and the middle gradient color is used for the halfway point between the
* min and max values,... | Set the color gradient | setGradientColoring | {
"repo_name": "nikgoodley-ibboost/jsparklines",
"path": "src/main/java/no/uib/jsparklines/renderers/JSparklinesBubbleHeatMapTableCellRenderer.java",
"license": "apache-2.0",
"size": 13417
} | [
"no.uib.jsparklines.renderers.util.GradientColorCoding"
] | import no.uib.jsparklines.renderers.util.GradientColorCoding; | import no.uib.jsparklines.renderers.util.*; | [
"no.uib.jsparklines"
] | no.uib.jsparklines; | 606,482 |
public static void bind(Binder binder) {
Preconditions.checkNotNull(binder);
Bindings.requireBinding(binder, TimeSeriesRepository.class);
TimedInterceptor interceptor = new TimedInterceptor();
binder.requestInjection(interceptor);
binder.bindInterceptor(Matchers.any(), Matchers.annotatedWith(Tim... | static void function(Binder binder) { Preconditions.checkNotNull(binder); Bindings.requireBinding(binder, TimeSeriesRepository.class); TimedInterceptor interceptor = new TimedInterceptor(); binder.requestInjection(interceptor); binder.bindInterceptor(Matchers.any(), Matchers.annotatedWith(Timed.class), interceptor); } | /**
* Installs an interceptor in a guice {@link com.google.inject.Injector}, enabling
* {@literal @Timed} method interception in guice-provided instances. Requires that a
* {@link TimeSeriesRepository} is bound elsewhere.
*
* @param binder a guice binder to require bindings against
*/ | Installs an interceptor in a guice <code>com.google.inject.Injector</code>, enabling @Timed method interception in guice-provided instances. Requires that a <code>TimeSeriesRepository</code> is bound elsewhere | bind | {
"repo_name": "foursquare/commons-old",
"path": "src/java/com/twitter/common/inject/TimedInterceptor.java",
"license": "apache-2.0",
"size": 3916
} | [
"com.google.common.base.Preconditions",
"com.google.inject.Binder",
"com.google.inject.matcher.Matchers",
"com.twitter.common.stats.TimeSeriesRepository"
] | import com.google.common.base.Preconditions; import com.google.inject.Binder; import com.google.inject.matcher.Matchers; import com.twitter.common.stats.TimeSeriesRepository; | import com.google.common.base.*; import com.google.inject.*; import com.google.inject.matcher.*; import com.twitter.common.stats.*; | [
"com.google.common",
"com.google.inject",
"com.twitter.common"
] | com.google.common; com.google.inject; com.twitter.common; | 2,551,886 |
Collection<LibraryConfigurationServicePlugIn> getAllLibraryConfigurationServices(); | Collection<LibraryConfigurationServicePlugIn> getAllLibraryConfigurationServices(); | /**
* Library Plug-Ins has to implement the interface
* <code>LibraryConfigurationService</code>. This method is used to get
* access of all available plug-ins for libraries.
*
* @return a Collection of all registered
* <code>LibraryConfigurationService</code> Service objects.
*/ | Library Plug-Ins has to implement the interface <code>LibraryConfigurationService</code>. This method is used to get access of all available plug-ins for libraries | getAllLibraryConfigurationServices | {
"repo_name": "test-editor/test-editor",
"path": "core/org.testeditor.core/src/main/java/org/testeditor/core/services/plugins/TestEditorPlugInService.java",
"license": "epl-1.0",
"size": 2252
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,524,605 |
public List<Plugin> getAvailables() {
List<Plugin> r = new ArrayList<Plugin>();
Data data = getData();
if(data==null) return Collections.emptyList();
for (Plugin p : data.plugins.values()) {
if(p.getInstalled()==null)
r.add(p);
}
return... | List<Plugin> function() { List<Plugin> r = new ArrayList<Plugin>(); Data data = getData(); if(data==null) return Collections.emptyList(); for (Plugin p : data.plugins.values()) { if(p.getInstalled()==null) r.add(p); } return r; } | /**
* Returns a list of plugins that should be shown in the "available" tab.
* These are "all plugins - installed plugins".
*/ | Returns a list of plugins that should be shown in the "available" tab. These are "all plugins - installed plugins" | getAvailables | {
"repo_name": "sincere520/testGitRepo",
"path": "hudson-core/src/main/java/hudson/model/UpdateSite.java",
"license": "mit",
"size": 23318
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,171,131 |
@NotNull
@Override
public TextRange getRangeInElement(@NotNull AsciiDocTextItalic element) {
return getBodyRange(element);
}
} | TextRange function(@NotNull AsciiDocTextItalic element) { return getBodyRange(element); } } | /**
* The relevant text range is both link file and anchor (if present).
* Return the start of the first element and the end of the last element.
*/ | The relevant text range is both link file and anchor (if present). Return the start of the first element and the end of the last element | getRangeInElement | {
"repo_name": "asciidoctor/asciidoctor-intellij-plugin",
"path": "src/main/java/org/asciidoc/intellij/psi/AsciiDocTextItalic.java",
"license": "apache-2.0",
"size": 2240
} | [
"com.intellij.openapi.util.TextRange",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.util.TextRange; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"org.jetbrains.annotations"
] | com.intellij.openapi; org.jetbrains.annotations; | 535,760 |
EClass getSupportParticipant();
| EClass getSupportParticipant(); | /**
* Returns the meta object for class '{@link org.openhealthtools.mdht.uml.cda.hitsp.SupportParticipant <em>Support Participant</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Support Participant</em>'.
* @see org.openhealthtools.mdht.uml.cda.hitsp.Sup... | Returns the meta object for class '<code>org.openhealthtools.mdht.uml.cda.hitsp.SupportParticipant Support Participant</code>'. | getSupportParticipant | {
"repo_name": "drbgfc/mdht",
"path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.hitsp/src/org/openhealthtools/mdht/uml/cda/hitsp/HITSPPackage.java",
"license": "epl-1.0",
"size": 366422
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 271,927 |
public void setExceptions(List<SecurityExceptionInfo> exceptions) {
this.exceptions = exceptions;
} | void function(List<SecurityExceptionInfo> exceptions) { this.exceptions = exceptions; } | /**
* Sets the exceptions.
*
* @param exceptions the new exceptions
*/ | Sets the exceptions | setExceptions | {
"repo_name": "ultradns/java_rest_api_client",
"path": "src/main/java/biz/neustar/ultra/rest/dto/SecurityExceptionList.java",
"license": "apache-2.0",
"size": 2373
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,545,425 |
public AmazonS3LinkedService withSecretAccessKey(SecretBase secretAccessKey) {
if (this.innerTypeProperties() == null) {
this.innerTypeProperties = new AmazonS3LinkedServiceTypeProperties();
}
this.innerTypeProperties().withSecretAccessKey(secretAccessKey);
return this;
... | AmazonS3LinkedService function(SecretBase secretAccessKey) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new AmazonS3LinkedServiceTypeProperties(); } this.innerTypeProperties().withSecretAccessKey(secretAccessKey); return this; } | /**
* Set the secretAccessKey property: The secret access key of the Amazon S3 Identity and Access Management (IAM)
* user.
*
* @param secretAccessKey the secretAccessKey value to set.
* @return the AmazonS3LinkedService object itself.
*/ | Set the secretAccessKey property: The secret access key of the Amazon S3 Identity and Access Management (IAM) user | withSecretAccessKey | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/AmazonS3LinkedService.java",
"license": "mit",
"size": 9168
} | [
"com.azure.resourcemanager.datafactory.fluent.models.AmazonS3LinkedServiceTypeProperties"
] | import com.azure.resourcemanager.datafactory.fluent.models.AmazonS3LinkedServiceTypeProperties; | import com.azure.resourcemanager.datafactory.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,197,636 |
public Response delete(String path) throws IOException {
return delete(cluster, path);
} | Response function(String path) throws IOException { return delete(cluster, path); } | /**
* Send a DELETE request
* @param path the path or URI
* @return a Response object with response detail
* @throws IOException
*/ | Send a DELETE request | delete | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java",
"license": "apache-2.0",
"size": 16111
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,676,725 |
IterableAssert<T> satisfies(final SerializableMatcher<Iterable<? extends T>> matcher) {
// Safe covariant cast. Could be elided by changing a lot of this file to use
// more flexible bounds.
@SuppressWarnings({"rawtypes", "unchecked"})
SerializableFunction<Iterable<T>, Void> checkerFn =
... | IterableAssert<T> satisfies(final SerializableMatcher<Iterable<? extends T>> matcher) { @SuppressWarnings({STR, STR}) SerializableFunction<Iterable<T>, Void> checkerFn = (SerializableFunction) new MatcherCheckerFn<>(matcher); pipeline.apply( STR + (assertCount++), new OneSideInputAssert<Iterable<T>>(createActual, check... | /**
* Applies a {@link SerializableMatcher} to check the elements of the {@code Iterable}.
*
* <p>Returns this {@code IterableAssert}.
*/ | Applies a <code>SerializableMatcher</code> to check the elements of the Iterable. Returns this IterableAssert | satisfies | {
"repo_name": "shakamunyi/beam",
"path": "sdks/java/core/src/main/java/com/google/cloud/dataflow/sdk/testing/PAssert.java",
"license": "apache-2.0",
"size": 28557
} | [
"com.google.cloud.dataflow.sdk.transforms.SerializableFunction"
] | import com.google.cloud.dataflow.sdk.transforms.SerializableFunction; | import com.google.cloud.dataflow.sdk.transforms.*; | [
"com.google.cloud"
] | com.google.cloud; | 1,405,097 |
public boolean hasWorkingMisc(BigInteger flag) {
return hasWorkingMisc(flag, -1);
} | boolean function(BigInteger flag) { return hasWorkingMisc(flag, -1); } | /**
* Check if the entity has an arbitrary type of misc equipment
*
* @param flag A MiscType.F_XXX
* @return true if at least one ready item.
*/ | Check if the entity has an arbitrary type of misc equipment | hasWorkingMisc | {
"repo_name": "chvink/kilomek",
"path": "megamek/src/megamek/common/Entity.java",
"license": "gpl-3.0",
"size": 463901
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,540,542 |
public static void putGoogleAnalyticsTrackingIdIntoFlowScope(final RequestContext context, final Object value) {
context.getFlowScope().put("googleAnalyticsTrackingId", value);
} | static void function(final RequestContext context, final Object value) { context.getFlowScope().put(STR, value); } | /**
* Put tracking id into flow scope.
*
* @param context the context
* @param value the value
*/ | Put tracking id into flow scope | putGoogleAnalyticsTrackingIdIntoFlowScope | {
"repo_name": "dodok1/cas",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 29223
} | [
"org.springframework.webflow.execution.RequestContext"
] | import org.springframework.webflow.execution.RequestContext; | import org.springframework.webflow.execution.*; | [
"org.springframework.webflow"
] | org.springframework.webflow; | 112,612 |
public void unbindClient(final Object client) {
if (this.client.equals(client)) {
synchronized (serviceMap) {
for (final Class<?> clazz : serviceMap.keySet()) {
try {
final Method method = client.getClass().getMethod("unbind", clazz);
if (method == null) {
Log.error(
"Servic... | void function(final Object client) { if (this.client.equals(client)) { synchronized (serviceMap) { for (final Class<?> clazz : serviceMap.keySet()) { try { final Method method = client.getClass().getMethod(STR, clazz); if (method == null) { Log.error( STR, clazz.getName()); } else { final List<Object> services = servic... | /**
* unbinds the client from this broker. if there are any services that
* weren't unbound from the client before this call, they will be unbound
* while this function call.
*
* @param client
* client for the broker
*/ | unbinds the client from this broker. if there are any services that weren't unbound from the client before this call, they will be unbound while this function call | unbindClient | {
"repo_name": "oschuen/ballin-octo-meme",
"path": "pb/pb.web.gwt/src/main/java/pb/web/gwt/server/impl/ServiceBroker.java",
"license": "gpl-2.0",
"size": 4881
} | [
"java.lang.reflect.Method",
"java.util.List"
] | import java.lang.reflect.Method; import java.util.List; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,044,349 |
List<String> getUserParamInstanceIDs(String id);
| List<String> getUserParamInstanceIDs(String id); | /**
* Returns a list of all the unique instance ID's (not the full URN) for a
* specific parameter ID for the current user.
*/ | Returns a list of all the unique instance ID's (not the full URN) for a specific parameter ID for the current user | getUserParamInstanceIDs | {
"repo_name": "KRMAssociatesInc/eHMP",
"path": "ehmp/product/production/hmp-main/src/main/java/gov/va/cpe/param/IParamService.java",
"license": "apache-2.0",
"size": 2873
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 221,228 |
private boolean initRequestHandler(SelectionKey selectionKey) {
ByteBuffer inputBuffer = inputStream.getBuffer();
int remaining = inputBuffer.remaining();
// Don't have enough bytes to determine the protocol yet...
if(remaining < 3)
return true;
byte[] protoByte... | boolean function(SelectionKey selectionKey) { ByteBuffer inputBuffer = inputStream.getBuffer(); int remaining = inputBuffer.remaining(); if(remaining < 3) return true; byte[] protoBytes = { inputBuffer.get(0), inputBuffer.get(1), inputBuffer.get(2) }; try { String proto = ByteUtils.getString(protoBytes, "UTF-8"); input... | /**
* Returns true if the request should continue.
*
* @return
*/ | Returns true if the request should continue | initRequestHandler | {
"repo_name": "bitti/voldemort",
"path": "src/java/voldemort/server/niosocket/AsyncRequestHandler.java",
"license": "apache-2.0",
"size": 20546
} | [
"java.nio.ByteBuffer",
"java.nio.channels.SelectionKey",
"java.util.concurrent.atomic.AtomicBoolean"
] | import java.nio.ByteBuffer; import java.nio.channels.SelectionKey; import java.util.concurrent.atomic.AtomicBoolean; | import java.nio.*; import java.nio.channels.*; import java.util.concurrent.atomic.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 1,521,981 |
private CustomEventsTriggerTypeProperties innerTypeProperties() {
return this.innerTypeProperties;
} | CustomEventsTriggerTypeProperties function() { return this.innerTypeProperties; } | /**
* Get the innerTypeProperties property: Custom Events Trigger properties.
*
* @return the innerTypeProperties value.
*/ | Get the innerTypeProperties property: Custom Events Trigger properties | innerTypeProperties | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/CustomEventsTrigger.java",
"license": "mit",
"size": 6306
} | [
"com.azure.resourcemanager.datafactory.fluent.models.CustomEventsTriggerTypeProperties"
] | import com.azure.resourcemanager.datafactory.fluent.models.CustomEventsTriggerTypeProperties; | import com.azure.resourcemanager.datafactory.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 2,279,701 |
public void loadRndSettings(boolean loading, List<ViewedByItem> results)
{
view.displayViewedBy(results);
} | void function(boolean loading, List<ViewedByItem> results) { view.displayViewedBy(results); } | /**
* Implemented as specified by the {@link Renderer} interface.
* @see Renderer#loadRndSettings(boolean, List)
*/ | Implemented as specified by the <code>Renderer</code> interface | loadRndSettings | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/rnd/RendererComponent.java",
"license": "gpl-2.0",
"size": 42818
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.util.ViewedByItem"
] | import java.util.List; import org.openmicroscopy.shoola.agents.util.ViewedByItem; | import java.util.*; import org.openmicroscopy.shoola.agents.util.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,422,505 |
public Iterator<IssueDoc> selectIssuesForBatch(ComponentDto component) {
BoolFilterBuilder filter = FilterBuilders.boolFilter()
.must(createAuthorizationFilter(true, userSession.getLogin(), userSession.getUserGroups()))
.mustNot(FilterBuilders.termsFilter(IssueIndexDefinition.FIELD_ISSUE_STATUS, Issue... | Iterator<IssueDoc> function(ComponentDto component) { BoolFilterBuilder filter = FilterBuilders.boolFilter() .must(createAuthorizationFilter(true, userSession.getLogin(), userSession.getUserGroups())) .mustNot(FilterBuilders.termsFilter(IssueIndexDefinition.FIELD_ISSUE_STATUS, Issue.STATUS_CLOSED)); switch (component.s... | /**
* Return non closed issues for a given project, module, or file. Other kind of components are not allowed.
* Only fields needed for the batch are returned.
*/ | Return non closed issues for a given project, module, or file. Other kind of components are not allowed. Only fields needed for the batch are returned | selectIssuesForBatch | {
"repo_name": "abbeyj/sonarqube",
"path": "server/sonar-server/src/main/java/org/sonar/server/issue/index/IssueIndex.java",
"license": "lgpl-3.0",
"size": 37168
} | [
"java.util.Iterator",
"org.elasticsearch.action.search.SearchRequestBuilder",
"org.elasticsearch.action.search.SearchResponse",
"org.elasticsearch.action.search.SearchType",
"org.elasticsearch.common.unit.TimeValue",
"org.elasticsearch.index.query.BoolFilterBuilder",
"org.elasticsearch.index.query.Filte... | import java.util.Iterator; import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.action.search.SearchType; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.BoolFilterBuilder; import org.elasticsear... | import java.util.*; import org.elasticsearch.action.search.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.index.query.*; import org.sonar.api.issue.*; import org.sonar.api.resources.*; import org.sonar.db.component.*; import org.sonar.server.es.*; | [
"java.util",
"org.elasticsearch.action",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.sonar.api",
"org.sonar.db",
"org.sonar.server"
] | java.util; org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.index; org.sonar.api; org.sonar.db; org.sonar.server; | 309,396 |
private void restoreHdfsRegions(final List<HRegionInfo> regions) throws IOException {
if (regions == null || regions.size() == 0) return;
for (HRegionInfo hri: regions) restoreRegion(hri);
} | void function(final List<HRegionInfo> regions) throws IOException { if (regions == null regions.size() == 0) return; for (HRegionInfo hri: regions) restoreRegion(hri); } | /**
* Restore specified regions by restoring content to the snapshot state.
*/ | Restore specified regions by restoring content to the snapshot state | restoreHdfsRegions | {
"repo_name": "cloud-software-foundation/c5",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java",
"license": "apache-2.0",
"size": 26981
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.HRegionInfo"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.HRegionInfo; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,680,106 |
private synchronized void userHasLeft() {
// Update the list of joined rooms through this connection
List<String> rooms = joinedRooms.get(connection);
if (rooms == null) {
return;
}
rooms.remove(room);
cleanup();
} | synchronized void function() { List<String> rooms = joinedRooms.get(connection); if (rooms == null) { return; } rooms.remove(room); cleanup(); } | /**
* Notification message that the user has left the room.
*/ | Notification message that the user has left the room | userHasLeft | {
"repo_name": "masach/FaceWhat",
"path": "FacewhatDroid/asmack/org/jivesoftware/smackx/muc/MultiUserChat.java",
"license": "gpl-3.0",
"size": 122766
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,805,540 |
List<AsxElement> getAsxElements(); | List<AsxElement> getAsxElements(); | /**
* Returns the list of ASX elements defined in this container.
* @return a list of ASX elements. May be empty but not <code>null</code>.
* @see #addAsxElement
*/ | Returns the list of ASX elements defined in this container | getAsxElements | {
"repo_name": "wenerme/Lizzy",
"path": "src/java/christophedelory/playlist/asx/AsxElementContainer.java",
"license": "bsd-2-clause",
"size": 2190
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 714,028 |
public static UserModel getUserDetails() {
final FirebaseUser user = getFirebaseNewInstance().getCurrentUser();
if (user == null)
return null;
String name = user.getDisplayName();
String email = user.getEmail();
String picture = user.getPhotoUrl() != null ? user.... | static UserModel function() { final FirebaseUser user = getFirebaseNewInstance().getCurrentUser(); if (user == null) return null; String name = user.getDisplayName(); String email = user.getEmail(); String picture = user.getPhotoUrl() != null ? user.getPhotoUrl().toString() : null; for (UserInfo userInfo : user.getProv... | /**
* get user details
*
* @return UserModel
*/ | get user details | getUserDetails | {
"repo_name": "RubitOrganization/Rubit",
"path": "app/src/main/java/com/coderschool/android2/rubit/utils/FirebaseUtils.java",
"license": "apache-2.0",
"size": 4169
} | [
"com.coderschool.android2.rubit.constants.DatabaseConstants",
"com.coderschool.android2.rubit.models.UserModel",
"com.google.firebase.auth.FirebaseUser",
"com.google.firebase.auth.UserInfo",
"java.util.HashMap",
"java.util.Map"
] | import com.coderschool.android2.rubit.constants.DatabaseConstants; import com.coderschool.android2.rubit.models.UserModel; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.auth.UserInfo; import java.util.HashMap; import java.util.Map; | import com.coderschool.android2.rubit.constants.*; import com.coderschool.android2.rubit.models.*; import com.google.firebase.auth.*; import java.util.*; | [
"com.coderschool.android2",
"com.google.firebase",
"java.util"
] | com.coderschool.android2; com.google.firebase; java.util; | 1,496,217 |
public TemplateResource updateTemplate(String typeHint, String id, TemplateResource template) throws ApiException {
Object localVarPostBody = template;
// verify the required parameter 'typeHint' is set
if (typeHint == null) {
throw new ApiException(400, "Missing the required parameter 'typeHin... | TemplateResource function(String typeHint, String id, TemplateResource template) throws ApiException { Object localVarPostBody = template; if (typeHint == null) { throw new ApiException(400, STR); } if (id == null) { throw new ApiException(400, STR); } String localVarPath = STR .replaceAll("\\{" + STR + "\\}", apiClien... | /**
* Update a template
* <b>Permissions Needed:</b> TEMPLATES_ADMIN
* @param typeHint The type for the resource this template applies to (required)
* @param id The id of the template (required)
* @param template The template (optional)
* @return TemplateResource
* @throws ApiException ... | Update a template <b>Permissions Needed:</b> TEMPLATES_ADMIN | updateTemplate | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/main/java/com/knetikcloud/api/ContentArticlesApi.java",
"license": "apache-2.0",
"size": 32643
} | [
"com.knetikcloud.client.ApiException",
"com.knetikcloud.client.Pair",
"com.knetikcloud.model.TemplateResource",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.ws.rs.core.GenericType"
] | import com.knetikcloud.client.ApiException; import com.knetikcloud.client.Pair; import com.knetikcloud.model.TemplateResource; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.ws.rs.core.GenericType; | import com.knetikcloud.client.*; import com.knetikcloud.model.*; import java.util.*; import javax.ws.rs.core.*; | [
"com.knetikcloud.client",
"com.knetikcloud.model",
"java.util",
"javax.ws"
] | com.knetikcloud.client; com.knetikcloud.model; java.util; javax.ws; | 133,945 |
private Document getDoc(QuerySpec query, int id) {
try {
return index.getIndexReader().document(this.hits.get(query).scoreDocs[id].doc);
}
catch (CorruptIndexException e) {
log.error("The index seems to be corrupted:", e);
return null;
}
catch (IOException e) {
log.error("Could not read from in... | Document function(QuerySpec query, int id) { try { return index.getIndexReader().document(this.hits.get(query).scoreDocs[id].doc); } catch (CorruptIndexException e) { log.error(STR, e); return null; } catch (IOException e) { log.error(STR, e); return null; } } | /**
* Returns the lucene hit with the given id of the respective lucene query
* @param query the lucene query
* @param id the id of the hit to return
* @return the requested hit, or null if it fails
*/ | Returns the lucene hit with the given id of the respective lucene query | getDoc | {
"repo_name": "kreuzverweis/lucene-sail-3.0",
"path": "src/main/java/org/openrdf/sail/lucene/LuceneQueryIterator.java",
"license": "bsd-3-clause",
"size": 14963
} | [
"java.io.IOException",
"org.apache.lucene.document.Document",
"org.apache.lucene.index.CorruptIndexException"
] | import java.io.IOException; import org.apache.lucene.document.Document; import org.apache.lucene.index.CorruptIndexException; | import java.io.*; import org.apache.lucene.document.*; import org.apache.lucene.index.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,212,453 |
public void propertyChange(PropertyChangeEvent evt) {
String name = evt.getPropertyName();
if (RatingComponent.RATE_PROPERTY.equals(name)) {
int newValue = (Integer) evt.getNewValue();
if (newValue != selectedValue) {
selectedValue = newValue;
... | void function(PropertyChangeEvent evt) { String name = evt.getPropertyName(); if (RatingComponent.RATE_PROPERTY.equals(name)) { int newValue = (Integer) evt.getNewValue(); if (newValue != selectedValue) { selectedValue = newValue; view.saveData(true); } } else if (RatingComponent.RATE_END_PROPERTY.equals(name)) { view.... | /**
* Sets the currently selected rating value.
*
* @see PropertyChangeListener#propertyChange(PropertyChangeEvent)
*/ | Sets the currently selected rating value | propertyChange | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/RatingTaskPaneUI.java",
"license": "gpl-2.0",
"size": 7255
} | [
"java.beans.PropertyChangeEvent",
"org.openmicroscopy.shoola.util.ui.RatingComponent"
] | import java.beans.PropertyChangeEvent; import org.openmicroscopy.shoola.util.ui.RatingComponent; | import java.beans.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.beans",
"org.openmicroscopy.shoola"
] | java.beans; org.openmicroscopy.shoola; | 330,159 |
private void updateStatistics()
throws StandardException {
ConglomerateDescriptor[] cds;
td = dd.getTableDescriptor(tableId);
if (updateStatisticsAll) {
cds = null;
} else {
cds = new ConglomerateDescriptor[1];
cds[0] = dd.getConglom... | void function() throws StandardException { ConglomerateDescriptor[] cds; td = dd.getTableDescriptor(tableId); if (updateStatisticsAll) { cds = null; } else { cds = new ConglomerateDescriptor[1]; cds[0] = dd.getConglomerateDescriptor( indexNameForStatistics, sd, false); } dd.getIndexStatsRefresher(false).runExplicitly( ... | /**
* Update statistics of either all the indexes on the table or only one
* specific index depending on what user has requested.
*
* @throws StandardException
*/ | Update statistics of either all the indexes on the table or only one specific index depending on what user has requested | updateStatistics | {
"repo_name": "trejkaz/derby",
"path": "java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java",
"license": "apache-2.0",
"size": 131348
} | [
"org.apache.derby.iapi.error.StandardException",
"org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor"
] | import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor; | import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.sql.dictionary.*; | [
"org.apache.derby"
] | org.apache.derby; | 332,064 |
public static String toString(Date date) {
return (toString(date, true));
} | static String function(Date date) { return (toString(date, true)); } | /**
* Get a ISO8601 formatted string for the provided Date instance.
*
* @param date the Date instance to get the ISO8601 formatted string for
* @return a ISO8601 formatted string for the provided Date instance, or null if date is null
*/ | Get a ISO8601 formatted string for the provided Date instance | toString | {
"repo_name": "gmessner/gitlab4j-api",
"path": "src/main/java/org/gitlab4j/api/utils/ISO8601.java",
"license": "mit",
"size": 7799
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 892,698 |
public CellReference<?> getFocusedCell() {
return targetCell;
} | CellReference<?> function() { return targetCell; } | /**
* Gets the focused cell for this event.
*
* @return focused cell
*/ | Gets the focused cell for this event | getFocusedCell | {
"repo_name": "travisfw/vaadin",
"path": "client/src/com/vaadin/client/widgets/Grid.java",
"license": "apache-2.0",
"size": 285859
} | [
"com.vaadin.client.widget.grid.CellReference"
] | import com.vaadin.client.widget.grid.CellReference; | import com.vaadin.client.widget.grid.*; | [
"com.vaadin.client"
] | com.vaadin.client; | 2,033,109 |
public JsonObject deepClone(JsonObject source) {
return isNotNull(source) ? source.deepCopy() : source;
} | JsonObject function(JsonObject source) { return isNotNull(source) ? source.deepCopy() : source; } | /**
* Deep clone.
*
* @param source the source json
* @return the deep clone of the json
*/ | Deep clone | deepClone | {
"repo_name": "balajeetm/json-mystique",
"path": "json-mystique-utils/gson-utils/src/main/java/com/balajeetm/mystique/util/gson/lever/JsonLever.java",
"license": "apache-2.0",
"size": 77289
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,740,985 |
private void addParts() {
Map parts = views.getPartMap();
if (parts.isEmpty()) {
System.out.println("Adding Parts");
parts.put(new PartKey("P1"),
new PartData("Nut", "Red",
new Weight(12.0, Weight.GRAMS),
... | void function() { Map parts = views.getPartMap(); if (parts.isEmpty()) { System.out.println(STR); parts.put(new PartKey("P1"), new PartData("Nut", "Red", new Weight(12.0, Weight.GRAMS), STR)); parts.put(new PartKey("P2"), new PartData("Bolt", "Green", new Weight(17.0, Weight.GRAMS), "Paris")); parts.put(new PartKey("P3... | /**
* Populate the part entities in the database. If the part map is not
* empty, assume that this has already been done.
*/ | Populate the part entities in the database. If the part map is not empty, assume that this has already been done | addParts | {
"repo_name": "bjorndm/prebake",
"path": "code/third_party/bdb/examples/collections/ship/basic/Sample.java",
"license": "apache-2.0",
"size": 8677
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,013,999 |
public InputStreamReader reader(final String charset) throws HttpRequestException {
try {
return new InputStreamReader(stream(), getValidCharset(charset));
} catch (UnsupportedEncodingException e) {
throw new HttpRequestException(e);
}
}
/**
* Get reader to response body using the character set retu... | InputStreamReader function(final String charset) throws HttpRequestException { try { return new InputStreamReader(stream(), getValidCharset(charset)); } catch (UnsupportedEncodingException e) { throw new HttpRequestException(e); } } /** * Get reader to response body using the character set returned from * {@link #chars... | /**
* Get reader to response body using given character set.
* <p>
* This will fall back to using the UTF-8 character set if the given charset
* is null
*
* @param charset
* @return reader
* @throws HttpRequestException
*/ | Get reader to response body using given character set. This will fall back to using the UTF-8 character set if the given charset is null | reader | {
"repo_name": "sindhunaydu/web-perf-analyzer",
"path": "HttpRequest.java",
"license": "mit",
"size": 83766
} | [
"java.io.InputStreamReader",
"java.io.UnsupportedEncodingException"
] | import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 333,855 |
public void setNumberFormatOverride(NumberFormat formatter) {
this.numberFormatOverride = formatter;
notifyListeners(new AxisChangeEvent(this));
} | void function(NumberFormat formatter) { this.numberFormatOverride = formatter; notifyListeners(new AxisChangeEvent(this)); } | /**
* Sets the number format override. If this is non-null, then it will be
* used to format the numbers on the axis.
*
* @param formatter the number formatter (<code>null</code> permitted).
*
* @see #getNumberFormatOverride()
*/ | Sets the number format override. If this is non-null, then it will be used to format the numbers on the axis | setNumberFormatOverride | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/axis/NumberAxis.java",
"license": "lgpl-2.1",
"size": 55672
} | [
"java.text.NumberFormat",
"org.jfree.chart.event.AxisChangeEvent"
] | import java.text.NumberFormat; import org.jfree.chart.event.AxisChangeEvent; | import java.text.*; import org.jfree.chart.event.*; | [
"java.text",
"org.jfree.chart"
] | java.text; org.jfree.chart; | 1,777,532 |
List<Member> getCalculatedMembers(Level level); | List<Member> getCalculatedMembers(Level level); | /**
* Returns a list of calculated members in a given level.
*/ | Returns a list of calculated members in a given level | getCalculatedMembers | {
"repo_name": "Twixer/mondrian-3.1.5",
"path": "src/main/mondrian/olap/SchemaReader.java",
"license": "epl-1.0",
"size": 14002
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 376,862 |
public interface BasicBuilderProperties<T>
{
T setLogger(Log log); | interface BasicBuilderProperties<T> { T function(Log log); | /**
* Sets the <em>logger</em> property. With this property a concrete
* {@code Log} object can be set for the configuration. Thus logging
* behavior can be controlled.
*
* @param log the {@code Log} for the configuration produced by this builder
* @return a reference to this object for me... | Sets the logger property. With this property a concrete Log object can be set for the configuration. Thus logging behavior can be controlled | setLogger | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/main/java/org/apache/commons/configuration2/builder/BasicBuilderProperties.java",
"license": "apache-2.0",
"size": 8960
} | [
"org.apache.commons.logging.Log"
] | import org.apache.commons.logging.Log; | import org.apache.commons.logging.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,040,736 |
private boolean isAliasDefinition(Node n) {
if (!n.isName()) {
return false;
}
if (!isAliasName(n.getString())) {
// The given Node's string contents is not an alias. Skip it.
return false;
}
return n.getFirstChild() != null;
} | boolean function(Node n) { if (!n.isName()) { return false; } if (!isAliasName(n.getString())) { return false; } return n.getFirstChild() != null; } | /**
* Does the given node define one of our aliases?
*/ | Does the given node define one of our aliases | isAliasDefinition | {
"repo_name": "robbert/closure-compiler",
"path": "src/com/google/javascript/jscomp/AliasKeywords.java",
"license": "apache-2.0",
"size": 15467
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 753,810 |
@RequestMapping(value = "search", method = RequestMethod.POST)
public @ResponseBody
JsonNode search(@RequestBody ObjectNode structuredQuery,
@RequestParam(defaultValue = "1", required = false) long start) {
JsonNode postedStartNode = structuredQuery.get("start");
if (postedStartNode != null) {
start = p... | @RequestMapping(value = STR, method = RequestMethod.POST) JsonNode function(@RequestBody ObjectNode structuredQuery, @RequestParam(defaultValue = "1", required = false) long start) { JsonNode postedStartNode = structuredQuery.get("start"); if (postedStartNode != null) { start = postedStartNode.asLong(); structuredQuery... | /**
* Exposes an endpoint for searching QnADocuments.
* @param structuredQuery A JSON structured query.
* @param start The index of the first result to return.
* @return A Search Results JSON response.
*/ | Exposes an endpoint for searching QnADocuments | search | {
"repo_name": "laurelnaiad/marklogic-samplestack-old",
"path": "appserver/java-spring/src/main/java/com/marklogic/samplestack/web/QnADocumentController.java",
"license": "apache-2.0",
"size": 10956
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.fasterxml.jackson.databind.node.ObjectNode",
"com.marklogic.samplestack.domain.ClientRole",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMetho... | import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.marklogic.samplestack.domain.ClientRole; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annota... | import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.node.*; import com.marklogic.samplestack.domain.*; import org.springframework.web.bind.annotation.*; | [
"com.fasterxml.jackson",
"com.marklogic.samplestack",
"org.springframework.web"
] | com.fasterxml.jackson; com.marklogic.samplestack; org.springframework.web; | 1,503,729 |
public void setFeatureOfInterest(AbstractFeature featureOfInterest) {
this.featureOfInterest = featureOfInterest;
}
| void function(AbstractFeature featureOfInterest) { this.featureOfInterest = featureOfInterest; } | /**
* Set featureOfInterest
*
* @param featureOfInterest
* the featureOfInterest to set
*/ | Set featureOfInterest | setFeatureOfInterest | {
"repo_name": "sauloperez/sos",
"path": "src/core/api/src/main/java/org/n52/sos/ogc/om/OmObservationConstellation.java",
"license": "apache-2.0",
"size": 10027
} | [
"org.n52.sos.ogc.gml.AbstractFeature"
] | import org.n52.sos.ogc.gml.AbstractFeature; | import org.n52.sos.ogc.gml.*; | [
"org.n52.sos"
] | org.n52.sos; | 1,727,761 |
public List<Document> getAllMatchedGroups(Map<?, ?> matchFields, int nb, int start, List<?> order)
throws XWikiException
{
List<Document> groupList;
try {
List<XWikiDocument> xdocList =
(List<XWikiDocument>) RightsManager.getInstance().getAllMatchedUsersOrGro... | List<Document> function(Map<?, ?> matchFields, int nb, int start, List<?> order) throws XWikiException { List<Document> groupList; try { List<XWikiDocument> xdocList = (List<XWikiDocument>) RightsManager.getInstance().getAllMatchedUsersOrGroups(false, RightsManagerPluginApi.createMatchingTable(matchFields), true, new R... | /**
* Get all groups in the main wiki and the current wiki.
*
* @param matchFields the fields to match. It is a Map with field name as key and for value :
* <ul>
* <li>"matching string" for document fields</li>
* <li>or ["field type", "matching string"] for... | Get all groups in the main wiki and the current wiki | getAllMatchedGroups | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/plugin/rightsmanager/RightsManagerGroupsApi.java",
"license": "lgpl-2.1",
"size": 40200
} | [
"com.xpn.xwiki.XWikiException",
"com.xpn.xwiki.api.Document",
"com.xpn.xwiki.doc.XWikiDocument",
"com.xpn.xwiki.plugin.rightsmanager.utils.RequestLimit",
"java.util.Collections",
"java.util.List",
"java.util.Map"
] | import com.xpn.xwiki.XWikiException; import com.xpn.xwiki.api.Document; import com.xpn.xwiki.doc.XWikiDocument; import com.xpn.xwiki.plugin.rightsmanager.utils.RequestLimit; import java.util.Collections; import java.util.List; import java.util.Map; | import com.xpn.xwiki.*; import com.xpn.xwiki.api.*; import com.xpn.xwiki.doc.*; import com.xpn.xwiki.plugin.rightsmanager.utils.*; import java.util.*; | [
"com.xpn.xwiki",
"java.util"
] | com.xpn.xwiki; java.util; | 2,330,976 |
public static Test suite()
{
BaseTestSuite suite = new BaseTestSuite( "TableFunctionTest" );
suite.addTest( new TableFunctionTest( "noSpecialCollation" ) );
suite.addTest( collatedSuite( "en", "specialCollation" ) );
return suite;
} | static Test function() { BaseTestSuite suite = new BaseTestSuite( STR ); suite.addTest( new TableFunctionTest( STR ) ); suite.addTest( collatedSuite( "en", STR ) ); return suite; } | /**
* Tests to run.
*/ | Tests to run | suite | {
"repo_name": "trejkaz/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java",
"license": "apache-2.0",
"size": 105501
} | [
"junit.framework.Test",
"org.apache.derbyTesting.junit.BaseTestSuite"
] | import junit.framework.Test; import org.apache.derbyTesting.junit.BaseTestSuite; | import junit.framework.*; import org.apache.*; | [
"junit.framework",
"org.apache"
] | junit.framework; org.apache; | 891,510 |
public void testThenAcceptBoth_normalCompletion() {
for (ExecutionMode m : ExecutionMode.values())
for (boolean fFirst : new boolean[] { true, false })
for (Integer v1 : new Integer[] { 1, null })
for (Integer v2 : new Integer[] { 2, null })
{
final CompletableFuture<Inte... | void function() { for (ExecutionMode m : ExecutionMode.values()) for (boolean fFirst : new boolean[] { true, false }) for (Integer v1 : new Integer[] { 1, null }) for (Integer v2 : new Integer[] { 2, null }) { final CompletableFuture<Integer> f = new CompletableFuture<>(); final CompletableFuture<Integer> g = new Compl... | /**
* thenAcceptBoth result completes normally after normal
* completion of sources
*/ | thenAcceptBoth result completes normally after normal completion of sources | testThenAcceptBoth_normalCompletion | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "test/java/util/concurrent/tck/CompletableFutureTest.java",
"license": "gpl-2.0",
"size": 175854
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 563,679 |
public static void saveBytes(byte[] bytes, File file) throws IOException {
deleteFileIfExists(file);
log.debug("Writing bytes to {}", file);
try (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file))) {
out.write(bytes);
} catch(IOException io) {
log.error("Unable to save byte... | static void function(byte[] bytes, File file) throws IOException { deleteFileIfExists(file); log.debug(STR, file); try (BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file))) { out.write(bytes); } catch(IOException io) { log.error(STR, file, io); throw io; } } | /**
* Saves raw byte data to the given file deleting any
* file with the same name
*
* @param bytes the byte data to write out
* @param file the file to write it to
*
* @throws IOException if output fails
*/ | Saves raw byte data to the given file deleting any file with the same name | saveBytes | {
"repo_name": "KodeMunkie/imagetozxspec",
"path": "src/main/java/uk/co/silentsoftware/core/helpers/SaveHelper.java",
"license": "agpl-3.0",
"size": 3527
} | [
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException"
] | import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,883,325 |
void patternMining(estNode root, List<Integer> pattern) throws IOException {
for (estNode node : root.children) {
List<Integer> patt2 = new ArrayList<Integer>(pattern);
patt2.add(node.itemID);
node.update(k, 0, d);
double s = node.computeSupport(N);
if (s > minsup) {
patternCount++;
... | void patternMining(estNode root, List<Integer> pattern) throws IOException { for (estNode node : root.children) { List<Integer> patt2 = new ArrayList<Integer>(pattern); patt2.add(node.itemID); node.update(k, 0, d); double s = node.computeSupport(N); if (s > minsup) { patternCount++; if(patterns == null) { writeItemset(... | /********************************************************************
* Recursive method for finding frequent patterns.
* @param root root of the current subtree
* @param pattern current pattern
* @throws IOException
********************************************************************/ | Recursive method for finding frequent patterns | patternMining | {
"repo_name": "automenta/java_dann",
"path": "src/syncleus/dann/learn/pattern/algorithms/frequentpatterns/estDec/estTree.java",
"license": "agpl-3.0",
"size": 11626
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,191,426 |
private ColumnSchema getColumnSchema(String columnName) {
TableSchema tableSchema = getTableSchema();
if (tableSchema == null) {
String message = TableSchemaNotFoundException.createMessage(tableDesc.name(),
dbSchema.... | ColumnSchema function(String columnName) { TableSchema tableSchema = getTableSchema(); if (tableSchema == null) { String message = TableSchemaNotFoundException.createMessage(tableDesc.name(), dbSchema.name()); throw new TableSchemaNotFoundException(message); } ColumnSchema columnSchema = tableSchema.getColumnSchema(col... | /**
* Returns ColumnSchema from TableSchema by column name.
* @param columnName column name
* @return ColumnSchema
*/ | Returns ColumnSchema from TableSchema by column name | getColumnSchema | {
"repo_name": "kuujo/onos",
"path": "protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/AbstractOvsdbTableService.java",
"license": "apache-2.0",
"size": 10855
} | [
"org.onosproject.ovsdb.rfc.exception.ColumnSchemaNotFoundException",
"org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException",
"org.onosproject.ovsdb.rfc.schema.ColumnSchema",
"org.onosproject.ovsdb.rfc.schema.TableSchema"
] | import org.onosproject.ovsdb.rfc.exception.ColumnSchemaNotFoundException; import org.onosproject.ovsdb.rfc.exception.TableSchemaNotFoundException; import org.onosproject.ovsdb.rfc.schema.ColumnSchema; import org.onosproject.ovsdb.rfc.schema.TableSchema; | import org.onosproject.ovsdb.rfc.exception.*; import org.onosproject.ovsdb.rfc.schema.*; | [
"org.onosproject.ovsdb"
] | org.onosproject.ovsdb; | 1,873,091 |
protected Date getDate(HashMap<String, Object> map, String key) {
return map.containsKey(key) ? Date.valueOf(getString(map, key)) : null;
}
| Date function(HashMap<String, Object> map, String key) { return map.containsKey(key) ? Date.valueOf(getString(map, key)) : null; } | /**
* Utility method for getting a <strong>{@code java.sql.Date}</strong> property.
*
* @param map JSON property map
* @param key property key
* @return <strong>{@code java.sql.Date}</strong> value
*/ | Utility method for getting a java.sql.Date property | getDate | {
"repo_name": "arbiem/simplex",
"path": "SimpleX/src/net/arbium/simplex/rest/JSONRESTServlet.java",
"license": "mit",
"size": 5689
} | [
"java.sql.Date",
"java.util.HashMap"
] | import java.sql.Date; import java.util.HashMap; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,014,294 |
public SubResource backendAddressPool() {
return this.backendAddressPool;
} | SubResource function() { return this.backendAddressPool; } | /**
* Get a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs.
*
* @return the backendAddressPool value
*/ | Get a reference to a pool of DIPs. Outbound traffic is randomly load balanced across IPs in the backend IPs | backendAddressPool | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/implementation/OutboundRuleInner.java",
"license": "mit",
"size": 8253
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 700,048 |
private final Query getInTimeJavaQuery() {
return entityManager.createQuery(TimestampEntityCriteriaFactory
.findInTimestamp(entityManager, date));
} | final Query function() { return entityManager.createQuery(TimestampEntityCriteriaFactory .findInTimestamp(entityManager, date)); } | /**
* Returns the query for the test.
*
* @return the query for the test
*/ | Returns the query for the test | getInTimeJavaQuery | {
"repo_name": "Bernardo-MG/jpa-example",
"path": "src/test/java/com/bernardomg/example/jpa/test/integration/temporal/timestamp/ITTimestampEntityQueryCriteriaApi.java",
"license": "mit",
"size": 10231
} | [
"com.bernardomg.example.jpa.test.config.criteria.temporal.TimestampEntityCriteriaFactory",
"javax.persistence.Query"
] | import com.bernardomg.example.jpa.test.config.criteria.temporal.TimestampEntityCriteriaFactory; import javax.persistence.Query; | import com.bernardomg.example.jpa.test.config.criteria.temporal.*; import javax.persistence.*; | [
"com.bernardomg.example",
"javax.persistence"
] | com.bernardomg.example; javax.persistence; | 1,520,352 |
public ServiceCall doubleDecimalNegativeAsync(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Get '-9999999.999' numeric value.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@link Call} object
*/ | Get '-9999999.999' numeric value | doubleDecimalNegativeAsync | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/url/PathsOperationsImpl.java",
"license": "mit",
"size": 60615
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 809,450 |
public static void domainVerbOverlap(String params, Agent agent) {
throw new Error("Not implemented yet");
}
| static void function(String params, Agent agent) { throw new Error(STR); } | /**
* Sets the overlap between two verbs to a new value
*
* $VerbOverlap conceptName, conceptName2, overlap
*
* @param params - the parameters passed to the original command, to be parsed here
* @param agent
*/ | Sets the overlap between two verbs to a new value $VerbOverlap conceptName, conceptName2, overlap | domainVerbOverlap | {
"repo_name": "Xapagy/Xapagy",
"path": "src/main/java/org/xapagy/xapi/MacroDomain.java",
"license": "agpl-3.0",
"size": 4099
} | [
"org.xapagy.agents.Agent"
] | import org.xapagy.agents.Agent; | import org.xapagy.agents.*; | [
"org.xapagy.agents"
] | org.xapagy.agents; | 1,604,260 |
public static int parse10BitAnalog(int msb, int lsb) throws IOException {
msb = msb & 0xff;
// shift up bits 9 and 10 of the msb
msb = (msb & 0x3) << 8;
// log.debug("shifted msb is " + msb);
lsb = lsb & 0xff;
return msb + lsb;
}
| static int function(int msb, int lsb) throws IOException { msb = msb & 0xff; msb = (msb & 0x3) << 8; lsb = lsb & 0xff; return msb + lsb; } | /**
* Parses a 10-bit analog value from the input stream
*
* @return
* @throws IOException
*/ | Parses a 10-bit analog value from the input stream | parse10BitAnalog | {
"repo_name": "tescher/HomewatchJavaController",
"path": "src/com/rapplogic/xbee/util/ByteUtils.java",
"license": "gpl-3.0",
"size": 6666
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 13,362 |
@Test
public void ttlFileDelete() throws Exception {
CreateFileOptions options =
CreateFileOptions.defaults().setBlockSizeBytes(Constants.KB).setRecursive(true).setTtl(0);
long fileId = mFileSystemMaster.createFile(NESTED_FILE_URI, options);
FileInfo fileInfo = mFileSystemMaster.getFileInfo(file... | void function() throws Exception { CreateFileOptions options = CreateFileOptions.defaults().setBlockSizeBytes(Constants.KB).setRecursive(true).setTtl(0); long fileId = mFileSystemMaster.createFile(NESTED_FILE_URI, options); FileInfo fileInfo = mFileSystemMaster.getFileInfo(fileId); assertEquals(fileInfo.getFileId(), fi... | /**
* Tests that an exception is in the
* {@link FileSystemMaster#createFile(AlluxioURI, CreateFileOptions)} with a TTL set in the
* {@link CreateFileOptions} after the TTL check was done once.
*/ | Tests that an exception is in the <code>FileSystemMaster#createFile(AlluxioURI, CreateFileOptions)</code> with a TTL set in the <code>CreateFileOptions</code> after the TTL check was done once | ttlFileDelete | {
"repo_name": "riversand963/alluxio",
"path": "core/server/master/src/test/java/alluxio/master/file/FileSystemMasterTest.java",
"license": "apache-2.0",
"size": 82018
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 547,782 |
@Override
public long skip(long numberOfBytes) throws IOException {
if (eof) {
throw new IOException("Skip after end of file");
}
if (position == size) {
return doEndOfFile();
}
position += numberOfBytes;
long returnLength = numberOfBytes;
... | long function(long numberOfBytes) throws IOException { if (eof) { throw new IOException(STR); } if (position == size) { return doEndOfFile(); } position += numberOfBytes; long returnLength = numberOfBytes; if (position > size) { returnLength = numberOfBytes - (position - size); position = size; } return returnLength; } | /**
* Skip a specified number of bytes.
*
* @param numberOfBytes The number of bytes to skip.
* @return The number of bytes skipped or <code>-1</code>
* if the end of file has been reached and
* <code>throwEofException</code> is set to <code>false</code>.
* @throws EOFException if the... | Skip a specified number of bytes | skip | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/cio/src/main/java/org/apache/commons/io/input/NullInputStream.java",
"license": "gpl-2.0",
"size": 10775
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,620,239 |
public List<Excerpt> getAccessorAnnotations() {
if (accessorAnnotations instanceof ImmutableList) {
accessorAnnotations = new ArrayList<>(accessorAnnotations);
}
return Collections.unmodifiableList(accessorAnnotations);
} | List<Excerpt> function() { if (accessorAnnotations instanceof ImmutableList) { accessorAnnotations = new ArrayList<>(accessorAnnotations); } return Collections.unmodifiableList(accessorAnnotations); } | /**
* Returns an unmodifiable view of the list that will be returned by {@link
* org.inferred.freebuilder.processor.property.Property#getAccessorAnnotations()}. Changes to this
* builder will be reflected in the view.
*/ | Returns an unmodifiable view of the list that will be returned by <code>org.inferred.freebuilder.processor.property.Property#getAccessorAnnotations()</code>. Changes to this builder will be reflected in the view | getAccessorAnnotations | {
"repo_name": "inferred/FreeBuilder",
"path": "generated/main/java/org/inferred/freebuilder/processor/property/Property_Builder.java",
"license": "apache-2.0",
"size": 56527
} | [
"com.google.common.collect.ImmutableList",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.inferred.freebuilder.processor.source.Excerpt"
] | import com.google.common.collect.ImmutableList; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.inferred.freebuilder.processor.source.Excerpt; | import com.google.common.collect.*; import java.util.*; import org.inferred.freebuilder.processor.source.*; | [
"com.google.common",
"java.util",
"org.inferred.freebuilder"
] | com.google.common; java.util; org.inferred.freebuilder; | 2,788,312 |
public int addChild(int parentNodeId, String nodeLabel)
{
int nodeid = 0;
try
{
m_TmpRs.executeStatement("BEGIN;", DataManager.StatementType.OTHER);
m_TmpRs.executeStatement(
"INSERT INTO " + m_Tbl +
"(" + FN_NODEDEPTH + ", " + FN_NODELABEL + ", " + FN_NODEPID + ... | int function(int parentNodeId, String nodeLabel) { int nodeid = 0; try { m_TmpRs.executeStatement(STR, DataManager.StatementType.OTHER); m_TmpRs.executeStatement( STR + m_Tbl + "(" + FN_NODEDEPTH + STR + FN_NODELABEL + STR + FN_NODEPID + STR + STR + FN_NODEDEPTH + STR + m_Tbl + STR + FN_NODEID + STR + parentNodeId + ST... | /**
* Adds a child node to the given node.
* @param parentNodeId the id of the node that will be the parent of the newly created node.
* @param nodeLabel the label of the newly created node.
* @return the id of the newly created node.
*/ | Adds a child node to the given node | addChild | {
"repo_name": "gambineri/Attic",
"path": "jtxlib/main/datastruct/narytree/NaryTree.java",
"license": "mit",
"size": 16273
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 845,029 |
public FileItemIterator getItemIterator(HttpServletRequest request)
throws FileUploadException, IOException {
return super.getItemIterator(new ServletRequestContext(request));
} | FileItemIterator function(HttpServletRequest request) throws FileUploadException, IOException { return super.getItemIterator(new ServletRequestContext(request)); } | /**
* Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
* compliant <code>multipart/form-data</code> stream.
*
* @param request The servlet request to be parsed.
*
* @return An iterator to instances of <code>FileItemStream</code>
* parsed from the request... | Processes an RFC 1867 compliant <code>multipart/form-data</code> stream | getItemIterator | {
"repo_name": "jenkinsci/commons-fileupload",
"path": "src/main/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java",
"license": "apache-2.0",
"size": 5874
} | [
"java.io.IOException",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.fileupload.FileItemIterator",
"org.apache.commons.fileupload.FileUploadException"
] | import java.io.IOException; import javax.servlet.http.HttpServletRequest; import org.apache.commons.fileupload.FileItemIterator; import org.apache.commons.fileupload.FileUploadException; | import java.io.*; import javax.servlet.http.*; import org.apache.commons.fileupload.*; | [
"java.io",
"javax.servlet",
"org.apache.commons"
] | java.io; javax.servlet; org.apache.commons; | 1,761,457 |
public static void writeUTFStringNullable(DataOutput out, @Nullable String val) throws IOException {
if (val != null) {
out.writeBoolean(true);
out.writeUTF(val);
}
else
out.writeBoolean(false);
} | static void function(DataOutput out, @Nullable String val) throws IOException { if (val != null) { out.writeBoolean(true); out.writeUTF(val); } else out.writeBoolean(false); } | /**
* Write UTF string which can be {@code null}.
*
* @param out Output stream.
* @param val Value.
* @throws IOException If failed.
*/ | Write UTF string which can be null | writeUTFStringNullable | {
"repo_name": "shurun19851206/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289056
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.jetbrains.annotations.Nullable"
] | import java.io.DataOutput; import java.io.IOException; import org.jetbrains.annotations.Nullable; | import java.io.*; import org.jetbrains.annotations.*; | [
"java.io",
"org.jetbrains.annotations"
] | java.io; org.jetbrains.annotations; | 1,743,023 |
public synchronized IndexData remove() throws BufferUnderflowException
{
return documentsByName.remove(namesQueue.remove());
} | synchronized IndexData function() throws BufferUnderflowException { return documentsByName.remove(namesQueue.remove()); } | /**
* Remove an item from the queue and return it. Since this is a FIFO, the element returned will
* be the oldes one in the queue.
*
* @return The oldest element in the queue.
* @throws BufferUnderflowException If the queue is empty.
*/ | Remove an item from the queue and return it. Since this is a FIFO, the element returned will be the oldes one in the queue | remove | {
"repo_name": "i2geo/i2gCurrikiFork",
"path": "plugins/lucene/src/main/java/com/xpn/xwiki/plugin/lucene/XWikiDocumentQueue.java",
"license": "lgpl-2.1",
"size": 3592
} | [
"org.apache.commons.collections.BufferUnderflowException"
] | import org.apache.commons.collections.BufferUnderflowException; | import org.apache.commons.collections.*; | [
"org.apache.commons"
] | org.apache.commons; | 460,352 |
private void readAndCompact() throws IOException {
assert beg != -1;
if (buf == null) {
bytes = new byte[bufSize];
buf = ByteBuffer.wrap(bytes);
}
final int pos = buf.position();
final... | void function() throws IOException { assert beg != -1; if (buf == null) { bytes = new byte[bufSize]; buf = ByteBuffer.wrap(bytes); } final int pos = buf.position(); final int lim = (int)(end - beg + pos); assert pos >= 0; assert pos < lim : pos + " " + lim; assert lim <= buf.capacity(); buf.limit(lim); int res = writeC... | /**
* Reads buffer and compacts it.
*
* @throws IOException if failed.
*/ | Reads buffer and compacts it | readAndCompact | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/swapspace/file/FileSwapSpaceSpi.java",
"license": "apache-2.0",
"size": 57251
} | [
"java.io.IOException",
"java.nio.ByteBuffer",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.io.IOException; import java.nio.ByteBuffer; import org.apache.ignite.internal.util.typedef.internal.U; | import java.io.*; import java.nio.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.io",
"java.nio",
"org.apache.ignite"
] | java.io; java.nio; org.apache.ignite; | 519,956 |
public static String createActualExecDir() {
if(!StrUtils.isEmpty(execPoolDir) && !new File(execPoolDir).isDirectory())
throw Exceptions.bad("Execution pool directory '" + execPoolDir + "' doesn't exist");
if(!StrUtils.isEmpty(execDir)) { // Use specified execDir
boolean exists = new File(execDir... | static String function() { if(!StrUtils.isEmpty(execPoolDir) && !new File(execPoolDir).isDirectory()) throw Exceptions.bad(STR + execPoolDir + STR); if(!StrUtils.isEmpty(execDir)) { boolean exists = new File(execDir).isDirectory(); if(exists && !overwriteExecDir) throw Exceptions.bad(STR); if (!exists) mkdirHard(new Fi... | /**
* Return an unused directory in the execution pool directory.
* Set actualExecDir
*/ | Return an unused directory in the execution pool directory. Set actualExecDir | createActualExecDir | {
"repo_name": "ppasupat/fig",
"path": "src/main/java/fig/exec/Execution.java",
"license": "mit",
"size": 13796
} | [
"java.io.File",
"java.util.HashSet",
"java.util.Set"
] | import java.io.File; import java.util.HashSet; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,608,535 |
void enterCmd(@NotNull LAParser.CmdContext ctx);
void exitCmd(@NotNull LAParser.CmdContext ctx); | void enterCmd(@NotNull LAParser.CmdContext ctx); void exitCmd(@NotNull LAParser.CmdContext ctx); | /**
* Exit a parse tree produced by {@link LAParser#cmd}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>LAParser#cmd</code> | exitCmd | {
"repo_name": "g-v/Compilador-para-LA",
"path": "src/trabalho1/parser/LAListener.java",
"license": "mit",
"size": 21375
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 860,955 |
private static void generateDummyPool(ClientCache dummyCache,
PoolDescription pd, String fn) {
// create and configure the dummy pool
PoolFactory dummyFactory =
((ClientCacheCreation)dummyCache).createPoolFactory();
pd.configure(dummyFactory);
String poolN... | static void function(ClientCache dummyCache, PoolDescription pd, String fn) { PoolFactory dummyFactory = ((ClientCacheCreation)dummyCache).createPoolFactory(); pd.configure(dummyFactory); String poolName = pd.getName(); Pool dummyPool = null; try { dummyPool = dummyFactory.create(poolName); } catch (IllegalStateExcepti... | /**
* Generates a dummy pool from the given cache and pool description.
*/ | Generates a dummy pool from the given cache and pool description | generateDummyPool | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/hydra/ClientCacheHelper.java",
"license": "apache-2.0",
"size": 26837
} | [
"com.gemstone.gemfire.cache.client.ClientCache",
"com.gemstone.gemfire.cache.client.Pool",
"com.gemstone.gemfire.cache.client.PoolFactory",
"com.gemstone.gemfire.internal.cache.xmlcache.ClientCacheCreation"
] | import com.gemstone.gemfire.cache.client.ClientCache; import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.client.PoolFactory; import com.gemstone.gemfire.internal.cache.xmlcache.ClientCacheCreation; | import com.gemstone.gemfire.cache.client.*; import com.gemstone.gemfire.internal.cache.xmlcache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 226,859 |
@Transactional
private String getPageTitle(String pageDef, String workflowIName) {
Locale locale=(Locale)request.getSession().getAttribute(SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME);
String code=workflowIName+"."+pageDef+".label";
try {
String pageTitle=DBResourceBundle.MESSAGE_SOURCE.g... | String function(String pageDef, String workflowIName) { Locale locale=(Locale)request.getSession().getAttribute(SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME); String code=workflowIName+"."+pageDef+STR; try { String pageTitle=DBResourceBundle.MESSAGE_SOURCE.getMessage(code, null, locale); if (pageTitle!=null) { r... | /**
* getPageTitle gets page title for jobsubmission page corresponding to workflow
*
* @param pageDef
* @parm workflowIname
*
* getPageTitle expect [workflowIName].[pageDef].label
* where page is in w/o leading slash or jobDraftId
*
*/ | getPageTitle gets page title for jobsubmission page corresponding to workflow | getPageTitle | {
"repo_name": "WASP-System/central",
"path": "plugins/bioanalyzer/src/main/java/edu/yu/einstein/wasp/plugin/bioanalyzer/web/controller/BioanalyzerController.java",
"license": "agpl-3.0",
"size": 30449
} | [
"edu.yu.einstein.wasp.resourcebundle.DBResourceBundle",
"java.util.Locale",
"org.springframework.web.servlet.i18n.SessionLocaleResolver"
] | import edu.yu.einstein.wasp.resourcebundle.DBResourceBundle; import java.util.Locale; import org.springframework.web.servlet.i18n.SessionLocaleResolver; | import edu.yu.einstein.wasp.resourcebundle.*; import java.util.*; import org.springframework.web.servlet.i18n.*; | [
"edu.yu.einstein",
"java.util",
"org.springframework.web"
] | edu.yu.einstein; java.util; org.springframework.web; | 1,524,858 |
public InputStream openInputStream() throws IOException {
throw new IllegalArgumentException("Not supported");
} | InputStream function() throws IOException { throw new IllegalArgumentException(STR); } | /**
* Open and return an input stream for a connection.
* This method always throw
* <code>IllegalArgumentException</code>.
*
* @return An input stream
* @exception IOException If an I/O error occurs
* @exception IllegalArgumentException is thrown for all requests
... | Open and return an input stream for a connection. This method always throw <code>IllegalArgumentException</code> | openInputStream | {
"repo_name": "tommythorn/yari",
"path": "shared/cacao-related/phoneme_feature/jsr120/src/protocol/sms/classes/com/sun/midp/io/j2me/sms/Protocol.java",
"license": "gpl-2.0",
"size": 34179
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,752,268 |
public Command hdfsFailover(RoleNameList names, boolean forceFailover); | Command function(RoleNameList names, boolean forceFailover); | /**
* Initiate a failover in an HDFS HA NameNode pair.
* <p/>
* The arguments should contain the names of the two NameNodes in the HA pair. The first one should be the currently
* active NameNode, the second one the NameNode to be made active.
* <p/>
* http://cloudera.github.com/cm_api/apidocs/v1/path... | Initiate a failover in an HDFS HA NameNode pair. The arguments should contain the names of the two NameNodes in the HA pair. The first one should be the currently active NameNode, the second one the NameNode to be made active. HREF | hdfsFailover | {
"repo_name": "axemblr/cloudera-manager-api",
"path": "src/main/java/com/axemblr/service/cm/apis/ServiceAPI.java",
"license": "apache-2.0",
"size": 33529
} | [
"com.axemblr.service.cm.models.cm.RoleNameList",
"com.axemblr.service.cm.models.commands.Command"
] | import com.axemblr.service.cm.models.cm.RoleNameList; import com.axemblr.service.cm.models.commands.Command; | import com.axemblr.service.cm.models.cm.*; import com.axemblr.service.cm.models.commands.*; | [
"com.axemblr.service"
] | com.axemblr.service; | 1,216,398 |
public static ThemeGraph create(Theme rootTheme,
Collection<? extends Theme> internalThemes,
Collection<? extends ThemeBuilder<?>> externalThemes)
throws ThemeConfigurationException {
Preconditions.checkArgument(internalThemes.contains(root... | static ThemeGraph function(Theme rootTheme, Collection<? extends Theme> internalThemes, Collection<? extends ThemeBuilder<?>> externalThemes) throws ThemeConfigurationException { Preconditions.checkArgument(internalThemes.contains(rootTheme)); Map<String, ThemeBuilder<?>> themeBuilderMap = externalThemes.stream() .coll... | /**
* Factory method for the graph.
*/ | Factory method for the graph | create | {
"repo_name": "PLOS/wombat",
"path": "src/main/java/org/ambraproject/wombat/config/theme/ThemeGraph.java",
"license": "mit",
"size": 5274
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.Lists",
"com.google.common.collect.Maps",
"java.util.Collection",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"java.util.TreeMap",
"java.util.function.Function",
"java.util.stream.Collectors"
] | import com.google.common.base.Preconditions; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.function.Function; import java.util.stream.Collector... | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import java.util.function.*; import java.util.stream.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,496,060 |
public static final void shuffle(float[] a, Random r) {
shuffle(a, 0, a.length, r);
}
| static final void function(float[] a, Random r) { shuffle(a, 0, a.length, r); } | /**
* Randomly permute the contents of an array.
* @param a the array to shuffle
* @param r the source of randomness to use
*/ | Randomly permute the contents of an array | shuffle | {
"repo_name": "giacomovagni/Prefuse",
"path": "src/prefuse/util/ArrayLib.java",
"license": "bsd-3-clause",
"size": 44177
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 1,972,811 |
@Endpoint(
describeByClass = true
)
public static ParallelInterleaveDataset create(Scope scope, Operand<? extends TType> inputDataset,
Iterable<Operand<?>> otherArguments, Operand<TInt64> cycleLength, Operand<TInt64> blockLength,
Operand<TBool> sloppy, Operand<TInt64> bufferOutputElements,
... | @Endpoint( describeByClass = true ) static ParallelInterleaveDataset function(Scope scope, Operand<? extends TType> inputDataset, Iterable<Operand<?>> otherArguments, Operand<TInt64> cycleLength, Operand<TInt64> blockLength, Operand<TBool> sloppy, Operand<TInt64> bufferOutputElements, Operand<TInt64> prefetchInputEleme... | /**
* Factory method to create a class wrapping a new ExperimentalParallelInterleaveDataset operation.
*
* @param scope current scope
* @param inputDataset The inputDataset value
* @param otherArguments The otherArguments value
* @param cycleLength The cycleLength value
* @param blockLength The blo... | Factory method to create a class wrapping a new ExperimentalParallelInterleaveDataset operation | create | {
"repo_name": "tensorflow/java",
"path": "tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/data/experimental/ParallelInterleaveDataset.java",
"license": "apache-2.0",
"size": 7256
} | [
"java.util.List",
"org.tensorflow.ConcreteFunction",
"org.tensorflow.Operand",
"org.tensorflow.OperationBuilder",
"org.tensorflow.ndarray.Shape",
"org.tensorflow.op.Operands",
"org.tensorflow.op.Scope",
"org.tensorflow.op.annotation.Endpoint",
"org.tensorflow.types.TBool",
"org.tensorflow.types.TI... | import java.util.List; import org.tensorflow.ConcreteFunction; import org.tensorflow.Operand; import org.tensorflow.OperationBuilder; import org.tensorflow.ndarray.Shape; import org.tensorflow.op.Operands; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.types.TBool; i... | import java.util.*; import org.tensorflow.*; import org.tensorflow.ndarray.*; import org.tensorflow.op.*; import org.tensorflow.op.annotation.*; import org.tensorflow.types.*; import org.tensorflow.types.family.*; | [
"java.util",
"org.tensorflow",
"org.tensorflow.ndarray",
"org.tensorflow.op",
"org.tensorflow.types"
] | java.util; org.tensorflow; org.tensorflow.ndarray; org.tensorflow.op; org.tensorflow.types; | 1,696,974 |
public void getData()
{
int i;
log.logDebug(toString(), Messages.getString("DeleteDialog.Log.GettingKeyInfo")); //$NON-NLS-1$
wCommit.setText(""+input.getCommitSize()); //$NON-NLS-1$
if (input.getKeyStream()!=null)
for (i=0;i<input.getKeyStream().length;i++)
{
TableItem item = wKey.table... | void function() { int i; log.logDebug(toString(), Messages.getString(STR)); wCommit.setText(""+input.getCommitSize()); if (input.getKeyStream()!=null) for (i=0;i<input.getKeyStream().length;i++) { TableItem item = wKey.table.getItem(i); if (input.getKeyLookup()[i] !=null) item.setText(1, input.getKeyLookup()[i]); if (i... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "ontometrics/ontokettle",
"path": "src/be/ibridge/kettle/trans/step/delete/DeleteDialog.java",
"license": "lgpl-2.1",
"size": 15899
} | [
"org.eclipse.swt.widgets.TableItem"
] | import org.eclipse.swt.widgets.TableItem; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,907,593 |
public List<String> findUsersTitle() throws DotDataException; | List<String> function() throws DotDataException; | /**
* This method return all the possible title set by the users.
* This method will ALWAYS hit the DB
* @return List<String> of titles.
* @throws DotDataException
*/ | This method return all the possible title set by the users. This method will ALWAYS hit the DB | findUsersTitle | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/business/UserProxyAPI.java",
"license": "gpl-3.0",
"size": 3045
} | [
"com.dotmarketing.exception.DotDataException",
"java.util.List"
] | import com.dotmarketing.exception.DotDataException; import java.util.List; | import com.dotmarketing.exception.*; import java.util.*; | [
"com.dotmarketing.exception",
"java.util"
] | com.dotmarketing.exception; java.util; | 1,469,570 |
@Nonnull
public java.util.concurrent.CompletableFuture<WindowsInformationProtectionAppLearningSummary> getAsync() {
return sendAsync(HttpMethod.GET, null);
} | java.util.concurrent.CompletableFuture<WindowsInformationProtectionAppLearningSummary> function() { return sendAsync(HttpMethod.GET, null); } | /**
* Gets the WindowsInformationProtectionAppLearningSummary from the service
*
* @return a future with the result
*/ | Gets the WindowsInformationProtectionAppLearningSummary from the service | getAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WindowsInformationProtectionAppLearningSummaryRequest.java",
"license": "mit",
"size": 7646
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.WindowsInformationProtectionAppLearningSummary"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WindowsInformationProtectionAppLearningSummary; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 2,100,813 |
public static <T, K, V> MutableMap<K, V> toMap(
Iterable<T> iterable,
Function<? super T, ? extends K> keyFunction,
Function<? super T, ? extends V> valueFunction)
{
return Iterate.addToMap(iterable, keyFunction, valueFunction, UnifiedMap.newMap());
} | static <T, K, V> MutableMap<K, V> function( Iterable<T> iterable, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) { return Iterate.addToMap(iterable, keyFunction, valueFunction, UnifiedMap.newMap()); } | /**
* Iterate over the specified collection applying the specified Functions to each element to calculate
* a key and value, and return the results as a Map.
*/ | Iterate over the specified collection applying the specified Functions to each element to calculate a key and value, and return the results as a Map | toMap | {
"repo_name": "g-votte/eclipse-collections",
"path": "eclipse-collections/src/main/java/org/eclipse/collections/impl/utility/Iterate.java",
"license": "bsd-3-clause",
"size": 138506
} | [
"org.eclipse.collections.api.block.function.Function",
"org.eclipse.collections.api.map.MutableMap",
"org.eclipse.collections.impl.map.mutable.UnifiedMap"
] | import org.eclipse.collections.api.block.function.Function; import org.eclipse.collections.api.map.MutableMap; import org.eclipse.collections.impl.map.mutable.UnifiedMap; | import org.eclipse.collections.api.block.function.*; import org.eclipse.collections.api.map.*; import org.eclipse.collections.impl.map.mutable.*; | [
"org.eclipse.collections"
] | org.eclipse.collections; | 1,185,131 |
GraphCollection select(FilterFunction<GraphHead> predicateFunction); | GraphCollection select(FilterFunction<GraphHead> predicateFunction); | /**
* Filter containing graphs based on their associated graph head.
*
* @param predicateFunction predicate function for graph head
* @return collection with logical graphs that fulfil the predicate
*/ | Filter containing graphs based on their associated graph head | select | {
"repo_name": "Venom590/gradoop",
"path": "gradoop-flink/src/main/java/org/gradoop/flink/model/api/operators/GraphCollectionOperators.java",
"license": "gpl-3.0",
"size": 11332
} | [
"org.apache.flink.api.common.functions.FilterFunction",
"org.gradoop.common.model.impl.pojo.GraphHead",
"org.gradoop.flink.model.impl.GraphCollection"
] | import org.apache.flink.api.common.functions.FilterFunction; import org.gradoop.common.model.impl.pojo.GraphHead; import org.gradoop.flink.model.impl.GraphCollection; | import org.apache.flink.api.common.functions.*; import org.gradoop.common.model.impl.pojo.*; import org.gradoop.flink.model.impl.*; | [
"org.apache.flink",
"org.gradoop.common",
"org.gradoop.flink"
] | org.apache.flink; org.gradoop.common; org.gradoop.flink; | 670,714 |
public void setServices(final List<Service> services) {
this.services = services;
} | void function(final List<Service> services) { this.services = services; } | /**
* Set the list of the discovery services.
*
* @param services
* the discovery services
*/ | Set the list of the discovery services | setServices | {
"repo_name": "bbrinkus/neo4j-eureka-plugin",
"path": "src/main/java/com/brinkus/labs/neo4j/eureka/type/config/Configuration.java",
"license": "gpl-3.0",
"size": 1957
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,076,056 |
public String toConstantName(String text) {
// insert underscores to separate words of name, and convert invalid characters
StringBuffer buff = new StringBuffer(text.length());
boolean lastup = false;
boolean multup = false;
char lastchar = 0;
for (int index ... | String function(String text) { StringBuffer buff = new StringBuffer(text.length()); boolean lastup = false; boolean multup = false; char lastchar = 0; for (int index = 0; index < text.length(); index++) { char chr = text.charAt(index); if (index == 0 && !Character.isJavaIdentifierStart(chr)) { buff.append('_'); } if (C... | /**
* Convert text to constant name. The returned name is guaranteed not to match a Java keyword.
*
* @param text raw text to be converted
* @return constant name
*/ | Convert text to constant name. The returned name is guaranteed not to match a Java keyword | toConstantName | {
"repo_name": "vkorbut/jibx",
"path": "jibx/build/src/org/jibx/schema/codegen/extend/DefaultNameConverter.java",
"license": "bsd-3-clause",
"size": 20730
} | [
"org.jibx.schema.codegen.NameUtils"
] | import org.jibx.schema.codegen.NameUtils; | import org.jibx.schema.codegen.*; | [
"org.jibx.schema"
] | org.jibx.schema; | 1,859,152 |
//-----------------------------------------------------------------------
static String format(Token[] tokens, int years, int months, int days, int hours, int minutes, int seconds,
int milliseconds, boolean padWithZeros) {
StringBuffer buffer = new StringBuffer();
boolean lastOutput... | static String format(Token[] tokens, int years, int months, int days, int hours, int minutes, int seconds, int milliseconds, boolean padWithZeros) { StringBuffer buffer = new StringBuffer(); boolean lastOutputSeconds = false; int sz = tokens.length; for (int i = 0; i < sz; i++) { Token token = tokens[i]; Object value =... | /**
* <p>The internal method to do the formatting.</p>
*
* @param tokens the tokens
* @param years the number of years
* @param months the number of months
* @param days the number of days
* @param hours the number of hours
* @param minutes the number of minutes
* @pa... | The internal method to do the formatting | format | {
"repo_name": "rytina/dukecon_appsgenerator",
"path": "org.apache.commons.lang/source-bundle/org/apache/commons/lang/time/DurationFormatUtils.java",
"license": "epl-1.0",
"size": 25514
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 122,389 |
public Drawable getUserPictureDrawable(Context context){
return userPicture.getDrawable(Character.toUpperCase(getUserName().charAt(0)), context);
} | Drawable function(Context context){ return userPicture.getDrawable(Character.toUpperCase(getUserName().charAt(0)), context); } | /**
* Gets a drawable corresponding to user's picture
* @param context Activity/Service context
* @return a drawable of user picture
*/ | Gets a drawable corresponding to user's picture | getUserPictureDrawable | {
"repo_name": "aravindsagar/SmartLockScreen",
"path": "app/src/main/java/com/pvsagar/smartlockscreen/applogic_objects/User.java",
"license": "apache-2.0",
"size": 17332
} | [
"android.content.Context",
"android.graphics.drawable.Drawable"
] | import android.content.Context; import android.graphics.drawable.Drawable; | import android.content.*; import android.graphics.drawable.*; | [
"android.content",
"android.graphics"
] | android.content; android.graphics; | 974,886 |
private int getLawaNr(final CidsFeature subFeature) {
Object lawaNr = null;
int code = 0;
try {
lawaNr = metaObject.getBean().getProperty("lawa_nr.code");
} catch (NullPointerException e) {
log.error("Cannot retrieve field lawa_nr.code from lawa type object."... | int function(final CidsFeature subFeature) { Object lawaNr = null; int code = 0; try { lawaNr = metaObject.getBean().getProperty(STR); } catch (NullPointerException e) { log.error(STR, e); } if ((lawaNr != null) && (lawaNr instanceof Integer)) { code = (Integer)lawaNr; } else { log.error(STR); } return code; } | /**
* DOCUMENT ME!
*
* @param subFeature DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | getLawaNr | {
"repo_name": "cismet/cids-custom-wrrl-db-mv",
"path": "src/main/java/de/cismet/cids/custom/featurerenderer/wrrl_db_mv/LawaFeatureRenderer.java",
"license": "lgpl-3.0",
"size": 3520
} | [
"de.cismet.cismap.navigatorplugin.CidsFeature"
] | import de.cismet.cismap.navigatorplugin.CidsFeature; | import de.cismet.cismap.navigatorplugin.*; | [
"de.cismet.cismap"
] | de.cismet.cismap; | 2,499,342 |
EntityRef removeItem(EntityRef inventory, EntityRef instigator, EntityRef item, boolean destroyRemoved, int count); | EntityRef removeItem(EntityRef inventory, EntityRef instigator, EntityRef item, boolean destroyRemoved, int count); | /**
* Removes specified amount of the item from an inventory.
*
* @param inventory Inventory to remove item from.
* @param instigator Instigator of the action.
* @param item Item to remove from inventory.
* @param destroyRemoved If the removed item should be destroyed.
... | Removes specified amount of the item from an inventory | removeItem | {
"repo_name": "xposure/zSprite_Old",
"path": "Source/Framework/zSprite.Sandbox/Terasology/logic/inventory/InventoryManager.java",
"license": "gpl-3.0",
"size": 6945
} | [
"org.terasology.entitySystem.entity.EntityRef"
] | import org.terasology.entitySystem.entity.EntityRef; | import org.terasology.*; | [
"org.terasology"
] | org.terasology; | 1,502,636 |
@Deprecated // This will end up breaking the config if this is called. Possibly should just scrap
public static void addModReg(String modid, String configFolder) {
try {
File modfileOld = new File(configFolder);
File modfile = new File(modfileOld.getParent() + "/indigoutils.cfg");
FileWriter fw = new Fi... | @Deprecated static void function(String modid, String configFolder) { try { File modfileOld = new File(configFolder); File modfile = new File(modfileOld.getParent() + STR); FileWriter fw = new FileWriter(modfile); BufferedWriter bw = new BufferedWriter(fw); modidList.add(modid); int runtime = 0; while (runtime < modidL... | /**
* Generates modid's in the IndigoUtils config file.
* @param modid The modid of a mod
* @param configFolder The config folder
*/ | Generates modid's in the IndigoUtils config file | addModReg | {
"repo_name": "AshIndigo/Alloycraft",
"path": "src/main/java/com/ashindigo/utils/UtilsMod.java",
"license": "lgpl-2.1",
"size": 4516
} | [
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileWriter",
"java.io.IOException"
] | import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,209,463 |
public static RelNode createProject(
RelNode child,
List<? extends RexNode> exprs,
List<String> fieldNames,
boolean optimize,
RelFactories.ProjectFactory projectFactory) {
final RelOptCluster cluster = child.getCluster();
final List<String> fieldNames2 =
fieldNames == nul... | static RelNode function( RelNode child, List<? extends RexNode> exprs, List<String> fieldNames, boolean optimize, RelFactories.ProjectFactory projectFactory) { final RelOptCluster cluster = child.getCluster(); final List<String> fieldNames2 = fieldNames == null ? null : SqlValidatorUtil.uniquify(fieldNames, SqlValidato... | /**
* Creates a relational expression which projects an array of expressions,
* and optionally optimizes.
*
* <p>The result may not be a
* {@link org.apache.calcite.rel.logical.LogicalProject}. If the
* projection is trivial, <code>child</code> is returned directly; and future
* versions may return... | Creates a relational expression which projects an array of expressions, and optionally optimizes. The result may not be a <code>org.apache.calcite.rel.logical.LogicalProject</code>. If the projection is trivial, <code>child</code> is returned directly; and future versions may return other formulations of expressions, s... | createProject | {
"repo_name": "joshelser/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java",
"license": "apache-2.0",
"size": 122744
} | [
"java.util.List",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.core.Project",
"org.apache.calcite.rel.core.RelFactories",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.rex.RexUtil",
"org.apache.calcite.sql.validate.SqlValidatorUtil"
] | import java.util.List; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.core.Project; import org.apache.calcite.rel.core.RelFactories; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rex.RexNode; import org.apache.calcite.rex.RexUtil; import org.apache.calcite.sql.validate.... | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.core.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.sql.validate.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 171,034 |
public EventHandlerGroup<T> handleEventsWith(final EventProcessor... processors)
{
for (EventProcessor processor : processors)
{
consumerRepository.add(processor);
}
return new EventHandlerGroup<T>(this, consumerRepository, Util.getSequencesFor(processors));
} | EventHandlerGroup<T> function(final EventProcessor... processors) { for (EventProcessor processor : processors) { consumerRepository.add(processor); } return new EventHandlerGroup<T>(this, consumerRepository, Util.getSequencesFor(processors)); } | /**
* <p>Set up custom event processors to handle events from the ring buffer. The Disruptor will
* automatically start this processors when {@link #start()} is called.</p>
*
* <p>This method can be used as the start of a chain. For example if the processor <code>A</code> must
* process events ... | Set up custom event processors to handle events from the ring buffer. The Disruptor will automatically start this processors when <code>#start()</code> is called. This method can be used as the start of a chain. For example if the processor <code>A</code> must process events before handler <code>B</code>: <code><code>d... | handleEventsWith | {
"repo_name": "simmeryson/MyDisruptor",
"path": "src/main/java/com/lmax/disruptor/dsl/Disruptor.java",
"license": "apache-2.0",
"size": 18749
} | [
"com.lmax.disruptor.EventProcessor",
"com.lmax.disruptor.util.Util"
] | import com.lmax.disruptor.EventProcessor; import com.lmax.disruptor.util.Util; | import com.lmax.disruptor.*; import com.lmax.disruptor.util.*; | [
"com.lmax.disruptor"
] | com.lmax.disruptor; | 1,054,304 |
public static Properties getProperties(Context context, AttributeSet attrs,
int defStyleAttr, int defStyleRes) {
Properties properties = new Properties();
properties.orientation = VERTICAL;
properties.spanCount = 1;
properties.reverseLayout = false... | static Properties function(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { Properties properties = new Properties(); properties.orientation = VERTICAL; properties.spanCount = 1; properties.reverseLayout = false; properties.stackFromEnd = false; return properties; } | /**
* Parse the xml attributes to get the most common properties used by layout managers.
*
* @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_android_orientation
* @attr ref android.support.v7.recyclerview.R.styleable#RecyclerView_spanCount
* @attr ref and... | Parse the xml attributes to get the most common properties used by layout managers | getProperties | {
"repo_name": "xlee00/Telegram",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 482269
} | [
"android.content.Context",
"android.util.AttributeSet"
] | import android.content.Context; import android.util.AttributeSet; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 2,718,557 |
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
serviceTypesLabel = new javax.swing.JLabel();
servicesTypesComboBox = new javax.swing.JComboBox();
cryptoImplsScrollPane = new javax.swing.JScrollPane();
... | void function() { serviceTypesLabel = new javax.swing.JLabel(); servicesTypesComboBox = new javax.swing.JComboBox(); cryptoImplsScrollPane = new javax.swing.JScrollPane(); cryptoImplsTextArea = new javax.swing.JTextArea(); jLabel1 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); serviceTypesLabel... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "bernhardhuber/netbeansplugins",
"path": "nb-crypto-services/src/org/huberb/cryptoservices/CryptographicServicesTopComponent.java",
"license": "apache-2.0",
"size": 10247
} | [
"javax.swing.JComboBox",
"org.openide.util.NbBundle"
] | import javax.swing.JComboBox; import org.openide.util.NbBundle; | import javax.swing.*; import org.openide.util.*; | [
"javax.swing",
"org.openide.util"
] | javax.swing; org.openide.util; | 683,446 |
private void updateColorValues() {
DimensionConfigData dimensionConfigData = engine
.getPlotInstance()
.getPlotData()
.getDimensionConfigData(
engine.getPlotInstance().getMasterPlotConfiguration().getDefaultDimensionConfigs()
.get(PlotDimension.COLOR));
if (dimensionConfigData !=... | void function() { DimensionConfigData dimensionConfigData = engine .getPlotInstance() .getPlotData() .getDimensionConfigData( engine.getPlotInstance().getMasterPlotConfiguration().getDefaultDimensionConfigs() .get(PlotDimension.COLOR)); if (dimensionConfigData != null && dimensionConfigData.getColorProvider() instanceo... | /**
* Updates the min/max color value fields with the current values.
*/ | Updates the min/max color value fields with the current values | updateColorValues | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/new_plotter/gui/dialog/ManageZoomDialog.java",
"license": "agpl-3.0",
"size": 32983
} | [
"com.rapidminer.gui.new_plotter.configuration.DimensionConfig",
"com.rapidminer.gui.new_plotter.data.DimensionConfigData",
"com.rapidminer.gui.new_plotter.utility.ContinuousColorProvider"
] | import com.rapidminer.gui.new_plotter.configuration.DimensionConfig; import com.rapidminer.gui.new_plotter.data.DimensionConfigData; import com.rapidminer.gui.new_plotter.utility.ContinuousColorProvider; | import com.rapidminer.gui.new_plotter.configuration.*; import com.rapidminer.gui.new_plotter.data.*; import com.rapidminer.gui.new_plotter.utility.*; | [
"com.rapidminer.gui"
] | com.rapidminer.gui; | 919,649 |
JPanel panel;
JLabel label;
super.initGUI();
setLayout(new BorderLayout());
// full options
panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
add(panel, BorderLayout.NORTH); | JPanel panel; JLabel label; super.initGUI(); setLayout(new BorderLayout()); panel = new JPanel(new FlowLayout(FlowLayout.LEFT)); add(panel, BorderLayout.NORTH); | /**
* For initializing the GUI.
*/ | For initializing the GUI | initGUI | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/gui/tools/OptionTree.java",
"license": "gpl-3.0",
"size": 7894
} | [
"java.awt.BorderLayout",
"java.awt.FlowLayout",
"javax.swing.JLabel",
"javax.swing.JPanel"
] | import java.awt.BorderLayout; import java.awt.FlowLayout; import javax.swing.JLabel; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 364,286 |
//-------------//
// fileChooser //
//-------------//
public static File fileChooser (boolean save,
Component parent,
File startFile,
OmrFileFilter filter,
... | static File function (boolean save, Component parent, File startFile, OmrFileFilter filter, String title) { File file = null; if (WellKnowns.MAC_OS_X) { if ((parent == null) && (org.audiveris.omr.OMR.gui != null)) { parent = org.audiveris.omr.OMR.gui.getFrame(); } Component parentFrame = parent; if (parentFrame != null... | /**
* A replacement for standard JFileChooser, to allow better look and feel on the Mac
* platform.
*
* @param save true for a SAVE dialog, false for a LOAD dialog
* @param parent the parent component for the dialog, if any
* @param startFile default file, or just default dir... | A replacement for standard JFileChooser, to allow better look and feel on the Mac platform | fileChooser | {
"repo_name": "Audiveris/audiveris",
"path": "src/main/org/audiveris/omr/ui/util/UIUtil.java",
"license": "agpl-3.0",
"size": 27562
} | [
"java.awt.Component",
"java.awt.FileDialog",
"java.awt.Frame",
"java.io.File",
"javax.swing.JFileChooser",
"org.audiveris.omr.WellKnowns"
] | import java.awt.Component; import java.awt.FileDialog; import java.awt.Frame; import java.io.File; import javax.swing.JFileChooser; import org.audiveris.omr.WellKnowns; | import java.awt.*; import java.io.*; import javax.swing.*; import org.audiveris.omr.*; | [
"java.awt",
"java.io",
"javax.swing",
"org.audiveris.omr"
] | java.awt; java.io; javax.swing; org.audiveris.omr; | 1,269,276 |
public void ensureCameraVisible(Camera camera) {
if (camerasCombo.getSelectedItem().equals(SHOW_ALL_ITEM)) {
return;
}
setSelectedCamera(camera);
} | void function(Camera camera) { if (camerasCombo.getSelectedItem().equals(SHOW_ALL_ITEM)) { return; } setSelectedCamera(camera); } | /**
* Make sure the given Camera is visible in the UI. If All Cameras is selected we do nothing,
* otherwise we select the specified Camera.
*
* @param camera
* @return
*/ | Make sure the given Camera is visible in the UI. If All Cameras is selected we do nothing, otherwise we select the specified Camera | ensureCameraVisible | {
"repo_name": "dzach/openpnp",
"path": "src/main/java/org/openpnp/gui/components/CameraPanel.java",
"license": "gpl-3.0",
"size": 8605
} | [
"org.openpnp.spi.Camera"
] | import org.openpnp.spi.Camera; | import org.openpnp.spi.*; | [
"org.openpnp.spi"
] | org.openpnp.spi; | 952,606 |
public void testModifiesSql() throws SQLException {
Statement s = createStatement();
s.execute("create trigger after_stmt_trig_modifies_sql_insert_op AFTER insert on t2 for each STATEMENT call proc_modifies_sql_insert_op(1, 'one')");
//--- insert 2 rows
s.execute("insert into t2 valu... | void function() throws SQLException { Statement s = createStatement(); s.execute(STR); s.execute(STR); ResultSet rs = s.executeQuery(STR); JDBC.assertFullResultSet(rs, new String[][]{{"1","one"}}); rs = s.executeQuery(STR); JDBC.assertFullResultSet(rs, new String[][] {{"1","2"},{"2","4"}}); s.execute(STR); s.execute(ST... | /**
* Test triggers that MODIFY SQL DATA
*
* @throws SQLException
*/ | Test triggers that MODIFY SQL DATA | testModifiesSql | {
"repo_name": "scnakandala/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/ProcedureInTriggerTest.java",
"license": "apache-2.0",
"size": 39967
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"org.apache.derbyTesting.junit.JDBC"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC; | import java.sql.*; import org.apache.*; | [
"java.sql",
"org.apache"
] | java.sql; org.apache; | 622,331 |
public static boolean isBackgroundNetworkAllowed(Context context) {
SharedPreferences prefs = context.getSharedPreferences(PrefConstants.PREFERENCES, 0);
String mode = prefs.getString(PrefConstants.NETWORK_SELECT, PrefConstants.NETWORK_SELECT_NOMO);
ConnectivityManager connMgr = (Connectivi... | static boolean function(Context context) { SharedPreferences prefs = context.getSharedPreferences(PrefConstants.PREFERENCES, 0); String mode = prefs.getString(PrefConstants.NETWORK_SELECT, PrefConstants.NETWORK_SELECT_NOMO); ConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVI... | /**
* Compares the user's setting for when background data use is allowed against the
* current network status and sees if it is okay to sync.
*/ | Compares the user's setting for when background data use is allowed against the current network status and sees if it is okay to sync | isBackgroundNetworkAllowed | {
"repo_name": "lucidbard/NewsBlur",
"path": "clients/android/NewsBlur/src/com/newsblur/util/PrefsUtils.java",
"license": "mit",
"size": 24308
} | [
"android.content.Context",
"android.content.SharedPreferences",
"android.net.ConnectivityManager",
"android.net.NetworkInfo"
] | import android.content.Context; import android.content.SharedPreferences; import android.net.ConnectivityManager; import android.net.NetworkInfo; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 548,773 |
void applyToParams(
List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams); | void applyToParams( List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams); | /**
* Apply authentication settings to header and query params.
*
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
*/ | Apply authentication settings to header and query params | applyToParams | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/auth/Authentication.java",
"license": "apache-2.0",
"size": 1081
} | [
"io.kubernetes.client.openapi.Pair",
"java.util.List",
"java.util.Map"
] | import io.kubernetes.client.openapi.Pair; import java.util.List; import java.util.Map; | import io.kubernetes.client.openapi.*; import java.util.*; | [
"io.kubernetes.client",
"java.util"
] | io.kubernetes.client; java.util; | 1,541,196 |
public DefaultRepositoryListAdapter registerNoSeparator(
Repository repository) {
noSeparators.add(repository.getId());
return this;
} | DefaultRepositoryListAdapter function( Repository repository) { noSeparators.add(repository.getId()); return this; } | /**
* Register repository to have no bottom separator
*
* @param repository
* @return this adapter
*/ | Register repository to have no bottom separator | registerNoSeparator | {
"repo_name": "esironal/PocketHub",
"path": "app/src/main/java/com/github/pockethub/ui/repo/DefaultRepositoryListAdapter.java",
"license": "apache-2.0",
"size": 4274
} | [
"org.eclipse.egit.github.core.Repository"
] | import org.eclipse.egit.github.core.Repository; | import org.eclipse.egit.github.core.*; | [
"org.eclipse.egit"
] | org.eclipse.egit; | 2,333,452 |
public Draggable draggable(DraggableOptions options, HasHandlers eventBus) {
this.eventBus = eventBus;
initMouseHandler(options);
for (Element e : elements()) {
if (options.getHelperType() == HelperType.ORIGINAL
&& !positionIsFixedAbsoluteOrRelative(e.getStyle().getPosition())) {
... | Draggable function(DraggableOptions options, HasHandlers eventBus) { this.eventBus = eventBus; initMouseHandler(options); for (Element e : elements()) { if (options.getHelperType() == HelperType.ORIGINAL && !positionIsFixedAbsoluteOrRelative(e.getStyle().getPosition())) { e.getStyle().setPosition(Position.RELATIVE); } ... | /**
* Make the selected elements draggable by using the <code>options</code>. All
* drag events will be fired on the <code>eventBus</code>
*
* @param options options to use during the drag operation
* @param eventBus The eventBus to use to fire events.
* @return
*/ | Make the selected elements draggable by using the <code>options</code>. All drag events will be fired on the <code>eventBus</code> | draggable | {
"repo_name": "ArcBees/gwtquery-draggable-plugin",
"path": "plugin/src/main/java/gwtquery/plugins/draggable/client/Draggable.java",
"license": "mit",
"size": 21736
} | [
"com.google.gwt.dom.client.Element",
"com.google.gwt.dom.client.Style",
"com.google.gwt.event.shared.HasHandlers"
] | import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.Style; import com.google.gwt.event.shared.HasHandlers; | import com.google.gwt.dom.client.*; import com.google.gwt.event.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,071,136 |
@Override
protected EnumSet<JavaFileObject.Kind> getPackageFileKinds() {
return docenv.docClasses ? noSource : all;
} | EnumSet<JavaFileObject.Kind> function() { return docenv.docClasses ? noSource : all; } | /**
* Override getPackageFileKinds to include search for package.html
*/ | Override getPackageFileKinds to include search for package.html | getPackageFileKinds | {
"repo_name": "emil-wcislo/sbql4j8",
"path": "sbql4j8/src/main/openjdk/sbql4j8/com/sun/tools/javadoc/JavadocClassReader.java",
"license": "apache-2.0",
"size": 3545
} | [
"java.util.EnumSet",
"javax.tools.JavaFileObject"
] | import java.util.EnumSet; import javax.tools.JavaFileObject; | import java.util.*; import javax.tools.*; | [
"java.util",
"javax.tools"
] | java.util; javax.tools; | 2,738,799 |
static public String buildUrlContext(VelocityPortlet portlet, Context context, RunData rundata, SessionState state)
{
context.put("thelp", rb);
// the menu
buildMenu(portlet, context, rundata, state, false, false);
// for toolbar
context.put("enabled", Boolean.valueOf(false));
context.put("anyattachment... | static String function(VelocityPortlet portlet, Context context, RunData rundata, SessionState state) { context.put("thelp", rb); buildMenu(portlet, context, rundata, state, false, false); context.put(STR, Boolean.valueOf(false)); context.put(STR, Boolean.valueOf(false)); return TEMPLATE_URL; } | /**
* build the context for the url display
*
* @return The name of the template to use.
*/ | build the context for the url display | buildUrlContext | {
"repo_name": "payten/nyu-sakai-10.4",
"path": "content/content-tool/tool/src/java/org/sakaiproject/content/tool/AttachmentAction.java",
"license": "apache-2.0",
"size": 28110
} | [
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.cheftool.VelocityPortlet",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 38,872 |
public ProcessInstance[] getProcessInstances(String peasId, User user,
String role) throws WorkflowException; | ProcessInstance[] function(String peasId, User user, String role) throws WorkflowException; | /**
* Get the list of process instances for a given peas Id, user and role.
* @param peasId id of processManager instance
* @param user user for who the process instance list is
* @param role role name of the user for who the process instance list is (useful when user has
* different roles)
* @return ... | Get the list of process instances for a given peas Id, user and role | getProcessInstances | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-services/workflow/src/main/java/org/silverpeas/core/workflow/api/ProcessInstanceManager.java",
"license": "agpl-3.0",
"size": 3811
} | [
"org.silverpeas.core.workflow.api.instance.ProcessInstance",
"org.silverpeas.core.workflow.api.user.User"
] | import org.silverpeas.core.workflow.api.instance.ProcessInstance; import org.silverpeas.core.workflow.api.user.User; | import org.silverpeas.core.workflow.api.instance.*; import org.silverpeas.core.workflow.api.user.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 1,401,009 |
@Test
public void getPropertiesTest() throws ApiException {
String did = null;
Boolean includeTimestamp = null;
MetadataEnvelope response = api.getProperties(did, includeTimestamp);
// TODO: test validations
} | void function() throws ApiException { String did = null; Boolean includeTimestamp = null; MetadataEnvelope response = api.getProperties(did, includeTimestamp); } | /**
* Read a device's properties.
*
* Read a device's properties.
*
* @throws ApiException
* if the Api call fails
*/ | Read a device's properties. Read a device's properties | getPropertiesTest | {
"repo_name": "artikcloud/artikcloud-java",
"path": "src/test/java/cloud/artik/api/DevicesManagementApiTest.java",
"license": "apache-2.0",
"size": 9166
} | [
"cloud.artik.client.ApiException",
"cloud.artik.model.MetadataEnvelope"
] | import cloud.artik.client.ApiException; import cloud.artik.model.MetadataEnvelope; | import cloud.artik.client.*; import cloud.artik.model.*; | [
"cloud.artik.client",
"cloud.artik.model"
] | cloud.artik.client; cloud.artik.model; | 1,677,774 |
private Result pTypeArguments$$Star1(final int yyStart) throws IOException {
JavaFiveParserColumn yyColumn = (JavaFiveParserColumn)column(yyStart);
if (null == yyColumn.chunk4) yyColumn.chunk4 = new Chunk4();
if (null == yyColumn.chunk4.fTypeArguments$$Star1)
yyColumn.chunk4.fTypeArguments$$Star1 =... | private Result pTypeArguments$$Star1(final int yyStart) throws IOException { JavaFiveParserColumn yyColumn = (JavaFiveParserColumn)column(yyStart); if (null == yyColumn.chunk4) yyColumn.chunk4 = new Chunk4(); if (null == yyColumn.chunk4.fTypeArguments$$Star1) yyColumn.chunk4.fTypeArguments$$Star1 = pTypeArguments$$Star... | /**
* Parse synthetic nonterminal xtc.lang.JavaFive.TypeArguments$$Star1.
*
* @param yyStart The index.
* @return The result.
* @throws IOException Signals an I/O error.
*/ | Parse synthetic nonterminal xtc.lang.JavaFive.TypeArguments$$Star1 | pTypeArguments$$Star1 | {
"repo_name": "wandoulabs/xtc-rats",
"path": "xtc-core/src/main/java/xtc/lang/JavaFiveParser.java",
"license": "lgpl-2.1",
"size": 313913
} | [
"java.io.IOException",
"xtc.parser.Result"
] | import java.io.IOException; import xtc.parser.Result; | import java.io.*; import xtc.parser.*; | [
"java.io",
"xtc.parser"
] | java.io; xtc.parser; | 2,746,320 |
EClass getTraceDuring_(); | EClass getTraceDuring_(); | /**
* Returns the meta object for class '{@link cruise.umple.umple.TraceDuring_ <em>Trace During </em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Trace During </em>'.
* @see cruise.umple.umple.TraceDuring_
* @generated
*/ | Returns the meta object for class '<code>cruise.umple.umple.TraceDuring_ Trace During </code>'. | getTraceDuring_ | {
"repo_name": "ahmedvc/umple",
"path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java",
"license": "mit",
"size": 485842
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 392,404 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.