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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
@SuppressWarnings("deprecation")
public void testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE()
throws Exception {
ZooKeeperWatcher zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(),
"testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE", null);
ZKUtil.getChildDataAndWa... | @SuppressWarnings(STR) void function() throws Exception { ZooKeeperWatcher zkw = new ZooKeeperWatcher(TEST_UTIL.getConfiguration(), STR, null); ZKUtil.getChildDataAndWatchForNewChildren(zkw, STR); } | /**
* Test should not fail with NPE when getChildDataAndWatchForNewChildren
* invoked with wrongNode
*/ | Test should not fail with NPE when getChildDataAndWatchForNewChildren invoked with wrongNode | testGetChildDataAndWatchForNewChildrenShouldNotThrowNPE | {
"repo_name": "ddraj/hbase-trunk-mttr",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java",
"license": "apache-2.0",
"size": 18894
} | [
"org.apache.hadoop.hbase.zookeeper.ZKUtil",
"org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher"
] | import org.apache.hadoop.hbase.zookeeper.ZKUtil; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; | import org.apache.hadoop.hbase.zookeeper.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,474,001 |
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
if (oldVersion < 2) {
db.execSQL(DATABASE_ALTER_MOVIE_1);
}
} | void function(SQLiteDatabase db, int oldVersion, int newVersion) { if (oldVersion < 2) { db.execSQL(DATABASE_ALTER_MOVIE_1); } } | /**
* This method discards the old table of data and calls onCreate to recreate a new one.
* This only occurs when the version number for this database (DATABASE_VERSION) is incremented.
*/ | This method discards the old table of data and calls onCreate to recreate a new one. This only occurs when the version number for this database (DATABASE_VERSION) is incremented | onUpgrade | {
"repo_name": "ec2ainun/Udacity-Popular-Movie",
"path": "app/src/main/java/io/github/ec2ainun/udacitypopmovies/data/MovieDbHelper.java",
"license": "mit",
"size": 2595
} | [
"android.database.sqlite.SQLiteDatabase"
] | import android.database.sqlite.SQLiteDatabase; | import android.database.sqlite.*; | [
"android.database"
] | android.database; | 301,468 |
public @Nonnull Range<Double> getRawDataPointsMZRange(); | @Nonnull Range<Double> function(); | /**
* Returns the range of m/z values of all raw data points used to detect
* this peak
*/ | Returns the range of m/z values of all raw data points used to detect this peak | getRawDataPointsMZRange | {
"repo_name": "DrewG/mzmine2",
"path": "src/main/java/net/sf/mzmine/datamodel/Feature.java",
"license": "gpl-2.0",
"size": 4644
} | [
"com.google.common.collect.Range",
"javax.annotation.Nonnull"
] | import com.google.common.collect.Range; import javax.annotation.Nonnull; | import com.google.common.collect.*; import javax.annotation.*; | [
"com.google.common",
"javax.annotation"
] | com.google.common; javax.annotation; | 454,046 |
// Fluent API
// -------------------------------------------------------------------------
public ChoiceDefinition when(Predicate predicate) {
WhenDefinition when = new WhenDefinition(predicate);
when.setParent(this);
getWhenClauses().add(when);
return this;
} | ChoiceDefinition function(Predicate predicate) { WhenDefinition when = new WhenDefinition(predicate); when.setParent(this); getWhenClauses().add(when); return this; } | /**
* Sets the predicate for the when node
*
* @param predicate the predicate
* @return the builder
*/ | Sets the predicate for the when node | when | {
"repo_name": "kingargyle/turmeric-bot",
"path": "camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java",
"license": "apache-2.0",
"size": 5165
} | [
"org.apache.camel.Predicate"
] | import org.apache.camel.Predicate; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 195,597 |
public void createEntry(Configuration conf, String name, char[] credential)
throws Exception {
if (!isHadoopCredentialProviderAvailable()) {
return;
}
List<Object> providers = getCredentialProviders(conf);
if (null == providers) {
throw new IOException("Could not f... | void function(Configuration conf, String name, char[] credential) throws Exception { if (!isHadoopCredentialProviderAvailable()) { return; } List<Object> providers = getCredentialProviders(conf); if (null == providers) { throw new IOException(STR + STR); } Object provider = providers.get(0); createEntryInProvider(provi... | /**
* Create a CredentialEntry using the configured Providers.
* If multiple CredentialProviders are configured, the first will be used.
*
* @param conf
* Configuration for the CredentialProvider
* @param name
* CredentialEntry name (alias)
* @param credential
... | Create a CredentialEntry using the configured Providers. If multiple CredentialProviders are configured, the first will be used | createEntry | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-common/src/test/java/org/apache/hadoop/hbase/TestHBaseConfiguration.java",
"license": "apache-2.0",
"size": 11985
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,476,407 |
public void clearAllItems(String source_uri, long principalId)
throws EntityException {
POP3Folder f = null;
if (log.isTraceEnabled()) {
log.trace("Pop3Email Delete all emails in Inbox Folder");
}
try {
// we can remove only the inbox folder ema... | void function(String source_uri, long principalId) throws EntityException { POP3Folder f = null; if (log.isTraceEnabled()) { log.trace(STR); } try { f = this.pmsw.getInboxFolder(); timeStart = System.currentTimeMillis(); f.open(javax.mail.Folder.READ_WRITE); this.ped.removeAllEmail(f); } catch (MessagingException me) {... | /**
* clean all folder and email except the 5 main folders
*
* @param source_uri String
* @param principalId long
* @throws EntityException
*/ | clean all folder and email except the 5 main folders | clearAllItems | {
"repo_name": "accesstest3/cfunambol",
"path": "modules/email/email-core/src/main/java/com/funambol/email/items/manager/PopEntityManager.java",
"license": "agpl-3.0",
"size": 46729
} | [
"com.funambol.email.exception.EmailAccessException",
"com.funambol.email.exception.EntityException",
"com.sun.mail.pop3.POP3Folder",
"javax.mail.MessagingException"
] | import com.funambol.email.exception.EmailAccessException; import com.funambol.email.exception.EntityException; import com.sun.mail.pop3.POP3Folder; import javax.mail.MessagingException; | import com.funambol.email.exception.*; import com.sun.mail.pop3.*; import javax.mail.*; | [
"com.funambol.email",
"com.sun.mail",
"javax.mail"
] | com.funambol.email; com.sun.mail; javax.mail; | 2,837,247 |
public boolean checkIfTransactedRollbackPreservesOrder(long messagesPerRollback)
throws IOException {
if (0 < consumers.size()) {
AndesClientOutputParser andesClientOutputParser =
new AndesClientOutputParser(consumers.get(0).getConfig()
... | boolean function(long messagesPerRollback) throws IOException { if (0 < consumers.size()) { AndesClientOutputParser andesClientOutputParser = new AndesClientOutputParser(consumers.get(0).getConfig() .getFilePathToWriteReceivedMessages()); return andesClientOutputParser.checkIfTransactedRollbackPreservesOrder(messagesPe... | /**
* This method will check whether received messages are ordered correctly for a single consumer
* when rollback. This is not valid when there are multiple consumers.
*
* @param messagesPerRollback number of messages per each rollback occurrence by subscriber.
* @return true if all messages a... | This method will check whether received messages are ordered correctly for a single consumer when rollback. This is not valid when there are multiple consumers | checkIfTransactedRollbackPreservesOrder | {
"repo_name": "milindaperera/product-ei",
"path": "integration/broker-tests/tests-common/admin-clients/src/main/java/org/wso2/mb/integration/common/clients/AndesClient.java",
"license": "apache-2.0",
"size": 15147
} | [
"java.io.IOException",
"org.wso2.mb.integration.common.clients.operations.utils.AndesClientOutputParser"
] | import java.io.IOException; import org.wso2.mb.integration.common.clients.operations.utils.AndesClientOutputParser; | import java.io.*; import org.wso2.mb.integration.common.clients.operations.utils.*; | [
"java.io",
"org.wso2.mb"
] | java.io; org.wso2.mb; | 1,116,502 |
public List<FilterItem> getFilters() {
if (this.filterMap.isEmpty()) {
NabuccoList<FilterReferenceExtension> filterExtList = this.getExtension().getFilters();
for (FilterReferenceExtension filterExt : filterExtList) {
String refId = PropertyLoader.loadProperty(filt... | List<FilterItem> function() { if (this.filterMap.isEmpty()) { NabuccoList<FilterReferenceExtension> filterExtList = this.getExtension().getFilters(); for (FilterReferenceExtension filterExt : filterExtList) { String refId = PropertyLoader.loadProperty(filterExt.getRefId()); try { QueryFilterExtension filterExtension = ... | /**
* Returns the list of filters configured for the table
*
* @return list of filter items
*/ | Returns the list of filters configured for the table | getFilters | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.ui.web/src/main/man/org/nabucco/framework/base/ui/web/component/dialog/PickerDialog.java",
"license": "epl-1.0",
"size": 14086
} | [
"java.util.ArrayList",
"java.util.List",
"org.nabucco.common.extension.ExtensionException",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoList",
"org.nabucco.framework.base.facade.datatype.extension.property.PropertyLoader",
"org.nabucco.framework.base.facade.datatype.extension.schema.quer... | import java.util.ArrayList; import java.util.List; import org.nabucco.common.extension.ExtensionException; import org.nabucco.framework.base.facade.datatype.collection.NabuccoList; import org.nabucco.framework.base.facade.datatype.extension.property.PropertyLoader; import org.nabucco.framework.base.facade.datatype.exte... | import java.util.*; import org.nabucco.common.extension.*; import org.nabucco.framework.base.facade.datatype.collection.*; import org.nabucco.framework.base.facade.datatype.extension.property.*; import org.nabucco.framework.base.facade.datatype.extension.schema.queryfilter.*; import org.nabucco.framework.base.facade.da... | [
"java.util",
"org.nabucco.common",
"org.nabucco.framework"
] | java.util; org.nabucco.common; org.nabucco.framework; | 1,850,925 |
if (!data.isEmpty()) {
return data;
}
data.add(KV.of("0", "Alex_US"));
data.add(KV.of("1", "John_UK"));
data.add(KV.of("2", "Tom_UK"));
data.add(KV.of("3", "Nick_UAE"));
data.add(KV.of("4", "Smith_IND"));
data.add(KV.of("5", "Taylor_US"));
data.add(KV.of("6", "Gray_UK"));
data.... | if (!data.isEmpty()) { return data; } data.add(KV.of("0", STR)); data.add(KV.of("1", STR)); data.add(KV.of("2", STR)); data.add(KV.of("3", STR)); data.add(KV.of("4", STR)); data.add(KV.of("5", STR)); data.add(KV.of("6", STR)); data.add(KV.of("7", STR)); data.add(KV.of("8", STR)); data.add(KV.of("9", STR)); data.add(KV.... | /**
* Returns List of employee details. Employee details are available in the form of {@link KV} in
* which, key indicates employee id and value indicates employee details such as name and address
* separated by '_'. This is data input to {@link EmployeeInputFormat} and
* {@link ReuseObjectsEmployeeInputFor... | Returns List of employee details. Employee details are available in the form of <code>KV</code> in which, key indicates employee id and value indicates employee details such as name and address separated by '_'. This is data input to <code>EmployeeInputFormat</code> and <code>ReuseObjectsEmployeeInputFormat</code> | populateEmployeeData | {
"repo_name": "manuzhang/incubator-beam",
"path": "sdks/java/io/hadoop/input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/TestEmployeeDataSet.java",
"license": "apache-2.0",
"size": 3125
} | [
"org.apache.beam.sdk.values.KV"
] | import org.apache.beam.sdk.values.KV; | import org.apache.beam.sdk.values.*; | [
"org.apache.beam"
] | org.apache.beam; | 1,041,592 |
public static int getEntero() throws Exception {
int entero;
Scanner scan = new Scanner(System.in, "iso-8859-1");
scan.useLocale(Locale.UK);
try{
entero = scan.nextInt();
return entero;
}catch( InputMismatchException e ){
... | static int function() throws Exception { int entero; Scanner scan = new Scanner(System.in, STR); scan.useLocale(Locale.UK); try{ entero = scan.nextInt(); return entero; }catch( InputMismatchException e ){ throw new Exception(STR) ; } } | /**
* Extrae un entero de la consola.
* @return
* @throws java.lang.Exception
*/ | Extrae un entero de la consola | getEntero | {
"repo_name": "cheste1/LibDAM",
"path": "LibDAM/src/utilidades/Consola.java",
"license": "gpl-3.0",
"size": 7406
} | [
"java.util.InputMismatchException",
"java.util.Locale",
"java.util.Scanner"
] | import java.util.InputMismatchException; import java.util.Locale; import java.util.Scanner; | import java.util.*; | [
"java.util"
] | java.util; | 2,142,937 |
public final Builder setNewRandom(final Supplier<? extends Random> newRandom) {
return setNewBitFactory(() -> BitFactory.using(newRandom.get()));
} | final Builder function(final Supplier<? extends Random> newRandom) { return setNewBitFactory(() -> BitFactory.using(newRandom.get())); } | /**
* Specifies a producer for a {@link Random} instance that will underlie a resulting instance of
* {@link RandomHub}.
* <p>
* Overwrites a previous definition by {@link #setNewBitFactory(Supplier)}, if one has been made.
*
* @see #setNewBitFactory(Supplier)
... | Specifies a producer for a <code>Random</code> instance that will underlie a resulting instance of <code>RandomHub</code>. Overwrites a previous definition by <code>#setNewBitFactory(Supplier)</code>, if one has been made | setNewRandom | {
"repo_name": "akk-team33/lib-patterns",
"path": "random-01/src/main/java/de/team33/patterns/random/e1/RandomHub.java",
"license": "apache-2.0",
"size": 8433
} | [
"java.util.Random",
"java.util.function.Supplier"
] | import java.util.Random; import java.util.function.Supplier; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 1,056,352 |
@GET
@Path("{subjectKey}/{subject}")
@Produces(MediaType.APPLICATION_JSON)
@SuppressWarnings("unchecked")
public Response download(@PathParam("subjectKey") String subjectKey,
@PathParam("subject") String subject) {
NetworkConfigService service = get(NetworkConfig... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) @SuppressWarnings(STR) Response function(@PathParam(STR) String subjectKey, @PathParam(STR) String subject) { NetworkConfigService service = get(NetworkConfigService.class); ObjectNode root = mapper().createObjectNode(); produceSubjectJson(service, root, service.getSubje... | /**
* Returns the network configuration for the specified subject.
*
* @param subjectKey subject class key
* @param subject subject key
* @return network configuration JSON
*/ | Returns the network configuration for the specified subject | download | {
"repo_name": "kuangrewawa/OnosFw",
"path": "web/api/src/main/java/org/onosproject/rest/resources/NetworkConfigWebResource.java",
"license": "apache-2.0",
"size": 10882
} | [
"com.fasterxml.jackson.databind.node.ObjectNode",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.onosproject.incubator.net.config.NetworkConfigService"
] | import com.fasterxml.jackson.databind.node.ObjectNode; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.onosproject.incubator.net.config.NetworkConfigService; | import com.fasterxml.jackson.databind.node.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.onosproject.incubator.net.config.*; | [
"com.fasterxml.jackson",
"javax.ws",
"org.onosproject.incubator"
] | com.fasterxml.jackson; javax.ws; org.onosproject.incubator; | 386,762 |
public com.squareup.okhttp.Call tokenInfoAsync(final ApiCallback<TokenInfoSuccessResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; | com.squareup.okhttp.Call function(final ApiCallback<TokenInfoSuccessResponse> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; | /**
* Token Info (asynchronously)
* Returns the Token Information
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ | Token Info (asynchronously) Returns the Token Information | tokenInfoAsync | {
"repo_name": "artikcloud/artikcloud-java",
"path": "src/main/java/cloud/artik/api/TokensApi.java",
"license": "apache-2.0",
"size": 18351
} | [
"cloud.artik.client.ApiCallback",
"cloud.artik.client.ApiException",
"cloud.artik.client.ProgressRequestBody",
"cloud.artik.client.ProgressResponseBody",
"cloud.artik.model.TokenInfoSuccessResponse"
] | import cloud.artik.client.ApiCallback; import cloud.artik.client.ApiException; import cloud.artik.client.ProgressRequestBody; import cloud.artik.client.ProgressResponseBody; import cloud.artik.model.TokenInfoSuccessResponse; | import cloud.artik.client.*; import cloud.artik.model.*; | [
"cloud.artik.client",
"cloud.artik.model"
] | cloud.artik.client; cloud.artik.model; | 1,282,956 |
public void setPriority(Priority priority) {
List<ProducerContextCallbacks> callbacks = null;
synchronized (this) {
if (mPriority != priority) {
mPriority = priority;
callbacks = Lists.newArrayList(mCallbacks);
}
}
if (callbacks != null) {
for (ProducerContextCallbac... | void function(Priority priority) { List<ProducerContextCallbacks> callbacks = null; synchronized (this) { if (mPriority != priority) { mPriority = priority; callbacks = Lists.newArrayList(mCallbacks); } } if (callbacks != null) { for (ProducerContextCallbacks callback : callbacks) { callback.onPriorityChanged(); } } } | /**
* Set the priority of the request
* @param priority
*/ | Set the priority of the request | setPriority | {
"repo_name": "eity0323/fresco",
"path": "imagepipeline/src/main/java/com/facebook/imagepipeline/producers/SettableProducerContext.java",
"license": "bsd-3-clause",
"size": 5117
} | [
"com.facebook.common.internal.Lists",
"com.facebook.imagepipeline.common.Priority",
"java.util.List"
] | import com.facebook.common.internal.Lists; import com.facebook.imagepipeline.common.Priority; import java.util.List; | import com.facebook.common.internal.*; import com.facebook.imagepipeline.common.*; import java.util.*; | [
"com.facebook.common",
"com.facebook.imagepipeline",
"java.util"
] | com.facebook.common; com.facebook.imagepipeline; java.util; | 1,292,169 |
public ConfigurationSection getConfigFile(Key key) {
String filename = getString(key);
if (extraConfig.containsKey(filename)) {
return extraConfig.get(filename);
}
YamlConfiguration conf = new YamlConfiguration();
File file = getFile(filename);
File migra... | ConfigurationSection function(Key key) { String filename = getString(key); if (extraConfig.containsKey(filename)) { return extraConfig.get(filename); } YamlConfiguration conf = new YamlConfiguration(); File file = getFile(filename); File migrateFrom = new File(key.def.toString()); if (!file.exists()) { if (migrateFrom.... | /**
* Returns the file that contains a given setting. If it doesn't exist, it is created and
* populated with defaults.
*
* @param key the configuration setting
* @return the file containing that setting
*/ | Returns the file that contains a given setting. If it doesn't exist, it is created and populated with defaults | getConfigFile | {
"repo_name": "GlowstoneMC/GlowstonePlusPlus",
"path": "src/main/java/net/glowstone/util/config/ServerConfig.java",
"license": "mit",
"size": 28713
} | [
"java.io.File",
"java.io.IOException",
"java.util.logging.Level",
"net.glowstone.GlowServer",
"org.bukkit.configuration.ConfigurationSection",
"org.bukkit.configuration.InvalidConfigurationException",
"org.bukkit.configuration.file.YamlConfiguration",
"org.bukkit.util.FileUtil"
] | import java.io.File; import java.io.IOException; import java.util.logging.Level; import net.glowstone.GlowServer; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.util.FileUtil; | import java.io.*; import java.util.logging.*; import net.glowstone.*; import org.bukkit.configuration.*; import org.bukkit.configuration.file.*; import org.bukkit.util.*; | [
"java.io",
"java.util",
"net.glowstone",
"org.bukkit.configuration",
"org.bukkit.util"
] | java.io; java.util; net.glowstone; org.bukkit.configuration; org.bukkit.util; | 740,086 |
private void validateLocalServers(final Server[] ls) {
// aktualliseren der lokalserver wann immer ein Client anfragt
if (logger != null) {
if (logger.isDebugEnabled()) {
logger.debug("<CS>private function validateLocalServer called"); // NOI18N
}
}
... | void function(final Server[] ls) { if (logger != null) { if (logger.isDebugEnabled()) { logger.debug(STR); } } localServers = ls; try { for (int i = 0; i < ls.length; i++) { if (!activeLocalServers.containsKey(ls[i].getName())) { activeLocalServers.put(ls[i].getName(), Naming.lookup(ls[i].getRMIAddress())); } } } catch... | /**
* private Fkt-en.
*
* @param ls DOCUMENT ME!
*/ | private Fkt-en | validateLocalServers | {
"repo_name": "cismet/cids-server",
"path": "src/main/java/Sirius/server/middleware/impls/proxy/MetaServiceImpl.java",
"license": "lgpl-3.0",
"size": 32507
} | [
"java.rmi.Naming"
] | import java.rmi.Naming; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 441,581 |
public Reader readRaw() throws IOException {
try {
InputStream fileInputStream = Files.newInputStream(file.toPath());
try {
return new InputStreamReader(fileInputStream, sniffEncoding());
} catch (IOException ex) {
// Exception may happen i... | Reader function() throws IOException { try { InputStream fileInputStream = Files.newInputStream(file.toPath()); try { return new InputStreamReader(fileInputStream, sniffEncoding()); } catch (IOException ex) { Util.closeAndLogFailures(fileInputStream, LOGGER, STR, file.toString()); throw ex; } } catch (InvalidPathExcept... | /**
* Opens a {@link Reader} that loads XML.
* This method uses {@link #sniffEncoding() the right encoding},
* not just the system default encoding.
* @throws IOException Encoding issues
* @return Reader for the file. should be close externally once read.
*/ | Opens a <code>Reader</code> that loads XML. This method uses <code>#sniffEncoding() the right encoding</code>, not just the system default encoding | readRaw | {
"repo_name": "andresrc/jenkins",
"path": "core/src/main/java/hudson/XmlFile.java",
"license": "mit",
"size": 14002
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.io.Reader",
"java.nio.file.Files",
"java.nio.file.InvalidPathException"
] | import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.nio.file.Files; import java.nio.file.InvalidPathException; | import java.io.*; import java.nio.file.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 522,077 |
public void deleteIdP(String idPName, String tenantDomain)
throws IdentityApplicationManagementException {
int tenantId = getTenantIdOfDomain(tenantDomain);
if (StringUtils.isEmpty(idPName)) {
String msg = "Invalid argument: Identity Provider Name value is empty";
... | void function(String idPName, String tenantDomain) throws IdentityApplicationManagementException { int tenantId = getTenantIdOfDomain(tenantDomain); if (StringUtils.isEmpty(idPName)) { String msg = STR; log.error(msg); throw new IdentityApplicationManagementException(msg); } dao.deleteIdP(idPName, tenantId, tenantDomai... | /**
* Deletes an Identity Provider from a given tenant
*
* @param idPName Name of the IdP to be deleted
* @throws IdentityApplicationManagementException Error when deleting Identity Provider
* information
*/ | Deletes an Identity Provider from a given tenant | deleteIdP | {
"repo_name": "omindu/carbon-identity",
"path": "components/idp-mgt/org.wso2.carbon.idp.mgt/src/main/java/org/wso2/carbon/idp/mgt/IdentityProviderManager.java",
"license": "apache-2.0",
"size": 60124
} | [
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.identity.application.common.IdentityApplicationManagementException"
] | import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException; | import org.apache.commons.lang.*; import org.wso2.carbon.identity.application.common.*; | [
"org.apache.commons",
"org.wso2.carbon"
] | org.apache.commons; org.wso2.carbon; | 1,602,920 |
public Date getCreated() {
return this.created;
} | Date function() { return this.created; } | /**
* Gives back the creation date of the security token.
*
* @return the creation date of the token.
*/ | Gives back the creation date of the security token | getCreated | {
"repo_name": "Informatievlaanderen/GeoSecure-Java-Framework",
"path": "informatievlaanderen-security-client/src/main/java/be/vlaanderen/informatievlaanderen/security/SecurityToken.java",
"license": "gpl-3.0",
"size": 5321
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,155,473 |
public void testReceive_UnconnectedBufNotEmpty() throws Exception {
assertFalse(this.channel1.isConnected());
ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL);
// buf is not empty
dst.put((byte) 88);
assertEquals(dst.position() + CAPACITY_NORMAL - 1, dst.limit... | void function() throws Exception { assertFalse(this.channel1.isConnected()); ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL); dst.put((byte) 88); assertEquals(dst.position() + CAPACITY_NORMAL - 1, dst.limit()); assertNull(this.channel1.receive(dst)); } | /**
* Test method for 'DatagramChannelImpl.receive(ByteBuffer)'
*
* @throws Exception
*/ | Test method for 'DatagramChannelImpl.receive(ByteBuffer)' | testReceive_UnconnectedBufNotEmpty | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java",
"license": "gpl-2.0",
"size": 95313
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 205,067 |
public OperationFuture<List<AlertPolicy>> delete(AlertPolicyFilter filter) {
List<AlertPolicy> policyRefs = getRefsFromFilter(filter);
return delete(policyRefs.toArray(new AlertPolicy[policyRefs.size()]));
} | OperationFuture<List<AlertPolicy>> function(AlertPolicyFilter filter) { List<AlertPolicy> policyRefs = getRefsFromFilter(filter); return delete(policyRefs.toArray(new AlertPolicy[policyRefs.size()])); } | /**
* Remove Alert policies
*
* @param filter the search policies criteria
* @return OperationFuture wrapper for list of AlertPolicy
*/ | Remove Alert policies | delete | {
"repo_name": "CenturyLinkCloud/clc-java-sdk",
"path": "sdk/src/main/java/com/centurylink/cloud/sdk/policy/services/dsl/AlertService.java",
"license": "apache-2.0",
"size": 7337
} | [
"com.centurylink.cloud.sdk.base.services.dsl.domain.queue.OperationFuture",
"com.centurylink.cloud.sdk.policy.services.dsl.domain.filters.AlertPolicyFilter",
"com.centurylink.cloud.sdk.policy.services.dsl.domain.refs.AlertPolicy",
"java.util.List"
] | import com.centurylink.cloud.sdk.base.services.dsl.domain.queue.OperationFuture; import com.centurylink.cloud.sdk.policy.services.dsl.domain.filters.AlertPolicyFilter; import com.centurylink.cloud.sdk.policy.services.dsl.domain.refs.AlertPolicy; import java.util.List; | import com.centurylink.cloud.sdk.base.services.dsl.domain.queue.*; import com.centurylink.cloud.sdk.policy.services.dsl.domain.filters.*; import com.centurylink.cloud.sdk.policy.services.dsl.domain.refs.*; import java.util.*; | [
"com.centurylink.cloud",
"java.util"
] | com.centurylink.cloud; java.util; | 2,199,176 |
public static final SourceModel.Expr optimizerHelper_expression_new_let(SourceModel.Expr unqualifiedName, SourceModel.Expr defExpr, SourceModel.Expr bodyExpr, SourceModel.Expr isRecursive, SourceModel.Expr varType) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr... | static final SourceModel.Expr function(SourceModel.Expr unqualifiedName, SourceModel.Expr defExpr, SourceModel.Expr bodyExpr, SourceModel.Expr isRecursive, SourceModel.Expr varType) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.optimizerHelper_expression_new_let... | /**
* Helper binding method for function: optimizerHelper_expression_new_let.
* @param unqualifiedName
* @param defExpr
* @param bodyExpr
* @param isRecursive
* @param varType
* @return the SourceModule.expr representing an application of optimizerHelper_expression_new_let
*/ | Helper binding method for function: optimizerHelper_expression_new_let | optimizerHelper_expression_new_let | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Platform/src/org/openquark/cal/internal/module/Cal/Internal/CAL_Optimizer_Expression_internal.java",
"license": "bsd-3-clause",
"size": 265925
} | [
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 1,092,369 |
public static void main(String[] args) throws Exception
{
String loggingConfigFilePath = ConfigFileDemo.class.getResource("logging.properties").getPath();
System.setProperty("java.util.logging.config.file", loggingConfigFilePath);
LogManager.getLogManager().readConfiguration(); // Not needed normally - but ne... | static void function(String[] args) throws Exception { String loggingConfigFilePath = ConfigFileDemo.class.getResource(STR).getPath(); System.setProperty(STR, loggingConfigFilePath); LogManager.getLogManager().readConfiguration(); System.out.println(STR + System.getProperty(STR) + STR +">\n"); Logger rootLogger = Logge... | /**
* Runs several prints with several loggers to illustrate basic logging abilities
* @throws Exception if "LogManager.getLogManager().readConfiguration()" fails
*/ | Runs several prints with several loggers to illustrate basic logging abilities | main | {
"repo_name": "ronkitay/Rons-Tutorials",
"path": "Java/BasicTutorials/Logging/src/main/java/org/ronkitay/tutorials/basic/logging/java/ConfigFileDemo.java",
"license": "mit",
"size": 3268
} | [
"java.util.logging.LogManager",
"java.util.logging.Logger"
] | import java.util.logging.LogManager; import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,622,573 |
public void setShort(int parameterIndex, short x) throws SQLException {
try {
if (isDebugEnabled()) {
debugCode("setShort("+parameterIndex+", (short) "+x+");");
}
setParameter(parameterIndex, ValueShort.get(x));
} catch (Exception e) {
... | void function(int parameterIndex, short x) throws SQLException { try { if (isDebugEnabled()) { debugCode(STR+parameterIndex+STR+x+");"); } setParameter(parameterIndex, ValueShort.get(x)); } catch (Exception e) { throw logAndConvert(e); } } | /**
* Sets the value of a parameter.
*
* @param parameterIndex the parameter index (1, 2, ...)
* @param x the value
* @throws SQLException if this object is closed
*/ | Sets the value of a parameter | setShort | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/jdbc/JdbcPreparedStatement.java",
"license": "gpl-3.0",
"size": 51957
} | [
"java.sql.SQLException",
"org.h2.value.ValueShort"
] | import java.sql.SQLException; import org.h2.value.ValueShort; | import java.sql.*; import org.h2.value.*; | [
"java.sql",
"org.h2.value"
] | java.sql; org.h2.value; | 1,186,781 |
@Test
public void testWhitelistCanBeCleared() throws ClientProtocolException, IOException {
proxy.whitelistRequests(new String[] { ".*\\.txt" }, 500);
// make sure that proxy is working before
assertThat(httpStatusWhenGetting(getLocalServerHostnameAndPort() + "/a.txt"), is(200));
... | void function() throws ClientProtocolException, IOException { proxy.whitelistRequests(new String[] { STR }, 500); assertThat(httpStatusWhenGetting(getLocalServerHostnameAndPort() + STR), is(200)); assertThat(httpStatusWhenGetting(getLocalServerHostnameAndPort() + STR), is(500)); proxy.clearWhitelist(); assertThat(httpS... | /**
* Checks that a proxy whitelist can be cleared successfully.
*/ | Checks that a proxy whitelist can be cleared successfully | testWhitelistCanBeCleared | {
"repo_name": "jekh/browsermob-proxy",
"path": "browsermob-legacy/src/test/java/net/lightbody/bmp/proxy/BlackAndWhiteListTest.java",
"license": "apache-2.0",
"size": 8088
} | [
"java.io.IOException",
"org.apache.http.client.ClientProtocolException",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import java.io.*; import org.apache.http.client.*; import org.hamcrest.*; import org.junit.*; | [
"java.io",
"org.apache.http",
"org.hamcrest",
"org.junit"
] | java.io; org.apache.http; org.hamcrest; org.junit; | 2,528,970 |
@Released({ENTRY_EVENT_NEW_VALUE, ENTRY_EVENT_OLD_VALUE})
public void copyOffHeapToHeap() {
if (!mayHaveOffHeapReferences()) {
this.offHeapOk = false;
return;
}
synchronized (this.offHeapLock) {
Object ov = basicGetOldValue();
if (StoredObject.isOffHeapReference(ov)) {
if... | @Released({ENTRY_EVENT_NEW_VALUE, ENTRY_EVENT_OLD_VALUE}) void function() { if (!mayHaveOffHeapReferences()) { this.offHeapOk = false; return; } synchronized (this.offHeapLock) { Object ov = basicGetOldValue(); if (StoredObject.isOffHeapReference(ov)) { if (ReferenceCountHelper.trackReferenceCounts()) { ReferenceCountH... | /**
* This copies the off-heap new and/or old value to the heap. As a result the current off-heap
* new/old will be released.
*/ | This copies the off-heap new and/or old value to the heap. As a result the current off-heap new/old will be released | copyOffHeapToHeap | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/EntryEventImpl.java",
"license": "apache-2.0",
"size": 99239
} | [
"org.apache.geode.internal.offheap.OffHeapHelper",
"org.apache.geode.internal.offheap.ReferenceCountHelper",
"org.apache.geode.internal.offheap.StoredObject",
"org.apache.geode.internal.offheap.annotations.Released"
] | import org.apache.geode.internal.offheap.OffHeapHelper; import org.apache.geode.internal.offheap.ReferenceCountHelper; import org.apache.geode.internal.offheap.StoredObject; import org.apache.geode.internal.offheap.annotations.Released; | import org.apache.geode.internal.offheap.*; import org.apache.geode.internal.offheap.annotations.*; | [
"org.apache.geode"
] | org.apache.geode; | 67,314 |
public final MetaProperty<BigDecimal> receiveAmount() {
return _receiveAmount;
} | final MetaProperty<BigDecimal> function() { return _receiveAmount; } | /**
* The meta-property for the {@code receiveAmount} property.
* @return the meta-property, not null
*/ | The meta-property for the receiveAmount property | receiveAmount | {
"repo_name": "McLeodMoores/starling",
"path": "projects/integration/src/main/java/com/opengamma/integration/tool/portfolio/xml/v1_0/jaxb/FxForwardTrade.java",
"license": "apache-2.0",
"size": 17443
} | [
"java.math.BigDecimal",
"org.joda.beans.MetaProperty"
] | import java.math.BigDecimal; import org.joda.beans.MetaProperty; | import java.math.*; import org.joda.beans.*; | [
"java.math",
"org.joda.beans"
] | java.math; org.joda.beans; | 1,556,054 |
@Test
public void getIncreasingByteBuffer() {
class TestCase {
ByteBuffer mExpected;
int mLength;
int mStart;
public TestCase(ByteBuffer expected, int length, int start) {
mExpected = expected;
mLength = length;
mStart = start;
}
}
ArrayList<TestCa... | void function() { class TestCase { ByteBuffer mExpected; int mLength; int mStart; public TestCase(ByteBuffer expected, int length, int start) { mExpected = expected; mLength = length; mStart = start; } } ArrayList<TestCase> testCases = new ArrayList<>(); testCases.add(new TestCase(ByteBuffer.wrap(new byte[] {}), 0, 0))... | /**
* Tests the {@link BufferUtils#getIncreasingByteBuffer(int, int)} method.
*/ | Tests the <code>BufferUtils#getIncreasingByteBuffer(int, int)</code> method | getIncreasingByteBuffer | {
"repo_name": "riversand963/alluxio",
"path": "core/common/src/test/java/alluxio/util/io/BufferUtilsTest.java",
"license": "apache-2.0",
"size": 13429
} | [
"java.nio.ByteBuffer",
"java.util.ArrayList",
"org.junit.Assert"
] | import java.nio.ByteBuffer; import java.util.ArrayList; import org.junit.Assert; | import java.nio.*; import java.util.*; import org.junit.*; | [
"java.nio",
"java.util",
"org.junit"
] | java.nio; java.util; org.junit; | 1,982,554 |
public void testIntegerValidatorMethods() {
Locale locale = Locale.GERMAN;
String pattern = "0,00,00";
String patternVal = "1,23,45";
String germanPatternVal = "1.23.45";
String localeVal = "12.345";
String defaultVal = "12,345";
String XXXX = "XXXX... | void function() { Locale locale = Locale.GERMAN; String pattern = STR; String patternVal = STR; String germanPatternVal = STR; String localeVal = STR; String defaultVal = STR; String XXXX = "XXXX"; Integer expected = new Integer(12345); assertEquals(STR, expected, IntegerValidator.getInstance().validate(defaultVal)); a... | /**
* Test IntegerValidator validate Methods
*/ | Test IntegerValidator validate Methods | testIntegerValidatorMethods | {
"repo_name": "floscher/commons-validator",
"path": "src/test/java/org/apache/commons/validator/routines/IntegerValidatorTest.java",
"license": "apache-2.0",
"size": 6150
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,560,480 |
public Iterator getConsolidatedBalanceRecordCount(Map fieldValues, List<String> encumbranceBalanceTypes); | Iterator function(Map fieldValues, List<String> encumbranceBalanceTypes); | /**
* This method gets the size collection of balance entry groups according to input fields and values if the entries are required
* to be consolidated
*
* @param encumbranceBalanceTypes a list of encumbrance balance types
* @param fieldValues the input fields and values
* @return the si... | This method gets the size collection of balance entry groups according to input fields and values if the entries are required to be consolidated | getConsolidatedBalanceRecordCount | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/ld/dataaccess/LaborLedgerBalanceDao.java",
"license": "apache-2.0",
"size": 6690
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Map"
] | import java.util.Iterator; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,464,757 |
@GET
@Path("{organizationId}/clients/{clientId}/versions/{version}/contracts/{contractId}")
@Produces(MediaType.APPLICATION_JSON)
public ContractBean getContract(@PathParam("organizationId") String organizationId,
@PathParam("clientId") String clientId, @PathParam("version") String versi... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) ContractBean function(@PathParam(STR) String organizationId, @PathParam(STR) String clientId, @PathParam(STR) String version, @PathParam(STR) Long contractId) throws ClientNotFoundException, ContractNotFoundException, NotAuthorizedException; | /**
* Use this endpoint to retrieve detailed information about a single API Contract
* for an Client.
* @summary Get API Contract
* @param organizationId The Organization ID.
* @param clientId The Client ID.
* @param version The Client version.
* @param contractId The ID of the... | Use this endpoint to retrieve detailed information about a single API Contract for an Client | getContract | {
"repo_name": "jasonchaffee/apiman",
"path": "manager/api/rest/src/main/java/io/apiman/manager/api/rest/contract/IOrganizationResource.java",
"license": "apache-2.0",
"size": 109599
} | [
"io.apiman.manager.api.beans.contracts.ContractBean",
"io.apiman.manager.api.rest.contract.exceptions.ClientNotFoundException",
"io.apiman.manager.api.rest.contract.exceptions.ContractNotFoundException",
"io.apiman.manager.api.rest.contract.exceptions.NotAuthorizedException",
"javax.ws.rs.Path",
"javax.ws... | import io.apiman.manager.api.beans.contracts.ContractBean; import io.apiman.manager.api.rest.contract.exceptions.ClientNotFoundException; import io.apiman.manager.api.rest.contract.exceptions.ContractNotFoundException; import io.apiman.manager.api.rest.contract.exceptions.NotAuthorizedException; import javax.ws.rs.Path... | import io.apiman.manager.api.beans.contracts.*; import io.apiman.manager.api.rest.contract.exceptions.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"io.apiman.manager",
"javax.ws"
] | io.apiman.manager; javax.ws; | 483,373 |
public NetworkComponent getCopy(boolean isIncludeDataModel) {
NetworkComponent copy = null;
try {
if (isIncludeDataModel==true) {
// --- Include the data model -------------
copy = SerialClone.clone(this);
} else {
// --- Exclude the data model -------------
synchronized (this) {
Obje... | NetworkComponent function(boolean isIncludeDataModel) { NetworkComponent copy = null; try { if (isIncludeDataModel==true) { copy = SerialClone.clone(this); } else { synchronized (this) { Object dataModel = this.getDataModel(); this.setDataModel(null); copy = SerialClone.clone(this); this.setDataModel(dataModel); } } } ... | /**
* Returns a copy of the current NetworkComponent.
* @param isIncludeDataModel the indicator include or exclude the current data model
* @return the copy
*/ | Returns a copy of the current NetworkComponent | getCopy | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.awb.env.networkModel/src/org/awb/env/networkModel/NetworkComponent.java",
"license": "lgpl-2.1",
"size": 8749
} | [
"de.enflexit.common.SerialClone"
] | import de.enflexit.common.SerialClone; | import de.enflexit.common.*; | [
"de.enflexit.common"
] | de.enflexit.common; | 717,836 |
public void captcha(HttpServletRequest req, HttpServletResponse resp, String key) throws ServletException, IOException {
init();
// Set standard HTTP/1.1 no-cache headers.
resp.setHeader("Cache-Control", "no-store, no-cache");
// return a jpeg
resp.setContentType("image/jpeg... | void function(HttpServletRequest req, HttpServletResponse resp, String key) throws ServletException, IOException { init(); resp.setHeader(STR, STR); resp.setContentType(STR); String capText = this.kaptchaProducer.createText(); req.getSession().setAttribute(this.sessionKeyDateValue, new Date()); BufferedImage bi = this.... | /**
* map it to the /url/captcha.jpg
* @param req
* @param resp
* @throws ServletException
* @throws IOException
*/ | map it to the /url/captcha.jpg | captcha | {
"repo_name": "leelance/spring-boot-all",
"path": "spring-boot-activiti/src/main/java/com/lance/activiti/common/captcha/AbstractBaseKaptcha.java",
"license": "apache-2.0",
"size": 2538
} | [
"java.awt.image.BufferedImage",
"java.io.IOException",
"java.util.Date",
"javax.imageio.ImageIO",
"javax.servlet.ServletException",
"javax.servlet.ServletOutputStream",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.awt.image.BufferedImage; import java.io.IOException; import java.util.Date; import javax.imageio.ImageIO; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.awt.image.*; import java.io.*; import java.util.*; import javax.imageio.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.awt",
"java.io",
"java.util",
"javax.imageio",
"javax.servlet"
] | java.awt; java.io; java.util; javax.imageio; javax.servlet; | 2,050,787 |
@RequestMapping("/editReference")
public String editReference(HttpServletRequest request, HttpServletResponse response,
@RequestParam int referenceSequenceId) throws ServletException, IOException {
SessionMap<String, Object> sessionMap = getSessionMap(request);
SortedSet<QuestionReference> questionRefere... | @RequestMapping(STR) String function(HttpServletRequest request, HttpServletResponse response, @RequestParam int referenceSequenceId) throws ServletException, IOException { SessionMap<String, Object> sessionMap = getSessionMap(request); SortedSet<QuestionReference> questionReferences = getQuestionReferences(sessionMap)... | /**
* Display edit page for existing assessment question.
*/ | Display edit page for existing assessment question | editReference | {
"repo_name": "lamsfoundation/lams",
"path": "lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/AuthoringController.java",
"license": "gpl-2.0",
"size": 44143
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"java.util.SortedSet",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.lamsfoundation.lams.qb.model.QbCollection",
"org.lamsfoundation.l... | import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.SortedSet; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.lamsfoundation.lams.qb.model.QbCollection... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.lamsfoundation.lams.qb.model.*; import org.lamsfoundation.lams.tool.assessment.*; import org.lamsfoundation.lams.tool.assessment.model.*; import org.lamsfoundation.lams.util.*; import org.lamsfoundation.lams.web.util.*... | [
"java.io",
"java.util",
"javax.servlet",
"org.lamsfoundation.lams",
"org.springframework.web"
] | java.io; java.util; javax.servlet; org.lamsfoundation.lams; org.springframework.web; | 793,694 |
static PythonFunction getPythonFunction(
String fullyQualifiedName, ReadableConfig config, ClassLoader classLoader)
throws ExecutionException {
int splitIndex = fullyQualifiedName.lastIndexOf(".");
if (splitIndex <= 0) {
throw new IllegalArgumentException(
... | static PythonFunction getPythonFunction( String fullyQualifiedName, ReadableConfig config, ClassLoader classLoader) throws ExecutionException { int splitIndex = fullyQualifiedName.lastIndexOf("."); if (splitIndex <= 0) { throw new IllegalArgumentException( String.format(STR, fullyQualifiedName)); } String moduleName = ... | /**
* Returns PythonFunction according to the fully qualified name of the Python UDF i.e
* ${moduleName}.${functionName} or ${moduleName}.${className}.
*
* @param fullyQualifiedName The fully qualified name of the Python UDF.
* @param config The configuration of python dependencies.
* @par... | Returns PythonFunction according to the fully qualified name of the Python UDF i.e ${moduleName}.${functionName} or ${moduleName}.${className} | getPythonFunction | {
"repo_name": "clarkyzl/flink",
"path": "flink-python/src/main/java/org/apache/flink/client/python/PythonFunctionFactory.java",
"license": "apache-2.0",
"size": 10876
} | [
"java.util.concurrent.ExecutionException",
"org.apache.flink.api.java.ExecutionEnvironment",
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.ReadableConfig",
"org.apache.flink.python.util.PythonDependencyUtils",
"org.apache.flink.table.functions.python.PythonFunction"
] | import java.util.concurrent.ExecutionException; import org.apache.flink.api.java.ExecutionEnvironment; import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.ReadableConfig; import org.apache.flink.python.util.PythonDependencyUtils; import org.apache.flink.table.functions.python.Pyth... | import java.util.concurrent.*; import org.apache.flink.api.java.*; import org.apache.flink.configuration.*; import org.apache.flink.python.util.*; import org.apache.flink.table.functions.python.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 1,763,855 |
public static String toNTriplesString(Literal lit) {
try {
StringBuilder sb = new StringBuilder();
append(lit, sb);
return sb.toString();
}
catch (IOException e) {
throw new AssertionError();
}
} | static String function(Literal lit) { try { StringBuilder sb = new StringBuilder(); append(lit, sb); return sb.toString(); } catch (IOException e) { throw new AssertionError(); } } | /**
* Creates an N-Triples string for the supplied literal.
*/ | Creates an N-Triples string for the supplied literal | toNTriplesString | {
"repo_name": "gomezgoiri/rio-clp",
"path": "src/main/java/es/deusto/deustotech/rio/clips/CLPUtil.java",
"license": "bsd-2-clause",
"size": 16744
} | [
"java.io.IOException",
"org.openrdf.model.Literal"
] | import java.io.IOException; import org.openrdf.model.Literal; | import java.io.*; import org.openrdf.model.*; | [
"java.io",
"org.openrdf.model"
] | java.io; org.openrdf.model; | 1,146,651 |
public static void updateDexStatistics(DalvCode nonOptCode,
DalvCode code) {
if (DEBUG) {
System.err.println("dex insns (old/new) "
+ nonOptCode.getInsns().codeSize()
+ "/" + code.getInsns().codeSize()
+ " regs (o/n) "
... | static void function(DalvCode nonOptCode, DalvCode code) { if (DEBUG) { System.err.println(STR + nonOptCode.getInsns().codeSize() + "/" + code.getInsns().codeSize() + STR + nonOptCode.getInsns().getRegistersSize() + "/" + code.getInsns().getRegistersSize() ); } dexRunningDeltaInsns += (code.getInsns().codeSize() - nonO... | /**
* Updates the dex statistics.
*
* @param nonOptCode non-optimized code block
* @param code optimized code block
*/ | Updates the dex statistics | updateDexStatistics | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "dalvik/dx/src/com/android/dx/dex/cf/CodeStatistics.java",
"license": "gpl-2.0",
"size": 5588
} | [
"com.android.dx.dex.code.DalvCode"
] | import com.android.dx.dex.code.DalvCode; | import com.android.dx.dex.code.*; | [
"com.android.dx"
] | com.android.dx; | 231,337 |
void setDelegates(Map<K, V> forward, Map<V, K> backward) {
checkState(delegate == null);
checkState(inverse == null);
checkArgument(forward.isEmpty());
checkArgument(backward.isEmpty());
checkArgument(forward != backward);
delegate = forward;
inverse = new Inverse<V, K>(backward, this);
... | void setDelegates(Map<K, V> forward, Map<V, K> backward) { checkState(delegate == null); checkState(inverse == null); checkArgument(forward.isEmpty()); checkArgument(backward.isEmpty()); checkArgument(forward != backward); delegate = forward; inverse = new Inverse<V, K>(backward, this); } | /**
* Specifies the delegate maps going in each direction. Called by the
* constructor and by subclasses during deserialization.
*/ | Specifies the delegate maps going in each direction. Called by the constructor and by subclasses during deserialization | setDelegates | {
"repo_name": "lshain-android-source/external-guava",
"path": "guava/src/com/google/common/collect/AbstractBiMap.java",
"license": "apache-2.0",
"size": 11891
} | [
"com.google.common.base.Preconditions",
"java.util.Map"
] | import com.google.common.base.Preconditions; import java.util.Map; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 199,107 |
CamelContextNameStrategy getNameStrategy(); | CamelContextNameStrategy getNameStrategy(); | /**
* Gets the current name strategy
*
* @return name strategy
*/ | Gets the current name strategy | getNameStrategy | {
"repo_name": "curso007/camel",
"path": "camel-core/src/main/java/org/apache/camel/CamelContext.java",
"license": "apache-2.0",
"size": 79052
} | [
"org.apache.camel.spi.CamelContextNameStrategy"
] | import org.apache.camel.spi.CamelContextNameStrategy; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 686,505 |
public static int binarySearch(byte [][]arr, byte []key, int offset,
int length, CellComparator comparator) {
int low = 0;
int high = arr.length - 1;
KeyValue.KeyOnlyKeyValue r = new KeyValue.KeyOnlyKeyValue();
r.setKey(key, offset, length);
while (low <= high) {
int mid = (low+high) ... | static int function(byte [][]arr, byte []key, int offset, int length, CellComparator comparator) { int low = 0; int high = arr.length - 1; KeyValue.KeyOnlyKeyValue r = new KeyValue.KeyOnlyKeyValue(); r.setKey(key, offset, length); while (low <= high) { int mid = (low+high) >>> 1; int cmp = 0; if (comparator != null) { ... | /**
* Binary search for keys in indexes.
*
* @param arr array of byte arrays to search for
* @param key the key you want to find
* @param offset the offset in the key you want to find
* @param length the length of the key
* @param comparator a comparator to compare.
* @return zero-based index of... | Binary search for keys in indexes | binarySearch | {
"repo_name": "narendragoyal/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java",
"license": "apache-2.0",
"size": 83731
} | [
"java.util.Comparator",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellComparator",
"org.apache.hadoop.hbase.KeyValue"
] | import java.util.Comparator; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellComparator; import org.apache.hadoop.hbase.KeyValue; | import java.util.*; import org.apache.hadoop.hbase.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,744,248 |
public void executeShellCommand(org.wso2.emm.agent.beans.Operation operation) throws AndroidAgentException {
JSONObject result = new JSONObject();
try {
String status = resources.getString(R.string.shared_pref_default_status);
result.put(resources.getString(R.string.operation_status), status);
operati... | void function(org.wso2.emm.agent.beans.Operation operation) throws AndroidAgentException { JSONObject result = new JSONObject(); try { String status = resources.getString(R.string.shared_pref_default_status); result.put(resources.getString(R.string.operation_status), status); operation.setPayLoad(result.toString()); if... | /**
* Execute shell commands as the super user.
*
* @param operation - Operation object.
*/ | Execute shell commands as the super user | executeShellCommand | {
"repo_name": "jeradrutnam/product-mdm",
"path": "modules/mobile-agents/android/client/client/src/main/java/org/wso2/emm/agent/services/Operation.java",
"license": "apache-2.0",
"size": 45337
} | [
"android.util.Log",
"org.json.JSONException",
"org.json.JSONObject",
"org.wso2.emm.agent.AndroidAgentException",
"org.wso2.emm.agent.utils.Constants"
] | import android.util.Log; import org.json.JSONException; import org.json.JSONObject; import org.wso2.emm.agent.AndroidAgentException; import org.wso2.emm.agent.utils.Constants; | import android.util.*; import org.json.*; import org.wso2.emm.agent.*; import org.wso2.emm.agent.utils.*; | [
"android.util",
"org.json",
"org.wso2.emm"
] | android.util; org.json; org.wso2.emm; | 2,143,460 |
private void writeConfigRest( JSONDocument jdoc, String fname, File dir )
throws Exception
{
File f = new File( dir, fname );
f.createNewFile();
FileWriter fw = new FileWriter( f );
JSONDocument jdoc2 = new JSONDocument();
if ( jdoc.containsKey(JSONKeys.STYLE) )
... | void function( JSONDocument jdoc, String fname, File dir ) throws Exception { File f = new File( dir, fname ); f.createNewFile(); FileWriter fw = new FileWriter( f ); JSONDocument jdoc2 = new JSONDocument(); if ( jdoc.containsKey(JSONKeys.STYLE) ) jdoc2.put( JSONKeys.STYLE, (String)jdoc.get(JSONKeys.STYLE) ); if ( jdoc... | /**
* Write a config file to a directory with the keys of the json doc
* @param jdoc the jdoc
* @param fname name of the config file
* @param dir the directory to write to
*/ | Write a config file to a directory with the keys of the json doc | writeConfigRest | {
"repo_name": "AustESE-Infrastructure/calliope",
"path": "src/calliope/export/PDEFArchive.java",
"license": "gpl-2.0",
"size": 25952
} | [
"java.io.File",
"java.io.FileWriter"
] | import java.io.File; import java.io.FileWriter; | import java.io.*; | [
"java.io"
] | java.io; | 50,205 |
List<Instruction> deferred(); | List<Instruction> deferred(); | /**
* Returns the list of treatment instructions that will be applied
* further down the pipeline.
* @return list of treatment instructions
*/ | Returns the list of treatment instructions that will be applied further down the pipeline | deferred | {
"repo_name": "maxkondr/onos-porta",
"path": "core/api/src/main/java/org/onosproject/net/flow/TrafficTreatment.java",
"license": "apache-2.0",
"size": 7873
} | [
"java.util.List",
"org.onosproject.net.flow.instructions.Instruction"
] | import java.util.List; import org.onosproject.net.flow.instructions.Instruction; | import java.util.*; import org.onosproject.net.flow.instructions.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 2,232,123 |
@Override
public Object createStatement(Object proxy, Method method, Object[] args, Object statement, long time) {
try {
String name = method.getName();
Constructor<?> constructor = null;
String sql = null;
if (compare(CREATE_STATEMENT, name)) {
... | Object function(Object proxy, Method method, Object[] args, Object statement, long time) { try { String name = method.getName(); Constructor<?> constructor = null; String sql = null; if (compare(CREATE_STATEMENT, name)) { constructor = getConstructor(CREATE_STATEMENT_IDX, Statement.class); } else if (compare(PREPARE_ST... | /**
* Creates a statement interceptor to monitor query response times
*/ | Creates a statement interceptor to monitor query response times | createStatement | {
"repo_name": "apache/tomcat",
"path": "modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/StatementFacade.java",
"license": "apache-2.0",
"size": 5504
} | [
"java.lang.reflect.Constructor",
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.Method",
"java.sql.CallableStatement",
"java.sql.PreparedStatement",
"java.sql.Statement"
] | import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.Statement; | import java.lang.reflect.*; import java.sql.*; | [
"java.lang",
"java.sql"
] | java.lang; java.sql; | 743,752 |
@Deprecated
public boolean setRepositoryUsers(RepositoryModel repository, List<String> repositoryUsers) {
// rejects all changes since 1.2.0 because this would elevate
// all discrete access permissions to RW+
return false;
}
| boolean function(RepositoryModel repository, List<String> repositoryUsers) { return false; } | /**
* Sets the list of all uses who are allowed to bypass the access
* restriction placed on the specified repository.
*
* @see IUserService.setUsernamesForRepositoryRole(String, List<String>)
* @param repository
* @param usernames
* @return true if successful
*/ | Sets the list of all uses who are allowed to bypass the access restriction placed on the specified repository | setRepositoryUsers | {
"repo_name": "BullShark/IRCBlit",
"path": "src/main/java/com/gitblit/GitBlit.java",
"license": "apache-2.0",
"size": 119961
} | [
"com.gitblit.models.RepositoryModel",
"java.util.List"
] | import com.gitblit.models.RepositoryModel; import java.util.List; | import com.gitblit.models.*; import java.util.*; | [
"com.gitblit.models",
"java.util"
] | com.gitblit.models; java.util; | 1,491,080 |
public final void sendMessageDelayed(Message msg, long delayMillis) {
// mSmHandler can be null if the state machine has quit.
SmHandler smh = mSmHandler;
if (smh == null) return;
smh.sendMessageDelayed(msg, delayMillis);
} | final void function(Message msg, long delayMillis) { SmHandler smh = mSmHandler; if (smh == null) return; smh.sendMessageDelayed(msg, delayMillis); } | /**
* Enqueue a message to this state machine after a delay.
*
* Message is ignored if state machine has quit.
*/ | Enqueue a message to this state machine after a delay. Message is ignored if state machine has quit | sendMessageDelayed | {
"repo_name": "zuoweitan/Hitalk",
"path": "app/src/main/java/com/zuowei/utils/fsm/StateMachine.java",
"license": "apache-2.0",
"size": 68469
} | [
"android.os.Message"
] | import android.os.Message; | import android.os.*; | [
"android.os"
] | android.os; | 2,024,101 |
// sort
if(originalSql == null) {
originalSql = "";
}
if(!originalSql.toUpperCase().contains("ORDER BY")) {
Order order = orderForSortType(sort);
if((flags & FLAG_REVERSE_SORT) > 0) {
order = order.reverse();
}
original... | if(originalSql == null) { originalSql = STRORDER BYSTR ORDER BY " + order; } if((flags & FLAG_SHOW_COMPLETED) > 0) { originalSql = originalSql.replace(Task.COMPLETION_DATE.eq(0).toString(), Criterion.all.toString()); } if ((flags & FLAG_SHOW_RECENTLY_COMPLETED) > 0) { originalSql = originalSql.replace(Task.COMPLETION_D... | /**
* Takes a SQL query, and if there isn't already an order, creates an order.
*/ | Takes a SQL query, and if there isn't already an order, creates an order | adjustQueryForFlagsAndSort | {
"repo_name": "cinash/tasks",
"path": "api/src/main/java/com/todoroo/astrid/core/SortHelper.java",
"license": "gpl-3.0",
"size": 5125
} | [
"com.todoroo.andlib.sql.Criterion",
"com.todoroo.andlib.utility.DateUtilities",
"com.todoroo.astrid.data.Task",
"com.todoroo.astrid.data.TaskApiDao"
] | import com.todoroo.andlib.sql.Criterion; import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.astrid.data.Task; import com.todoroo.astrid.data.TaskApiDao; | import com.todoroo.andlib.sql.*; import com.todoroo.andlib.utility.*; import com.todoroo.astrid.data.*; | [
"com.todoroo.andlib",
"com.todoroo.astrid"
] | com.todoroo.andlib; com.todoroo.astrid; | 1,924,249 |
@LogMessage(level = INFO)
@Message(id = 20001, value = "Required license terms for %s")
public void requiredLicenseTerms(String url); | @LogMessage(level = INFO) @Message(id = 20001, value = STR) void function(String url); | /**
* Required license terms
* @param url The license url
*/ | Required license terms | requiredLicenseTerms | {
"repo_name": "jandsu/ironjacamar",
"path": "deployers/src/main/java/org/ironjacamar/deployers/DeployersLogger.java",
"license": "epl-1.0",
"size": 2697
} | [
"org.jboss.logging.annotations.LogMessage",
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 414,913 |
PagedIterable<ReplicationLink> list(
String resourceGroupName, String workspaceName, String sqlPoolName, Context context); | PagedIterable<ReplicationLink> list( String resourceGroupName, String workspaceName, String sqlPoolName, Context context); | /**
* Lists a Sql pool's replication links.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param sqlPoolName SQL pool name.
* @param context The context to associate with this operation.
*... | Lists a Sql pool's replication links | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolReplicationLinks.java",
"license": "mit",
"size": 3733
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,858,274 |
public EdgeEndPoint getAnyEndPoint() {
if (isEmpty()) {
return null;
} else {
return getAny().getIn1EndPoint();
}
}
private final RNATemplate template = this;
private class RNAIterator implements Iterator<RNATemplateElement> {
private Iterator<EdgeEndPoint> iter = vertexIterator(); | EdgeEndPoint function() { if (isEmpty()) { return null; } else { return getAny().getIn1EndPoint(); } } private final RNATemplate template = this; private class RNAIterator implements Iterator<RNATemplateElement> { private Iterator<EdgeEndPoint> iter = vertexIterator(); | /**
* Return an arbitrary endpoint of the template,
* null if empty.
* Time: O(1)
*/ | Return an arbitrary endpoint of the template, null if empty. Time: O(1) | getAnyEndPoint | {
"repo_name": "ingolfured/StatAlign",
"path": "src/fr/orsay/lri/varna/models/templates/RNATemplate.java",
"license": "gpl-3.0",
"size": 57262
} | [
"fr.orsay.lri.varna.models.templates.RNATemplate",
"java.util.Iterator"
] | import fr.orsay.lri.varna.models.templates.RNATemplate; import java.util.Iterator; | import fr.orsay.lri.varna.models.templates.*; import java.util.*; | [
"fr.orsay.lri",
"java.util"
] | fr.orsay.lri; java.util; | 1,400,988 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
} | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s
* describing the children that can be created under this object. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/operations/provider/EObjectToModelElementIdMapItemProvider.java",
"license": "epl-1.0",
"size": 5716
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,778,034 |
public void setWorkCostSummary(WorkCostSummary newWorkCostSummary) {
if (newWorkCostSummary != workCostSummary) {
NotificationChain msgs = null;
if (workCostSummary != null)
msgs = ((InternalEObject)workCostSummary).eInverseRemove(this, InfWorkPackage.WORK_COST_SUMMARY__WORK_COST_DETAIL, WorkCostSummary.... | void function(WorkCostSummary newWorkCostSummary) { if (newWorkCostSummary != workCostSummary) { NotificationChain msgs = null; if (workCostSummary != null) msgs = ((InternalEObject)workCostSummary).eInverseRemove(this, InfWorkPackage.WORK_COST_SUMMARY__WORK_COST_DETAIL, WorkCostSummary.class, msgs); if (newWorkCostSum... | /**
* Sets the value of the '{@link CIM15.IEC61970.Informative.InfWork.WorkCostDetail#getWorkCostSummary <em>Work Cost Summary</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Work Cost Summary</em>' reference.
* @see #getWorkCostSummary()
* @gener... | Sets the value of the '<code>CIM15.IEC61970.Informative.InfWork.WorkCostDetail#getWorkCostSummary Work Cost Summary</code>' reference. | setWorkCostSummary | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/Informative/InfWork/WorkCostDetail.java",
"license": "apache-2.0",
"size": 49803
} | [
"org.eclipse.emf.common.notify.NotificationChain",
"org.eclipse.emf.ecore.InternalEObject"
] | import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.InternalEObject; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 108,158 |
public CcLibraryHelper addLinkstamps(Iterable<? extends TransitiveInfoCollection> linkstamps) {
for (TransitiveInfoCollection linkstamp : linkstamps) {
Iterables.addAll(this.linkstamps,
linkstamp.getProvider(FileProvider.class).getFilesToBuild());
}
return this;
} | CcLibraryHelper function(Iterable<? extends TransitiveInfoCollection> linkstamps) { for (TransitiveInfoCollection linkstamp : linkstamps) { Iterables.addAll(this.linkstamps, linkstamp.getProvider(FileProvider.class).getFilesToBuild()); } return this; } | /**
* Adds the given linkstamps. Note that linkstamps are usually not compiled at the library level,
* but only in the dependent binary rules.
*/ | Adds the given linkstamps. Note that linkstamps are usually not compiled at the library level, but only in the dependent binary rules | addLinkstamps | {
"repo_name": "Topher-the-Geek/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java",
"license": "apache-2.0",
"size": 40433
} | [
"com.google.common.collect.Iterables",
"com.google.devtools.build.lib.analysis.FileProvider",
"com.google.devtools.build.lib.analysis.TransitiveInfoCollection"
] | import com.google.common.collect.Iterables; import com.google.devtools.build.lib.analysis.FileProvider; import com.google.devtools.build.lib.analysis.TransitiveInfoCollection; | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,052,029 |
@IgniteSpiConfiguration(optional = true)
public void setUriList(List<String> uriList) {
this.uriList = uriList;
} | @IgniteSpiConfiguration(optional = true) void function(List<String> uriList) { this.uriList = uriList; } | /**
* Sets list of URI which point to GAR file and which should be
* scanned by SPI for the new tasks.
* <p>
* If not provided, default value is list with
* {@code file://${IGNITE_HOME}/work/deployment/file} element.
* Note that system property {@code IGNITE_HOME} must be set.
* For u... | Sets list of URI which point to GAR file and which should be scanned by SPI for the new tasks. If not provided, default value is list with file://${IGNITE_HOME/work/deployment/file} element. Note that system property IGNITE_HOME must be set. For unknown IGNITE_HOME list of URI must be provided explicitly | setUriList | {
"repo_name": "tkpanther/ignite",
"path": "modules/urideploy/src/main/java/org/apache/ignite/spi/deployment/uri/UriDeploymentSpi.java",
"license": "apache-2.0",
"size": 50949
} | [
"java.util.List",
"org.apache.ignite.spi.IgniteSpiConfiguration"
] | import java.util.List; import org.apache.ignite.spi.IgniteSpiConfiguration; | import java.util.*; import org.apache.ignite.spi.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,399,143 |
public synchronized OVXLink connectLink(final long ovxSrcDpid,
final short ovxSrcPort, final long ovxDstDpid,
final short ovxDstPort, final String alg, final byte numBackups,
final int linkId) throws IndexOutOfBoundException,
PortMappingException {
RoutingAlgo... | synchronized OVXLink function(final long ovxSrcDpid, final short ovxSrcPort, final long ovxDstDpid, final short ovxDstPort, final String alg, final byte numBackups, final int linkId) throws IndexOutOfBoundException, PortMappingException { RoutingAlgorithms algorithm = null; try { algorithm = new RoutingAlgorithms(alg, ... | /**
* Creates virtual link, adds it to the topology, and returns the link instance.
*
* @param ovxSrcDpid virtual source dpid
* @param ovxSrcPort source port number
* @param ovxDstDpid virtual destination dpid
* @param ovxDstPort destination port number
* @param alg the routing algori... | Creates virtual link, adds it to the topology, and returns the link instance | connectLink | {
"repo_name": "opennetworkinglab/OpenVirteX",
"path": "src/main/java/net/onrc/openvirtex/elements/network/OVXNetwork.java",
"license": "apache-2.0",
"size": 26987
} | [
"net.onrc.openvirtex.elements.link.OVXLink",
"net.onrc.openvirtex.elements.port.OVXPort",
"net.onrc.openvirtex.exceptions.IndexOutOfBoundException",
"net.onrc.openvirtex.exceptions.PortMappingException",
"net.onrc.openvirtex.exceptions.RoutingAlgorithmException",
"net.onrc.openvirtex.routing.RoutingAlgori... | import net.onrc.openvirtex.elements.link.OVXLink; import net.onrc.openvirtex.elements.port.OVXPort; import net.onrc.openvirtex.exceptions.IndexOutOfBoundException; import net.onrc.openvirtex.exceptions.PortMappingException; import net.onrc.openvirtex.exceptions.RoutingAlgorithmException; import net.onrc.openvirtex.rout... | import net.onrc.openvirtex.elements.link.*; import net.onrc.openvirtex.elements.port.*; import net.onrc.openvirtex.exceptions.*; import net.onrc.openvirtex.routing.*; | [
"net.onrc.openvirtex"
] | net.onrc.openvirtex; | 690,268 |
public static BrowseResult runBrowseSearch(String searchString, int offset,
Map<String, String> facetValues, List<Integer> ids, boolean pagination, int listSize) {
BrowseResult result = null;
if (index == null) {
return result;
}
long time = System.currentTime... | static BrowseResult function(String searchString, int offset, Map<String, String> facetValues, List<Integer> ids, boolean pagination, int listSize) { BrowseResult result = null; if (index == null) { return result; } long time = System.currentTimeMillis(); String queryString = parseQueryString(searchString); try { Analy... | /**
* perform a keyword search using bobo-browse for faceting and pagination
* @param searchString string to search for
* @param offset display offset
* @param facetValues map of 'facet field name' to 'value to restrict field to' (optional)
* @param ids ids to research the search to (for search... | perform a keyword search using bobo-browse for faceting and pagination | runBrowseSearch | {
"repo_name": "joshkh/intermine",
"path": "intermine/api/main/src/org/intermine/api/lucene/KeywordSearch.java",
"license": "lgpl-2.1",
"size": 52885
} | [
"com.browseengine.bobo.api.BoboBrowser",
"com.browseengine.bobo.api.Browsable",
"com.browseengine.bobo.api.BrowseException",
"com.browseengine.bobo.api.BrowseRequest",
"com.browseengine.bobo.api.BrowseResult",
"com.browseengine.bobo.api.BrowseSelection",
"com.browseengine.bobo.api.FacetSpec",
"java.io... | import com.browseengine.bobo.api.BoboBrowser; import com.browseengine.bobo.api.Browsable; import com.browseengine.bobo.api.BrowseException; import com.browseengine.bobo.api.BrowseRequest; import com.browseengine.bobo.api.BrowseResult; import com.browseengine.bobo.api.BrowseSelection; import com.browseengine.bobo.api.Fa... | import com.browseengine.bobo.api.*; import java.io.*; import java.util.*; import org.apache.lucene.*; import org.apache.lucene.analysis.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.lucene.util.*; | [
"com.browseengine.bobo",
"java.io",
"java.util",
"org.apache.lucene"
] | com.browseengine.bobo; java.io; java.util; org.apache.lucene; | 2,792,165 |
public void setSysConfig(ISysConfig config) {
} | void function(ISysConfig config) { } | /**
* Allows an outside source to set the ISysConfig.
* The default implementation does nothing. This method may be
* implemented by derived classes if needed.
*/ | Allows an outside source to set the ISysConfig. The default implementation does nothing. This method may be implemented by derived classes if needed | setSysConfig | {
"repo_name": "spakzad/ocs",
"path": "bundle/edu.gemini.pot/src/main/java/edu/gemini/spModel/data/AbstractDataObject.java",
"license": "bsd-3-clause",
"size": 11313
} | [
"edu.gemini.spModel.data.config.ISysConfig"
] | import edu.gemini.spModel.data.config.ISysConfig; | import edu.gemini.*; | [
"edu.gemini"
] | edu.gemini; | 770,184 |
public HttpServletRequest getRequestFacade() {
return getRequest();
}
protected org.apache.catalina.connector.Response response = null; | HttpServletRequest function() { return getRequest(); } protected org.apache.catalina.connector.Response response = null; | /**
* Alias for AsyncContext inner class.
*/ | Alias for AsyncContext inner class | getRequestFacade | {
"repo_name": "johnaoahra80/JBOSSWEB_7_5_0_FINAL",
"path": "src/main/java/org/apache/catalina/connector/Request.java",
"license": "apache-2.0",
"size": 102726
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 260,174 |
public static void apiManagementCreateGroupUser(
com.azure.resourcemanager.apimanagement.ApiManagementManager manager) {
manager
.groupUsers()
.createWithResponse("rg1", "apimService1", "tempgroup", "59307d350af58404d8a26300", Context.NONE);
} | static void function( com.azure.resourcemanager.apimanagement.ApiManagementManager manager) { manager .groupUsers() .createWithResponse("rg1", STR, STR, STR, Context.NONE); } | /**
* Sample code: ApiManagementCreateGroupUser.
*
* @param manager Entry point to ApiManagementManager.
*/ | Sample code: ApiManagementCreateGroupUser | apiManagementCreateGroupUser | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/samples/java/com/azure/resourcemanager/apimanagement/GroupUserCreateSamples.java",
"license": "mit",
"size": 885
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,784,992 |
protected AsyncHttpRequest newAsyncHttpRequest(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) {
return new AsyncHttpRequest(client, httpContext, uriRequest, responseHandler);
} | AsyncHttpRequest function(DefaultHttpClient client, HttpContext httpContext, HttpUriRequest uriRequest, String contentType, ResponseHandlerInterface responseHandler, Context context) { return new AsyncHttpRequest(client, httpContext, uriRequest, responseHandler); } | /**
* Instantiate a new asynchronous HTTP request for the passed parameters.
*
* @param client HttpClient to be used for request, can differ in single requests
* @param contentType MIME body type, for POST and PUT requests, may be null
* @param context Context of Android ap... | Instantiate a new asynchronous HTTP request for the passed parameters | newAsyncHttpRequest | {
"repo_name": "blackdargn/AndroidUtil",
"path": "ext/asyn-http-library/src/main/java/com/loopj/android/http/AsyncHttpClient.java",
"license": "apache-2.0",
"size": 53797
} | [
"android.content.Context",
"org.apache.http.client.methods.HttpUriRequest",
"org.apache.http.impl.client.DefaultHttpClient",
"org.apache.http.protocol.HttpContext"
] | import android.content.Context; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.protocol.HttpContext; | import android.content.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*; import org.apache.http.protocol.*; | [
"android.content",
"org.apache.http"
] | android.content; org.apache.http; | 1,621,107 |
public T secureXML(String secureTag, Map<String, String> namespaces, boolean secureTagContents, String passPhrase) {
XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, passPhrase);
return dataFormat(xsdf);
} | T function(String secureTag, Map<String, String> namespaces, boolean secureTagContents, String passPhrase) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents, passPhrase); return dataFormat(xsdf); } | /**
* Uses the XML Security data format
*/ | Uses the XML Security data format | secureXML | {
"repo_name": "aaronwalker/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 18605
} | [
"java.util.Map",
"org.apache.camel.model.dataformat.XMLSecurityDataFormat"
] | import java.util.Map; import org.apache.camel.model.dataformat.XMLSecurityDataFormat; | import java.util.*; import org.apache.camel.model.dataformat.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 530,986 |
public EnumDecl withName(String name) {
return location.safeTraversalReplace(SEnumDecl.NAME, Trees.name(name));
} | EnumDecl function(String name) { return location.safeTraversalReplace(SEnumDecl.NAME, Trees.name(name)); } | /**
* Replaces the name of this enum declaration.
*
* @param name the replacement for the name of this enum declaration.
* @return the resulting mutated enum declaration.
*/ | Replaces the name of this enum declaration | withName | {
"repo_name": "ptitjes/jlato",
"path": "src/main/java/org/jlato/internal/td/decl/TDEnumDecl.java",
"license": "lgpl-3.0",
"size": 8732
} | [
"org.jlato.internal.bu.decl.SEnumDecl",
"org.jlato.tree.Trees",
"org.jlato.tree.decl.EnumDecl"
] | import org.jlato.internal.bu.decl.SEnumDecl; import org.jlato.tree.Trees; import org.jlato.tree.decl.EnumDecl; | import org.jlato.internal.bu.decl.*; import org.jlato.tree.*; import org.jlato.tree.decl.*; | [
"org.jlato.internal",
"org.jlato.tree"
] | org.jlato.internal; org.jlato.tree; | 1,557,329 |
public OpenstackVtap prevOpenstackVtap() {
Object obj = prevSubject;
checkState(obj == null || obj instanceof OpenstackVtap, INVALID_OBJ_TYPE, obj);
return (OpenstackVtap) obj;
} | OpenstackVtap function() { Object obj = prevSubject; checkState(obj == null obj instanceof OpenstackVtap, INVALID_OBJ_TYPE, obj); return (OpenstackVtap) obj; } | /**
* Gets the previous openstack vtap in this openstack vtap event.
*
* @return the previous subject, or null if type is added
*/ | Gets the previous openstack vtap in this openstack vtap event | prevOpenstackVtap | {
"repo_name": "gkatsikas/onos",
"path": "apps/openstackvtap/api/src/main/java/org/onosproject/openstackvtap/api/OpenstackVtapEvent.java",
"license": "apache-2.0",
"size": 6361
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 214,728 |
EClass getInteractionFragment(); | EClass getInteractionFragment(); | /**
* Returns the meta object for class '{@link ca.mcgill.cs.sel.ram.InteractionFragment <em>Interaction Fragment</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Interaction Fragment</em>'.
* @see ca.mcgill.cs.sel.ram.InteractionFragment
*... | Returns the meta object for class '<code>ca.mcgill.cs.sel.ram.InteractionFragment Interaction Fragment</code>'. | getInteractionFragment | {
"repo_name": "mjorod/textram",
"path": "tool/ca.mcgill.sel.ram/src/ca/mcgill/cs/sel/ram/RamPackage.java",
"license": "mit",
"size": 271132
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,065,339 |
public void setChartService(ChartService chartService) {
this.chartService = chartService;
}
| void function(ChartService chartService) { this.chartService = chartService; } | /**
* Sets the chartService attribute, allowing the injection of an implementation of the service.
*
* @param chartService the chartService implementation to set
* @see org.kuali.kfs.coa.service.ChartService
*/ | Sets the chartService attribute, allowing the injection of an implementation of the service | setChartService | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/gl/batch/PurgeCollectorDetailStep.java",
"license": "agpl-3.0",
"size": 3545
} | [
"org.kuali.kfs.coa.service.ChartService"
] | import org.kuali.kfs.coa.service.ChartService; | import org.kuali.kfs.coa.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,252,135 |
public Vector<IVdmDefinition> getDefinitions(); | Vector<IVdmDefinition> function(); | /**
* Returns the list of definitions contained (children)
*
* @return The definition list.
*/ | Returns the list of definitions contained (children) | getDefinitions | {
"repo_name": "LasseBP/overture",
"path": "core/guibuilder/src/main/java/org/overture/guibuilder/internal/ir/IVdmDefinition.java",
"license": "gpl-3.0",
"size": 2803
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,112,267 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(CdPackage.Literals.CD_CLASS__ATTRIBUTES,
CdFactory.eINSTANCE.createCDAttribute()... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (CdPackage.Literals.CD_CLASS__ATTRIBUTES, CdFactory.eINSTANCE.createCDAttribute())); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "awortmann/xmontiarc",
"path": "ur1.diverse.cd.model.edit/src/cd/provider/CDClassItemProvider.java",
"license": "epl-1.0",
"size": 6477
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,375,918 |
public boolean getDefaultEnabelCommentPreference( )
{
return PreferenceFactory.getInstance( )
.getPreferences( this )
.getDefaultBoolean( ENABLE_COMMENT_PREFERENCE );
} | boolean function( ) { return PreferenceFactory.getInstance( ) .getPreferences( this ) .getDefaultBoolean( ENABLE_COMMENT_PREFERENCE ); } | /**
* Return default enable comment preference
*
* @return boolean The bool value of default enable comment preference
*/ | Return default enable comment preference | getDefaultEnabelCommentPreference | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/ReportPlugin.java",
"license": "epl-1.0",
"size": 54061
} | [
"org.eclipse.birt.report.designer.ui.preferences.PreferenceFactory"
] | import org.eclipse.birt.report.designer.ui.preferences.PreferenceFactory; | import org.eclipse.birt.report.designer.ui.preferences.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 2,114,294 |
public static void createAScaleSetWithAutomaticRepairsEnabled(
com.azure.resourcemanager.AzureResourceManager azure) {
azure
.virtualMachines()
.manager()
.serviceClient()
.getVirtualMachineScaleSets()
.createOrUpdate(
... | static void function( com.azure.resourcemanager.AzureResourceManager azure) { azure .virtualMachines() .manager() .serviceClient() .getVirtualMachineScaleSets() .createOrUpdate( STR, STR, new VirtualMachineScaleSetInner() .withLocation(STR) .withSku(new Sku().withName(STR).withTier(STR).withCapacity(3L)) .withUpgradePo... | /**
* Sample code: Create a scale set with automatic repairs enabled.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/ | Sample code: Create a scale set with automatic repairs enabled | createAScaleSetWithAutomaticRepairsEnabled | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/compute/generated/VirtualMachineScaleSetsCreateOrUpdateSamples.java",
"license": "mit",
"size": 165298
} | [
"com.azure.core.util.Context",
"com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetInner",
"com.azure.resourcemanager.compute.models.ApiEntityReference",
"com.azure.resourcemanager.compute.models.AutomaticRepairsPolicy",
"com.azure.resourcemanager.compute.models.CachingTypes",
"com.azur... | import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineScaleSetInner; import com.azure.resourcemanager.compute.models.ApiEntityReference; import com.azure.resourcemanager.compute.models.AutomaticRepairsPolicy; import com.azure.resourcemanager.compute.models.CachingTypes... | import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; import com.azure.resourcemanager.compute.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 772,996 |
public static void setKeyWriterSchema(Configuration conf, Schema schema) {
if (null == schema) {
throw new IllegalArgumentException("Writer schema may not be null");
}
conf.set(CONF_KEY_WRITER_SCHEMA, schema.toString());
} | static void function(Configuration conf, Schema schema) { if (null == schema) { throw new IllegalArgumentException(STR); } conf.set(CONF_KEY_WRITER_SCHEMA, schema.toString()); } | /**
* Sets the writer schema of the AvroKey datum that is being serialized/deserialized.
*
* @param conf The configuration.
* @param schema The Avro key schema.
*/ | Sets the writer schema of the AvroKey datum that is being serialized/deserialized | setKeyWriterSchema | {
"repo_name": "DrAA/avro",
"path": "lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerialization.java",
"license": "apache-2.0",
"size": 10248
} | [
"org.apache.avro.Schema",
"org.apache.hadoop.conf.Configuration"
] | import org.apache.avro.Schema; import org.apache.hadoop.conf.Configuration; | import org.apache.avro.*; import org.apache.hadoop.conf.*; | [
"org.apache.avro",
"org.apache.hadoop"
] | org.apache.avro; org.apache.hadoop; | 283,482 |
@Override
public void write(DataOutput dataOutput, Byte object) throws IOException {
dataOutput.write(object);
} | void function(DataOutput dataOutput, Byte object) throws IOException { dataOutput.write(object); } | /**
* Writes the <code>byte</code> value of the specified <code>Byte</code>
* object to the specified data output.
*
* <p>This implementation calls the write method of the data output with
* the <code>byte</code> value of the object.</p>
*
* @param dataOutput the stream to write the <code>byte</code> val... | Writes the <code>byte</code> value of the specified <code>Byte</code> object to the specified data output. This implementation calls the write method of the data output with the <code>byte</code> value of the object | write | {
"repo_name": "hannoman/xxl",
"path": "src/xxl/core/io/converters/ByteConverter.java",
"license": "lgpl-3.0",
"size": 6182
} | [
"java.io.DataOutput",
"java.io.IOException"
] | import java.io.DataOutput; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,794,454 |
public int readUnsignedByte() throws IOException {
return read() | 0x00ff;
} | int function() throws IOException { return read() 0x00ff; } | /** Read a byte value in the range 0-255.
* @return The byte value as an integer.
*/ | Read a byte value in the range 0-255 | readUnsignedByte | {
"repo_name": "jankotek/asterope",
"path": "skyview/nom/tam/util/BufferedDataInputStream.java",
"license": "agpl-3.0",
"size": 23604
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,409,241 |
public static int estimateKeyLength(PTable table) {
int maxKeyLength = 0;
// Calculate the max length of a key (each part must currently be of a fixed width)
int i = 0;
List<PColumn> columns = table.getPKColumns();
while (i < columns.size()) {
PColumn keyColumn = ... | static int function(PTable table) { int maxKeyLength = 0; int i = 0; List<PColumn> columns = table.getPKColumns(); while (i < columns.size()) { PColumn keyColumn = columns.get(i++); PDataType type = keyColumn.getDataType(); Integer maxLength = keyColumn.getMaxLength(); maxKeyLength += !type.isFixedWidth() ? VAR_LENGTH_... | /**
* Estimate the max key length in bytes of the PK for a given table
* @param table the table
* @return the max PK length
*/ | Estimate the max key length in bytes of the PK for a given table | estimateKeyLength | {
"repo_name": "d9liang/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/util/SchemaUtil.java",
"license": "apache-2.0",
"size": 27358
} | [
"java.util.List",
"org.apache.phoenix.schema.PColumn",
"org.apache.phoenix.schema.PTable",
"org.apache.phoenix.schema.types.PDataType"
] | import java.util.List; import org.apache.phoenix.schema.PColumn; import org.apache.phoenix.schema.PTable; import org.apache.phoenix.schema.types.PDataType; | import java.util.*; import org.apache.phoenix.schema.*; import org.apache.phoenix.schema.types.*; | [
"java.util",
"org.apache.phoenix"
] | java.util; org.apache.phoenix; | 76,911 |
public static void main(String[] args) throws Exception {
java.io.PrintWriter out = new java.io.PrintWriter(System.out);
new RuntimeWSDL(new File(args[0]), new File(args[1]), args[2])
.serialize(out);
out.flush();
} | static void function(String[] args) throws Exception { java.io.PrintWriter out = new java.io.PrintWriter(System.out); new RuntimeWSDL(new File(args[0]), new File(args[1]), args[2]) .serialize(out); out.flush(); } | /**
* Command-line test. Usage: java RuntimeWSDL schemaFile sourceWSDL endpoint
*/ | Command-line test. Usage: java RuntimeWSDL schemaFile sourceWSDL endpoint | main | {
"repo_name": "DBCDK/fcrepo-3.5-patched",
"path": "fcrepo-server/src/main/java/org/fcrepo/server/utilities/RuntimeWSDL.java",
"license": "apache-2.0",
"size": 5219
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,219,675 |
public synchronized void closePort(long timeout) {
if (timeout == 0) {
while (connections.size() > 0) {
try {
wait();
} catch(InterruptedException e) {
// ignored
}
}
} else {
... | synchronized void function(long timeout) { if (timeout == 0) { while (connections.size() > 0) { try { wait(); } catch(InterruptedException e) { } } } else { long endTime = System.currentTimeMillis() + timeout; while (connections.size() > 0 && timeout > 0) { try { wait(timeout); } catch(InterruptedException e) { } timeo... | /**
* Waits for all connections to close. If the specified timeout is larger
* than 0, the implementation waits for the specified time, and then
* forcibly closes all connections.
* @param timeout the timeout in milliseconds.
*/ | Waits for all connections to close. If the specified timeout is larger than 0, the implementation waits for the specified time, and then forcibly closes all connections | closePort | {
"repo_name": "NLeSC/Aether",
"path": "src/nl/esciencecenter/aether/impl/ReceivePort.java",
"license": "apache-2.0",
"size": 26295
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,697,539 |
@Test
public void testRemoveValueEqualStoreEntryCacheAccessExceptionEqualCacheLoaderWriterEntry() throws Exception {
final FakeStore fakeStore = new FakeStore(Collections.singletonMap("key", "value"));
this.store = spy(fakeStore);
doThrow(new CacheAccessException("")).when(this.store).compute(eq("key"),... | void function() throws Exception { final FakeStore fakeStore = new FakeStore(Collections.singletonMap("keySTRvalue")); this.store = spy(fakeStore); doThrow(new CacheAccessException(STRkeySTRkeySTRvalueSTRkeySTRvalueSTRkeySTRkeySTRvalueSTRkey"), is(false)); validateStats(ehcache, EnumSet.of(CacheOperationOutcomes.Condit... | /**
* Tests the effect of a {@link org.ehcache.Ehcache#remove(Object, Object)} for
* <ul>
* <li>key with equal value present in {@code Store}</li>
* <li>>{@code Store.compute} throws</li>
* <li>key with equal value present via {@code CacheLoaderWriter}</li>
* </ul>
*/ | Tests the effect of a <code>org.ehcache.Ehcache#remove(Object, Object)</code> for key with equal value present in Store >Store.compute throws key with equal value present via CacheLoaderWriter | testRemoveValueEqualStoreEntryCacheAccessExceptionEqualCacheLoaderWriterEntry | {
"repo_name": "palmanojkumar/ehcache3",
"path": "core/src/test/java/org/ehcache/EhcacheBasicRemoveValueTest.java",
"license": "apache-2.0",
"size": 39125
} | [
"java.util.Collections",
"java.util.EnumSet",
"org.ehcache.exceptions.CacheAccessException",
"org.ehcache.statistics.CacheOperationOutcomes",
"org.hamcrest.CoreMatchers",
"org.mockito.Mockito"
] | import java.util.Collections; import java.util.EnumSet; import org.ehcache.exceptions.CacheAccessException; import org.ehcache.statistics.CacheOperationOutcomes; import org.hamcrest.CoreMatchers; import org.mockito.Mockito; | import java.util.*; import org.ehcache.exceptions.*; import org.ehcache.statistics.*; import org.hamcrest.*; import org.mockito.*; | [
"java.util",
"org.ehcache.exceptions",
"org.ehcache.statistics",
"org.hamcrest",
"org.mockito"
] | java.util; org.ehcache.exceptions; org.ehcache.statistics; org.hamcrest; org.mockito; | 1,891,263 |
File newDir(); | File newDir(); | /**
* Create a directory in temp folder with a random unique name.
*/ | Create a directory in temp folder with a random unique name | newDir | {
"repo_name": "lbndev/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java",
"license": "lgpl-3.0",
"size": 1668
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 675,713 |
public List<PortletType> selectPortletTypesList( )
{
List<PortletType> list = new ArrayList<>( );
try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_PORTLET_TYPE_LIST ) )
{
daoUtil.executeQuery( );
while ( daoUtil.next( ) )
{
Portle... | List<PortletType> function( ) { List<PortletType> list = new ArrayList<>( ); try ( DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_PORTLET_TYPE_LIST ) ) { daoUtil.executeQuery( ); while ( daoUtil.next( ) ) { PortletType portletType = new PortletType( ); portletType.setId( daoUtil.getString( 1 ) ); portletType.setNameKe... | /**
* Returns the list of the portlet types
*
* @return the list of the portlet types
*/ | Returns the list of the portlet types | selectPortletTypesList | {
"repo_name": "rzara/lutece-core",
"path": "src/java/fr/paris/lutece/portal/business/portlet/PortletTypeDAO.java",
"license": "bsd-3-clause",
"size": 9924
} | [
"fr.paris.lutece.util.sql.DAOUtil",
"java.util.ArrayList",
"java.util.List"
] | import fr.paris.lutece.util.sql.DAOUtil; import java.util.ArrayList; import java.util.List; | import fr.paris.lutece.util.sql.*; import java.util.*; | [
"fr.paris.lutece",
"java.util"
] | fr.paris.lutece; java.util; | 2,194,819 |
public BigDecimal normalize(BigDecimal original, BigDecimal maximum, BigDecimal normalizer) {
if (original == null || maximum == null)
{
return null;
}
if (normalizer == null || maximum.compareTo(normalizer) == 0)
{
return original;
}
... | BigDecimal function(BigDecimal original, BigDecimal maximum, BigDecimal normalizer) { if (original == null maximum == null) { return null; } if (normalizer == null maximum.compareTo(normalizer) == 0) { return original; } int targetScale = normalizer.scale(); BigDecimal ratio = normalizer.divide(maximum,targetScale + 1,... | /**
* Normalize a value against a target value. If 'original' or 'maximum' are null,
* then this function returns null. If 'normalizer' is null or 'maximum' == 'normalizer',
* then this function returns the original value. This uses ROUND_HALF_DOWN
*
* This could be used to set the adjusted sco... | Normalize a value against a target value. If 'original' or 'maximum' are null, then this function returns null. If 'normalizer' is null or 'maximum' == 'normalizer', then this function returns the original value. This uses ROUND_HALF_DOWN This could be used to set the adjusted score | normalize | {
"repo_name": "dmillett/prank",
"path": "src/main/java/net/prank/tools/ScoringTool.java",
"license": "apache-2.0",
"size": 13647
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 2,226,847 |
public final void workToken(Intent intent) {
workToken(intent, null);
}
| final void function(Intent intent) { workToken(intent, null); } | /**
* <p>
* Starts an asynchronous Workering operation. Calling this method cancels
* all previous non-executed Workering requests and posts a new Workering
* request that will be executed later.
* </p>
*
* @param intent
* the intent used to Worker the data
*
* @see #Worker(In... | Starts an asynchronous Workering operation. Calling this method cancels all previous non-executed Workering requests and posts a new Workering request that will be executed later. | workToken | {
"repo_name": "cdut007/PMS_TASK",
"path": "TaskTrackerPMS/src/com/jameschen/framework/base/Worker.java",
"license": "mit",
"size": 10563
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 712,757 |
@Test(enabled=true,
groups={"slow","unix.Five","release2.Three"},
dependsOnMethods={"testFive"}, alwaysRun=true)
// Soft Dependency - Depends on order
public void testSix(){
System.out.println("In TestSix");
}
// Tear Down Methods Starts Here
| @Test(enabled=true, groups={"slow",STR,STR}, dependsOnMethods={STR}, alwaysRun=true) void function(){ System.out.println(STR); } | /**
* Test Method 6
*/ | Test Method 6 | testSix | {
"repo_name": "Schools/TestNGSchool",
"path": "src/main/java/com/naren/testng/TestConfiguration.java",
"license": "apache-2.0",
"size": 2356
} | [
"org.testng.annotations.Test"
] | import org.testng.annotations.Test; | import org.testng.annotations.*; | [
"org.testng.annotations"
] | org.testng.annotations; | 2,287,952 |
interface AtomixMapComponentBuilder
extends
ComponentBuilder<AtomixMapComponent> {
default AtomixMapComponentBuilder atomix(io.atomix.Atomix atomix) {
doSetProperty("atomix", atomix);
return this;
} | interface AtomixMapComponentBuilder extends ComponentBuilder<AtomixMapComponent> { default AtomixMapComponentBuilder atomix(io.atomix.Atomix atomix) { doSetProperty(STR, atomix); return this; } | /**
* The Atomix instance to use.
*
* The option is a: <code>io.atomix.Atomix</code> type.
*
* Group: common
*
* @param atomix the value to set
* @return the dsl builder
*/ | The Atomix instance to use. The option is a: <code>io.atomix.Atomix</code> type. Group: common | atomix | {
"repo_name": "christophd/camel",
"path": "dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AtomixMapComponentBuilderFactory.java",
"license": "apache-2.0",
"size": 16683
} | [
"org.apache.camel.builder.component.ComponentBuilder",
"org.apache.camel.component.atomix.client.map.AtomixMapComponent"
] | import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.atomix.client.map.AtomixMapComponent; | import org.apache.camel.builder.component.*; import org.apache.camel.component.atomix.client.map.*; | [
"org.apache.camel"
] | org.apache.camel; | 52,475 |
public static synchronized UserRegistry getSecureRegistry(HttpServletRequest request)
throws RegistryException {
UserRegistry registry;
Object o = request.getSession().getAttribute(RegistryConstants.ROOT_REGISTRY_INSTANCE);
if (o != null) {
registry = (UserRegistry) o... | static synchronized UserRegistry function(HttpServletRequest request) throws RegistryException { UserRegistry registry; Object o = request.getSession().getAttribute(RegistryConstants.ROOT_REGISTRY_INSTANCE); if (o != null) { registry = (UserRegistry) o; } else { EmbeddedRegistryService embeddedRegistryService = (Embedd... | /**
* Returns the registry associated with the current session. If a user registry is not found,
* new SecureRegistry instance is created with anonymous user and associated for the current
* session.
*
* @param request Servlet request
*
* @return SecureRegistry instance for the curren... | Returns the registry associated with the current session. If a user registry is not found, new SecureRegistry instance is created with anonymous user and associated for the current session | getSecureRegistry | {
"repo_name": "maheshika/carbon4-kernel",
"path": "core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/servlet/utils/Utils.java",
"license": "apache-2.0",
"size": 4490
} | [
"javax.servlet.http.HttpServletRequest",
"org.wso2.carbon.registry.core.RegistryConstants",
"org.wso2.carbon.registry.core.exceptions.RegistryException",
"org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService",
"org.wso2.carbon.registry.core.session.UserRegistry"
] | import javax.servlet.http.HttpServletRequest; import org.wso2.carbon.registry.core.RegistryConstants; import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService; import org.wso2.carbon.registry.core.session.UserRegistry; | import javax.servlet.http.*; import org.wso2.carbon.registry.core.*; import org.wso2.carbon.registry.core.exceptions.*; import org.wso2.carbon.registry.core.jdbc.*; import org.wso2.carbon.registry.core.session.*; | [
"javax.servlet",
"org.wso2.carbon"
] | javax.servlet; org.wso2.carbon; | 1,749,025 |
private CMSAuthenticatedData generate(
final CMSProcessable content,
String macOID,
KeyGenerator keyGen,
Provider provider)
throws NoSuchAlgorithmException, CMSException
{
Provider encProvider = keyGen.getProvider();
con... | CMSAuthenticatedData function( final CMSProcessable content, String macOID, KeyGenerator keyGen, Provider provider) throws NoSuchAlgorithmException, CMSException { Provider encProvider = keyGen.getProvider(); convertOldRecipients(rand, provider); | /**
* generate an authenticated object that contains an CMS Authenticated Data
* object using the given provider and the passed in key generator.
* @deprecated
*/ | generate an authenticated object that contains an CMS Authenticated Data object using the given provider and the passed in key generator | generate | {
"repo_name": "sake/bouncycastle-java",
"path": "jdk1.1/org/bouncycastle/cms/CMSAuthenticatedDataGenerator.java",
"license": "mit",
"size": 9655
} | [
"java.security.NoSuchAlgorithmException",
"java.security.Provider",
"javax.crypto.KeyGenerator"
] | import java.security.NoSuchAlgorithmException; import java.security.Provider; import javax.crypto.KeyGenerator; | import java.security.*; import javax.crypto.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 772,162 |
@Override
public ByteChunk getEncodingName() {
return ENCODING;
}
// ------------------------------------------------------ Protected Methods | ByteChunk function() { return ENCODING; } | /**
* Return the name of the associated encoding; Here, the value is
* "identity".
*/ | Return the name of the associated encoding; Here, the value is "identity" | getEncodingName | {
"repo_name": "plumer/codana",
"path": "tomcat_files/7.0.61/ChunkedInputFilter.java",
"license": "mit",
"size": 17960
} | [
"org.apache.tomcat.util.buf.ByteChunk"
] | import org.apache.tomcat.util.buf.ByteChunk; | import org.apache.tomcat.util.buf.*; | [
"org.apache.tomcat"
] | org.apache.tomcat; | 2,213,949 |
public void insert(Repository bean) throws RepositoryException;
| void function(Repository bean) throws RepositoryException; | /**
* Inserts an Repository object.
*
* @param Reposiotry bean to be inserted
*
* @return void
*
* @throws RepositoryException
*/ | Inserts an Repository object | insert | {
"repo_name": "jembi/openxds",
"path": "openxds-repository/src/main/java/org/openhealthtools/openxds/repository/dao/XdsRepositoryManagerDao.java",
"license": "apache-2.0",
"size": 2211
} | [
"org.openhealthtools.openxds.repository.Repository",
"org.openhealthtools.openxds.repository.api.RepositoryException"
] | import org.openhealthtools.openxds.repository.Repository; import org.openhealthtools.openxds.repository.api.RepositoryException; | import org.openhealthtools.openxds.repository.*; import org.openhealthtools.openxds.repository.api.*; | [
"org.openhealthtools.openxds"
] | org.openhealthtools.openxds; | 2,774,144 |
// TODO: Abhijit: remove unused. Avoid login, logout from helper methods to
// enhance visibility of steps within the tests
public void loginAndConfigureCloudSync(WebDrone drone, String onPremUserName, String onPremPassword, String cloudUserName, String cloudUserPassword)
{
ShareUser.login(d... | void function(WebDrone drone, String onPremUserName, String onPremPassword, String cloudUserName, String cloudUserPassword) { ShareUser.login(drone, onPremUserName, onPremPassword); signInToAlfrescoInTheCloud(drone, cloudUserName, cloudUserPassword); ShareUser.logout(drone); } /** * Method to select the sitename of des... | /**
* Method to login and configure cloud sync (Logs out the user afterwords)
*
* @param drone
* @param onPremUserName
* @param onPremPassword
* @param cloudUserName
* @param cloudUserPassword
*/ | Method to login and configure cloud sync (Logs out the user afterwords) | loginAndConfigureCloudSync | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/qa-share/src/main/java/org/alfresco/share/util/AbstractCloudSyncTest.java",
"license": "lgpl-3.0",
"size": 30423
} | [
"org.alfresco.po.share.site.document.DocumentDetailsPage",
"org.alfresco.webdrone.WebDrone"
] | import org.alfresco.po.share.site.document.DocumentDetailsPage; import org.alfresco.webdrone.WebDrone; | import org.alfresco.po.share.site.document.*; import org.alfresco.webdrone.*; | [
"org.alfresco.po",
"org.alfresco.webdrone"
] | org.alfresco.po; org.alfresco.webdrone; | 2,562,900 |
Extension getExtension(BundleVersion bundleVersion, String name); | Extension getExtension(BundleVersion bundleVersion, String name); | /**
* Retrieves the extension with the given name in the given bundle version.
*
* @param bundleVersion the bundle version
* @param name the extension name
* @return the extension
*/ | Retrieves the extension with the given name in the given bundle version | getExtension | {
"repo_name": "bbende/nifi-registry",
"path": "nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/service/extension/ExtensionService.java",
"license": "apache-2.0",
"size": 10237
} | [
"org.apache.nifi.registry.extension.bundle.BundleVersion",
"org.apache.nifi.registry.extension.component.manifest.Extension"
] | import org.apache.nifi.registry.extension.bundle.BundleVersion; import org.apache.nifi.registry.extension.component.manifest.Extension; | import org.apache.nifi.registry.extension.bundle.*; import org.apache.nifi.registry.extension.component.manifest.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 2,309,978 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ComputePolicyInner> listByAccountAsync(String resourceGroupName, String accountName) {
return new PagedFlux<>(
() -> listByAccountSinglePageAsync(resourceGroupName, accountName),
nextLink -> listByAccountNextSingle... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ComputePolicyInner> function(String resourceGroupName, String accountName) { return new PagedFlux<>( () -> listByAccountSinglePageAsync(resourceGroupName, accountName), nextLink -> listByAccountNextSinglePageAsync(nextLink)); } | /**
* Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account
* supports, at most, 50 policies.
*
* @param resourceGroupName The name of the Azure resource group.
* @param accountName The name of the Data Lake Analytics account.
* @throws... | Lists the Data Lake Analytics compute policies within the specified Data Lake Analytics account. An account supports, at most, 50 policies | listByAccountAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/src/main/java/com/azure/resourcemanager/datalakeanalytics/implementation/ComputePoliciesClientImpl.java",
"license": "mit",
"size": 57622
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.datalakeanalytics.fluent.models.ComputePolicyInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.datalakeanalytics.fluent.models.ComputePolicyInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.datalakeanalytics.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 890,454 |
public Capability findByObjectId(String objectId);
/**
* <p>
* Find and return a {@link Capability} by path, if any; otherwise, return <code>null</code>.
* </p>
*
* @param path
* Path to the requested {@link Capability} | Capability function(String objectId); /** * <p> * Find and return a {@link Capability} by path, if any; otherwise, return <code>null</code>. * </p> * * @param path * Path to the requested {@link Capability} | /**
* <p>
* Find and return a {@link Capability} by object id, if any; otherwise, return
* <code>null</code>.
* </p>
*/ | Find and return a <code>Capability</code> by object id, if any; otherwise, return <code>null</code>. | findByObjectId | {
"repo_name": "dCache/CDMI",
"path": "cdmi-core/src/main/java/org/snia/cdmiserver/dao/CapabilityDao.java",
"license": "bsd-3-clause",
"size": 2354
} | [
"org.snia.cdmiserver.model.Capability"
] | import org.snia.cdmiserver.model.Capability; | import org.snia.cdmiserver.model.*; | [
"org.snia.cdmiserver"
] | org.snia.cdmiserver; | 267,038 |
@Override
public void stop(BundleContext context) throws Exception {
logger.debug("db4o persistence bundle has been stopped.");
}
| void function(BundleContext context) throws Exception { logger.debug(STR); } | /**
* Called whenever the OSGi framework stops our bundle
*/ | Called whenever the OSGi framework stops our bundle | stop | {
"repo_name": "watou/openhab",
"path": "bundles/persistence/org.openhab.persistence.db4o/src/main/java/org/openhab/persistence/db4o/internal/Db4oActivator.java",
"license": "epl-1.0",
"size": 1135
} | [
"org.osgi.framework.BundleContext"
] | import org.osgi.framework.BundleContext; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 1,272,925 |
@Override
public void undoAction(UndoInterface undoRedoObject) {
if ((comboBox != null) && (undoRedoObject != null)) {
if (undoRedoObject.getOldValue() instanceof String) {
String oldValue = (String) undoRedoObject.getOldValue();
comboBox.setSelectValueKey(ol... | void function(UndoInterface undoRedoObject) { if ((comboBox != null) && (undoRedoObject != null)) { if (undoRedoObject.getOldValue() instanceof String) { String oldValue = (String) undoRedoObject.getOldValue(); comboBox.setSelectValueKey(oldValue); } } } | /**
* Undo action.
*
* @param undoRedoObject the undo/redo object
*/ | Undo action | undoAction | {
"repo_name": "robward-scisys/sldeditor",
"path": "modules/application/src/main/java/com/sldeditor/ui/detail/config/font/FieldConfigFont.java",
"license": "gpl-3.0",
"size": 12565
} | [
"com.sldeditor.common.undo.UndoInterface"
] | import com.sldeditor.common.undo.UndoInterface; | import com.sldeditor.common.undo.*; | [
"com.sldeditor.common"
] | com.sldeditor.common; | 345,339 |
private Object _readObject(DataInput in) throws IOException {
ObjectInputStream ois;
if (in instanceof ObjectInputStream) {
ois = (ObjectInputStream)in;
} else {
ois = new ObjectInputStream((DataInputStream)in);
}
try {
return ois.readObject();
} catch (ClassNotFoundException... | Object function(DataInput in) throws IOException { ObjectInputStream ois; if (in instanceof ObjectInputStream) { ois = (ObjectInputStream)in; } else { ois = new ObjectInputStream((DataInputStream)in); } try { return ois.readObject(); } catch (ClassNotFoundException e) { throw new IOException(e); } } | /**
* basic method for reading objects from a DataInput.
*/ | basic method for reading objects from a DataInput | _readObject | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "lgpl/gemfire-jgroups/src/main/java/com/gemstone/org/jgroups/stack/GFBasicAdapterImpl.java",
"license": "apache-2.0",
"size": 14088
} | [
"java.io.DataInput",
"java.io.DataInputStream",
"java.io.IOException",
"java.io.ObjectInputStream"
] | import java.io.DataInput; import java.io.DataInputStream; import java.io.IOException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,436,007 |
public void trace(String format, Object arg1, Object arg2) {
if (!logger.isTraceEnabled())
return;
if (instanceofLAL) {
String formattedMessage = MessageFormatter.format(format, arg1, arg2)
.getMessage();
((LocationAwareLogger) logger).log(null, fqcn,
LocationAwa... | void function(String format, Object arg1, Object arg2) { if (!logger.isTraceEnabled()) return; if (instanceofLAL) { String formattedMessage = MessageFormatter.format(format, arg1, arg2) .getMessage(); ((LocationAwareLogger) logger).log(null, fqcn, LocationAwareLogger.TRACE_INT, formattedMessage, new Object[] { arg1, ar... | /**
* Delegate to the appropriate method of the underlying logger.
*/ | Delegate to the appropriate method of the underlying logger | trace | {
"repo_name": "PRECISE/ROSLab",
"path": "lib/slf4j-1.7.10/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java",
"license": "apache-2.0",
"size": 28131
} | [
"org.slf4j.helpers.MessageFormatter",
"org.slf4j.spi.LocationAwareLogger"
] | import org.slf4j.helpers.MessageFormatter; import org.slf4j.spi.LocationAwareLogger; | import org.slf4j.helpers.*; import org.slf4j.spi.*; | [
"org.slf4j.helpers",
"org.slf4j.spi"
] | org.slf4j.helpers; org.slf4j.spi; | 719,003 |
public void getDisplacements(float[] val) {
if ( displacements == null ) {
displacements = (MFFloat)getField( "displacements" );
}
displacements.getValue( val );
} | void function(float[] val) { if ( displacements == null ) { displacements = (MFFloat)getField( STR ); } displacements.getValue( val ); } | /** Return the displacements value in the argument float[]
* @param val The float[] to initialize. */ | Return the displacements value in the argument float[] | getDisplacements | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/external/node/hanim/SAIHAnimDisplacer.java",
"license": "gpl-2.0",
"size": 3773
} | [
"org.web3d.x3d.sai.MFFloat"
] | import org.web3d.x3d.sai.MFFloat; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 615,268 |
List<Attribute> getAttributes(PerunSession sess, Resource resource) throws InternalErrorException; | List<Attribute> getAttributes(PerunSession sess, Resource resource) throws InternalErrorException; | /**
* Get all <b>non-empty</b> attributes associated with the resource.
*
* @param sess perun session
* @param resource resource to get the attributes from
* @return list of attributes
*
* @throws InternalErrorException if an exception raise in concrete implementation, the exception is wrapped in Internal... | Get all non-empty attributes associated with the resource | getAttributes | {
"repo_name": "Simcsa/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/AttributesManagerImplApi.java",
"license": "bsd-2-clause",
"size": 98325
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Resource",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 2,424,569 |
public DataForm getDataFormToSend() {
if (isSubmitType()) {
// Create a new DataForm that contains only the answered fields
DataForm dataFormToSend = new DataForm(getType());
for(FormField field : getFields()) {
if (!field.getValues().isEmpty()) {
... | DataForm function() { if (isSubmitType()) { DataForm dataFormToSend = new DataForm(getType()); for(FormField field : getFields()) { if (!field.getValues().isEmpty()) { dataFormToSend.addField(field); } } return dataFormToSend; } return dataForm; } | /**
* Returns a DataForm that serves to send this Form to the server. If the form is of type
* submit, it may contain fields with no value. These fields will be removed since they only
* exist to assist the user while editing/completing the form in a UI.
*
* @return the wrapped DataForm.
... | Returns a DataForm that serves to send this Form to the server. If the form is of type submit, it may contain fields with no value. These fields will be removed since they only exist to assist the user while editing/completing the form in a UI | getDataFormToSend | {
"repo_name": "ayne/Smack",
"path": "smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/Form.java",
"license": "apache-2.0",
"size": 20749
} | [
"org.jivesoftware.smackx.xdata.packet.DataForm"
] | import org.jivesoftware.smackx.xdata.packet.DataForm; | import org.jivesoftware.smackx.xdata.packet.*; | [
"org.jivesoftware.smackx"
] | org.jivesoftware.smackx; | 1,837,336 |
public Engine.IndexCommitRef acquireIndexCommit(boolean flushFirst) throws EngineException {
IndexShardState state = this.state; // one time volatile read
// we allow snapshot on closed index shard, since we want to do one after we close the shard and before we close the engine
if (state == ... | Engine.IndexCommitRef function(boolean flushFirst) throws EngineException { IndexShardState state = this.state; if (state == IndexShardState.STARTED state == IndexShardState.RELOCATED state == IndexShardState.CLOSED) { return getEngine().acquireIndexCommit(flushFirst); } else { throw new IllegalIndexShardStateException... | /**
* Creates a new {@link IndexCommit} snapshot form the currently running engine. All resources referenced by this
* commit won't be freed until the commit / snapshot is closed.
*
* @param flushFirst <code>true</code> if the index should first be flushed to disk / a low level lucene commit should ... | Creates a new <code>IndexCommit</code> snapshot form the currently running engine. All resources referenced by this commit won't be freed until the commit / snapshot is closed | acquireIndexCommit | {
"repo_name": "mohit/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java",
"license": "apache-2.0",
"size": 118888
} | [
"org.elasticsearch.index.engine.Engine",
"org.elasticsearch.index.engine.EngineException"
] | import org.elasticsearch.index.engine.Engine; import org.elasticsearch.index.engine.EngineException; | import org.elasticsearch.index.engine.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 649,835 |
private static Map<String, String> convertAdHocMonomersIntoSMILES(Map<String, String> monomersList) throws HELM1FormatException, ChemistryException {
Map<String, String> convert = new HashMap<String, String>();
try {
for (Map.Entry<String, String> element : monomersList.entrySet()) {
Monom... | static Map<String, String> function(Map<String, String> monomersList) throws HELM1FormatException, ChemistryException { Map<String, String> convert = new HashMap<String, String>(); try { for (Map.Entry<String, String> element : monomersList.entrySet()) { Monomer m; m = MonomerFactory.getInstance().getMonomerStore().get... | /**
* method to translate/convert the adhocMonomers into valid SMILES
*
* @param monomersList Map of adhocMonomers with the type and the alternate
* monomer id SMILES
* @return Map of adhocMonomers with the monomer alternate id and the
* appropriate SMILES
* @throws HELM1For... | method to translate/convert the adhocMonomers into valid SMILES | convertAdHocMonomersIntoSMILES | {
"repo_name": "PistoiaHELM/HELM2NotationToolkit",
"path": "src/main/java/org/helm/notation2/tools/HELM1Utils.java",
"license": "mit",
"size": 19597
} | [
"java.util.HashMap",
"java.util.Map",
"org.helm.chemtoolkit.AbstractChemistryManipulator",
"org.helm.chemtoolkit.CTKException",
"org.helm.notation2.Chemistry",
"org.helm.notation2.Monomer",
"org.helm.notation2.MonomerFactory",
"org.helm.notation2.exception.ChemistryException",
"org.helm.notation2.ex... | import java.util.HashMap; import java.util.Map; import org.helm.chemtoolkit.AbstractChemistryManipulator; import org.helm.chemtoolkit.CTKException; import org.helm.notation2.Chemistry; import org.helm.notation2.Monomer; import org.helm.notation2.MonomerFactory; import org.helm.notation2.exception.ChemistryException; im... | import java.util.*; import org.helm.chemtoolkit.*; import org.helm.notation2.*; import org.helm.notation2.exception.*; | [
"java.util",
"org.helm.chemtoolkit",
"org.helm.notation2"
] | java.util; org.helm.chemtoolkit; org.helm.notation2; | 2,337,607 |
private String getHostPageBaseURL(String refHostPageBaseURL){
String returnStr = "";
//filter for development use
if(refHostPageBaseURL.contains(Environment.contextPath)){
returnStr = Environment.contextPath;
}
return returnStr;
} | String function(String refHostPageBaseURL){ String returnStr = ""; if(refHostPageBaseURL.contains(Environment.contextPath)){ returnStr = Environment.contextPath; } return returnStr; } | /**
* get the main url for rpc call path
* @param refHostPageBaseURL url prefix of the hosted page
*/ | get the main url for rpc call path | getHostPageBaseURL | {
"repo_name": "simplelist/ShanWoXing",
"path": "gwt-src/com/yxtar/app/base/activity/BaseRPCEngine.java",
"license": "gpl-2.0",
"size": 1398
} | [
"com.yxtar.app.base.environment.Environment"
] | import com.yxtar.app.base.environment.Environment; | import com.yxtar.app.base.environment.*; | [
"com.yxtar.app"
] | com.yxtar.app; | 940,069 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.