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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
void sendIndications(LCSArrayImpl lcs_array, Integer[] ind, User o); | void sendIndications(LCSArrayImpl lcs_array, Integer[] ind, User o); | /** Send new indications to an LCS array.
* @param lcs_array LCS array.
* @param ind New lane use indications.
* @param o User who deployed the indications. */ | Send new indications to an LCS array | sendIndications | {
"repo_name": "CA-IRIS/mn-iris",
"path": "src/us/mn/state/dot/tms/server/comm/LCSPoller.java",
"license": "gpl-2.0",
"size": 1270
} | [
"us.mn.state.dot.sonar.User",
"us.mn.state.dot.tms.server.LCSArrayImpl"
] | import us.mn.state.dot.sonar.User; import us.mn.state.dot.tms.server.LCSArrayImpl; | import us.mn.state.dot.sonar.*; import us.mn.state.dot.tms.server.*; | [
"us.mn.state"
] | us.mn.state; | 1,656,524 |
@Override
public Cell maybeCloneWithAllocator(Cell cell, boolean forceCloneOfBigCell) {
throw new IllegalStateException("Not supported by CompositeImmutableScanner");
} | Cell function(Cell cell, boolean forceCloneOfBigCell) { throw new IllegalStateException(STR); } | /**
* If the segment has a memory allocator the cell is being cloned to this space, and returned;
* otherwise the given cell is returned
* @return either the given cell or its clone
*/ | If the segment has a memory allocator the cell is being cloned to this space, and returned; otherwise the given cell is returned | maybeCloneWithAllocator | {
"repo_name": "Eshcar/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompositeImmutableSegment.java",
"license": "apache-2.0",
"size": 8360
} | [
"org.apache.hadoop.hbase.Cell"
] | import org.apache.hadoop.hbase.Cell; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,551,642 |
public int canDisplayUpTo(String str) {
StringCharacterIterator sci = new StringCharacterIterator(str);
return canDisplayUpTo(sci, 0, str.length());
} | int function(String str) { StringCharacterIterator sci = new StringCharacterIterator(str); return canDisplayUpTo(sci, 0, str.length()); } | /**
* Checks whether or not this font can display the characters in the
* specified String.
*
* @param str The string containing the characters to check.
*
* @return The index of the first character it can't display or -1 if
* it can display the whole string.
*/ | Checks whether or not this font can display the characters in the specified String | canDisplayUpTo | {
"repo_name": "apache/batik",
"path": "batik-bridge/src/main/java/org/apache/batik/bridge/SVGGVTFont.java",
"license": "apache-2.0",
"size": 32261
} | [
"java.text.StringCharacterIterator"
] | import java.text.StringCharacterIterator; | import java.text.*; | [
"java.text"
] | java.text; | 2,786,599 |
private RESTClient getRestClient() {
return restClient;
} | RESTClient function() { return restClient; } | /**
* Returns the RESTClient object
* @return
*/ | Returns the RESTClient object | getRestClient | {
"repo_name": "dell-oss/Doradus",
"path": "doradus-client/src/main/java/com/dell/doradus/dory/DoradusClient.java",
"license": "apache-2.0",
"size": 9470
} | [
"com.dell.doradus.client.RESTClient"
] | import com.dell.doradus.client.RESTClient; | import com.dell.doradus.client.*; | [
"com.dell.doradus"
] | com.dell.doradus; | 232,880 |
public String getLocalIdentifier(Object nativeItem) {
// throws IllegalArgumentException {
// try {
HashMap table = (HashMap)nativeItem;
Object o = table.get(identifierLabel);
return o.toString();
// } catch (SQLException e) {
// e.printStackTrace();
// throw new IllegalArgumentException... | String function(Object nativeItem) { HashMap table = (HashMap)nativeItem; Object o = table.get(identifierLabel); return o.toString(); } | /**
* Extract the local identifier from the native item
*
* @param nativeItem native Item object
* @return local identifier
*/ | Extract the local identifier from the native item | getLocalIdentifier | {
"repo_name": "openpreserve/oaicat",
"path": "src/main/java/ORG/oclc/oai/server/catalog/JDBCRecordFactory.java",
"license": "apache-2.0",
"size": 6658
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,969,091 |
@Test()
public void testGetKeystorePassword()
throws Exception
{
// Test with a directly provided password that is too short.
File ksFile = createTempFile();
assertTrue(ksFile.exists());
assertTrue(ksFile.delete());
assertFalse(ksFile.exists());
manageCertificates(ResultCode.PARA... | @Test() void function() throws Exception { File ksFile = createTempFile(); assertTrue(ksFile.exists()); assertTrue(ksFile.delete()); assertFalse(ksFile.exists()); manageCertificates(ResultCode.PARAM_ERROR, null, STR, STR, ksFile.getAbsolutePath(), STR, "short", STR, "JKS", STR, serverCertificateAlias, STR, serverCertif... | /**
* Provides test coverage for the {@code getKeystorePassword} method.
*
* @throws Exception If an unexpected problem occurs.
*/ | Provides test coverage for the getKeystorePassword method | testGetKeystorePassword | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/util/ssl/cert/ManageCertificatesTestCase.java",
"license": "gpl-2.0",
"size": 311521
} | [
"com.unboundid.ldap.sdk.ResultCode",
"com.unboundid.util.PasswordReader",
"com.unboundid.util.StaticUtils",
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.File",
"java.io.InputStreamReader",
"org.testng.annotations.Test"
] | import com.unboundid.ldap.sdk.ResultCode; import com.unboundid.util.PasswordReader; import com.unboundid.util.StaticUtils; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.File; import java.io.InputStreamReader; import org.testng.annotations.Test; | import com.unboundid.ldap.sdk.*; import com.unboundid.util.*; import java.io.*; import org.testng.annotations.*; | [
"com.unboundid.ldap",
"com.unboundid.util",
"java.io",
"org.testng.annotations"
] | com.unboundid.ldap; com.unboundid.util; java.io; org.testng.annotations; | 351,080 |
void open(Map<String, Object> conf, TopologyContext context, SpoutOutputCollector collector); | void open(Map<String, Object> conf, TopologyContext context, SpoutOutputCollector collector); | /**
* Called when a task for this component is initialized within a worker on the cluster.
* It provides the spout with the environment in which the spout executes.
* <p>
* <p>This includes the:</p>
*
* @param conf The Storm configuration for this spout. This is the configuration provided to the topol... | Called when a task for this component is initialized within a worker on the cluster. It provides the spout with the environment in which the spout executes. This includes the: | open | {
"repo_name": "twitter/heron",
"path": "storm-compatibility/v2.2.0/src/java/org/apache/storm/spout/ISpout.java",
"license": "apache-2.0",
"size": 5234
} | [
"java.util.Map",
"org.apache.storm.task.TopologyContext"
] | import java.util.Map; import org.apache.storm.task.TopologyContext; | import java.util.*; import org.apache.storm.task.*; | [
"java.util",
"org.apache.storm"
] | java.util; org.apache.storm; | 1,856,610 |
public static Value makeStrings(Collection<String> strings) {
Value r = new Value(join(strings.stream().map(Value::makeStr).collect(Collectors.toSet())));
if (!Options.get().isNoStringSets() && r.isMaybeFuzzyStr())
r.included_strings = newSet(strings);
return canonicalize(r);
... | static Value function(Collection<String> strings) { Value r = new Value(join(strings.stream().map(Value::makeStr).collect(Collectors.toSet()))); if (!Options.get().isNoStringSets() && r.isMaybeFuzzyStr()) r.included_strings = newSet(strings); return canonicalize(r); } | /**
* Constructs a new value representing the given strings.
*/ | Constructs a new value representing the given strings | makeStrings | {
"repo_name": "cs-au-dk/TAJS",
"path": "src/dk/brics/tajs/lattice/Value.java",
"license": "apache-2.0",
"size": 163702
} | [
"dk.brics.tajs.options.Options",
"dk.brics.tajs.util.Collections",
"dk.brics.tajs.util.Collectors",
"java.util.Collection"
] | import dk.brics.tajs.options.Options; import dk.brics.tajs.util.Collections; import dk.brics.tajs.util.Collectors; import java.util.Collection; | import dk.brics.tajs.options.*; import dk.brics.tajs.util.*; import java.util.*; | [
"dk.brics.tajs",
"java.util"
] | dk.brics.tajs; java.util; | 1,466,194 |
public void testGetPossibleStatusTransition6() {
basicStudy
.setCoordinatingCenterStudyStatus(CoordinatingCenterStudyStatus.READY_TO_OPEN);
basicStudy.setCompanionIndicator(true);
basicStudy.setCompanionIndicator(true);
List<CoordinatingCenterStudyStatus> list = basicStudy
.getPossibleStatusTra... | void function() { basicStudy .setCoordinatingCenterStudyStatus(CoordinatingCenterStudyStatus.READY_TO_OPEN); basicStudy.setCompanionIndicator(true); basicStudy.setCompanionIndicator(true); List<CoordinatingCenterStudyStatus> list = basicStudy .getPossibleStatusTransitions(); assertEquals(STR, 1, list.size()); assertCon... | /**
* test get possible status transition
*/ | test get possible status transition | testGetPossibleStatusTransition6 | {
"repo_name": "NCIP/c3pr",
"path": "codebase/projects/core/test/src/java/edu/duke/cabig/c3pr/domain/StudyTestCase.java",
"license": "bsd-3-clause",
"size": 75546
} | [
"edu.duke.cabig.c3pr.constants.CoordinatingCenterStudyStatus",
"java.util.List"
] | import edu.duke.cabig.c3pr.constants.CoordinatingCenterStudyStatus; import java.util.List; | import edu.duke.cabig.c3pr.constants.*; import java.util.*; | [
"edu.duke.cabig",
"java.util"
] | edu.duke.cabig; java.util; | 36,097 |
EList<JvmType> getAllProcessors(); | EList<JvmType> getAllProcessors(); | /**
* Returns the value of the '<em><b>All Processors</b></em>' reference list.
* The list contents are of type {@link org.eclipse.xtext.common.types.JvmType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>All Processors</em>' reference list isn't clear,
* there really should be more of a des... | Returns the value of the 'All Processors' reference list. The list contents are of type <code>org.eclipse.xtext.common.types.JvmType</code>. If the meaning of the 'All Processors' reference list isn't clear, there really should be more of a description here... | getAllProcessors | {
"repo_name": "rju/geco-composition-language",
"path": "de.cau.cs.se.geco.architecture/model-gen/de/cau/cs/se/geco/architecture/model/boxing/BoxingModel.java",
"license": "apache-2.0",
"size": 3879
} | [
"org.eclipse.emf.common.util.EList",
"org.eclipse.xtext.common.types.JvmType"
] | import org.eclipse.emf.common.util.EList; import org.eclipse.xtext.common.types.JvmType; | import org.eclipse.emf.common.util.*; import org.eclipse.xtext.common.types.*; | [
"org.eclipse.emf",
"org.eclipse.xtext"
] | org.eclipse.emf; org.eclipse.xtext; | 2,228,805 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String registryName, Context context) {
return beginDeleteAsync(resourceGroupName, registryName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String registryName, Context context) { return beginDeleteAsync(resourceGroupName, registryName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Deletes a container registry.
*
* @param resourceGroupName The name of the resource group to which the container registry belongs.
* @param registryName The name of the container registry.
* @param context The context to associate with this operation.
* @throws IllegalArgumentExcepti... | Deletes a container registry | deleteAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/implementation/RegistriesClientImpl.java",
"license": "mit",
"size": 175049
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,624,487 |
@Override
public void setEnabled(boolean enabled) {
for(int i=0; i<this.getChildCount(); i++) {
View v = (View) this.getChildAt(i);
if (v instanceof ViewGroup ) {
for(int j=0; j< ((ViewGroup)v).getChildCount(); j++) {
View subView = ((ViewGroup)v).getChildAt(j);
subView.setEnabled(enabled);
... | void function(boolean enabled) { for(int i=0; i<this.getChildCount(); i++) { View v = (View) this.getChildAt(i); if (v instanceof ViewGroup ) { for(int j=0; j< ((ViewGroup)v).getChildCount(); j++) { View subView = ((ViewGroup)v).getChildAt(j); subView.setEnabled(enabled); } } else { v.setEnabled(enabled); } } } | /**
* Enables or disable all child of the Layout.
* @param enabled If true, enable all, otherwise disable all.
*/ | Enables or disable all child of the Layout | setEnabled | {
"repo_name": "alexdor1/osmtracker-android",
"path": "src/me/guillaumin/android/osmtracker/layout/DisablableTableLayout.java",
"license": "gpl-3.0",
"size": 1527
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 1,762,046 |
@Nullable
public ColorStateList getProgressBackgroundTintList() {
if (UiConfig.MATERIALIZED) {
return super.getBackgroundTintList();
}
return mTintInfo != null ? mTintInfo.backgroundTintList : null;
}
/**
* Specifies the blending mode used to apply the tint specified by {@link #setProgressBackgroundTi... | ColorStateList function() { if (UiConfig.MATERIALIZED) { return super.getBackgroundTintList(); } return mTintInfo != null ? mTintInfo.backgroundTintList : null; } /** * Specifies the blending mode used to apply the tint specified by {@link #setProgressBackgroundTintList(android.content.res.ColorStateList)}} | /**
* Returns the tint applied to the background graphics of the progress drawable, if specified.
*
* @return The background graphics tint.
* @see #setProgressBackgroundTintList(android.content.res.ColorStateList)
*/ | Returns the tint applied to the background graphics of the progress drawable, if specified | getProgressBackgroundTintList | {
"repo_name": "android-libraries/android_ui",
"path": "library/src/widget/common/progress/java/com/albedinsky/android/ui/widget/BaseProgressBar.java",
"license": "apache-2.0",
"size": 53206
} | [
"android.content.res.ColorStateList",
"com.albedinsky.android.ui.UiConfig"
] | import android.content.res.ColorStateList; import com.albedinsky.android.ui.UiConfig; | import android.content.res.*; import com.albedinsky.android.ui.*; | [
"android.content",
"com.albedinsky.android"
] | android.content; com.albedinsky.android; | 2,423,845 |
RichUser getRichUserWithAttributes(PerunSession sess, User user) throws PrivilegeException, UserNotExistsException; | RichUser getRichUserWithAttributes(PerunSession sess, User user) throws PrivilegeException, UserNotExistsException; | /**
* Get User to RichUser with attributes.
* @param sess
* @param user
* @return RichUser
* @throws InternalErrorException
* @throws PrivilegeException
* @throws UserNotExistsException
*/ | Get User to RichUser with attributes | getRichUserWithAttributes | {
"repo_name": "CESNET/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 59111
} | [
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException"
] | import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,982,057 |
public static ReportFormatType getByCode(int code) {
return getByClassAndCode(ReportFormatType.class, code);
} | static ReportFormatType function(int code) { return getByClassAndCode(ReportFormatType.class, code); } | /**
* Gets the by code.
*
* @param code the code
* @return the by code
*/ | Gets the by code | getByCode | {
"repo_name": "NCIP/caaers",
"path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/ReportFormatType.java",
"license": "bsd-3-clause",
"size": 2959
} | [
"gov.nih.nci.cabig.ctms.domain.CodedEnumHelper"
] | import gov.nih.nci.cabig.ctms.domain.CodedEnumHelper; | import gov.nih.nci.cabig.ctms.domain.*; | [
"gov.nih.nci"
] | gov.nih.nci; | 2,507,633 |
public static java.util.List extractSurgicalAuditPreOpChecksList(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.SurgicalAuditPreOpChecksVoCollection voCollection)
{
return extractSurgicalAuditPreOpChecksList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinical.vo.SurgicalAuditPreOpChecksVoCollection voCollection) { return extractSurgicalAuditPreOpChecksList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.clinical.domain.objects.SurgicalAuditPreOpChecks list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.clinical.domain.objects.SurgicalAuditPreOpChecks list from the value object collection | extractSurgicalAuditPreOpChecksList | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/clinical/vo/domain/SurgicalAuditPreOpChecksVoAssembler.java",
"license": "agpl-3.0",
"size": 40245
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 276,479 |
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public long getIsInsert() {
return isInsert;
} | @Generated(value = STR, date = STR, comments = STR) long function() { return isInsert; } | /**
* Gets the value of the isInsert property.
*
*/ | Gets the value of the isInsert property | getIsInsert | {
"repo_name": "kanonirov/lanb-client",
"path": "src/main/java/ru/lanbilling/webservice/wsdl/InsupdSbssApplClass.java",
"license": "mit",
"size": 2787
} | [
"javax.annotation.Generated"
] | import javax.annotation.Generated; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,819,768 |
public static JobExecutionResult execute(Program pa, String... args) throws Exception {
return execute(pa.getPlan(args));
} | static JobExecutionResult function(Program pa, String... args) throws Exception { return execute(pa.getPlan(args)); } | /**
* Executes the given program.
*
* @param pa The program.
* @param args The parameters.
* @return The execution result of the program.
*
* @throws Exception Thrown, if either the startup of the local execution context, or the execution
* caused an exception.
*/ | Executes the given program | execute | {
"repo_name": "DieBauer/flink",
"path": "flink-clients/src/main/java/org/apache/flink/client/LocalExecutor.java",
"license": "apache-2.0",
"size": 10175
} | [
"org.apache.flink.api.common.JobExecutionResult",
"org.apache.flink.api.common.Program"
] | import org.apache.flink.api.common.JobExecutionResult; import org.apache.flink.api.common.Program; | import org.apache.flink.api.common.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,259,673 |
public void cancelSync() {
if (Log.isLoggable(Log.TRACE)) {
Log.trace(TAG_LOG, "Cancelling sync " + isSynchronizing() + " currentSource=" + currentSource);
}
setCancel(true);
if (isSynchronizing() && currentSource != null) {
UISyncSourceController uiSourceCon... | void function() { if (Log.isLoggable(Log.TRACE)) { Log.trace(TAG_LOG, STR + isSynchronizing() + STR + currentSource); } setCancel(true); if (isSynchronizing() && currentSource != null) { UISyncSourceController uiSourceController = currentSource.getUISyncSourceController(); if (uiSourceController != null) { uiSourceCont... | /**
* Try to cancel the current sync. This works for cooperative sources that
* check the synchronizationController status.
*/ | Try to cancel the current sync. This works for cooperative sources that check the synchronizationController status | cancelSync | {
"repo_name": "zjujunge/funambol",
"path": "externals/java-sdk/client/src/main/java/com/funambol/client/controller/SynchronizationController.java",
"license": "agpl-3.0",
"size": 35367
} | [
"com.funambol.util.Log"
] | import com.funambol.util.Log; | import com.funambol.util.*; | [
"com.funambol.util"
] | com.funambol.util; | 811,953 |
@RequestMapping(value = PathUtils.CUSTOM_TABLE_UPDATE, method = RequestMethod.PUT,
produces = MediaType.APPLICATION_JSON_VALUE)
public void updateCustomTable(@PathVariable long customTableId, @RequestBody CustomTableDTO customTable)
throws FooException {
} | @RequestMapping(value = PathUtils.CUSTOM_TABLE_UPDATE, method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE) void function(@PathVariable long customTableId, @RequestBody CustomTableDTO customTable) throws FooException { } | /**
* Update existed custom table with given {@code customTableId} with given {@code customTable} data
*
* @param customTableId id of existed custom table
* @param customTable custom table data
* @return <ul>
* <li>{@link HttpStatus#OK} - custom table with given id was updated</li>
... | Update existed custom table with given customTableId with given customTable data | updateCustomTable | {
"repo_name": "oleg-cherednik/maven-raml-plugin",
"path": "src/it/resource/foo/src/main/java/cop/raml/it/foo/controller/CustomTableController.java",
"license": "apache-2.0",
"size": 7773
} | [
"org.springframework.http.MediaType",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod"
] | import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; | import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"org.springframework.http",
"org.springframework.web"
] | org.springframework.http; org.springframework.web; | 2,902,933 |
public void clearScroll(String... scrollIds) {
ClearScrollResponse clearResponse = client().prepareClearScroll()
.setScrollIds(Arrays.asList(scrollIds)).get();
assertThat(clearResponse.isSucceeded(), equalTo(true));
} | void function(String... scrollIds) { ClearScrollResponse clearResponse = client().prepareClearScroll() .setScrollIds(Arrays.asList(scrollIds)).get(); assertThat(clearResponse.isSucceeded(), equalTo(true)); } | /**
* Clears the given scroll Ids
*/ | Clears the given scroll Ids | clearScroll | {
"repo_name": "clintongormley/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 97134
} | [
"java.util.Arrays",
"org.elasticsearch.action.search.ClearScrollResponse",
"org.hamcrest.Matchers"
] | import java.util.Arrays; import org.elasticsearch.action.search.ClearScrollResponse; import org.hamcrest.Matchers; | import java.util.*; import org.elasticsearch.action.search.*; import org.hamcrest.*; | [
"java.util",
"org.elasticsearch.action",
"org.hamcrest"
] | java.util; org.elasticsearch.action; org.hamcrest; | 1,212,242 |
public static void printerrln(@Nullable String s1, @Nullable Object... rest) {
error(s1, rest);
} | static void function(@Nullable String s1, @Nullable Object... rest) { error(s1, rest); } | /**
* Alias for {@code System.err.println}.
*
* @param s1 First string to print.
* @param rest Optional list of objects to print as well.
*/ | Alias for System.err.println | printerrln | {
"repo_name": "alexzaitzev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/typedef/X.java",
"license": "apache-2.0",
"size": 31269
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,615,123 |
public HTableDescriptor addColumn(byte[] tableName, HColumnDescriptor hcd)
throws IOException {
LOG.info("AddColumn. Table = " + Bytes.toString(tableName) + " HCD = " +
hcd.toString());
HTableDescriptor htd = this.services.getTableDescriptors().get(tableName);
if (htd == null) {
throw ne... | HTableDescriptor function(byte[] tableName, HColumnDescriptor hcd) throws IOException { LOG.info(STR + Bytes.toString(tableName) + STR + hcd.toString()); HTableDescriptor htd = this.services.getTableDescriptors().get(tableName); if (htd == null) { throw new InvalidFamilyOperationException(STR + hcd.getNameAsString() + ... | /**
* Add column to a table
* @param tableName
* @param hcd
* @return Modified HTableDescriptor with new column added.
* @throws IOException
*/ | Add column to a table | addColumn | {
"repo_name": "indi60/hbase-pmc",
"path": "target/hbase-0.94.1/hbase-0.94.1/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java",
"license": "apache-2.0",
"size": 19407
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.HColumnDescriptor",
"org.apache.hadoop.hbase.HTableDescriptor",
"org.apache.hadoop.hbase.InvalidFamilyOperationException",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.io.IOException; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.InvalidFamilyOperationException; import org.apache.hadoop.hbase.util.Bytes; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,597,490 |
private void scanStatsResult(Scanner scanner) {
while(scanner.hasNextLine()) {
String[] raw = scanner.nextLine().trim().split("\\|");
if(raw.length == 1) {
continue;
}
if(raw.length < 25) {
log.info("The stats data has " + raw... | void function(Scanner scanner) { while(scanner.hasNextLine()) { String[] raw = scanner.nextLine().trim().split(STR); if(raw.length == 1) { continue; } if(raw.length < 25) { log.info(STR + raw.length + STR); log.info(STR + Arrays.toString(raw)); } int columnNum = Integer.parseInt(raw[0]); try { ColumnConfig config = thi... | /**
* Scan the stats result and save them into column configure
*
* @param scanner
*/ | Scan the stats result and save them into column configure | scanStatsResult | {
"repo_name": "aglne/shifu",
"path": "src/main/java/ml/shifu/shifu/core/processor/StatsModelProcessor.java",
"license": "apache-2.0",
"size": 18165
} | [
"java.util.Arrays",
"java.util.Scanner",
"ml.shifu.shifu.container.obj.ColumnConfig",
"ml.shifu.shifu.udf.CalculateStatsUDF",
"ml.shifu.shifu.util.Base64Utils",
"ml.shifu.shifu.util.CommonUtils"
] | import java.util.Arrays; import java.util.Scanner; import ml.shifu.shifu.container.obj.ColumnConfig; import ml.shifu.shifu.udf.CalculateStatsUDF; import ml.shifu.shifu.util.Base64Utils; import ml.shifu.shifu.util.CommonUtils; | import java.util.*; import ml.shifu.shifu.container.obj.*; import ml.shifu.shifu.udf.*; import ml.shifu.shifu.util.*; | [
"java.util",
"ml.shifu.shifu"
] | java.util; ml.shifu.shifu; | 1,443,603 |
SocketAddress localAddress = (SocketAddress) getOption("localAddress");
if (localAddress == null) {
throw new IllegalStateException("localAddress option is not set.");
}
return bindAsync(localAddress);
} | SocketAddress localAddress = (SocketAddress) getOption(STR); if (localAddress == null) { throw new IllegalStateException(STR); } return bindAsync(localAddress); } | /**
* Bind a channel asynchronous to the local address
* specified in the current {@code "localAddress"} option. This method is
* similar to the following code:
*
* <pre>
* {@link ConnectionlessBootstrap} b = ...;
* b.bindAsync(b.getOption("localAddress"));
* </pre>
*
... | Bind a channel asynchronous to the local address specified in the current "localAddress" option. This method is similar to the following code: <code> <code>ConnectionlessBootstrap</code> b = ...; b.bindAsync(b.getOption("localAddress")); </code> | bindAsync | {
"repo_name": "chao-sun-kaazing/gateway",
"path": "mina.netty/src/main/java/org/kaazing/mina/netty/bootstrap/ConnectionlessBootstrap.java",
"license": "apache-2.0",
"size": 3679
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,309,585 |
public String[] getAllAvailableEvents(){
//Android documentation: The set does not support adding
Set<String> availableEvents = advertisementHashMap.keySet();
if(availableEvents==null)return null;
String[] events = availableEvents.toArray(new String[availableEvents.size()]);
for(int i=0;i... | String[] function(){ Set<String> availableEvents = advertisementHashMap.keySet(); if(availableEvents==null)return null; String[] events = availableEvents.toArray(new String[availableEvents.size()]); for(int i=0;i<events.length;i++){ if(D D_ROUTING)Log.d(TAG,STR+i+STR+events[i]); } return events; } | /**
* Get all available events from the advertismentHashMap
* @return String[] containing all available event types
*/ | Get all available events from the advertismentHashMap | getAllAvailableEvents | {
"repo_name": "myHealthAssistant-tudarmstadt/myHealthHub",
"path": "src/de/tudarmstadt/dvs/myhealthassistant/myhealthhub/services/messagehandler/MessageHandler.java",
"license": "gpl-3.0",
"size": 56047
} | [
"android.util.Log",
"java.util.Set"
] | import android.util.Log; import java.util.Set; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 2,323,163 |
Builder addProperty(String name, SchemaOrgType value); | Builder addProperty(String name, SchemaOrgType value); | /**
* Add a value to property.
*
* @param name The property name.
* @param value The value of the property.
*/ | Add a value to property | addProperty | {
"repo_name": "google/schemaorg-java",
"path": "src/main/java/com/google/schemaorg/core/TouristAttraction.java",
"license": "apache-2.0",
"size": 11554
} | [
"com.google.schemaorg.SchemaOrgType"
] | import com.google.schemaorg.SchemaOrgType; | import com.google.schemaorg.*; | [
"com.google.schemaorg"
] | com.google.schemaorg; | 1,361,234 |
public String toString() {
CharArrayList theKeys = keys();
//theKeys.sort();
StringBuilder buf = new StringBuilder();
buf.append('[');
int maxIndex = theKeys.size() - 1;
for (int i = 0; i <= maxIndex; i++) {
char key = theKeys.get(i);
buf.append(String.valueOf(key));
buf.app... | String function() { CharArrayList theKeys = keys(); StringBuilder buf = new StringBuilder(); buf.append('['); int maxIndex = theKeys.size() - 1; for (int i = 0; i <= maxIndex; i++) { char key = theKeys.get(i); buf.append(String.valueOf(key)); buf.append("->"); buf.append(String.valueOf(get(key))); if (i < maxIndex) { b... | /**
* Returns a string representation of the receiver, containing the String representation of each key-value pair,
* sorted ascending by key.
*/ | Returns a string representation of the receiver, containing the String representation of each key-value pair, sorted ascending by key | toString | {
"repo_name": "genericDataCompany/hsandbox",
"path": "common/mahout-distribution-0.7-hadoop1/math/target/generated-sources/org/apache/mahout/math/map/AbstractCharCharMap.java",
"license": "apache-2.0",
"size": 16596
} | [
"org.apache.mahout.math.list.CharArrayList"
] | import org.apache.mahout.math.list.CharArrayList; | import org.apache.mahout.math.list.*; | [
"org.apache.mahout"
] | org.apache.mahout; | 625,647 |
public void testNonblockingGetInitialImage() throws Throwable {
if (!supportsReplication()) {
return;
}
// don't run this test if global scope since its too difficult to predict
// how many concurrent operations will occur
if (getRegionAttributes().getScope().isGlobal()) {
return;
... | void function() throws Throwable { if (!supportsReplication()) { return; } if (getRegionAttributes().getScope().isGlobal()) { return; } final String name = this.getUniqueName(); final byte[][] values = new byte[NB1_NUM_ENTRIES][]; for (int i = 0; i < NB1_NUM_ENTRIES; i++) { values[i] = new byte[NB1_VALUE_SIZE]; Arrays.... | /**
* Tests that distributed ack operations do not block while
* another cache is doing a getInitialImage.
*/ | Tests that distributed ack operations do not block while another cache is doing a getInitialImage | testNonblockingGetInitialImage | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "tests/core/src/main/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java",
"license": "apache-2.0",
"size": 354564
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 178,105 |
public void setCurrentPom(File currentPom) {
this.currentPom = currentPom;
} | void function(File currentPom) { this.currentPom = currentPom; } | /**
* Set the POM file currently being processed.<br/>
*
* @param currentPom
* POM file currently being processed
*/ | Set the POM file currently being processed | setCurrentPom | {
"repo_name": "azkaoru/migration-tool",
"path": "src/tubame.wsearch.biz/src/main/java/tubame/wsearch/biz/model/LibraryModel.java",
"license": "apache-2.0",
"size": 6715
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 555,689 |
public int linkNativeLibraryDirectory(String uuid, String dataPath, String nativeLibPath32,
int userId) {
if (dataPath == null) {
Slog.e(TAG, "linkNativeLibraryDirectory dataPath is null");
return -1;
} else if (nativeLibPath32 == null) {
Slog.e(TAG, "... | int function(String uuid, String dataPath, String nativeLibPath32, int userId) { if (dataPath == null) { Slog.e(TAG, STR); return -1; } else if (nativeLibPath32 == null) { Slog.e(TAG, STR); return -1; } StringBuilder builder = new StringBuilder(STR); builder.append(' '); builder.append(escapeNull(uuid)); builder.append... | /**
* Links the 32 bit native library directory in an application's data directory to the
* real location for backward compatibility. Note that no such symlink is created for
* 64 bit shared libraries.
*
* @return -1 on error
*/ | Links the 32 bit native library directory in an application's data directory to the real location for backward compatibility. Note that no such symlink is created for 64 bit shared libraries | linkNativeLibraryDirectory | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "services/core/java/com/android/server/pm/Installer.java",
"license": "apache-2.0",
"size": 17026
} | [
"android.util.Slog"
] | import android.util.Slog; | import android.util.*; | [
"android.util"
] | android.util; | 296,213 |
public RestTemplate getRestTemplate() {
return this.restTemplate;
} | RestTemplate function() { return this.restTemplate; } | /**
* Returns the {@link RestTemplate} for the gateway.
*/ | Returns the <code>RestTemplate</code> for the gateway | getRestTemplate | {
"repo_name": "bboyfeiyu/spring-android",
"path": "spring-android-rest-template/src/main/java/org/springframework/web/client/support/RestGatewaySupport.java",
"license": "apache-2.0",
"size": 2152
} | [
"org.springframework.web.client.RestTemplate"
] | import org.springframework.web.client.RestTemplate; | import org.springframework.web.client.*; | [
"org.springframework.web"
] | org.springframework.web; | 1,584,847 |
interface UpdateStages {
interface WithActiveDirectories {
Update withActiveDirectories(List<ActiveDirectory> activeDirectories);
}
} | interface UpdateStages { interface WithActiveDirectories { Update withActiveDirectories(List<ActiveDirectory> activeDirectories); } } | /**
* Specifies activeDirectories.
* @param activeDirectories Active Directories
* @return the next update stage
*/ | Specifies activeDirectories | withActiveDirectories | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/netapp/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/netapp/v2019_11_01/NetAppAccount.java",
"license": "mit",
"size": 3829
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,161,922 |
public static String[] splitCommand(String command, String split){
String[] result = null;
String pattern = split;
Pattern splitter = Pattern.compile(pattern);
result = splitter.split(command);
return result;
} | static String[] function(String command, String split){ String[] result = null; String pattern = split; Pattern splitter = Pattern.compile(pattern); result = splitter.split(command); return result; } | /**
* Splits an String with the given splitter
* @param command
* @param split
* @return String[] splitted String Array
*/ | Splits an String with the given splitter | splitCommand | {
"repo_name": "yvesh/maklerpoint-office",
"path": "src/de/maklerpoint/office/Tools/BasicRegex.java",
"license": "gpl-2.0",
"size": 2571
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,135,788 |
private boolean mobFileExists(FileSystem fs, TableName tn, String mobFileName, String family,
Set<String> foundMobFiles, Set<String> missingMobFiles) throws IOException {
if (foundMobFiles.contains(mobFileName)) {
return true;
}
if (missingMobFiles.contains(mobFileName)) {
return false;
... | boolean function(FileSystem fs, TableName tn, String mobFileName, String family, Set<String> foundMobFiles, Set<String> missingMobFiles) throws IOException { if (foundMobFiles.contains(mobFileName)) { return true; } if (missingMobFiles.contains(mobFileName)) { return false; } String tableName = tn.getNameAsString(); Li... | /**
* Checks whether the referenced mob file exists.
*/ | Checks whether the referenced mob file exists | mobFileExists | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFilePrettyPrinter.java",
"license": "apache-2.0",
"size": 29701
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Set",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.mob.MobUtils",
"org.apache.hadoop.hbase.util.HFileArchiveUtil"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Set; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.mob.MobUtils; import org.apache.hadoop.hbase.util.HFileArchiveUtil; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.mob.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 617,913 |
Locale locale = null;
Language language = (Language) request.getSession().getAttribute(Constants.LANGUAGE);
if(language==null) {
try {
locale = LocaleContextHolder.getLocale();//should be browser locale
MerchantStore store = (MerchantStore)request.getSession().getAttribute(Co... | Locale locale = null; Language language = (Language) request.getSession().getAttribute(Constants.LANGUAGE); if(language==null) { try { locale = LocaleContextHolder.getLocale(); MerchantStore store = (MerchantStore)request.getSession().getAttribute(Constants.MERCHANT_STORE); if(store!=null) { language = store.getDefault... | /**
* Determines request language based on store rules
* @param request
* @return
*/ | Determines request language based on store rules | getRequestLanguage | {
"repo_name": "abedeen/shopizer",
"path": "sm-shop/src/main/java/com/salesmanager/shop/utils/LanguageUtils.java",
"license": "lgpl-2.1",
"size": 3788
} | [
"com.salesmanager.core.model.merchant.MerchantStore",
"com.salesmanager.core.model.reference.language.Language",
"com.salesmanager.shop.constants.Constants",
"java.util.Locale",
"org.springframework.context.i18n.LocaleContextHolder",
"org.springframework.web.servlet.LocaleResolver",
"org.springframework... | import com.salesmanager.core.model.merchant.MerchantStore; import com.salesmanager.core.model.reference.language.Language; import com.salesmanager.shop.constants.Constants; import java.util.Locale; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.web.servlet.LocaleResolver; import... | import com.salesmanager.core.model.merchant.*; import com.salesmanager.core.model.reference.language.*; import com.salesmanager.shop.constants.*; import java.util.*; import org.springframework.context.i18n.*; import org.springframework.web.servlet.*; import org.springframework.web.servlet.support.*; | [
"com.salesmanager.core",
"com.salesmanager.shop",
"java.util",
"org.springframework.context",
"org.springframework.web"
] | com.salesmanager.core; com.salesmanager.shop; java.util; org.springframework.context; org.springframework.web; | 1,833,926 |
@Path("/node/{node-id}/moveup")
@POST
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public Response postMoveNodeUp(String xmlNode, @PathParam("node-id") String nodeId, @Context ServletConfig sc,
@Context HttpServletRequest httpServletRequest) {
if (!isUUID(nodeId)) {
throw new... | @Path(STR) @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response function(String xmlNode, @PathParam(STR) String nodeId, @Context ServletConfig sc, @Context HttpServletRequest httpServletRequest) { if (!isUUID(nodeId)) { throw new RestWebApplicationException(Status.BAD_REQUEST, STR); } User... | /**
* Move a node up between siblings. <br>
* POST /rest/api/nodes/node/{node-id}/moveup
*
* @param xmlNode
* @param nodeId
* @param sc
* @param httpServletRequest
* @return
*/ | Move a node up between siblings. POST /rest/api/nodes/node/{node-id}/moveup | postMoveNodeUp | {
"repo_name": "nobry/karuta-backend",
"path": "karuta-webapp/src/main/java/eportfolium/com/karuta/webapp/rest/resource/NodeResource.java",
"license": "apache-2.0",
"size": 45285
} | [
"javax.servlet.ServletConfig",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import javax.servlet.ServletConfig; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import javax.servlet.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"javax.servlet",
"javax.ws"
] | javax.servlet; javax.ws; | 1,666,614 |
public Observable<ServiceResponse<Void>> putUtcMaxDateTimeWithServiceResponseAsync(DateTime datetimeBody) {
if (datetimeBody == null) {
throw new IllegalArgumentException("Parameter datetimeBody is required and cannot be null.");
} | Observable<ServiceResponse<Void>> function(DateTime datetimeBody) { if (datetimeBody == null) { throw new IllegalArgumentException(STR); } | /**
* Put max datetime value Fri, 31 Dec 9999 23:59:59 GMT.
*
* @param datetimeBody the DateTimeRfc1123 value
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/ | Put max datetime value Fri, 31 Dec 9999 23:59:59 GMT | putUtcMaxDateTimeWithServiceResponseAsync | {
"repo_name": "lmazuel/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydatetimerfc1123/implementation/Datetimerfc1123sImpl.java",
"license": "mit",
"size": 34184
} | [
"com.microsoft.rest.ServiceResponse",
"org.joda.time.DateTime"
] | import com.microsoft.rest.ServiceResponse; import org.joda.time.DateTime; | import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.rest; org.joda.time; | 584,845 |
public void sendBuffer(ByteBuffer bb) {
if (LOG.isTraceEnabled()) {
LOG.trace("Add a buffer to outgoingBuffers, sk " + sk
+ " is valid: " + sk.isValid());
}
outgoingBuffers.add(bb);
requestInterestOpsUpdate();
} | void function(ByteBuffer bb) { if (LOG.isTraceEnabled()) { LOG.trace(STR + sk + STR + sk.isValid()); } outgoingBuffers.add(bb); requestInterestOpsUpdate(); } | /**
* sendBuffer pushes a byte buffer onto the outgoing buffer queue for
* asynchronous writes.
*/ | sendBuffer pushes a byte buffer onto the outgoing buffer queue for asynchronous writes | sendBuffer | {
"repo_name": "breed/zookeeper",
"path": "src/java/main/org/apache/zookeeper/server/NIOServerCnxn.java",
"license": "apache-2.0",
"size": 38708
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 455,359 |
@Override
public void transfer(IAccount account, float sum, String msg, Date transactionDate) throws IllegalArgumentException {
if(account == null){
throw new IllegalArgumentException("Account to transfer Money to is empty. Transfer canceled.");
}else if (sum <= 0){
thro... | void function(IAccount account, float sum, String msg, Date transactionDate) throws IllegalArgumentException { if(account == null){ throw new IllegalArgumentException(STR); }else if (sum <= 0){ throw new IllegalArgumentException(STR); }else if(msg == null){ throw new IllegalArgumentException(STR); }else if(transactionD... | /**
* Bank transfer to another account.
*
* @param account the account
* @param sum the positive sum
* @param msg the message for accounting
* @param transactionDate the transaction date
* @throws IllegalArgumentException if invalid date, msg, sum or ac... | Bank transfer to another account | transfer | {
"repo_name": "marpme/StudySecond",
"path": "Übung_Nine/src/account/Account.java",
"license": "mit",
"size": 3911
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 701,432 |
@RequiresPermission(USE_FINGERPRINT)
public void authenticate(@Nullable CryptoObject crypto, @Nullable CancellationSignal cancel,
int flags, @NonNull AuthenticationCallback callback, Handler handler, int userId) {
if (callback == null) {
throw new IllegalArgumentException("Must s... | @RequiresPermission(USE_FINGERPRINT) void function(@Nullable CryptoObject crypto, @Nullable CancellationSignal cancel, int flags, @NonNull AuthenticationCallback callback, Handler handler, int userId) { if (callback == null) { throw new IllegalArgumentException(STR); } if (cancel != null) { if (cancel.isCanceled()) { L... | /**
* Per-user version
* @hide
*/ | Per-user version | authenticate | {
"repo_name": "xorware/android_frameworks_base",
"path": "core/java/android/hardware/fingerprint/FingerprintManager.java",
"license": "apache-2.0",
"size": 39147
} | [
"android.annotation.NonNull",
"android.annotation.Nullable",
"android.annotation.RequiresPermission",
"android.os.CancellationSignal",
"android.os.Handler",
"android.os.RemoteException",
"android.util.Log"
] | import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.RequiresPermission; import android.os.CancellationSignal; import android.os.Handler; import android.os.RemoteException; import android.util.Log; | import android.annotation.*; import android.os.*; import android.util.*; | [
"android.annotation",
"android.os",
"android.util"
] | android.annotation; android.os; android.util; | 2,170,566 |
public synchronized boolean write(Writer writer) {
ConfigSerializer config = new ConfigSerializer();
StringBuilder hostportsBuilder = new StringBuilder();
String delimiter = "";
for (String hostport : configMap.keySet()) {
hostportsBuilder.append(delimiter + hostport);
if (delimiter.equal... | synchronized boolean function(Writer writer) { ConfigSerializer config = new ConfigSerializer(); StringBuilder hostportsBuilder = new StringBuilder(); String delimiter = STRSTR,STR_STRFailed to get LDAPConfigs string", e); return false; } return true; } /** * Get the LDAP config for the given hostport string * @param h... | /**
* Writes all the ldap configs to the specified Writer.
* @param writer a Writer object used to write the configuration parameters.
* @return true if configuration was successfully written. false otherwise.
* @see #read(java.io.Reader)
*/ | Writes all the ldap configs to the specified Writer | write | {
"repo_name": "googlegsa/secmgr",
"path": "src/main/java/com/google/enterprise/ldap/LDAPConfigManager.java",
"license": "apache-2.0",
"size": 9995
} | [
"com.google.enterprise.param.io.ConfigSerializer",
"java.io.Writer"
] | import com.google.enterprise.param.io.ConfigSerializer; import java.io.Writer; | import com.google.enterprise.param.io.*; import java.io.*; | [
"com.google.enterprise",
"java.io"
] | com.google.enterprise; java.io; | 766,432 |
protected boolean isCriteriaRequired(Map lookupCriteria) {
return BooleanUtils.isTrue((Boolean) lookupCriteria.get(UifConstants.LookupCriteriaPostMetadata.REQUIRED));
}
| boolean function(Map lookupCriteria) { return BooleanUtils.isTrue((Boolean) lookupCriteria.get(UifConstants.LookupCriteriaPostMetadata.REQUIRED)); } | /**
* Indicator if the search criteria is required.
*
* @param lookupCriteria the viewPostMetadata with the attributes of the search criteria field
* @return true if the search criteria is required, false otherwise
*/ | Indicator if the search criteria is required | isCriteriaRequired | {
"repo_name": "mztaylor/rice-git",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/lookup/LookupableImpl.java",
"license": "apache-2.0",
"size": 54828
} | [
"java.util.Map",
"org.apache.commons.lang.BooleanUtils",
"org.kuali.rice.krad.uif.UifConstants"
] | import java.util.Map; import org.apache.commons.lang.BooleanUtils; import org.kuali.rice.krad.uif.UifConstants; | import java.util.*; import org.apache.commons.lang.*; import org.kuali.rice.krad.uif.*; | [
"java.util",
"org.apache.commons",
"org.kuali.rice"
] | java.util; org.apache.commons; org.kuali.rice; | 1,964,062 |
@Override
public void initializeVariablesFrom( VariableSpace parent ) {
variables.initializeVariablesFrom( parent );
} | void function( VariableSpace parent ) { variables.initializeVariablesFrom( parent ); } | /**
* Sets the values of the transformation's variables to the values from the parent variables.
*
* @param parent
* the parent
* @see org.pentaho.di.core.variables.VariableSpace#initializeVariablesFrom(
* org.pentaho.di.core.variables.VariableSpace)
*/ | Sets the values of the transformation's variables to the values from the parent variables | initializeVariablesFrom | {
"repo_name": "denisprotopopov/pentaho-kettle",
"path": "engine/src/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 196543
} | [
"org.pentaho.di.core.variables.VariableSpace"
] | import org.pentaho.di.core.variables.VariableSpace; | import org.pentaho.di.core.variables.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 652,648 |
void setContext(Context context)
{
this.context = context;
}
| void setContext(Context context) { this.context = context; } | /**
* Set the context of the {@link GLESSurfaceView} to which this
* renderer is set to.
*
* <p>
* This method is called by a {@link GLESSurfaceView} when this
* renderer is set to it by {@link
* GLESSurfaceView#setRenderer(android.opengl.GLSurfaceView.Renderer)
* GLESSur... | Set the context of the <code>GLESSurfaceView</code> to which this renderer is set to. This method is called by a <code>GLESSurfaceView</code> when this renderer is set to it by <code>GLESSurfaceView#setRenderer(android.opengl.GLSurfaceView.Renderer) GLESSurfaceView.setRenderer()</code>. | setContext | {
"repo_name": "TakahikoKawasaki/Android-OpenGL-Friendly-API",
"path": "src/com/neovisionaries/android/opengl/GLESRenderer.java",
"license": "apache-2.0",
"size": 7191
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,632,004 |
public ExpressRouteCrossConnectionPeeringInner withPeeringType(ExpressRoutePeeringType peeringType) {
this.peeringType = peeringType;
return this;
} | ExpressRouteCrossConnectionPeeringInner function(ExpressRoutePeeringType peeringType) { this.peeringType = peeringType; return this; } | /**
* Set the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'.
*
* @param peeringType the peeringType value to set
* @return the ExpressRouteCrossConnectionPeeringInner object itself.
*/ | Set the peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' | withPeeringType | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ExpressRouteCrossConnectionPeeringInner.java",
"license": "mit",
"size": 11847
} | [
"com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringType"
] | import com.microsoft.azure.management.network.v2019_09_01.ExpressRoutePeeringType; | import com.microsoft.azure.management.network.v2019_09_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,440,135 |
public void runAlgorithm(String input, String output, double minUtilityRatio) throws IOException {
// reset maximum
maxMemory =0;
// keep the input file path
this.input = input;
// keep the minimum utility ratio
this.minUtilityRatio = minUtilityRatio;
// record the start time (to c... | void function(String input, String output, double minUtilityRatio) throws IOException { maxMemory =0; this.input = input; this.minUtilityRatio = minUtilityRatio; startTimestamp = System.currentTimeMillis(); negativeItems = new HashSet<Integer>(); periodUtilities = new ArrayList<Integer>(); writer = new BufferedWriter(n... | /**
* Run the algorithm
* @param input the input file path
* @param output the output file path
* @param minUtilityRatio the minimum utility ratio threshold
* @throws IOException exception if error while writing the file
*/ | Run the algorithm | runAlgorithm | {
"repo_name": "qualitified/qualitified-crm",
"path": "qualitified-crm-core/src/main/java/ca/pfv/spmf/algorithms/frequentpatterns/foshu/AlgoFOSHU.java",
"license": "gpl-3.0",
"size": 24452
} | [
"java.io.BufferedReader",
"java.io.BufferedWriter",
"java.io.File",
"java.io.FileInputStream",
"java.io.FileWriter",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.HashSet",
"java.util.List",
"java.util.Map"
] | import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.u... | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,692,589 |
public static java.util.List extractContractConfigList(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.ContractConfigVoCollection voCollection)
{
return extractContractConfigList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.ContractConfigVoCollection voCollection) { return extractContractConfigList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.configuration.domain.objects.ContractConfig list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.configuration.domain.objects.ContractConfig list from the value object collection | extractContractConfigList | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/domain/ContractConfigVoAssembler.java",
"license": "agpl-3.0",
"size": 24265
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,628,393 |
public BeadledomWebTarget buildTarget(Link baseUrl) {
BeadledomClient beadledomClient = build();
return beadledomClient.target(baseUrl);
} | BeadledomWebTarget function(Link baseUrl) { BeadledomClient beadledomClient = build(); return beadledomClient.target(baseUrl); } | /**
* Return a new instance of {@code {@link BeadledomWebTarget}} with the given Link path by using
* the default builder implementation on the classpath found using SPI.
*/ | Return a new instance of <code>BeadledomWebTarget</code> with the given Link path by using the default builder implementation on the classpath found using SPI | buildTarget | {
"repo_name": "bbaugher/beadledom",
"path": "client/beadledom-client/src/main/java/com/cerner/beadledom/client/BeadledomClientBuilder.java",
"license": "apache-2.0",
"size": 5339
} | [
"javax.ws.rs.core.Link"
] | import javax.ws.rs.core.Link; | import javax.ws.rs.core.*; | [
"javax.ws"
] | javax.ws; | 1,184,717 |
@Invisible
static void setExecutable(IFileSystemArtifact art, boolean ownerOnly) throws VilException {
try {
File file = art.getPath().getAbsolutePath();
file.setExecutable(true, ownerOnly);
} catch (SecurityException e) {
throw new VilException(e, VilExceptio... | static void setExecutable(IFileSystemArtifact art, boolean ownerOnly) throws VilException { try { File file = art.getPath().getAbsolutePath(); file.setExecutable(true, ownerOnly); } catch (SecurityException e) { throw new VilException(e, VilException.ID_SECURITY); } } | /**
* Enables the (operation system specific) execution flag for the given artifact.
*
* @param art the artifact
* @param ownerOnly whether all users or just the owner shall be allowed to exectue this artifact
* @throws VilException if the executable flag cannot be set.
*/ | Enables the (operation system specific) execution flag for the given artifact | setExecutable | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Instantiation/de.uni_hildesheim.sse.easy.instantiatorCore/src/net/ssehub/easy/instantiation/core/model/artifactModel/FileSystemArtifactOperations.java",
"license": "apache-2.0",
"size": 1456
} | [
"java.io.File",
"net.ssehub.easy.instantiation.core.model.common.VilException"
] | import java.io.File; import net.ssehub.easy.instantiation.core.model.common.VilException; | import java.io.*; import net.ssehub.easy.instantiation.core.model.common.*; | [
"java.io",
"net.ssehub.easy"
] | java.io; net.ssehub.easy; | 1,999,225 |
public void testBcClassRefBand() throws IOException, Pack200Exception {
byte[] bytes = new byte[] { (byte) 233, (byte) 236, (byte) 255, 8, 8 }; // bc_classref
// band
InputStream in = new ByteArrayInputStream(bytes);
bcBands.unpack(in);
assertEquals(2, bcBands.getMethodByteCo... | void function() throws IOException, Pack200Exception { byte[] bytes = new byte[] { (byte) 233, (byte) 236, (byte) 255, 8, 8 }; InputStream in = new ByteArrayInputStream(bytes); bcBands.unpack(in); assertEquals(2, bcBands.getMethodByteCodePacked()[0][0].length); int[] bc_classref = bcBands.getBcClassRef(); assertEquals(... | /**
* Test with codes that should require entries in the bc_classref band
*
* @throws Pack200Exception
* @throws IOException
*/ | Test with codes that should require entries in the bc_classref band | testBcClassRefBand | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/BcBandsTest.java",
"license": "apache-2.0",
"size": 25690
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.InputStream",
"org.apache.harmony.pack200.Pack200Exception"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import org.apache.harmony.pack200.Pack200Exception; | import java.io.*; import org.apache.harmony.pack200.*; | [
"java.io",
"org.apache.harmony"
] | java.io; org.apache.harmony; | 1,705,146 |
@Override
public void filter(ClientRequestContext clientRequestContext,
ClientResponseContext clientResponseContext) throws IOException {
String methodName = "filter(incoming)";
Boolean skip = (Boolean) clientRequestContext.getProperty(CLIENT_SPAN_SKIPPED_ID);
if ... | void function(ClientRequestContext clientRequestContext, ClientResponseContext clientResponseContext) throws IOException { String methodName = STR; Boolean skip = (Boolean) clientRequestContext.getProperty(CLIENT_SPAN_SKIPPED_ID); if ((skip != null) && skip) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabl... | /**
* <p>Handle an incoming response.</p>
*
* <p>A span is expected to be available from the tracing context. Do
* nothing if a span is not available.</p>
*
* @param clientRequestContext The outgoing request context.
* @param clientResponseContext The incoming response context.
... | Handle an incoming response. A span is expected to be available from the tracing context. Do nothing if a span is not available | filter | {
"repo_name": "kgibm/open-liberty",
"path": "dev/io.openliberty.opentracing.2.0.internal/src/io/openliberty/opentracing/internal/OpentracingClientFilter.java",
"license": "epl-1.0",
"size": 9290
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent",
"io.opentracing.Span",
"io.opentracing.propagation.TextMap",
"io.opentracing.tag.Tags",
"java.io.IOException",
"javax.ws.rs.client.ClientRequestContext",
"javax.ws.rs.client.ClientResponseContext",
"javax.ws.rs.core.MultivaluedMap"
... | import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import io.opentracing.Span; import io.opentracing.propagation.TextMap; import io.opentracing.tag.Tags; import java.io.IOException; import javax.ws.rs.client.ClientRequestContext; import javax.ws.rs.client.ClientResponseContext; import javax.w... | import com.ibm.websphere.ras.*; import io.opentracing.*; import io.opentracing.propagation.*; import io.opentracing.tag.*; import java.io.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; | [
"com.ibm.websphere",
"io.opentracing",
"io.opentracing.propagation",
"io.opentracing.tag",
"java.io",
"javax.ws"
] | com.ibm.websphere; io.opentracing; io.opentracing.propagation; io.opentracing.tag; java.io; javax.ws; | 955,548 |
static public EPlan loadPlanFromFile (URL file, ResourceSet resourceSet) {
return loadPlanFromFile(URI.createURI(file.toString()), resourceSet);
} | static EPlan function (URL file, ResourceSet resourceSet) { return loadPlanFromFile(URI.createURI(file.toString()), resourceSet); } | /**
* Loads a plan from a .plan file.
* @param file a .plan file
* @param resourceSet shared ResourceSet, or null if it can be standalone
* @return null on failure, or a plan object
*/ | Loads a plan from a .plan file | loadPlanFromFile | {
"repo_name": "nasa/OpenSPIFe",
"path": "gov.nasa.ensemble.core.model.plan.diff/src/gov/nasa/ensemble/core/model/plan/diff/top/PlanDiffUtils.java",
"license": "apache-2.0",
"size": 13005
} | [
"gov.nasa.ensemble.core.model.plan.EPlan",
"org.eclipse.emf.common.util.URI",
"org.eclipse.emf.ecore.resource.ResourceSet"
] | import gov.nasa.ensemble.core.model.plan.EPlan; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.ResourceSet; | import gov.nasa.ensemble.core.model.plan.*; import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; | [
"gov.nasa.ensemble",
"org.eclipse.emf"
] | gov.nasa.ensemble; org.eclipse.emf; | 1,356,499 |
public void setGraphvizDir(File graphvizDir) {
this.graphvizDir = graphvizDir;
} | void function(File graphvizDir) { this.graphvizDir = graphvizDir; } | /**
* Set the path to Graphviz so we can find dot to generate ER diagrams
*
* @param graphvizDir
*/ | Set the path to Graphviz so we can find dot to generate ER diagrams | setGraphvizDir | {
"repo_name": "pellcorp/schemaspy",
"path": "src/main/java/net/sourceforge/schemaspy/Config.java",
"license": "lgpl-2.1",
"size": 59615
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,263,857 |
private void writeData(ResultSetMetaData resultsetmetadata, ResultSet resultSet) throws XmlWriterException
{
try {
int i = resultsetmetadata.getColumnCount();
logger.debug("columns number of cursor:[" + i + "]");
xpathDOMBuilder.addElement(document, "/RowSet[1]/data[1... | void function(ResultSetMetaData resultsetmetadata, ResultSet resultSet) throws XmlWriterException { try { int i = resultsetmetadata.getColumnCount(); logger.debug(STR + i + "]"); xpathDOMBuilder.addElement(document, STR); int iCountRow = 1; if (resultSet.next()) { rsEmpty = false; do { xpathDOMBuilder.addElement(docume... | /**
* Write data
*
* @param resultsetmetadata
* the result set meta data object
* @param resultSet
* the resultSet object
* @throws XmlWriterException
* if an error occurred
*/ | Write data | writeData | {
"repo_name": "green-vulcano/gv-engine",
"path": "gvengine/gvbase/src/main/java/it/greenvulcano/gvesb/j2ee/db/utils/XmlWriterImpl.java",
"license": "lgpl-3.0",
"size": 23583
} | [
"it.greenvulcano.util.xpath.XPathUtilsException",
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.SQLException"
] | import it.greenvulcano.util.xpath.XPathUtilsException; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; | import it.greenvulcano.util.xpath.*; import java.sql.*; | [
"it.greenvulcano.util",
"java.sql"
] | it.greenvulcano.util; java.sql; | 673,387 |
public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
{
return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
} | IBlockState function(IBlockState state, Mirror mirrorIn) { return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))); } | /**
* Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed
* blockstate.
*/ | Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate | withMirror | {
"repo_name": "danielyc/test-1.9.4",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockButton.java",
"license": "gpl-3.0",
"size": 14410
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.Mirror"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; import net.minecraft.util.Mirror; | import net.minecraft.block.state.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 1,444,190 |
public OneWayCodec createEncoder() throws Exception;
| OneWayCodec function() throws Exception; | /**
* Create a one-way single-threaded, nonshared codec instance able to encode
* a state as should be sent to a client or a downstream codec.
*
* @return the codec for encoding
* @throws Exception
*/ | Create a one-way single-threaded, nonshared codec instance able to encode a state as should be sent to a client or a downstream codec | createEncoder | {
"repo_name": "szegedi/spring-web-jsflow",
"path": "src/main/java/org/szegedi/spring/web/jsflow/codec/BinaryStateCodec.java",
"license": "apache-2.0",
"size": 1834
} | [
"org.szegedi.spring.web.jsflow.codec.support.OneWayCodec"
] | import org.szegedi.spring.web.jsflow.codec.support.OneWayCodec; | import org.szegedi.spring.web.jsflow.codec.support.*; | [
"org.szegedi.spring"
] | org.szegedi.spring; | 1,043,026 |
// Create a JsArray of ModelComponentJSO objects for the components that
// make up the model.
@SuppressWarnings("unchecked")
JsArray<ModelComponentJSO> componentsArray =
(JsArray<ModelComponentJSO>) ModelComponentJSO.createArray();
// Iterate through the leaves of the ModelTree. For each l... | @SuppressWarnings(STR) JsArray<ModelComponentJSO> componentsArray = (JsArray<ModelComponentJSO>) ModelComponentJSO.createArray(); Iterator<TreeItem> iter = modelTree.treeItemIterator(); while (iter.hasNext()) { treeItem = (TreeItem) iter.next(); ComponentCell cell = (ComponentCell) treeItem.getWidget(); if (cell.isAlia... | /**
* Translates the model displayed in WMT into a {@link ModelJSO} object, which
* completely describes the state of the model, and stores it in the
* {@link DataManager}.
*/ | Translates the model displayed in WMT into a <code>ModelJSO</code> object, which completely describes the state of the model, and stores it in the <code>DataManager</code> | serialize | {
"repo_name": "mdpiper/wmt-client",
"path": "src/edu/colorado/csdms/wmt/client/control/ModelSerializer.java",
"license": "mit",
"size": 11302
} | [
"com.google.gwt.core.client.JsArray",
"com.google.gwt.user.client.ui.TreeItem",
"edu.colorado.csdms.wmt.client.data.ComponentJSO",
"edu.colorado.csdms.wmt.client.data.ModelComponentJSO",
"edu.colorado.csdms.wmt.client.ui.cell.ComponentCell",
"java.util.Iterator"
] | import com.google.gwt.core.client.JsArray; import com.google.gwt.user.client.ui.TreeItem; import edu.colorado.csdms.wmt.client.data.ComponentJSO; import edu.colorado.csdms.wmt.client.data.ModelComponentJSO; import edu.colorado.csdms.wmt.client.ui.cell.ComponentCell; import java.util.Iterator; | import com.google.gwt.core.client.*; import com.google.gwt.user.client.ui.*; import edu.colorado.csdms.wmt.client.data.*; import edu.colorado.csdms.wmt.client.ui.cell.*; import java.util.*; | [
"com.google.gwt",
"edu.colorado.csdms",
"java.util"
] | com.google.gwt; edu.colorado.csdms; java.util; | 1,713,859 |
public void getDisplayIndex(org.directwebremoting.ui.Callback<Integer> callback)
{
ScriptBuffer script = new ScriptBuffer();
String callbackPrefix = "";
if (callback != null)
{
callbackPrefix = "var reply = ";
}
script.appendCall(callbackPrefix + get... | void function(org.directwebremoting.ui.Callback<Integer> callback) { ScriptBuffer script = new ScriptBuffer(); String callbackPrefix = STRvar reply = STRgetDisplayIndexSTR__System.activateCallbackSTRreply"); } ScriptSessions.addScript(script); } | /**
* Returns the zero-based index for ths column in relation to its siblings. This is different from getChildIndex in that
it corresponds to the position of this column as rendered on-screen, meaning if a child of a lesser index is not
displayed (e.g., display = none), the value returned from this method will be... | Returns the zero-based index for ths column in relation to its siblings. This is different from getChildIndex in that | getDisplayIndex | {
"repo_name": "burris/dwr",
"path": "ui/gi/generated/java/jsx3/gui/matrix/Column.java",
"license": "apache-2.0",
"size": 34352
} | [
"org.directwebremoting.ScriptBuffer",
"org.directwebremoting.ScriptSessions"
] | import org.directwebremoting.ScriptBuffer; import org.directwebremoting.ScriptSessions; | import org.directwebremoting.*; | [
"org.directwebremoting"
] | org.directwebremoting; | 1,140,173 |
public static final java.sql.Timestamp timestampBytesToTimestamp(byte[] buffer,
int offset,
Calendar recyclableCal,
... | static final java.sql.Timestamp function(byte[] buffer, int offset, Calendar recyclableCal, String encoding) throws UnsupportedEncodingException { int year, month, day, hour, minute, second, fraction; String timestamp = new String(buffer, offset, DateTime.timestampRepresentationLength,encoding); Calendar cal = getClean... | /**
* Expected character representation is DERBY string representation of a timestamp:
* <code>yyyy-mm-dd-hh.mm.ss.ffffff</code>.
*
* @param buffer
* @param offset
* @param recyclableCal
* @param encoding encoding of buffer
* @return TimeStamp translated from buff... | Expected character representation is DERBY string representation of a timestamp: <code>yyyy-mm-dd-hh.mm.ss.ffffff</code> | timestampBytesToTimestamp | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/client/src/main/java/com/pivotal/gemfirexd/internal/client/am/DateTime.java",
"license": "apache-2.0",
"size": 41938
} | [
"java.io.UnsupportedEncodingException",
"java.util.Calendar"
] | import java.io.UnsupportedEncodingException; import java.util.Calendar; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,004,870 |
protected void enterSnmpContactPart(Production node)
throws ParseException {
} | void function(Production node) throws ParseException { } | /**
* Called when entering a parse tree node.
*
* @param node the node being entered
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when entering a parse tree node | enterSnmpContactPart | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java",
"license": "gpl-2.0",
"size": 275483
} | [
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,801 |
public List<VJoint> getChildren()
{
return children;
}
| List<VJoint> function() { return children; } | /**
* Returns the List of child VJoints
*/ | Returns the List of child VJoints | getChildren | {
"repo_name": "jankolkmeier/HmiCore",
"path": "HmiAnimation/src/hmi/animation/VJoint.java",
"license": "mit",
"size": 55709
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 742,073 |
public static boolean getIsJavaRecordWriter(Configuration conf) {
return conf.getBoolean(Submitter.IS_JAVA_RW, false);
} | static boolean function(Configuration conf) { return conf.getBoolean(Submitter.IS_JAVA_RW, false); } | /**
* Will the reduce use a Java RecordWriter?
* @param conf the configuration to check
* @return true, if the output of the job will be written by Java
*/ | Will the reduce use a Java RecordWriter | getIsJavaRecordWriter | {
"repo_name": "elzaggo/pydoop",
"path": "src/it/crs4/pydoop/mapreduce/pipes/Submitter.java",
"license": "apache-2.0",
"size": 20331
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 751,699 |
public static MetricResults asAttemptedOnlyMetricResults(
MetricsContainerStepMap attemptedMetricsContainers) {
return new MetricsContainerStepMapMetricResults(attemptedMetricsContainers);
} | static MetricResults function( MetricsContainerStepMap attemptedMetricsContainers) { return new MetricsContainerStepMapMetricResults(attemptedMetricsContainers); } | /**
* Returns {@link MetricResults} based on given {@link MetricsContainerStepMap} of attempted
* metrics.
*
* <p>This constructor is intended for runners which only support `attempted` metrics.
* Accessing {@link MetricResult#committed()} in the resulting {@link MetricResults} will result
* in an {@l... | Returns <code>MetricResults</code> based on given <code>MetricsContainerStepMap</code> of attempted metrics. This constructor is intended for runners which only support `attempted` metrics. Accessing <code>MetricResult#committed()</code> in the resulting <code>MetricResults</code> will result in an <code>UnsupportedOpe... | asAttemptedOnlyMetricResults | {
"repo_name": "shakamunyi/beam",
"path": "runners/core-java/src/main/java/org/apache/beam/runners/core/metrics/MetricsContainerStepMap.java",
"license": "apache-2.0",
"size": 18708
} | [
"org.apache.beam.sdk.metrics.MetricResults"
] | import org.apache.beam.sdk.metrics.MetricResults; | import org.apache.beam.sdk.metrics.*; | [
"org.apache.beam"
] | org.apache.beam; | 1,474,179 |
@Test
public void verifyFT22()
throws IOException, InterruptedException {
HttpPost httpPost = createInboxCallDetailsRequestHttpPost(new InboxCallDetailsRequest(
3000000000L, // callingNumber
"A", // operator
"AP", // circle
1234... | void function() throws IOException, InterruptedException { HttpPost httpPost = createInboxCallDetailsRequestHttpPost(new InboxCallDetailsRequest( 3000000000L, "A", "AP", 123456789012345L, 123L, 456L, 123, 2, 4, new HashSet<CallDataRequest>())); assertTrue(SimpleHttpClient.execHttpRequest(httpPost, HttpStatus.SC_OK, ADM... | /**
* NMS_FT_22 To verify the that Save Inbox call Details API request should succeed with content being saved for both
* Packs as blank.
*/ | NMS_FT_22 To verify the that Save Inbox call Details API request should succeed with content being saved for both Packs as blank | verifyFT22 | {
"repo_name": "ngraczewski/mim",
"path": "testing/src/test/java/org/motechproject/nms/testing/it/api/KilkariControllerBundleIT.java",
"license": "bsd-3-clause",
"size": 193191
} | [
"java.io.IOException",
"java.util.HashSet",
"org.apache.commons.httpclient.HttpStatus",
"org.apache.http.client.methods.HttpPost",
"org.junit.Assert",
"org.motechproject.nms.api.web.contract.kilkari.CallDataRequest",
"org.motechproject.nms.api.web.contract.kilkari.InboxCallDetailsRequest",
"org.motech... | import java.io.IOException; import java.util.HashSet; import org.apache.commons.httpclient.HttpStatus; import org.apache.http.client.methods.HttpPost; import org.junit.Assert; import org.motechproject.nms.api.web.contract.kilkari.CallDataRequest; import org.motechproject.nms.api.web.contract.kilkari.InboxCallDetailsReq... | import java.io.*; import java.util.*; import org.apache.commons.httpclient.*; import org.apache.http.client.methods.*; import org.junit.*; import org.motechproject.nms.api.web.contract.kilkari.*; import org.motechproject.nms.kilkari.domain.*; import org.motechproject.testing.osgi.http.*; | [
"java.io",
"java.util",
"org.apache.commons",
"org.apache.http",
"org.junit",
"org.motechproject.nms",
"org.motechproject.testing"
] | java.io; java.util; org.apache.commons; org.apache.http; org.junit; org.motechproject.nms; org.motechproject.testing; | 2,469,256 |
public Map<Long, Set<Short>> getSwitchPorts() {
return switchPorts;
} | Map<Long, Set<Short>> function() { return switchPorts; } | /**
* Getters. No Setters.
*/ | Getters. No Setters | getSwitchPorts | {
"repo_name": "yeasy/lazyctrl",
"path": "ccm/floodlight-lc/src/main/java/net/floodlightcontroller/topology/TopologyManager.java",
"license": "apache-2.0",
"size": 46217
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,386,319 |
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
{
return null;
} | AxisAlignedBB function(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) { return null; } | /**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/ | Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been cleared to be reused) | getCollisionBoundingBoxFromPool | {
"repo_name": "Myrninvollo/Server",
"path": "src/net/minecraft/block/BlockLever.java",
"license": "gpl-2.0",
"size": 14394
} | [
"net.minecraft.util.AxisAlignedBB",
"net.minecraft.world.World"
] | import net.minecraft.util.AxisAlignedBB; import net.minecraft.world.World; | import net.minecraft.util.*; import net.minecraft.world.*; | [
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.util; net.minecraft.world; | 1,388,852 |
public List<Info> approvalsFor(final String object) {
return approvals.getOrDefault(object, Collections.emptyList());
} | List<Info> function(final String object) { return approvals.getOrDefault(object, Collections.emptyList()); } | /**
* Returns approvals for specific Salesforce object type.
*
* @param object type
* @return approvals of specified type
*/ | Returns approvals for specific Salesforce object type | approvalsFor | {
"repo_name": "pmoerenhout/camel",
"path": "components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/api/dto/approval/Approvals.java",
"license": "apache-2.0",
"size": 4433
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,255,945 |
private Recipe recipe(final String name) {
Recipe recipe = recipes.get(name);
checkState(recipe != null, "Missing recipe: %s", name);
return recipe;
} | Recipe function(final String name) { Recipe recipe = recipes.get(name); checkState(recipe != null, STR, name); return recipe; } | /**
* Lookup a recipe by name.
*/ | Lookup a recipe by name | recipe | {
"repo_name": "sonatype/nexus-public",
"path": "components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/manager/internal/RepositoryManagerImpl.java",
"license": "epl-1.0",
"size": 24091
} | [
"com.google.common.base.Preconditions",
"org.sonatype.nexus.repository.Recipe"
] | import com.google.common.base.Preconditions; import org.sonatype.nexus.repository.Recipe; | import com.google.common.base.*; import org.sonatype.nexus.repository.*; | [
"com.google.common",
"org.sonatype.nexus"
] | com.google.common; org.sonatype.nexus; | 580,408 |
void setParameters(Throwable t) throws ExceptionHandlingException;
| void setParameters(Throwable t) throws ExceptionHandlingException; | /**
* Set the parameters (used later).
* @param t a throwable
* @throws ExceptionHandlingException
*/ | Set the parameters (used later) | setParameters | {
"repo_name": "GIP-RECIA/esco-grouper-ui",
"path": "ext/esup-commons/src/main/java/org/esupportail/commons/services/exceptionHandling/ExceptionService.java",
"license": "apache-2.0",
"size": 3259
} | [
"org.esupportail.commons.exceptions.ExceptionHandlingException"
] | import org.esupportail.commons.exceptions.ExceptionHandlingException; | import org.esupportail.commons.exceptions.*; | [
"org.esupportail.commons"
] | org.esupportail.commons; | 1,870,004 |
public void setSearchRoot(String searchRoot) {
setSearchRoots(CmsStringUtil.splitAsArray(searchRoot, ","));
} | void function(String searchRoot) { setSearchRoots(CmsStringUtil.splitAsArray(searchRoot, ",")); } | /**
* Convenience method to set exactly one search root.<p>
*
* @param searchRoot the search root to set
*
* @see #setSearchRoots(String[])
*/ | Convenience method to set exactly one search root | setSearchRoot | {
"repo_name": "victos/opencms-core",
"path": "src/org/opencms/search/CmsSearch.java",
"license": "lgpl-2.1",
"size": 34693
} | [
"org.opencms.util.CmsStringUtil"
] | import org.opencms.util.CmsStringUtil; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 612,019 |
public void testCallableNPE2() {
try {
Callable c = Executors.callable((Runnable) null, one);
shouldThrow();
} catch (NullPointerException success) {}
} | void function() { try { Callable c = Executors.callable((Runnable) null, one); shouldThrow(); } catch (NullPointerException success) {} } | /**
* callable(null, result) throws NPE
*/ | callable(null, result) throws NPE | testCallableNPE2 | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/ExecutorsTest.java",
"license": "gpl-2.0",
"size": 22307
} | [
"java.util.concurrent.Callable",
"java.util.concurrent.Executors"
] | import java.util.concurrent.Callable; import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,340,115 |
public void addToLikedCars(List<String> likedCars); | void function(List<String> likedCars); | /**
* Adds to the List by treating List as a Set.
* Thus adds only if not already exists in the List and avoids duplication.
* See appendToLikedCars to append to List.
*/ | Adds to the List by treating List as a Set. Thus adds only if not already exists in the List and avoids duplication. See appendToLikedCars to append to List | addToLikedCars | {
"repo_name": "pdd/mongoj",
"path": "samples/PortletAndService/UsedCarService/src/java/service/org/mongoj/samples/model/UserModel.java",
"license": "mit",
"size": 7175
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,822,134 |
protected static LazySimpleSerDe createSerde(Table tbl, HiveConf conf, char serdeSeparator)
throws SerializationError {
try {
Properties tableProps = MetaStoreUtils.getTableMetadata(tbl);
tableProps.setProperty("field.delim", String.valueOf(serdeSeparator));
LazySimpleSerDe serde = new... | static LazySimpleSerDe function(Table tbl, HiveConf conf, char serdeSeparator) throws SerializationError { try { Properties tableProps = MetaStoreUtils.getTableMetadata(tbl); tableProps.setProperty(STR, String.valueOf(serdeSeparator)); LazySimpleSerDe serde = new LazySimpleSerDe(); SerDeUtils.initializeSerDe(serde, con... | /**
* Creates LazySimpleSerde
* @return
* @throws SerializationError if serde could not be initialized
* @param tbl
*/ | Creates LazySimpleSerde | createSerde | {
"repo_name": "alanfgates/hive",
"path": "hcatalog/streaming/src/java/org/apache/hive/hcatalog/streaming/DelimitedInputWriter.java",
"license": "apache-2.0",
"size": 13736
} | [
"java.util.Properties",
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.metastore.api.Table",
"org.apache.hadoop.hive.metastore.utils.MetaStoreUtils",
"org.apache.hadoop.hive.serde2.SerDeException",
"org.apache.hadoop.hive.serde2.SerDeUtils",
"org.apache.hadoop.hive.serde2.lazy.LazySimpl... | import java.util.Properties; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.metastore.api.Table; import org.apache.hadoop.hive.metastore.utils.MetaStoreUtils; import org.apache.hadoop.hive.serde2.SerDeException; import org.apache.hadoop.hive.serde2.SerDeUtils; import org.apache.hadoop.hive.s... | import java.util.*; import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.metastore.utils.*; import org.apache.hadoop.hive.serde2.*; import org.apache.hadoop.hive.serde2.lazy.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,018,237 |
private void createConfigurationFile( double[] targetResolutions ) {
// copy this file to the target directory
String resolutions = "";
sort( targetResolutions );
int length = targetResolutions.length;
for ( int i = 0; i < length; i++ ) {
resolutions += ... | void function( double[] targetResolutions ) { String resolutions = STRupperleftllSTRlowerrightllSTRupperleftSTRlowerrightSTRdataDirSTRSTRdataDirSTRSTRlabelSTRnameSTRdescriptionSTRSTRkeywordsSTRSTRresolutionsSTRrawSTRtifSTRrawSTRGeoTiffSTRmimeTypeSTRsrsSTRsrsPreSTRwcs_STR_configuration.xml"; File dstFile = new File( out... | /**
* creates a configuration file (extended CoverageDescriotion) for a WCS coverage considering the passed resolution
* levels
*
* @param targetResolutions
*/ | creates a configuration file (extended CoverageDescriotion) for a WCS coverage considering the passed resolution levels | createConfigurationFile | {
"repo_name": "lat-lon/deegree2-base",
"path": "deegree2-core/src/main/java/org/deegree/tools/raster/RasterTreeBuilder.java",
"license": "lgpl-2.1",
"size": 75541
} | [
"java.io.File",
"java.io.FileOutputStream"
] | import java.io.File; import java.io.FileOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,863,009 |
private void configure() throws IOException {
long length = support.getContentLength();
boolean empty = support.isEmpty();
boolean tunnel = support.isTunnel();
if(tunnel) {
support.setConnectionUpgrade();
} else if(empty) {
support.setContentLength(0);
} ... | void function() throws IOException { long length = support.getContentLength(); boolean empty = support.isEmpty(); boolean tunnel = support.isTunnel(); if(tunnel) { support.setConnectionUpgrade(); } else if(empty) { support.setContentLength(0); } else if(length >= 0) { support.setContentLength(length); } else { support.... | /**
* This method is used to set the required HTTP headers on the
* response. This will check the existing HTTP headers, and if
* there is insufficient data chunked encoding will be used for
* HTTP/1.1 and connection close will be used for HTTP/1.0.
*/ | This method is used to set the required HTTP headers on the response. This will check the existing HTTP headers, and if there is insufficient data chunked encoding will be used for HTTP/1.1 and connection close will be used for HTTP/1.0 | configure | {
"repo_name": "ggeorg/chillverse",
"path": "simple-http/src/main/java/org/simpleframework/http/core/ResponseEncoder.java",
"license": "apache-2.0",
"size": 11465
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,682,988 |
public List<Long> getLocation() {
return location;
} | List<Long> function() { return location; } | /**
* Gets the location.
*
* <p>Character offsets indicating the beginning and end of the token in the analyzed text.
*
* @return the location
*/ | Gets the location. Character offsets indicating the beginning and end of the token in the analyzed text | getLocation | {
"repo_name": "watson-developer-cloud/java-sdk",
"path": "natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/model/TokenResult.java",
"license": "apache-2.0",
"size": 2853
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,113,759 |
public IgniteInternalFuture<Boolean> dynamicStartCaches(
Collection<CacheConfiguration> ccfgList,
boolean failIfExists,
boolean checkThreadTx,
boolean disabledAfterStart
) {
return dynamicStartCachesByStoredConf(
ccfgList.stream().map(StoredCacheData::new).col... | IgniteInternalFuture<Boolean> function( Collection<CacheConfiguration> ccfgList, boolean failIfExists, boolean checkThreadTx, boolean disabledAfterStart ) { return dynamicStartCachesByStoredConf( ccfgList.stream().map(StoredCacheData::new).collect(Collectors.toList()), failIfExists, checkThreadTx, disabledAfterStart, n... | /**
* Dynamically starts multiple caches.
*
* @param ccfgList Collection of cache configuration.
* @param failIfExists Fail if exists flag.
* @param checkThreadTx If {@code true} checks that current thread does not have active transactions.
* @param disabledAfterStart If true, cache proxie... | Dynamically starts multiple caches | dynamicStartCaches | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java",
"license": "apache-2.0",
"size": 207339
} | [
"java.util.Collection",
"java.util.stream.Collectors",
"org.apache.ignite.configuration.CacheConfiguration",
"org.apache.ignite.internal.IgniteInternalFuture"
] | import java.util.Collection; import java.util.stream.Collectors; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.internal.IgniteInternalFuture; | import java.util.*; import java.util.stream.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,420,340 |
public short readShort() throws IOException, CardTerminalException {
byte[] bytes = new byte[2];
this.readFully(bytes);
DataInputStream in = new DataInputStream(new ByteArrayInputStream(bytes));
return in.readShort();
}
| short function() throws IOException, CardTerminalException { byte[] bytes = new byte[2]; this.readFully(bytes); DataInputStream in = new DataInputStream(new ByteArrayInputStream(bytes)); return in.readShort(); } | /** Reads a 16 bit short.
*
* @return The read 16 bit short.
* @exception java.io.IOException
* Thrown if an I/O error has occurred.
* @exception opencard.core.terminal.CardTerminalException
* Thrown when the smart card has been removed.
*/ | Reads a 16 bit short | readShort | {
"repo_name": "zeroDenial/CNSReader",
"path": "ocf/opencard/opt/iso/fs/CardRandomByteAccess.java",
"license": "gpl-2.0",
"size": 23305
} | [
"java.io.ByteArrayInputStream",
"java.io.DataInputStream",
"java.io.IOException"
] | import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,202,032 |
public static <T> Matcher<T> oneOf(T... elements) {
return in(elements);
} | static <T> Matcher<T> function(T... elements) { return in(elements); } | /**
* Creates a matcher that matches when the examined object is equal to one of the
* specified elements.
* For example:
* <pre>assertThat("foo", is(oneOf("bar", "foo")))</pre>
*
* @param elements
* the elements amongst which matching items will be found
*
*/ | Creates a matcher that matches when the examined object is equal to one of the specified elements. For example: <code>assertThat("foo", is(oneOf("bar", "foo")))</code> | oneOf | {
"repo_name": "wgpshashank/JavaHamcrest",
"path": "hamcrest-library/src/main/java/org/hamcrest/collection/IsIn.java",
"license": "bsd-3-clause",
"size": 3495
} | [
"org.hamcrest.Matcher"
] | import org.hamcrest.Matcher; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 328,503 |
@Column(name = "elementType")
public String getType() {
return type;
} | @Column(name = STR) String function() { return type; } | /**
* <p>Getter for the field <code>type</code>.</p>
*
* @return a {@link java.lang.String} object.
*/ | Getter for the field <code>type</code> | getType | {
"repo_name": "dzonekl/oss2nms",
"path": "plugins/com.netxforge.oss2.model/src/com/netxforge/oss2/model/OnmsMapElement.java",
"license": "gpl-3.0",
"size": 8572
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,831,979 |
public void setFocus() {
text.setFocus();
}
private static class StyledTextBuilder implements Message.StyledAppendable {
private final StyleRange[] styles;
private final ArrayList<Integer> ranges = new ArrayList<>();
private final ArrayList<StyleRange> styleRanges = new ArrayList<>();
private... | void function() { text.setFocus(); } private static class StyledTextBuilder implements Message.StyledAppendable { private final StyleRange[] styles; private final ArrayList<Integer> ranges = new ArrayList<>(); private final ArrayList<StyleRange> styleRanges = new ArrayList<>(); private final StringBuilder builder = new... | /**
* Passing the focus request to the viewer's control.
*/ | Passing the focus request to the viewer's control | setFocus | {
"repo_name": "wpilibsuite/EclipsePlugins",
"path": "edu.wpi.first.wpilib.plugins.riolog/src/netconsole2/views/RiologView.java",
"license": "bsd-3-clause",
"size": 21275
} | [
"java.util.ArrayList",
"org.eclipse.swt.custom.StyleRange"
] | import java.util.ArrayList; import org.eclipse.swt.custom.StyleRange; | import java.util.*; import org.eclipse.swt.custom.*; | [
"java.util",
"org.eclipse.swt"
] | java.util; org.eclipse.swt; | 2,745,188 |
@Generated("This method was generated using jOOQ-tools")
static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> Seq<R> zip(Stream<T1> s1, Stream<T2> s2, Stream<T3> s3, Stream<T4> s4, Stream<T5> s5, Stream<T6> s6, Stream<T7> s7, Stream<T8> s8, Stream<T9> s9, Stream<T10> s10, Stream<T11> s11... | @Generated(STR) static <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, R> Seq<R> zip(Stream<T1> s1, Stream<T2> s2, Stream<T3> s3, Stream<T4> s4, Stream<T5> s5, Stream<T6> s6, Stream<T7> s7, Stream<T8> s8, Stream<T9> s9, Stream<T10> s10, Stream<T11> s11, Stream<T12> s12, Stream<T13> s13, Stream<T14> s... | /**
* Zip 15 streams into one using a {@link Function15} to produce resulting values.
* <p>
* <code><pre>
* // ("1:a", "2:b", "3:c")
* Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s)
* </pre></code>
*/ | Zip 15 streams into one using a <code>Function15</code> to produce resulting values. <code><code> ("1:a", "2:b", "3:c") Seq.of(1, 2, 3).zip(Seq.of("a", "b", "c"), (i, s) -> i + ":" + s) </code></code> | zip | {
"repo_name": "stephenh/jOOL",
"path": "src/main/java/org/jooq/lambda/Seq.java",
"license": "apache-2.0",
"size": 198501
} | [
"java.util.stream.Stream",
"javax.annotation.Generated",
"org.jooq.lambda.function.Function15"
] | import java.util.stream.Stream; import javax.annotation.Generated; import org.jooq.lambda.function.Function15; | import java.util.stream.*; import javax.annotation.*; import org.jooq.lambda.function.*; | [
"java.util",
"javax.annotation",
"org.jooq.lambda"
] | java.util; javax.annotation; org.jooq.lambda; | 424,219 |
public static <S extends TransitiveInfoCollection, C extends TransitiveInfoProvider> Iterable<S>
filterByProvider(Iterable<S> prerequisites, final Class<C> provider) {
return Iterables.filter(prerequisites, target -> target.getProvider(provider) != null);
} | static <S extends TransitiveInfoCollection, C extends TransitiveInfoProvider> Iterable<S> function(Iterable<S> prerequisites, final Class<C> provider) { return Iterables.filter(prerequisites, target -> target.getProvider(provider) != null); } | /**
* Returns the iterable of collections that have the specified provider.
*/ | Returns the iterable of collections that have the specified provider | filterByProvider | {
"repo_name": "perezd/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/AnalysisUtils.java",
"license": "apache-2.0",
"size": 9695
} | [
"com.google.common.collect.Iterables"
] | import com.google.common.collect.Iterables; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,082,554 |
private List<RenderingDef> bulkLoadOwnerRenderingSettings(
Set<Long> pixelsIds)
{
StopWatch s1 = new Slf4JStopWatch(
"omero.bulkLoadOwnerRenderingSettings");
List<RenderingDef> toReturn = queryService.findAllByQuery(
"select r from RenderingDef as r " ... | List<RenderingDef> function( Set<Long> pixelsIds) { StopWatch s1 = new Slf4JStopWatch( STR); List<RenderingDef> toReturn = queryService.findAllByQuery( STR + STR + STR + STR + STR + STR + STR, new Parameters().addIds(pixelsIds)); s1.stop(); return toReturn; } | /**
* Bulk loads a set of rendering sets for a group of pixels sets.
* @param pixelsIds the Pixels sets to retrieve thumbnails for.
* @return Loaded rendering settings for <code>pixelsIds</code>.
*/ | Bulk loads a set of rendering sets for a group of pixels sets | bulkLoadOwnerRenderingSettings | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/server/src/ome/services/ThumbnailCtx.java",
"license": "gpl-2.0",
"size": 40123
} | [
"java.util.List",
"java.util.Set",
"org.perf4j.StopWatch",
"org.perf4j.slf4j.Slf4JStopWatch"
] | import java.util.List; import java.util.Set; import org.perf4j.StopWatch; import org.perf4j.slf4j.Slf4JStopWatch; | import java.util.*; import org.perf4j.*; import org.perf4j.slf4j.*; | [
"java.util",
"org.perf4j",
"org.perf4j.slf4j"
] | java.util; org.perf4j; org.perf4j.slf4j; | 2,777,383 |
public PowbProgramChange find(long id);
| PowbProgramChange function(long id); | /**
* This method gets a powbProgramChange object by a given powbProgramChange identifier.
*
* @param powbProgramChangeID is the powbProgramChange identifier.
* @return a PowbProgramChange object.
*/ | This method gets a powbProgramChange object by a given powbProgramChange identifier | find | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/dao/PowbProgramChangeDAO.java",
"license": "gpl-3.0",
"size": 2637
} | [
"org.cgiar.ccafs.marlo.data.model.PowbProgramChange"
] | import org.cgiar.ccafs.marlo.data.model.PowbProgramChange; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 1,269,206 |
private void simulateScrollResponse(DummyAsyncBulkByScrollAction action, TimeValue lastBatchTime, int lastBatchSize,
ScrollableHitSource.Response response) {
action.setScroll(scrollId());
action.onScrollResponse(lastBatchTime, lastBatchSize, response);
}
private class DummyAsync... | void function(DummyAsyncBulkByScrollAction action, TimeValue lastBatchTime, int lastBatchSize, ScrollableHitSource.Response response) { action.setScroll(scrollId()); action.onScrollResponse(lastBatchTime, lastBatchSize, response); } private class DummyAsyncBulkByScrollAction extends AbstractAsyncBulkByScrollAction<Dumm... | /**
* Simulate a scroll response by setting the scroll id and firing the onScrollResponse method.
*/ | Simulate a scroll response by setting the scroll id and firing the onScrollResponse method | simulateScrollResponse | {
"repo_name": "strapdata/elassandra",
"path": "modules/reindex/src/test/java/org/elasticsearch/index/reindex/AsyncBulkByScrollActionTests.java",
"license": "apache-2.0",
"size": 43871
} | [
"org.elasticsearch.client.ParentTaskAssigningClient",
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.client.ParentTaskAssigningClient; import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.client.*; import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.client",
"org.elasticsearch.common"
] | org.elasticsearch.client; org.elasticsearch.common; | 214,666 |
public boolean isSuccessorOf(final PosVelChebyshev predecessor) {
final double gap = start.durationFrom(predecessor.start) - predecessor.duration;
return FastMath.abs(gap) < 0.001;
} | boolean function(final PosVelChebyshev predecessor) { final double gap = start.durationFrom(predecessor.start) - predecessor.duration; return FastMath.abs(gap) < 0.001; } | /** Check if the instance is the exact successor of another model.
* <p>The instance is the successor of another model if its start
* date is within a 1ms tolerance interval of the end date of the
* other model.</p>
* @param predecessor model to check instance against
* @return true if the inst... | Check if the instance is the exact successor of another model. The instance is the successor of another model if its start date is within a 1ms tolerance interval of the end date of the other model | isSuccessorOf | {
"repo_name": "liscju/Orekit",
"path": "src/main/java/org/orekit/bodies/PosVelChebyshev.java",
"license": "apache-2.0",
"size": 6676
} | [
"org.apache.commons.math3.util.FastMath"
] | import org.apache.commons.math3.util.FastMath; | import org.apache.commons.math3.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,171,931 |
public Collection<Frame> inheritsFrom() {
return relatedFrames("Inheritance", FrameNetRelationDirection.UP);
} | Collection<Frame> function() { return relatedFrames(STR, FrameNetRelationDirection.UP); } | /**
* Retrieves related frames. See
* {@link Frame#relatedFrames(String, FrameNetRelationDirection)} for
* details.
*
* @return A collection of frames.
*/ | Retrieves related frames. See <code>Frame#relatedFrames(String, FrameNetRelationDirection)</code> for details | inheritsFrom | {
"repo_name": "FabianFriedrich/Text2Process",
"path": "src/de/saar/coli/salsa/reiter/framenet/Frame.java",
"license": "gpl-3.0",
"size": 23070
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,014,891 |
public Collection<TriggerProxy<? extends DocumentTrigger>> getDocumentTriggers();
// public DocumentTrigger getDocumentTrigger(); | Collection<TriggerProxy<? extends DocumentTrigger>> function(); | /**
* Master document triggers.
*/ | Master document triggers | getDocumentTriggers | {
"repo_name": "hungerburg/exist",
"path": "src/org/exist/Database.java",
"license": "lgpl-2.1",
"size": 4919
} | [
"java.util.Collection",
"org.exist.collections.triggers.DocumentTrigger",
"org.exist.collections.triggers.TriggerProxy"
] | import java.util.Collection; import org.exist.collections.triggers.DocumentTrigger; import org.exist.collections.triggers.TriggerProxy; | import java.util.*; import org.exist.collections.triggers.*; | [
"java.util",
"org.exist.collections"
] | java.util; org.exist.collections; | 2,050,367 |
public void setAuthenticationProviders(
List<AuthenticationProvider> authenticationProviders) {
this.authenticationProviders = authenticationProviders;
}
| void function( List<AuthenticationProvider> authenticationProviders) { this.authenticationProviders = authenticationProviders; } | /**
* Set the list of authentication providers.
*
* @param authenticationProviders
*/ | Set the list of authentication providers | setAuthenticationProviders | {
"repo_name": "nate-rcl/irplus",
"path": "ir_service/src/edu/ur/ir/security/service/DefaultExternalAuthenticaionProvider.java",
"license": "apache-2.0",
"size": 3294
} | [
"java.util.List",
"org.springframework.security.authentication.AuthenticationProvider"
] | import java.util.List; import org.springframework.security.authentication.AuthenticationProvider; | import java.util.*; import org.springframework.security.authentication.*; | [
"java.util",
"org.springframework.security"
] | java.util; org.springframework.security; | 2,550,666 |
public Size2D arrange(BlockContainer container, Graphics2D g2,
RectangleConstraint constraint) {
LengthConstraintType w = constraint.getWidthConstraintType();
LengthConstraintType h = constraint.getHeightConstraintType();
if (w == LengthConstraintType.NONE)... | Size2D function(BlockContainer container, Graphics2D g2, RectangleConstraint constraint) { LengthConstraintType w = constraint.getWidthConstraintType(); LengthConstraintType h = constraint.getHeightConstraintType(); if (w == LengthConstraintType.NONE) { if (h == LengthConstraintType.NONE) { return arrangeNN(container, ... | /**
* Calculates and sets the bounds of all the items in the specified
* container, subject to the given constraint. The <code>Graphics2D</code>
* can be used by some items (particularly items containing text) to
* calculate sizing parameters.
*
* @param container the container whose ... | Calculates and sets the bounds of all the items in the specified container, subject to the given constraint. The <code>Graphics2D</code> can be used by some items (particularly items containing text) to calculate sizing parameters | arrange | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/block/CenterArrangement.java",
"license": "lgpl-2.1",
"size": 11462
} | [
"java.awt.Graphics2D",
"org.jfree.ui.Size2D"
] | import java.awt.Graphics2D; import org.jfree.ui.Size2D; | import java.awt.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.ui"
] | java.awt; org.jfree.ui; | 1,047,003 |
protected void setProcessDefinitionVersionsAndIds(ParsedDeployment parsedDeployment,
Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions) {
CommandContext commandContext = Context.getCommandContext();
for (ProcessDefinitionEntity processDefinition : parsedDeployment.getA... | void function(ParsedDeployment parsedDeployment, Map<ProcessDefinitionEntity, ProcessDefinitionEntity> mapNewToOldProcessDefinitions) { CommandContext commandContext = Context.getCommandContext(); for (ProcessDefinitionEntity processDefinition : parsedDeployment.getAllProcessDefinitions()) { int version = 1; ProcessDef... | /**
* Sets the version on each process definition entity, and the identifier. If the map contains
* an older version for a process definition, then the version is set to that older entity's
* version plus one; otherwise it is set to 1. Also dispatches an ENTITY_CREATED event.
*/ | Sets the version on each process definition entity, and the identifier. If the map contains an older version for a process definition, then the version is set to that older entity's version plus one; otherwise it is set to 1. Also dispatches an ENTITY_CREATED event | setProcessDefinitionVersionsAndIds | {
"repo_name": "roberthafner/flowable-engine",
"path": "modules/flowable-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java",
"license": "apache-2.0",
"size": 21511
} | [
"java.util.Map",
"org.activiti.engine.delegate.event.ActivitiEventType",
"org.activiti.engine.delegate.event.impl.ActivitiEventBuilder",
"org.activiti.engine.impl.context.Context",
"org.activiti.engine.impl.interceptor.CommandContext",
"org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity"
... | import java.util.Map; import org.activiti.engine.delegate.event.ActivitiEventType; import org.activiti.engine.delegate.event.impl.ActivitiEventBuilder; import org.activiti.engine.impl.context.Context; import org.activiti.engine.impl.interceptor.CommandContext; import org.activiti.engine.impl.persistence.entity.ProcessD... | import java.util.*; import org.activiti.engine.delegate.event.*; import org.activiti.engine.delegate.event.impl.*; import org.activiti.engine.impl.context.*; import org.activiti.engine.impl.interceptor.*; import org.activiti.engine.impl.persistence.entity.*; | [
"java.util",
"org.activiti.engine"
] | java.util; org.activiti.engine; | 376,330 |
public int createWidget(Class<? extends AppWidgetProvider> appWidgetProviderClass, int widgetLayoutId) {
return createWidgets(appWidgetProviderClass, widgetLayoutId, 1)[0];
} | int function(Class<? extends AppWidgetProvider> appWidgetProviderClass, int widgetLayoutId) { return createWidgets(appWidgetProviderClass, widgetLayoutId, 1)[0]; } | /**
* Creates a widget by inflating its layout.
*
* @param appWidgetProviderClass the app widget provider class
* @param widgetLayoutId id of the layout to inflate
* @return the ID of the new widget
*/ | Creates a widget by inflating its layout | createWidget | {
"repo_name": "qx/FullRobolectricTestSample",
"path": "src/main/java/org/robolectric/shadows/ShadowAppWidgetManager.java",
"license": "mit",
"size": 10553
} | [
"android.appwidget.AppWidgetProvider"
] | import android.appwidget.AppWidgetProvider; | import android.appwidget.*; | [
"android.appwidget"
] | android.appwidget; | 193,935 |
protected void renderReportUsingOutputStream(net.sf.jasperreports.engine.JRExporter exporter,
JasperPrint populatedReport, HttpServletResponse response) throws Exception {
// IE workaround: write into byte array first.
ByteArrayOutputStream baos = createTemporaryOutputStream();
JasperReportsUtils.render(ex... | void function(net.sf.jasperreports.engine.JRExporter exporter, JasperPrint populatedReport, HttpServletResponse response) throws Exception { ByteArrayOutputStream baos = createTemporaryOutputStream(); JasperReportsUtils.render(exporter, populatedReport, baos); writeToResponse(response, baos); } | /**
* We need to write binary output to the response OutputStream.
* @param exporter the JasperReports exporter to use
* @param populatedReport the populated {@code JasperPrint} to render
* @param response the HTTP response the report should be rendered to
* @throws Exception if rendering failed
*/ | We need to write binary output to the response OutputStream | renderReportUsingOutputStream | {
"repo_name": "QBNemo/spring-mvc-showcase",
"path": "src/main/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsSingleFormatView.java",
"license": "apache-2.0",
"size": 5383
} | [
"java.io.ByteArrayOutputStream",
"javax.servlet.http.HttpServletResponse",
"net.sf.jasperreports.engine.JasperPrint",
"org.springframework.ui.jasperreports.JasperReportsUtils"
] | import java.io.ByteArrayOutputStream; import javax.servlet.http.HttpServletResponse; import net.sf.jasperreports.engine.JasperPrint; import org.springframework.ui.jasperreports.JasperReportsUtils; | import java.io.*; import javax.servlet.http.*; import net.sf.jasperreports.engine.*; import org.springframework.ui.jasperreports.*; | [
"java.io",
"javax.servlet",
"net.sf.jasperreports",
"org.springframework.ui"
] | java.io; javax.servlet; net.sf.jasperreports; org.springframework.ui; | 837,395 |
if (nameMap == null) initNameMaps();
Iterator<ClubName> iprof = this.nameMap.keySet().iterator();
return iprof;
}
public int getValue(String s) {return strMap.get(s);} | if (nameMap == null) initNameMaps(); Iterator<ClubName> iprof = this.nameMap.keySet().iterator(); return iprof; } public int getValue(String s) {return strMap.get(s);} | /**
* Iterator method returns an Iterator for a list of ClubName
*
* @return
*/ | Iterator method returns an Iterator for a list of ClubName | iterator | {
"repo_name": "timj-pdx/tennis-scheduler",
"path": "TennisScheduler/src/tennisscheduler/ClubNameMgr.java",
"license": "gpl-2.0",
"size": 2621
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,459,757 |
public void connect(UserCredentials uc)
throws DSOutOfServiceException
{
if (uc == null)
throw new NullPointerException("No user credentials.");
String name = (String)
container.getRegistry().lookup(LookupNames.MASTER);
if (name == null) name = LookupNames.MASTER_INSIGHT;
client clie... | void function(UserCredentials uc) throws DSOutOfServiceException { if (uc == null) throw new NullPointerException(STR); String name = (String) container.getRegistry().lookup(LookupNames.MASTER); if (name == null) name = LookupNames.MASTER_INSIGHT; client client = omeroGateway.createSession(uc.getUserName(), uc.getPassw... | /**
* Attempts to connect to <i>OMERO</i> server.
*
* @param uc The user's credentials for logging onto <i>OMERO</i> server.
* @throws DSOutOfServiceException If the connection can't be established
* or the credentials are invalid.
*/ | Attempts to connect to OMERO server | connect | {
"repo_name": "emilroz/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/DataServicesFactory.java",
"license": "gpl-2.0",
"size": 28499
} | [
"java.util.Iterator",
"java.util.List",
"org.openmicroscopy.shoola.env.LookupNames",
"org.openmicroscopy.shoola.env.config.AgentInfo",
"org.openmicroscopy.shoola.env.config.Registry",
"org.openmicroscopy.shoola.env.data.login.UserCredentials"
] | import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.env.LookupNames; import org.openmicroscopy.shoola.env.config.AgentInfo; import org.openmicroscopy.shoola.env.config.Registry; import org.openmicroscopy.shoola.env.data.login.UserCredentials; | import java.util.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.config.*; import org.openmicroscopy.shoola.env.data.login.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 182,625 |
List<EnvironmentDto> findEnvironmentsByAppRelease(String releaseUID) throws ApplicationReleaseNotFoundException; | List<EnvironmentDto> findEnvironmentsByAppRelease(String releaseUID) throws ApplicationReleaseNotFoundException; | /**
* Find all registered environments for a given application release
*
* @param releaseUID
* The application release uid.
* @throws ApplicationReleaseNotFoundException
* application release is not found
*/ | Find all registered environments for a given application release | findEnvironmentsByAppRelease | {
"repo_name": "Orange-OpenSource/elpaaso-core",
"path": "cloud-paas/cloud-paas-services/src/main/java/com/francetelecom/clara/cloud/core/service/ManageEnvironment.java",
"license": "apache-2.0",
"size": 8600
} | [
"com.francetelecom.clara.cloud.core.service.exception.ApplicationReleaseNotFoundException",
"com.francetelecom.clara.cloud.services.dto.EnvironmentDto",
"java.util.List"
] | import com.francetelecom.clara.cloud.core.service.exception.ApplicationReleaseNotFoundException; import com.francetelecom.clara.cloud.services.dto.EnvironmentDto; import java.util.List; | import com.francetelecom.clara.cloud.core.service.exception.*; import com.francetelecom.clara.cloud.services.dto.*; import java.util.*; | [
"com.francetelecom.clara",
"java.util"
] | com.francetelecom.clara; java.util; | 2,383,600 |
@Test
@Category(ValidatesRunner.class)
public void testWindowedIsEqualTo() throws Exception {
PCollection<Integer> pcollection =
pipeline
.apply(
Create.timestamped(
TimestampedValue.of(43, new Instant(250L)),
TimestampedValue.of(22, ... | @Category(ValidatesRunner.class) void function() throws Exception { PCollection<Integer> pcollection = pipeline .apply( Create.timestamped( TimestampedValue.of(43, new Instant(250L)), TimestampedValue.of(22, new Instant(-250L)))) .apply(Window.into(FixedWindows.of(Duration.millis(500L)))); PAssert.thatSingleton(pcollec... | /**
* Basic test for {@code isEqualTo}.
*/ | Basic test for isEqualTo | testWindowedIsEqualTo | {
"repo_name": "tgroh/incubator-beam",
"path": "sdks/java/core/src/test/java/org/apache/beam/sdk/testing/PAssertTest.java",
"license": "apache-2.0",
"size": 21285
} | [
"org.apache.beam.sdk.transforms.Create",
"org.apache.beam.sdk.transforms.windowing.FixedWindows",
"org.apache.beam.sdk.transforms.windowing.IntervalWindow",
"org.apache.beam.sdk.transforms.windowing.Window",
"org.apache.beam.sdk.values.PCollection",
"org.apache.beam.sdk.values.TimestampedValue",
"org.jo... | import org.apache.beam.sdk.transforms.Create; import org.apache.beam.sdk.transforms.windowing.FixedWindows; import org.apache.beam.sdk.transforms.windowing.IntervalWindow; import org.apache.beam.sdk.transforms.windowing.Window; import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.Timestamped... | import org.apache.beam.sdk.transforms.*; import org.apache.beam.sdk.transforms.windowing.*; import org.apache.beam.sdk.values.*; import org.joda.time.*; import org.junit.experimental.categories.*; | [
"org.apache.beam",
"org.joda.time",
"org.junit.experimental"
] | org.apache.beam; org.joda.time; org.junit.experimental; | 1,911,441 |
public void wikipedia(View view) {
Log.i(CLASS_TAG, "wikipedia in ResultActivity called");
this.webTextView.setText("Loading...");
if(translationText.isFocused()) {
try {
Log.i(CLASS_TAG, "instantiation of Wikipedia");
Wikipedia wikipedia = new ... | void function(View view) { Log.i(CLASS_TAG, STR); this.webTextView.setText(STR); if(translationText.isFocused()) { try { Log.i(CLASS_TAG, STR); Wikipedia wikipedia = new Wikipedia(); wikipedia.enrichFromWikipedia(this, this.selectedText, this.source, this.target); } catch (ValidationException e) { Log.d(CLASS_TAG, e.ge... | /**
* Instantiates a {@link Wikipedia} service object and passes source language, target language
* and the selected text. The next step will be delegated by use of the
* interface {@link WikipediaResponse} and the method {@link WikipediaResponse#wikipediaFinished(JSONObject)}.
*/ | Instantiates a <code>Wikipedia</code> service object and passes source language, target language and the selected text. The next step will be delegated by use of the interface <code>WikipediaResponse</code> and the method <code>WikipediaResponse#wikipediaFinished(JSONObject)</code> | wikipedia | {
"repo_name": "2lastview/haello-Android-Application",
"path": "app/src/main/java/com/example/moritztomasi/clicklesstextenricherapplication/activities/ResultActivity.java",
"license": "apache-2.0",
"size": 26001
} | [
"android.util.Log",
"android.view.View",
"com.example.moritztomasi.clicklesstextenricherapplication.common.SupportException",
"com.example.moritztomasi.clicklesstextenricherapplication.common.ValidationException",
"com.example.moritztomasi.clicklesstextenricherapplication.enrichment.Wikipedia"
] | import android.util.Log; import android.view.View; import com.example.moritztomasi.clicklesstextenricherapplication.common.SupportException; import com.example.moritztomasi.clicklesstextenricherapplication.common.ValidationException; import com.example.moritztomasi.clicklesstextenricherapplication.enrichment.Wikipedia; | import android.util.*; import android.view.*; import com.example.moritztomasi.clicklesstextenricherapplication.common.*; import com.example.moritztomasi.clicklesstextenricherapplication.enrichment.*; | [
"android.util",
"android.view",
"com.example.moritztomasi"
] | android.util; android.view; com.example.moritztomasi; | 2,566,469 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.