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 IdGenerator getIdGeneratorByType(GenerationType generationType) {
if (generationType == null)
return null;
switch (generationType) {
case IDENTITY:
return IdentityIdGenerator.INSTANCE;
case AUTO:
return AutoIdGenerator.INSTANCE;
case UUID25:
return UUID25Generator.INSTANCE;
case... | static IdGenerator function(GenerationType generationType) { if (generationType == null) return null; switch (generationType) { case IDENTITY: return IdentityIdGenerator.INSTANCE; case AUTO: return AutoIdGenerator.INSTANCE; case UUID25: return UUID25Generator.INSTANCE; case UUID26: return UUID26Generator.INSTANCE; case... | /**
* Get one of these IdGenerator instance by generationType:
* IDENTITY,AUTO,UUID25,UUID32,UUID36,TIMESTAMP, if not found , return null;
*/ | Get one of these IdGenerator instance by generationType: IDENTITY,AUTO,UUID25,UUID32,UUID36,TIMESTAMP, if not found , return null | getIdGeneratorByType | {
"repo_name": "drinkjava2/jSQLBox",
"path": "core/src/main/java/com/github/drinkjava2/jdialects/model/TableModel.java",
"license": "apache-2.0",
"size": 18521
} | [
"com.github.drinkjava2.jdialects.annotation.jpa.GenerationType",
"com.github.drinkjava2.jdialects.id.AutoIdGenerator",
"com.github.drinkjava2.jdialects.id.IdGenerator",
"com.github.drinkjava2.jdialects.id.IdentityIdGenerator",
"com.github.drinkjava2.jdialects.id.SnowflakeGenerator",
"com.github.drinkjava2... | import com.github.drinkjava2.jdialects.annotation.jpa.GenerationType; import com.github.drinkjava2.jdialects.id.AutoIdGenerator; import com.github.drinkjava2.jdialects.id.IdGenerator; import com.github.drinkjava2.jdialects.id.IdentityIdGenerator; import com.github.drinkjava2.jdialects.id.SnowflakeGenerator; import com.... | import com.github.drinkjava2.jdialects.annotation.jpa.*; import com.github.drinkjava2.jdialects.id.*; | [
"com.github.drinkjava2"
] | com.github.drinkjava2; | 1,892,646 |
static <T> NotificationAccumulator<Consumer<? super T>, T, T> retainOldestValNotifications() {
return new RetailOldestValNotifications<>();
} | static <T> NotificationAccumulator<Consumer<? super T>, T, T> retainOldestValNotifications() { return new RetailOldestValNotifications<>(); } | /**
* Accumulates only one value (the first one) and ignores the rest.
*/ | Accumulates only one value (the first one) and ignores the rest | retainOldestValNotifications | {
"repo_name": "JordanMartinez/ReactFX",
"path": "reactfx/src/main/java/org/reactfx/util/NotificationAccumulator.java",
"license": "bsd-2-clause",
"size": 10918
} | [
"java.util.function.Consumer"
] | import java.util.function.Consumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 12,736 |
@ApiModelProperty(
required = true,
value =
"Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.")
public Object getPort() {
return port;
} | @ApiModelProperty( required = true, value = STR) Object function() { return port; } | /**
* Number or name of the port to access on the container. Number must be in the range 1 to 65535.
* Name must be an IANA_SVC_NAME.
*
* @return port
*/ | Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME | getPort | {
"repo_name": "kubernetes-client/java",
"path": "client-java-contrib/prometheus-operator/src/main/java/com/coreos/monitoring/models/V1ThanosRulerSpecLifecyclePostStartTcpSocket.java",
"license": "apache-2.0",
"size": 3807
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,010,442 |
public interface ItemOperator {
boolean evaluate(ItemInfo info, View view);
} | interface ItemOperator { boolean function(ItemInfo info, View view); } | /**
* Process the next itemInfo, possibly with side-effect on the next item.
*
* @param info info for the shortcut
* @param view view for the shortcut
* @return true if done, false to continue the map
*/ | Process the next itemInfo, possibly with side-effect on the next item | evaluate | {
"repo_name": "enricocid/LaunchEnr",
"path": "Launcher3-O-r12/src/main/java/com/enrico/launcher3/Workspace.java",
"license": "gpl-3.0",
"size": 166028
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 637,995 |
private void updateStreamPosition() throws IOException {
try {
editLogFilePosition = inputStream.getPosition();
} catch (IOException e) {
LOG.error("Failed to get edit log file position", e);
throw new IOException("updateStreamPosition failed");
}
}
| void function() throws IOException { try { editLogFilePosition = inputStream.getPosition(); } catch (IOException e) { LOG.error(STR, e); throw new IOException(STR); } } | /**
* Sets the current position of the input stream, after a
* transaction has been successfully consumed.
* @throws IOException if a fatal error occurred.
*/ | Sets the current position of the input stream, after a transaction has been successfully consumed | updateStreamPosition | {
"repo_name": "shakamunyi/hadoop-20",
"path": "src/contrib/namespace-notifier/src/java/org/apache/hadoop/hdfs/notifier/server/ServerLogReaderPreTransactional.java",
"license": "apache-2.0",
"size": 15965
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,587,153 |
private ConfigurationProperty _getFormatProperty(String engineName)
throws IllegalActionException {
// make sure it's not empty.
if (_formatTypeStr.trim().isEmpty()) {
throw new IllegalActionException(this, "Missing format name.");
}
// try to find the forma... | ConfigurationProperty function(String engineName) throws IllegalActionException { if (_formatTypeStr.trim().isEmpty()) { throw new IllegalActionException(this, STR); } final List<ConfigurationProperty> formatList = ConfigurationManager .getInstance() .getProperty(ConfigurationManager.getModule(STR)) .getProperties(_FOR... | /** Get the configuration property with the same name as the format type.
*
* @param engineName If not null, returns the property whose implementation
* class is for the specified engine. Otherwise, returns the first property
* with the same name as the format type.
*/ | Get the configuration property with the same name as the format type | _getFormatProperty | {
"repo_name": "cxbrooks/keplerTriquetrum",
"path": "org.kepler.triquetrum.ddp/src/org/kepler/ddp/actor/pattern/AtomicPatternActor.java",
"license": "bsd-3-clause",
"size": 23299
} | [
"java.util.List",
"org.kepler.configuration.ConfigurationManager",
"org.kepler.configuration.ConfigurationProperty"
] | import java.util.List; import org.kepler.configuration.ConfigurationManager; import org.kepler.configuration.ConfigurationProperty; | import java.util.*; import org.kepler.configuration.*; | [
"java.util",
"org.kepler.configuration"
] | java.util; org.kepler.configuration; | 2,618,173 |
ExpectedCondition<Boolean> isVisible(); | ExpectedCondition<Boolean> isVisible(); | /**
* Returns a condition holding if and only if the element is visible (present and displayed).
*
* @return
*/ | Returns a condition holding if and only if the element is visible (present and displayed) | isVisible | {
"repo_name": "mikesir87/arquillian-graphene",
"path": "impl/src/main/java/org/jboss/arquillian/graphene/condition/ElementConditionFactory.java",
"license": "apache-2.0",
"size": 2090
} | [
"org.openqa.selenium.support.ui.ExpectedCondition"
] | import org.openqa.selenium.support.ui.ExpectedCondition; | import org.openqa.selenium.support.ui.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 2,719,196 |
public ConnectPoint src() {
return src;
} | ConnectPoint function() { return src; } | /**
* Returns source connect point.
*
* @return source connect point
*/ | Returns source connect point | src | {
"repo_name": "Shashikanth-Huawei/bmp",
"path": "apps/newoptical/src/main/java/org/onosproject/newoptical/PacketLinkRealizedByOptical.java",
"license": "apache-2.0",
"size": 5564
} | [
"org.onosproject.net.ConnectPoint"
] | import org.onosproject.net.ConnectPoint; | import org.onosproject.net.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 462,640 |
public final IResource getResource() {
try {
final ResourceTraversal[] traversals= getTraversals(null, null);
if (traversals.length > 0) {
final IResource[] resources= traversals[0].getResources();
if (resources.length > 0)
return resources[0];
}
} catch (CoreException exception) {
Refac... | final IResource function() { try { final ResourceTraversal[] traversals= getTraversals(null, null); if (traversals.length > 0) { final IResource[] resources= traversals[0].getResources(); if (resources.length > 0) return resources[0]; } } catch (CoreException exception) { RefactoringCorePlugin.log(exception); } return ... | /**
* Returns the associated resource.
*
* @return the associated resource, or <code>null</code> if the descriptor
* contains no timestamp or project information
*/ | Returns the associated resource | getResource | {
"repo_name": "gazarenkov/che-sketch",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/src/main/java/org/eclipse/ltk/core/refactoring/model/AbstractRefactoringDescriptorResourceMapping.java",
"license": "epl-1.0",
"size": 4994
} | [
"org.eclipse.core.resources.IResource",
"org.eclipse.core.resources.mapping.ResourceTraversal",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin"
] | import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.mapping.ResourceTraversal; import org.eclipse.core.runtime.CoreException; import org.eclipse.ltk.internal.core.refactoring.RefactoringCorePlugin; | import org.eclipse.core.resources.*; import org.eclipse.core.resources.mapping.*; import org.eclipse.core.runtime.*; import org.eclipse.ltk.internal.core.refactoring.*; | [
"org.eclipse.core",
"org.eclipse.ltk"
] | org.eclipse.core; org.eclipse.ltk; | 2,128,861 |
private static String exceptionToString(TryTree tree, VisitorState state) {
if (tree.getCatches().size() != 1) {
return "Exception";
}
Tree exceptionType = tree.getCatches().iterator().next().getParameter().getType();
Type type = ASTHelpers.getType(exceptionType);
if (type != null && type.is... | static String function(TryTree tree, VisitorState state) { if (tree.getCatches().size() != 1) { return STR; } Tree exceptionType = tree.getCatches().iterator().next().getParameter().getType(); Type type = ASTHelpers.getType(exceptionType); if (type != null && type.isUnion()) { return STR; } return state.getSourceForNod... | /**
* Returns a string describing the exception type caught by the given try tree's catch
* statement(s), defaulting to {@code "Exception"} if more than one exception type is caught.
*/ | Returns a string describing the exception type caught by the given try tree's catch statement(s), defaulting to "Exception" if more than one exception type is caught | exceptionToString | {
"repo_name": "cushon/error-prone",
"path": "core/src/main/java/com/google/errorprone/bugpatterns/MissingFail.java",
"license": "apache-2.0",
"size": 20646
} | [
"com.google.errorprone.VisitorState",
"com.google.errorprone.util.ASTHelpers",
"com.sun.source.tree.Tree",
"com.sun.source.tree.TryTree",
"com.sun.tools.javac.code.Type"
] | import com.google.errorprone.VisitorState; import com.google.errorprone.util.ASTHelpers; import com.sun.source.tree.Tree; import com.sun.source.tree.TryTree; import com.sun.tools.javac.code.Type; | import com.google.errorprone.*; import com.google.errorprone.util.*; import com.sun.source.tree.*; import com.sun.tools.javac.code.*; | [
"com.google.errorprone",
"com.sun.source",
"com.sun.tools"
] | com.google.errorprone; com.sun.source; com.sun.tools; | 214,014 |
boolean tx(Config config, int transactionLevel, IAtom atom) {
Connection conn = config.getThreadLocalConnection();
if (conn != null) { // Nested transaction support
try {
if (conn.getTransactionIsolation() < transactionLevel)
conn.setTransactionIsolation(transactionLevel);
boolean result = ... | boolean tx(Config config, int transactionLevel, IAtom atom) { Connection conn = config.getThreadLocalConnection(); if (conn != null) { try { if (conn.getTransactionIsolation() < transactionLevel) conn.setTransactionIsolation(transactionLevel); boolean result = atom.run(); if (result) return true; throw new NestedTransa... | /**
* Execute transaction.
* @param config the Config object
* @param transactionLevel the transaction level
* @param atom the atom operation
* @return true if transaction executing succeed otherwise false
*/ | Execute transaction | tx | {
"repo_name": "zhengjiabin/domeke",
"path": "core/src/main/java/com/jfinal/plugin/activerecord/DbPro.java",
"license": "apache-2.0",
"size": 30504
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,647,989 |
public boolean recordModifies(Set<String> modifies) {
if (!hasAnySingletonSideEffectTags()
&& currentInfo.setModifies(modifies)) {
populated = true;
return true;
} else {
return false;
}
} | boolean function(Set<String> modifies) { if (!hasAnySingletonSideEffectTags() && currentInfo.setModifies(modifies)) { populated = true; return true; } else { return false; } } | /**
* Records the list of modifies warnings.
*/ | Records the list of modifies warnings | recordModifies | {
"repo_name": "dound/google-closure-compiler",
"path": "src/com/google/javascript/rhino/JSDocInfoBuilder.java",
"license": "apache-2.0",
"size": 27750
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 643,293 |
@Test
public void testAppend() throws IOException {
final int maxOldFileLen = 2*BLOCK_SIZE+1;
final int maxFlushedBytes = BLOCK_SIZE;
byte[] contents = AppendTestUtil.initBuffer(
maxOldFileLen+2*maxFlushedBytes);
for (int oldFileLen =0; oldFileLen <=maxOldFileLen; oldFileLen++) {
for (... | void function() throws IOException { final int maxOldFileLen = 2*BLOCK_SIZE+1; final int maxFlushedBytes = BLOCK_SIZE; byte[] contents = AppendTestUtil.initBuffer( maxOldFileLen+2*maxFlushedBytes); for (int oldFileLen =0; oldFileLen <=maxOldFileLen; oldFileLen++) { for (int flushedBytes1=0; flushedBytes1<=maxFlushedByt... | /**
* Comprehensive test for append
* @throws IOException an exception might be thrown
*/ | Comprehensive test for append | testAppend | {
"repo_name": "tseen/Federated-HDFS",
"path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/FileAppendTest4.java",
"license": "apache-2.0",
"size": 4438
} | [
"java.io.IOException",
"org.apache.hadoop.fs.CommonConfigurationKeys",
"org.apache.hadoop.fs.FSDataOutputStream",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,833,414 |
protected boolean editorErrorMatches(final EditorError perror) {
return perror != null && perror.getEditor() != null
&& (equals(perror.getEditor()) || perror.getEditor().equals(asEditor()));
} | boolean function(final EditorError perror) { return perror != null && perror.getEditor() != null && (equals(perror.getEditor()) perror.getEditor().equals(asEditor())); } | /**
* Checks if a error belongs to this widget.
*
* @param perror editor error to check
* @return true if the error belongs to this widget
*/ | Checks if a error belongs to this widget | editorErrorMatches | {
"repo_name": "ManfredTremmel/gwt-bean-validators",
"path": "gwt-mt-widgets/src/main/java/de/knightsoftnet/mtwidgets/client/ui/widget/ValueBoxBaseWithEditorErrors.java",
"license": "apache-2.0",
"size": 6364
} | [
"com.google.gwt.editor.client.EditorError"
] | import com.google.gwt.editor.client.EditorError; | import com.google.gwt.editor.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,505,609 |
public BigDecimal getProfit() {
return profit;
} | BigDecimal function() { return profit; } | /**
* Calculate the total profit for this security.
* <seealso cref="NetProfit"/>
*/ | Calculate the total profit for this security. | getProfit | {
"repo_name": "aricooperman/jLean",
"path": "src/main/java/com/quantconnect/lean/securities/SecurityHolding.java",
"license": "apache-2.0",
"size": 9240
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,437,154 |
protected String generateValue()
throws Exception
{
if (isStatic())
return '"' + escapeJavaString(getStaticText()) + '"';
_isValueFragment = true;
if (hasScriptingElement() && isJspFragment()) {
JspNode node = findScriptingNode();
if (node == null)
throw error(L.l("F... | String function() throws Exception { if (isStatic()) return 'STR'; _isValueFragment = true; if (hasScriptingElement() && isJspFragment()) { JspNode node = findScriptingNode(); if (node == null) throw error(L.l(STR)); else if (node._filename.equals(_filename)) throw node.error(L.l(STR)); } if (isSingleExpression()) { Js... | /**
* Generates the code for a fragment.
*/ | Generates the code for a fragment | generateValue | {
"repo_name": "dlitz/resin",
"path": "modules/resin/src/com/caucho/jsp/java/JspFragmentNode.java",
"license": "gpl-2.0",
"size": 8398
} | [
"com.caucho.jsp.TagInstance",
"com.caucho.util.CharBuffer"
] | import com.caucho.jsp.TagInstance; import com.caucho.util.CharBuffer; | import com.caucho.jsp.*; import com.caucho.util.*; | [
"com.caucho.jsp",
"com.caucho.util"
] | com.caucho.jsp; com.caucho.util; | 2,907,264 |
@Test(timeout=300000)
public void test3686b() throws Exception {
LOG.info("START ************ test3686b");
HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(TABLE_NAME);
Scan scan = new Scan();
scan.setCaching(SCANNER_CACHING);
// Set a very high timeout, we want to test what happens when ... | @Test(timeout=300000) void function() throws Exception { LOG.info(STR); HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(TABLE_NAME); Scan scan = new Scan(); scan.setCaching(SCANNER_CACHING); Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); conf.setInt(HConstants.HBASE_CLIENT_SCANNER_TIMEOUT... | /**
* Make sure that no rows are lost if the scanner timeout is longer on the
* client than the server, and the scan times out on the server but not the
* client.
* @throws Exception
*/ | Make sure that no rows are lost if the scanner timeout is longer on the client than the server, and the scan times out on the server but not the client | test3686b | {
"repo_name": "throughsky/lywebank",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java",
"license": "apache-2.0",
"size": 8209
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.regionserver.HRegionServer",
"org.junit.Assert",
"org.junit.Test"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.junit.Assert; import org.junit.Test; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.regionserver.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 603,048 |
//-----------------------------------------------------------------------
public final MetaProperty<ExternalId> swapConvention() {
return _swapConvention;
} | final MetaProperty<ExternalId> function() { return _swapConvention; } | /**
* The meta-property for the {@code swapConvention} property.
* @return the meta-property, not null
*/ | The meta-property for the swapConvention property | swapConvention | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial-types/src/main/java/com/opengamma/financial/convention/DeliverablePriceQuotedSwapFutureConvention.java",
"license": "apache-2.0",
"size": 10873
} | [
"com.opengamma.id.ExternalId",
"org.joda.beans.MetaProperty"
] | import com.opengamma.id.ExternalId; import org.joda.beans.MetaProperty; | import com.opengamma.id.*; import org.joda.beans.*; | [
"com.opengamma.id",
"org.joda.beans"
] | com.opengamma.id; org.joda.beans; | 1,115,682 |
private void ackSystemProperties() {
assert log != null;
if (log.isDebugEnabled() && S.INCLUDE_SENSITIVE)
for (Map.Entry<Object, Object> entry : snapshot().entrySet())
log.debug("System property [" + entry.getKey() + '=' + entry.getValue() + ']');
} | void function() { assert log != null; if (log.isDebugEnabled() && S.INCLUDE_SENSITIVE) for (Map.Entry<Object, Object> entry : snapshot().entrySet()) log.debug(STR + entry.getKey() + '=' + entry.getValue() + ']'); } | /**
* Prints all system properties in debug mode.
*/ | Prints all system properties in debug mode | ackSystemProperties | {
"repo_name": "vladisav/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java",
"license": "apache-2.0",
"size": 149287
} | [
"java.util.Map",
"org.apache.ignite.IgniteSystemProperties"
] | import java.util.Map; import org.apache.ignite.IgniteSystemProperties; | import java.util.*; import org.apache.ignite.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 747,623 |
public SignificantTermsBuilder include(String [] terms) {
if (includePattern != null) {
throw new ElasticsearchIllegalArgumentException("include clause must be an array of exact values or a regex, not both");
}
this.includeTerms = terms;
return this;
} | SignificantTermsBuilder function(String [] terms) { if (includePattern != null) { throw new ElasticsearchIllegalArgumentException(STR); } this.includeTerms = terms; return this; } | /**
* Define a set of terms that should be aggregated.
*/ | Define a set of terms that should be aggregated | include | {
"repo_name": "dantuffery/elasticsearch",
"path": "src/main/java/org/elasticsearch/search/aggregations/bucket/significant/SignificantTermsBuilder.java",
"license": "apache-2.0",
"size": 10047
} | [
"org.elasticsearch.ElasticsearchIllegalArgumentException"
] | import org.elasticsearch.ElasticsearchIllegalArgumentException; | import org.elasticsearch.*; | [
"org.elasticsearch"
] | org.elasticsearch; | 2,459,311 |
@Internal("Represented as part of archiveName")
public String getAppendix() {
return appendix;
} | @Internal(STR) String function() { return appendix; } | /**
* Returns the appendix part of the archive name, if any.
*
* @return the appendix. May be null
*/ | Returns the appendix part of the archive name, if any | getAppendix | {
"repo_name": "lsmaira/gradle",
"path": "subprojects/core/src/main/java/org/gradle/api/tasks/bundling/AbstractArchiveTask.java",
"license": "apache-2.0",
"size": 9826
} | [
"org.gradle.api.tasks.Internal"
] | import org.gradle.api.tasks.Internal; | import org.gradle.api.tasks.*; | [
"org.gradle.api"
] | org.gradle.api; | 419,153 |
public DependencyCollectionTask getDependencyTaskForMultiInsert() {
if (dependencyTaskForMultiInsert == null) {
if (conf.getBoolVar(ConfVars.HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES)) {
dependencyTaskForMultiInsert =
(DependencyCollectionTask) TaskFactory.get(new DependencyCollect... | DependencyCollectionTask function() { if (dependencyTaskForMultiInsert == null) { if (conf.getBoolVar(ConfVars.HIVE_MULTI_INSERT_MOVE_TASKS_SHARE_DEPENDENCIES)) { dependencyTaskForMultiInsert = (DependencyCollectionTask) TaskFactory.get(new DependencyCollectionWork()); } } return dependencyTaskForMultiInsert; } | /**
* Returns dependencyTaskForMultiInsert initializing it if necessary.
*
* dependencyTaskForMultiInsert serves as a mutual dependency for the final move tasks in a
* multi-insert query.
*
* @return
*/ | Returns dependencyTaskForMultiInsert initializing it if necessary. dependencyTaskForMultiInsert serves as a mutual dependency for the final move tasks in a multi-insert query | getDependencyTaskForMultiInsert | {
"repo_name": "lirui-apache/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMRProcContext.java",
"license": "apache-2.0",
"size": 11997
} | [
"org.apache.hadoop.hive.conf.HiveConf",
"org.apache.hadoop.hive.ql.exec.DependencyCollectionTask",
"org.apache.hadoop.hive.ql.exec.TaskFactory",
"org.apache.hadoop.hive.ql.plan.DependencyCollectionWork"
] | import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.DependencyCollectionTask; import org.apache.hadoop.hive.ql.exec.TaskFactory; import org.apache.hadoop.hive.ql.plan.DependencyCollectionWork; | import org.apache.hadoop.hive.conf.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.plan.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,204,757 |
public Editor edit(String key) throws IOException {
return edit(key, ANY_SEQUENCE_NUMBER);
} | Editor function(String key) throws IOException { return edit(key, ANY_SEQUENCE_NUMBER); } | /**
* Returns an editor for the entry named {@code key}, or null if another
* edit is in progress.
*/ | Returns an editor for the entry named key, or null if another edit is in progress | edit | {
"repo_name": "jinmiao/okhttp",
"path": "okhttp/src/main/java/com/squareup/okhttp/internal/DiskLruCache.java",
"license": "apache-2.0",
"size": 33962
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 946,218 |
List <Integer> setters = new ArrayList<Integer>();
setters.add(Integer.valueOf(FieldChangeSetters.SET_TO));
setters.add(Integer.valueOf(FieldChangeSetters.ADD_IF_SET));
setters.add(Integer.valueOf(FieldChangeSetters.ADD_OR_SET));
if (!required) {
setters.add(Integer.valueOf(FieldChangeSetters.SET_NULL)... | List <Integer> setters = new ArrayList<Integer>(); setters.add(Integer.valueOf(FieldChangeSetters.SET_TO)); setters.add(Integer.valueOf(FieldChangeSetters.ADD_IF_SET)); setters.add(Integer.valueOf(FieldChangeSetters.ADD_OR_SET)); if (!required) { setters.add(Integer.valueOf(FieldChangeSetters.SET_NULL)); setters.add(In... | /**
* Gets the possible setters for an activity type
* @param required
* @param withParameter
*/ | Gets the possible setters for an activity type | getPossibleSetters | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/fieldType/fieldChange/config/DoubleFieldChangeConfig.java",
"license": "gpl-3.0",
"size": 3082
} | [
"com.aurel.track.fieldType.fieldChange.FieldChangeSetters",
"java.util.ArrayList",
"java.util.List"
] | import com.aurel.track.fieldType.fieldChange.FieldChangeSetters; import java.util.ArrayList; import java.util.List; | import com.aurel.track.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 482,937 |
public Collection<String> getUsernames() {
return provider.getUsernames();
} | Collection<String> function() { return provider.getUsernames(); } | /**
* Returns an unmodifiable Collection of usernames of all users in the system.
*
* @return an unmodifiable Collection of all usernames in the system.
*/ | Returns an unmodifiable Collection of usernames of all users in the system | getUsernames | {
"repo_name": "saveendhiman/OpenfirePluginSample",
"path": "openfiresource/src/org/jivesoftware/openfire/user/UserManager.java",
"license": "apache-2.0",
"size": 19968
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 226,603 |
// deprecated
//-------------------------------------------------------------------------
@GET
@Path("conventionSearches/list")
public Response searchList(@QueryParam("id") final List<String> externalIdStrs) {
final ExternalIdBundle bundle = ExternalIdBundle.parse(externalIdStrs);
@SuppressWarnings("... | @Path(STR) Response function(@QueryParam("id") final List<String> externalIdStrs) { final ExternalIdBundle bundle = ExternalIdBundle.parse(externalIdStrs); @SuppressWarnings(STR) final Collection<? extends Convention> result = getConventionSource().get(bundle); return responseOkObject(FudgeListWrapper.of(result)); } | /**
* Searches for conventions by external identifiers.
*
* @param externalIdStrs
* the external ids, not null
* @return the conventions as a Fudge message
*/ | Searches for conventions by external identifiers | searchList | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core-rest/src/main/java/com/opengamma/core/convention/impl/DataConventionSourceResource.java",
"license": "apache-2.0",
"size": 7554
} | [
"com.opengamma.core.convention.Convention",
"com.opengamma.id.ExternalIdBundle",
"com.opengamma.util.fudgemsg.FudgeListWrapper",
"java.util.Collection",
"java.util.List",
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Response"
] | import com.opengamma.core.convention.Convention; import com.opengamma.id.ExternalIdBundle; import com.opengamma.util.fudgemsg.FudgeListWrapper; import java.util.Collection; import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; | import com.opengamma.core.convention.*; import com.opengamma.id.*; import com.opengamma.util.fudgemsg.*; import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.opengamma.core",
"com.opengamma.id",
"com.opengamma.util",
"java.util",
"javax.ws"
] | com.opengamma.core; com.opengamma.id; com.opengamma.util; java.util; javax.ws; | 2,136,416 |
public boolean checkStartable(final CompilationTimeStamp timestamp, final Location errorLocation) {
check(timestamp);
if (isStartable) {
return true;
}
if (runsOnRef == null) {
errorLocation.reportSemanticError(MessageFormat.format(
"Function `{0}'' cannot be started on parallel test component b... | boolean function(final CompilationTimeStamp timestamp, final Location errorLocation) { check(timestamp); if (isStartable) { return true; } if (runsOnRef == null) { errorLocation.reportSemanticError(MessageFormat.format( STR, getFullName())); } formalParList.checkStartability(timestamp, STR, this, errorLocation); if (re... | /**
* Checks and returns whether the function is startable. Reports the
* appropriate error messages.
*
* @param timestamp
* the timestamp of the actual build cycle.
* @param errorLocation
* the location to report the error to, if needed.
*
* @return true if startable, ... | Checks and returns whether the function is startable. Reports the appropriate error messages | checkStartable | {
"repo_name": "alovassy/titan.EclipsePlug-ins",
"path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/definitions/Def_Function.java",
"license": "epl-1.0",
"size": 28597
} | [
"java.text.MessageFormat",
"java.util.HashSet",
"java.util.Set",
"org.eclipse.titan.designer.AST",
"org.eclipse.titan.designer.parsers.CompilationTimeStamp"
] | import java.text.MessageFormat; import java.util.HashSet; import java.util.Set; import org.eclipse.titan.designer.AST; import org.eclipse.titan.designer.parsers.CompilationTimeStamp; | import java.text.*; import java.util.*; import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.parsers.*; | [
"java.text",
"java.util",
"org.eclipse.titan"
] | java.text; java.util; org.eclipse.titan; | 2,871,452 |
static CandidateTimestampFormat makeCandidateFromOverrideFormat(String overrideFormat, TimeoutChecker timeoutChecker) {
// First check for a special format string
switch (overrideFormat.toUpperCase(Locale.ROOT)) {
case "ISO8601":
return ISO8601_CANDIDATE_FORMAT;
... | static CandidateTimestampFormat makeCandidateFromOverrideFormat(String overrideFormat, TimeoutChecker timeoutChecker) { switch (overrideFormat.toUpperCase(Locale.ROOT)) { case STR: return ISO8601_CANDIDATE_FORMAT; case STR: return UNIX_MS_CANDIDATE_FORMAT; case "UNIX": return UNIX_CANDIDATE_FORMAT; case STR: return TAI... | /**
* Given a user supplied Java timestamp format, return an appropriate candidate timestamp object as required by this class.
* The returned candidate might be a built-in one, or might be generated from the supplied format.
* @param overrideFormat A user supplied Java timestamp format.
* @param tim... | Given a user supplied Java timestamp format, return an appropriate candidate timestamp object as required by this class. The returned candidate might be a built-in one, or might be generated from the supplied format | makeCandidateFromOverrideFormat | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "x-pack/plugin/text-structure/src/main/java/org/elasticsearch/xpack/textstructure/structurefinder/TimestampFormatFinder.java",
"license": "apache-2.0",
"size": 88274
} | [
"java.time.DateTimeException",
"java.time.Instant",
"java.time.ZoneOffset",
"java.time.format.DateTimeFormatter",
"java.util.Collections",
"java.util.Locale",
"org.elasticsearch.core.Tuple"
] | import java.time.DateTimeException; import java.time.Instant; import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.Collections; import java.util.Locale; import org.elasticsearch.core.Tuple; | import java.time.*; import java.time.format.*; import java.util.*; import org.elasticsearch.core.*; | [
"java.time",
"java.util",
"org.elasticsearch.core"
] | java.time; java.util; org.elasticsearch.core; | 432,161 |
public static void renameFile(File source, File dest) throws BuildException {
try {
FileUtils fileUtils = FileUtils.getFileUtils();
fileUtils.rename(source, dest);
}
catch (IOException e) {
throw new BuildException("Failed to rename " + source.getPath() + " to " + dest.getPath(), e);
}
}
| static void function(File source, File dest) throws BuildException { try { FileUtils fileUtils = FileUtils.getFileUtils(); fileUtils.rename(source, dest); } catch (IOException e) { throw new BuildException(STR + source.getPath() + STR + dest.getPath(), e); } } | /**
* Rename the <code>source</code> file to the <code>dest</code> file.
*
* @param source the source file.
* @param dest the dest file.
*
* @throws BuildException in case of an error.
*/ | Rename the <code>source</code> file to the <code>dest</code> file | renameFile | {
"repo_name": "bmeurer/antex",
"path": "src/main/java/de/unisiegen/informatik/antex/SystemUtils.java",
"license": "apache-2.0",
"size": 2276
} | [
"java.io.File",
"java.io.IOException",
"org.apache.tools.ant.BuildException",
"org.apache.tools.ant.util.FileUtils"
] | import java.io.File; import java.io.IOException; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.util.FileUtils; | import java.io.*; import org.apache.tools.ant.*; import org.apache.tools.ant.util.*; | [
"java.io",
"org.apache.tools"
] | java.io; org.apache.tools; | 2,210,810 |
protected Image platformImageBytesToImage(
byte[] bytes, long format) throws IOException
{
String mimeType = null;
if (format == PNG_ATOM.getAtom()) {
mimeType = "image/png";
} else if (format == JFIF_ATOM.getAtom()) {
mimeType = "image/jpeg";
} el... | Image function( byte[] bytes, long format) throws IOException { String mimeType = null; if (format == PNG_ATOM.getAtom()) { mimeType = STR; } else if (format == JFIF_ATOM.getAtom()) { mimeType = STR; } else { try { String nat = getNativeForFormat(format); DataFlavor df = new DataFlavor(nat); String primaryType = df.get... | /**
* Translates either a byte array or an input stream which contain
* platform-specific image data in the given format into an Image.
*/ | Translates either a byte array or an input stream which contain platform-specific image data in the given format into an Image | platformImageBytesToImage | {
"repo_name": "stain/jdk8u",
"path": "src/solaris/classes/sun/awt/X11/XDataTransferer.java",
"license": "gpl-2.0",
"size": 15846
} | [
"java.awt.Image",
"java.awt.datatransfer.DataFlavor",
"java.io.IOException"
] | import java.awt.Image; import java.awt.datatransfer.DataFlavor; import java.io.IOException; | import java.awt.*; import java.awt.datatransfer.*; import java.io.*; | [
"java.awt",
"java.io"
] | java.awt; java.io; | 1,780,194 |
private static InputStream getXpacket(PDDocument document)
throws IOException, XpacketParsingException
{
PDDocumentCatalog catalog = document.getDocumentCatalog();
PDMetadata metadata = catalog.getMetadata();
if (metadata == null)
{
COSBase metaObject = ca... | static InputStream function(PDDocument document) throws IOException, XpacketParsingException { PDDocumentCatalog catalog = document.getDocumentCatalog(); PDMetadata metadata = catalog.getMetadata(); if (metadata == null) { COSBase metaObject = catalog.getCOSObject().getDictionaryObject(COSName.METADATA); if (!(metaObje... | /**
* Return the xpacket from the dictionary's stream
*/ | Return the xpacket from the dictionary's stream | getXpacket | {
"repo_name": "kalaspuffar/pdfbox",
"path": "preflight/src/main/java/org/apache/pdfbox/preflight/process/MetadataValidationProcess.java",
"license": "apache-2.0",
"size": 12373
} | [
"java.io.IOException",
"java.io.InputStream",
"org.apache.pdfbox.cos.COSBase",
"org.apache.pdfbox.cos.COSName",
"org.apache.pdfbox.cos.COSStream",
"org.apache.pdfbox.pdmodel.PDDocument",
"org.apache.pdfbox.pdmodel.PDDocumentCatalog",
"org.apache.pdfbox.pdmodel.common.PDMetadata",
"org.apache.pdfbox.... | import java.io.IOException; import java.io.InputStream; import org.apache.pdfbox.cos.COSBase; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSStream; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.PDDocumentCatalog; import org.apache.pdfbox.pdmodel.common.PDMetadata;... | import java.io.*; import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.*; import org.apache.pdfbox.pdmodel.common.*; import org.apache.pdfbox.preflight.*; import org.apache.pdfbox.preflight.metadata.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 2,682,988 |
public ConfigurationEntry setActive(Collection<Address> members) {
this.active = Assert.notNull(members, "members");
return this;
} | ConfigurationEntry function(Collection<Address> members) { this.active = Assert.notNull(members, STR); return this; } | /**
* Sets the active members.
*
* @param members The active members.
* @return The configuration entry.
* @throws NullPointerException if {@code members} is null
*/ | Sets the active members | setActive | {
"repo_name": "madjam/copycat-1",
"path": "server/src/main/java/io/atomix/copycat/server/storage/entry/ConfigurationEntry.java",
"license": "apache-2.0",
"size": 3033
} | [
"io.atomix.catalyst.transport.Address",
"io.atomix.catalyst.util.Assert",
"java.util.Collection"
] | import io.atomix.catalyst.transport.Address; import io.atomix.catalyst.util.Assert; import java.util.Collection; | import io.atomix.catalyst.transport.*; import io.atomix.catalyst.util.*; import java.util.*; | [
"io.atomix.catalyst",
"java.util"
] | io.atomix.catalyst; java.util; | 1,507,358 |
private ArrayList<Integer> getListOfRows(ArrayList<GridPos> list) {
ArrayList<Integer> result = new ArrayList<Integer>();
for (GridPos pos : list) {
result.add(pos.getRow());
}
return result;
}
| ArrayList<Integer> function(ArrayList<GridPos> list) { ArrayList<Integer> result = new ArrayList<Integer>(); for (GridPos pos : list) { result.add(pos.getRow()); } return result; } | /**
* Gets a list of every row index for every GridPos in a list
* @param list the list to extract the row indices from
* @return an ArrayList of Integers with every row index in the original list
*/ | Gets a list of every row index for every GridPos in a list | getListOfRows | {
"repo_name": "stutonk/shinro",
"path": "shinro/ShinroSolver.java",
"license": "mit",
"size": 29837
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,173,790 |
return _return;
}
/**
* Sets the value of the return property.
*
* @param value
* allowed object is
* {@link BigDecimal } | return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link BigDecimal } | /**
* Gets the value of the return property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/ | Gets the value of the return property | getReturn | {
"repo_name": "joedayz/javaee-with-websphere-samples",
"path": "RAD8WebServiceClient/src/itso/rad8/bank/model/simple/GetAccountBalanceResponse.java",
"license": "apache-2.0",
"size": 1646
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 535,307 |
void log(CeppoLevel level, Date timestamp, ThreadContext context, Term... terms); | void log(CeppoLevel level, Date timestamp, ThreadContext context, Term... terms); | /**
* Tells the underlying log device to compose a message made of the given terms.
*
* @param level
* @param timestamp
* @param context
* @param terms
*/ | Tells the underlying log device to compose a message made of the given terms | log | {
"repo_name": "sfragis/ceppo",
"path": "src/main/java/eu/fabiostrozzi/ceppo/adapter/Adapter.java",
"license": "apache-2.0",
"size": 2569
} | [
"eu.fabiostrozzi.ceppo.CeppoLevel",
"eu.fabiostrozzi.ceppo.ThreadContext",
"eu.fabiostrozzi.ceppo.terms.Term",
"java.util.Date"
] | import eu.fabiostrozzi.ceppo.CeppoLevel; import eu.fabiostrozzi.ceppo.ThreadContext; import eu.fabiostrozzi.ceppo.terms.Term; import java.util.Date; | import eu.fabiostrozzi.ceppo.*; import eu.fabiostrozzi.ceppo.terms.*; import java.util.*; | [
"eu.fabiostrozzi.ceppo",
"java.util"
] | eu.fabiostrozzi.ceppo; java.util; | 2,371,597 |
double computeFactorForTimeSlice(TimeSlice timeSlice,
long usagePeriodStart, long usagePeriodEnd,
boolean adjustsPeriodStart, boolean adjustsPeriodEnd) {
if (usagePeriodEnd < usagePeriodStart) {
throw new IllegalArgumentException("Usage period end ("
... | double computeFactorForTimeSlice(TimeSlice timeSlice, long usagePeriodStart, long usagePeriodEnd, boolean adjustsPeriodStart, boolean adjustsPeriodEnd) { if (usagePeriodEnd < usagePeriodStart) { throw new IllegalArgumentException(STR + new Date(usagePeriodEnd) + STR + new Date(usagePeriodStart) + ")"); } Calendar start... | /**
* Calculate the factor for a specific time slice and usage period.
* According to the flag of extend usage start/end, the usage period time is
* extended (or not) to the start/end time of the time unit before the
* factor is calculated.
*/ | Calculate the factor for a specific time slice and usage period. According to the flag of extend usage start/end, the usage period time is extended (or not) to the start/end time of the time unit before the factor is calculated | computeFactorForTimeSlice | {
"repo_name": "opetrovski/development",
"path": "oscm-billing/javasrc/org/oscm/billingservice/business/calculation/revenue/CostCalculatorPerUnit.java",
"license": "apache-2.0",
"size": 48613
} | [
"java.util.Calendar",
"java.util.Date",
"org.oscm.billingservice.business.calculation.revenue.model.TimeSlice",
"org.oscm.internal.types.exception.IllegalArgumentException",
"org.oscm.types.exceptions.BillingRunFailed"
] | import java.util.Calendar; import java.util.Date; import org.oscm.billingservice.business.calculation.revenue.model.TimeSlice; import org.oscm.internal.types.exception.IllegalArgumentException; import org.oscm.types.exceptions.BillingRunFailed; | import java.util.*; import org.oscm.billingservice.business.calculation.revenue.model.*; import org.oscm.internal.types.exception.*; import org.oscm.types.exceptions.*; | [
"java.util",
"org.oscm.billingservice",
"org.oscm.internal",
"org.oscm.types"
] | java.util; org.oscm.billingservice; org.oscm.internal; org.oscm.types; | 461,902 |
public static int getRandomColor() {
final Random random = new Random();
return Color.rgb(random.nextInt(256), random.nextInt(256), random.nextInt(256));
} | static int function() { final Random random = new Random(); return Color.rgb(random.nextInt(256), random.nextInt(256), random.nextInt(256)); } | /**
* Generates a random color
*
* @return the color, as defined by the `android.graphics.Color` class
*/ | Generates a random color | getRandomColor | {
"repo_name": "delight-im/Android-Commons",
"path": "Source/library/src/main/java/im/delight/android/commons/UI.java",
"license": "apache-2.0",
"size": 11527
} | [
"android.graphics.Color",
"java.util.Random"
] | import android.graphics.Color; import java.util.Random; | import android.graphics.*; import java.util.*; | [
"android.graphics",
"java.util"
] | android.graphics; java.util; | 169,228 |
private JsonObject getHubConfiguration() throws Exception {
String hubApi =
"http://" + nodeConfig.getConfiguration().get(RegistrationRequest.HUB_HOST) + ":"
+ nodeConfig.getConfiguration().get(RegistrationRequest.HUB_PORT) + "/grid/api/hub";
HttpClient client = httpClientFactory.getHttpC... | JsonObject function() throws Exception { String hubApi = STR/grid/api/hubSTRGET", url); HttpResponse response = client.execute(host, r); return extractObject(response); } | /**
* uses the hub API to get some of its configuration.
* @return
* @throws Exception
*/ | uses the hub API to get some of its configuration | getHubConfiguration | {
"repo_name": "tkurnosova/selenium",
"path": "java/server/src/org/openqa/grid/internal/utils/SelfRegisteringRemote.java",
"license": "apache-2.0",
"size": 12915
} | [
"com.google.gson.JsonObject",
"org.apache.http.HttpResponse"
] | import com.google.gson.JsonObject; import org.apache.http.HttpResponse; | import com.google.gson.*; import org.apache.http.*; | [
"com.google.gson",
"org.apache.http"
] | com.google.gson; org.apache.http; | 648,863 |
public String getText() {
if (getBinaryData() == null) {
return null;
}
return getBinaryData().toString(CharsetUtil.UTF_8);
} | String function() { if (getBinaryData() == null) { return null; } return getBinaryData().toString(CharsetUtil.UTF_8); } | /**
* Returns the text data in this frame
*/ | Returns the text data in this frame | getText | {
"repo_name": "beav/netty-ant",
"path": "src/main/java/org/jboss/netty/handler/codec/http/websocketx/TextWebSocketFrame.java",
"license": "apache-2.0",
"size": 3859
} | [
"org.jboss.netty.util.CharsetUtil"
] | import org.jboss.netty.util.CharsetUtil; | import org.jboss.netty.util.*; | [
"org.jboss.netty"
] | org.jboss.netty; | 934,487 |
public void getData() {
if ( input.getServerName() != null ) {
wServerName.setText( input.getServerName() );
}
if ( input.getUserName() != null ) {
wUserName.setText( input.getUserName() );
}
if ( input.getPassword() != null ) {
wPassword.setText( input.getPassword() );
}
... | void function() { if ( input.getServerName() != null ) { wServerName.setText( input.getServerName() ); } if ( input.getUserName() != null ) { wUserName.setText( input.getUserName() ); } if ( input.getPassword() != null ) { wPassword.setText( input.getPassword() ); } wUseSSL.setSelection( input.isUseSSL() ); if ( input.... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "tgf/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/trans/steps/mailinput/MailInputDialog.java",
"license": "apache-2.0",
"size": 77703
} | [
"org.apache.commons.lang.StringUtils",
"org.eclipse.swt.widgets.TableItem",
"org.pentaho.di.core.Const",
"org.pentaho.di.job.entries.getpop.MailConnectionMeta",
"org.pentaho.di.trans.steps.mailinput.MailInputField",
"org.pentaho.di.trans.steps.mailinput.MailInputMeta"
] | import org.apache.commons.lang.StringUtils; import org.eclipse.swt.widgets.TableItem; import org.pentaho.di.core.Const; import org.pentaho.di.job.entries.getpop.MailConnectionMeta; import org.pentaho.di.trans.steps.mailinput.MailInputField; import org.pentaho.di.trans.steps.mailinput.MailInputMeta; | import org.apache.commons.lang.*; import org.eclipse.swt.widgets.*; import org.pentaho.di.core.*; import org.pentaho.di.job.entries.getpop.*; import org.pentaho.di.trans.steps.mailinput.*; | [
"org.apache.commons",
"org.eclipse.swt",
"org.pentaho.di"
] | org.apache.commons; org.eclipse.swt; org.pentaho.di; | 2,735,354 |
public DataNode setSituation(IDataset situation); | DataNode function(IDataset situation); | /**
* The atmosphere will be one of the components, which is where
* its details will be stored; the relevant components will be
* indicated by the entry in the sample_component member.
* <p>
* <p><b>Enumeration:</b><ul>
* <li><b>air</b> </li>
* <li><b>vacuum</b> </li>
* <li><b>inert atmosphere</b> </li... | The atmosphere will be one of the components, which is where its details will be stored; the relevant components will be indicated by the entry in the sample_component member. Enumeration: air vacuum inert atmosphere oxidising atmosphere reducing atmosphere sealed can other | setSituation | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXsample.java",
"license": "epl-1.0",
"size": 49075
} | [
"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; | 1,097,840 |
public static TableEditPart getTableEditPart( List<Object> editParts )
{
if ( editParts == null || editParts.isEmpty( ) )
return null;
int size = editParts.size( );
TableEditPart part = null;
for ( int i = 0; i < size; i++ )
{
Object obj = editParts.get( i );
TableEditPart currentEditPart = null... | static TableEditPart function( List<Object> editParts ) { if ( editParts == null editParts.isEmpty( ) ) return null; int size = editParts.size( ); TableEditPart part = null; for ( int i = 0; i < size; i++ ) { Object obj = editParts.get( i ); TableEditPart currentEditPart = null; if ( obj instanceof TableEditPart ) { cu... | /**
* Returns table editpart.
*
* @param editParts
* a list of editpart
* @return the current selected table editpart, null if no table editpart,
* more than one table, or other non-table editpart. Cell editpart
* is also a type of table editpart.
*/ | Returns table editpart | getTableEditPart | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/util/UIUtil.java",
"license": "epl-1.0",
"size": 99064
} | [
"java.util.List",
"org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.DummyEditpart",
"org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.GridEditPart",
"org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.TableCellEditPart",
"org.eclipse.birt... | import java.util.List; import org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.DummyEditpart; import org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.GridEditPart; import org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.TableCellEditPart; import or... | import java.util.*; import org.eclipse.birt.report.designer.internal.ui.editors.schematic.editparts.*; | [
"java.util",
"org.eclipse.birt"
] | java.util; org.eclipse.birt; | 705,260 |
public Icon getLeafIcon(); | Icon function(); | /**
* Returns the icon representing a leaf node.
*
* @retrun the icon to represent a leaf node.
*/ | Returns the icon representing a leaf node | getLeafIcon | {
"repo_name": "nomencurator/taxonaut",
"path": "src/main/java/org/nomencurator/gui/swing/tree/RenderingOptions.java",
"license": "apache-2.0",
"size": 4362
} | [
"javax.swing.Icon"
] | import javax.swing.Icon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,788,703 |
@Nonnull
default <L2, R2> Either<L2, R2> map(@Nonnull Function<? super L, ? extends L2> lMapper,
@Nonnull Function<? super R, ? extends R2> rMapper) {
requireNonNull(lMapper);
requireNonNull(rMapper);
return flatMap(l -> left(lMapper.apply(l)), r -... | default <L2, R2> Either<L2, R2> map(@Nonnull Function<? super L, ? extends L2> lMapper, @Nonnull Function<? super R, ? extends R2> rMapper) { requireNonNull(lMapper); requireNonNull(rMapper); return flatMap(l -> left(lMapper.apply(l)), r -> right(rMapper.apply(r))); } | /**
* maps either left or right mapper to this
*
* @param lMapper mapper used for left value
* @param rMapper mapper user for right value
* @param <L2> new left type parameter
* @param <R2> new right type parameter
* @return result of mapping
*/ | maps either left or right mapper to this | map | {
"repo_name": "gorttar/fs_test_task",
"path": "src/main/java/data/either/Either.java",
"license": "mit",
"size": 8051
} | [
"java.util.Objects",
"java.util.function.Function",
"javax.annotation.Nonnull"
] | import java.util.Objects; import java.util.function.Function; import javax.annotation.Nonnull; | import java.util.*; import java.util.function.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,055,304 |
@Override
public void writeData( DataOutputStream outputStream, Object[] data ) throws KettleFileException {
lock.readLock().lock();
try {
// Write all values in the row
for ( int i = 0; i < size(); i++ ) {
getValueMeta( i ).writeData( outputStream, data[ i ] );
}
// If ther... | void function( DataOutputStream outputStream, Object[] data ) throws KettleFileException { lock.readLock().lock(); try { for ( int i = 0; i < size(); i++ ) { getValueMeta( i ).writeData( outputStream, data[ i ] ); } try { outputStream.writeBoolean( true ); } catch ( IOException e ) { throw new KettleFileException( STR,... | /**
* Write ONLY the specified data to the outputStream
*
* @throws KettleFileException in case things go awry
*/ | Write ONLY the specified data to the outputStream | writeData | {
"repo_name": "emartin-pentaho/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/row/RowMeta.java",
"license": "apache-2.0",
"size": 41299
} | [
"java.io.DataOutputStream",
"java.io.IOException",
"org.pentaho.di.core.exception.KettleFileException"
] | import java.io.DataOutputStream; import java.io.IOException; import org.pentaho.di.core.exception.KettleFileException; | import java.io.*; import org.pentaho.di.core.exception.*; | [
"java.io",
"org.pentaho.di"
] | java.io; org.pentaho.di; | 2,513,203 |
public void setLastModified(Date lastModifiedIn) {
this.lastModified = lastModifiedIn;
} | void function(Date lastModifiedIn) { this.lastModified = lastModifiedIn; } | /**
* Setter for lastModified
* @param lastModifiedIn to set
*/ | Setter for lastModified | setLastModified | {
"repo_name": "spacewalkproject/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/errata/AbstractErrata.java",
"license": "gpl-2.0",
"size": 17410
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 797,360 |
public void ifPackageNameChanged(ProjectDescription current, BiConsumer<String, String> consumer) {
if (!Objects.equals(this.original.getPackageName(), current.getPackageName())) {
consumer.accept(this.original.getPackageName(), current.getPackageName());
}
} | void function(ProjectDescription current, BiConsumer<String, String> consumer) { if (!Objects.equals(this.original.getPackageName(), current.getPackageName())) { consumer.accept(this.original.getPackageName(), current.getPackageName()); } } | /**
* Calls the specified consumer if the {@code packageName} is different on the
* original source project description than the specified project description.
* @param current the description to test against
* @param consumer to call if the property has changed
*/ | Calls the specified consumer if the packageName is different on the original source project description than the specified project description | ifPackageNameChanged | {
"repo_name": "spring-io/initializr",
"path": "initializr-generator/src/main/java/io/spring/initializr/generator/project/ProjectDescriptionDiff.java",
"license": "apache-2.0",
"size": 8235
} | [
"java.util.Objects",
"java.util.function.BiConsumer"
] | import java.util.Objects; import java.util.function.BiConsumer; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 108,961 |
DiscoverContextAvailabilityResponse discoverContextAvailability(
DiscoverContextAvailabilityRequest request, URI uri); | DiscoverContextAvailabilityResponse discoverContextAvailability( DiscoverContextAvailabilityRequest request, URI uri); | /**
* Operation for retrieving context availability information.
*
* @param request
* The NGS9 9 DiscoverContextAvailabilityRequest.
* @param uri
* @return The NGS9 9 DiscoverContextAvailabilityResponse.
*/ | Operation for retrieving context availability information | discoverContextAvailability | {
"repo_name": "Fiware/iot.Aeron",
"path": "eu.neclab.iotplatform.ngsi.api/src/main/java/eu/neclab/iotplatform/ngsi/api/ngsi9/Ngsi9Requester.java",
"license": "bsd-3-clause",
"size": 3243
} | [
"eu.neclab.iotplatform.ngsi.api.datamodel.DiscoverContextAvailabilityRequest",
"eu.neclab.iotplatform.ngsi.api.datamodel.DiscoverContextAvailabilityResponse"
] | import eu.neclab.iotplatform.ngsi.api.datamodel.DiscoverContextAvailabilityRequest; import eu.neclab.iotplatform.ngsi.api.datamodel.DiscoverContextAvailabilityResponse; | import eu.neclab.iotplatform.ngsi.api.datamodel.*; | [
"eu.neclab.iotplatform"
] | eu.neclab.iotplatform; | 1,598,486 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(FiltersType1.class)) {
case PomPackage.FILTERS_TYPE1__FILTER:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
retu... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(FiltersType1.class)) { case PomPackage.FILTERS_TYPE1__FILTER: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "Treehopper/EclipseAugments",
"path": "pom-editor/eu.hohenegger.xsd.pom.ui/src-gen/eu/hohenegger/xsd/pom/provider/FiltersType1ItemProvider.java",
"license": "epl-1.0",
"size": 4596
} | [
"eu.hohenegger.xsd.pom.FiltersType1",
"eu.hohenegger.xsd.pom.PomPackage",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import eu.hohenegger.xsd.pom.FiltersType1; import eu.hohenegger.xsd.pom.PomPackage; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import eu.hohenegger.xsd.pom.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"eu.hohenegger.xsd",
"org.eclipse.emf"
] | eu.hohenegger.xsd; org.eclipse.emf; | 783,815 |
private static CellTreeNode createRootNode(String tagName) {
CellTreeNode parent = new CellTreeNodeImpl();
List<CellTreeNode> childs = new ArrayList<CellTreeNode>();
if (tagName.equalsIgnoreCase("populations")) {
parent.setName(PopulationWorkSpaceConstants.get(tagName));
parent.setLabel(PopulationWorkSpa... | static CellTreeNode function(String tagName) { CellTreeNode parent = new CellTreeNodeImpl(); List<CellTreeNode> childs = new ArrayList<CellTreeNode>(); if (tagName.equalsIgnoreCase(STR)) { parent.setName(PopulationWorkSpaceConstants.get(tagName)); parent.setLabel(PopulationWorkSpaceConstants.get(tagName)); parent.setNo... | /**
* Creates the root node.
* @param tagName
* the tag name
* @return the cell tree node
*/ | Creates the root node | createRootNode | {
"repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/mat/client/clause/clauseworkspace/presenter/XmlConversionlHelper.java",
"license": "apache-2.0",
"size": 29937
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 236,962 |
protected void setCompositeSource(String src) {
src = trimify(src);
root = src == null ? null : PageUtil.createPage(src, null).get(0);
} | void function(String src) { src = trimify(src); root = src == null ? null : PageUtil.createPage(src, null).get(0); } | /**
* Sets the URL of the source FSP for this composite.
*
* @param src The URL of the source FSP for this composite.
*/ | Sets the URL of the source FSP for this composite | setCompositeSource | {
"repo_name": "fujion/fujion-framework",
"path": "fujion-core/src/main/java/org/fujion/component/BaseCompositeComponent.java",
"license": "apache-2.0",
"size": 2639
} | [
"org.fujion.page.PageUtil"
] | import org.fujion.page.PageUtil; | import org.fujion.page.*; | [
"org.fujion.page"
] | org.fujion.page; | 1,309,619 |
public static Object readFully(final Object self, final Object file) throws IOException {
File f = null;
if (file instanceof File) {
f = (File)file;
} else if (file instanceof String) {
f = new java.io.File((String)file);
}
if (f == null || !f.isFile... | static Object function(final Object self, final Object file) throws IOException { File f = null; if (file instanceof File) { f = (File)file; } else if (file instanceof String) { f = new java.io.File((String)file); } if (f == null !f.isFile()) { throw typeError(STR, ScriptRuntime.safeToString(file)); } return new String... | /**
* Nashorn extension: Read the entire contents of a text file and return as String.
*
* @param self self reference
* @param file The input file whose content is read.
*
* @return String content of the input file.
*
* @throws IOException if an exception occurs
*/ | Nashorn extension: Read the entire contents of a text file and return as String | readFully | {
"repo_name": "hazzik/nashorn",
"path": "src/jdk/nashorn/internal/runtime/ScriptingFunctions.java",
"license": "gpl-2.0",
"size": 9425
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,076,940 |
private String resolveTenantDomain(UsernameValidationRequestDTO usernameValidationRequestDTO)
throws IdentityRecoveryClientException {
String tenantDomain;
String usernameInTheRequest = usernameValidationRequestDTO.getUsername();
String tenantDomainFromContext = (String) Identit... | String function(UsernameValidationRequestDTO usernameValidationRequestDTO) throws IdentityRecoveryClientException { String tenantDomain; String usernameInTheRequest = usernameValidationRequestDTO.getUsername(); String tenantDomainFromContext = (String) IdentityUtil.threadLocalProperties.get() .get(Constants.TENANT_NAME... | /**
* Resolve the tenant domain.
*
* @param usernameValidationRequestDTO UsernameValidationRequestDTO object.
* @return Tenant domain.
* @throws IdentityRecoveryClientException If the tenant domain in the UsernameValidationRequestDTO is not same
* as... | Resolve the tenant domain | resolveTenantDomain | {
"repo_name": "wso2-extensions/identity-governance",
"path": "components/org.wso2.carbon.identity.api.user.governance/src/main/java/org/wso2/carbon/identity/user/endpoint/impl/ValidateUsernameApiServiceImpl.java",
"license": "apache-2.0",
"size": 11128
} | [
"org.apache.commons.lang.StringUtils",
"org.wso2.carbon.identity.core.util.IdentityUtil",
"org.wso2.carbon.identity.recovery.IdentityRecoveryClientException",
"org.wso2.carbon.identity.user.endpoint.Constants",
"org.wso2.carbon.identity.user.endpoint.dto.UsernameValidationRequestDTO",
"org.wso2.carbon.uti... | import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.recovery.IdentityRecoveryClientException; import org.wso2.carbon.identity.user.endpoint.Constants; import org.wso2.carbon.identity.user.endpoint.dto.UsernameValidationRequestDTO; import or... | import org.apache.commons.lang.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.identity.recovery.*; import org.wso2.carbon.identity.user.endpoint.*; import org.wso2.carbon.identity.user.endpoint.dto.*; import org.wso2.carbon.utils.multitenancy.*; | [
"org.apache.commons",
"org.wso2.carbon"
] | org.apache.commons; org.wso2.carbon; | 2,307,127 |
@Override
public Adapter createStringLengthAdapter() {
if (stringLengthItemProvider == null) {
stringLengthItemProvider = new StringLengthItemProvider(this);
}
return stringLengthItemProvider;
}
protected StartsWithItemProvider startsWithItemProvider; | Adapter function() { if (stringLengthItemProvider == null) { stringLengthItemProvider = new StringLengthItemProvider(this); } return stringLengthItemProvider; } protected StartsWithItemProvider startsWithItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.datamapper.StringLength}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.datamapper.StringLength</code>. | createStringLengthAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.visualdatamapper.edit/src/org/wso2/developerstudio/datamapper/provider/DataMapperItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 41714
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,428,869 |
ServiceFuture<List<Product>> getMultiplePagesRetryFirstAsync(final ListOperationCallback<Product> serviceCallback); | ServiceFuture<List<Product>> getMultiplePagesRetryFirstAsync(final ListOperationCallback<Product> serviceCallback); | /**
* A paging operation that fails on the first call with 500 and then retries and then get a response including a nextLink that has 10 pages.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceFuture} object
*/ | A paging operation that fails on the first call with 500 and then retries and then get a response including a nextLink that has 10 pages | getMultiplePagesRetryFirstAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/paging/Pagings.java",
"license": "mit",
"size": 49384
} | [
"com.microsoft.azure.ListOperationCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.azure.ListOperationCallback; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.azure.*; import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.azure",
"com.microsoft.rest",
"java.util"
] | com.microsoft.azure; com.microsoft.rest; java.util; | 1,846,312 |
private static String displayTasks(List<Task> taskList) {
int taskListSize = taskList.size();
if (taskList.size() == 0) {
// empty task list
return MESSAGE_EMPTY_TASK_LIST;
}
StringBuilder taskDisplay = new StringBuilder();
for (int j = 0; j < taskListSize; j++) {
Task task = taskList.get(j);
... | static String function(List<Task> taskList) { int taskListSize = taskList.size(); if (taskList.size() == 0) { return MESSAGE_EMPTY_TASK_LIST; } StringBuilder taskDisplay = new StringBuilder(); for (int j = 0; j < taskListSize; j++) { Task task = taskList.get(j); taskDisplay.append((j + 1) + STR + task.toString()); if (... | /**
* This method extracts tasks information into a string and returns it.
*
* @param taskList List of tasks to be displayed.
* @return The tasks information.
*/ | This method extracts tasks information into a string and returns it | displayTasks | {
"repo_name": "CS2103TAug2014-W15-4J/main",
"path": "src/controller/Logic.java",
"license": "mit",
"size": 25139
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 612,695 |
public UrlBasedViewResolverRegistration freeMarker() {
if (!checkBeanOfType(FreeMarkerConfigurer.class)) {
throw new BeanInitializationException("In addition to a FreeMarker view resolver " +
"there must also be a single FreeMarkerConfig bean in this web application context " +
"(or its parent): FreeM... | UrlBasedViewResolverRegistration function() { if (!checkBeanOfType(FreeMarkerConfigurer.class)) { throw new BeanInitializationException(STR + STR + STR + STR); } FreeMarkerRegistration registration = new FreeMarkerRegistration(); this.viewResolvers.add(registration.getViewResolver()); return registration; } | /**
* Register a FreeMarker view resolver with an empty default view name
* prefix and a default suffix of ".ftl".
* <p><strong>Note</strong> that you must also configure FreeMarker by adding a
* {@link org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer} bean.
*/ | Register a FreeMarker view resolver with an empty default view name prefix and a default suffix of ".ftl". Note that you must also configure FreeMarker by adding a <code>org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer</code> bean | freeMarker | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/spring/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java",
"license": "gpl-2.0",
"size": 14593
} | [
"org.springframework.beans.factory.BeanInitializationException",
"org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"
] | import org.springframework.beans.factory.BeanInitializationException; import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; | import org.springframework.beans.factory.*; import org.springframework.web.servlet.view.freemarker.*; | [
"org.springframework.beans",
"org.springframework.web"
] | org.springframework.beans; org.springframework.web; | 140,471 |
public static BinaryMessageDecoder<TimestampWithTimeZone> getDecoder() {
return DECODER;
} | static BinaryMessageDecoder<TimestampWithTimeZone> function() { return DECODER; } | /**
* Return the BinaryMessageDecoder instance used by this class.
*/ | Return the BinaryMessageDecoder instance used by this class | getDecoder | {
"repo_name": "aliyun/aliyun-emapreduce-sdk",
"path": "emr-sql/src/main/java/com/alibaba/dts/formats/avro/TimestampWithTimeZone.java",
"license": "artistic-2.0",
"size": 12631
} | [
"org.apache.avro.message.BinaryMessageDecoder"
] | import org.apache.avro.message.BinaryMessageDecoder; | import org.apache.avro.message.*; | [
"org.apache.avro"
] | org.apache.avro; | 574,896 |
@FIXVersion(introduced="4.4")
@TagNumRef(tagNum=TagNum.SettlCurrAmt)
public Double getSettlCurrAmt() {
return settlCurrAmt;
} | @FIXVersion(introduced="4.4") @TagNumRef(tagNum=TagNum.SettlCurrAmt) Double function() { return settlCurrAmt; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getSettlCurrAmt | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/ConfirmationMsg.java",
"license": "gpl-3.0",
"size": 94557
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 502,580 |
String year = String.valueOf(cal.get(Calendar.YEAR));
return Integer.parseInt(year.substring(year.length() - 2));
}
/**
* Uses the {@link Formatter Formatter's} | String year = String.valueOf(cal.get(Calendar.YEAR)); return Integer.parseInt(year.substring(year.length() - 2)); } /** * Uses the {@link Formatter Formatter's} | /**
* Gets the last two digits of the year.
*
* @param cal
* the {@link Calendar} from which to get the year
* @return the last two digits of the year (e.g. 2015 --> 15)
*/ | Gets the last two digits of the year | getShortYear | {
"repo_name": "Toberumono/Utils",
"path": "src/toberumono/utils/general/Calendars.java",
"license": "gpl-3.0",
"size": 1883
} | [
"java.util.Calendar",
"java.util.Formatter"
] | import java.util.Calendar; import java.util.Formatter; | import java.util.*; | [
"java.util"
] | java.util; | 2,198,585 |
public ByteBuffer getImageBufferData(); | ByteBuffer function(); | /**
* Get the store image
*
* @return The stored image
*/ | Get the store image | getImageBufferData | {
"repo_name": "copyliu/Spoutcraft_CJKPatch",
"path": "src/minecraft/org/newdawn/slick/opengl/ImageData.java",
"license": "lgpl-3.0",
"size": 1070
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,617,731 |
public void invalidateRemotely(DistributedMember recipient, Integer bucketId,
EntryEventImpl event)
throws EntryNotFoundException, PrimaryBucketException, ForceReattemptException {
InvalidateResponse response = InvalidateMessage.send(recipient, this, event);
if (response != null) {
this.prSt... | void function(DistributedMember recipient, Integer bucketId, EntryEventImpl event) throws EntryNotFoundException, PrimaryBucketException, ForceReattemptException { InvalidateResponse response = InvalidateMessage.send(recipient, this, event); if (response != null) { this.prStats.incPartitionMessagesSent(); try { respons... | /**
* invalidates the remote object with the given key.
*
* @param recipient the member id of the recipient of the operation
* @param bucketId the id of the bucket the key hashed into
* @throws EntryNotFoundException if the entry does not exist in this region
* @throws PrimaryBucketException if the bu... | invalidates the remote object with the given key | invalidateRemotely | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java",
"license": "apache-2.0",
"size": 381189
} | [
"org.apache.geode.cache.CacheException",
"org.apache.geode.cache.EntryNotFoundException",
"org.apache.geode.cache.TransactionDataNotColocatedException",
"org.apache.geode.cache.TransactionDataRebalancedException",
"org.apache.geode.distributed.DistributedMember",
"org.apache.geode.internal.cache.partition... | import org.apache.geode.cache.CacheException; import org.apache.geode.cache.EntryNotFoundException; import org.apache.geode.cache.TransactionDataNotColocatedException; import org.apache.geode.cache.TransactionDataRebalancedException; import org.apache.geode.distributed.DistributedMember; import org.apache.geode.interna... | import org.apache.geode.cache.*; import org.apache.geode.distributed.*; import org.apache.geode.internal.cache.partitioned.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,247,748 |
public State getStateAs(List<Item> items, Class<? extends State> stateClass);
static class Equality implements GroupFunction {
| State function(List<Item> items, Class<? extends State> stateClass); static class Equality implements GroupFunction { | /**
* Calculates the group state and returns it as a state of the requested type.
*
* @param items the items to calculate a group state for
* @param stateClass the type in which the state should be returned
* @return the calculated group state of the requested type or null, if type is not supported
*... | Calculates the group state and returns it as a state of the requested type | getStateAs | {
"repo_name": "reitermarkus/openhab-core",
"path": "bundles/org.openhab.core.compat1x/src/main/java/org/openhab/core/items/GroupFunction.java",
"license": "epl-1.0",
"size": 2279
} | [
"java.util.List",
"org.openhab.core.types.State"
] | import java.util.List; import org.openhab.core.types.State; | import java.util.*; import org.openhab.core.types.*; | [
"java.util",
"org.openhab.core"
] | java.util; org.openhab.core; | 520,366 |
private void setupEventBusCommandPublisher(String topic) {
if (StringUtils.isBlank(topic)) {
logger.trace("No topic defined for Event Bus Command Publisher");
return;
}
try {
logger.debug("Setting up Event Bus Command Publisher for topic {}", topic);
... | void function(String topic) { if (StringUtils.isBlank(topic)) { logger.trace(STR); return; } try { logger.debug(STR, topic); commandPublisher = new MqttMessagePublisher(brokerName + ":" + topic + STR); mqttService.registerMessageProducer(brokerName, commandPublisher); } catch (Exception e) { logger.warn(STR, e.getMessa... | /**
* Initialize publisher which publishes all openHAB commands to the given
* MQTT topic.
*
* @param topic
* to subscribe to
*/ | Initialize publisher which publishes all openHAB commands to the given MQTT topic | setupEventBusCommandPublisher | {
"repo_name": "openhab/openhab",
"path": "bundles/binding/org.openhab.binding.mqtt/src/main/java/org/openhab/binding/mqtt/internal/MqttEventBusBinding.java",
"license": "epl-1.0",
"size": 12902
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,772,622 |
@ApiOperation(value = "Check if a topology is valid or not.", notes = "Returns true if valid, false if not. Application role required [ APPLICATION_MANAGER | APPLICATION_DEVOPS ]")
@RequestMapping(value = "/{topologyId:.+}/isvalid", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
@P... | @ApiOperation(value = STR, notes = STR) @RequestMapping(value = STR, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @PreAuthorize(STR) RestResponse<TopologyValidationResult> function(@PathVariable String topologyId, @RequestParam(required = false) String environmentId) { Topology topology = to... | /**
* Check if a topology is valid or not.
*
* @param topologyId The id of the topology to check.
* @return a boolean rest response that says if the topology is valid or not.
*/ | Check if a topology is valid or not | isTopologyValid | {
"repo_name": "broly-git/alien4cloud",
"path": "alien4cloud-rest-api/src/main/java/alien4cloud/rest/topology/TopologyController.java",
"license": "apache-2.0",
"size": 4041
} | [
"io.swagger.annotations.ApiOperation",
"org.alien4cloud.tosca.model.templates.Topology",
"org.springframework.http.MediaType",
"org.springframework.security.access.prepost.PreAuthorize",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"or... | import io.swagger.annotations.ApiOperation; import org.alien4cloud.tosca.model.templates.Topology; import org.springframework.http.MediaType; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.Reque... | import io.swagger.annotations.*; import org.alien4cloud.tosca.model.templates.*; import org.springframework.http.*; import org.springframework.security.access.prepost.*; import org.springframework.web.bind.annotation.*; | [
"io.swagger.annotations",
"org.alien4cloud.tosca",
"org.springframework.http",
"org.springframework.security",
"org.springframework.web"
] | io.swagger.annotations; org.alien4cloud.tosca; org.springframework.http; org.springframework.security; org.springframework.web; | 298,016 |
private int makeNotifyResp() {
if (mMessage == null) {
mMessage = new ByteArrayOutputStream();
mPosition = 0;
}
// X-Mms-Message-Type
appendOctet(PduHeaders.MESSAGE_TYPE);
appendOctet(PduHeaders.MESSAGE_TYPE_NOTIFYRESP_IND);
// X-Mms-Trans... | int function() { if (mMessage == null) { mMessage = new ByteArrayOutputStream(); mPosition = 0; } appendOctet(PduHeaders.MESSAGE_TYPE); appendOctet(PduHeaders.MESSAGE_TYPE_NOTIFYRESP_IND); if (appendHeader(PduHeaders.TRANSACTION_ID) != PDU_COMPOSE_SUCCESS) { return PDU_COMPOSE_CONTENT_ERROR; } if (appendHeader(PduHeade... | /**
* Make NotifyResp.Ind.
*/ | Make NotifyResp.Ind | makeNotifyResp | {
"repo_name": "moezbhatti/qksms",
"path": "android-smsmms/src/main/java/com/google/android/mms/pdu_alt/PduComposer.java",
"license": "gpl-3.0",
"size": 38976
} | [
"java.io.ByteArrayOutputStream"
] | import java.io.ByteArrayOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,393,413 |
public void finalizeIt(){
//if it is global mode, do not have to do this at all.
if(this.isGlobalMode()){
System.err.println("Finalizing local features in global mode: not required");
this._isFinalized = true;
return;
}
this._fs = new int[this._globalFeature2LocalFeature.size()];
Iterator<Integer>... | void function(){ if(this.isGlobalMode()){ System.err.println(STR); this._isFinalized = true; return; } this._fs = new int[this._globalFeature2LocalFeature.size()]; Iterator<Integer> features = this._globalFeature2LocalFeature.keySet().iterator(); while(features.hasNext()){ int f_global = features.next(); int f_local = ... | /**
* Finalize the features extracted by copying the local features into global features.<br>
* This is not required if this is in global mode, which means the features are stored into
* global feature index directly.
*/ | Finalize the features extracted by copying the local features into global features. This is not required if this is in global mode, which means the features are stored into global feature index directly | finalizeIt | {
"repo_name": "justhalf/weak-semi-crf-naacl2016",
"path": "src/main/java/com/statnlp/hybridnetworks/LocalNetworkParam.java",
"license": "gpl-3.0",
"size": 9871
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,216,040 |
return (LinesController) getDetailController();
}
| return (LinesController) getDetailController(); } | /**
* Gets the lines(child) controller.
*
* @return the lines controller
*/ | Gets the lines(child) controller | getLinesController | {
"repo_name": "Esleelkartea/aonGTA",
"path": "aongta_v1.0.0_src/Fuentes y JavaDoc/aon-ui-form/src/com/code/aon/ui/form/listener/LinesControllerListener.java",
"license": "gpl-2.0",
"size": 2333
} | [
"com.code.aon.ui.form.LinesController"
] | import com.code.aon.ui.form.LinesController; | import com.code.aon.ui.form.*; | [
"com.code.aon"
] | com.code.aon; | 2,161,502 |
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
if (args.length == 0)
{
EntityPlayer entityplayer = getCommandSenderAsPlayer(sender);
entityplayer.onKillCommand();
notifyOperators(sender, this, "commands.kill.successf... | void function(ICommandSender sender, String[] args) throws CommandException { if (args.length == 0) { EntityPlayer entityplayer = getCommandSenderAsPlayer(sender); entityplayer.onKillCommand(); notifyOperators(sender, this, STR, new Object[] {entityplayer.getDisplayName()}); } else { Entity entity = func_175768_b(sende... | /**
* Callback when the command is invoked
*
* @param sender The command sender that executed the command
* @param args The arguments that were passed
*/ | Callback when the command is invoked | processCommand | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/command/CommandKill.java",
"license": "gpl-3.0",
"size": 2106
} | [
"net.minecraft.entity.Entity",
"net.minecraft.entity.player.EntityPlayer"
] | import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; | import net.minecraft.entity.*; import net.minecraft.entity.player.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 1,709,807 |
public static <K> Consumer<K> from(K group, K name) {
LettuceAssert.notNull(group, "Group must not be null");
LettuceAssert.notNull(name, "Name must not be null");
return new Consumer<>(group, name);
} | static <K> Consumer<K> function(K group, K name) { LettuceAssert.notNull(group, STR); LettuceAssert.notNull(name, STR); return new Consumer<>(group, name); } | /**
* Create a new consumer.
*
* @param group name of the consumer group, must not be {@code null} or empty.
* @param name name of the consumer, must not be {@code null} or empty.
* @return the consumer {@link Consumer} object.
*/ | Create a new consumer | from | {
"repo_name": "lettuce-io/lettuce-core",
"path": "src/main/java/io/lettuce/core/Consumer.java",
"license": "apache-2.0",
"size": 2325
} | [
"io.lettuce.core.internal.LettuceAssert"
] | import io.lettuce.core.internal.LettuceAssert; | import io.lettuce.core.internal.*; | [
"io.lettuce.core"
] | io.lettuce.core; | 398,750 |
public static <T> T getAttribute(UIComponent component, String attribute, Class<T> type) {
T value = Components.getAttribute(component, attribute);
if (value == null) {
if (type == Boolean.class) {
return (T) Boolean.FALSE;
}
else {
... | static <T> T function(UIComponent component, String attribute, Class<T> type) { T value = Components.getAttribute(component, attribute); if (value == null) { if (type == Boolean.class) { return (T) Boolean.FALSE; } else { return null; } } if (value instanceof String) { if (type == Boolean.class) { return (T) Boolean.va... | /**
* Gets the requested attribute and casts it, if necessary.
*
* @param <T> the expected type of the attribute
* @param component the component
* @param attribute the attribute
* @param type the expected type of the attribute
* @return the attribute
*/ | Gets the requested attribute and casts it, if necessary | getAttribute | {
"repo_name": "codebulb/crudfaces",
"path": "src/main/java/ch/codebulb/crudfaces/util/ComponentsHelper.java",
"license": "apache-2.0",
"size": 3764
} | [
"javax.faces.component.UIComponent",
"org.omnifaces.util.Components"
] | import javax.faces.component.UIComponent; import org.omnifaces.util.Components; | import javax.faces.component.*; import org.omnifaces.util.*; | [
"javax.faces",
"org.omnifaces.util"
] | javax.faces; org.omnifaces.util; | 2,710,945 |
public void setBody(String body) {
_body = Val.chkStr(body);
} | void function(String body) { _body = Val.chkStr(body); } | /**
* Sets the body.
* @param body the body
*/ | Sets the body | setBody | {
"repo_name": "GeoinformationSystems/geoportal-server",
"path": "geoportal/src/com/esri/gpt/framework/mail/MailRequest.java",
"license": "apache-2.0",
"size": 6126
} | [
"com.esri.gpt.framework.util.Val"
] | import com.esri.gpt.framework.util.Val; | import com.esri.gpt.framework.util.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 1,021,388 |
public static void main(String[] args) {
logger.info("-- START --");
if (args.length < 2) {
logger.error("No input or output file");
System.exit(-1);
}
Optional<RDFFormat> fmtin = Rio.getParserFormatForFileName(args[0]);
if(!fmtin.isPresent())... | static void function(String[] args) { logger.info(STR); if (args.length < 2) { logger.error(STR); System.exit(-1); } Optional<RDFFormat> fmtin = Rio.getParserFormatForFileName(args[0]); if(!fmtin.isPresent()) { logger.error(STR, args[0]); System.exit(-2); } Optional<RDFFormat> fmtout = Rio.getWriterFormatForFileName(ar... | /**
* Main program
*
* @param args
*/ | Main program | main | {
"repo_name": "Fedict/dcattools",
"path": "tools/src/main/java/be/fedict/dcat/tools/Converter.java",
"license": "bsd-2-clause",
"size": 4243
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.util.Optional",
"org.eclipse.rdf4j.repository.Repository",
"org.eclipse.rdf4j.repository.RepositoryConnection",
"org.eclipse.rdf4j.repository.sail.SailRepository",
"org.eclipse.rdf4j.rio.RDFFormat",
"org.eclipse.rdf4j.rio.RDFWriter",
"org.eclipse.rdf... | import java.io.File; import java.io.FileOutputStream; import java.util.Optional; import org.eclipse.rdf4j.repository.Repository; import org.eclipse.rdf4j.repository.RepositoryConnection; import org.eclipse.rdf4j.repository.sail.SailRepository; import org.eclipse.rdf4j.rio.RDFFormat; import org.eclipse.rdf4j.rio.RDFWrit... | import java.io.*; import java.util.*; import org.eclipse.rdf4j.repository.*; import org.eclipse.rdf4j.repository.sail.*; import org.eclipse.rdf4j.rio.*; import org.eclipse.rdf4j.rio.rdfxml.util.*; import org.eclipse.rdf4j.sail.memory.*; | [
"java.io",
"java.util",
"org.eclipse.rdf4j"
] | java.io; java.util; org.eclipse.rdf4j; | 901,310 |
private double getThresholdValue(ConfidenceThresholdState selectedThreshold)
{
switch(selectedThreshold)
{
case NO_THRESHOLD:
{
return 0.0;
}
case ALPHA_THRESHOLD:
{
return this.alphaSpinnerM... | double function(ConfidenceThresholdState selectedThreshold) { switch(selectedThreshold) { case NO_THRESHOLD: { return 0.0; } case ALPHA_THRESHOLD: { return this.alphaSpinnerModel.getNumber().doubleValue(); } case LOD_SCORE_THRESHOLD: { return this.lodSpinnerModel.getNumber().doubleValue(); } default: { LOG.warning(STR ... | /**
* Get the threshold value for the given threshold state
* @param selectedThreshold
* the threshold state
* @return
* the threshold value
*/ | Get the threshold value for the given threshold state | getThresholdValue | {
"repo_name": "churchill-lab/j-qtl",
"path": "modules/main/src/java/org/jax/qtl/scan/gui/ScanOneSummaryPanel.java",
"license": "gpl-3.0",
"size": 37564
} | [
"org.jax.qtl.scan.ConfidenceThresholdState"
] | import org.jax.qtl.scan.ConfidenceThresholdState; | import org.jax.qtl.scan.*; | [
"org.jax.qtl"
] | org.jax.qtl; | 2,854,335 |
public synchronized JSONObject collectEatingSnake(final String userId, final int score) {
final JSONObject ret = Results.falseResult();
if (score < 1) {
ret.put(Keys.STATUS_CODE, true);
return ret;
}
final boolean succ = true;
ret.put(Keys.STATUS_C... | synchronized JSONObject function(final String userId, final int score) { final JSONObject ret = Results.falseResult(); if (score < 1) { ret.put(Keys.STATUS_CODE, true); return ret; } final boolean succ = true; ret.put(Keys.STATUS_CODE, succ); return ret; } | /**
* Collects eating snake.
*
* @param userId the specified user id
* @param score the specified score
* @return result
*/ | Collects eating snake | collectEatingSnake | {
"repo_name": "anvarzkr/symphony",
"path": "src/main/java/org/b3log/symphony/service/ActivityMgmtService.java",
"license": "gpl-3.0",
"size": 10308
} | [
"org.b3log.latke.Keys",
"org.b3log.symphony.util.Results",
"org.json.JSONObject"
] | import org.b3log.latke.Keys; import org.b3log.symphony.util.Results; import org.json.JSONObject; | import org.b3log.latke.*; import org.b3log.symphony.util.*; import org.json.*; | [
"org.b3log.latke",
"org.b3log.symphony",
"org.json"
] | org.b3log.latke; org.b3log.symphony; org.json; | 143,431 |
public int countMatches(final DeploymentApplication pApp, final DeploymentBehavior pBeh) {
return rawCountMatches(new Object[]{pApp, pBeh});
}
| int function(final DeploymentApplication pApp, final DeploymentBehavior pBeh) { return rawCountMatches(new Object[]{pApp, pBeh}); } | /**
* Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
* @param pApp the fixed value of pattern parameter app, or null if not bound.
* @param pBeh the fixed value of pattern parameter beh, or null if not bound.
* @return the number of pattern ma... | Returns the number of all matches of the pattern that conform to the given fixed values of some parameters | countMatches | {
"repo_name": "lunkpeter/incquery-examples-cps",
"path": "transformations/org.eclipse.incquery.examples.cps.xform.m2t/src-gen/org/eclipse/incquery/examples/cps/xform/m2t/monitor/ApplicationBehaviorCurrentStateChangeMatcher.java",
"license": "epl-1.0",
"size": 14759
} | [
"org.eclipse.incquery.examples.cps.deployment.DeploymentApplication",
"org.eclipse.incquery.examples.cps.deployment.DeploymentBehavior"
] | import org.eclipse.incquery.examples.cps.deployment.DeploymentApplication; import org.eclipse.incquery.examples.cps.deployment.DeploymentBehavior; | import org.eclipse.incquery.examples.cps.deployment.*; | [
"org.eclipse.incquery"
] | org.eclipse.incquery; | 2,250,584 |
@Internal
void registerDataSink(DataSink<?> sink) {
this.sinks.add(sink);
} | void registerDataSink(DataSink<?> sink) { this.sinks.add(sink); } | /**
* Adds the given sink to this environment. Only sinks that have been added will be executed once
* the {@link #execute()} or {@link #execute(String)} method is called.
*
* @param sink The sink to add for execution.
*/ | Adds the given sink to this environment. Only sinks that have been added will be executed once the <code>#execute()</code> or <code>#execute(String)</code> method is called | registerDataSink | {
"repo_name": "xiaokuangkuang/kuangjingxiangmu",
"path": "flink-java/src/main/java/org/apache/flink/api/java/ExecutionEnvironment.java",
"license": "apache-2.0",
"size": 57389
} | [
"org.apache.flink.api.java.operators.DataSink"
] | import org.apache.flink.api.java.operators.DataSink; | import org.apache.flink.api.java.operators.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,468,829 |
public static long cronInterval(String cron, Date date) {
try {
return new CronExpression(cron).getNextInterval(date);
} catch (Exception e) {
throw new IllegalArgumentException("Invalid CRON pattern : " + cron, e);
}
}
public static class CronExpression... | static long function(String cron, Date date) { try { return new CronExpression(cron).getNextInterval(date); } catch (Exception e) { throw new IllegalArgumentException(STR + cron, e); } } public static class CronExpression implements Serializable, Cloneable { private static final long serialVersionUID = 12423409423L; pr... | /**
* Compute the number of milliseconds between the next valid date and the one after.
*
* @param cron the CRON String
* @param date the date to start search
* @return the number of milliseconds between the next valid date and the one after,
* with an invalid interval between
*/ | Compute the number of milliseconds between the next valid date and the one after | cronInterval | {
"repo_name": "Shenker93/playframework",
"path": "framework/src/play-java/src/main/java/play/libs/Time.java",
"license": "apache-2.0",
"size": 63103
} | [
"java.io.Serializable",
"java.text.ParseException",
"java.util.Date",
"java.util.HashMap",
"java.util.Locale",
"java.util.Map",
"java.util.TimeZone",
"java.util.TreeSet"
] | import java.io.Serializable; import java.text.ParseException; import java.util.Date; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.TimeZone; import java.util.TreeSet; | import java.io.*; import java.text.*; import java.util.*; | [
"java.io",
"java.text",
"java.util"
] | java.io; java.text; java.util; | 1,687,458 |
private Design getCurrentDesign(Object adaptable) {
Page currentPage = getCurrentPage(adaptable);
Designer designer = getDesigner(adaptable);
if (currentPage != null && designer != null) {
return designer.getDesign(currentPage);
}
return null;
} | Design function(Object adaptable) { Page currentPage = getCurrentPage(adaptable); Designer designer = getDesigner(adaptable); if (currentPage != null && designer != null) { return designer.getDesign(currentPage); } return null; } | /**
* Get the current design.
*
* @param adaptable a SlingHttpServletRequest
* @return the current Design if the adaptable was a SlingHttpServletRequest, the default Design otherwise
*/ | Get the current design | getCurrentDesign | {
"repo_name": "badvision/acs-aem-commons",
"path": "bundle/src/main/java/com/adobe/acs/commons/models/injectors/impl/AemObjectInjector.java",
"license": "apache-2.0",
"size": 11152
} | [
"com.day.cq.wcm.api.Page",
"com.day.cq.wcm.api.designer.Design",
"com.day.cq.wcm.api.designer.Designer"
] | import com.day.cq.wcm.api.Page; import com.day.cq.wcm.api.designer.Design; import com.day.cq.wcm.api.designer.Designer; | import com.day.cq.wcm.api.*; import com.day.cq.wcm.api.designer.*; | [
"com.day.cq"
] | com.day.cq; | 748,080 |
void markReady() {
monitor.enter();
try {
if (!transitioned) {
// nothing has transitioned since construction, good.
ready = true;
} else {
// This should be an extremely rare race condition.
List<Service> servicesInBadStates = Lists.newArrayList()... | void markReady() { monitor.enter(); try { if (!transitioned) { ready = true; } else { List<Service> servicesInBadStates = Lists.newArrayList(); for (Service service : servicesByState().values()) { if (service.state() != NEW) { servicesInBadStates.add(service); } } throw new IllegalArgumentException(STR + STR + services... | /**
* Marks the {@link State} as ready to receive transitions. Returns true if no transitions have
* been observed yet.
*/ | Marks the <code>State</code> as ready to receive transitions. Returns true if no transitions have been observed yet | markReady | {
"repo_name": "paulmartel/voltdb",
"path": "third_party/java/src/com/google_voltpatches/common/util/concurrent/ServiceManager.java",
"license": "agpl-3.0",
"size": 31912
} | [
"com.google_voltpatches.common.collect.Lists",
"java.util.List"
] | import com.google_voltpatches.common.collect.Lists; import java.util.List; | import com.google_voltpatches.common.collect.*; import java.util.*; | [
"com.google_voltpatches.common",
"java.util"
] | com.google_voltpatches.common; java.util; | 1,561,619 |
Assert.assertEquals("min(int, int)", FindTheMinimumNumber.getComparisonString(2));
Assert.assertEquals("min(int, min(int, int))", FindTheMinimumNumber.getComparisonString(3));
Assert.assertEquals("min(int, min(int, min(int, int)))", FindTheMinimumNumber.getComparisonString(4));
String result = FindTheMinimumNum... | Assert.assertEquals(STR, FindTheMinimumNumber.getComparisonString(2)); Assert.assertEquals(STR, FindTheMinimumNumber.getComparisonString(3)); Assert.assertEquals(STR, FindTheMinimumNumber.getComparisonString(4)); String result = FindTheMinimumNumber.getComparisonString(50); int original = result.length(); int modified ... | /**
* Test method for {@link hr.weekOfCode30.FindTheMinimumNumber#getComparisonString(int)}.
*/ | Test method for <code>hr.weekOfCode30.FindTheMinimumNumber#getComparisonString(int)</code> | testGetComparisonString | {
"repo_name": "debmalya/symmetrical-eureka",
"path": "src/test/java/hr/weekOfCode30/FindTheMinimumNumberTest.java",
"license": "apache-2.0",
"size": 1442
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,500,743 |
private static Solucion torneoBinario(Solucion particpante1,
Solucion participante2){
Solucion ganador;
Random rand = new Random();
if(particpante1.getFitness() < participante2.getFitness()){
ganador = particpante1;
} else if (participante2.getFitness()... | static Solucion function(Solucion particpante1, Solucion participante2){ Solucion ganador; Random rand = new Random(); if(particpante1.getFitness() < participante2.getFitness()){ ganador = particpante1; } else if (participante2.getFitness() < particpante1.getFitness()){ ganador = participante2; } else{ int random = ran... | /**
* Metodo que representa el torneo entre dos individuos
* @param particpante1 Individuo participante nro 1
* @param participante2 Individuo participante nro 2
* @return Individuo ganador del torneo (Solucion)
*/ | Metodo que representa el torneo entre dos individuos | torneoBinario | {
"repo_name": "fersauce/IA_QAP",
"path": "IA_QAP_2013/src/py/una/pol/ia/qap/spea/utilidades/ProcesoSeleccion.java",
"license": "apache-2.0",
"size": 2901
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 1,170,613 |
@NonNull AbstractRegistration registerConditionPolicy(
@NonNull Class<? extends Augmentation<Conditions>> conditionPolicyClass,
@NonNull ConditionsAugPolicy conditionPolicy); | @NonNull AbstractRegistration registerConditionPolicy( @NonNull Class<? extends Augmentation<Conditions>> conditionPolicyClass, @NonNull ConditionsAugPolicy conditionPolicy); | /**
* Register Condition Policy Augmentation handler.
*
* @param conditionPolicyClass Conditions Augmentation Class
* @param conditionPolicy Condition policy handler
* @return registration ticket
*/ | Register Condition Policy Augmentation handler | registerConditionPolicy | {
"repo_name": "opendaylight/bgpcep",
"path": "bgp/openconfig-rp-spi/src/main/java/org/opendaylight/protocol/bgp/openconfig/routing/policy/spi/registry/StatementRegistryProvider.java",
"license": "epl-1.0",
"size": 2146
} | [
"org.eclipse.jdt.annotation.NonNull",
"org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.policy.condition.ConditionsAugPolicy",
"org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.routing.policy.policy.definitions.policy.definition.statements.statement.Co... | import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.policy.condition.ConditionsAugPolicy; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.routing.policy.policy.definitions.policy.definition.statements.stat... | import org.eclipse.jdt.annotation.*; import org.opendaylight.protocol.bgp.openconfig.routing.policy.spi.policy.condition.*; import org.opendaylight.yang.gen.v1.http.openconfig.net.yang.routing.policy.rev151009.routing.policy.top.routing.policy.policy.definitions.policy.definition.statements.statement.*; import org.open... | [
"org.eclipse.jdt",
"org.opendaylight.protocol",
"org.opendaylight.yang",
"org.opendaylight.yangtools"
] | org.eclipse.jdt; org.opendaylight.protocol; org.opendaylight.yang; org.opendaylight.yangtools; | 1,882,668 |
public void onGuiClosed()
{
Keyboard.enableRepeatEvents(false);
} | void function() { Keyboard.enableRepeatEvents(false); } | /**
* Called when the screen is unloaded. Used to disable keyboard repeat events
*/ | Called when the screen is unloaded. Used to disable keyboard repeat events | onGuiClosed | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/GuiScreenCustomizePresets.java",
"license": "gpl-3.0",
"size": 17115
} | [
"org.lwjgl.input.Keyboard"
] | import org.lwjgl.input.Keyboard; | import org.lwjgl.input.*; | [
"org.lwjgl.input"
] | org.lwjgl.input; | 2,029,384 |
// reflection
public static Class classOf(Object obj) {
return Reflective.classOf(obj);
}
/**
* Returns the Class object representing the class or interface
* that declares the field represented by the given Field object. | static Class function(Object obj) { return Reflective.classOf(obj); } /** * Returns the Class object representing the class or interface * that declares the field represented by the given Field object. | /**
* Returns the runtime class of the given Object.
*
* @param obj the Object whose Class is returned
* @return the Class object of given object
*/ | Returns the runtime class of the given Object | classOf | {
"repo_name": "haitaoyao/btrace",
"path": "src/share/classes/com/sun/btrace/BTraceUtils.java",
"license": "gpl-2.0",
"size": 234341
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,733,877 |
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes and feat... | void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); initEClass(avEntryEClass, Map.Entry.class, STR, !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); initEAttribute(getAVEntry_Key(), ecorePackage.getEString(), "key", null, 1, 1, Map.En... | /**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first. | initializePackageContents | {
"repo_name": "CloudScale-Project/Environment",
"path": "plugins/org.scaledl.overview/src/org/scaledl/overview/core/impl/CorePackageImpl.java",
"license": "epl-1.0",
"size": 15162
} | [
"java.util.Map",
"org.scaledl.overview.core.Entity"
] | import java.util.Map; import org.scaledl.overview.core.Entity; | import java.util.*; import org.scaledl.overview.core.*; | [
"java.util",
"org.scaledl.overview"
] | java.util; org.scaledl.overview; | 1,249,432 |
private boolean monitorApplication(ApplicationId appId)
throws YarnException, IOException {
while (true) {
// Check app status every 1 second.
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
LOG.debug("Thread sleep in monitoring loop interrupted");
}
... | boolean function(ApplicationId appId) throws YarnException, IOException { while (true) { try { Thread.sleep(1000); } catch (InterruptedException e) { LOG.debug(STR); } ApplicationReport report = yarnClient.getApplicationReport(appId); LOG.info( STR + STR + appId.getId() + STR + report.getClientToAMToken() + STR + repor... | /**
* Monitor the submitted application for completion.
* Kill application if time expires.
*
* @param appId
* Application Id of application to be monitored
* @return true if application completed successfully
* @throws YarnException
* @throws IOException
*/ | Monitor the submitted application for completion. Kill application if time expires | monitorApplication | {
"repo_name": "srijeyanthan/hops",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/Client.java",
"license": "apache-2.0",
"size": 32649
} | [
"java.io.IOException",
"org.apache.hadoop.yarn.api.records.ApplicationId",
"org.apache.hadoop.yarn.api.records.ApplicationReport",
"org.apache.hadoop.yarn.api.records.FinalApplicationStatus",
"org.apache.hadoop.yarn.api.records.YarnApplicationState",
"org.apache.hadoop.yarn.exceptions.YarnException"
] | import java.io.IOException; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ApplicationReport; import org.apache.hadoop.yarn.api.records.FinalApplicationStatus; import org.apache.hadoop.yarn.api.records.YarnApplicationState; import org.apache.hadoop.yarn.exceptions.Yar... | import java.io.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,908,522 |
@Override
public String getProperty( String property ) throws XMLDBException; | String function( String property ) throws XMLDBException; | /**
* Get a property defined by this service.
*
* @param property Description of the Parameter
* @return The property value
* @exception XMLDBException Description of the Exception
*/ | Get a property defined by this service | getProperty | {
"repo_name": "shabanovd/exist",
"path": "src/org/exist/xmldb/UserManagementService.java",
"license": "lgpl-2.1",
"size": 12212
} | [
"org.xmldb.api.base.XMLDBException"
] | import org.xmldb.api.base.XMLDBException; | import org.xmldb.api.base.*; | [
"org.xmldb.api"
] | org.xmldb.api; | 309,376 |
public void onContainerClosed(EntityPlayer playerIn)
{
super.onContainerClosed(playerIn);
if (!this.worldObj.isRemote)
{
for (int i = 0; i < 9; ++i)
{
ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i);
if (itemstac... | void function(EntityPlayer playerIn) { super.onContainerClosed(playerIn); if (!this.worldObj.isRemote) { for (int i = 0; i < 9; ++i) { ItemStack itemstack = this.craftMatrix.getStackInSlotOnClosing(i); if (itemstack != null) { playerIn.dropPlayerItemWithRandomChoice(itemstack, false); } } } } | /**
* Called when the container is closed.
*/ | Called when the container is closed | onContainerClosed | {
"repo_name": "papertazer/Trinia-Mod",
"path": "src/main/java/com/trinia/gui/container/ContainerCompressor.java",
"license": "lgpl-2.1",
"size": 5127
} | [
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack"
] | import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; | import net.minecraft.entity.player.*; import net.minecraft.item.*; | [
"net.minecraft.entity",
"net.minecraft.item"
] | net.minecraft.entity; net.minecraft.item; | 2,247,355 |
@Test
public void test_LATEST_TIMESTAMP_isReplaced()
throws Exception {
Configuration conf = new Configuration(this.util.getConfiguration());
RecordWriter<ImmutableBytesWritable, KeyValue> writer = null;
TaskAttemptContext context = null;
Path dir =
util.getDataTestDir("test_LATEST_TIMESTAMP... | void function() throws Exception { Configuration conf = new Configuration(this.util.getConfiguration()); RecordWriter<ImmutableBytesWritable, KeyValue> writer = null; TaskAttemptContext context = null; Path dir = util.getDataTestDir(STR); try { Job job = new Job(conf); FileOutputFormat.setOutputPath(job, dir); context ... | /**
* Test that {@link HFileOutputFormat} RecordWriter amends timestamps if
* passed a keyvalue whose timestamp is {@link HConstants#LATEST_TIMESTAMP}.
* @see <a href="https://issues.apache.org/jira/browse/HBASE-2615">HBASE-2615</a>
*/ | Test that <code>HFileOutputFormat</code> RecordWriter amends timestamps if passed a keyvalue whose timestamp is <code>HConstants#LATEST_TIMESTAMP</code> | test_LATEST_TIMESTAMP_isReplaced | {
"repo_name": "tobegit3hub/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java",
"license": "apache-2.0",
"size": 42150
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.CellUtil",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.io.ImmutableBytesWritable",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.mapreduce.Job... | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.util.Bytes; import org.apac... | import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.output.*; import org.junit.*; | [
"org.apache.hadoop",
"org.junit"
] | org.apache.hadoop; org.junit; | 2,187,797 |
void fillThisReferences(
AbstractCompiler compiler, Node externs, Node root) {
(new ThisRefCollector(compiler)).process(externs, root);
}
/**
* Given a scope from another symbol table, returns the {@code SymbolScope} | void fillThisReferences( AbstractCompiler compiler, Node externs, Node root) { (new ThisRefCollector(compiler)).process(externs, root); } /** * Given a scope from another symbol table, returns the {@code SymbolScope} | /**
* Fill in references to "this" variables.
*/ | Fill in references to "this" variables | fillThisReferences | {
"repo_name": "wenzowski/closure-compiler",
"path": "src/com/google/javascript/jscomp/SymbolTable.java",
"license": "apache-2.0",
"size": 54227
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,526,882 |
public static Bitmap scaleDownBitmap(Context ctx, Uri uri, int newHeight) throws FileNotFoundException, IOException {
Bitmap original = Media.getBitmap(ctx.getContentResolver(), uri);
return scaleBitmap(ctx, original, newHeight);
} | static Bitmap function(Context ctx, Uri uri, int newHeight) throws FileNotFoundException, IOException { Bitmap original = Media.getBitmap(ctx.getContentResolver(), uri); return scaleBitmap(ctx, original, newHeight); } | /**
* Scales the image independently of the screen density of the device. Maintains image aspect
* ratio.
*
* @param uri Uri of the source bitmap
**/ | Scales the image independently of the screen density of the device. Maintains image aspect ratio | scaleDownBitmap | {
"repo_name": "jaydeepw/android-utils",
"path": "Utils/app/src/main/java/net/the4thdimension/android/ImageUtils.java",
"license": "mit",
"size": 7624
} | [
"android.content.Context",
"android.graphics.Bitmap",
"android.net.Uri",
"android.provider.MediaStore",
"java.io.FileNotFoundException",
"java.io.IOException"
] | import android.content.Context; import android.graphics.Bitmap; import android.net.Uri; import android.provider.MediaStore; import java.io.FileNotFoundException; import java.io.IOException; | import android.content.*; import android.graphics.*; import android.net.*; import android.provider.*; import java.io.*; | [
"android.content",
"android.graphics",
"android.net",
"android.provider",
"java.io"
] | android.content; android.graphics; android.net; android.provider; java.io; | 2,200,464 |
public static boolean isTracing(String category) {
if (!isDebugging()) {
return false;
}
String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION);
if (traceFilter != null) {
StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$
while (tokenizer.hasMo... | static boolean function(String category) { if (!isDebugging()) { return false; } String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION); if (traceFilter != null) { StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); while (tokenizer.hasMoreTokens()) { String cat = tokenizer.nextTo... | /**
* Determines if currently tracing a category
*
* @param category
* @return true if tracing category, false otherwise
*/ | Determines if currently tracing a category | isTracing | {
"repo_name": "ttimbul/eclipse.wst",
"path": "bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/Logger.java",
"license": "epl-1.0",
"size": 4964
} | [
"com.ibm.icu.util.StringTokenizer",
"org.eclipse.core.runtime.Platform"
] | import com.ibm.icu.util.StringTokenizer; import org.eclipse.core.runtime.Platform; | import com.ibm.icu.util.*; import org.eclipse.core.runtime.*; | [
"com.ibm.icu",
"org.eclipse.core"
] | com.ibm.icu; org.eclipse.core; | 2,454,762 |
@Test
@Repeat(count = NUM_RUNS)
public void interruptingBlockedMergingRecordBatch() {
final long before = countAllocatedMemory();
final String control = Controls.newBuilder()
.addPause(MergingRecordBatch.class, "waiting-for-data", 1)
.build();
interruptingBlockedFragmentsWaitingForData(co... | @Repeat(count = NUM_RUNS) void function() { final long before = countAllocatedMemory(); final String control = Controls.newBuilder() .addPause(MergingRecordBatch.class, STR, 1) .build(); interruptingBlockedFragmentsWaitingForData(control); final long after = countAllocatedMemory(); assertEquals(String.format(STR, after... | /**
* Test cancelling query interrupts currently blocked FragmentExecutor threads waiting for some event to happen.
* Specifically tests cancelling fragment which has {@link MergingRecordBatch} blocked waiting for data.
*/ | Test cancelling query interrupts currently blocked FragmentExecutor threads waiting for some event to happen. Specifically tests cancelling fragment which has <code>MergingRecordBatch</code> blocked waiting for data | interruptingBlockedMergingRecordBatch | {
"repo_name": "AdamPD/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/server/TestDrillbitResilience.java",
"license": "apache-2.0",
"size": 37669
} | [
"org.apache.drill.common.util.RepeatTestRule",
"org.apache.drill.exec.physical.impl.mergereceiver.MergingRecordBatch",
"org.apache.drill.exec.testing.Controls",
"org.junit.Assert"
] | import org.apache.drill.common.util.RepeatTestRule; import org.apache.drill.exec.physical.impl.mergereceiver.MergingRecordBatch; import org.apache.drill.exec.testing.Controls; import org.junit.Assert; | import org.apache.drill.common.util.*; import org.apache.drill.exec.physical.impl.mergereceiver.*; import org.apache.drill.exec.testing.*; import org.junit.*; | [
"org.apache.drill",
"org.junit"
] | org.apache.drill; org.junit; | 413,367 |
public OffsetDateTime updated() {
return this.updated;
} | OffsetDateTime function() { return this.updated; } | /**
* Get the updated property: The last time the watchlist was updated.
*
* @return the updated value.
*/ | Get the updated property: The last time the watchlist was updated | updated | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/fluent/models/WatchlistProperties.java",
"license": "mit",
"size": 18514
} | [
"java.time.OffsetDateTime"
] | import java.time.OffsetDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 448,897 |
public static Service createGenericExecService() {
return new ServiceDescription("exec", "Command execution service")
.addServiceMethod(runMethod())
.executorService(defaultExecutor)
.createService();
} | static Service function() { return new ServiceDescription("exec", STR) .addServiceMethod(runMethod()) .executorService(defaultExecutor) .createService(); } | /**
* Creates a service for generic shell execution, containing the "run" service
* method.
*
* @return generic exec service
*/ | Creates a service for generic shell execution, containing the "run" service method | createGenericExecService | {
"repo_name": "diirt/diirt",
"path": "pvmanager/service-exec/src/main/java/org/diirt/service/exec/GenericExecService.java",
"license": "mit",
"size": 1921
} | [
"org.diirt.service.Service",
"org.diirt.service.ServiceDescription"
] | import org.diirt.service.Service; import org.diirt.service.ServiceDescription; | import org.diirt.service.*; | [
"org.diirt.service"
] | org.diirt.service; | 2,087,839 |
default void postCommitStoreFile(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] family,
Path srcPath, Path dstPath) throws IOException {} | default void postCommitStoreFile(ObserverContext<RegionCoprocessorEnvironment> ctx, byte[] family, Path srcPath, Path dstPath) throws IOException {} | /**
* Called after moving bulk loaded hfile to region directory.
*
* @param ctx the environment provided by the region server
* @param family column family
* @param srcPath Path to file before the move
* @param dstPath Path to file after the move
*/ | Called after moving bulk loaded hfile to region directory | postCommitStoreFile | {
"repo_name": "ultratendency/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/coprocessor/RegionObserver.java",
"license": "apache-2.0",
"size": 50547
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import org.apache.hadoop.fs.Path; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,121,584 |
static AsyncHttpClientConfig.Builder cloneConfig(AsyncHttpClientConfig clientConfig) {
AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder(clientConfig);
return builder;
} | static AsyncHttpClientConfig.Builder cloneConfig(AsyncHttpClientConfig clientConfig) { AsyncHttpClientConfig.Builder builder = new AsyncHttpClientConfig.Builder(clientConfig); return builder; } | /**
* Creates a new client configuration builder using {@code clientConfig} as a template for
* the builder.
*
* @param clientConfig the instance to serve as a template for the builder
* @return a builder configured with the same options as the supplied config
*/ | Creates a new client configuration builder using clientConfig as a template for the builder | cloneConfig | {
"repo_name": "FingolfinTEK/camel",
"path": "components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcComponent.java",
"license": "apache-2.0",
"size": 8547
} | [
"com.ning.http.client.AsyncHttpClientConfig"
] | import com.ning.http.client.AsyncHttpClientConfig; | import com.ning.http.client.*; | [
"com.ning.http"
] | com.ning.http; | 1,932,314 |
ArrayList newList = new ArrayList<Node>(this.list);
newList.add(obj);
this.list = Collections.unmodifiableList(newList);
// incrementVersion("a->" + obj);
incrementVersion();
} | ArrayList newList = new ArrayList<Node>(this.list); newList.add(obj); this.list = Collections.unmodifiableList(newList); incrementVersion(); } | /**
* Adds obj to the list. Addition is done by making a copy of the existing list and then adding
* the obj to the new list and assigning the old list to the new unmodifiable list. This is to
* ensure that the iterator of the list doesn't get ConcurrentModificationException.
*
* @see java.util.Concurren... | Adds obj to the list. Addition is done by making a copy of the existing list and then adding the obj to the new list and assigning the old list to the new unmodifiable list. This is to ensure that the iterator of the list doesn't get ConcurrentModificationException | add | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/util/VersionedArrayList.java",
"license": "apache-2.0",
"size": 8767
} | [
"java.util.ArrayList",
"java.util.Collections",
"org.apache.geode.internal.cache.Node"
] | import java.util.ArrayList; import java.util.Collections; import org.apache.geode.internal.cache.Node; | import java.util.*; import org.apache.geode.internal.cache.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,721,398 |
public QueryStringQueryBuilder field(String field, float boost) {
if (fields == null) {
fields = newArrayList();
}
fields.add(field);
if (fieldsBoosts == null) {
fieldsBoosts = new ObjectFloatOpenHashMap<>();
}
fieldsBoosts.put(field, boost);
... | QueryStringQueryBuilder function(String field, float boost) { if (fields == null) { fields = newArrayList(); } fields.add(field); if (fieldsBoosts == null) { fieldsBoosts = new ObjectFloatOpenHashMap<>(); } fieldsBoosts.put(field, boost); return this; } | /**
* Adds a field to run the query string against with a specific boost.
*/ | Adds a field to run the query string against with a specific boost | field | {
"repo_name": "corochoone/elasticsearch",
"path": "src/main/java/org/elasticsearch/index/query/QueryStringQueryBuilder.java",
"license": "apache-2.0",
"size": 13564
} | [
"com.carrotsearch.hppc.ObjectFloatOpenHashMap",
"com.google.common.collect.Lists"
] | import com.carrotsearch.hppc.ObjectFloatOpenHashMap; import com.google.common.collect.Lists; | import com.carrotsearch.hppc.*; import com.google.common.collect.*; | [
"com.carrotsearch.hppc",
"com.google.common"
] | com.carrotsearch.hppc; com.google.common; | 772,936 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.