method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static SqlValidatorNamespace lookup(
SqlValidatorScope scope,
List<String> names) {
assert names.size() > 0;
final SqlNameMatcher nameMatcher =
scope.getValidator().getCatalogReader().nameMatcher();
final SqlValidatorScope.ResolvedImpl resolved =
new SqlValidatorScope.Re... | static SqlValidatorNamespace function( SqlValidatorScope scope, List<String> names) { assert names.size() > 0; final SqlNameMatcher nameMatcher = scope.getValidator().getCatalogReader().nameMatcher(); final SqlValidatorScope.ResolvedImpl resolved = new SqlValidatorScope.ResolvedImpl(); scope.resolve(ImmutableList.of(na... | /**
* Resolves a multi-part identifier such as "SCHEMA.EMP.EMPNO" to a
* namespace. The returned namespace, never null, may represent a
* schema, table, column, etc.
*/ | Resolves a multi-part identifier such as "SCHEMA.EMP.EMPNO" to a namespace. The returned namespace, never null, may represent a schema, table, column, etc | lookup | {
"repo_name": "arina-ielchiieva/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorUtil.java",
"license": "apache-2.0",
"size": 42227
} | [
"com.google.common.collect.ImmutableList",
"java.util.List",
"org.apache.calcite.util.Util"
] | import com.google.common.collect.ImmutableList; import java.util.List; import org.apache.calcite.util.Util; | import com.google.common.collect.*; import java.util.*; import org.apache.calcite.util.*; | [
"com.google.common",
"java.util",
"org.apache.calcite"
] | com.google.common; java.util; org.apache.calcite; | 845,648 |
public static <T> void saveDataToFile(File file, T data) throws FileNotFoundException, JAXBException {
assert file != null;
assert data != null;
if (!file.exists()) {
throw new FileNotFoundException("File not found : " + file.getAbsolutePath());
}
JAXBContext c... | static <T> void function(File file, T data) throws FileNotFoundException, JAXBException { assert file != null; assert data != null; if (!file.exists()) { throw new FileNotFoundException(STR + file.getAbsolutePath()); } JAXBContext context = JAXBContext.newInstance(data.getClass()); Marshaller m = context.createMarshall... | /**
* Saves the data in the file in xml format.
*
* @param file Points to a valid xml file containing data that match the {@code classToConvert}.
* Cannot be null.
* @throws FileNotFoundException Thrown if the file is missing.
* @throws JAXBException Thrown if there is ... | Saves the data in the file in xml format | saveDataToFile | {
"repo_name": "CS2103JAN2017-W13-B4/main",
"path": "src/main/java/seedu/doist/commons/util/XmlUtil.java",
"license": "mit",
"size": 2389
} | [
"java.io.File",
"java.io.FileNotFoundException",
"javax.xml.bind.JAXBContext",
"javax.xml.bind.JAXBException",
"javax.xml.bind.Marshaller"
] | import java.io.File; import java.io.FileNotFoundException; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 733,062 |
public ServiceResponse<String> getNotProvided() throws ErrorException, IOException {
Call<ResponseBody> call = service.getNotProvided();
return getNotProvidedDelegate(call.execute());
} | ServiceResponse<String> function() throws ErrorException, IOException { Call<ResponseBody> call = service.getNotProvided(); return getNotProvidedDelegate(call.execute()); } | /**
* Get String value when no string value is sent in response payload.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the String object wrapped in {@link ServiceResponse} if successful.
*/ | Get String value when no string value is sent in response payload | getNotProvided | {
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodystring/implementation/StringsImpl.java",
"license": "mit",
"size": 36590
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,013,423 |
public MultiPercolateRequest add(BytesReference data, boolean contentUnsafe, boolean allowExplicitIndex) throws Exception {
XContent xContent = XContentFactory.xContent(data);
int from = 0;
int length = data.length();
byte marker = xContent.streamSeparator();
while (true) {
... | MultiPercolateRequest function(BytesReference data, boolean contentUnsafe, boolean allowExplicitIndex) throws Exception { XContent xContent = XContentFactory.xContent(data); int from = 0; int length = data.length(); byte marker = xContent.streamSeparator(); while (true) { int nextMarker = findNextMarker(marker, from, d... | /**
* Embeds a percolate request which request body is defined as raw bytes to this multi percolate request
*/ | Embeds a percolate request which request body is defined as raw bytes to this multi percolate request | add | {
"repo_name": "dantuffery/elasticsearch",
"path": "src/main/java/org/elasticsearch/action/percolate/MultiPercolateRequest.java",
"license": "apache-2.0",
"size": 19520
} | [
"org.elasticsearch.ElasticsearchParseException",
"org.elasticsearch.action.support.IndicesOptions",
"org.elasticsearch.common.bytes.BytesReference",
"org.elasticsearch.common.xcontent.XContent",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.common.xcontent.XContentParser"
] | import org.elasticsearch.ElasticsearchParseException; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XConte... | import org.elasticsearch.*; import org.elasticsearch.action.support.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*; | [
"org.elasticsearch",
"org.elasticsearch.action",
"org.elasticsearch.common"
] | org.elasticsearch; org.elasticsearch.action; org.elasticsearch.common; | 2,162,311 |
FeatureStructure getSofaDataArray(); | FeatureStructure getSofaDataArray(); | /**
* Get the Sofa data array.
*
* @return The Sofa Data being analyzed.
*/ | Get the Sofa data array | getSofaDataArray | {
"repo_name": "apache/uima-uimaj",
"path": "uimaj-core/src/main/java/org/apache/uima/jcas/JCas.java",
"license": "apache-2.0",
"size": 40863
} | [
"org.apache.uima.cas.FeatureStructure"
] | import org.apache.uima.cas.FeatureStructure; | import org.apache.uima.cas.*; | [
"org.apache.uima"
] | org.apache.uima; | 1,370,804 |
public Graphics2D getDrawingArea() {
// try {
// synchronized (lock) {
// wait until there is something to read
// while (bi == null) {
// log.debug(" bi = null ");
// lock.wait();
// }
// we have the lock and state we're seeking
// ch... | Graphics2D function() { Graphics2D g2; g2 = bi.createGraphics(); return g2; } | /**
* Returns a pointer to the graphics area that we can draw on
*/ | Returns a pointer to the graphics area that we can draw on | getDrawingArea | {
"repo_name": "zenovalle/tn5250j",
"path": "src/org/tn5250j/GuiGraphicBuffer.java",
"license": "gpl-2.0",
"size": 53856
} | [
"java.awt.Graphics2D"
] | import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,102,885 |
for (final INaviView view : views) {
try {
view.getConfiguration().untagView(tag);
} catch (final CouldntSaveDataException exception) {
CUtilityFunctions.logException(exception);
}
}
} | for (final INaviView view : views) { try { view.getConfiguration().untagView(tag); } catch (final CouldntSaveDataException exception) { CUtilityFunctions.logException(exception); } } } | /**
* Removes a given tag from a list of views.
*
* @param views The views from which the tag is removed.
* @param tag The tag to remove.
*/ | Removes a given tag from a list of views | removeTags | {
"repo_name": "dgrif/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Gui/MainWindow/Implementations/CViewFunctions.java",
"license": "apache-2.0",
"size": 6365
} | [
"com.google.security.zynamics.binnavi.CUtilityFunctions",
"com.google.security.zynamics.binnavi.Database",
"com.google.security.zynamics.binnavi.disassembly.views.INaviView"
] | import com.google.security.zynamics.binnavi.CUtilityFunctions; import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.disassembly.views.INaviView; | import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.disassembly.views.*; | [
"com.google.security"
] | com.google.security; | 556,157 |
public void testData() throws Exception {
Session session = null; // TODO mock this and add expected return
String query = "SELECT n.fullname, count(*) as total"
+ " FROM newsgroup n, newsgroup_topic as nt, message m "
+ " where nt.topic_id = m.topic_id " + " and n.newsgroup_id = nt.newsgrou... | void function() throws Exception { Session session = null; String query = STR + STR + STR + STR + STR + STR; try { this.helper.getListResults(query, NewsGroup.class, this.session); } catch (Exception e) { fail("ERROR" + e.getMessage()); e.printStackTrace(); } System.out.println("OK"); } | /**
* Test data (old).
*/ | Test data (old) | testData | {
"repo_name": "eltonnuness/unison",
"path": "src/test/java/uk/co/sleonard/unison/datahandling/HibernateHelperTest.java",
"license": "apache-2.0",
"size": 10148
} | [
"org.hibernate.Session",
"org.junit.Assert",
"uk.co.sleonard.unison.datahandling.DAO"
] | import org.hibernate.Session; import org.junit.Assert; import uk.co.sleonard.unison.datahandling.DAO; | import org.hibernate.*; import org.junit.*; import uk.co.sleonard.unison.datahandling.*; | [
"org.hibernate",
"org.junit",
"uk.co.sleonard"
] | org.hibernate; org.junit; uk.co.sleonard; | 1,988,608 |
@Async
private Future<List<CitationRecord>> readCitations(String query, int cntOfCitations) throws IOException {
List<CitationRecord> records = new ArrayList<>();
String url = Constants.GOOGLE_SCHOLAR_BASE_URL + query;
Document htmlDoc = getHtmlDocument(url);
for (int page = 0; (page * 10) < cntOfCitations... | Future<List<CitationRecord>> function(String query, int cntOfCitations) throws IOException { List<CitationRecord> records = new ArrayList<>(); String url = Constants.GOOGLE_SCHOLAR_BASE_URL + query; Document htmlDoc = getHtmlDocument(url); for (int page = 0; (page * 10) < cntOfCitations; page++) { Elements citations = ... | /**
* Think about paging
*
* @param query
* @return
* @throws IOException
*/ | Think about paging | readCitations | {
"repo_name": "Alexander10/spring-boot-angularjs-starter",
"path": "src/main/java/org/ban/google_scholar/GoogleScholarCitationReaderService.java",
"license": "mit",
"size": 3648
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.Future",
"org.jsoup.nodes.Document",
"org.jsoup.nodes.Element",
"org.jsoup.select.Elements",
"org.springframework.scheduling.annotation.AsyncResult"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Future; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import org.springframework.scheduling.annotation.AsyncResult; | import java.io.*; import java.util.*; import java.util.concurrent.*; import org.jsoup.nodes.*; import org.jsoup.select.*; import org.springframework.scheduling.annotation.*; | [
"java.io",
"java.util",
"org.jsoup.nodes",
"org.jsoup.select",
"org.springframework.scheduling"
] | java.io; java.util; org.jsoup.nodes; org.jsoup.select; org.springframework.scheduling; | 1,208,838 |
if ("true"
.equals(getProperties().getProperty("clientbuffering", "false"))) {
this.clientSideBuffering = true;
}
if (getProperties().containsKey("writebuffersize")) {
writeBufferSize =
Long.parseLong(getProperties().getProperty("writebuffersize"));
}
if (getProperties().g... | if ("true" .equals(getProperties().getProperty(STR, "false"))) { this.clientSideBuffering = true; } if (getProperties().containsKey(STR)) { writeBufferSize = Long.parseLong(getProperties().getProperty(STR)); } if (getProperties().getProperty(STR) != null) { this.durability = Durability.valueOf(getProperties().getProper... | /**
* Initialize any state for this DB. Called once per DB instance; there is one
* DB instance per client thread.
*/ | Initialize any state for this DB. Called once per DB instance; there is one DB instance per client thread | init | {
"repo_name": "ChristianNavolskyi/YCSB",
"path": "hbase10/src/main/java/com/yahoo/ycsb/db/HBaseClient10.java",
"license": "apache-2.0",
"size": 17436
} | [
"com.yahoo.ycsb.DBException",
"java.io.IOException",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.client.Admin",
"org.apache.hadoop.hbase.client.ConnectionFactory",
"org.apache.hadoop.hbase.client.Durability",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.security.UserGroup... | import com.yahoo.ycsb.DBException; import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.ConnectionFactory; import org.apache.hadoop.hbase.client.Durability; import org.apache.hadoop.hbase.util.Bytes; import org.apache.ha... | import com.yahoo.ycsb.*; import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.security.*; | [
"com.yahoo.ycsb",
"java.io",
"org.apache.hadoop"
] | com.yahoo.ycsb; java.io; org.apache.hadoop; | 801,139 |
public static void reduceOpenFiles(IndexWriter w) {
// keep number of open files lowish
MergePolicy mp = w.getConfig().getMergePolicy();
if (mp instanceof LogMergePolicy) {
LogMergePolicy lmp = (LogMergePolicy) mp;
lmp.setMergeFactor(Math.min(5, lmp.getMergeFactor()));
lmp.setNoCFSRatio(... | static void function(IndexWriter w) { MergePolicy mp = w.getConfig().getMergePolicy(); if (mp instanceof LogMergePolicy) { LogMergePolicy lmp = (LogMergePolicy) mp; lmp.setMergeFactor(Math.min(5, lmp.getMergeFactor())); lmp.setNoCFSRatio(1.0); } else if (mp instanceof TieredMergePolicy) { TieredMergePolicy tmp = (Tiere... | /** just tries to configure things to keep the open file
* count lowish */ | just tries to configure things to keep the open file | reduceOpenFiles | {
"repo_name": "zhangdian/solr4.6.0",
"path": "lucene/test-framework/src/java/org/apache/lucene/util/_TestUtil.java",
"license": "apache-2.0",
"size": 42658
} | [
"org.apache.lucene.index.ConcurrentMergeScheduler",
"org.apache.lucene.index.IndexWriter",
"org.apache.lucene.index.LogMergePolicy",
"org.apache.lucene.index.MergePolicy",
"org.apache.lucene.index.MergeScheduler",
"org.apache.lucene.index.TieredMergePolicy"
] | import org.apache.lucene.index.ConcurrentMergeScheduler; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.LogMergePolicy; import org.apache.lucene.index.MergePolicy; import org.apache.lucene.index.MergeScheduler; import org.apache.lucene.index.TieredMergePolicy; | import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 1,807,474 |
public TimeValue timeout() {
return timeout;
} | TimeValue function() { return timeout; } | /**
* Timeout to wait for the index deletion to be acknowledged by current cluster nodes. Defaults
* to <tt>10s</tt>.
*/ | Timeout to wait for the index deletion to be acknowledged by current cluster nodes. Defaults to 10s | timeout | {
"repo_name": "uboness/elasticsearch",
"path": "src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequest.java",
"license": "apache-2.0",
"size": 4268
} | [
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,699,497 |
HiveTableDatasource ensureHiveTableDatasource(String datasetName, String descr, String databaseName, String tableName); | HiveTableDatasource ensureHiveTableDatasource(String datasetName, String descr, String databaseName, String tableName); | /**
* gets, or creates, a table in hive to use a data source
*
* @param datasetName the dataset name
* @param descr a description for the data source
* @param databaseName the database name where the table (will) reside(s)
* @param tableName the name of the table
* @return ... | gets, or creates, a table in hive to use a data source | ensureHiveTableDatasource | {
"repo_name": "claudiu-stanciu/kylo",
"path": "integrations/nifi/nifi-nar-bundles/nifi-standard-services/nifi-core-service-api/src/main/java/com/thinkbiganalytics/nifi/core/api/metadata/MetadataProvider.java",
"license": "apache-2.0",
"size": 8175
} | [
"com.thinkbiganalytics.metadata.rest.model.data.HiveTableDatasource"
] | import com.thinkbiganalytics.metadata.rest.model.data.HiveTableDatasource; | import com.thinkbiganalytics.metadata.rest.model.data.*; | [
"com.thinkbiganalytics.metadata"
] | com.thinkbiganalytics.metadata; | 871,553 |
public static String getThrowableOrigin(Throwable throwable) {
StackTraceElement[] stack = throwable.getStackTrace();
Preconditions.checkState(stack.length > 0);
StackTraceElement element = stack[0];
return element.toString();
} | static String function(Throwable throwable) { StackTraceElement[] stack = throwable.getStackTrace(); Preconditions.checkState(stack.length > 0); StackTraceElement element = stack[0]; return element.toString(); } | /**
* Returns string representing class, method, filename and line number that throwable was thrown
* from
*/ | Returns string representing class, method, filename and line number that throwable was thrown from | getThrowableOrigin | {
"repo_name": "marcinkwiatkowski/buck",
"path": "src/com/facebook/buck/util/MoreThrowables.java",
"license": "apache-2.0",
"size": 3191
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,680 |
IOFSwitch getOFSwitchInstance(OFDescriptionStatistics desc) {
return driverRegistry.getOFSwitchInstance(desc);
} | IOFSwitch getOFSwitchInstance(OFDescriptionStatistics desc) { return driverRegistry.getOFSwitchInstance(desc); } | /**
* Forward to the registry to get an IOFSwitch instance.
* @param desc
* @return
*/ | Forward to the registry to get an IOFSwitch instance | getOFSwitchInstance | {
"repo_name": "Syn-Flow/Controller",
"path": "src/main/java/net/floodlightcontroller/core/internal/Controller.java",
"license": "apache-2.0",
"size": 116474
} | [
"net.floodlightcontroller.core.IOFSwitch",
"org.openflow.protocol.statistics.OFDescriptionStatistics"
] | import net.floodlightcontroller.core.IOFSwitch; import org.openflow.protocol.statistics.OFDescriptionStatistics; | import net.floodlightcontroller.core.*; import org.openflow.protocol.statistics.*; | [
"net.floodlightcontroller.core",
"org.openflow.protocol"
] | net.floodlightcontroller.core; org.openflow.protocol; | 332,352 |
public static Map createProxyAttributes(int x, int y)
{
return createProxyAttributes(x, y, false);
} | static Map function(int x, int y) { return createProxyAttributes(x, y, false); } | /**
* Centralized creation of an attribute map for graph cells that represent
* the ConfigElement for a device proxy. Internally, this makes use of
* <code>createProxyAttributes(int,int,boolean)</code>. It is invoked
* with its <code>autoSize</code> parameter set to true.
*
* @param x the x-c... | Centralized creation of an attribute map for graph cells that represent the ConfigElement for a device proxy. Internally, this makes use of <code>createProxyAttributes(int,int,boolean)</code>. It is invoked with its <code>autoSize</code> parameter set to true | createProxyAttributes | {
"repo_name": "vrjuggler/vrjuggler",
"path": "modules/vrjuggler/vrjconfig/commoneditors/org/vrjuggler/vrjconfig/commoneditors/DeviceGraph.java",
"license": "lgpl-2.1",
"size": 9304
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,303,266 |
public Instance createInstance(Instance scene) {
String id = identifierGenerator.getInstanceIdentifier();
Instance instance = new Instance(id, scene, this);
return instance;
}
| Instance function(Instance scene) { String id = identifierGenerator.getInstanceIdentifier(); Instance instance = new Instance(id, scene, this); return instance; } | /**
* Creates a new Instance, unique for this database
*
* @return
*/ | Creates a new Instance, unique for this database | createInstance | {
"repo_name": "Xapagy/Xapagy",
"path": "src/main/java/org/xapagy/agents/Agent.java",
"license": "agpl-3.0",
"size": 14439
} | [
"org.xapagy.instances.Instance"
] | import org.xapagy.instances.Instance; | import org.xapagy.instances.*; | [
"org.xapagy.instances"
] | org.xapagy.instances; | 195,297 |
void addCollectionToSingletonOutput(
PCollection<?> inputValue, String outputName, PCollectionView<?> outputValue);
} | void addCollectionToSingletonOutput( PCollection<?> inputValue, String outputName, PCollectionView<?> outputValue); } | /**
* Adds an output to this {@code CollectionToSingleton} Dataflow step, consuming the specified
* input {@code PValue} and producing the specified output {@code PValue}. This step requires
* special treatment for its output encoding. Returns a pipeline level unique id.
*/ | Adds an output to this CollectionToSingleton Dataflow step, consuming the specified input PValue and producing the specified output PValue. This step requires special treatment for its output encoding. Returns a pipeline level unique id | addCollectionToSingletonOutput | {
"repo_name": "iemejia/incubator-beam",
"path": "runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/TransformTranslator.java",
"license": "apache-2.0",
"size": 6406
} | [
"org.apache.beam.sdk.values.PCollection",
"org.apache.beam.sdk.values.PCollectionView"
] | import org.apache.beam.sdk.values.PCollection; import org.apache.beam.sdk.values.PCollectionView; | import org.apache.beam.sdk.values.*; | [
"org.apache.beam"
] | org.apache.beam; | 722,582 |
public String getDropColumnStatement(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon)
{
// This is not possible in LucidDB...
return null;
} | String function(String tablename, ValueMetaInterface v, String tk, boolean use_autoinc, String pk, boolean semicolon) { return null; } | /**
* Generates the SQL statement to drop a column from the specified table
* @param tablename The table to add
* @param v The column defined as a value
* @param tk the name of the technical key field
* @param use_autoinc whether or not this field uses auto increment
* @param pk the name of the primary key ... | Generates the SQL statement to drop a column from the specified table | getDropColumnStatement | {
"repo_name": "icholy/geokettle-2.0",
"path": "src-db/org/pentaho/di/core/database/LucidDBDatabaseMeta.java",
"license": "lgpl-2.1",
"size": 12783
} | [
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 418,995 |
@Test
public void testIsLoadedFalse() {
services.isLoaded();
verify(unloaded).isLoaded();
} | void function() { services.isLoaded(); verify(unloaded).isLoaded(); } | /**
* Tests the strategy delegation of {@link IEditorServices#isLoaded()} as well as the unloaded
* return value (false).
*/ | Tests the strategy delegation of <code>IEditorServices#isLoaded()</code> as well as the unloaded return value (false) | testIsLoadedFalse | {
"repo_name": "spoofax-shell-2017/spoofax-shell",
"path": "org.metaborg.spoofax.shell.core/src/test/java/org/metaborg/spoofax/shell/services/SpoofaxEditorServicesTest.java",
"license": "apache-2.0",
"size": 3352
} | [
"org.mockito.Mockito"
] | import org.mockito.Mockito; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 1,687,554 |
public static synchronized KeyStoreTopComponent findInstance() {
TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID);
if (win == null) {
ErrorManager.getDefault().log(ErrorManager.WARNING, "Cannot find KeyStore component. It will not be located properly in the... | static synchronized KeyStoreTopComponent function() { TopComponent win = WindowManager.getDefault().findTopComponent(PREFERRED_ID); if (win == null) { ErrorManager.getDefault().log(ErrorManager.WARNING, STR); return getDefault(); } if (win instanceof KeyStoreTopComponent) { return (KeyStoreTopComponent)win; } ErrorMana... | /**
* Obtain the KeyStoreTopComponent instance. Never call {@link #getDefault} directly!
*/ | Obtain the KeyStoreTopComponent instance. Never call <code>#getDefault</code> directly | findInstance | {
"repo_name": "bernhardhuber/netbeansplugins",
"path": "nb-keytool/src/org/huber/keytool/KeyStoreTopComponent.java",
"license": "apache-2.0",
"size": 17469
} | [
"org.openide.ErrorManager",
"org.openide.windows.TopComponent",
"org.openide.windows.WindowManager"
] | import org.openide.ErrorManager; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; | import org.openide.*; import org.openide.windows.*; | [
"org.openide",
"org.openide.windows"
] | org.openide; org.openide.windows; | 2,236,580 |
private static void list(WebDavClient client, PrintStream out)
throws IOException {
out.print("C | ");
out.print("CONTENT TYPE | ");
out.print("CREATED | ");
out.print("MODIFIED | ");
out.print("SIZE | ");
out.println("NAME ");
... | static void function(WebDavClient client, PrintStream out) throws IOException { out.print(STR); out.print(STR); out.print(STR); out.print(STR); out.print(STR); out.println(STR); for (Iterator iterator = client.iterator(); iterator.hasNext() ; ) { final StringBuffer buffer = new StringBuffer(); String child = (String) i... | /**
* <p>Pseudo-nicely display a list of the children of a collection</p>
*/ | Pseudo-nicely display a list of the children of a collection | list | {
"repo_name": "dkulp/couldit-autoexport",
"path": "src/main/java/it/could/util/http/WebDavClient.java",
"license": "bsd-3-clause",
"size": 38649
} | [
"java.io.IOException",
"java.io.PrintStream",
"java.util.Iterator"
] | import java.io.IOException; import java.io.PrintStream; import java.util.Iterator; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 700,949 |
public DataNode setDistance(IDataset distance); | DataNode function(IDataset distance); | /**
* Distance of monitor from sample
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_LENGTH
* </p>
*
* @param distance the distance
*/ | Distance of monitor from sample Type: NX_FLOAT Units: NX_LENGTH | setDistance | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXmonitor.java",
"license": "epl-1.0",
"size": 16108
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode",
"org.eclipse.january.dataset.IDataset"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.january.dataset.IDataset; | import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.january.dataset.*; | [
"org.eclipse.dawnsci",
"org.eclipse.january"
] | org.eclipse.dawnsci; org.eclipse.january; | 2,513,681 |
protected Object writeReplace() throws java.io.ObjectStreamException {
return new DatasetSerializer(this);
}
//used by toBufferedImage()
private final static ColorSpace sRGB = ColorSpace
.getInstance(ColorSpace.CS_sRGB);
//used by toBufferedImage()
private final static Imag... | Object function() throws java.io.ObjectStreamException { return new DatasetSerializer(this); } private final static ColorSpace sRGB = ColorSpace .getInstance(ColorSpace.CS_sRGB); private final static ImageTypeSpecifier RGB_PLANE = ImageTypeSpecifier .createBanded(sRGB, new int[] { 0, 1, 2}, new int[] { 0, 0, 0}, DataBu... | /**
* Description of the Method
*
* @return Description of the Return Value
* @exception java.io.ObjectStreamException Description of the Exception
*/ | Description of the Method | writeReplace | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4che14/tags/DCM4JBOSS_2_7_6/src/java/org/dcm4cheri/data/BaseDatasetImpl.java",
"license": "apache-2.0",
"size": 42953
} | [
"java.awt.color.ColorSpace",
"java.awt.image.DataBuffer",
"javax.imageio.ImageTypeSpecifier",
"org.dcm4che.data.DatasetSerializer"
] | import java.awt.color.ColorSpace; import java.awt.image.DataBuffer; import javax.imageio.ImageTypeSpecifier; import org.dcm4che.data.DatasetSerializer; | import java.awt.color.*; import java.awt.image.*; import javax.imageio.*; import org.dcm4che.data.*; | [
"java.awt",
"javax.imageio",
"org.dcm4che.data"
] | java.awt; javax.imageio; org.dcm4che.data; | 455,794 |
public Builder<K, V> orderKeysBy(Comparator<? super K> keyComparator) {
this.keyComparator = checkNotNull(keyComparator);
return this;
} | Builder<K, V> function(Comparator<? super K> keyComparator) { this.keyComparator = checkNotNull(keyComparator); return this; } | /**
* Specifies the ordering of the generated multimap's keys.
*
* @since 8.0
*/ | Specifies the ordering of the generated multimap's keys | orderKeysBy | {
"repo_name": "sensui/guava-libraries",
"path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableMultimap.java",
"license": "apache-2.0",
"size": 19527
} | [
"com.google.common.base.Preconditions",
"java.util.Comparator"
] | import com.google.common.base.Preconditions; import java.util.Comparator; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,615,951 |
public void report(Reporter reporter); | void function(Reporter reporter); | /**
* Report on the performance or state of the service.
*
* @param reporter
* the mechanism through which reporting is done
*/ | Report on the performance or state of the service | report | {
"repo_name": "holycrap872/green-solver",
"path": "green/src/za/ac/sun/cs/green/Service.java",
"license": "lgpl-3.0",
"size": 2227
} | [
"za.ac.sun.cs.green.util.Reporter"
] | import za.ac.sun.cs.green.util.Reporter; | import za.ac.sun.cs.green.util.*; | [
"za.ac.sun"
] | za.ac.sun; | 2,712,743 |
protected static void validateAndPrepareDirectories(final File sourceDirectory, final File targetDirectory) {
if (!sourceDirectory.canRead() || !sourceDirectory.isDirectory()) {
LOG.error(
"The source directory given for generation of reports doesn't exist or isn't a directory or... | static void function(final File sourceDirectory, final File targetDirectory) { if (!sourceDirectory.canRead() !sourceDirectory.isDirectory()) { LOG.error( STR); throw new IllegalArgumentException(STR); } targetDirectory.mkdirs(); if (!targetDirectory.canWrite() !targetDirectory.isDirectory()) { LOG.error(STR); throw ne... | /**
* DOCUMENT ME!
*
* @param sourceDirectory DOCUMENT ME!
* @param targetDirectory DOCUMENT ME!
*
* @throws IllegalArgumentException DOCUMENT ME!
*/ | DOCUMENT ME | validateAndPrepareDirectories | {
"repo_name": "cismet/report-generator",
"path": "src/main/java/de/cismet/custom/wrrl/reportgenerator/WRRLReportProvider.java",
"license": "lgpl-3.0",
"size": 10393
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,365,629 |
public static byte[] igniteUuidToBytes(IgniteUuid uuid) {
assert uuid != null;
byte[] out = new byte[24];
igniteUuidToBytes(uuid, out, 0);
return out;
} | static byte[] function(IgniteUuid uuid) { assert uuid != null; byte[] out = new byte[24]; igniteUuidToBytes(uuid, out, 0); return out; } | /**
* Converts GridUuid to bytes.
*
* @param uuid GridUuid to convert.
* @return Bytes.
*/ | Converts GridUuid to bytes | igniteUuidToBytes | {
"repo_name": "kromulan/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 298812
} | [
"org.apache.ignite.lang.IgniteUuid"
] | import org.apache.ignite.lang.IgniteUuid; | import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,316,283 |
List<ItemStack> complete(QuestData data, List<ItemStack> in); | List<ItemStack> complete(QuestData data, List<ItemStack> in); | /**
* Attempt to complete the request
*
* @param data
* quest data
* @param in
* items to turn in
* @return gift items or NULL if failed to complete
*/ | Attempt to complete the request | complete | {
"repo_name": "ToroCraft/ToroQuest",
"path": "src/main/java/net/torocraft/toroquest/civilization/quests/util/Quest.java",
"license": "gpl-3.0",
"size": 1300
} | [
"java.util.List",
"net.minecraft.item.ItemStack"
] | import java.util.List; import net.minecraft.item.ItemStack; | import java.util.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.item"
] | java.util; net.minecraft.item; | 1,529,230 |
protected static SummaryData getSummaryData() {
SummaryData entity = new SummaryData();
entity.setTotalPaymentsRequired(BigDecimal.ONE);
entity.setTotalInitialInterest(BigDecimal.ONE);
entity.setTotalPaymentsApplied(BigDecimal.ONE);
entity.setTotalBalance(BigDecimal.ONE);
... | static SummaryData function() { SummaryData entity = new SummaryData(); entity.setTotalPaymentsRequired(BigDecimal.ONE); entity.setTotalInitialInterest(BigDecimal.ONE); entity.setTotalPaymentsApplied(BigDecimal.ONE); entity.setTotalBalance(BigDecimal.ONE); return entity; } | /**
* Creates an instance of SummaryData.
*
* @return the SummaryData instance.
*/ | Creates an instance of SummaryData | getSummaryData | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/Batch_Processing/src/java/tests/gov/opm/scrd/BasePersistenceTests.java",
"license": "apache-2.0",
"size": 55754
} | [
"gov.opm.scrd.entities.application.SummaryData",
"java.math.BigDecimal"
] | import gov.opm.scrd.entities.application.SummaryData; import java.math.BigDecimal; | import gov.opm.scrd.entities.application.*; import java.math.*; | [
"gov.opm.scrd",
"java.math"
] | gov.opm.scrd; java.math; | 2,466,486 |
public static double populationVariance(final double[] values) {
return new Variance(false).evaluate(values);
} | static double function(final double[] values) { return new Variance(false).evaluate(values); } | /**
* Returns the <a href="http://en.wikibooks.org/wiki/Statistics/Summary/Variance">
* population variance</a> of the entries in the input array, or
* <code>Double.NaN</code> if the array is empty.
* <p>
* See {@link org.apache.commons.math3.stat.descriptive.moment.Variance} for
* details... | Returns the population variance of the entries in the input array, or <code>Double.NaN</code> if the array is empty. See <code>org.apache.commons.math3.stat.descriptive.moment.Variance</code> for details on the formula and computing algorithm. Returns 0 for a single-value (i.e. length = 1) sample. Throws <code>IllegalA... | populationVariance | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_20/src/main/java/org/apache/commons/math3/stat/StatUtils.java",
"license": "gpl-2.0",
"size": 33201
} | [
"org.apache.commons.math3.stat.descriptive.moment.Variance"
] | import org.apache.commons.math3.stat.descriptive.moment.Variance; | import org.apache.commons.math3.stat.descriptive.moment.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,904,855 |
public void addAll(T... items) {
ArrayList<T> values = this.mObjects;
for (T item : items) {
values.add(item);
}
this.mObjects = values;
} | void function(T... items) { ArrayList<T> values = this.mObjects; for (T item : items) { values.add(item); } this.mObjects = values; } | /**
* Adds the specified items at the end of the array.
*
* @param items
* The items to add at the end of the array.
*/ | Adds the specified items at the end of the array | addAll | {
"repo_name": "XueBaoPeng/ningxiaVideo",
"path": "app/src/main/java/org/sunger/net/ui/base/ArrayAdapter.java",
"license": "apache-2.0",
"size": 1643
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,132,370 |
protected PropertyFile resolvePropertyFile( String groupToken, String fileEncoding, boolean useJavaStyleUnicodeEscaping )
{
//
PropertyFile retval = null;
//
if ( groupToken != null )
{
//
Map<String, File> groupTokenToFileMap = this.fileGroup.getGroupTokenToFileMap();
... | PropertyFile function( String groupToken, String fileEncoding, boolean useJavaStyleUnicodeEscaping ) { PropertyFile retval = null; if ( groupToken != null ) { Map<String, File> groupTokenToFileMap = this.fileGroup.getGroupTokenToFileMap(); File file = groupTokenToFileMap.get( groupToken ); if ( file != null ) { retval ... | /**
* Resolves a {@link PropertyFile} for the given group token using the {@link FileGroup}.
*
* @param groupToken
* @param fileEncoding
* @param useJavaStyleUnicodeEscaping
* @return
*/ | Resolves a <code>PropertyFile</code> for the given group token using the <code>FileGroup</code> | resolvePropertyFile | {
"repo_name": "alexchiri/i18n-binder",
"path": "i18nbinder-core/src/main/java/org/omnaest/i18nbinder/grouping/FileGroupToPropertiesAdapter.java",
"license": "apache-2.0",
"size": 9697
} | [
"java.io.File",
"java.util.Map",
"org.omnaest.utils.propertyfile.PropertyFile"
] | import java.io.File; import java.util.Map; import org.omnaest.utils.propertyfile.PropertyFile; | import java.io.*; import java.util.*; import org.omnaest.utils.propertyfile.*; | [
"java.io",
"java.util",
"org.omnaest.utils"
] | java.io; java.util; org.omnaest.utils; | 2,741,855 |
@Override
public void done(CarbonMessage responseCmsg) {
if (responseCmsg != null) {
Map<String, Object> transportHeaders =
(Map<String, Object>) responseCmsg.getProperty(CamelMediationConstants.TRANSPORT_HEADERS);
if (transportHeaders ... | void function(CarbonMessage responseCmsg) { if (responseCmsg != null) { Map<String, Object> transportHeaders = (Map<String, Object>) responseCmsg.getProperty(CamelMediationConstants.TRANSPORT_HEADERS); if (transportHeaders != null) { transportHeaders.put(Exchange.HTTP_RESPONSE_CODE, responseCmsg.getProperty(CamelMediat... | /**
* Invoked when the backend response arrived.
*
* @param responseCmsg response carbon message.
*/ | Invoked when the backend response arrived | done | {
"repo_name": "bsenduran/camel-mediation",
"path": "component/src/main/java/org/wso2/carbon/camel/mediation/CamelMediationProducer.java",
"license": "apache-2.0",
"size": 5916
} | [
"java.util.Map",
"org.apache.camel.Exchange",
"org.apache.camel.Message",
"org.wso2.carbon.camel.mediation.common.CamelMediationConstants",
"org.wso2.carbon.messaging.CarbonMessage"
] | import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Message; import org.wso2.carbon.camel.mediation.common.CamelMediationConstants; import org.wso2.carbon.messaging.CarbonMessage; | import java.util.*; import org.apache.camel.*; import org.wso2.carbon.camel.mediation.common.*; import org.wso2.carbon.messaging.*; | [
"java.util",
"org.apache.camel",
"org.wso2.carbon"
] | java.util; org.apache.camel; org.wso2.carbon; | 2,692,943 |
public static Sprite decode(ByteBuffer buffer) {
buffer.position(buffer.limit() - 2);
int size = buffer.getShort() & 0xFFFF;
int[] offsetsX = new int[size];
int[] offsetsY = new int[size];
int[] subWidths = new int[size];
int[] subHeights = new int[size];
buffer.position(buffer.limit() - siz... | static Sprite function(ByteBuffer buffer) { buffer.position(buffer.limit() - 2); int size = buffer.getShort() & 0xFFFF; int[] offsetsX = new int[size]; int[] offsetsY = new int[size]; int[] subWidths = new int[size]; int[] subHeights = new int[size]; buffer.position(buffer.limit() - size * 8 - 7); int width = buffer.ge... | /**
* Decodes the {@link Sprite} from the specified {@link ByteBuffer}.
* @param buffer The buffer.
* @return The sprite.
*/ | Decodes the <code>Sprite</code> from the specified <code>ByteBuffer</code> | decode | {
"repo_name": "davidi2/mopar",
"path": "src/net/scapeemulator/cache/def/Sprite.java",
"license": "isc",
"size": 9371
} | [
"java.awt.image.BufferedImage",
"java.nio.ByteBuffer",
"net.scapeemulator.cache.util.ByteBufferUtils"
] | import java.awt.image.BufferedImage; import java.nio.ByteBuffer; import net.scapeemulator.cache.util.ByteBufferUtils; | import java.awt.image.*; import java.nio.*; import net.scapeemulator.cache.util.*; | [
"java.awt",
"java.nio",
"net.scapeemulator.cache"
] | java.awt; java.nio; net.scapeemulator.cache; | 2,241,323 |
public void keyReleased(KeyEvent e) {
search();
}
// ----------------------------------------
// DockedTabView Implementation
// ----------------------------------------
public static final String MENU_ITEM_KEY = "viewKeywords";
public static final String PROPERTY_KEY = "... | void function(KeyEvent e) { search(); } public static final String MENU_ITEM_KEY = STR; public static final String PROPERTY_KEY = STR; | /**
* Invoked when a key has been released.
*/ | Invoked when a key has been released | keyReleased | {
"repo_name": "toxeh/ExecuteQuery",
"path": "java/src/org/executequery/gui/keywords/KeywordsDockedPanel.java",
"license": "gpl-3.0",
"size": 15207
} | [
"java.awt.event.KeyEvent"
] | import java.awt.event.KeyEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,195,740 |
public boolean isPublic() {
if (!myIsFrameworkStyle) {
return true;
}
IAndroidTarget target = myConfiguration.getTarget();
if (target == null) {
LOG.error("Unable to get IAndroidTarget.");
return false;
}
AndroidTargetData androidTargetData = AndroidTargetData.getTargetData... | boolean function() { if (!myIsFrameworkStyle) { return true; } IAndroidTarget target = myConfiguration.getTarget(); if (target == null) { LOG.error(STR); return false; } AndroidTargetData androidTargetData = AndroidTargetData.getTargetData(target, myConfiguration.getModule()); if (androidTargetData == null) { LOG.error... | /**
* Returns whether this style is public.
*/ | Returns whether this style is public | isPublic | {
"repo_name": "consulo/consulo-android",
"path": "android/android/src/com/android/tools/idea/editors/theme/datamodels/ThemeEditorStyle.java",
"license": "apache-2.0",
"size": 17147
} | [
"com.android.resources.ResourceType",
"com.android.sdklib.IAndroidTarget",
"org.jetbrains.android.sdk.AndroidTargetData"
] | import com.android.resources.ResourceType; import com.android.sdklib.IAndroidTarget; import org.jetbrains.android.sdk.AndroidTargetData; | import com.android.resources.*; import com.android.sdklib.*; import org.jetbrains.android.sdk.*; | [
"com.android.resources",
"com.android.sdklib",
"org.jetbrains.android"
] | com.android.resources; com.android.sdklib; org.jetbrains.android; | 977,042 |
protected Observation makeObservation(double x, double y) {
Observation currentObs = new Observation(1, 0, 0);
currentObs.intArray[0] = getState(x, y);
return currentObs;
} | Observation function(double x, double y) { Observation currentObs = new Observation(1, 0, 0); currentObs.intArray[0] = getState(x, y); return currentObs; } | /**
* As a hack for now, am actually putting together BOTH the integer and double
* state, just because the visualizer is dumb and I don't feel like writing
* custom messages right now.
* @param x
* @param y
* @return
*/ | As a hack for now, am actually putting together BOTH the integer and double state, just because the visualizer is dumb and I don't feel like writing custom messages right now | makeObservation | {
"repo_name": "chaostrigger/rl-library",
"path": "projects/packages/sutton-fall-2008-ai/oldPlan/gridWorldEnv/src/DiscreteGridWorld/DiscreteGridWorld.java",
"license": "apache-2.0",
"size": 8510
} | [
"org.rlcommunity.rlglue.codec.types.Observation"
] | import org.rlcommunity.rlglue.codec.types.Observation; | import org.rlcommunity.rlglue.codec.types.*; | [
"org.rlcommunity.rlglue"
] | org.rlcommunity.rlglue; | 515,437 |
public CommonGramsQueryFilter create(TokenStream input) {
CommonGramsFilter commonGrams = new CommonGramsFilter(luceneMatchVersion, input, commonWords,
ignoreCase);
CommonGramsQueryFilter commonGramsQuery = new CommonGramsQueryFilter(
commonGrams);
return commonGramsQuery;
} | CommonGramsQueryFilter function(TokenStream input) { CommonGramsFilter commonGrams = new CommonGramsFilter(luceneMatchVersion, input, commonWords, ignoreCase); CommonGramsQueryFilter commonGramsQuery = new CommonGramsQueryFilter( commonGrams); return commonGramsQuery; } | /**
* Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter
*/ | Create a CommonGramsFilter and wrap it with a CommonGramsQueryFilter | create | {
"repo_name": "Lythimus/lptv",
"path": "apache-solr-3.6.0/solr/core/src/java/org/apache/solr/analysis/CommonGramsQueryFilterFactory.java",
"license": "gpl-2.0",
"size": 3347
} | [
"org.apache.lucene.analysis.TokenStream"
] | import org.apache.lucene.analysis.TokenStream; | import org.apache.lucene.analysis.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 828,886 |
@Override
public boolean setProperty(String name, String value) {
final String selectorPoolName = "selectorPool.";
try {
if (name.startsWith(selectorPoolName)) {
return IntrospectionUtils.setProperty(selectorPool, name.substring(selectorPoolName.length()), value);
... | boolean function(String name, String value) { final String selectorPoolName = STR; try { if (name.startsWith(selectorPoolName)) { return IntrospectionUtils.setProperty(selectorPool, name.substring(selectorPoolName.length()), value); } else { return super.setProperty(name, value); } }catch ( Exception x ) { log.error(ST... | /**
* Generic properties, introspected
*/ | Generic properties, introspected | setProperty | {
"repo_name": "nrgaway/qubes-tools",
"path": "experimental/tomcat/apache-tomcat-8.0.15-src/java/org/apache/tomcat/util/net/NioEndpoint.java",
"license": "gpl-2.0",
"size": 62883
} | [
"org.apache.tomcat.util.IntrospectionUtils"
] | import org.apache.tomcat.util.IntrospectionUtils; | import org.apache.tomcat.util.*; | [
"org.apache.tomcat"
] | org.apache.tomcat; | 496,070 |
String thisMethod = "reconfigureServer";
Log.info(thisClass, thisMethod, "Starting server.xml update for: " + testName);
try {
if (newServerXml == null) {
Log.info(thisClass, thisMethod, "No new server xml specified for: " + server.getServerName() + " - skipping reconfig");
... | String thisMethod = STR; Log.info(thisClass, thisMethod, STR + testName); try { if (newServerXml == null) { Log.info(thisClass, thisMethod, STR + server.getServerName() + STR); return; } if (restartServer) { restartServer(newServerXml, testName, lastCheckApps, waitForMessages); return; } server.setMarkToEndOfLog(); Str... | /**
* Reconfigures the current server to use the new server configuration provided.
*
* @param newServerXml - Either an absolute path to a server config file or the name of the server config file to
* use under the server's configs/ directory
* @param testName
* @param waitForMe... | Reconfigures the current server to use the new server configuration provided | reconfigureServer | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.security.authentication.filter_fat/fat/src/com/ibm/ws/security/authentication/filter/fat/CommonTestHelper.java",
"license": "epl-1.0",
"size": 22508
} | [
"com.ibm.websphere.simplicity.log.Log",
"java.io.File"
] | import com.ibm.websphere.simplicity.log.Log; import java.io.File; | import com.ibm.websphere.simplicity.log.*; import java.io.*; | [
"com.ibm.websphere",
"java.io"
] | com.ibm.websphere; java.io; | 2,557,043 |
logger.info("test");
//Example from Dimaki's Non-parametrics notes. It should reject the null hypothesis and return true.
FlatDataCollection flatDataCollection = new FlatDataCollection(Arrays.asList(new Object[]{19.5,19.8,18.9,20.4,20.2,21.5,19.9,20.9,18.1,20.5,18.3,19.5,18.3,19.0,18.2,23.9,17.0,19.7,21... | logger.info("test"); FlatDataCollection flatDataCollection = new FlatDataCollection(Arrays.asList(new Object[]{19.5,19.8,18.9,20.4,20.2,21.5,19.9,20.9,18.1,20.5,18.3,19.5,18.3,19.0,18.2,23.9,17.0,19.7,21.7,19.5})); double median = 20.8; boolean is_twoTailed = true; double aLevel = 0.05; boolean expResult = true; boolea... | /**
* Test of test method, of class WilcoxonOneSample.
*/ | Test of test method, of class WilcoxonOneSample | testTest | {
"repo_name": "datumbox/datumbox-framework",
"path": "datumbox-framework-core/src/test/java/com/datumbox/framework/core/statistics/nonparametrics/onesample/WilcoxonOneSampleTest.java",
"license": "apache-2.0",
"size": 1833
} | [
"com.datumbox.framework.common.dataobjects.FlatDataCollection",
"java.util.Arrays",
"org.junit.Assert"
] | import com.datumbox.framework.common.dataobjects.FlatDataCollection; import java.util.Arrays; import org.junit.Assert; | import com.datumbox.framework.common.dataobjects.*; import java.util.*; import org.junit.*; | [
"com.datumbox.framework",
"java.util",
"org.junit"
] | com.datumbox.framework; java.util; org.junit; | 903,711 |
public void catching(Throwable throwable) {
if (instanceofLAL) {
((LocationAwareLogger) logger).log(CATCHING_MARKER, FQCN, LocationAwareLogger.ERROR_INT, "catching", null, throwable);
}
} | void function(Throwable throwable) { if (instanceofLAL) { ((LocationAwareLogger) logger).log(CATCHING_MARKER, FQCN, LocationAwareLogger.ERROR_INT, STR, null, throwable); } } | /**
* Log an exception being caught. The generated log event uses Level ERROR.
*
* @param throwable
* the exception being caught.
*/ | Log an exception being caught. The generated log event uses Level ERROR | catching | {
"repo_name": "geekboxzone/mmallow_external_slf4j",
"path": "slf4j-ext/src/main/java/org/slf4j/ext/XLogger.java",
"license": "mit",
"size": 7797
} | [
"org.slf4j.spi.LocationAwareLogger"
] | import org.slf4j.spi.LocationAwareLogger; | import org.slf4j.spi.*; | [
"org.slf4j.spi"
] | org.slf4j.spi; | 2,183,558 |
private static void appendFile(Path p, int length) throws IOException {
byte[] toAppend = new byte[length];
Random random = new Random();
random.nextBytes(toAppend);
FSDataOutputStream out = cluster.getFileSystem().append(p);
try {
out.write(toAppend);
} finally {
IOUtils.closeStre... | static void function(Path p, int length) throws IOException { byte[] toAppend = new byte[length]; Random random = new Random(); random.nextBytes(toAppend); FSDataOutputStream out = cluster.getFileSystem().append(p); try { out.write(toAppend); } finally { IOUtils.closeStream(out); } } | /**
* Append specified length of bytes to a given file
*/ | Append specified length of bytes to a given file | appendFile | {
"repo_name": "leechoongyon/HadoopSourceAnalyze",
"path": "hadoop-tools/hadoop-distcp/src/test/java/org/apache/hadoop/tools/mapred/TestCopyMapper.java",
"license": "apache-2.0",
"size": 39023
} | [
"java.io.IOException",
"java.util.Random",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.IOUtils"
] | import java.io.IOException; import java.util.Random; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IOUtils; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,680,995 |
public int Backpatch (long FileOffset, RiffChunkHeader Data, int NumBytes )
{
if (file == null)
{
return DDC_INVALID_CALL;
}
try
{
file.seek(FileOffset);
} catch (IOException ioe)
{
return DDC_FILE_ERROR;
}
return Write ( Data, NumBytes );
... | int function (long FileOffset, RiffChunkHeader Data, int NumBytes ) { if (file == null) { return DDC_INVALID_CALL; } try { file.seek(FileOffset); } catch (IOException ioe) { return DDC_FILE_ERROR; } return Write ( Data, NumBytes ); } | /**
* Write Data to specified offset.
*/ | Write Data to specified offset | Backpatch | {
"repo_name": "CCM-Modding/Pay2Spawn",
"path": "src/main/java/ccm/libs/javazoom/jl/converter/RiffFile.java",
"license": "bsd-3-clause",
"size": 12266
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 134,227 |
protected void addOffsetsChannelSocketTimeoutMsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_InboundEndpoint_offsetsChannelSocketTimeoutMs_feat... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.INBOUND_ENDPOINT__OFFSETS_CHANNEL_SOCKET_TIMEOUT_MS, true, false, false, Item... | /**
* This adds a property descriptor for the Offsets Channel Socket Timeout Ms feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/ | This adds a property descriptor for the Offsets Channel Socket Timeout Ms feature. | addOffsetsChannelSocketTimeoutMsPropertyDescriptor | {
"repo_name": "nwnpallewela/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/InboundEndpointItemProvider.java",
"license": "apache-2.0",
"size": 165854
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 2,530,653 |
@Test
public void endRemoveAllIncrementsRemoveAll() {
cachePerfStats.endRemoveAll(0);
assertThat(statistics.getInt(removeAllsId)).isEqualTo(1);
} | void function() { cachePerfStats.endRemoveAll(0); assertThat(statistics.getInt(removeAllsId)).isEqualTo(1); } | /**
* Characterization test: Note that the only way to increment {@code removeAlls} is to invoke
* {@code endRemoveAll}.
*/ | Characterization test: Note that the only way to increment removeAlls is to invoke endRemoveAll | endRemoveAllIncrementsRemoveAll | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java",
"license": "apache-2.0",
"size": 34945
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 996,676 |
public Query andNot(String key, Serializable value) {
return andNotInternal(new Query(key, value));
} | Query function(String key, Serializable value) { return andNotInternal(new Query(key, value)); } | /**
* And not.
*
* @param key
* the key
* @param value
* the value
* @return the query
*/ | And not | andNot | {
"repo_name": "SirmaITT/conservation-space-1.7.0",
"path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/domain-model-api/src/main/java/com/sirma/itt/seip/domain/search/Query.java",
"license": "lgpl-3.0",
"size": 18805
} | [
"java.io.Serializable"
] | import java.io.Serializable; | import java.io.*; | [
"java.io"
] | java.io; | 866,390 |
public static String[] getNames(Object object) {
if (object == null) {
return null;
}
Class<?> klass = object.getClass();
Field[] fields = klass.getFields();
int length = fields.length;
if (length == 0) {
return null;
}
String[]... | static String[] function(Object object) { if (object == null) { return null; } Class<?> klass = object.getClass(); Field[] fields = klass.getFields(); int length = fields.length; if (length == 0) { return null; } String[] names = new String[length]; for (int i = 0; i < length; i += 1) { names[i] = fields[i].getName(); ... | /**
* Get an array of field names from an Object.
*
* @return An array of field names, or null if there are no names.
*/ | Get an array of field names from an Object | getNames | {
"repo_name": "qqTYXn7/browserprint",
"path": "src/org/json/JSONObject.java",
"license": "mit",
"size": 58038
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 442,382 |
private static final synchronized int nextPoolId() {
return ++poolNumberSequence;
}
// static configuration constants
private static final long IDLE_TIMEOUT = 2000L * 1000L * 1000L; // 2sec
private static final long TIMEOUT_SLOP = 20L * 1000L * 1000L; // 20ms
private ... | static final synchronized int function() { return ++poolNumberSequence; } private static final long IDLE_TIMEOUT = 2000L * 1000L * 1000L; private static final long TIMEOUT_SLOP = 20L * 1000L * 1000L; private static final int DEFAULT_COMMON_MAX_SPARES = 256; private static final int SPINS = 1 << 11; private static final... | /**
* Returns the next sequence number. We don't expect this to
* ever contend, so use simple builtin sync.
*/ | Returns the next sequence number. We don't expect this to ever contend, so use simple builtin sync | nextPoolId | {
"repo_name": "shelan/jdk9-mirror",
"path": "jdk/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java",
"license": "gpl-2.0",
"size": 153324
} | [
"java.lang.Thread",
"java.util.concurrent.atomic.AtomicLong"
] | import java.lang.Thread; import java.util.concurrent.atomic.AtomicLong; | import java.lang.*; import java.util.concurrent.atomic.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,585,265 |
int[] vlanIds = {
1, 2, 10, 44, 72, 128, 256, 3333, 4094, 4095,
};
Integer[] orders = {
Integer.MIN_VALUE, -1000, -1,
0, 1, 2, 32000, Integer.MAX_VALUE,
};
VtnSetVlanIdActionCaseBuilder vacBuilder =
new VtnSetVlanIdActionCaseBuilder();
... | int[] vlanIds = { 1, 2, 10, 44, 72, 128, 256, 3333, 4094, 4095, }; Integer[] orders = { Integer.MIN_VALUE, -1000, -1, 0, 1, 2, 32000, Integer.MAX_VALUE, }; VtnSetVlanIdActionCaseBuilder vacBuilder = new VtnSetVlanIdActionCaseBuilder(); for (int vid: vlanIds) { VtnSetVlanIdAction vact = new VtnSetVlanIdActionBuilder(). ... | /**
* Test case for constructors and instance methods.
*
* <ul>
* <li>{@link VTNSetVlanIdAction#VTNSetVlanIdAction(int)}</li>
* <li>{@link VTNSetVlanIdAction#getVlanId()}</li>
* <li>{@link VTNSetVlanIdAction#set(VtnFlowActionBuilder)}</li>
* <li>{@link VTNSetVlanIdAction#set(A... | Test case for constructors and instance methods. <code>VTNSetVlanIdAction#VTNSetVlanIdAction(int)</code> <code>VTNSetVlanIdAction#getVlanId()</code> <code>VTNSetVlanIdAction#set(VtnFlowActionBuilder)</code> <code>VTNSetVlanIdAction#set(ActionBuilder)</code> <code>VTNSetVlanIdAction#toVtnAction(Action)</code> <code>VTNS... | testGetSet | {
"repo_name": "opendaylight/vtn",
"path": "manager/implementation/src/test/java/org/opendaylight/vtn/manager/internal/util/flow/action/VTNSetVlanIdActionTest.java",
"license": "epl-1.0",
"size": 9389
} | [
"org.opendaylight.vtn.manager.internal.util.rpc.RpcErrorTag",
"org.opendaylight.vtn.manager.internal.util.rpc.RpcException",
"org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action",
"org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionC... | import org.opendaylight.vtn.manager.internal.util.rpc.RpcErrorTag; import org.opendaylight.vtn.manager.internal.util.rpc.RpcException; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.Push... | import org.opendaylight.vtn.manager.internal.util.rpc.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.a... | [
"org.opendaylight.vtn",
"org.opendaylight.yang"
] | org.opendaylight.vtn; org.opendaylight.yang; | 1,769,207 |
public void setHttpSession(HttpSession session) {
this.httpSession = session;
}
public HttpMessage() {
}
public HttpMessage(URI uri) throws HttpMalformedHeaderException {
this(uri, null);
}
public HttpMessage(URI uri, ConnectionParam params) throws HttpMalformedHeaderException {
setR... | void function(HttpSession session) { this.httpSession = session; } public HttpMessage() { } public HttpMessage(URI uri) throws HttpMalformedHeaderException { this(uri, null); } public HttpMessage(URI uri, ConnectionParam params) throws HttpMalformedHeaderException { setRequestHeader(new HttpRequestHeader(HttpRequestHea... | /**
* Sets the http session associated with this message.
*
* @param session the new http session
*/ | Sets the http session associated with this message | setHttpSession | {
"repo_name": "JordanGS/zaproxy",
"path": "src/org/parosproxy/paros/network/HttpMessage.java",
"license": "apache-2.0",
"size": 29797
} | [
"org.zaproxy.zap.extension.httpsessions.HttpSession",
"org.zaproxy.zap.network.HttpRequestBody",
"org.zaproxy.zap.network.HttpResponseBody"
] | import org.zaproxy.zap.extension.httpsessions.HttpSession; import org.zaproxy.zap.network.HttpRequestBody; import org.zaproxy.zap.network.HttpResponseBody; | import org.zaproxy.zap.extension.httpsessions.*; import org.zaproxy.zap.network.*; | [
"org.zaproxy.zap"
] | org.zaproxy.zap; | 15,536 |
public Element getElement(Element e, Object attribute, Object value)
{
if (e != null)
{
if (e.getAttributes().containsAttribute(attribute, value))
return e;
int count = e.getElementCount();
for (int j = 0; j < count; j++)
{
Element child = e... | Element function(Element e, Object attribute, Object value) { if (e != null) { if (e.getAttributes().containsAttribute(attribute, value)) return e; int count = e.getElementCount(); for (int j = 0; j < count; j++) { Element child = e.getElement(j); if (child.getAttributes().containsAttribute(attribute, value)) return ch... | /**
* Gets the child element that contains the attribute with the value or null.
* Not thread-safe.
*
* @param e - the element to begin search at
* @param attribute - the desired attribute
* @param value - the desired value
* @return the element found with the attribute and value specified or null... | Gets the child element that contains the attribute with the value or null. Not thread-safe | getElement | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/text/html/HTMLDocument.java",
"license": "bsd-3-clause",
"size": 53973
} | [
"javax.swing.text.Element"
] | import javax.swing.text.Element; | import javax.swing.text.*; | [
"javax.swing"
] | javax.swing; | 2,322,493 |
protected String determineResourceBasePath(MergedContextConfiguration configuration) {
return MergedAnnotations.from(configuration.getTestClass(), SearchStrategy.TYPE_HIERARCHY)
.get(WebAppConfiguration.class).getValue(MergedAnnotation.VALUE, String.class)
.orElse("src/main/webapp");
} | String function(MergedContextConfiguration configuration) { return MergedAnnotations.from(configuration.getTestClass(), SearchStrategy.TYPE_HIERARCHY) .get(WebAppConfiguration.class).getValue(MergedAnnotation.VALUE, String.class) .orElse(STR); } | /**
* Determines the resource base path for web applications using the value of
* {@link WebAppConfiguration @WebAppConfiguration}, if any, on the test class of the
* given {@code configuration}. Defaults to {@code src/main/webapp} in its absence.
* @param configuration the configuration to examine
* @return ... | Determines the resource base path for web applications using the value of <code>WebAppConfiguration @WebAppConfiguration</code>, if any, on the test class of the given configuration. Defaults to src/main/webapp in its absence | determineResourceBasePath | {
"repo_name": "spring-projects/spring-boot",
"path": "spring-boot-project/spring-boot-test/src/main/java/org/springframework/boot/test/context/SpringBootTestContextBootstrapper.java",
"license": "apache-2.0",
"size": 16448
} | [
"org.springframework.core.annotation.MergedAnnotation",
"org.springframework.core.annotation.MergedAnnotations",
"org.springframework.test.context.MergedContextConfiguration",
"org.springframework.test.context.web.WebAppConfiguration"
] | import org.springframework.core.annotation.MergedAnnotation; import org.springframework.core.annotation.MergedAnnotations; import org.springframework.test.context.MergedContextConfiguration; import org.springframework.test.context.web.WebAppConfiguration; | import org.springframework.core.annotation.*; import org.springframework.test.context.*; import org.springframework.test.context.web.*; | [
"org.springframework.core",
"org.springframework.test"
] | org.springframework.core; org.springframework.test; | 1,875,186 |
@Test
public void putEdge_nodesNotInGraph() {
assume().that(graphIsMutable()).isTrue();
graphAsMutableGraph.addNode(N1);
assertTrue(graphAsMutableGraph.putEdge(N1, N5));
assertTrue(graphAsMutableGraph.putEdge(N4, N1));
assertTrue(graphAsMutableGraph.putEdge(N2, N3));
assertThat(graph.nodes(... | void function() { assume().that(graphIsMutable()).isTrue(); graphAsMutableGraph.addNode(N1); assertTrue(graphAsMutableGraph.putEdge(N1, N5)); assertTrue(graphAsMutableGraph.putEdge(N4, N1)); assertTrue(graphAsMutableGraph.putEdge(N2, N3)); assertThat(graph.nodes()).containsExactly(N1, N5, N4, N2, N3).inOrder(); assertT... | /**
* Tests that the method {@code putEdge} will silently add the missing nodes to the graph, then
* add the edge connecting them. We are not using the proxy methods here as we want to test {@code
* putEdge} when the end-points are not elements of the graph.
*/ | Tests that the method putEdge will silently add the missing nodes to the graph, then add the edge connecting them. We are not using the proxy methods here as we want to test putEdge when the end-points are not elements of the graph | putEdge_nodesNotInGraph | {
"repo_name": "google/guava",
"path": "guava-tests/test/com/google/common/graph/AbstractStandardUndirectedGraphTest.java",
"license": "apache-2.0",
"size": 13181
} | [
"com.google.common.truth.Truth",
"com.google.common.truth.TruthJUnit",
"org.junit.Assert"
] | import com.google.common.truth.Truth; import com.google.common.truth.TruthJUnit; import org.junit.Assert; | import com.google.common.truth.*; import org.junit.*; | [
"com.google.common",
"org.junit"
] | com.google.common; org.junit; | 1,928,321 |
public View getHandle() {
return mHandle;
} | View function() { return mHandle; } | /**
* Returns the handle of the drawer.
*
* @return The View reprenseting the handle of the drawer, identified by
* the "handle" id in XML.
*/ | Returns the handle of the drawer | getHandle | {
"repo_name": "syslover33/ctank",
"path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/widget/SlidingDrawer.java",
"license": "gpl-3.0",
"size": 34925
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 531,425 |
@NotNull
QuickAssistAssistant createQuickAssistant(TextEditor textEditor); | QuickAssistAssistant createQuickAssistant(TextEditor textEditor); | /**
* Create a QuickAssist assistant instance.
* @param textEditor the related editor
* @return a new quick assist assistant
*/ | Create a QuickAssist assistant instance | createQuickAssistant | {
"repo_name": "slemeur/che",
"path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/editor/quickfix/QuickAssistantFactory.java",
"license": "epl-1.0",
"size": 1007
} | [
"org.eclipse.che.ide.api.editor.texteditor.TextEditor"
] | import org.eclipse.che.ide.api.editor.texteditor.TextEditor; | import org.eclipse.che.ide.api.editor.texteditor.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,526,244 |
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public void setId(long value) {
this.id = value;
} | @Generated(value = STR, date = STR, comments = STR) void function(long value) { this.id = value; } | /**
* Sets the value of the id property.
*
*/ | Sets the value of the id property | setId | {
"repo_name": "kanonirov/lanb-client",
"path": "src/main/java/ru/lanbilling/webservice/wsdl/GetPhoneSourcesForRecalc.java",
"license": "mit",
"size": 2637
} | [
"javax.annotation.Generated"
] | import javax.annotation.Generated; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,748,115 |
protected static void addWakeLockId(Context context, Intent intent, Integer wakeLockId,
boolean createIfNotExists) {
if (wakeLockId != null) {
intent.putExtra(BootReceiver.WAKE_LOCK_ID, wakeLockId);
return;
}
if (createIfNotExists) {
addWakeLoc... | static void function(Context context, Intent intent, Integer wakeLockId, boolean createIfNotExists) { if (wakeLockId != null) { intent.putExtra(BootReceiver.WAKE_LOCK_ID, wakeLockId); return; } if (createIfNotExists) { addWakeLock(context,intent); } } | /**
* Adds an existing wake lock identified by its registry ID to the specified intent.
*
* @param context
* A {@link Context} instance. Never {@code null}.
* @param intent
* The {@link Intent} to add the wake lock registry ID as extra to. Never {@code null}.
* @param ... | Adds an existing wake lock identified by its registry ID to the specified intent | addWakeLockId | {
"repo_name": "indus1/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/service/CoreService.java",
"license": "apache-2.0",
"size": 16090
} | [
"android.content.Context",
"android.content.Intent"
] | import android.content.Context; import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 948,082 |
public static PortDescription ochPortDescription(PortDescription base,
OduSignalType signalType,
boolean isTunable,
OchSignal lambda,
... | static PortDescription function(PortDescription base, OduSignalType signalType, boolean isTunable, OchSignal lambda, SparseAnnotations annotations) { return ochPortDescription(base.portNumber(), base.isEnabled(), signalType, isTunable, lambda, annotations); } | /**
* Creates OCh port DefaultPortDescription based on the supplied information.
*
* @param base PortDescription to get basic information from
* @param signalType ODU signal type
* @param isTunable tunable wavelength capability
* @param lambda OCh signal
* @param annota... | Creates OCh port DefaultPortDescription based on the supplied information | ochPortDescription | {
"repo_name": "y-higuchi/onos",
"path": "apps/optical-model/src/main/java/org/onosproject/net/optical/device/OchPortHelper.java",
"license": "apache-2.0",
"size": 6845
} | [
"org.onosproject.net.OchSignal",
"org.onosproject.net.OduSignalType",
"org.onosproject.net.SparseAnnotations",
"org.onosproject.net.device.PortDescription"
] | import org.onosproject.net.OchSignal; import org.onosproject.net.OduSignalType; import org.onosproject.net.SparseAnnotations; import org.onosproject.net.device.PortDescription; | import org.onosproject.net.*; import org.onosproject.net.device.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 2,840,975 |
protected void setClientInfo (ChatMessage msg, String localType)
{
if (msg.localtype == null) {
msg.setClientInfo(xlate(msg.bundle, msg.message), localType);
}
} | void function (ChatMessage msg, String localType) { if (msg.localtype == null) { msg.setClientInfo(xlate(msg.bundle, msg.message), localType); } } | /**
* Set the "client info" on the specified message, if not already set.
*/ | Set the "client info" on the specified message, if not already set | setClientInfo | {
"repo_name": "threerings/narya",
"path": "core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java",
"license": "lgpl-2.1",
"size": 53168
} | [
"com.threerings.crowd.chat.data.ChatMessage"
] | import com.threerings.crowd.chat.data.ChatMessage; | import com.threerings.crowd.chat.data.*; | [
"com.threerings.crowd"
] | com.threerings.crowd; | 1,030,039 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> deleteOrderItemClient(String orderId, String orderItemId) throws Exception
{
return deleteOrderItemClient( orderId, orderItemId, null, null);
} | static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> function(String orderId, String orderItemId) throws Exception { return deleteOrderItemClient( orderId, orderItemId, null, null); } | /**
* Removes a previously added item from a defined order.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=DeleteOrderItemClient( orderId, orderItemId);
* client.setBaseAddress(url);
* client.executeRequest();
* Order order = client.Result();
* </code></pre>... | Removes a previously added item from a defined order. <code><code> MozuClient mozuClient=DeleteOrderItemClient( orderId, orderItemId); client.setBaseAddress(url); client.executeRequest(); Order order = client.Result(); </code></code> | deleteOrderItemClient | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/orders/OrderItemClient.java",
"license": "mit",
"size": 31945
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,889,631 |
public static boolean updateSettings(Map<String, String> settings, String serverUrl,
String account, char[] password) throws IOException {
return doAction(RpcRequest.EDIT_SETTINGS, null, settings, serverUrl, account, password);
}
| static boolean function(Map<String, String> settings, String serverUrl, String account, char[] password) throws IOException { return doAction(RpcRequest.EDIT_SETTINGS, null, settings, serverUrl, account, password); } | /**
* Update the settings on the Gitblit server.
*
* @param settings
* the settings to update
* @param serverUrl
* @param account
* @param password
* @return true if the action succeeded
* @throws IOException
*/ | Update the settings on the Gitblit server | updateSettings | {
"repo_name": "saper/gitblit",
"path": "src/com/gitblit/utils/RpcUtils.java",
"license": "apache-2.0",
"size": 18941
} | [
"com.gitblit.Constants",
"java.io.IOException",
"java.util.Map"
] | import com.gitblit.Constants; import java.io.IOException; import java.util.Map; | import com.gitblit.*; import java.io.*; import java.util.*; | [
"com.gitblit",
"java.io",
"java.util"
] | com.gitblit; java.io; java.util; | 2,808,861 |
public void internalEntityDecl(String name, XMLString text,
XMLString nonNormalizedText,
Augmentations augs) throws XNIException {
try {
// SAX2 extensions
if (fDeclHandler != null) {
fDeclHandler.... | void function(String name, XMLString text, XMLString nonNormalizedText, Augmentations augs) throws XNIException { try { if (fDeclHandler != null) { fDeclHandler.internalEntityDecl(name, text.toString()); } } catch (SAXException e) { throw new XNIException(e); } } | /**
* An internal entity declaration.
*
* @param name The name of the entity. Parameter entity names start with
* '%', whereas the name of a general entity is just the
* entity name.
* @param text The value of the entity.
* @param nonNormalizedText The non-norm... | An internal entity declaration | internalEntityDecl | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java",
"license": "mit",
"size": 91809
} | [
"com.sun.org.apache.xerces.internal.xni.Augmentations",
"com.sun.org.apache.xerces.internal.xni.XMLString",
"com.sun.org.apache.xerces.internal.xni.XNIException",
"org.xml.sax.SAXException"
] | import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XMLString; import com.sun.org.apache.xerces.internal.xni.XNIException; import org.xml.sax.SAXException; | import com.sun.org.apache.xerces.internal.xni.*; import org.xml.sax.*; | [
"com.sun.org",
"org.xml.sax"
] | com.sun.org; org.xml.sax; | 1,239,892 |
protected ModelAndView generateAccessTokenResponse(final HttpServletRequest request, final HttpServletResponse response,
final AccessTokenRequestDataHolder requestHolder,
final J2EContext context, final OAu... | ModelAndView function(final HttpServletRequest request, final HttpServletResponse response, final AccessTokenRequestDataHolder requestHolder, final J2EContext context, final OAuth20TokenGeneratedResult result) { LOGGER.debug(STR, result); val deviceRefreshInterval = Beans.newDuration(casProperties.getAuthn().getOauth()... | /**
* Generate access token response model and view.
*
* @param request the request
* @param response the response
* @param requestHolder the request holder
* @param context the context
* @param result the result
* @return the model and view
*/ | Generate access token response model and view | generateAccessTokenResponse | {
"repo_name": "robertoschwald/cas",
"path": "support/cas-server-support-oauth/src/main/java/org/apereo/cas/support/oauth/web/endpoints/OAuth20AccessTokenEndpointController.java",
"license": "apache-2.0",
"size": 11847
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apereo.cas.configuration.support.Beans",
"org.apereo.cas.support.oauth.OAuth20ResponseTypes",
"org.apereo.cas.support.oauth.web.response.accesstoken.OAuth20TokenGeneratedResult",
"org.apereo.cas.support.oauth.web.respo... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apereo.cas.configuration.support.Beans; import org.apereo.cas.support.oauth.OAuth20ResponseTypes; import org.apereo.cas.support.oauth.web.response.accesstoken.OAuth20TokenGeneratedResult; import org.apereo.cas.suppor... | import javax.servlet.http.*; import org.apereo.cas.configuration.support.*; import org.apereo.cas.support.oauth.*; import org.apereo.cas.support.oauth.web.response.accesstoken.*; import org.apereo.cas.support.oauth.web.response.accesstoken.ext.*; import org.apereo.cas.support.oauth.web.response.accesstoken.response.*; ... | [
"javax.servlet",
"org.apereo.cas",
"org.pac4j.core",
"org.springframework.web"
] | javax.servlet; org.apereo.cas; org.pac4j.core; org.springframework.web; | 1,594,214 |
protected void endElement(String uri, String local)
throws SAXException, RepositoryException {
stack.removeFirst();
handler.endElement(uri, local, getXMLName(uri, local));
Map namespaces = (Map) stack.getFirst();
Iterator iterator = namespaces.values().iterator();
... | void function(String uri, String local) throws SAXException, RepositoryException { stack.removeFirst(); handler.endElement(uri, local, getXMLName(uri, local)); Map namespaces = (Map) stack.getFirst(); Iterator iterator = namespaces.values().iterator(); while (iterator.hasNext()) { handler.endPrefixMapping((String) iter... | /**
* Emits the end element event for an element with the given name.
* The namespace stack and mappings are automatically updated.
*
* @param uri namespace URI or the element
* @param local local name of the element
* @throws RepositoryException if a repository error occurs
* @throws... | Emits the end element event for an element with the given name. The namespace stack and mappings are automatically updated | endElement | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/xml/Exporter.java",
"license": "apache-2.0",
"size": 20600
} | [
"java.util.Iterator",
"java.util.Map",
"javax.jcr.RepositoryException",
"org.xml.sax.SAXException"
] | import java.util.Iterator; import java.util.Map; import javax.jcr.RepositoryException; import org.xml.sax.SAXException; | import java.util.*; import javax.jcr.*; import org.xml.sax.*; | [
"java.util",
"javax.jcr",
"org.xml.sax"
] | java.util; javax.jcr; org.xml.sax; | 1,753,732 |
BufferedImage getZoomedLensImage()
{
if (lens == null) return null;
return lens.getZoomedImage();
} | BufferedImage getZoomedLensImage() { if (lens == null) return null; return lens.getZoomedImage(); } | /**
* Returns the <code>zoomedImage</code> from the lens component
* or <code>null</code> if the lens is <code>null</code>.
*
* @return See above.
*/ | Returns the <code>zoomedImage</code> from the lens component or <code>null</code> if the lens is <code>null</code> | getZoomedLensImage | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java",
"license": "gpl-2.0",
"size": 80326
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,009,911 |
public void loadStoredConfig() {
File cfgFile = new File(generateConfigFilename());
if (cfgFile.exists()) {
try {
FileInputStream fiStream = new FileInputStream(cfgFile);
Properties propertiesFile = new Properties();
propertiesFile.load(fi... | void function() { File cfgFile = new File(generateConfigFilename()); if (cfgFile.exists()) { try { FileInputStream fiStream = new FileInputStream(cfgFile); Properties propertiesFile = new Properties(); propertiesFile.load(fiStream); this.devAddr = propertiesFile.getProperty(STR); this.paired = true; fiStream.close(); }... | /**
* Load the stored configuration information if it exists. This information
* is established during the pairing process.
*/ | Load the stored configuration information if it exists. This information is established during the pairing process | loadStoredConfig | {
"repo_name": "vgoldman/openhab",
"path": "bundles/binding/org.openhab.binding.maxcul/src/main/java/org/openhab/binding/maxcul/internal/MaxCulBindingConfig.java",
"license": "epl-1.0",
"size": 8555
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.util.Properties"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,254,108 |
public boolean isBreedingItem(ItemStack p_70877_1_)
{
return p_70877_1_.getItem() == Items.wheat;
} | boolean function(ItemStack p_70877_1_) { return p_70877_1_.getItem() == Items.wheat; } | /**
* Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on
* the animal type)
*/ | Checks if the parameter is an item which this animal can be fed to breed it (wheat, carrots or seeds depending on the animal type) | isBreedingItem | {
"repo_name": "mviitanen/marsmod",
"path": "mcp/src/minecraft/net/minecraft/entity/passive/EntityAnimal.java",
"license": "gpl-2.0",
"size": 14430
} | [
"net.minecraft.init.Items",
"net.minecraft.item.ItemStack"
] | import net.minecraft.init.Items; import net.minecraft.item.ItemStack; | import net.minecraft.init.*; import net.minecraft.item.*; | [
"net.minecraft.init",
"net.minecraft.item"
] | net.minecraft.init; net.minecraft.item; | 423,328 |
private void uploadMetrics(TopologyMetric tpMetric) throws Exception {
long start = System.currentTimeMillis();
if (tpMetric == null) {
return;
}
try {
synchronized (lock) {
if (client == null || !client.isValid()) {
client... | void function(TopologyMetric tpMetric) throws Exception { long start = System.currentTimeMillis(); if (tpMetric == null) { return; } try { synchronized (lock) { if (client == null !client.isValid()) { client = new NimbusClientWrapper(); client.init(conf); } } MetricInfo topologyMetrics = tpMetric.get_topologyMetric(); ... | /**
* upload metrics sequentially due to thrift frame size limit (15MB)
*/ | upload metrics sequentially due to thrift frame size limit (15MB) | uploadMetrics | {
"repo_name": "penuel-leo/jstorm",
"path": "jstorm-core/src/main/java/com/alibaba/jstorm/task/master/metrics/MetricsUploader.java",
"license": "apache-2.0",
"size": 9244
} | [
"com.alibaba.jstorm.metric.MetaType",
"com.alibaba.jstorm.task.error.ErrorConstants"
] | import com.alibaba.jstorm.metric.MetaType; import com.alibaba.jstorm.task.error.ErrorConstants; | import com.alibaba.jstorm.metric.*; import com.alibaba.jstorm.task.error.*; | [
"com.alibaba.jstorm"
] | com.alibaba.jstorm; | 226,649 |
@Override
public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) {
return mq.getNonCumulativeCost(this);
} | RelOptCost function(RelOptPlanner planner, RelMetadataQuery mq) { return mq.getNonCumulativeCost(this); } | /**
* Model cost of join as size of Inputs.
*/ | Model cost of join as size of Inputs | computeSelfCost | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java",
"license": "apache-2.0",
"size": 9463
} | [
"org.apache.calcite.plan.RelOptCost",
"org.apache.calcite.plan.RelOptPlanner",
"org.apache.calcite.rel.metadata.RelMetadataQuery"
] | import org.apache.calcite.plan.RelOptCost; import org.apache.calcite.plan.RelOptPlanner; import org.apache.calcite.rel.metadata.RelMetadataQuery; | import org.apache.calcite.plan.*; import org.apache.calcite.rel.metadata.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,925,215 |
private void createTargetRecipe() {
List<String> tags = new ArrayList<>();
tags.add(this.getCategory());
NewRecipe newRecipe = dtoFactory.createDto(NewRecipe.class)
.withName(selectedTarget.getName())
.withType(... | void function() { List<String> tags = new ArrayList<>(); tags.add(this.getCategory()); NewRecipe newRecipe = dtoFactory.createDto(NewRecipe.class) .withName(selectedTarget.getName()) .withType(getCategory()) .withScript("{" + "\"host\STRSTR\STR + "\"port\STRSTR\STR + "\"username\STRSTR\STR + "\"password\STRSTR\STR}") .... | /**
* Create a new target recipe and save it.
*/ | Create a new target recipe and save it | createTargetRecipe | {
"repo_name": "slemeur/che",
"path": "plugins/plugin-machine/che-plugin-machine-ext-client/src/main/java/org/eclipse/che/ide/extension/machine/client/targets/categories/ssh/SshCategoryPresenter.java",
"license": "epl-1.0",
"size": 24974
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.che.api.machine.shared.dto.recipe.NewRecipe"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.che.api.machine.shared.dto.recipe.NewRecipe; | import java.util.*; import org.eclipse.che.api.machine.shared.dto.recipe.*; | [
"java.util",
"org.eclipse.che"
] | java.util; org.eclipse.che; | 279,382 |
public VariableInstanceLogDeleteBuilder dateRangeEnd(Date rangeStart); | VariableInstanceLogDeleteBuilder function(Date rangeStart); | /**
* Specify the end of a date range to be used as a criteria on the date field.
* The date range includes this date.
* @param date the end (later end) of the date range
* @return The current query builder instance
*/ | Specify the end of a date range to be used as a criteria on the date field. The date range includes this date | dateRangeEnd | {
"repo_name": "bernardator/droolsjbpm-knowledge",
"path": "kie-internal/src/main/java/org/kie/internal/runtime/manager/audit/query/VariableInstanceLogDeleteBuilder.java",
"license": "apache-2.0",
"size": 2524
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 471,949 |
public TopHitsAggregationBuilder fetchSource(boolean fetch) {
FetchSourceContext fetchSourceContext = this.fetchSourceContext != null ? this.fetchSourceContext
: FetchSourceContext.FETCH_SOURCE;
this.fetchSourceContext = new FetchSourceContext(fetch, fetchSourceContext.includes(), fetchS... | TopHitsAggregationBuilder function(boolean fetch) { FetchSourceContext fetchSourceContext = this.fetchSourceContext != null ? this.fetchSourceContext : FetchSourceContext.FETCH_SOURCE; this.fetchSourceContext = new FetchSourceContext(fetch, fetchSourceContext.includes(), fetchSourceContext.excludes()); return this; } | /**
* Indicates whether the response should contain the stored _source for
* every hit
*/ | Indicates whether the response should contain the stored _source for every hit | fetchSource | {
"repo_name": "nezirus/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/aggregations/metrics/tophits/TopHitsAggregationBuilder.java",
"license": "apache-2.0",
"size": 30946
} | [
"org.elasticsearch.search.fetch.subphase.FetchSourceContext"
] | import org.elasticsearch.search.fetch.subphase.FetchSourceContext; | import org.elasticsearch.search.fetch.subphase.*; | [
"org.elasticsearch.search"
] | org.elasticsearch.search; | 988,802 |
private static SwipeBack createSwipeBack(Activity activity, int dragMode, Position position, Type type, SwipeBackTransformer transformer) {
SwipeBack drawerHelper;
if (type == Type.OVERLAY) {
drawerHelper = new OverlaySwipeBack(activity, dragMode);
} else {
drawerHelper = new SlidingSwipeBack(activit... | static SwipeBack function(Activity activity, int dragMode, Position position, Type type, SwipeBackTransformer transformer) { SwipeBack drawerHelper; if (type == Type.OVERLAY) { drawerHelper = new OverlaySwipeBack(activity, dragMode); } else { drawerHelper = new SlidingSwipeBack(activity, dragMode); } final SwipeBack dr... | /**
* Constructs the appropriate SwipeBack based on the position.
*/ | Constructs the appropriate SwipeBack based on the position | createSwipeBack | {
"repo_name": "iainconnor/SwipeBack",
"path": "library/src/com/hannesdorfmann/swipeback/SwipeBack.java",
"license": "apache-2.0",
"size": 40503
} | [
"android.app.Activity",
"com.hannesdorfmann.swipeback.transformer.SwipeBackTransformer"
] | import android.app.Activity; import com.hannesdorfmann.swipeback.transformer.SwipeBackTransformer; | import android.app.*; import com.hannesdorfmann.swipeback.transformer.*; | [
"android.app",
"com.hannesdorfmann.swipeback"
] | android.app; com.hannesdorfmann.swipeback; | 2,286,265 |
public MessageBytes setValue( String name ) {
for ( int i = 0; i < count; i++ ) {
if(headers[i].getName().equalsIgnoreCase(name)) {
for ( int j=i+1; j < count; j++ ) {
if(headers[j].getName().equalsIgnoreCase(name)) {
removeHeader(j--);... | MessageBytes function( String name ) { for ( int i = 0; i < count; i++ ) { if(headers[i].getName().equalsIgnoreCase(name)) { for ( int j=i+1; j < count; j++ ) { if(headers[j].getName().equalsIgnoreCase(name)) { removeHeader(j--); } } return headers[i].getValue(); } } MimeHeaderField mh = createHeader(); mh.getName().se... | /** Allow "set" operations -
return a MessageBytes container for the
header value ( existing header or new
if this .
*/ | Allow "set" operations - | setValue | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/MimeHeaders.java",
"license": "mit",
"size": 15418
} | [
"org.apache.tomcat.util.buf.MessageBytes"
] | import org.apache.tomcat.util.buf.MessageBytes; | import org.apache.tomcat.util.buf.*; | [
"org.apache.tomcat"
] | org.apache.tomcat; | 1,065,075 |
public boolean update(int page, byte[] data) {
if (page < 4 || page > 39) {
// outside of user memory
return false;
}
byte[] apdu = new byte[9];
apdu[0] = (byte) 0xFF;
apdu[1] = (byte) 0xD6;
apdu[2] = 0x00;
apdu[3] = (byte) page;
apdu[4] = 0x04;
System.arraycopy(data, 0, apdu, 5, 4);
Comma... | boolean function(int page, byte[] data) { if (page < 4 page > 39) { return false; } byte[] apdu = new byte[9]; apdu[0] = (byte) 0xFF; apdu[1] = (byte) 0xD6; apdu[2] = 0x00; apdu[3] = (byte) page; apdu[4] = 0x04; System.arraycopy(data, 0, apdu, 5, 4); CommandAPDU command = new CommandAPDU(apdu); ResponseAPDU response = ... | /**
* Update a 4-byte user page.
*
* @param page the number of the page to be updated (4<=page<=39)
* @param data a 4-byte array containing the data in hexadecimal
* @return {@code true} on success
*/ | Update a 4-byte user page | update | {
"repo_name": "Andrade/nfcjlib",
"path": "src/nfcjlib/core/UltralightC.java",
"license": "bsd-3-clause",
"size": 9565
} | [
"javax.smartcardio.CommandAPDU",
"javax.smartcardio.ResponseAPDU"
] | import javax.smartcardio.CommandAPDU; import javax.smartcardio.ResponseAPDU; | import javax.smartcardio.*; | [
"javax.smartcardio"
] | javax.smartcardio; | 1,187,764 |
public Graphics getGraphics(); | Graphics function(); | /**
* Method that returns the graphics context
* for this model display
* @return the graphics context
*/ | Method that returns the graphics context for this model display | getGraphics | {
"repo_name": "zulfikar2/CSPortfolio",
"path": "JAVA/SAD_Search/ModelDisplay.java",
"license": "gpl-2.0",
"size": 1120
} | [
"java.awt.Graphics"
] | import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,286,291 |
public Stream<Entry<String, T>> entryByField() {
return fieldHolder.entrySet().stream();
} | Stream<Entry<String, T>> function() { return fieldHolder.entrySet().stream(); } | /**
* Returns a sequence of all field-entry pairs which the current holder supplies.
*
* @return sequence of field-entry pairs
*/ | Returns a sequence of all field-entry pairs which the current holder supplies | entryByField | {
"repo_name": "hazendaz/assertj-core",
"path": "src/main/java/org/assertj/core/api/recursive/comparison/FieldHolder.java",
"license": "apache-2.0",
"size": 3570
} | [
"java.util.Map",
"java.util.stream.Stream"
] | import java.util.Map; import java.util.stream.Stream; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 299,954 |
public ServiceCall<Void> enumValidAsync(UriColor enumPath, final ServiceCallback<Void> serviceCallback) {
return ServiceCall.fromResponse(enumValidWithServiceResponseAsync(enumPath), serviceCallback);
} | ServiceCall<Void> function(UriColor enumPath, final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(enumValidWithServiceResponseAsync(enumPath), serviceCallback); } | /**
* Get using uri with 'green color' in path parameter.
*
* @param enumPath send the value green. Possible values include: 'red color', 'green color', 'blue color'
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} o... | Get using uri with 'green color' in path parameter | enumValidAsync | {
"repo_name": "matthchr/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/implementation/PathsImpl.java",
"license": "mit",
"size": 77364
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,376,451 |
public boolean isEngaged(final Player player) {
return (player.hasQuest(QUEST_SLOT)
&& (player.getQuest(QUEST_SLOT).startsWith("engaged") || player.getQuest(QUEST_SLOT).startsWith("forging;")));
} | boolean function(final Player player) { return (player.hasQuest(QUEST_SLOT) && (player.getQuest(QUEST_SLOT).startsWith(STR) player.getQuest(QUEST_SLOT).startsWith(STR))); } | /**
* Check if a player is engaged with another player.
*
* @param player the player to check
* @return true iff the player is engaged
*/ | Check if a player is engaged with another player | isEngaged | {
"repo_name": "acsid/stendhal",
"path": "src/games/stendhal/server/maps/quests/marriage/MarriageQuestInfo.java",
"license": "gpl-2.0",
"size": 2175
} | [
"games.stendhal.server.entity.player.Player"
] | import games.stendhal.server.entity.player.Player; | import games.stendhal.server.entity.player.*; | [
"games.stendhal.server"
] | games.stendhal.server; | 2,669,308 |
public static Configuration createH2Configuration(){
// get original configuration
Configuration configuration = new Configuration();
//add persistent classes
for(Class<?> clazz : HibernateUtil.getPersistentClasses())
{
configuration.addAnnotatedClass(clazz);
... | static Configuration function(){ Configuration configuration = new Configuration(); for(Class<?> clazz : HibernateUtil.getPersistentClasses()) { configuration.addAnnotatedClass(clazz); } configuration.setProperty(STR, STR); configuration.setProperty(STR, STR); configuration.setProperty(STR, STR); configuration.setPrope... | /**
* creates configuration from original, and change connection to H2 db
* sets "hibernate.hbm2ddl.auto" to "create"
* @return configuration to work with H2
*/ | creates configuration from original, and change connection to H2 db sets "hibernate.hbm2ddl.auto" to "create" | createH2Configuration | {
"repo_name": "uv48uson/amos-ss15-proj3",
"path": "amos-ss15-proj3-gui/src/test/java/de/fau/osr/gui/db/DBTestHelper.java",
"license": "agpl-3.0",
"size": 2870
} | [
"de.fau.osr.core.db.HibernateUtil",
"org.hibernate.cfg.Configuration"
] | import de.fau.osr.core.db.HibernateUtil; import org.hibernate.cfg.Configuration; | import de.fau.osr.core.db.*; import org.hibernate.cfg.*; | [
"de.fau.osr",
"org.hibernate.cfg"
] | de.fau.osr; org.hibernate.cfg; | 699,489 |
Calendar calStart = Calendar.getInstance();
// 24.03.2014 was a Monday, no problem
calStart.set(2014, 02, 24, 9, 0, 0);
calStart.set(Calendar.MILLISECOND, 0);
Calendar calEnd = Calendar.getInstance();
calEnd.set(2014, 02, 24, 10, 0, 0);
calEnd.set(Calendar.MILLISECOND, 0);
long now = calStart.getTime... | Calendar calStart = Calendar.getInstance(); calStart.set(2014, 02, 24, 9, 0, 0); calStart.set(Calendar.MILLISECOND, 0); Calendar calEnd = Calendar.getInstance(); calEnd.set(2014, 02, 24, 10, 0, 0); calEnd.set(Calendar.MILLISECOND, 0); long now = calStart.getTimeInMillis(); long nowEnd = calEnd.getTimeInMillis(); assert... | /**
* Tests that all cases excluded from valid calendars are indeed excluded.
*/ | Tests that all cases excluded from valid calendars are indeed excluded | testValidCalendars | {
"repo_name": "ValentinMinder/pocketcampus",
"path": "plugin/freeroom/server/src/test/java/org/pocketcampus/plugin/freeroom/server/tests/sharedutilstests/TestFRTimes.java",
"license": "bsd-3-clause",
"size": 8408
} | [
"java.util.Calendar",
"org.junit.Assert",
"org.pocketcampus.plugin.freeroom.shared.Constants",
"org.pocketcampus.plugin.freeroom.shared.utils.FRTimes"
] | import java.util.Calendar; import org.junit.Assert; import org.pocketcampus.plugin.freeroom.shared.Constants; import org.pocketcampus.plugin.freeroom.shared.utils.FRTimes; | import java.util.*; import org.junit.*; import org.pocketcampus.plugin.freeroom.shared.*; import org.pocketcampus.plugin.freeroom.shared.utils.*; | [
"java.util",
"org.junit",
"org.pocketcampus.plugin"
] | java.util; org.junit; org.pocketcampus.plugin; | 2,058,066 |
@Test
public void testJdbcToArroValues() throws SQLException, IOException {
testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE),
Calendar.getInstance()));
testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE)));
... | void function() throws SQLException, IOException { testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance())); testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE))); testDataSets(JdbcToArrow.sqlToArrow(conn.crea... | /**
* Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with UTF-8 Charset, including
* the multi-byte CJK characters.
*/ | Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with UTF-8 Charset, including the multi-byte CJK characters | testJdbcToArroValues | {
"repo_name": "pcmoritz/arrow",
"path": "java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowCharSetTest.java",
"license": "apache-2.0",
"size": 5417
} | [
"java.io.IOException",
"java.sql.SQLException",
"java.util.Calendar",
"org.apache.arrow.adapter.jdbc.JdbcToArrow",
"org.apache.arrow.memory.RootAllocator"
] | import java.io.IOException; import java.sql.SQLException; import java.util.Calendar; import org.apache.arrow.adapter.jdbc.JdbcToArrow; import org.apache.arrow.memory.RootAllocator; | import java.io.*; import java.sql.*; import java.util.*; import org.apache.arrow.adapter.jdbc.*; import org.apache.arrow.memory.*; | [
"java.io",
"java.sql",
"java.util",
"org.apache.arrow"
] | java.io; java.sql; java.util; org.apache.arrow; | 2,682,159 |
public List<InstructorAttributes> getInstructorsForGoogleId(String googleId) {
Assumption.assertNotNull(googleId);
return instructorsLogic.getInstructorsForGoogleId(googleId);
} | List<InstructorAttributes> function(String googleId) { Assumption.assertNotNull(googleId); return instructorsLogic.getInstructorsForGoogleId(googleId); } | /**
* Preconditions: <br>
* * All parameters are non-null.
* @return Empty list if none found.
*/ | Preconditions: All parameters are non-null | getInstructorsForGoogleId | {
"repo_name": "Mynk96/teammates",
"path": "src/main/java/teammates/logic/api/Logic.java",
"license": "gpl-2.0",
"size": 86976
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,721,120 |
@Override
public Builder setVectorsListeners(@NonNull Collection<VectorsListener<VocabWord>> vectorsListeners) {
super.setVectorsListeners(vectorsListeners);
return this;
} | Builder function(@NonNull Collection<VectorsListener<VocabWord>> vectorsListeners) { super.setVectorsListeners(vectorsListeners); return this; } | /**
* This method sets VectorsListeners for this SequenceVectors model
*
* @param vectorsListeners
* @return
*/ | This method sets VectorsListeners for this SequenceVectors model | setVectorsListeners | {
"repo_name": "kinbod/deeplearning4j",
"path": "deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/word2vec/Word2Vec.java",
"license": "apache-2.0",
"size": 21704
} | [
"java.util.Collection",
"org.deeplearning4j.models.sequencevectors.interfaces.VectorsListener"
] | import java.util.Collection; import org.deeplearning4j.models.sequencevectors.interfaces.VectorsListener; | import java.util.*; import org.deeplearning4j.models.sequencevectors.interfaces.*; | [
"java.util",
"org.deeplearning4j.models"
] | java.util; org.deeplearning4j.models; | 1,543,788 |
public void handleError(Exception exception) {
try {
if (runnable instanceof ErrorHandlingRunnable) {
ErrorHandlingRunnable errorHandlingRunnable = (ErrorHandlingRunnable) runnable;
errorHandlingRunnable.handleError(exception);
... | void function(Exception exception) { try { if (runnable instanceof ErrorHandlingRunnable) { ErrorHandlingRunnable errorHandlingRunnable = (ErrorHandlingRunnable) runnable; errorHandlingRunnable.handleError(exception); } else { ErrorEvent errorEvent = new ErrorEvent(exception); ErrorHandler errorHandler = ErrorEvent .fi... | /**
* Handles exceptions thrown during the execution of this task.
*
* @since 7.1.8
* @param exception
* the thrown exception.
*/ | Handles exceptions thrown during the execution of this task | handleError | {
"repo_name": "Darsstar/framework",
"path": "server/src/main/java/com/vaadin/server/VaadinSession.java",
"license": "apache-2.0",
"size": 51298
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,025,081 |
private FSDataInputStream openSourceFile(Context context, final SnapshotFileInfo fileInfo)
throws IOException {
try {
Configuration conf = context.getConfiguration();
FileLink link = null;
switch (fileInfo.getType()) {
case HFILE:
Path inputPath = new ... | FSDataInputStream function(Context context, final SnapshotFileInfo fileInfo) throws IOException { try { Configuration conf = context.getConfiguration(); FileLink link = null; switch (fileInfo.getType()) { case HFILE: Path inputPath = new Path(fileInfo.getHfile()); link = getFileLink(inputPath, conf); break; case WAL: S... | /**
* Try to open the "source" file.
* Throws an IOException if the communication with the inputFs fail or
* if the file is not found.
*/ | Try to open the "source" file. Throws an IOException if the communication with the inputFs fail or if the file is not found | openSourceFile | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java",
"license": "apache-2.0",
"size": 41758
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FSDataInputStream",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.io.FileLink",
"org.apache.hadoop.hbase.io.WALLink",
"org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.io.FileLink; import org.apache.hadoop.hbase.io.WALLink; import org.apache.hadoop.hbase.protobuf.generated.SnapshotProtos; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 510,355 |
private void updateLink(BasicLink link, BasicNode newNode,
int direction) {
switch (direction) {
case REORIENT_SOURCE:
link.setSource(newNode);
break;
case REORIENT_TARGET:
link.setTarget(newNode);
... | void function(BasicLink link, BasicNode newNode, int direction) { switch (direction) { case REORIENT_SOURCE: link.setSource(newNode); break; case REORIENT_TARGET: link.setTarget(newNode); break; default: } return; } | /**
* Updates target or source of a link.
*
* @param link a link
* @param newNode new node.
* @param direction specifies which will be changed,target or source.
*/ | Updates target or source of a link | updateLink | {
"repo_name": "kuriking/testdc2",
"path": "net.dependableos.dcase.diagram.editor/src/net/dependableos/dcase/diagram/editor/command/UpdateLinkCommand.java",
"license": "epl-1.0",
"size": 5431
} | [
"net.dependableos.dcase.BasicLink",
"net.dependableos.dcase.BasicNode"
] | import net.dependableos.dcase.BasicLink; import net.dependableos.dcase.BasicNode; | import net.dependableos.dcase.*; | [
"net.dependableos.dcase"
] | net.dependableos.dcase; | 1,612,265 |
private InputStream getDataInputStream() throws IOException {
try {
// get data socket
Socket dataSoc = socket;
if (dataSoc == null) {
throw new IOException("Cannot open data connection.");
}
// create input stream
Inp... | InputStream function() throws IOException { try { Socket dataSoc = socket; if (dataSoc == null) { throw new IOException(STR); } InputStream is = dataSoc.getInputStream(); if (factory.isZipMode()) { is = new InflaterInputStream(is); } return is; } catch (IOException ex) { factory.closeDataConnection(); throw ex; } } | /**
* Get data input stream. The return value will never be null.
*/ | Get data input stream. The return value will never be null | getDataInputStream | {
"repo_name": "saaconsltd/mina-ftpserver",
"path": "core/src/main/java/org/apache/ftpserver/impl/IODataConnection.java",
"license": "apache-2.0",
"size": 10748
} | [
"java.io.IOException",
"java.io.InputStream",
"java.net.Socket",
"java.util.zip.InflaterInputStream"
] | import java.io.IOException; import java.io.InputStream; import java.net.Socket; import java.util.zip.InflaterInputStream; | import java.io.*; import java.net.*; import java.util.zip.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 18,154 |
@Override()
public java.lang.Class getJavaClass(
) {
return org.chocolate_milk.model.ItemSalesTaxRef.class;
} | @Override() java.lang.Class function( ) { return org.chocolate_milk.model.ItemSalesTaxRef.class; } | /**
* Method getJavaClass.
*
* @return the Java class represented by this descriptor.
*/ | Method getJavaClass | getJavaClass | {
"repo_name": "galleon1/chocolate-milk",
"path": "src/org/chocolate_milk/model/descriptors/ItemSalesTaxRefDescriptor.java",
"license": "lgpl-3.0",
"size": 5692
} | [
"org.chocolate_milk.model.ItemSalesTaxRef"
] | import org.chocolate_milk.model.ItemSalesTaxRef; | import org.chocolate_milk.model.*; | [
"org.chocolate_milk.model"
] | org.chocolate_milk.model; | 2,359,051 |
public State getState()
{
if ( m_tracing )
{
synchronized ( m_semaphore )
{
// Count how poolables are outstanding.
int count = 0;
for ( Iterator iter = m_elementMap.values().iterator(); iter.hasNext(); )
... | State function() { if ( m_tracing ) { synchronized ( m_semaphore ) { int count = 0; for ( Iterator iter = m_elementMap.values().iterator(); iter.hasNext(); ) { PoolElement element = (PoolElement)iter.next(); if ( element.m_thread != null ) { count++; } } Thread[] threads = new Thread[count]; TraceException[] traceExcep... | /**
* Returns a snapshot of the current state of the pool.
*
* @return A snapshot of the current pool state.
*/ | Returns a snapshot of the current state of the pool | getState | {
"repo_name": "eva-xuyen/excalibur",
"path": "components/pool/instrumented/src/main/java/org/apache/avalon/excalibur/pool/TraceableResourceLimitingPool.java",
"license": "apache-2.0",
"size": 10683
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,572,536 |
@Test
public void testConnectionWithURLParams() throws Throwable {
final String EXPECTED_PATTERN = " hivetest ";
List<String> argList = new ArrayList<>();
argList.add("-d");
argList.add(BeeLine.BEELINE_DEFAULT_JDBC_DRIVER);
argList.add("-u");
argList.add(miniHS2.getBaseJdbcURL() + ";user=hiv... | void function() throws Throwable { final String EXPECTED_PATTERN = STR; List<String> argList = new ArrayList<>(); argList.add("-d"); argList.add(BeeLine.BEELINE_DEFAULT_JDBC_DRIVER); argList.add("-u"); argList.add(miniHS2.getBaseJdbcURL() + STR); String SCRIPT_TEXT = STR; testScriptFile(SCRIPT_TEXT, argList, EXPECTED_P... | /**
* Attempt to execute a simple script file with the usage of user & password variables in URL.
* Test for presence of an expected pattern
* in the output (stdout or stderr), fail if not found
* Print PASSED or FAILED
*/ | Attempt to execute a simple script file with the usage of user & password variables in URL. Test for presence of an expected pattern in the output (stdout or stderr), fail if not found Print PASSED or FAILED | testConnectionWithURLParams | {
"repo_name": "vineetgarg02/hive",
"path": "itests/hive-unit/src/test/java/org/apache/hive/beeline/TestBeeLineWithArgs.java",
"license": "apache-2.0",
"size": 46744
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 982,530 |
public interface IUpdate {
public void dispatch();
}
private class HAControllerNodeIPUpdate implements IUpdate {
public final Map<String,String> curControllerNodeIPs;
public final Map<String,String> addedControllerNodeIPs;
public final Map<String,String... | interface IUpdate { public void function(); } private class HAControllerNodeIPUpdate implements IUpdate { public final Map<String,String> curControllerNodeIPs; public final Map<String,String> addedControllerNodeIPs; public final Map<String,String> removedControllerNodeIPs; public HAControllerNodeIPUpdate( HashMap<Strin... | /**
* Calls the appropriate listeners
*/ | Calls the appropriate listeners | dispatch | {
"repo_name": "pawtul/ssp_projekt",
"path": "src/main/java/net/floodlightcontroller/core/internal/Controller.java",
"license": "apache-2.0",
"size": 41293
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 508,610 |
public static GregorianCalendar parseISO8601Month(String s) throws DatatypeParseException {
if(s==null || s.isEmpty())
throw new DatatypeParseException("Null value passed.",0);
GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone("Etc/UTC"));
cal.clear();
if(!s.startsWith("--"))... | static GregorianCalendar function(String s) throws DatatypeParseException { if(s==null s.isEmpty()) throw new DatatypeParseException(STR,0); GregorianCalendar cal = new GregorianCalendar(TimeZone.getTimeZone(STR)); cal.clear(); if(!s.startsWith("--")){ throw new DatatypeParseException(STR+s+"'.",208); } if(!s.endsWith(... | /**
* Parse an ISO8601 compliant gYear
* @param s Lexical string
* @return
* @throws ParseException
*/ | Parse an ISO8601 compliant gYear | parseISO8601Month | {
"repo_name": "kaefer3000/nxparser",
"path": "src/main/java/org/semanticweb/yars/nx/dt/datetime/ISO8601Parser.java",
"license": "bsd-3-clause",
"size": 22114
} | [
"java.util.GregorianCalendar",
"java.util.TimeZone",
"org.semanticweb.yars.nx.dt.DatatypeParseException"
] | import java.util.GregorianCalendar; import java.util.TimeZone; import org.semanticweb.yars.nx.dt.DatatypeParseException; | import java.util.*; import org.semanticweb.yars.nx.dt.*; | [
"java.util",
"org.semanticweb.yars"
] | java.util; org.semanticweb.yars; | 155,901 |
public static URI getInfoServer(InetSocketAddress namenodeAddr,
Configuration conf, String scheme) throws IOException {
String[] suffixes = null;
if (namenodeAddr != null) {
// if non-default namenode, try reverse look up
// the nameServiceID if it is available
suffixes = getSuffixIDs... | static URI function(InetSocketAddress namenodeAddr, Configuration conf, String scheme) throws IOException { String[] suffixes = null; if (namenodeAddr != null) { suffixes = getSuffixIDs(conf, namenodeAddr, DFSConfigKeys.DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY, DFSConfigKeys.DFS_NAMENODE_RPC_ADDRESS_KEY); } String authorit... | /**
* return server http or https address from the configuration for a
* given namenode rpc address.
* @param namenodeAddr - namenode RPC address
* @param conf configuration
* @param scheme - the scheme (http / https)
* @return server http or https address
* @throws IOException
*/ | return server http or https address from the configuration for a given namenode rpc address | getInfoServer | {
"repo_name": "dennishuo/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSUtil.java",
"license": "apache-2.0",
"size": 63202
} | [
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.URI",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import java.net.InetSocketAddress; import java.net.URI; import org.apache.hadoop.conf.Configuration; | import java.io.*; import java.net.*; import org.apache.hadoop.conf.*; | [
"java.io",
"java.net",
"org.apache.hadoop"
] | java.io; java.net; org.apache.hadoop; | 2,642,330 |
private Block addStoredBlock(final BlockInfo block,
final Block reportedBlock,
DatanodeStorageInfo storageInfo,
DatanodeDescriptor delNodeHint,
boolean logEveryBlock)
throws IOException {
... | Block function(final BlockInfo block, final Block reportedBlock, DatanodeStorageInfo storageInfo, DatanodeDescriptor delNodeHint, boolean logEveryBlock) throws IOException { assert block != null && namesystem.hasWriteLock(); BlockInfo storedBlock; DatanodeDescriptor node = storageInfo.getDatanodeDescriptor(); if (!bloc... | /**
* Modify (block-->datanode) map. Remove block from set of
* needed reconstruction if this takes care of the problem.
* @return the block that is stored in blocksMap.
*/ | Modify (block-->datanode) map. Remove block from set of needed reconstruction if this takes care of the problem | addStoredBlock | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java",
"license": "apache-2.0",
"size": 194442
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.Block",
"org.apache.hadoop.hdfs.server.blockmanagement.CorruptReplicasMap",
"org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.blockmanagement.CorruptReplicasMap; import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; import org.apache.hadoop.hdfs.server.common.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,475,923 |
@Test
public void getClusterDevices() {
WebTarget wt = target();
String response = wt.path("topology/clusters/0/devices").request().get(String.class);
JsonObject result = Json.parse(response).asObject();
assertThat(result, notNullValue());
JsonArray devices = result.get(... | void function() { WebTarget wt = target(); String response = wt.path(STR).request().get(String.class); JsonObject result = Json.parse(response).asObject(); assertThat(result, notNullValue()); JsonArray devices = result.get(STR).asArray(); assertThat(devices.size(), is(2)); assertThat(devices.get(0).asString(), is(STR))... | /**
* Tests an individual cluster's devices list.
*/ | Tests an individual cluster's devices list | getClusterDevices | {
"repo_name": "opennetworkinglab/onos",
"path": "web/api/src/test/java/org/onosproject/rest/resources/TopologyResourceTest.java",
"license": "apache-2.0",
"size": 10300
} | [
"com.eclipsesource.json.Json",
"com.eclipsesource.json.JsonArray",
"com.eclipsesource.json.JsonObject",
"javax.ws.rs.client.WebTarget",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import com.eclipsesource.json.Json; import com.eclipsesource.json.JsonArray; import com.eclipsesource.json.JsonObject; import javax.ws.rs.client.WebTarget; import org.hamcrest.Matchers; import org.junit.Assert; | import com.eclipsesource.json.*; import javax.ws.rs.client.*; import org.hamcrest.*; import org.junit.*; | [
"com.eclipsesource.json",
"javax.ws",
"org.hamcrest",
"org.junit"
] | com.eclipsesource.json; javax.ws; org.hamcrest; org.junit; | 1,705,276 |
public void disconnect() throws IOException
{
__initDefaults();
super.disconnect();
// no worry for data connection, since we always close it
// in every ftp command that invloves data connection
} | void function() throws IOException { __initDefaults(); super.disconnect(); } | /***
* Closes the connection to the FTP server and restores
* connection parameters to the default values.
* <p>
* @exception IOException If an error occurs while disconnecting.
***/ | Closes the connection to the FTP server and restores connection parameters to the default values. | disconnect | {
"repo_name": "kkllwww007/anthelion",
"path": "src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/Client.java",
"license": "apache-2.0",
"size": 21550
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 460,596 |
EventBus.getInstance().post(this);
} | EventBus.getInstance().post(this); } | /**
* Submits the event.
*/ | Submits the event | submit | {
"repo_name": "sujianping/Office-365-SDK-for-Android",
"path": "samples/mail-calendar-contacts-app/demo-app/src/main/java/com/example/office/events/AbstractEvent.java",
"license": "apache-2.0",
"size": 1057
} | [
"com.example.office.events.bus.EventBus"
] | import com.example.office.events.bus.EventBus; | import com.example.office.events.bus.*; | [
"com.example.office"
] | com.example.office; | 2,391,332 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.