method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Builder salt(String salt) {
this.salt = salt.getBytes(StandardCharsets.UTF_8);
return this;
} | Builder function(String salt) { this.salt = salt.getBytes(StandardCharsets.UTF_8); return this; } | /**
* Set salt for key derivation.
* @param salt the salt
* @return this Builder
*/ | Set salt for key derivation | salt | {
"repo_name": "sguilhen/wildfly-elytron",
"path": "src/main/java/org/wildfly/security/util/PasswordBasedEncryptionUtil.java",
"license": "apache-2.0",
"size": 17573
} | [
"java.nio.charset.StandardCharsets"
] | import java.nio.charset.StandardCharsets; | import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 1,028,152 |
public void onLocationChanged(Location location) {
this.model.updateLocationOfUser(location);
this.locationManager.requestLocationUpdates(PROVIDER, this.view.getRefreshmentRateInSeconds()*1000, MIN_DISTANCE, this);
} | void function(Location location) { this.model.updateLocationOfUser(location); this.locationManager.requestLocationUpdates(PROVIDER, this.view.getRefreshmentRateInSeconds()*1000, MIN_DISTANCE, this); } | /**
* When the location of the device changed, update the location of user.
* @param location The new location of the device
*/ | When the location of the device changed, update the location of user | onLocationChanged | {
"repo_name": "TheoGauchoux/ASOM-Mobile",
"path": "Application/ASOM-Mobile/app/src/main/java/iutvalence/projetinfo2a/groupe21/asom_mobile/Controller/Services/Locator.java",
"license": "gpl-2.0",
"size": 5336
} | [
"android.location.Location"
] | import android.location.Location; | import android.location.*; | [
"android.location"
] | android.location; | 2,129,564 |
public void getChilds(String path) {
folderService.getChilds(path, false, null, callbackGetChilds);
Main.get().mainPanel.desktop.navigator.status.setFlagChilds();
}
| void function(String path) { folderService.getChilds(path, false, null, callbackGetChilds); Main.get().mainPanel.desktop.navigator.status.setFlagChilds(); } | /**
* Refresh the folders on a item node
*
* @param path
* The folder path selected to list items
*/ | Refresh the folders on a item node | getChilds | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/frontend/client/widget/foldertree/FolderTree.java",
"license": "gpl-3.0",
"size": 48471
} | [
"com.openkm.frontend.client.Main"
] | import com.openkm.frontend.client.Main; | import com.openkm.frontend.client.*; | [
"com.openkm.frontend"
] | com.openkm.frontend; | 165,764 |
@Test
public void line_length_null() throws Exception {
StringWriter sw = new StringWriter();
FoldedLineWriter writer = new FoldedLineWriter(sw);
writer.setLineLength(null);
writer.write("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliq... | void function() throws Exception { StringWriter sw = new StringWriter(); FoldedLineWriter writer = new FoldedLineWriter(sw); writer.setLineLength(null); writer.write(STR); writer.close(); String actual = sw.toString(); String expected = STR; assertEquals(expected, actual); } | /**
* Setting the line length to "null" disables line folding.
*/ | Setting the line length to "null" disables line folding | line_length_null | {
"repo_name": "mangstadt/vinnie",
"path": "src/test/java/com/github/mangstadt/vinnie/io/FoldedLineWriterTest.java",
"license": "apache-2.0",
"size": 14202
} | [
"java.io.StringWriter",
"org.junit.Assert"
] | import java.io.StringWriter; import org.junit.Assert; | import java.io.*; import org.junit.*; | [
"java.io",
"org.junit"
] | java.io; org.junit; | 2,176,178 |
public void setValidator(Validator validator) {
this.validator = validator;
} | void function(Validator validator) { this.validator = validator; } | /**
* Set the Validator instance used for validating {@code @Payload} arguments.
* @see org.springframework.validation.annotation.Validated
* @see PayloadMethodArgumentResolver
*/ | Set the Validator instance used for validating @Payload arguments | setValidator | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/DefaultMessageHandlerMethodFactory.java",
"license": "apache-2.0",
"size": 6595
} | [
"org.springframework.validation.Validator"
] | import org.springframework.validation.Validator; | import org.springframework.validation.*; | [
"org.springframework.validation"
] | org.springframework.validation; | 1,801,712 |
public void checkPermitted(GeneralName name)
throws PKIXNameConstraintValidatorException
{
switch (name.getTagNo())
{
case 1:
checkPermittedEmail(permittedSubtreesEmail,
extractNameAsString(name));
break;
case 2:... | void function(GeneralName name) throws PKIXNameConstraintValidatorException { switch (name.getTagNo()) { case 1: checkPermittedEmail(permittedSubtreesEmail, extractNameAsString(name)); break; case 2: checkPermittedDNS(permittedSubtreesDNS, DERIA5String.getInstance( name.getName()).getString()); break; case 4: checkPerm... | /**
* Checks if the given GeneralName is in the permitted set.
*
* @param name The GeneralName
* @throws PKIXNameConstraintValidatorException
* If the <code>name</code>
*/ | Checks if the given GeneralName is in the permitted set | checkPermitted | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/frameworks/base/tests/net/tests/src/mediatek/net/libcore/external/bouncycastle/jce/provider/PKIXNameConstraintValidator.java",
"license": "gpl-2.0",
"size": 57993
} | [
"org.bouncycastle.asn1.ASN1OctetString",
"org.bouncycastle.asn1.ASN1Sequence",
"org.bouncycastle.asn1.DERIA5String",
"org.bouncycastle.asn1.x509.GeneralName"
] | import org.bouncycastle.asn1.ASN1OctetString; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycastle.asn1.DERIA5String; import org.bouncycastle.asn1.x509.GeneralName; | import org.bouncycastle.asn1.*; import org.bouncycastle.asn1.x509.*; | [
"org.bouncycastle.asn1"
] | org.bouncycastle.asn1; | 1,290,315 |
public void setBigNumber(ByteBuffer bytes) {
set(bytes);
} | void function(ByteBuffer bytes) { set(bytes); } | /**
* Update the command output with a big number. Concrete {@link CommandOutput} implementations must override this method to
* decode {@code big number} response values.
*
* @param bytes The command output, or null.
* @since 6.0/RESP 3
*/ | Update the command output with a big number. Concrete <code>CommandOutput</code> implementations must override this method to decode big number response values | setBigNumber | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/output/CommandOutput.java",
"license": "apache-2.0",
"size": 7368
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,390,810 |
Observable<ServiceResponseWithHeaders<Void, LROSADsPost202NoLocationHeaders>> beginPost202NoLocationWithServiceResponseAsync();
void beginPost202NoLocation(Product product); | Observable<ServiceResponseWithHeaders<Void, LROSADsPost202NoLocationHeaders>> beginPost202NoLocationWithServiceResponseAsync(); void beginPost202NoLocation(Product product); | /**
* Long running post request, service returns a 202 to the initial request, without a location header.
*
* @param product Product to put
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws CloudException thrown if the request is rejected by server
* @th... | Long running post request, service returns a 202 to the initial request, without a location header | beginPost202NoLocation | {
"repo_name": "sergey-shandar/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/lro/LROSADs.java",
"license": "mit",
"size": 173405
} | [
"com.microsoft.rest.ServiceResponseWithHeaders"
] | import com.microsoft.rest.ServiceResponseWithHeaders; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,685,762 |
private void setupPermissions() {
// If we don't have the record audio permission...
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
// And if we're on SDK M or later...
if (Build.VERSION.SDK_INT >= Build.... | void function() { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { String[] permissionsWeNeed = new String[]{ Manifest.permission.RECORD_AUDIO }; requestPermissions(permissionsWeNeed, MY_PERMISSIO... | /**
* App Permissions for Audio
**/ | App Permissions for Audio | setupPermissions | {
"repo_name": "ribbon7/ud851-Exercises",
"path": "Lesson06-Visualizer-Preferences/T06.01-Exercise-SetupTheActivity/app/src/main/java/android/example/com/visualizerpreferences/VisualizerActivity.java",
"license": "apache-2.0",
"size": 5673
} | [
"android.content.pm.PackageManager",
"android.example.com.visualizerpreferences.AudioVisuals",
"android.os.Build",
"android.support.v4.app.ActivityCompat"
] | import android.content.pm.PackageManager; import android.example.com.visualizerpreferences.AudioVisuals; import android.os.Build; import android.support.v4.app.ActivityCompat; | import android.content.pm.*; import android.example.com.visualizerpreferences.*; import android.os.*; import android.support.v4.app.*; | [
"android.content",
"android.example",
"android.os",
"android.support"
] | android.content; android.example; android.os; android.support; | 2,287,933 |
@Test(timeout = 100000)
public void testMapFileAccess() throws IOException {
// This will run only in NativeIO is enabled as SecureIOUtils need it
assumeTrue(NativeIO.isAvailable());
Configuration conf = new Configuration();
conf.setInt(ShuffleHandler.SHUFFLE_PORT_CONFIG_KEY, 0);
conf.setInt(Shu... | @Test(timeout = 100000) void function() throws IOException { assumeTrue(NativeIO.isAvailable()); Configuration conf = new Configuration(); conf.setInt(ShuffleHandler.SHUFFLE_PORT_CONFIG_KEY, 0); conf.setInt(ShuffleHandler.MAX_SHUFFLE_CONNECTIONS, 3); conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION... | /**
* Validate the ownership of the map-output files being pulled in. The
* local-file-system owner of the file should match the user component in the
*
* @throws Exception exception
*/ | Validate the ownership of the map-output files being pulled in. The local-file-system owner of the file should match the user component in the | testMapFileAccess | {
"repo_name": "ueshin/apache-tez",
"path": "tez-plugins/tez-aux-services/src/test/java/org/apache/tez/auxservices/TestShuffleHandler.java",
"license": "apache-2.0",
"size": 55923
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.CommonConfigurationKeysPublic",
"org.apache.hadoop.io.nativeio.NativeIO",
"org.apache.hadoop.security.UserGroupInformation",
"org.apache.hadoop.yarn.api.recor... | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.CommonConfigurationKeysPublic; import org.apache.hadoop.io.nativeio.NativeIO; import org.apache.hadoop.security.UserGroupInformation; import org.ap... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.nativeio.*; import org.apache.hadoop.security.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.conf.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.hadoop; org.junit; | 1,130,558 |
// TODO(bazel-team): Serializability constraints?
public interface SplitTransition<T> extends Transition {
List<T> split(T buildOptions);
}
@SkylarkModule(name = "ConfigurationTransition",
category = SkylarkModuleCategory.NONE,
doc =
"Declares how the configuration should change when ... | interface SplitTransition<T> extends Transition { List<T> function(T buildOptions); } @SkylarkModule(name = STR, category = SkylarkModuleCategory.NONE, doc = STR + STRglobals.html#DATA_CFG\STR + STRglobals.html#HOST_CFG\STR + STRhost\STRdata\STR) public enum ConfigurationTransition implements Transition { NONE, HOST, N... | /**
* Return the list of {@code BuildOptions} after splitting; empty if not applicable.
*/ | Return the list of BuildOptions after splitting; empty if not applicable | split | {
"repo_name": "mikelalcon/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/Attribute.java",
"license": "apache-2.0",
"size": 64223
} | [
"com.google.devtools.build.lib.skylarkinterface.SkylarkModule",
"com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory",
"java.util.List"
] | import com.google.devtools.build.lib.skylarkinterface.SkylarkModule; import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory; import java.util.List; | import com.google.devtools.build.lib.skylarkinterface.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 816,884 |
public Duration getThrottleDuration() {
return throttleDuration;
} | Duration function() { return throttleDuration; } | /**
* The amount of time an attempt will be throttled if deemed necessary based on previous success
* rate.
*
* <p><i>Default value:</i> 5 sec
*
* @see RpcQosOptions.Builder#withThrottleDuration(Duration)
*/ | The amount of time an attempt will be throttled if deemed necessary based on previous success rate. Default value: 5 sec | getThrottleDuration | {
"repo_name": "robertwb/incubator-beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/RpcQosOptions.java",
"license": "apache-2.0",
"size": 28815
} | [
"org.joda.time.Duration"
] | import org.joda.time.Duration; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 1,722,750 |
public InnerHitBuilder innerHit() {
return innerHitBuilder;
} | InnerHitBuilder function() { return innerHitBuilder; } | /**
* Returns inner hit definition in the scope of this query and reusing the defined type and query.
*/ | Returns inner hit definition in the scope of this query and reusing the defined type and query | innerHit | {
"repo_name": "mmaracic/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/query/HasChildQueryBuilder.java",
"license": "apache-2.0",
"size": 20513
} | [
"org.elasticsearch.index.query.support.InnerHitBuilder"
] | import org.elasticsearch.index.query.support.InnerHitBuilder; | import org.elasticsearch.index.query.support.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 926,820 |
@FXML
private void handleAddCategory() {
TextInputDialog dialog = new TextInputDialog();
dialog.initOwner(this.addFeedStage);
dialog.setHeaderText(Globals.CREATE_CATEGORY_TITLE_NAME);
dialog.setTitle(Globals.CREATE_CATEGORY_TITLE_NAME);
dialog.setContentText(Globals.ENTER_CATEGORY_NAME);
Optional<Strin... | void function() { TextInputDialog dialog = new TextInputDialog(); dialog.initOwner(this.addFeedStage); dialog.setHeaderText(Globals.CREATE_CATEGORY_TITLE_NAME); dialog.setTitle(Globals.CREATE_CATEGORY_TITLE_NAME); dialog.setContentText(Globals.ENTER_CATEGORY_NAME); Optional<String> result = dialog.showAndWait(); if (re... | /**
* Handles action on Add Category button.
*/ | Handles action on Add Category button | handleAddCategory | {
"repo_name": "RSSAggregatorProject/DesktopApp",
"path": "src/com/rssaggregator/desktop/view/AddFeedController.java",
"license": "apache-2.0",
"size": 5310
} | [
"com.rssaggregator.desktop.utils.CategoriesUtils",
"com.rssaggregator.desktop.utils.Globals",
"com.rssaggregator.desktop.utils.UiUtils",
"java.util.Optional"
] | import com.rssaggregator.desktop.utils.CategoriesUtils; import com.rssaggregator.desktop.utils.Globals; import com.rssaggregator.desktop.utils.UiUtils; import java.util.Optional; | import com.rssaggregator.desktop.utils.*; import java.util.*; | [
"com.rssaggregator.desktop",
"java.util"
] | com.rssaggregator.desktop; java.util; | 1,511,871 |
@Override
protected Group getFixture() {
return (Group) fixture;
} | Group function() { return (Group) fixture; } | /**
* Returns the fixture for this Group test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Returns the fixture for this Group test case. | getFixture | {
"repo_name": "adbrucker/SecureBPMN",
"path": "designer/src/org.activiti.designer.model.tests/src/org/eclipse/bpmn2/tests/GroupTest.java",
"license": "apache-2.0",
"size": 1764
} | [
"org.eclipse.bpmn2.Group"
] | import org.eclipse.bpmn2.Group; | import org.eclipse.bpmn2.*; | [
"org.eclipse.bpmn2"
] | org.eclipse.bpmn2; | 322,860 |
public void onCreate(Context context) {
mContext = context;
initialize();
} | void function(Context context) { mContext = context; initialize(); } | /**
* Initialize LocationManager
* <p>
* Without fragment or activity the activityResult is losted
*
* @param context to request location
*/ | Initialize LocationManager Without fragment or activity the activityResult is losted | onCreate | {
"repo_name": "massivedisaster/ADAL",
"path": "adal-location/src/main/java/com/massivedisaster/location/AbstractLocationManager.java",
"license": "mit",
"size": 10234
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,190,856 |
void handleCompleted(YarnContainerStatus status, Multiset<String> restartRunnables) {
containerLock.lock();
String containerId = status.getContainerId();
int exitStatus = status.getExitStatus();
ContainerState state = status.getState();
try {
removeContainerInfo(containerId);
Map<Stri... | void handleCompleted(YarnContainerStatus status, Multiset<String> restartRunnables) { containerLock.lock(); String containerId = status.getContainerId(); int exitStatus = status.getExitStatus(); ContainerState state = status.getState(); try { removeContainerInfo(containerId); Map<String, TwillContainerController> looku... | /**
* Handle completion of container.
*
* @param status The completion status.
* @param restartRunnables Set of runnable names that requires restart.
*/ | Handle completion of container | handleCompleted | {
"repo_name": "serranom/twill",
"path": "twill-yarn/src/main/java/org/apache/twill/internal/appmaster/RunningContainers.java",
"license": "apache-2.0",
"size": 28215
} | [
"com.google.common.collect.Multiset",
"java.util.Map",
"org.apache.hadoop.yarn.api.records.ContainerState",
"org.apache.twill.internal.ContainerExitCodes",
"org.apache.twill.internal.TwillContainerController",
"org.apache.twill.internal.yarn.YarnContainerStatus"
] | import com.google.common.collect.Multiset; import java.util.Map; import org.apache.hadoop.yarn.api.records.ContainerState; import org.apache.twill.internal.ContainerExitCodes; import org.apache.twill.internal.TwillContainerController; import org.apache.twill.internal.yarn.YarnContainerStatus; | import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.twill.internal.*; import org.apache.twill.internal.yarn.*; | [
"com.google.common",
"java.util",
"org.apache.hadoop",
"org.apache.twill"
] | com.google.common; java.util; org.apache.hadoop; org.apache.twill; | 2,405,120 |
@Bean
public PropertyPlaceholderConfigurer commonsPropertyPlaceholderConfigurer() {
final PropertyPlaceholderConfigurer configurer =
new CommonsPropertyPlaceholderConfigurer("cacis-commons", "cacis-commons-test.properties");
configurer.setSystemPropertiesMode(PropertyPlacehol... | PropertyPlaceholderConfigurer function() { final PropertyPlaceholderConfigurer configurer = new CommonsPropertyPlaceholderConfigurer(STR, STR); configurer.setSystemPropertiesMode(PropertyPlaceholderConfigurer.SYSTEM_PROPERTIES_MODE_OVERRIDE); configurer.setIgnoreUnresolvablePlaceholders(true); return configurer; } | /**
* Loads properties from "classpath*:/c.properties" location
*
* @return the property place holder configures
*/ | Loads properties from "classpath*:/c.properties" location | commonsPropertyPlaceholderConfigurer | {
"repo_name": "NCIP/cacis",
"path": "esd-commons/src/test/java/gov/nih/nci/cacis/common/CommonsTestConfig.java",
"license": "bsd-3-clause",
"size": 1398
} | [
"gov.nih.nci.cacis.common.util.CommonsPropertyPlaceholderConfigurer",
"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
] | import gov.nih.nci.cacis.common.util.CommonsPropertyPlaceholderConfigurer; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; | import gov.nih.nci.cacis.common.util.*; import org.springframework.beans.factory.config.*; | [
"gov.nih.nci",
"org.springframework.beans"
] | gov.nih.nci; org.springframework.beans; | 346,063 |
private String getVersion(BundleContext bundleContext) {
Object version = bundleContext.getBundle().getHeaders().get(PROPERTY_KEY_VERSION);
return version != null ? version.toString() : null;
}
| String function(BundleContext bundleContext) { Object version = bundleContext.getBundle().getHeaders().get(PROPERTY_KEY_VERSION); return version != null ? version.toString() : null; } | /**
* Retrieves the version of the REST-Api.
*
* @param bundleContext
* The context.
* @return String of major and minor version like "1.3"
*/ | Retrieves the version of the REST-Api | getVersion | {
"repo_name": "Communote/communote-server",
"path": "communote/plugins/rest-api/2.2/implementation/src/main/java/com/communote/plugins/api/rest/v22/Activator.java",
"license": "apache-2.0",
"size": 2636
} | [
"org.osgi.framework.BundleContext"
] | import org.osgi.framework.BundleContext; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 1,320,976 |
public void addTransportListener(JingleTransportListener li) {
for (ContentNegotiator contentNegotiator : contentNegotiators) {
if (contentNegotiator.getTransportNegotiator() != null) {
contentNegotiator.getTransportNegotiator().addListener(li);
}
}
} | void function(JingleTransportListener li) { for (ContentNegotiator contentNegotiator : contentNegotiators) { if (contentNegotiator.getTransportNegotiator() != null) { contentNegotiator.getTransportNegotiator().addListener(li); } } } | /**
* Add a listener for transport negotiation events
*
* @param li
* The listener
*/ | Add a listener for transport negotiation events | addTransportListener | {
"repo_name": "opg7371/Smack",
"path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/JingleSession.java",
"license": "apache-2.0",
"size": 40151
} | [
"org.jivesoftware.smackx.jingleold.listeners.JingleTransportListener"
] | import org.jivesoftware.smackx.jingleold.listeners.JingleTransportListener; | import org.jivesoftware.smackx.jingleold.listeners.*; | [
"org.jivesoftware.smackx"
] | org.jivesoftware.smackx; | 414,669 |
@Test
public void printsEmptyScalarAsNull() {
final YamlMapping map = Yaml.createYamlMappingBuilder()
.add("key", "value1")
.add("scalar", Yaml.createYamlScalarBuilder().buildPlainScalar())
.add("anotherKey", "value2")
.build();
final StringBuilder... | void function() { final YamlMapping map = Yaml.createYamlMappingBuilder() .add("key", STR) .add(STR, Yaml.createYamlScalarBuilder().buildPlainScalar()) .add(STR, STR) .build(); final StringBuilder expected = new StringBuilder(); expected .append(STR).append(System.lineSeparator()) .append(STR).append(System.lineSeparat... | /**
* An empty Scalar value is printed as null.
*/ | An empty Scalar value is printed as null | printsEmptyScalarAsNull | {
"repo_name": "decorators-squad/camel",
"path": "src/test/java/com/amihaiemil/eoyaml/YamlMappingPrintTest.java",
"license": "bsd-3-clause",
"size": 14315
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 1,523,684 |
public static Value ociplogon(Env env,
@NotNull String username,
@NotNull String password,
@Optional String db,
@Optional String charset,
@Optional("0") int s... | static Value function(Env env, @NotNull String username, @NotNull String password, @Optional String db, @Optional String charset, @Optional("0") int sessionMode) { return oci_pconnect(env, username, password, db, charset, sessionMode); } | /**
* Alias of oci_pconnect()
*/ | Alias of oci_pconnect() | ociplogon | {
"repo_name": "smba/oak",
"path": "quercus/src/main/java/com/caucho/quercus/lib/db/OracleModule.java",
"license": "lgpl-3.0",
"size": 62182
} | [
"com.caucho.quercus.annotation.NotNull",
"com.caucho.quercus.annotation.Optional",
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.Value"
] | import com.caucho.quercus.annotation.NotNull; import com.caucho.quercus.annotation.Optional; import com.caucho.quercus.env.Env; import com.caucho.quercus.env.Value; | import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,972,781 |
public Collection<String> getLiveNodes() throws ShuffleError
{
try
{
JMXConnection conn = new JMXConnection(host, port, username, password);
return getSSProxy(conn.getMbeanServerConn()).getLiveNodes();
}
catch (IOException e)
{
throw ne... | Collection<String> function() throws ShuffleError { try { JMXConnection conn = new JMXConnection(host, port, username, password); return getSSProxy(conn.getMbeanServerConn()).getLiveNodes(); } catch (IOException e) { throw new ShuffleError(STR); } } | /**
* Return a list of the live nodes (using JMX).
*
* @return String endpoint names
* @throws ShuffleError
*/ | Return a list of the live nodes (using JMX) | getLiveNodes | {
"repo_name": "rajath26/cassandra-trunk",
"path": "src/java/org/apache/cassandra/tools/Shuffle.java",
"license": "apache-2.0",
"size": 25668
} | [
"java.io.IOException",
"java.util.Collection"
] | import java.io.IOException; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,897,326 |
public static List<Pair<INaviView, CTag>> getTaggedViews(final List<INaviView> views) {
final List<Pair<INaviView, CTag>> taggedViews = new ArrayList<Pair<INaviView, CTag>>();
for (final INaviView view : views) {
for (final CTag tag : view.getConfiguration().getViewTags()) {
taggedViews.add(new... | static List<Pair<INaviView, CTag>> function(final List<INaviView> views) { final List<Pair<INaviView, CTag>> taggedViews = new ArrayList<Pair<INaviView, CTag>>(); for (final INaviView view : views) { for (final CTag tag : view.getConfiguration().getViewTags()) { taggedViews.add(new Pair<INaviView, CTag>(view, tag)); } ... | /**
* Returns a list of all tagged views and the tags they are tagged with.
*
* @return A list of tagged views.
*/ | Returns a list of all tagged views and the tags they are tagged with | getTaggedViews | {
"repo_name": "chubbymaggie/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/disassembly/views/CViewFilter.java",
"license": "apache-2.0",
"size": 4327
} | [
"com.google.security.zynamics.binnavi.Tagging",
"com.google.security.zynamics.zylib.general.Pair",
"java.util.ArrayList",
"java.util.List"
] | import com.google.security.zynamics.binnavi.Tagging; import com.google.security.zynamics.zylib.general.Pair; import java.util.ArrayList; import java.util.List; | import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.zylib.general.*; import java.util.*; | [
"com.google.security",
"java.util"
] | com.google.security; java.util; | 68,550 |
public static Set<OWLEntity> filterEntities(OWLOntology onto, Set<OWLEntity> entities, Annotation annotation) {
// The passed annotation can be only instance of OWLAspectAnd or OWLAspectOr
String[][] aspects = transformAnnotationToAspects(annotation);
Set<OWLEntity> filteredEntities = new HashSet<OWLEntity>();... | static Set<OWLEntity> function(OWLOntology onto, Set<OWLEntity> entities, Annotation annotation) { String[][] aspects = transformAnnotationToAspects(annotation); Set<OWLEntity> filteredEntities = new HashSet<OWLEntity>(); for (OWLEntity entity : entities) { Collection<OWLAxiom> referencingAxioms = EntitySearcher.getRef... | /**
* filters this set of entities with respect to current aspects specified in the annotation
*
* @param onto
* ontology to be checked
* @param entities
* set of entities to be filtered
* @param annotation
* Annotation of type {@link OWLAspectAnd} or {@link OWLAspectOr} specifying current asp... | filters this set of entities with respect to current aspects specified in the annotation | filterEntities | {
"repo_name": "ag-csw/aspect-owlapi",
"path": "src/main/java/de/fuberlin/csw/aood/owlapi/helpers/FilteringHelperEntities.java",
"license": "gpl-3.0",
"size": 3956
} | [
"java.lang.annotation.Annotation",
"java.util.Collection",
"java.util.HashSet",
"java.util.Set",
"org.semanticweb.owlapi.model.OWLAxiom",
"org.semanticweb.owlapi.model.OWLDeclarationAxiom",
"org.semanticweb.owlapi.model.OWLEntity",
"org.semanticweb.owlapi.model.OWLOntology",
"org.semanticweb.owlapi.... | import java.lang.annotation.Annotation; import java.util.Collection; import java.util.HashSet; import java.util.Set; import org.semanticweb.owlapi.model.OWLAxiom; import org.semanticweb.owlapi.model.OWLDeclarationAxiom; import org.semanticweb.owlapi.model.OWLEntity; import org.semanticweb.owlapi.model.OWLOntology; impo... | import java.lang.annotation.*; import java.util.*; import org.semanticweb.owlapi.model.*; import org.semanticweb.owlapi.search.*; | [
"java.lang",
"java.util",
"org.semanticweb.owlapi"
] | java.lang; java.util; org.semanticweb.owlapi; | 1,467,783 |
private BitSet generate2PointBitmask() {
// TODO Auto-generated method stub
LinesAlgorithmDataFactory factory = (LinesAlgorithmDataFactory)g.fac;
BitSet mask = new BitSet();
int k, start, end;
Random rg = new Random();
if (g.crType == 0) {
k = rg.nextInt(factory.lineNumber);
start = rg.ne... | BitSet function() { LinesAlgorithmDataFactory factory = (LinesAlgorithmDataFactory)g.fac; BitSet mask = new BitSet(); int k, start, end; Random rg = new Random(); if (g.crType == 0) { k = rg.nextInt(factory.lineNumber); start = rg.nextInt(15) + 1; end = start + 15; mask.set(k * 30 + start, k * 30 + end, true); } else i... | /***
* Randomized 2Point bitmask is created, depending on crossover type crType.
* A whole point, x coordinate of one point, y coordinate of one point,
* length of one point or whole genom are the target of crossover.
*
* @return a new 2Point bitmask
*/ | Randomized 2Point bitmask is created, depending on crossover type crType. A whole point, x coordinate of one point, y coordinate of one point, length of one point or whole genom are the target of crossover | generate2PointBitmask | {
"repo_name": "mmaas/AIAlgorithmTool",
"path": "src/geneticalgorithm/CrossoverOperator.java",
"license": "gpl-3.0",
"size": 10421
} | [
"java.util.BitSet",
"java.util.Random"
] | import java.util.BitSet; import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 69,530 |
@Test
public void issue2193() {
assertThat(match("**/appappappapp/**", "com/application/MyService")).isFalse();
} | void function() { assertThat(match(STR, STR)).isFalse(); } | /**
* See http://jira.sonarsource.com/browse/SONAR-2193
*/ | See HREF | issue2193 | {
"repo_name": "Godin/sonar",
"path": "sonar-plugin-api/src/test/java/org/sonar/api/utils/WildcardPatternTest.java",
"license": "lgpl-3.0",
"size": 7222
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 2,726,928 |
public DynamicState withChangingBlobs(Set<BlobChanging> changingBlobs) {
if (changingBlobs == this.changingBlobs) {
return this;
}
return new DynamicState(this.state, this.newAssignment,
this.container, this.currentAssignmen... | DynamicState function(Set<BlobChanging> changingBlobs) { if (changingBlobs == this.changingBlobs) { return this; } return new DynamicState(this.state, this.newAssignment, this.container, this.currentAssignment, this.pendingLocalization, this.startTime, this.pendingDownload, profileActions, this.pendingStopProfileAction... | /**
* Set the blocked changing blobs. This is an input from the outside, and should never be called by the state machine steps.
*/ | Set the blocked changing blobs. This is an input from the outside, and should never be called by the state machine steps | withChangingBlobs | {
"repo_name": "hmcl/storm-apache",
"path": "storm-server/src/main/java/org/apache/storm/daemon/supervisor/Slot.java",
"license": "apache-2.0",
"size": 64423
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,734,519 |
// delete all the xlink:href object which is contained in slideElement and
// does not referred by other slides
boolean deleteLinkedRef(OdfElement odfEle) {
boolean success = true;
try {
OdfFileDom contentDom = getContentDom();
XPath xpath = contentDom.getXPath();
NodeList linkNodes = (NodeList) xpath... | boolean deleteLinkedRef(OdfElement odfEle) { boolean success = true; try { OdfFileDom contentDom = getContentDom(); XPath xpath = contentDom.getXPath(); NodeList linkNodes = (NodeList) xpath.evaluate(STRhrefSTR int refCount = pathNodes.getLength(); if (refCount == 1) { if (refObjPath.startsWith("./")) { refObjPath = re... | /**
* This method will delete all the linked resources that are only related
* with this element.
*
* @param odfEle
* - the element to be deleted.
* @return true if successfully delete, or else, false will be returned
*/ | This method will delete all the linked resources that are only related with this element | deleteLinkedRef | {
"repo_name": "jbjonesjr/geoproponis",
"path": "external/simple-odf-0.8.1-incubating-sources/org/odftoolkit/simple/Document.java",
"license": "gpl-2.0",
"size": 100866
} | [
"java.util.logging.Level",
"java.util.logging.Logger",
"javax.xml.xpath.XPath",
"javax.xml.xpath.XPathExpressionException",
"org.odftoolkit.odfdom.pkg.OdfElement",
"org.odftoolkit.odfdom.pkg.OdfFileDom",
"org.odftoolkit.odfdom.pkg.manifest.OdfFileEntry",
"org.w3c.dom.NodeList"
] | import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import org.odftoolkit.odfdom.pkg.OdfElement; import org.odftoolkit.odfdom.pkg.OdfFileDom; import org.odftoolkit.odfdom.pkg.manifest.OdfFileEntry; import org.w3c.dom.NodeList; | import java.util.logging.*; import javax.xml.xpath.*; import org.odftoolkit.odfdom.pkg.*; import org.odftoolkit.odfdom.pkg.manifest.*; import org.w3c.dom.*; | [
"java.util",
"javax.xml",
"org.odftoolkit.odfdom",
"org.w3c.dom"
] | java.util; javax.xml; org.odftoolkit.odfdom; org.w3c.dom; | 2,129,595 |
public Chunk chunkFor(long position)
{
// position of the chunk
int idx = 8 * (int) (position / parameters.chunkLength());
if (idx >= chunkOffsetsSize)
throw new CorruptSSTableException(new EOFException(), indexFilePath);
long chunkOffset = chunkOffsets.getLong(idx)... | Chunk function(long position) { int idx = 8 * (int) (position / parameters.chunkLength()); if (idx >= chunkOffsetsSize) throw new CorruptSSTableException(new EOFException(), indexFilePath); long chunkOffset = chunkOffsets.getLong(idx); long nextChunkOffset = (idx + 8 == chunkOffsetsSize) ? compressedFileLength : chunkO... | /**
* Get a chunk of compressed data (offset, length) corresponding to given position
*
* @param position Position in the file.
* @return pair of chunk offset and length.
*/ | Get a chunk of compressed data (offset, length) corresponding to given position | chunkFor | {
"repo_name": "yonglehou/cassandra",
"path": "src/java/org/apache/cassandra/io/compress/CompressionMetadata.java",
"license": "apache-2.0",
"size": 16727
} | [
"java.io.EOFException",
"org.apache.cassandra.io.sstable.CorruptSSTableException"
] | import java.io.EOFException; import org.apache.cassandra.io.sstable.CorruptSSTableException; | import java.io.*; import org.apache.cassandra.io.sstable.*; | [
"java.io",
"org.apache.cassandra"
] | java.io; org.apache.cassandra; | 406,919 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<SkuInfoInner> listWorkerPoolSkus(
String resourceGroupName, String name, String workerPoolName, Context context) {
return new PagedIterable<>(listWorkerPoolSkusAsync(resourceGroupName, name, workerPoolName, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<SkuInfoInner> function( String resourceGroupName, String name, String workerPoolName, Context context) { return new PagedIterable<>(listWorkerPoolSkusAsync(resourceGroupName, name, workerPoolName, context)); } | /**
* Get available SKUs for scaling a worker pool.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param name Name of the App Service Environment.
* @param workerPoolName Name of the worker pool.
* @param context The context to associate with this... | Get available SKUs for scaling a worker pool | listWorkerPoolSkus | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/AppServiceEnvironmentsClientImpl.java",
"license": "mit",
"size": 563770
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.SkuInfoInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.SkuInfoInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,643,067 |
Observable<ServiceResponse<Page<USqlTableStatistics>>> listTableStatisticsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName);
PagedList<USqlTableStatistics> listTableStatistics(final String accountName, final String databaseName, f... | Observable<ServiceResponse<Page<USqlTableStatistics>>> listTableStatisticsWithServiceResponseAsync(final String accountName, final String databaseName, final String schemaName, final String tableName); PagedList<USqlTableStatistics> listTableStatistics(final String accountName, final String databaseName, final String s... | /**
* Retrieves the list of table statistics from the Data Lake Analytics catalog.
*
* @param accountName The Azure Data Lake Analytics account upon which to execute catalog operations.
* @param databaseName The name of the database containing the statistics.
* @param schemaName The name of the... | Retrieves the list of table statistics from the Data Lake Analytics catalog | listTableStatistics | {
"repo_name": "anudeepsharma/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Catalogs.java",
"license": "mit",
"size": 188313
} | [
"com.microsoft.azure.Page",
"com.microsoft.azure.PagedList",
"com.microsoft.azure.management.datalake.analytics.models.USqlTableStatistics",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.datalake.analytics.models.USqlTableStatistics; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 41,360 |
public static void throwException(Throwable t) {
_UNSAFE.throwException(t);
}
private static final long UNSAFE_COPY_THRESHOLD = 1024L * 1024L;
static {
sun.misc.Unsafe unsafe;
try {
Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe");
unsafeField.setAccessible(true);
... | static void function(Throwable t) { _UNSAFE.throwException(t); } private static final long UNSAFE_COPY_THRESHOLD = 1024L * 1024L; static { sun.misc.Unsafe unsafe; try { Field unsafeField = Unsafe.class.getDeclaredField(STR); unsafeField.setAccessible(true); unsafe = (sun.misc.Unsafe) unsafeField.get(null); } catch (Thr... | /**
* Raises an exception bypassing compiler checks for checked exceptions.
*/ | Raises an exception bypassing compiler checks for checked exceptions | throwException | {
"repo_name": "ArvinDevel/onlineAggregationOnSparkV2",
"path": "unsafe/src/main/java/org/apache/spark/unsafe/Platform.java",
"license": "apache-2.0",
"size": 4696
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,648,900 |
public static <T> SingletonAssert<T> thatSingleton(PCollection<T> actual) {
return new SingletonAssert<>(
new CreateActual<T, T>(actual, View.<T>asSingleton()), actual.getPipeline())
.setCoder(actual.getCoder());
} | static <T> SingletonAssert<T> function(PCollection<T> actual) { return new SingletonAssert<>( new CreateActual<T, T>(actual, View.<T>asSingleton()), actual.getPipeline()) .setCoder(actual.getCoder()); } | /**
* Constructs a {@link SingletonAssert} for the value of the provided
* {@code PCollection PCollection<T>}, which must be a singleton.
*/ | Constructs a <code>SingletonAssert</code> for the value of the provided PCollection PCollection, which must be a singleton | thatSingleton | {
"repo_name": "Test-Betta-Inc/musical-umbrella",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/testing/DataflowAssert.java",
"license": "apache-2.0",
"size": 27337
} | [
"com.google.cloud.dataflow.sdk.transforms.View",
"com.google.cloud.dataflow.sdk.values.PCollection"
] | import com.google.cloud.dataflow.sdk.transforms.View; import com.google.cloud.dataflow.sdk.values.PCollection; | import com.google.cloud.dataflow.sdk.transforms.*; import com.google.cloud.dataflow.sdk.values.*; | [
"com.google.cloud"
] | com.google.cloud; | 764,489 |
Role getRole(Long id); | Role getRole(Long id); | /**
* Returns a {@link Role} with the given id.
*
* @param id
*/ | Returns a <code>Role</code> with the given id | getRole | {
"repo_name": "synyx/minos",
"path": "modules/core/src/main/java/org/synyx/minos/umt/service/UserManagement.java",
"license": "apache-2.0",
"size": 3165
} | [
"org.synyx.minos.core.domain.Role"
] | import org.synyx.minos.core.domain.Role; | import org.synyx.minos.core.domain.*; | [
"org.synyx.minos"
] | org.synyx.minos; | 2,854,943 |
public CORSRequestType checkRequestType(final HttpServletRequest request) {
CORSRequestType requestType = CORSRequestType.INVALID_CORS;
if (request == null) {
throw new IllegalArgumentException(
"HttpServletRequest object is null");
}
String orig... | CORSRequestType function(final HttpServletRequest request) { CORSRequestType requestType = CORSRequestType.INVALID_CORS; if (request == null) { throw new IllegalArgumentException( STR); } String originHeader = request.getHeader(REQUEST_HEADER_ORIGIN); if (originHeader != null) { if (originHeader.isEmpty()) { requestTyp... | /**
* Determines the request type.
*
* @param request
* @return
*/ | Determines the request type | checkRequestType | {
"repo_name": "Cloudyle/hapi-fhir",
"path": "hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/CORSFilter_.java",
"license": "apache-2.0",
"size": 43697
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,416,307 |
public int read(byte[] b, int off, int len) throws IOException
{
if (inf == null)
throw new IOException("stream closed");
if (len == 0)
return 0;
int count = 0;
for (;;)
{
try
{
count = inf.inflate(b, off, ... | int function(byte[] b, int off, int len) throws IOException { if (inf == null) throw new IOException(STR); if (len == 0) return 0; int count = 0; for (;;) { try { count = inf.inflate(b, off, len); } catch (DataFormatException dfe) { throw new ZipException(dfe.getMessage()); } if (count > 0) return count; if (inf.needsD... | /**
* Decompresses data into the byte array
*
* @param b
* the array to read and decompress data into
* @param off
* the offset indicating where the data should be placed
* @param len
* the number of bytes to decompress
*/ | Decompresses data into the byte array | read | {
"repo_name": "SteppingStone/sstone-common",
"path": "src/main/java/gnu/classpath/java/util/zip/InflaterInputStream.java",
"license": "gpl-3.0",
"size": 8053
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,280,141 |
public static void handleCamelContextStartup(ConfigurableApplicationContext context, Class<?> testClass) throws Exception {
boolean skip = "true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"));
if (skip) {
LOGGER.info("Skipping starting CamelContext(s) as system propert... | static void function(ConfigurableApplicationContext context, Class<?> testClass) throws Exception { boolean skip = "true".equalsIgnoreCase(System.getProperty(STR)); if (skip) { LOGGER.info(STR); } else if (testClass.isAnnotationPresent(UseAdviceWith.class)) { if (testClass.getAnnotation(UseAdviceWith.class).value()) { ... | /**
* Handles starting of Camel contexts based on {@link UseAdviceWith} and other state in the JVM.
*
* @param context the initialized Spring context
* @param testClass the test class being executed
*/ | Handles starting of Camel contexts based on <code>UseAdviceWith</code> and other state in the JVM | handleCamelContextStartup | {
"repo_name": "kevinearls/camel",
"path": "components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelAnnotationsHandler.java",
"license": "apache-2.0",
"size": 17813
} | [
"org.springframework.context.ConfigurableApplicationContext"
] | import org.springframework.context.ConfigurableApplicationContext; | import org.springframework.context.*; | [
"org.springframework.context"
] | org.springframework.context; | 1,443,532 |
//-----------------------------------------------------------------------
public String format(TemporalAccessor temporal) {
StringBuilder buf = new StringBuilder(32);
formatTo(temporal, buf);
return buf.toString();
} | String function(TemporalAccessor temporal) { StringBuilder buf = new StringBuilder(32); formatTo(temporal, buf); return buf.toString(); } | /**
* Formats a date-time object using this formatter.
* <p>
* This formats the date-time to a String using the rules of the formatter.
*
* @param temporal the temporal object to print, not null
* @return the printed string, not null
* @throws DateTimeException if an error occurs dur... | Formats a date-time object using this formatter. This formats the date-time to a String using the rules of the formatter | format | {
"repo_name": "seratch/java-time-backport",
"path": "src/main/java/java/time/format/DateTimeFormatter.java",
"license": "bsd-3-clause",
"size": 85161
} | [
"java.time.temporal.TemporalAccessor"
] | import java.time.temporal.TemporalAccessor; | import java.time.temporal.*; | [
"java.time"
] | java.time; | 1,666,963 |
public void setHandler(Handler handler) {
mHandler = handler;
} | void function(Handler handler) { mHandler = handler; } | /**
* Sets handler for responses
*
* @param handler Handler
*/ | Sets handler for responses | setHandler | {
"repo_name": "brave-warrior/BluetoothArduino-Android",
"path": "Android/app/src/main/java/com/khmelenko/lab/bluetootharduino/connectivity/async/CommunicationThread.java",
"license": "apache-2.0",
"size": 2765
} | [
"android.os.Handler"
] | import android.os.Handler; | import android.os.*; | [
"android.os"
] | android.os; | 1,304,362 |
@Test
@NeedReload
public void should_fail_because_value_is_not_equal_to() {
Table table = new Table(source, "test");
Changes changes = new Changes(table).setStartPointNow();
update("update test set var14 = 1 where var1 = 1");
changes.setEndPointNow();
try {
assertThat(changes).change().... | void function() { Table table = new Table(source, "test"); Changes changes = new Changes(table).setStartPointNow(); update(STR); changes.setEndPointNow(); try { assertThat(changes).change().column("var9").valueAtEndPoint().isEqualTo(DateValue.of(2014, 5, 23)); fail(STR); } catch (AssertionError e) { Assertions.assertTh... | /**
* This method should fail because the value is no equal to.
*/ | This method should fail because the value is no equal to | should_fail_because_value_is_not_equal_to | {
"repo_name": "otoniel-isidoro/assertj-db",
"path": "src/test/java/org/assertj/db/api/assertions/AssertOnValueEquality_IsEqualTo_DateValue_Test.java",
"license": "apache-2.0",
"size": 4079
} | [
"org.assertj.core.api.Assertions",
"org.assertj.db.api.Assertions",
"org.assertj.db.type.Changes",
"org.assertj.db.type.DateValue",
"org.assertj.db.type.Table",
"org.junit.Assert"
] | import org.assertj.core.api.Assertions; import org.assertj.db.api.Assertions; import org.assertj.db.type.Changes; import org.assertj.db.type.DateValue; import org.assertj.db.type.Table; import org.junit.Assert; | import org.assertj.core.api.*; import org.assertj.db.api.*; import org.assertj.db.type.*; import org.junit.*; | [
"org.assertj.core",
"org.assertj.db",
"org.junit"
] | org.assertj.core; org.assertj.db; org.junit; | 2,401,152 |
boolean delete(String src, boolean recursive)
throws AccessControlException, SafeModeException,
UnresolvedLinkException, IOException {
CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache);
if (cacheEntry != null && cacheEntry.isSuccess()) {
return true; // Return previous respons... | boolean delete(String src, boolean recursive) throws AccessControlException, SafeModeException, UnresolvedLinkException, IOException { CacheEntry cacheEntry = RetryCache.waitForCompletion(retryCache); if (cacheEntry != null && cacheEntry.isSuccess()) { return true; } boolean ret = false; try { ret = deleteInt(src, recu... | /**
* Remove the indicated file from namespace.
*
* @see ClientProtocol#delete(String, boolean) for detailed description and
* description of exceptions
*/ | Remove the indicated file from namespace | delete | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 292274
} | [
"java.io.IOException",
"org.apache.hadoop.fs.UnresolvedLinkException",
"org.apache.hadoop.ipc.RetryCache",
"org.apache.hadoop.security.AccessControlException"
] | import java.io.IOException; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.ipc.RetryCache; import org.apache.hadoop.security.AccessControlException; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.security.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,724,447 |
@Test
public void testSFLocalBMTBusinessMethod() throws Exception {
SFLa ejb1 = fhome1.create();
String testStr = "Test string.";
String buf = ejb1.method1(testStr);
assertEquals("Method call (method1) test was unexpected value.", buf, testStr);
ejb1.remove();
} | void function() throws Exception { SFLa ejb1 = fhome1.create(); String testStr = STR; String buf = ejb1.method1(testStr); assertEquals(STR, buf, testStr); ejb1.remove(); } | /**
* (iia22) Test Stateful BMT business method.
*/ | (iia22) Test Stateful BMT business method | testSFLocalBMTBusinessMethod | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XLocalSpecWeb.war/src/com/ibm/ejb2x/base/spec/sfl/web/SFLocalImplLifecycleMethodServlet.java",
"license": "epl-1.0",
"size": 12938
} | [
"com.ibm.ejb2x.base.spec.sfl.ejb.SFLa",
"org.junit.Assert"
] | import com.ibm.ejb2x.base.spec.sfl.ejb.SFLa; import org.junit.Assert; | import com.ibm.ejb2x.base.spec.sfl.ejb.*; import org.junit.*; | [
"com.ibm.ejb2x",
"org.junit"
] | com.ibm.ejb2x; org.junit; | 575,019 |
@SuppressWarnings("unchecked")
public T[] toArray () {
T[] arr = (T[]) this.heapArrList.toArray( (T[])Array.newInstance(this.heapArrList.get(0).getClass(), this.heapSize));
return arr;
}
| @SuppressWarnings(STR) T[] function () { T[] arr = (T[]) this.heapArrList.toArray( (T[])Array.newInstance(this.heapArrList.get(0).getClass(), this.heapSize)); return arr; } | /**
* Create An Array With The Elements Of The Max Heap
* @return The Array
*/ | Create An Array With The Elements Of The Max Heap | toArray | {
"repo_name": "sapo93/JADS",
"path": "src/DataStructures/MaxHeap.java",
"license": "lgpl-3.0",
"size": 3905
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 478,428 |
public Reader getReader() throws IOException;
| Reader function() throws IOException; | /**
* Gets a reader stream for this connection
*
* @return a reader stream for this connection
*
* @throws IOException
*/ | Gets a reader stream for this connection | getReader | {
"repo_name": "appnativa/rare",
"path": "source/rare/core/com/appnativa/rare/net/iURLConnection.java",
"license": "gpl-3.0",
"size": 6499
} | [
"java.io.IOException",
"java.io.Reader"
] | import java.io.IOException; import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 1,184,082 |
public static boolean isQueuedOrActive(String canonicalUrl) {
if (TextUtils.isEmpty(canonicalUrl)) { //NOPMD - suggests unreadable format
return false;
}
if (serviceHandler == null) {
return false; // this service is not even running
}
return serviceHa... | static boolean function(String canonicalUrl) { if (TextUtils.isEmpty(canonicalUrl)) { return false; } if (serviceHandler == null) { return false; } return serviceHandler.hasMessages(canonicalUrl.hashCode()) isActive(canonicalUrl); } | /**
* Check if a URL is waiting in the queue for downloading or if actively being downloaded.
* This is useful for checking whether to re-register {@link android.content.BroadcastReceiver}s
* in {@link android.app.AppCompatActivity#onResume()}.
*/ | Check if a URL is waiting in the queue for downloading or if actively being downloaded. This is useful for checking whether to re-register <code>android.content.BroadcastReceiver</code>s in <code>android.app.AppCompatActivity#onResume()</code> | isQueuedOrActive | {
"repo_name": "f-droid/fdroidclient",
"path": "app/src/main/java/org/fdroid/fdroid/net/DownloaderService.java",
"license": "gpl-3.0",
"size": 18260
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,475,691 |
public Collection<GraphIssue> getIssues() {
return issues;
} | Collection<GraphIssue> function() { return issues; } | /**
* Issues attached to the exception.
*/ | Issues attached to the exception | getIssues | {
"repo_name": "eNBeWe/elk",
"path": "plugins/org.eclipse.elk.core/src/org/eclipse/elk/core/validation/GraphValidationException.java",
"license": "epl-1.0",
"size": 1658
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 359,611 |
public void setMUCDelegate(MUCEventDelegate delegate) {
mucEventDelegate = delegate;
} | void function(MUCEventDelegate delegate) { mucEventDelegate = delegate; } | /**
* Sets the MUC event delegate handler for this service.
* @param delegate Handler for MUC events.
*/ | Sets the MUC event delegate handler for this service | setMUCDelegate | {
"repo_name": "haipeng-ssy/openfire_src",
"path": "src/java/org/jivesoftware/openfire/muc/spi/MultiUserChatServiceImpl.java",
"license": "apache-2.0",
"size": 59817
} | [
"org.jivesoftware.openfire.muc.MUCEventDelegate"
] | import org.jivesoftware.openfire.muc.MUCEventDelegate; | import org.jivesoftware.openfire.muc.*; | [
"org.jivesoftware.openfire"
] | org.jivesoftware.openfire; | 316,595 |
List<SubscriptionValidationData> getAPISubscriptions(int limit) throws APIManagementException; | List<SubscriptionValidationData> getAPISubscriptions(int limit) throws APIManagementException; | /**
* Return all API subscriptions
*
* @param limit Subscription Limit
* @return all subscriptions
* @throws APIManagementException If failed to get list of subscriptions.
*/ | Return all API subscriptions | getAPISubscriptions | {
"repo_name": "rswijesena/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/api/APIMgtAdminService.java",
"license": "apache-2.0",
"size": 14765
} | [
"java.util.List",
"org.wso2.carbon.apimgt.core.exception.APIManagementException",
"org.wso2.carbon.apimgt.core.models.SubscriptionValidationData"
] | import java.util.List; import org.wso2.carbon.apimgt.core.exception.APIManagementException; import org.wso2.carbon.apimgt.core.models.SubscriptionValidationData; | import java.util.*; import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.models.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 209,940 |
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
} | Builder function( ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) { super.applyToAllUnaryMethods( getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); return this; } | /**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/ | Applies the given settings updater function to all of the unary API methods in this service. Note: This method does not support applying settings to streaming methods | applyToAllUnaryMethods | {
"repo_name": "googleapis/java-websecurityscanner",
"path": "google-cloud-websecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/WebSecurityScannerSettings.java",
"license": "apache-2.0",
"size": 14286
} | [
"com.google.api.core.ApiFunction",
"com.google.api.gax.rpc.UnaryCallSettings"
] | import com.google.api.core.ApiFunction; import com.google.api.gax.rpc.UnaryCallSettings; | import com.google.api.core.*; import com.google.api.gax.rpc.*; | [
"com.google.api"
] | com.google.api; | 2,393,111 |
protected PaymentResponseDTO commonCreditCardProcessing(PaymentRequestDTO requestDTO, PaymentTransactionType paymentTransactionType) {
PaymentResponseDTO responseDTO = new PaymentResponseDTO(PaymentType.CREDIT_CARD, NullPaymentGatewayType.NULL_GATEWAY);
responseDTO.valid(true)
.payme... | PaymentResponseDTO function(PaymentRequestDTO requestDTO, PaymentTransactionType paymentTransactionType) { PaymentResponseDTO responseDTO = new PaymentResponseDTO(PaymentType.CREDIT_CARD, NullPaymentGatewayType.NULL_GATEWAY); responseDTO.valid(true) .paymentTransactionType(paymentTransactionType); CreditCardDTO creditC... | /**
* Does minimal Credit Card Validation (luhn check and expiration date is after today).
* Mimics the Response of a real Payment Gateway.
*
* @param creditCardDTO
* @return
*/ | Does minimal Credit Card Validation (luhn check and expiration date is after today). Mimics the Response of a real Payment Gateway | commonCreditCardProcessing | {
"repo_name": "mabys/OmSwastika",
"path": "core/src/main/java/com/mycompany/sample/payment/service/gateway/NullPaymentGatewayTransactionServiceImpl.java",
"license": "apache-2.0",
"size": 7264
} | [
"com.mycompany.sample.vendor.nullPaymentGateway.service.payment.NullPaymentGatewayType",
"org.apache.commons.lang.StringUtils",
"org.apache.commons.validator.CreditCardValidator",
"org.broadleafcommerce.common.money.Money",
"org.broadleafcommerce.common.payment.PaymentTransactionType",
"org.broadleafcomme... | import com.mycompany.sample.vendor.nullPaymentGateway.service.payment.NullPaymentGatewayType; import org.apache.commons.lang.StringUtils; import org.apache.commons.validator.CreditCardValidator; import org.broadleafcommerce.common.money.Money; import org.broadleafcommerce.common.payment.PaymentTransactionType; import o... | import com.mycompany.sample.vendor.*; import org.apache.commons.lang.*; import org.apache.commons.validator.*; import org.broadleafcommerce.common.money.*; import org.broadleafcommerce.common.payment.*; import org.broadleafcommerce.common.payment.dto.*; import org.joda.time.*; | [
"com.mycompany.sample",
"org.apache.commons",
"org.broadleafcommerce.common",
"org.joda.time"
] | com.mycompany.sample; org.apache.commons; org.broadleafcommerce.common; org.joda.time; | 311,916 |
public static TSocket getClientSocket(String host, int port, int timeout) throws TTransportException {
SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
return createClient(factory, host, port, timeout);
} | static TSocket function(String host, int port, int timeout) throws TTransportException { SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault(); return createClient(factory, host, port, timeout); } | /**
* Get a default SSL wrapped TSocket connected to the specified host and port. All
* the client methods return a bound connection. So there is no need to call open() on the
* TTransport.
*
* @param host
* @param port
* @param timeout
* @return A SSL wrapped TSocket
* @throws TTransportExce... | Get a default SSL wrapped TSocket connected to the specified host and port. All the client methods return a bound connection. So there is no need to call open() on the TTransport | getClientSocket | {
"repo_name": "jcgruenhage/dendrite",
"path": "vendor/src/github.com/apache/thrift/lib/java/src/org/apache/thrift/transport/TSSLTransportFactory.java",
"license": "apache-2.0",
"size": 13186
} | [
"javax.net.ssl.SSLSocketFactory"
] | import javax.net.ssl.SSLSocketFactory; | import javax.net.ssl.*; | [
"javax.net"
] | javax.net; | 1,735,887 |
// @@author A0121533W
public static String formatDateTimeList(ArrayList<DateTime> dateTimeList) {
String formatted = StringUtil.EMPTY_STRING;
int count = 1;
for (DateTime dt : dateTimeList) {
formatted += String.format(DATETIME_FORMAT_STRING, count,
DateF... | static String function(ArrayList<DateTime> dateTimeList) { String formatted = StringUtil.EMPTY_STRING; int count = 1; for (DateTime dt : dateTimeList) { formatted += String.format(DATETIME_FORMAT_STRING, count, DateFormatter.formatDate(dt)); count++; } return formatted; } | /**
* Formats a given RsvTask dateTime list to display on rsvTaskCard
*/ | Formats a given RsvTask dateTime list to display on rsvTaskCard | formatDateTimeList | {
"repo_name": "CS2103AUG2016-F10-C1/main",
"path": "src/main/java/tars/ui/formatter/Formatter.java",
"license": "mit",
"size": 3849
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,937,161 |
public synchronized void updatePeerSet (final Set<Peer> peers) {
PeerTableModel.this.cachedPeers.clear();
PeerTableModel.this.cachedPeers.addAll (peers);
fireTableDataChanged();
}
}
public TorrentWindow (String name, TorrentManager manager) {
super (name);
this.manager = manager;
setSiz... | synchronized void function (final Set<Peer> peers) { PeerTableModel.this.cachedPeers.clear(); PeerTableModel.this.cachedPeers.addAll (peers); fireTableDataChanged(); } } public TorrentWindow (String name, TorrentManager manager) { super (name); this.manager = manager; setSize (640, 480); setLayout (new BoxLayout (getCo... | /**
* Updates the model's peer data. Should be called on the Swing thread
*
* @param peers The peer data to update with
*/ | Updates the model's peer data. Should be called on the Swing thread | updatePeerSet | {
"repo_name": "ldipotetjob/onlinetor",
"path": "src/demo/TorrentWindow.java",
"license": "mit",
"size": 8161
} | [
"java.util.Set",
"javax.swing.BoxLayout",
"org.itadaki.bobbin.peer.Peer",
"org.itadaki.bobbin.peer.TorrentManager"
] | import java.util.Set; import javax.swing.BoxLayout; import org.itadaki.bobbin.peer.Peer; import org.itadaki.bobbin.peer.TorrentManager; | import java.util.*; import javax.swing.*; import org.itadaki.bobbin.peer.*; | [
"java.util",
"javax.swing",
"org.itadaki.bobbin"
] | java.util; javax.swing; org.itadaki.bobbin; | 2,249,231 |
public TransAction viewNextUndo(); | TransAction function(); | /**
* Get the next undo transaction on the list.
*
* @return The next undo transaction (for redo)
*/ | Get the next undo transaction on the list | viewNextUndo | {
"repo_name": "apratkin/pentaho-kettle",
"path": "engine/src/org/pentaho/di/core/gui/UndoInterface.java",
"license": "apache-2.0",
"size": 2963
} | [
"org.pentaho.di.core.undo.TransAction"
] | import org.pentaho.di.core.undo.TransAction; | import org.pentaho.di.core.undo.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,373,880 |
public static void expandSubtree(JTree jTree, TreeNode parent) {
if (parent.isLeaf()) {
return;
}
// Get all the leaf nodes descending from parent
TreeNode[] tnA = getLeafNodes(parent);
// Create a Set containing the parent of each leaf node
Set set = ne... | static void function(JTree jTree, TreeNode parent) { if (parent.isLeaf()) { return; } TreeNode[] tnA = getLeafNodes(parent); Set set = new HashSet(); int sz = tnA.length; for (int i = 0; i < sz; ++i) { set.add(tnA[i].getParent()); } Iterator it = set.iterator(); while (it.hasNext()) { jTree.expandPath(getTreePath((Tree... | /**
* Expand the entire subtree below the given TreeNode.
*/ | Expand the entire subtree below the given TreeNode | expandSubtree | {
"repo_name": "arturog8m/ocs",
"path": "bundle/jsky.app.ot/src/main/java/jsky/app/ot/viewer/TreeUtil.java",
"license": "bsd-3-clause",
"size": 6258
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.Set",
"javax.swing.JTree",
"javax.swing.tree.TreeNode"
] | import java.util.HashSet; import java.util.Iterator; import java.util.Set; import javax.swing.JTree; import javax.swing.tree.TreeNode; | import java.util.*; import javax.swing.*; import javax.swing.tree.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 926,543 |
public static String showErrorsJson(String errorMessage ){
Log.d(TAG, "showErrorsJson() called with: " + "errorMessage = [" + errorMessage + "]");
String errorDialogMsg="";
Boolean simpleMessage= false;
if (!(errorMessage.contains("{") && errorMessage.contains("}"))){
return errorMessage;
}
try {
... | static String function(String errorMessage ){ Log.d(TAG, STR + STR + errorMessage + "]"); String errorDialogMsg=STR{STR}STR{STR}STRerrorsSTRshowErrorsJson: errorStr : STRerrorSTRerrorSTRSTRshowErrorsJson: error getStrig ERRORSTRshowErrorsJson: error getStrig errorsSTRerrorsSTRshowErrorsJson: err\nSTRSTRshowErrorsJson: ... | /**
* Show errors in readable format
* @param errorMessage
* @return
*/ | Show errors in readable format | showErrorsJson | {
"repo_name": "imaginabit/YoNoDesperdicio",
"path": "app/src/main/java/com/imaginabit/yonodesperdicion/utils/Utils.java",
"license": "gpl-3.0",
"size": 25118
} | [
"android.util.Log",
"org.json.JSONArray",
"org.json.JSONException"
] | import android.util.Log; import org.json.JSONArray; import org.json.JSONException; | import android.util.*; import org.json.*; | [
"android.util",
"org.json"
] | android.util; org.json; | 2,003,587 |
protected void addWarningSwitch(Vector args, int warnings) {
} | void function(Vector args, int warnings) { } | /**
* Adds flags that customize the warnings reported
*
* Compiler does not appear to have warning levels but ability to turn off
* specific errors by explicit switches, could fabricate levels by
* prioritizing errors.
*
* @see net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler... | Adds flags that customize the warnings reported Compiler does not appear to have warning levels but ability to turn off specific errors by explicit switches, could fabricate levels by prioritizing errors | addWarningSwitch | {
"repo_name": "flax3lbs/cpptasks-parallel",
"path": "src/main/java/net/sf/antcontrib/cpptasks/arm/ADSCCompiler.java",
"license": "apache-2.0",
"size": 6611
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,520,900 |
//-----------------------------------------------------------------------
public final MetaProperty<PutCall> putCall() {
return putCall;
} | final MetaProperty<PutCall> function() { return putCall; } | /**
* The meta-property for the {@code putCall} property.
* @return the meta-property, not null
*/ | The meta-property for the putCall property | putCall | {
"repo_name": "nssales/Strata",
"path": "modules/finance/src/main/java/com/opengamma/strata/finance/rate/future/IborFutureOption.java",
"license": "apache-2.0",
"size": 33310
} | [
"com.opengamma.strata.basics.PutCall",
"org.joda.beans.MetaProperty"
] | import com.opengamma.strata.basics.PutCall; import org.joda.beans.MetaProperty; | import com.opengamma.strata.basics.*; import org.joda.beans.*; | [
"com.opengamma.strata",
"org.joda.beans"
] | com.opengamma.strata; org.joda.beans; | 885,953 |
private void updateAcesPermissions(PermissionTargetModel permissionTarget, InfoFactory infoFactory, MutableAclInfo mutableAclInfo) {
Set<AceInfo> aclInfos = new HashSet<>();
// update group permission
permissionTarget.getGroups().forEach(permissionModel -> {
MutableAceInfo ace = ... | void function(PermissionTargetModel permissionTarget, InfoFactory infoFactory, MutableAclInfo mutableAclInfo) { Set<AceInfo> aclInfos = new HashSet<>(); permissionTarget.getGroups().forEach(permissionModel -> { MutableAceInfo ace = infoFactory.createAce(permissionModel.getPrincipal(), true, permissionModel.getMask()); ... | /**
* update user and groups permissions
*
* @param permissionTarget - permission target
* @param infoFactory - info factory
* @param mutableAclInfo - ace info new instance
*/ | update user and groups permissions | updateAcesPermissions | {
"repo_name": "alancnet/artifactory",
"path": "web/rest-ui/src/main/java/org/artifactory/ui/rest/service/admin/security/permissions/CreatePermissionsTargetService.java",
"license": "apache-2.0",
"size": 6345
} | [
"java.util.HashSet",
"java.util.Set",
"org.artifactory.factory.InfoFactory",
"org.artifactory.security.AceInfo",
"org.artifactory.security.MutableAceInfo",
"org.artifactory.security.MutableAclInfo",
"org.artifactory.ui.rest.model.admin.security.permissions.PermissionTargetModel"
] | import java.util.HashSet; import java.util.Set; import org.artifactory.factory.InfoFactory; import org.artifactory.security.AceInfo; import org.artifactory.security.MutableAceInfo; import org.artifactory.security.MutableAclInfo; import org.artifactory.ui.rest.model.admin.security.permissions.PermissionTargetModel; | import java.util.*; import org.artifactory.factory.*; import org.artifactory.security.*; import org.artifactory.ui.rest.model.admin.security.permissions.*; | [
"java.util",
"org.artifactory.factory",
"org.artifactory.security",
"org.artifactory.ui"
] | java.util; org.artifactory.factory; org.artifactory.security; org.artifactory.ui; | 2,125,642 |
final void setType(TypeId typeId, boolean isNullable, int maximumWidth)
throws StandardException {
setType(new DataTypeDescriptor(typeId, isNullable, maximumWidth));
} | final void setType(TypeId typeId, boolean isNullable, int maximumWidth) throws StandardException { setType(new DataTypeDescriptor(typeId, isNullable, maximumWidth)); } | /**
* Set this node's type from type components.
*/ | Set this node's type from type components | setType | {
"repo_name": "youngor/openclouddb",
"path": "src/main/java/com/akiban/sql/parser/ValueNode.java",
"license": "apache-2.0",
"size": 13226
} | [
"com.akiban.sql.StandardException",
"com.akiban.sql.types.DataTypeDescriptor",
"com.akiban.sql.types.TypeId"
] | import com.akiban.sql.StandardException; import com.akiban.sql.types.DataTypeDescriptor; import com.akiban.sql.types.TypeId; | import com.akiban.sql.*; import com.akiban.sql.types.*; | [
"com.akiban.sql"
] | com.akiban.sql; | 66,038 |
public void validate()
{
final String REGEX_1 = EmulatorNLS.DPISCALECALCULATOR_Regex_TwoDigits;
final String REGEX_2 = "\\d+"; //$NON-NLS-1$
final String ERROR_SCREEN_SIZE = EmulatorNLS.DPISCALECALCULATOR_Error_ScreenSize;
final String ERROR_DPI_VALUE = EmulatorNLS.DPISCALECALCU... | void function() { final String REGEX_1 = EmulatorNLS.DPISCALECALCULATOR_Regex_TwoDigits; final String REGEX_2 = "\\d+"; final String ERROR_SCREEN_SIZE = EmulatorNLS.DPISCALECALCULATOR_Error_ScreenSize; final String ERROR_DPI_VALUE = EmulatorNLS.DPISCALECALCULATOR_Error_MonitorDpi; final String ERROR_MONITOR_SIZE = Emul... | /**
* Validates all the calculator fields
*/ | Validates all the calculator fields | validate | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/emulator/src/com/motorola/studio/android/emulator/device/ui/DpiScaleCalculatorDialog.java",
"license": "gpl-2.0",
"size": 12747
} | [
"com.motorola.studio.android.emulator.i18n.EmulatorNLS"
] | import com.motorola.studio.android.emulator.i18n.EmulatorNLS; | import com.motorola.studio.android.emulator.i18n.*; | [
"com.motorola.studio"
] | com.motorola.studio; | 2,447,383 |
public void addPackages( final Collection<InternalKnowledgePackage> newPkgs ) {
final List<InternalKnowledgePackage> clonedPkgs = new ArrayList<InternalKnowledgePackage>();
for (InternalKnowledgePackage newPkg : newPkgs) {
clonedPkgs.add(newPkg.deepCloneIfAlreadyInUse(rootClassLoader));
... | void function( final Collection<InternalKnowledgePackage> newPkgs ) { final List<InternalKnowledgePackage> clonedPkgs = new ArrayList<InternalKnowledgePackage>(); for (InternalKnowledgePackage newPkg : newPkgs) { clonedPkgs.add(newPkg.deepCloneIfAlreadyInUse(rootClassLoader)); } | /**
* Add a <code>Package</code> to the network. Iterates through the
* <code>Package</code> adding Each individual <code>Rule</code> to the
* network. Before update network each referenced <code>WorkingMemory</code>
* is locked.
*
* @param newPkgs The package to add.
*/ | Add a <code>Package</code> to the network. Iterates through the <code>Package</code> adding Each individual <code>Rule</code> to the network. Before update network each referenced <code>WorkingMemory</code> is locked | addPackages | {
"repo_name": "vinodkiran/drools",
"path": "drools-core/src/main/java/org/drools/core/impl/KnowledgeBaseImpl.java",
"license": "apache-2.0",
"size": 77278
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"org.drools.core.definitions.InternalKnowledgePackage"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.drools.core.definitions.InternalKnowledgePackage; | import java.util.*; import org.drools.core.definitions.*; | [
"java.util",
"org.drools.core"
] | java.util; org.drools.core; | 2,625,504 |
public ArrayList<ViaHeader> getViaHeaders() throws Exception {
ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>();
ViaHeader via = SipUtils.HEADER_FACTORY.createViaHeader(localIpAddress,
listeningPort,
getProxyProtocol(),
null);
viaHe... | ArrayList<ViaHeader> function() throws Exception { ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>(); ViaHeader via = SipUtils.HEADER_FACTORY.createViaHeader(localIpAddress, listeningPort, getProxyProtocol(), null); viaHeaders.add(via); return viaHeaders; } | /**
* Returns the local via path
*
* @return List of headers
* @throws Exception
*/ | Returns the local via path | getViaHeaders | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/RCSe/core/src/com/orangelabs/rcs/core/ims/protocol/sip/SipInterface.java",
"license": "gpl-2.0",
"size": 41235
} | [
"com.orangelabs.rcs.core.ims.network.sip.SipUtils",
"java.util.ArrayList",
"javax.sip.header.ViaHeader"
] | import com.orangelabs.rcs.core.ims.network.sip.SipUtils; import java.util.ArrayList; import javax.sip.header.ViaHeader; | import com.orangelabs.rcs.core.ims.network.sip.*; import java.util.*; import javax.sip.header.*; | [
"com.orangelabs.rcs",
"java.util",
"javax.sip"
] | com.orangelabs.rcs; java.util; javax.sip; | 53,209 |
public void finishRefreshing(Date updateDate) {
header.startAnimation(new ResizeHeaderAnimation(0));
progress.setVisibility(View.INVISIBLE);
arrow.setVisibility(View.VISIBLE);
if (updateDate == null)
lastUpdateDate = new Date();
else
lastUpdateDate = updateDate;
date.setText(getFormattedDate(lastUp... | void function(Date updateDate) { header.startAnimation(new ResizeHeaderAnimation(0)); progress.setVisibility(View.INVISIBLE); arrow.setVisibility(View.VISIBLE); if (updateDate == null) lastUpdateDate = new Date(); else lastUpdateDate = updateDate; date.setText(getFormattedDate(lastUpdateDate)); comment.setText(getResou... | /**
* Call when refreshing task is done. Must be called by the developer.
*
* @param updateDate
* allow developer to set the last updateDate
*/ | Call when refreshing task is done. Must be called by the developer | finishRefreshing | {
"repo_name": "thoinv/kaorisan",
"path": "trunk/C_Source_Code/refreshlistview_library/src/com/github/jeremiemartinez/refreshlistview/RefreshListView.java",
"license": "gpl-3.0",
"size": 12891
} | [
"android.view.View",
"java.util.Date"
] | import android.view.View; import java.util.Date; | import android.view.*; import java.util.*; | [
"android.view",
"java.util"
] | android.view; java.util; | 204,099 |
//-------------------------------------------------------------------------
public static DeformedSurface of(
SurfaceMetadata metadata,
Surface originalSurface,
Function<DoublesPair, ValueDerivatives> deformationFunction) {
return DeformedSurface.builder()
.metadata(metadata)
... | static DeformedSurface function( SurfaceMetadata metadata, Surface originalSurface, Function<DoublesPair, ValueDerivatives> deformationFunction) { return DeformedSurface.builder() .metadata(metadata) .originalSurface(originalSurface) .deformationFunction(deformationFunction) .build(); } | /**
* Obtains an instance.
*
* @param metadata the surface metadata
* @param originalSurface the original surface
* @param deformationFunction the deformation function
* @return the surface
*/ | Obtains an instance | of | {
"repo_name": "ChinaQuants/Strata",
"path": "modules/market/src/main/java/com/opengamma/strata/market/surface/DeformedSurface.java",
"license": "apache-2.0",
"size": 17970
} | [
"com.opengamma.strata.basics.value.ValueDerivatives",
"com.opengamma.strata.collect.tuple.DoublesPair",
"java.util.function.Function"
] | import com.opengamma.strata.basics.value.ValueDerivatives; import com.opengamma.strata.collect.tuple.DoublesPair; import java.util.function.Function; | import com.opengamma.strata.basics.value.*; import com.opengamma.strata.collect.tuple.*; import java.util.function.*; | [
"com.opengamma.strata",
"java.util"
] | com.opengamma.strata; java.util; | 282,633 |
Set<Constraint<T>> getConstraints() {
return Collections.unmodifiableSet(constraints);
}
static class Constraint<T> {
final public T before;
final public T after;
Constraint(T before, T after) {
this.before = before;
this.after = after;
... | Set<Constraint<T>> getConstraints() { return Collections.unmodifiableSet(constraints); } static class Constraint<T> { final public T before; final public T after; Constraint(T before, T after) { this.before = before; this.after = after; } | /**
* For testing only
*/ | For testing only | getConstraints | {
"repo_name": "amkimian/Rapture",
"path": "Libs/PluginInstallerLib/src/main/java/rapture/plugin/install/TopoSort.java",
"license": "mit",
"size": 4901
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,685,953 |
private void verticalScrollToFieldValue(int field, int fieldValue, int[] columnIndices,
DatePicker pickerView, int scrollDir)
throws Throwable {
int columnIndex = getColumnIndexForDateField(field, columnIndices);
int colDayIndex = columnI... | void function(int field, int fieldValue, int[] columnIndices, DatePicker pickerView, int scrollDir) throws Throwable { int columnIndex = getColumnIndexForDateField(field, columnIndices); int colDayIndex = columnIndices[0]; int colMonthIndex = columnIndices[1]; int colYearIndex = columnIndices[2]; horizontalScrollToDate... | /**
* Scrolls vertically all the way up or down (depending on the provided scrollDir parameter)
* to fieldValue if it's not equal to -1; otherwise, the scrolling goes all the way to the end.
* @param field The date field over which the scrolling is performed
* @param fieldValue The field value to sc... | Scrolls vertically all the way up or down (depending on the provided scrollDir parameter) to fieldValue if it's not equal to -1; otherwise, the scrolling goes all the way to the end | verticalScrollToFieldValue | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "leanback/src/androidTest/java/androidx/leanback/app/wizard/GuidedDatePickerTest.java",
"license": "apache-2.0",
"size": 37808
} | [
"android.view.KeyEvent",
"androidx.leanback.widget.picker.DatePicker",
"java.util.Calendar",
"org.junit.Assert"
] | import android.view.KeyEvent; import androidx.leanback.widget.picker.DatePicker; import java.util.Calendar; import org.junit.Assert; | import android.view.*; import androidx.leanback.widget.picker.*; import java.util.*; import org.junit.*; | [
"android.view",
"androidx.leanback",
"java.util",
"org.junit"
] | android.view; androidx.leanback; java.util; org.junit; | 1,835,010 |
public void setCamelStreamCachingStrategy(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) {
this.camelStreamCachingStrategy = camelStreamCachingStrategy;
} | void function(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) { this.camelStreamCachingStrategy = camelStreamCachingStrategy; } | /**
* Configuration of stream caching.
*/ | Configuration of stream caching | setCamelStreamCachingStrategy | {
"repo_name": "veithen/camel",
"path": "components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java",
"license": "apache-2.0",
"size": 36359
} | [
"org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition"
] | import org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition; | import org.apache.camel.core.xml.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,374,278 |
void removeChannelInterestLater(final SelectableChannel channel,
final int interest);
| void removeChannelInterestLater(final SelectableChannel channel, final int interest); | /**
* Like removeChannelInterestNow(), but executed asynchronouly on the
* selector thread. This method returns after scheduling the task, without
* waiting for it to be executed.
*
* @param channel The channel to be updated. Must be registered.
* @param interest The interest to rem... | Like removeChannelInterestNow(), but executed asynchronouly on the selector thread. This method returns after scheduling the task, without waiting for it to be executed | removeChannelInterestLater | {
"repo_name": "adamfisk/littleshoot-client",
"path": "common/nio/src/main/java/org/lastbamboo/common/nio/SelectorManager.java",
"license": "gpl-2.0",
"size": 4934
} | [
"java.nio.channels.SelectableChannel"
] | import java.nio.channels.SelectableChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,701,511 |
public synchronized void processBlocksBeingWrittenReport(DatanodeID nodeID,
BlockListAsLongs blocksBeingWritten) throws IOException {
DatanodeDescriptor dataNode = getDatanode(nodeID);
if (dataNode == null) {
throw new IOException("ProcessReport from unregistered node: "
+ nodeID.getName... | synchronized void function(DatanodeID nodeID, BlockListAsLongs blocksBeingWritten) throws IOException { DatanodeDescriptor dataNode = getDatanode(nodeID); if (dataNode == null) { throw new IOException(STR + nodeID.getName()); } if (shouldNodeShutdown(dataNode)) { setDatanodeDead(dataNode); throw new DisallowedDatanodeE... | /**
* It will update the targets for INodeFileUnderConstruction
*
* @param nodeID
* - DataNode ID
* @param blocksBeingWritten
* - list of blocks which are still inprogress.
* @throws IOException
*/ | It will update the targets for INodeFileUnderConstruction | processBlocksBeingWrittenReport | {
"repo_name": "zhaobj/MyHadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java",
"license": "apache-2.0",
"size": 214078
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.protocol.BlockListAsLongs",
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.server.namenode.BlocksMap",
"org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.protocol.BlockListAsLongs; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.server.namenode.BlocksMap; import org.apache.hadoop.hdfs.server.protocol.DisallowedDatanodeException; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.server.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,347,993 |
public static void convertCSV2Binary(final String csvFile,
final String binFile, final int inputCount, final int outputCount,
final boolean headers) {
(new File(binFile)).delete();
final CSVNeuralDataSet csv = new CSV... | static void function(final String csvFile, final String binFile, final int inputCount, final int outputCount, final boolean headers) { (new File(binFile)).delete(); final CSVNeuralDataSet csv = new CSVNeuralDataSet(csvFile, inputCount, outputCount, headers); final BufferedMLDataSet buffer = new BufferedMLDataSet( new F... | /**
* Convert a CSV file to a binary training file.
*
* @param csvFile The binary file.
* @param binFile The binary file.
* @param inputCount The number of input values.
* @param outputCount The number of output values.
* @param headers True, if there are headers on the C... | Convert a CSV file to a binary training file | convertCSV2Binary | {
"repo_name": "automenta/java_dann",
"path": "src/syncleus/dann/math/EncogUtility.java",
"license": "agpl-3.0",
"size": 16287
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,178,865 |
@Test
public void removeRowThroughContainer_legalRowItem_shouldSucceed()
throws SQLException {
TableQuery tQuery = new TableQuery("people", connectionPool,
SQLTestsConstants.sqlGen);
SQLContainer container = new SQLContainer(tQuery);
container.setAutoCommit(fa... | void function() throws SQLException { TableQuery tQuery = new TableQuery(STR, connectionPool, SQLTestsConstants.sqlGen); SQLContainer container = new SQLContainer(tQuery); container.setAutoCommit(false); Assert.assertTrue(container.removeItem(container.getItemIds() .iterator().next())); Assert.assertEquals(4, tQuery.ge... | /**********************************************************************
* TableQuery row removal tests
**********************************************************************/ | TableQuery row removal tests | removeRowThroughContainer_legalRowItem_shouldSucceed | {
"repo_name": "udayinfy/vaadin",
"path": "server/tests/src/com/vaadin/data/util/sqlcontainer/query/TableQueryTest.java",
"license": "apache-2.0",
"size": 28543
} | [
"com.vaadin.data.util.sqlcontainer.SQLContainer",
"com.vaadin.data.util.sqlcontainer.SQLTestsConstants",
"java.sql.SQLException",
"org.junit.Assert"
] | import com.vaadin.data.util.sqlcontainer.SQLContainer; import com.vaadin.data.util.sqlcontainer.SQLTestsConstants; import java.sql.SQLException; import org.junit.Assert; | import com.vaadin.data.util.sqlcontainer.*; import java.sql.*; import org.junit.*; | [
"com.vaadin.data",
"java.sql",
"org.junit"
] | com.vaadin.data; java.sql; org.junit; | 1,674,408 |
public final void testRead04() throws IOException {
for (int ii=0; ii<algorithmName.length; ii++) {
try {
MessageDigest md = MessageDigest.getInstance(algorithmName[ii]);
DigestInputStream dis = new DigestInputStream(null, md);
// must result in an... | final void function() throws IOException { for (int ii=0; ii<algorithmName.length; ii++) { try { MessageDigest md = MessageDigest.getInstance(algorithmName[ii]); DigestInputStream dis = new DigestInputStream(null, md); try { for (int i=0; i<MY_MESSAGE_LEN; i++) { dis.read(); } } catch (Exception e) { return; } fail(STR... | /**
* Test #4 for <code>read()</code> method<br>
*
* Assertion: broken <code>DigestInputStream</code>instance:
* <code>InputStream</code> not set. <code>read()</code> must
* not work
*/ | Test #4 for <code>read()</code> method Assertion: broken <code>DigestInputStream</code>instance: <code>InputStream</code> not set. <code>read()</code> must not work | testRead04 | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/org/apache/harmony/security/tests/java/security/DigestInputStreamTest.java",
"license": "apache-2.0",
"size": 21997
} | [
"java.io.IOException",
"java.security.DigestInputStream",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException"
] | import java.io.IOException; import java.security.DigestInputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; | import java.io.*; import java.security.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 1,312,786 |
public static void getPreviewSubscriptionOfVendorSkuSubResource(
com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) {
manager.vendorSkuPreviews().getWithResponse("TestVendor", "TestSku", "previewSub", Context.NONE);
} | static void function( com.azure.resourcemanager.hybridnetwork.HybridNetworkManager manager) { manager.vendorSkuPreviews().getWithResponse(STR, STR, STR, Context.NONE); } | /**
* Sample code: Get preview subscription of vendor sku sub resource.
*
* @param manager Entry point to HybridNetworkManager.
*/ | Sample code: Get preview subscription of vendor sku sub resource | getPreviewSubscriptionOfVendorSkuSubResource | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/samples/java/com/azure/resourcemanager/hybridnetwork/VendorSkuPreviewGetSamples.java",
"license": "mit",
"size": 751
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 935,069 |
public NounSynset[] getHyponyms() throws RetrievalException
{
return getNounSynsets(RelationshipType.HYPONYM);
} | NounSynset[] function() throws RetrievalException { return getNounSynsets(RelationshipType.HYPONYM); } | /**
* Returns the direct hyponyms (subordinate type), if any, of this type.
* <br><p>
* For example, a hyponym of "shelter" is "tent".
*
* @return The direct hyponyms of this synset.
* @throws RetrievalException An error occurred retrieving data.
*/ | Returns the direct hyponyms (subordinate type), if any, of this type. For example, a hyponym of "shelter" is "tent" | getHyponyms | {
"repo_name": "jaytaylor/jaws",
"path": "src/edu/smu/tspell/wordnet/impl/file/synset/NounReferenceSynset.java",
"license": "bsd-2-clause",
"size": 8776
} | [
"edu.smu.tspell.wordnet.NounSynset",
"edu.smu.tspell.wordnet.impl.file.RelationshipType",
"edu.smu.tspell.wordnet.impl.file.RetrievalException"
] | import edu.smu.tspell.wordnet.NounSynset; import edu.smu.tspell.wordnet.impl.file.RelationshipType; import edu.smu.tspell.wordnet.impl.file.RetrievalException; | import edu.smu.tspell.wordnet.*; import edu.smu.tspell.wordnet.impl.file.*; | [
"edu.smu.tspell"
] | edu.smu.tspell; | 1,667,245 |
public static void scale(WeatherParticleEmitter emitter, float scale, boolean isometric, boolean scaleParticles) {
float scaling;
if (scaleParticles) {
scale(emitter.getXScale(), scale);
scale(emitter.getYScale(), scale);
} else {
scale(emitter.getEmission(), scale);
scaling = emitt... | static void function(WeatherParticleEmitter emitter, float scale, boolean isometric, boolean scaleParticles) { float scaling; if (scaleParticles) { scale(emitter.getXScale(), scale); scale(emitter.getYScale(), scale); } else { scale(emitter.getEmission(), scale); scaling = emitter.getMinParticleCount(); emitter.setMinP... | /**
* Scales the supplied particle emitters by multiplying the velocity and
* scale settings of all its emitters by the supplied value.
*
* @param pe
* @param scale
* @param scaleParticles
* if true, the particles themselves are scaled up to create a
* larger effect. If fa... | Scales the supplied particle emitters by multiplying the velocity and scale settings of all its emitters by the supplied value | scale | {
"repo_name": "mganzarcik/fabulae",
"path": "core/src/mg/fishchicken/core/util/GraphicsUtil.java",
"license": "mit",
"size": 12891
} | [
"com.badlogic.gdx.graphics.g2d.ParticleEmitter",
"com.badlogic.gdx.graphics.g2d.WeatherParticleEmitter"
] | import com.badlogic.gdx.graphics.g2d.ParticleEmitter; import com.badlogic.gdx.graphics.g2d.WeatherParticleEmitter; | import com.badlogic.gdx.graphics.g2d.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,492,229 |
public RenderedImage create(ParameterBlock args,
RenderingHints renderHints) {
// Get ImageLayout from renderHints if any.
ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
return new ThresholdOpImage(args.getRenderedSource(... | RenderedImage function(ParameterBlock args, RenderingHints renderHints) { ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints); return new ThresholdOpImage(args.getRenderedSource(0), renderHints, layout, (double[])args.getObjectParameter(0), (double[])args.getObjectParameter(1), (double[])args.getObjectParamete... | /**
* Creates a new instance of <code>ThresholdOpImage</code> in the
* rendered layer.
*
* @param args The source image and the input parameters.
* @param hints Optionally contains destination image layout.
*/ | Creates a new instance of <code>ThresholdOpImage</code> in the rendered layer | create | {
"repo_name": "RoProducts/rastertheque",
"path": "JAILibrary/src/com/sun/media/jai/opimage/ThresholdCRIF.java",
"license": "gpl-2.0",
"size": 1766
} | [
"java.awt.RenderingHints",
"java.awt.image.RenderedImage",
"java.awt.image.renderable.ParameterBlock",
"javax.media.jai.ImageLayout"
] | import java.awt.RenderingHints; import java.awt.image.RenderedImage; import java.awt.image.renderable.ParameterBlock; import javax.media.jai.ImageLayout; | import java.awt.*; import java.awt.image.*; import java.awt.image.renderable.*; import javax.media.jai.*; | [
"java.awt",
"javax.media"
] | java.awt; javax.media; | 2,696,770 |
public static void setDefaultUnterhaltLeuchte(final TkeyUnterhLeuchteCustomBean defaultUnterhaltLeuchte) {
BelisBroker.defaultUnterhaltLeuchte = defaultUnterhaltLeuchte;
} | static void function(final TkeyUnterhLeuchteCustomBean defaultUnterhaltLeuchte) { BelisBroker.defaultUnterhaltLeuchte = defaultUnterhaltLeuchte; } | /**
* DOCUMENT ME!
*
* @param defaultUnterhaltLeuchte DOCUMENT ME!
*/ | DOCUMENT ME | setDefaultUnterhaltLeuchte | {
"repo_name": "cismet/belis-client",
"path": "src/main/java/de/cismet/belis/broker/BelisBroker.java",
"license": "gpl-3.0",
"size": 138018
} | [
"de.cismet.cids.custom.beans.belis2.TkeyUnterhLeuchteCustomBean"
] | import de.cismet.cids.custom.beans.belis2.TkeyUnterhLeuchteCustomBean; | import de.cismet.cids.custom.beans.belis2.*; | [
"de.cismet.cids"
] | de.cismet.cids; | 69,650 |
protected void addValidTimeToObservation(AbstractObservation observation, TimePeriod validTime) {
if (validTime != null) {
observation.setValidTimeStart(validTime.getStart().toDate());
observation.setValidTimeEnd(validTime.getEnd().toDate());
}
} | void function(AbstractObservation observation, TimePeriod validTime) { if (validTime != null) { observation.setValidTimeStart(validTime.getStart().toDate()); observation.setValidTimeEnd(validTime.getEnd().toDate()); } } | /**
* Add valid time to observation object
*
* @param observation
* Observation object
* @param validTime
* SOS valid time
*/ | Add valid time to observation object | addValidTimeToObservation | {
"repo_name": "johnjohndoe/SOS",
"path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/dao/AbstractObservationDAO.java",
"license": "gpl-2.0",
"size": 54579
} | [
"org.n52.sos.ds.hibernate.entities.AbstractObservation",
"org.n52.sos.ogc.gml.time.TimePeriod"
] | import org.n52.sos.ds.hibernate.entities.AbstractObservation; import org.n52.sos.ogc.gml.time.TimePeriod; | import org.n52.sos.ds.hibernate.entities.*; import org.n52.sos.ogc.gml.time.*; | [
"org.n52.sos"
] | org.n52.sos; | 104,538 |
public Duration getDefaultPollInterval() {
return this.defaultPollInterval;
}
private final WorkspacesClient workspaces; | Duration function() { return this.defaultPollInterval; } private final WorkspacesClient workspaces; | /**
* Gets The default poll interval for long-running operation.
*
* @return the defaultPollInterval value.
*/ | Gets The default poll interval for long-running operation | getDefaultPollInterval | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/databricks/azure-resourcemanager-databricks/src/main/java/com/azure/resourcemanager/databricks/implementation/AzureDatabricksManagementClientImpl.java",
"license": "mit",
"size": 12152
} | [
"com.azure.resourcemanager.databricks.fluent.WorkspacesClient",
"java.time.Duration"
] | import com.azure.resourcemanager.databricks.fluent.WorkspacesClient; import java.time.Duration; | import com.azure.resourcemanager.databricks.fluent.*; import java.time.*; | [
"com.azure.resourcemanager",
"java.time"
] | com.azure.resourcemanager; java.time; | 919,020 |
static Response create(String host, String request) {
Response response = new Response();
response.duration = System.currentTimeMillis();
try {response.data = HttpUtils.sendRequest(host, request);
} catch (IOException | ... | static Response create(String host, String request) { Response response = new Response(); response.duration = System.currentTimeMillis(); try {response.data = HttpUtils.sendRequest(host, request); } catch (IOException GeneralSecurityException exception) { return Response.create(exception); } response.duration = System.... | /**
* Performs a request and creates a new response object.
* @param host
* @param request
* @return the created response
* @throws IOException
* @throws InterruptedException
*/ | Performs a request and creates a new response object | create | {
"repo_name": "seanox/devwex-test",
"path": "test/com/seanox/devwex/WorkerTest_Performance.java",
"license": "gpl-2.0",
"size": 15250
} | [
"com.seanox.test.utils.HttpUtils",
"java.io.IOException",
"java.security.GeneralSecurityException"
] | import com.seanox.test.utils.HttpUtils; import java.io.IOException; import java.security.GeneralSecurityException; | import com.seanox.test.utils.*; import java.io.*; import java.security.*; | [
"com.seanox.test",
"java.io",
"java.security"
] | com.seanox.test; java.io; java.security; | 347,655 |
boolean readHeader(String fileName)
{
URL url = TextUtils.makeURLToFile(fileName);
try
{
URLConnection urlCon = url.openConnection();
InputStreamReader is = new InputStreamReader(urlCon.getInputStream());
lnr = new LineNumberReader(is);
// read a line from the file
String line = lnr.readLine()... | boolean readHeader(String fileName) { URL url = TextUtils.makeURLToFile(fileName); try { URLConnection urlCon = url.openConnection(); InputStreamReader is = new InputStreamReader(urlCon.getInputStream()); lnr = new LineNumberReader(is); String line = lnr.readLine(); if (line == null) return false; line = line.trim(); h... | /**
* Method to read the header from a PLA personality file.
* @param fileName the name of the file.
* @return false on error.
*/ | Method to read the header from a PLA personality file | readHeader | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/tool/generator/cmosPLA/IO.java",
"license": "gpl-3.0",
"size": 3704
} | [
"com.sun.electric.database.text.TextUtils",
"java.io.InputStreamReader",
"java.io.LineNumberReader",
"java.net.URLConnection"
] | import com.sun.electric.database.text.TextUtils; import java.io.InputStreamReader; import java.io.LineNumberReader; import java.net.URLConnection; | import com.sun.electric.database.text.*; import java.io.*; import java.net.*; | [
"com.sun.electric",
"java.io",
"java.net"
] | com.sun.electric; java.io; java.net; | 2,462,020 |
protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData data)
{
logger.debug(this + ".initState()");
super.initState(state, portlet, data);
if(state.getAttribute(STATE_INITIALIZED) == null)
{
initCopyContext(state);
initMoveContext(state);
}
initStateAttributes(st... | void function(SessionState state, VelocityPortlet portlet, JetspeedRunData data) { logger.debug(this + STR); super.initState(state, portlet, data); if(state.getAttribute(STATE_INITIALIZED) == null) { initCopyContext(state); initMoveContext(state); } initStateAttributes(state, portlet); } | /**
* Populate the state object, if needed - override to do something!
*/ | Populate the state object, if needed - override to do something | initState | {
"repo_name": "buckett/sakai-gitflow",
"path": "content/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesAction.java",
"license": "apache-2.0",
"size": 334662
} | [
"org.sakaiproject.cheftool.JetspeedRunData",
"org.sakaiproject.cheftool.VelocityPortlet",
"org.sakaiproject.event.api.SessionState"
] | import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.event.api.SessionState; | import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event"
] | org.sakaiproject.cheftool; org.sakaiproject.event; | 2,585,588 |
@Override
public ValueMetaInterface customizeValueFromSQLType( ValueMetaInterface v, java.sql.ResultSetMetaData rm, int index )
throws SQLException {
return null;
} | ValueMetaInterface function( ValueMetaInterface v, java.sql.ResultSetMetaData rm, int index ) throws SQLException { return null; } | /**
* Customizes the ValueMetaInterface defined in the base
*
* @param v the determined valueMetaInterface
* @param rm the sql result
* @param index the index to the column
* @return ValueMetaInterface customized with the data base specific types
*/ | Customizes the ValueMetaInterface defined in the base | customizeValueFromSQLType | {
"repo_name": "emartin-pentaho/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/database/BaseDatabaseMeta.java",
"license": "apache-2.0",
"size": 69025
} | [
"java.sql.SQLException",
"org.pentaho.di.core.row.ValueMetaInterface"
] | import java.sql.SQLException; import org.pentaho.di.core.row.ValueMetaInterface; | import java.sql.*; import org.pentaho.di.core.row.*; | [
"java.sql",
"org.pentaho.di"
] | java.sql; org.pentaho.di; | 826,164 |
Optional<SourcePath> getUiTestTargetAppBinarySourcePath(); | Optional<SourcePath> getUiTestTargetAppBinarySourcePath(); | /**
* Location of the ui test target binary that can be passed test target application of UITest
*/ | Location of the ui test target binary that can be passed test target application of UITest | getUiTestTargetAppBinarySourcePath | {
"repo_name": "JoelMarcey/buck",
"path": "src/com/facebook/buck/apple/AppleTestDescription.java",
"license": "apache-2.0",
"size": 46849
} | [
"com.facebook.buck.core.sourcepath.SourcePath",
"java.util.Optional"
] | import com.facebook.buck.core.sourcepath.SourcePath; import java.util.Optional; | import com.facebook.buck.core.sourcepath.*; import java.util.*; | [
"com.facebook.buck",
"java.util"
] | com.facebook.buck; java.util; | 1,080,008 |
public void restoreDefaults() throws CoreException {
} | void function() throws CoreException { } | /**
* Resets the template set with the default templates.
*
* @throws CoreException in case the restore operation fails
*/ | Resets the template set with the default templates | restoreDefaults | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/corext/template/java/Templates.java",
"license": "epl-1.0",
"size": 2576
} | [
"org.eclipse.core.runtime.CoreException"
] | import org.eclipse.core.runtime.CoreException; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 609,907 |
@Test
public void testCursorRotatePrexistingSameSizeWithNewModtime()
throws IOException, InterruptedException {
// Windows rename semantics different than unix
Assume.assumeTrue(!OSUtils.isWindowsOS());
// normal implementation uses synchronous queue, but we use array blocking
// queue for s... | void function() throws IOException, InterruptedException { Assume.assumeTrue(!OSUtils.isWindowsOS()); File f2 = File.createTempFile("move", ".tmp"); f2.delete(); f2.deleteOnExit(); BlockingQueue<Event> q = new ArrayBlockingQueue<Event>(100); File f = createDataFile(5); Cursor c = new Cursor(q, f); assertTrue(c.tailBody... | /**
* Here, we complete reading a file and then replace it with a new file that
* has a different modification time.
*/ | Here, we complete reading a file and then replace it with a new file that has a different modification time | testCursorRotatePrexistingSameSizeWithNewModtime | {
"repo_name": "yongkun/flume-0.9.3-cdh3u0-rakuten",
"path": "src/javatest/com/cloudera/flume/handlers/text/TestTailSourceCursor.java",
"license": "apache-2.0",
"size": 23438
} | [
"com.cloudera.flume.core.Event",
"com.cloudera.flume.handlers.text.TailSource",
"com.cloudera.util.Clock",
"com.cloudera.util.OSUtils",
"java.io.File",
"java.io.IOException",
"java.util.concurrent.ArrayBlockingQueue",
"java.util.concurrent.BlockingQueue",
"org.junit.Assert",
"org.junit.Assume"
] | import com.cloudera.flume.core.Event; import com.cloudera.flume.handlers.text.TailSource; import com.cloudera.util.Clock; import com.cloudera.util.OSUtils; import java.io.File; import java.io.IOException; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.BlockingQueue; import org.junit.Assert;... | import com.cloudera.flume.core.*; import com.cloudera.flume.handlers.text.*; import com.cloudera.util.*; import java.io.*; import java.util.concurrent.*; import org.junit.*; | [
"com.cloudera.flume",
"com.cloudera.util",
"java.io",
"java.util",
"org.junit"
] | com.cloudera.flume; com.cloudera.util; java.io; java.util; org.junit; | 452,540 |
final boolean changedBetweenSnapshots(Snapshot earlier, Snapshot later) {
final int size = diffs.size();
int earlierDiffIndex = Collections.binarySearch(diffs, earlier.getId());
if (-earlierDiffIndex - 1 == size) {
// if the earlierSnapshot is after the latest SnapshotDiff stored in
// diffs, ... | final boolean changedBetweenSnapshots(Snapshot earlier, Snapshot later) { final int size = diffs.size(); int earlierDiffIndex = Collections.binarySearch(diffs, earlier.getId()); if (-earlierDiffIndex - 1 == size) { return false; } if (later != null) { int laterDiffIndex = Collections.binarySearch(diffs, later.getId());... | /**
* Check if changes have happened between two snapshots.
* @param earlier The snapshot taken earlier
* @param later The snapshot taken later
* @return Whether or not modifications (including diretory/file metadata
* change, file creation/deletion under the directory) have happened
* ... | Check if changes have happened between two snapshots | changedBetweenSnapshots | {
"repo_name": "songweijia/fffs",
"path": "sources/hadoop-2.4.1-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/AbstractINodeDiffList.java",
"license": "apache-2.0",
"size": 11271
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 239,989 |
void setPosition(EPoint value); | void setPosition(EPoint value); | /**
* Sets the value of the '{@link com.paxelerate.model.monuments.Monument#getPosition <em>Position</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Position</em>' containment reference.
* @see #getPosition()
* @generated
*/ | Sets the value of the '<code>com.paxelerate.model.monuments.Monument#getPosition Position</code>' containment reference. | setPosition | {
"repo_name": "BauhausLuftfahrt/PAXelerate",
"path": "com.paxelerate.model/src/com/paxelerate/model/monuments/Monument.java",
"license": "epl-1.0",
"size": 2150
} | [
"com.paxelerate.model.EPoint"
] | import com.paxelerate.model.EPoint; | import com.paxelerate.model.*; | [
"com.paxelerate.model"
] | com.paxelerate.model; | 684,652 |
public Changelist createNewChangelistImpl(IServer server, IClient client, String chgDescr) {
Changelist changeListImpl = null;
changeListImpl = new Changelist(
IChangelist.UNKNOWN,
client.getName(),
userName,
ChangelistStatus.NEW,
... | Changelist function(IServer server, IClient client, String chgDescr) { Changelist changeListImpl = null; changeListImpl = new Changelist( IChangelist.UNKNOWN, client.getName(), userName, ChangelistStatus.NEW, new Date(), chgDescr, false, (Server) server ); return changeListImpl; } | /**
* Create a new ChangelistImpl given the passed in parameters. Uses
* changelistId=IChangelist.UNKNOWN.
*/ | Create a new ChangelistImpl given the passed in parameters. Uses changelistId=IChangelist.UNKNOWN | createNewChangelistImpl | {
"repo_name": "groboclown/p4ic4idea",
"path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/endtoend/ClientEditSubmitE2ETest.java",
"license": "apache-2.0",
"size": 52979
} | [
"com.perforce.p4java.client.IClient",
"com.perforce.p4java.core.ChangelistStatus",
"com.perforce.p4java.core.IChangelist",
"com.perforce.p4java.impl.generic.core.Changelist",
"com.perforce.p4java.impl.mapbased.server.Server",
"com.perforce.p4java.server.IServer",
"java.util.Date"
] | import com.perforce.p4java.client.IClient; import com.perforce.p4java.core.ChangelistStatus; import com.perforce.p4java.core.IChangelist; import com.perforce.p4java.impl.generic.core.Changelist; import com.perforce.p4java.impl.mapbased.server.Server; import com.perforce.p4java.server.IServer; import java.util.Date; | import com.perforce.p4java.client.*; import com.perforce.p4java.core.*; import com.perforce.p4java.impl.generic.core.*; import com.perforce.p4java.impl.mapbased.server.*; import com.perforce.p4java.server.*; import java.util.*; | [
"com.perforce.p4java",
"java.util"
] | com.perforce.p4java; java.util; | 731,710 |
public boolean isWritable() throws SQLException {
return columnMetaData.isWritable();
} | boolean function() throws SQLException { return columnMetaData.isWritable(); } | /**
* Indicates whether it is possible for a write on this column to succeed.
*
* @return <code>true</code> if so; <code>false</code> otherwise.
* @throws SQLException if a database access error occurs.
*/ | Indicates whether it is possible for a write on this column to succeed | isWritable | {
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/relational/metaData/DecoratorColumnMetaData.java",
"license": "lgpl-3.0",
"size": 12163
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,178,996 |
public ViewEmployeeAddress getViewAddressFromSourceEntityIdAndType(UUID sourceEntityId, int sourceEntityType) throws EwpException {
AddressDataService addService = new AddressDataService();
Address response = addService.getAddressFromSourceEntityIdAndType(sourceEntityId, sourceEntityType);
i... | ViewEmployeeAddress function(UUID sourceEntityId, int sourceEntityType) throws EwpException { AddressDataService addService = new AddressDataService(); Address response = addService.getAddressFromSourceEntityIdAndType(sourceEntityId, sourceEntityType); if (response != null) { throw new EwpException(STR); } ViewEmployee... | /**
* Method is used to get address from EntityType and EntiyId
* /// :param: sourceEntityid, It source entityId, For which we have saved the address
* /// :param: sourceEntityType, It source entity type, For which we have saved the address
*
* @param sourceEntityId
* @param sourceEntityTy... | Method is used to get address from EntityType and EntiyId :param: sourceEntityid, It source entityId, For which we have saved the address :param: sourceEntityType, It source entity type, For which we have saved the address | getViewAddressFromSourceEntityIdAndType | {
"repo_name": "rishabh05/ED",
"path": "employeedirectory/src/main/java/com/eworkplaceapps/employeedirectory/employee/EmployeeContactDataService.java",
"license": "apache-2.0",
"size": 13373
} | [
"com.eworkplaceapps.platform.address.Address",
"com.eworkplaceapps.platform.address.AddressDataService",
"com.eworkplaceapps.platform.exception.EwpException"
] | import com.eworkplaceapps.platform.address.Address; import com.eworkplaceapps.platform.address.AddressDataService; import com.eworkplaceapps.platform.exception.EwpException; | import com.eworkplaceapps.platform.address.*; import com.eworkplaceapps.platform.exception.*; | [
"com.eworkplaceapps.platform"
] | com.eworkplaceapps.platform; | 547,410 |
@Override
protected boolean checkExemplars(TreeComposite cNode) {
// Loop over all exemplars and see if this cNode is compatible
for (TreeComposite exemplar : getChildExemplars()) {
if (cNode.getName().equals("DefinitionType")) {
logger.info("Exemplar: " + exemplar.getName());
}
if (cNode.getName(... | boolean function(TreeComposite cNode) { for (TreeComposite exemplar : getChildExemplars()) { if (cNode.getName().equals(STR)) { logger.info(STR + exemplar.getName()); } if (cNode.getName().equals(exemplar.getName())) { return true; } } return false; } | /**
* This method overrides TreeComposite.checkExemplars to use the overridden
* getChildExemplars method to see if a given TreeComposite can be added as
* a new child of this tree.
*
* @param cNode
* @return
*/ | This method overrides TreeComposite.checkExemplars to use the overridden getChildExemplars method to see if a given TreeComposite can be added as a new child of this tree | checkExemplars | {
"repo_name": "eclipse/ice",
"path": "org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/form/emf/EMFTreeComposite.java",
"license": "epl-1.0",
"size": 13563
} | [
"org.eclipse.ice.datastructures.form.TreeComposite"
] | import org.eclipse.ice.datastructures.form.TreeComposite; | import org.eclipse.ice.datastructures.form.*; | [
"org.eclipse.ice"
] | org.eclipse.ice; | 2,629,974 |
public LocalPosition getPosition();
| LocalPosition function(); | /**
* Gets the position in the settlement locale.
* @return Position in (meters).
*/ | Gets the position in the settlement locale | getPosition | {
"repo_name": "mars-sim/mars-sim",
"path": "mars-sim-core/src/main/java/org/mars_sim/msp/core/structure/building/connection/InsidePathLocation.java",
"license": "gpl-3.0",
"size": 490
} | [
"org.mars_sim.msp.core.LocalPosition"
] | import org.mars_sim.msp.core.LocalPosition; | import org.mars_sim.msp.core.*; | [
"org.mars_sim.msp"
] | org.mars_sim.msp; | 1,011,301 |
public String getLongDescription() {
return Dispatch.get(this, "LongDescription").toString();
} | String function() { return Dispatch.get(this, STR).toString(); } | /**
* Wrapper for calling the ActiveX-Method with input-parameter(s).
*
* @return the result is of type String
*/ | Wrapper for calling the ActiveX-Method with input-parameter(s) | getLongDescription | {
"repo_name": "cpesch/MetaMusic",
"path": "itunes-com-library/src/main/java/slash/metamusic/itunes/com/binding/IITFileOrCDTrack.java",
"license": "gpl-2.0",
"size": 32709
} | [
"com.jacob.com.Dispatch"
] | import com.jacob.com.Dispatch; | import com.jacob.com.*; | [
"com.jacob.com"
] | com.jacob.com; | 1,587,978 |
@Override
public void onPageScrollStateChanged(int state) {
switch (state) {
case SCROLL_STATE_IDLE:
if (currentAutoPlayState.get() == AutoPlayState.PAUSED) {
startAutoPlay();
}
break;
... | void function(int state) { switch (state) { case SCROLL_STATE_IDLE: if (currentAutoPlayState.get() == AutoPlayState.PAUSED) { startAutoPlay(); } break; case SCROLL_STATE_DRAGGING: case SCROLL_STATE_SETTLING: if (!new ArrayList<AutoPlayState>() {{ add(AutoPlayState.NOT_INITIALIZED); add(AutoPlayState.PAUSED); add(AutoPl... | /**
* Not used by this implementation.
*/ | Not used by this implementation | onPageScrollStateChanged | {
"repo_name": "f0rke/Android-PageIndicator",
"path": "pageindicator/src/main/java/de/f0rke/pageindicator/PageIndicator.java",
"license": "apache-2.0",
"size": 36919
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 825,042 |
public void purge() {
String path = ((GWTFolder) actualItem.getUserObject()).getPath();
folderService.purge(path, callbackPurge);
Main.get().mainPanel.desktop.navigator.status.setFlagPurge();
}
| void function() { String path = ((GWTFolder) actualItem.getUserObject()).getPath(); folderService.purge(path, callbackPurge); Main.get().mainPanel.desktop.navigator.status.setFlagPurge(); } | /**
* Purge folder on file browser ( only trash mode )
*/ | Purge folder on file browser ( only trash mode ) | purge | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/frontend/client/widget/foldertree/FolderTree.java",
"license": "gpl-3.0",
"size": 48471
} | [
"com.openkm.frontend.client.Main",
"com.openkm.frontend.client.bean.GWTFolder"
] | import com.openkm.frontend.client.Main; import com.openkm.frontend.client.bean.GWTFolder; | import com.openkm.frontend.client.*; import com.openkm.frontend.client.bean.*; | [
"com.openkm.frontend"
] | com.openkm.frontend; | 165,796 |
@Test(expected = IllegalArgumentException.class)
public void testListCategoryEncoderNotInitialized() {
Publisher manual = Publisher.builder()
.addHeader("foo")
.addHeader("list")
.addHeader("C")
.build();
Sensor<File> sensor = Sensor.create(Observa... | @Test(expected = IllegalArgumentException.class) void function() { Publisher manual = Publisher.builder() .addHeader("foo") .addHeader("list") .addHeader("C") .build(); Sensor<File> sensor = Sensor.create(ObservableSensor::create, SensorParams.create( Keys::obs, STRtimestampSTRdatetimeSTRDateEncoder"); Parameters param... | /**
* Tests that a meaningful exception is thrown when no list category encoder configuration was provided
*/ | Tests that a meaningful exception is thrown when no list category encoder configuration was provided | testListCategoryEncoderNotInitialized | {
"repo_name": "gamahead/htm.java",
"path": "src/test/java/org/numenta/nupic/network/sensor/HTMSensorTest.java",
"license": "agpl-3.0",
"size": 25796
} | [
"java.io.File",
"org.junit.Test",
"org.numenta.nupic.Parameters",
"org.numenta.nupic.network.sensor.SensorParams"
] | import java.io.File; import org.junit.Test; import org.numenta.nupic.Parameters; import org.numenta.nupic.network.sensor.SensorParams; | import java.io.*; import org.junit.*; import org.numenta.nupic.*; import org.numenta.nupic.network.sensor.*; | [
"java.io",
"org.junit",
"org.numenta.nupic"
] | java.io; org.junit; org.numenta.nupic; | 784,137 |
private static AttributeKey getAttributeKey(final String schemaArn, final String facetName, final String attributeName) {
return new AttributeKey().withFacetName(facetName).withSchemaArn(schemaArn).withName(attributeName);
} | static AttributeKey function(final String schemaArn, final String facetName, final String attributeName) { return new AttributeKey().withFacetName(facetName).withSchemaArn(schemaArn).withName(attributeName); } | /**
* Gets attribute key.
*
* @param schemaArn the schema arn
* @param facetName the facet name
* @param attributeName the attribute name
* @return the attribute key
*/ | Gets attribute key | getAttributeKey | {
"repo_name": "tduehr/cas",
"path": "support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java",
"license": "apache-2.0",
"size": 5528
} | [
"com.amazonaws.services.clouddirectory.model.AttributeKey"
] | import com.amazonaws.services.clouddirectory.model.AttributeKey; | import com.amazonaws.services.clouddirectory.model.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 1,107,153 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.