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
private Collection<TicketModel> processMergedTickets(ReceiveCommand cmd) { Map<Long, TicketModel> mergedTickets = new LinkedHashMap<Long, TicketModel>(); final RevWalk rw = getRevWalk(); try { rw.reset(); rw.markStart(rw.parseCommit(cmd.getNewId())); if (!ObjectId.zeroId().equals(cmd.getOldId())...
Collection<TicketModel> function(ReceiveCommand cmd) { Map<Long, TicketModel> mergedTickets = new LinkedHashMap<Long, TicketModel>(); final RevWalk rw = getRevWalk(); try { rw.reset(); rw.markStart(rw.parseCommit(cmd.getNewId())); if (!ObjectId.zeroId().equals(cmd.getOldId())) { rw.markUninteresting(rw.parseCommit(cmd....
/** * Automatically closes open tickets that have been merged to their integration * branch by a client. * * @param cmd */
Automatically closes open tickets that have been merged to their integration branch by a client
processMergedTickets
{ "repo_name": "Distrotech/gitblit", "path": "src/main/java/com/gitblit/git/PatchsetReceivePack.java", "license": "apache-2.0", "size": 38840 }
[ "com.gitblit.Constants", "com.gitblit.models.TicketModel", "com.gitblit.utils.StringUtils", "java.util.Collection", "java.util.LinkedHashMap", "java.util.Map", "java.util.Set", "org.eclipse.jgit.lib.ObjectId", "org.eclipse.jgit.lib.Ref", "org.eclipse.jgit.lib.RefUpdate", "org.eclipse.jgit.lib.Re...
import com.gitblit.Constants; import com.gitblit.models.TicketModel; import com.gitblit.utils.StringUtils; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; import org.eclipse.jgit.lib.RefUpdate...
import com.gitblit.*; import com.gitblit.models.*; import com.gitblit.utils.*; import java.util.*; import org.eclipse.jgit.lib.*; import org.eclipse.jgit.revwalk.*; import org.eclipse.jgit.transport.*;
[ "com.gitblit", "com.gitblit.models", "com.gitblit.utils", "java.util", "org.eclipse.jgit" ]
com.gitblit; com.gitblit.models; com.gitblit.utils; java.util; org.eclipse.jgit;
2,671,039
@SuppressWarnings("unchecked") @Before public void beforeEach() { server = mock(Server.class); keysDelegator = new KeysDelegator(server); resultMap = mock(Map.class); resultMaps = new ArrayList<Map<String, Object>>(); resultMaps.add(resultMap); opts = new Get...
@SuppressWarnings(STR) void function() { server = mock(Server.class); keysDelegator = new KeysDelegator(server); resultMap = mock(Map.class); resultMaps = new ArrayList<Map<String, Object>>(); resultMaps.add(resultMap); opts = new GetKeysOptions(KEYS_ARGUMENTS); }
/** * Runs before every test. */
Runs before every test
beforeEach
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/r19-1/src/test/java/com/perforce/p4java/impl/mapbased/server/cmd/KeysDelegatorTest.java", "license": "apache-2.0", "size": 3749 }
[ "com.perforce.p4java.impl.mapbased.server.Server", "com.perforce.p4java.option.server.GetKeysOptions", "java.util.ArrayList", "java.util.Map", "org.mockito.Mockito" ]
import com.perforce.p4java.impl.mapbased.server.Server; import com.perforce.p4java.option.server.GetKeysOptions; import java.util.ArrayList; import java.util.Map; import org.mockito.Mockito;
import com.perforce.p4java.impl.mapbased.server.*; import com.perforce.p4java.option.server.*; import java.util.*; import org.mockito.*;
[ "com.perforce.p4java", "java.util", "org.mockito" ]
com.perforce.p4java; java.util; org.mockito;
1,774,464
public String getVariance(List<Double> values) { if (values.size()==0) return "NaN"; double E_X; double sum=0, sum2=0; for (double dValue : values) { sum += dValue; sum2 += dValue*dValue; } E_X = sum / values.size(); return format(sum2/values.size() - (E_X*E_X)); }
String function(List<Double> values) { if (values.size()==0) return "NaN"; double E_X; double sum=0, sum2=0; for (double dValue : values) { sum += dValue; sum2 += dValue*dValue; } E_X = sum / values.size(); return format(sum2/values.size() - (E_X*E_X)); }
/** * Returns the variance of the values in the List. * * @param values The list of values * @return The variance of the values in the list or "NaN" if the list is * empty. */
Returns the variance of the values in the List
getVariance
{ "repo_name": "DSG-UniFE/ICeDiM", "path": "report/Report.java", "license": "gpl-3.0", "size": 11929 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
473,590
protected void preUpdate(List<M> list, P params) throws Exception { }
void function(List<M> list, P params) throws Exception { }
/** * Template method for <code>pre-update</code>. * * @param list * @throws Exception */
Template method for <code>pre-update</code>
preUpdate
{ "repo_name": "seava/seava.lib.j4e", "path": "seava.j4e.presenter/src/main/java/seava/j4e/presenter/service/ds/AbstractEntityDsWriteService.java", "license": "apache-2.0", "size": 15544 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,383,671
public Vector3i set(int index, IntBuffer buffer) { x = buffer.get(index); y = buffer.get(index + 1); z = buffer.get(index + 2); return this; }
Vector3i function(int index, IntBuffer buffer) { x = buffer.get(index); y = buffer.get(index + 1); z = buffer.get(index + 2); return this; }
/** * Read this vector from the supplied {@link IntBuffer} starting at the * specified absolute buffer position/index. * <p> * This method will not increment the position of the given IntBuffer. * * @param index * the absolute position into the IntBuffer * @param...
Read this vector from the supplied <code>IntBuffer</code> starting at the specified absolute buffer position/index. This method will not increment the position of the given IntBuffer
set
{ "repo_name": "RogueLogic/Big-Fusion", "path": "src/main/java/org/joml/Vector3i.java", "license": "mit", "size": 24101 }
[ "java.nio.IntBuffer" ]
import java.nio.IntBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,506,670
return id; } private enum ParserState { WAIT_SOC, CMD_PENTAIR, CMD_INTELLICHLOR } PentairBaseBridgeHandler(Bridge bridge) { super(bridge); }
return id; } private enum ParserState { WAIT_SOC, CMD_PENTAIR, CMD_INTELLICHLOR } PentairBaseBridgeHandler(Bridge bridge) { super(bridge); }
/** * Gets pentair bus id * * @return id */
Gets pentair bus id
getId
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.pentair/src/main/java/org/openhab/binding/pentair/internal/handler/PentairBaseBridgeHandler.java", "license": "epl-1.0", "size": 17170 }
[ "org.openhab.core.thing.Bridge" ]
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.*;
[ "org.openhab.core" ]
org.openhab.core;
699,073
private void select() { try { // wait for connect events. acceptSelector.select(); // process the io events we received Iterator<SelectionKey> selectedKeys = acceptSelector.selectedKeys().iterator(); while (!stopped_ && selectedKeys.hasNext()) { SelectionKey ...
void function() { try { acceptSelector.select(); Iterator<SelectionKey> selectedKeys = acceptSelector.selectedKeys().iterator(); while (!stopped_ && selectedKeys.hasNext()) { SelectionKey key = selectedKeys.next(); selectedKeys.remove(); if (!key.isValid()) { continue; } if (key.isAcceptable()) { handleAccept(); } else...
/** * Select and process IO events appropriately: If there are connections to * be accepted, accept them. */
Select and process IO events appropriately: If there are connections to be accepted, accept them
select
{ "repo_name": "rfaisal/ThriftStarterCSharpServerJavaClient", "path": "MathClient/src/org/apache/thrift/server/TThreadedSelectorServer.java", "license": "mit", "size": 20973 }
[ "java.io.IOException", "java.nio.channels.SelectionKey", "java.util.Iterator" ]
import java.io.IOException; import java.nio.channels.SelectionKey; import java.util.Iterator;
import java.io.*; import java.nio.channels.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
688,898
public List<BudgetCategoryMapping> getBudgetCategoryMappings() { return budgetCategoryMappings; }
List<BudgetCategoryMapping> function() { return budgetCategoryMappings; }
/** * Gets the budgetCategoryMappings attribute. * @return Returns the budgetCategoryMappings. */
Gets the budgetCategoryMappings attribute
getBudgetCategoryMappings
{ "repo_name": "vivantech/kc_fixes", "path": "src/main/java/org/kuali/kra/budget/core/BudgetCategoryMap.java", "license": "apache-2.0", "size": 2437 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
358,231
public void walk( TagElement r ) { for (Iterator<Element> i = r.getChildren(); i.hasNext();) { Element e = i.next(); if (!(e instanceof TagElement)) { if (!cdata( (CdataElement) e )) throw new IllegalArgumentException( "tag "+r.getQName()+": cdata not allowed here: '"+e+"'" ); c...
void function( TagElement r ) { for (Iterator<Element> i = r.getChildren(); i.hasNext();) { Element e = i.next(); if (!(e instanceof TagElement)) { if (!cdata( (CdataElement) e )) throw new IllegalArgumentException( STR+r.getQName()+STR+e+"'" ); continue; } TagElement te = (TagElement) e; if (!tag( te )) throw new Ille...
/** * Iterates over the children of r and calls tag or cdata for each. * @param r */
Iterates over the children of r and calls tag or cdata for each
walk
{ "repo_name": "OBIGOGIT/etch", "path": "interoptester/src/main/java/org/apache/etch/interoptester/ChildWalker.java", "license": "apache-2.0", "size": 2072 }
[ "java.util.Iterator", "org.apache.etch.util.core.xml.XmlParser" ]
import java.util.Iterator; import org.apache.etch.util.core.xml.XmlParser;
import java.util.*; import org.apache.etch.util.core.xml.*;
[ "java.util", "org.apache.etch" ]
java.util; org.apache.etch;
312,597
protected void loadFunctionsFromDbParams(Db db, org.apache.hadoop.hive.metastore.api.Database msDb) { if (msDb == null || msDb.getParameters() == null) return; LOG.info("Loading native functions for database: " + db.getName()); TCompactProtocol.Factory protocolFactory = new TCompactProtocol.Factory(...
void function(Db db, org.apache.hadoop.hive.metastore.api.Database msDb) { if (msDb == null msDb.getParameters() == null) return; LOG.info(STR + db.getName()); TCompactProtocol.Factory protocolFactory = new TCompactProtocol.Factory(); for (String key: msDb.getParameters().keySet()) { if (!key.startsWith(Db.FUNCTION_IND...
/** * Extracts Impala functions stored in metastore db parameters and adds them to * the catalog cache. */
Extracts Impala functions stored in metastore db parameters and adds them to the catalog cache
loadFunctionsFromDbParams
{ "repo_name": "cloudera/recordservice", "path": "fe/src/main/java/com/cloudera/impala/catalog/CatalogServiceCatalog.java", "license": "apache-2.0", "size": 47559 }
[ "com.cloudera.impala.common.ImpalaException", "com.cloudera.impala.common.JniUtil", "com.cloudera.impala.thrift.TFunction", "org.apache.commons.codec.binary.Base64", "org.apache.hadoop.hive.metastore.api.Database", "org.apache.thrift.protocol.TCompactProtocol" ]
import com.cloudera.impala.common.ImpalaException; import com.cloudera.impala.common.JniUtil; import com.cloudera.impala.thrift.TFunction; import org.apache.commons.codec.binary.Base64; import org.apache.hadoop.hive.metastore.api.Database; import org.apache.thrift.protocol.TCompactProtocol;
import com.cloudera.impala.common.*; import com.cloudera.impala.thrift.*; import org.apache.commons.codec.binary.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.thrift.protocol.*;
[ "com.cloudera.impala", "org.apache.commons", "org.apache.hadoop", "org.apache.thrift" ]
com.cloudera.impala; org.apache.commons; org.apache.hadoop; org.apache.thrift;
2,369,599
public static boolean isMinified(@NotNull CharSequence fileContent, @NotNull ParserDefinition parserDefinition, @NotNull TokenSet noWSRequireAfterTokenSet) { Lexer lexer = parserDefinition.createLexer(null); lexer.start(fileContent); if...
static boolean function(@NotNull CharSequence fileContent, @NotNull ParserDefinition parserDefinition, @NotNull TokenSet noWSRequireAfterTokenSet) { Lexer lexer = parserDefinition.createLexer(null); lexer.start(fileContent); if (!isMinified(lexer, parserDefinition, noWSRequireAfterTokenSet)) { return false; } else if (...
/** * Finds out whether the file minified by using common (not language-specific) heuristics. * Can be used for checking of css/less/scss/sass and js files. * * @param fileContent target file content * @param parserDefinition Parser definition of target language * @param noWSRequi...
Finds out whether the file minified by using common (not language-specific) heuristics. Can be used for checking of css/less/scss/sass and js files
isMinified
{ "repo_name": "retomerz/intellij-community", "path": "platform/core-impl/src/com/intellij/psi/css/MinifiedFilesUtil.java", "license": "apache-2.0", "size": 4874 }
[ "com.intellij.lang.ParserDefinition", "com.intellij.lexer.Lexer", "com.intellij.psi.tree.TokenSet", "org.jetbrains.annotations.NotNull" ]
import com.intellij.lang.ParserDefinition; import com.intellij.lexer.Lexer; import com.intellij.psi.tree.TokenSet; import org.jetbrains.annotations.NotNull;
import com.intellij.lang.*; import com.intellij.lexer.*; import com.intellij.psi.tree.*; import org.jetbrains.annotations.*;
[ "com.intellij.lang", "com.intellij.lexer", "com.intellij.psi", "org.jetbrains.annotations" ]
com.intellij.lang; com.intellij.lexer; com.intellij.psi; org.jetbrains.annotations;
2,102,510
protected TestRunStats runAllTestsWithAccounting(DatabaseRegistry databaseRegistry, TestRegistry testRegistry, boolean skipSlow) { logger.info("Running all tests with accounting"); int numberOfTestsRun = 0; HashSet<Class<? extends EnsTestCase>> testsRun = new HashSet<Class<? extends E...
TestRunStats function(DatabaseRegistry databaseRegistry, TestRegistry testRegistry, boolean skipSlow) { logger.info(STR); int numberOfTestsRun = 0; HashSet<Class<? extends EnsTestCase>> testsRun = new HashSet<Class<? extends EnsTestCase>>(); Map<Class<? extends EnsTestCase>,TestRunStats.CompletionStatus> trackCompletio...
/** * Run appropriate tests against databases. Also run show/repair methods if * the test implements the Repair interface and the appropriate flags are * set. * * @param databaseRegistry * The DatabaseRegistry to use. * @param testRegistry * The TestRegistry to use. * @param ski...
Run appropriate tests against databases. Also run show/repair methods if the test implements the Repair interface and the appropriate flags are set
runAllTestsWithAccounting
{ "repo_name": "thomasmaurel/ensj-healthcheck", "path": "src/org/ensembl/healthcheck/ConfigurableTestRunner.java", "license": "apache-2.0", "size": 32954 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.logging.Level", "org.ensembl.healthcheck.testcase.EnsTestCase", "org.ensembl.healthcheck.testcase.MultiDatabaseTestCase", "org.ensembl.healthcheck.testcase.OrderedDatabaseTestCase", "org....
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.logging.Level; import org.ensembl.healthcheck.testcase.EnsTestCase; import org.ensembl.healthcheck.testcase.MultiDatabaseTestCase; import org.ensembl.healthcheck.testcase.Ordered...
import java.util.*; import java.util.logging.*; import org.ensembl.healthcheck.testcase.*;
[ "java.util", "org.ensembl.healthcheck" ]
java.util; org.ensembl.healthcheck;
535,296
void tryEnactKill(VertexTerminationCause trigger, TaskTerminationCause taskterminationCause) { if(trySetTerminationCause(trigger)){ LOG.info("Killing tasks in vertex: " + logIdentifier + " due to trigger: " + trigger); for (Task task : tasks.values()) { eventHandler.handle( ...
void tryEnactKill(VertexTerminationCause trigger, TaskTerminationCause taskterminationCause) { if(trySetTerminationCause(trigger)){ LOG.info(STR + logIdentifier + STR + trigger); for (Task task : tasks.values()) { eventHandler.handle( new TaskEventTermination(task.getTaskId(), taskterminationCause)); } } }
/** * Set the terminationCause and send a kill-message to all tasks. * The task-kill messages are only sent once. */
Set the terminationCause and send a kill-message to all tasks. The task-kill messages are only sent once
tryEnactKill
{ "repo_name": "mapr/incubator-tez", "path": "tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/VertexImpl.java", "license": "apache-2.0", "size": 172392 }
[ "org.apache.tez.dag.app.dag.Task", "org.apache.tez.dag.app.dag.TaskTerminationCause", "org.apache.tez.dag.app.dag.VertexTerminationCause", "org.apache.tez.dag.app.dag.event.TaskEventTermination" ]
import org.apache.tez.dag.app.dag.Task; import org.apache.tez.dag.app.dag.TaskTerminationCause; import org.apache.tez.dag.app.dag.VertexTerminationCause; import org.apache.tez.dag.app.dag.event.TaskEventTermination;
import org.apache.tez.dag.app.dag.*; import org.apache.tez.dag.app.dag.event.*;
[ "org.apache.tez" ]
org.apache.tez;
1,853,849
@Authorized( { PrivilegeConstants.EDIT_USERS }) public User retireUser(User user, String reason) throws APIException;
@Authorized( { PrivilegeConstants.EDIT_USERS }) User function(User user, String reason) throws APIException;
/** * Deactive a user account so that it can no longer log in. * * @param user * @param reason * @throws APIException * @should retire user and set attributes */
Deactive a user account so that it can no longer log in
retireUser
{ "repo_name": "Bhamni/openmrs-core", "path": "api/src/main/java/org/openmrs/api/UserService.java", "license": "mpl-2.0", "size": 22397 }
[ "org.openmrs.User", "org.openmrs.annotation.Authorized", "org.openmrs.util.PrivilegeConstants" ]
import org.openmrs.User; import org.openmrs.annotation.Authorized; import org.openmrs.util.PrivilegeConstants;
import org.openmrs.*; import org.openmrs.annotation.*; import org.openmrs.util.*;
[ "org.openmrs", "org.openmrs.annotation", "org.openmrs.util" ]
org.openmrs; org.openmrs.annotation; org.openmrs.util;
953,683
ArrowBuf getOffsetBuffer();
ArrowBuf getOffsetBuffer();
/** * Gets the underlying buffer associated with offset vector. * * @return buffer */
Gets the underlying buffer associated with offset vector
getOffsetBuffer
{ "repo_name": "cpcloud/arrow", "path": "java/vector/src/main/java/org/apache/arrow/vector/ValueVector.java", "license": "apache-2.0", "size": 9470 }
[ "org.apache.arrow.memory.ArrowBuf" ]
import org.apache.arrow.memory.ArrowBuf;
import org.apache.arrow.memory.*;
[ "org.apache.arrow" ]
org.apache.arrow;
1,127,691
protected void sequence_Namespace(ISerializationContext context, Namespace semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, SmallJavaDslPackage.Literals.NAMESPACE__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissin...
void function(ISerializationContext context, Namespace semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, SmallJavaDslPackage.Literals.NAMESPACE__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SmallJavaDslPa...
/** * Contexts: * Namespace returns Namespace * * Constraint: * (name=QualifedName importDeclaration=ImportDeclaration smallClazz=SmallClazz) */
Contexts: Namespace returns Namespace Constraint: (name=QualifedName importDeclaration=ImportDeclaration smallClazz=SmallClazz)
sequence_Namespace
{ "repo_name": "nbhusare/EMF-Compare", "path": "org.neclipse.xtext.smalljavadsl/src-gen/org/neclipse/xtext/smalljavadsl/serializer/SmallJavaDslSemanticSequencer.java", "license": "epl-1.0", "size": 9282 }
[ "org.eclipse.xtext.serializer.ISerializationContext", "org.eclipse.xtext.serializer.acceptor.SequenceFeeder", "org.eclipse.xtext.serializer.sequencer.ITransientValueService", "org.neclipse.xtext.smalljavadsl.smallJavaDsl.Namespace", "org.neclipse.xtext.smalljavadsl.smallJavaDsl.SmallJavaDslPackage" ]
import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import org.neclipse.xtext.smalljavadsl.smallJavaDsl.Namespace; import org.neclipse.xtext.smalljavadsl.smallJavaDsl.SmallJavaDslPac...
import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import org.neclipse.xtext.smalljavadsl.*;
[ "org.eclipse.xtext", "org.neclipse.xtext" ]
org.eclipse.xtext; org.neclipse.xtext;
402,844
private void goTo(int y) { Year year = years.get(y); if (year == null) { // get the closest year before date int closest = 0; Iterator<Integer> it = years.keySet().iterator(); while (y > closest && it.hasNext()) { closest = it.next(); ...
void function(int y) { Year year = years.get(y); if (year == null) { int closest = 0; Iterator<Integer> it = years.keySet().iterator(); while (y > closest && it.hasNext()) { closest = it.next(); } year = years.get(closest); } currentYear = year; }
/** * Sets the current year to y or the closest existing before that * * @param y * The selected year */
Sets the current year to y or the closest existing before that
goTo
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/main/java/org/olat/presentation/webfeed/navigation/YearNavigationModel.java", "license": "apache-2.0", "size": 5753 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
760,069
public static void testNetworkList() throws Exception { PropertyConverter conv=new PropertyConverters.NetworkInterfaceList(); Object tmp; try { tmp=conv.convert(null, List.class, "bela", "lo", false); } catch(Throwable t) { tmp=conv.convert(null, List...
static void function() throws Exception { PropertyConverter conv=new PropertyConverters.NetworkInterfaceList(); Object tmp; try { tmp=conv.convert(null, List.class, "bela", "lo", false); } catch(Throwable t) { tmp=conv.convert(null, List.class, "bela", "lo0", false); } Object str=conv.toString(tmp); System.out.println(...
/** Cannot really test list of eth0,eth1,lo, because the list differs from host to host * * @throws Exception */
Cannot really test list of eth0,eth1,lo, because the list differs from host to host
testNetworkList
{ "repo_name": "rvansa/JGroups", "path": "tests/junit-functional/org/jgroups/tests/PropertyConvertersTest.java", "license": "apache-2.0", "size": 2669 }
[ "java.util.List", "org.jgroups.conf.PropertyConverter", "org.jgroups.conf.PropertyConverters" ]
import java.util.List; import org.jgroups.conf.PropertyConverter; import org.jgroups.conf.PropertyConverters;
import java.util.*; import org.jgroups.conf.*;
[ "java.util", "org.jgroups.conf" ]
java.util; org.jgroups.conf;
1,918,557
public static String serializeObjectToYamlStringAsMap(Object... objects) { logger.entering(new Object[] { objects }); HashMap<String, Object> objMap = new LinkedHashMap<>(); String key; int i = 0; for (Object obj : objects) { key = "uniqueKey" + Integer.toString(...
static String function(Object... objects) { logger.entering(new Object[] { objects }); HashMap<String, Object> objMap = new LinkedHashMap<>(); String key; int i = 0; for (Object obj : objects) { key = STR + Integer.toString(i); objMap.put(key, obj); i++; } String output = serializeObjectToYamlString(objMap); logger.exi...
/** * Use this utility method to print and return a yaml string to help serialize the object passed in as multiple * documents. * * @param objects * The objects that are to be serialised. * @return a yaml string representation of the object(s) passed in */
Use this utility method to print and return a yaml string to help serialize the object passed in as multiple documents
serializeObjectToYamlStringAsMap
{ "repo_name": "ILikeToNguyen/SeLion", "path": "dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/DataProviderHelper.java", "license": "apache-2.0", "size": 29323 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.HashMap", "java.util.LinkedHashMap", "java.util.List" ]
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
289,054
IFile[] getFiles(String[] paths) throws IOException;
IFile[] getFiles(String[] paths) throws IOException;
/** * Retrieve multiple IFiles at once, all with default (IFile.READONLY) access. The order of the files corresponds to * the order of the path argument array. Note that any path that doesn't exist will have a null entry in its place in * the result. * * @since 1.0.1 */
Retrieve multiple IFiles at once, all with default (IFile.READONLY) access. The order of the files corresponds to the order of the path argument array. Note that any path that doesn't exist will have a null entry in its place in the result
getFiles
{ "repo_name": "joval/jSAF", "path": "src/jsaf/intf/io/IFilesystem.java", "license": "lgpl-2.1", "size": 9487 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,257,062
final PendingUploadsQuery query = newQueryInstance(); assertTrue(query.getRouteParameters().isEmpty()); assertTrue(query.getQueryParameters().isEmpty()); assertEquals(OAUTH_TOKEN, query.getOauthToken()); }
final PendingUploadsQuery query = newQueryInstance(); assertTrue(query.getRouteParameters().isEmpty()); assertTrue(query.getQueryParameters().isEmpty()); assertEquals(OAUTH_TOKEN, query.getOauthToken()); }
/** * Ensure that insatnces of {@link PendingUploadsQuery} are correctly constructed. */
Ensure that insatnces of <code>PendingUploadsQuery</code> are correctly constructed
queryCorrectlyConstructed
{ "repo_name": "Sonoport/freesound-java", "path": "src/test/java/com/sonoport/freesound/query/sound/PendingUploadsQueryTest.java", "license": "apache-2.0", "size": 1573 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,194,646
public HttpEasy dataForm() { if (this.dataContentType != DataContentType.AUTO_SELECT) { throw new InvalidParameterException("Content type cannot be changed once set"); } this.dataContentType = DataContentType.FORM_DATA; return this; }
HttpEasy function() { if (this.dataContentType != DataContentType.AUTO_SELECT) { throw new InvalidParameterException(STR); } this.dataContentType = DataContentType.FORM_DATA; return this; }
/** * Sets the content type request property to "multipart/form-data" * Any data that is required must be added via field(name, value, mediaType) method. * Files are supported but any other objects must be easily converted to a string value. * * @return A self reference */
Sets the content type request property to "multipart/form-data" Any data that is required must be added via field(name, value, mediaType) method. Files are supported but any other objects must be easily converted to a string value
dataForm
{ "repo_name": "concordion/cubano", "path": "cubano-httpeasy/src/main/java/org/concordion/cubano/driver/http/HttpEasy.java", "license": "apache-2.0", "size": 33357 }
[ "java.security.InvalidParameterException" ]
import java.security.InvalidParameterException;
import java.security.*;
[ "java.security" ]
java.security;
1,346,927
public void setTimeout(TimeInterval t) { this.timeout = t; }
void function(TimeInterval t) { this.timeout = t; }
/** * Set the timeout to wait for the correlated message. * * @param t the timeout to set, if not specified then it defaults to 30 seconds. */
Set the timeout to wait for the correlated message
setTimeout
{ "repo_name": "mcwarman/interlok", "path": "adapter/src/main/java/com/adaptris/core/jms/AggregatingQueueConsumer.java", "license": "apache-2.0", "size": 6009 }
[ "com.adaptris.util.TimeInterval" ]
import com.adaptris.util.TimeInterval;
import com.adaptris.util.*;
[ "com.adaptris.util" ]
com.adaptris.util;
2,607,804
public void writeEntityToNBT(NBTTagCompound compound) { super.writeEntityToNBT(compound); compound.setInteger("Strength", this.getStrength()); }
void function(NBTTagCompound compound) { super.writeEntityToNBT(compound); compound.setInteger(STR, this.getStrength()); }
/** * (abstract) Protected helper method to write subclass entity data to NBT. */
(abstract) Protected helper method to write subclass entity data to NBT
writeEntityToNBT
{ "repo_name": "UpcraftLP/SpookyCraft", "path": "src/main/java/mod/upcraftlp/spookycraft/entity/monster/EntitySkeletalLlama.java", "license": "mit", "size": 9182 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
1,829,080
public Response addPort( @PathParam(value = "nodeType") String nodeType, @PathParam(value = "nodeId") String nodeId, @PathParam(value = "bridgeName") String bridge, @PathParam(value = "portName") String port, @PathParam(value = "vlan") String vlan) { IBridg...
Response function( @PathParam(value = STR) String nodeType, @PathParam(value = STR) String nodeId, @PathParam(value = STR) String bridge, @PathParam(value = STR) String port, @PathParam(value = "vlan") String vlan) { IBridgeDomainConfigService configurationService = getConfigurationService(); if (configurationService =...
/** * Add a Port,Vlan to a Bridge * <pre> * * Example : * Request : * http://localhost:8080/controller/nb/v2/networkconfig/bridgedomain/port/STUB/mgmt1/bridge1/port2/200 * * </pre> * @param nodeType Node Type of the node with the management session. * @param nodeId Node Identifie...
Add a Port,Vlan to a Bridge <code> Example : Request : HREF </code>
addPort
{ "repo_name": "yuyf10/opendaylight-controller", "path": "opendaylight/northbound/networkconfiguration/bridgedomain/src/main/java/org/opendaylight/controller/networkconfig/bridgedomain/northbound/BridgeDomainNorthbound.java", "license": "epl-1.0", "size": 14375 }
[ "java.util.HashMap", "java.util.Map", "javax.ws.rs.PathParam", "javax.ws.rs.core.Response", "org.opendaylight.controller.northbound.commons.exception.NotAcceptableException", "org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException", "org.opendaylight.controller.northbound.com...
import java.util.HashMap; import java.util.Map; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; import org.opendaylight.controller.northbound.commons.exception.NotAcceptableException; import org.opendaylight.controller.northbound.commons.exception.ResourceNotFoundException; import org.opendaylight.contr...
import java.util.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.opendaylight.controller.northbound.commons.exception.*; import org.opendaylight.controller.sal.core.*; import org.opendaylight.controller.sal.networkconfig.bridgedomain.*; import org.opendaylight.controller.sal.utils.*;
[ "java.util", "javax.ws", "org.opendaylight.controller" ]
java.util; javax.ws; org.opendaylight.controller;
1,380,946
public void excludeObjects(PackIndex idx) { if (excludeInPacks == null) { excludeInPacks = new PackIndex[] { idx }; excludeInPackLast = idx; } else { int cnt = excludeInPacks.length; PackIndex[] newList = new PackIndex[cnt + 1]; System.arraycopy(excludeInPacks, 0, newList, 0, cnt); newList[cnt]...
void function(PackIndex idx) { if (excludeInPacks == null) { excludeInPacks = new PackIndex[] { idx }; excludeInPackLast = idx; } else { int cnt = excludeInPacks.length; PackIndex[] newList = new PackIndex[cnt + 1]; System.arraycopy(excludeInPacks, 0, newList, 0, cnt); newList[cnt] = idx; excludeInPacks = newList; } }
/** * Add a pack index whose contents should be excluded from the result. * * @param idx * objects in this index will not be in the output pack. */
Add a pack index whose contents should be excluded from the result
excludeObjects
{ "repo_name": "forge/plugin-undo", "path": "src/main/jgit/org/jboss/forge/jgit/storage/pack/PackWriter.java", "license": "epl-1.0", "size": 71255 }
[ "org.jboss.forge.jgit.storage.file.PackIndex" ]
import org.jboss.forge.jgit.storage.file.PackIndex;
import org.jboss.forge.jgit.storage.file.*;
[ "org.jboss.forge" ]
org.jboss.forge;
1,195,499
public CryptoSupport getCryptoSupport() { if(cryptoSupportCache == null) { cryptoSupportCache = createCryptoSupport(); } return cryptoSupportCache; }
CryptoSupport function() { if(cryptoSupportCache == null) { cryptoSupportCache = createCryptoSupport(); } return cryptoSupportCache; }
/** * This method returns the {@link CryptoSupport} object that provides support for the selected symmetric cipher. * @return the {@link CryptoSupport} object that provides support for the selected symmetric cipher */
This method returns the <code>CryptoSupport</code> object that provides support for the selected symmetric cipher
getCryptoSupport
{ "repo_name": "halemmerich/de.persosim.simulator", "path": "de.persosim.simulator/src/de/persosim/simulator/protocols/pace/PaceOid.java", "license": "gpl-3.0", "size": 7247 }
[ "de.persosim.simulator.crypto.CryptoSupport" ]
import de.persosim.simulator.crypto.CryptoSupport;
import de.persosim.simulator.crypto.*;
[ "de.persosim.simulator" ]
de.persosim.simulator;
780,243
private static <F, L> double[] getLogProbabilities(EncodedDatum datum, double[] weights, Encoding<F, L> encoding, IndexLinearizer indexLinearizer) { double[] logProbabilities = new double[encoding.getNumLabels()]; for (int labelIndex = 0; labelIndex < encoding.getNumLabels(); ++labelIndex) { for (int num ...
static <F, L> double[] function(EncodedDatum datum, double[] weights, Encoding<F, L> encoding, IndexLinearizer indexLinearizer) { double[] logProbabilities = new double[encoding.getNumLabels()]; for (int labelIndex = 0; labelIndex < encoding.getNumLabels(); ++labelIndex) { for (int num = 0; num < datum.getNumActiveFeat...
/** * Calculate the log probabilities of each class, for the given datum * (feature bundle). Note that the weighted votes (refered to as * activations) are *almost* log probabilities, but need to be normalized. */
Calculate the log probabilities of each class, for the given datum (feature bundle). Note that the weighted votes (refered to as activations) are *almost* log probabilities, but need to be normalized
getLogProbabilities
{ "repo_name": "blodstone/CCS590v2", "path": "collinsHead/edu/berkeley/nlp/classify/MaximumEntropyClassifier.java", "license": "mit", "size": 17885 }
[ "edu.berkeley.nlp.math.SloppyMath" ]
import edu.berkeley.nlp.math.SloppyMath;
import edu.berkeley.nlp.math.*;
[ "edu.berkeley.nlp" ]
edu.berkeley.nlp;
733,185
public int lastIndexOf(final char toSearch, final CharSequence sequence) { return lastIndexOf(toSearch, CharSequenceUtils.length(sequence), sequence); }
int function(final char toSearch, final CharSequence sequence) { return lastIndexOf(toSearch, CharSequenceUtils.length(sequence), sequence); }
/** * Returns the index within the given sequence of the last occurrence of the specified char. * * @param toSearch The char to search. * @param sequence The sequence where the search will be made. * @return The index within the given sequence of the last occurrence of the specified char...
Returns the index within the given sequence of the last occurrence of the specified char
lastIndexOf
{ "repo_name": "taperinha/commons", "path": "commons-core/src/main/java/br/ojimarcius/commons/text/CharComparator.java", "license": "lgpl-2.1", "size": 9075 }
[ "br.ojimarcius.commons.util.CharSequenceUtils" ]
import br.ojimarcius.commons.util.CharSequenceUtils;
import br.ojimarcius.commons.util.*;
[ "br.ojimarcius.commons" ]
br.ojimarcius.commons;
1,328,070
@Test public void testMinDurationPostAggregateDefaultResult() { MinDuration minDuration = new MinDuration("myKey", VALID_TIME, ChronoUnit.DAYS); PropertyValue resultValue = minDuration.postAggregate(PropertyValue.create( TemporalElement.DEFAULT_TIME_TO)); assertEquals(PropertyValue.NULL_VALUE, res...
void function() { MinDuration minDuration = new MinDuration("myKey", VALID_TIME, ChronoUnit.DAYS); PropertyValue resultValue = minDuration.postAggregate(PropertyValue.create( TemporalElement.DEFAULT_TIME_TO)); assertEquals(PropertyValue.NULL_VALUE, resultValue); }
/** * Test if the postAggregate returns a null property if a default timestamp is given. */
Test if the postAggregate returns a null property if a default timestamp is given
testMinDurationPostAggregateDefaultResult
{ "repo_name": "galpha/gradoop", "path": "gradoop-temporal/src/test/java/org/gradoop/temporal/model/impl/operators/aggregation/functions/MinMaxDurationWithTemporalUnitTest.java", "license": "apache-2.0", "size": 6527 }
[ "java.time.temporal.ChronoUnit", "org.gradoop.common.model.impl.properties.PropertyValue", "org.gradoop.temporal.model.impl.pojo.TemporalElement", "org.testng.AssertJUnit" ]
import java.time.temporal.ChronoUnit; import org.gradoop.common.model.impl.properties.PropertyValue; import org.gradoop.temporal.model.impl.pojo.TemporalElement; import org.testng.AssertJUnit;
import java.time.temporal.*; import org.gradoop.common.model.impl.properties.*; import org.gradoop.temporal.model.impl.pojo.*; import org.testng.*;
[ "java.time", "org.gradoop.common", "org.gradoop.temporal", "org.testng" ]
java.time; org.gradoop.common; org.gradoop.temporal; org.testng;
177,979
public int unscheduleInvalidRepoSyncSchedules(Org orgIn) { int count = 0; for (TaskoSchedule schedule : listActiveRepoSyncSchedules(orgIn)) { String channelIdStr = (String) schedule.getDataMap().get("channel_id"); Long channelId = null; try { chann...
int function(Org orgIn) { int count = 0; for (TaskoSchedule schedule : listActiveRepoSyncSchedules(orgIn)) { String channelIdStr = (String) schedule.getDataMap().get(STR); Long channelId = null; try { channelId = Long.parseLong(channelIdStr); } catch (NumberFormatException nfe) { } if (channelId == null ChannelFactory....
/** * unschedule all outdated repo-sync schedules within an org * @param orgIn organization * @return number of removed schedules */
unschedule all outdated repo-sync schedules within an org
unscheduleInvalidRepoSyncSchedules
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/taskomatic/TaskomaticApi.java", "license": "gpl-2.0", "size": 13906 }
[ "com.redhat.rhn.domain.channel.ChannelFactory", "com.redhat.rhn.domain.org.Org" ]
import com.redhat.rhn.domain.channel.ChannelFactory; import com.redhat.rhn.domain.org.Org;
import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.org.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,802,766
boolean remove(K key, long value) { AtomicLong atomic = map.get(key); if (atomic == null) { return false; } long oldValue = atomic.get(); if (oldValue != value) { return false; } if (oldValue == 0L || atomic.compareAndSet(oldValue, 0L)) { // only remove after setting to...
boolean remove(K key, long value) { AtomicLong atomic = map.get(key); if (atomic == null) { return false; } long oldValue = atomic.get(); if (oldValue != value) { return false; } if (oldValue == 0L atomic.compareAndSet(oldValue, 0L)) { map.remove(key, atomic); return true; } return false; }
/** * If {@code (key, value)} is currently in the map, this method removes it and returns * true; otherwise, this method returns false. */
If (key, value) is currently in the map, this method removes it and returns true; otherwise, this method returns false
remove
{ "repo_name": "Allive1/pinpoint", "path": "thirdparty/google-guava/src/main/java/com/google/common/util/concurrent/AtomicLongMap.java", "license": "apache-2.0", "size": 13537 }
[ "java.util.concurrent.atomic.AtomicLong" ]
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
352,702
private boolean chooseBlockAndProxy() { // source and target must have the same storage type final StorageType t = source.getStorageType(); // iterate all source's blocks until find a good one for (Iterator<DBlock> i = source.getBlockIterator(); i.hasNext();) { if (markMovedIfGoodBlo...
boolean function() { final StorageType t = source.getStorageType(); for (Iterator<DBlock> i = source.getBlockIterator(); i.hasNext();) { if (markMovedIfGoodBlock(i.next(), t)) { i.remove(); return true; } } return false; }
/** * Choose a good block/blockGroup from source & Get reportedBlock from * the block & Choose a proxy source for the reportedBlock. * * @return true if a block and its proxy are chosen; false otherwise */
Choose a good block/blockGroup from source & Get reportedBlock from the block & Choose a proxy source for the reportedBlock
chooseBlockAndProxy
{ "repo_name": "Ethanlm/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Dispatcher.java", "license": "apache-2.0", "size": 48883 }
[ "java.util.Iterator", "org.apache.hadoop.fs.StorageType" ]
import java.util.Iterator; import org.apache.hadoop.fs.StorageType;
import java.util.*; import org.apache.hadoop.fs.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
889,918
protected void writeWordSeparator() throws IOException { output.write(getWordSeparator()); }
void function() throws IOException { output.write(getWordSeparator()); }
/** * Write the word separator value to the output stream. * * @throws IOException If there is a problem writing out the wordseparator to the document. */
Write the word separator value to the output stream
writeWordSeparator
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java", "license": "apache-2.0", "size": 73167 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,806,767
public void apply(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) { try (OpOrder.Group opGroup = writeOrder.start()) { // write the mutation to the commitlog and memtables ReplayPosition replayPosition = null; if (writeCommitLog) ...
void function(Mutation mutation, boolean writeCommitLog, boolean updateIndexes) { try (OpOrder.Group opGroup = writeOrder.start()) { ReplayPosition replayPosition = null; if (writeCommitLog) { Tracing.trace(STR); replayPosition = CommitLog.instance.add(mutation); } DecoratedKey key = StorageService.getPartitioner().dec...
/** * This method appends a row to the global CommitLog, then updates memtables and indexes. * * @param mutation the row to write. Must not be modified after calling apply, since commitlog append * may happen concurrently, depending on the CL Executor type. * @param...
This method appends a row to the global CommitLog, then updates memtables and indexes
apply
{ "repo_name": "matthewtt/cassandra_read", "path": "src/java/org/apache/cassandra/db/Keyspace.java", "license": "apache-2.0", "size": 16989 }
[ "org.apache.cassandra.db.commitlog.CommitLog", "org.apache.cassandra.db.commitlog.ReplayPosition", "org.apache.cassandra.db.index.SecondaryIndexManager", "org.apache.cassandra.service.StorageService", "org.apache.cassandra.tracing.Tracing", "org.apache.cassandra.utils.concurrent.OpOrder" ]
import org.apache.cassandra.db.commitlog.CommitLog; import org.apache.cassandra.db.commitlog.ReplayPosition; import org.apache.cassandra.db.index.SecondaryIndexManager; import org.apache.cassandra.service.StorageService; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.utils.concurrent.OpOrder;
import org.apache.cassandra.db.commitlog.*; import org.apache.cassandra.db.index.*; import org.apache.cassandra.service.*; import org.apache.cassandra.tracing.*; import org.apache.cassandra.utils.concurrent.*;
[ "org.apache.cassandra" ]
org.apache.cassandra;
1,024,067
public void setChartService(ChartService chartService) { this.chartService = chartService; }
void function(ChartService chartService) { this.chartService = chartService; }
/** * Sets the chartService attribute, allowing the injection of an implementation of the service. * * @param chartService the chartService implementation to set * @see org.kuali.kfs.coa.service.ChartService */
Sets the chartService attribute, allowing the injection of an implementation of the service
setChartService
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/gl/batch/PurgeAccountBalancesStep.java", "license": "apache-2.0", "size": 3278 }
[ "org.kuali.kfs.coa.service.ChartService" ]
import org.kuali.kfs.coa.service.ChartService;
import org.kuali.kfs.coa.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,885,792
public static MozuClient<com.mozu.api.contracts.event.Event> getEventClient(String eventId, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.event.EventNotificationUrl.getEventUrl(eventId, responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.event.Event.clas...
static MozuClient<com.mozu.api.contracts.event.Event> function(String eventId, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.event.EventNotificationUrl.getEventUrl(eventId, responseFields); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.event.Event.class; MozuClient<com.mozu.api....
/** * * <p><pre><code> * MozuClient<com.mozu.api.contracts.event.Event> mozuClient=GetEventClient( eventId, responseFields); * client.setBaseAddress(url); * client.executeRequest(); * Event event = client.Result(); * </code></pre></p> * @param eventId The unique identifier of the event being r...
<code><code> MozuClient mozuClient=GetEventClient( eventId, responseFields); client.setBaseAddress(url); client.executeRequest(); Event event = client.Result(); </code></code>
getEventClient
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/event/EventNotificationClient.java", "license": "mit", "size": 6085 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
2,173,475
public List<DosageRequest> getDosageRequests() { return dosageRequests; }
List<DosageRequest> function() { return dosageRequests; }
/** * All dosage requests scheduled for pill reminder. * @return */
All dosage requests scheduled for pill reminder
getDosageRequests
{ "repo_name": "motech/motech-server-pillreminder", "path": "modules/pillreminder/api/src/main/java/org/motechproject/server/pillreminder/api/contract/DailyPillRegimenRequest.java", "license": "bsd-3-clause", "size": 2644 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
679,024
void doImportCheckpoint() throws IOException { FSImage ckptImage = new FSImage(); FSNamesystem fsNamesys = FSNamesystem.getFSNamesystem(); // replace real image with the checkpoint image FSImage realImage = fsNamesys.getFSImage(); assert realImage == this; fsNamesys.d...
void doImportCheckpoint() throws IOException { FSImage ckptImage = new FSImage(); FSNamesystem fsNamesys = FSNamesystem.getFSNamesystem(); FSImage realImage = fsNamesys.getFSImage(); assert realImage == this; fsNamesys.dir.fsImage = ckptImage; try { ckptImage.recoverTransitionRead(checkpointDirs, checkpointEditsDirs, S...
/** * Load image from a checkpoint directory and save it into the current one. * * @throws IOException */
Load image from a checkpoint directory and save it into the current one
doImportCheckpoint
{ "repo_name": "dongpf/hadoop-0.19.1", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java", "license": "apache-2.0", "size": 59930 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.server.common.HdfsConstants" ]
import java.io.IOException; import org.apache.hadoop.hdfs.server.common.HdfsConstants;
import java.io.*; import org.apache.hadoop.hdfs.server.common.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
557,598
T addAsManifestResource(File resource, ArchivePath target) throws IllegalArgumentException;
T addAsManifestResource(File resource, ArchivePath target) throws IllegalArgumentException;
/** * Adds the {@link File} as a Manifest resource to the container, returning the container itself. * * @param resource * {@link File} resource to add * @param target * The target path within the archive in which to add the resource, relative to the {@link Archive}s ...
Adds the <code>File</code> as a Manifest resource to the container, returning the container itself
addAsManifestResource
{ "repo_name": "ALRubinger/shrinkwrap", "path": "api/src/main/java/org/jboss/shrinkwrap/api/container/ManifestContainer.java", "license": "apache-2.0", "size": 16478 }
[ "java.io.File", "org.jboss.shrinkwrap.api.ArchivePath" ]
import java.io.File; import org.jboss.shrinkwrap.api.ArchivePath;
import java.io.*; import org.jboss.shrinkwrap.api.*;
[ "java.io", "org.jboss.shrinkwrap" ]
java.io; org.jboss.shrinkwrap;
198,578
public void addTaxonLabel(TaxonLabel pTaxonLabel) { if (pTaxonLabel != null) { getSubmittedTaxonLabels().add(pTaxonLabel); } }
void function(TaxonLabel pTaxonLabel) { if (pTaxonLabel != null) { getSubmittedTaxonLabels().add(pTaxonLabel); } }
/** * Append a new TaxonLabel. * * Creation date: Mar 14, 2006 * * @param pTaxonLabel TaxonLabel */
Append a new TaxonLabel. Creation date: Mar 14, 2006
addTaxonLabel
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-core/src/main/java/org/cipres/treebase/domain/study/Submission.java", "license": "bsd-3-clause", "size": 13956 }
[ "org.cipres.treebase.domain.taxon.TaxonLabel" ]
import org.cipres.treebase.domain.taxon.TaxonLabel;
import org.cipres.treebase.domain.taxon.*;
[ "org.cipres.treebase" ]
org.cipres.treebase;
2,016,294
@Test public void testCursorRotatePreexistingSameSizeWithNewModtime() throws IOException, InterruptedException { // Windows rename semantics different than unix Assume.assumeTrue(!OSUtils.isWindowsOS()); // normal implementation uses synchronous queue, but we use array blocking // queue for ...
void function() throws IOException, InterruptedException { Assume.assumeTrue(!OSUtils.isWindowsOS()); File f2 = FileUtil.createTempFile("move", ".tmp"); f2.delete(); f2.deleteOnExit(); BlockingQueue<Event> q = new ArrayBlockingQueue<Event>(100); File f = createDataFile(5); Cursor c = new CustomDelimCursor(q, f, "blah",...
/** * Here, we complete reading a file and then replace it with a new file that * has a different modification time. */
Here, we complete reading a file and then replace it with a new file that has a different modification time
testCursorRotatePreexistingSameSizeWithNewModtime
{ "repo_name": "fengzanfeng/flume-v2", "path": "flume-core/test/java/com/cloudera/flume/handlers/text/TestMultiLineCursor.java", "license": "apache-2.0", "size": 24059 }
[ "com.cloudera.flume.core.Event", "com.cloudera.flume.handlers.text.CustomDelimCursor", "com.cloudera.util.Clock", "com.cloudera.util.FileUtil", "com.cloudera.util.OSUtils", "java.io.File", "java.io.IOException", "java.util.concurrent.ArrayBlockingQueue", "java.util.concurrent.BlockingQueue", "org....
import com.cloudera.flume.core.Event; import com.cloudera.flume.handlers.text.CustomDelimCursor; import com.cloudera.util.Clock; import com.cloudera.util.FileUtil; import com.cloudera.util.OSUtils; import java.io.File; import java.io.IOException; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurre...
import com.cloudera.flume.core.*; import com.cloudera.flume.handlers.text.*; import com.cloudera.util.*; import java.io.*; import java.util.concurrent.*; import org.junit.*;
[ "com.cloudera.flume", "com.cloudera.util", "java.io", "java.util", "org.junit" ]
com.cloudera.flume; com.cloudera.util; java.io; java.util; org.junit;
2,652,278
public HadoopProcessorAdapter hadoop();
HadoopProcessorAdapter function();
/** * Gets Hadoop processor. * * @return Hadoop processor. */
Gets Hadoop processor
hadoop
{ "repo_name": "vldpyatkov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java", "license": "apache-2.0", "size": 17217 }
[ "org.apache.ignite.internal.processors.hadoop.HadoopProcessorAdapter" ]
import org.apache.ignite.internal.processors.hadoop.HadoopProcessorAdapter;
import org.apache.ignite.internal.processors.hadoop.*;
[ "org.apache.ignite" ]
org.apache.ignite;
271,305
static <T> ListIterator<T> cast(Iterator<T> iterator) { return (ListIterator<T>) iterator; }
static <T> ListIterator<T> cast(Iterator<T> iterator) { return (ListIterator<T>) iterator; }
/** * Used to avoid http://bugs.sun.com/view_bug.do?bug_id=6558557 */
Used to avoid HREF
cast
{ "repo_name": "qingsong-xu/guava", "path": "guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/Iterators.java", "license": "apache-2.0", "size": 45152 }
[ "java.util.Iterator", "java.util.ListIterator" ]
import java.util.Iterator; import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
2,411,180
@BeforeMethod protected void initTests() { MockitoAnnotations.initMocks(this); ReflectionUtils.setFieldValue(labelsRestService, "fieldValueRetrievalService", fieldValueRetrievalService); ReflectionUtils.setFieldValue(labelsRestService, "typeConverter", typeConverter); ReflectionUtils.setFieldValue(labelsRes...
void function() { MockitoAnnotations.initMocks(this); ReflectionUtils.setFieldValue(labelsRestService, STR, fieldValueRetrievalService); ReflectionUtils.setFieldValue(labelsRestService, STR, typeConverter); ReflectionUtils.setFieldValue(labelsRestService, STR, labelProvider); }
/** * Initialise fields and mocks before each test. */
Initialise fields and mocks before each test
initTests
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/emf-core/emf-core-impl/src/test/java/com/sirma/itt/emf/label/LabelRestServiceTest.java", "license": "lgpl-3.0", "size": 4620 }
[ "com.sirma.itt.seip.util.ReflectionUtils", "org.mockito.MockitoAnnotations" ]
import com.sirma.itt.seip.util.ReflectionUtils; import org.mockito.MockitoAnnotations;
import com.sirma.itt.seip.util.*; import org.mockito.*;
[ "com.sirma.itt", "org.mockito" ]
com.sirma.itt; org.mockito;
2,115,294
default void onPlaylistMetadataChanged(EventTime eventTime, MediaMetadata playlistMetadata) {}
default void onPlaylistMetadataChanged(EventTime eventTime, MediaMetadata playlistMetadata) {}
/** * Called when the combined {@link MediaMetadata} changes. * * <p>The provided {@link MediaMetadata} is a combination of the {@link MediaItem#mediaMetadata} * and the static and dynamic metadata from the {@link TrackSelection#getFormat(int) track * selections' formats} and {@link MetadataOutput#onMeta...
Called when the combined <code>MediaMetadata</code> changes. The provided <code>MediaMetadata</code> is a combination of the <code>MediaItem#mediaMetadata</code> and the static and dynamic metadata from the <code>TrackSelection#getFormat(int) track selections' formats</code> and <code>MetadataOutput#onMetadata(Metadata...
onMediaMetadataChanged
{ "repo_name": "google/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/analytics/AnalyticsListener.java", "license": "apache-2.0", "size": 52677 }
[ "com.google.android.exoplayer2.MediaMetadata" ]
import com.google.android.exoplayer2.MediaMetadata;
import com.google.android.exoplayer2.*;
[ "com.google.android" ]
com.google.android;
2,439,851
public Bindings createBindings(ScriptEngine scriptEngine, VariableScope variableScope) { return scriptBindingsFactory.createBindings(variableScope, scriptEngine.createBindings()); }
Bindings function(ScriptEngine scriptEngine, VariableScope variableScope) { return scriptBindingsFactory.createBindings(variableScope, scriptEngine.createBindings()); }
/** override to build a spring aware ScriptingEngines * @param engineBindin * @param scriptEngine */
override to build a spring aware ScriptingEngines
createBindings
{ "repo_name": "camunda/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/scripting/engine/ScriptingEngines.java", "license": "apache-2.0", "size": 6607 }
[ "javax.script.Bindings", "javax.script.ScriptEngine", "org.camunda.bpm.engine.delegate.VariableScope" ]
import javax.script.Bindings; import javax.script.ScriptEngine; import org.camunda.bpm.engine.delegate.VariableScope;
import javax.script.*; import org.camunda.bpm.engine.delegate.*;
[ "javax.script", "org.camunda.bpm" ]
javax.script; org.camunda.bpm;
2,290,944
void blacklist(Key<?> key, State state, Object source);
void blacklist(Key<?> key, State state, Object source);
/** * Forbids the corresponding injector from creating a binding to {@code key}. Child injectors * blacklist their bound keys on their parent injectors to prevent just-in-time bindings on the * parent injector that would conflict and pass along their state to control the lifetimes. */
Forbids the corresponding injector from creating a binding to key. Child injectors blacklist their bound keys on their parent injectors to prevent just-in-time bindings on the parent injector that would conflict and pass along their state to control the lifetimes
blacklist
{ "repo_name": "cgruber/guice", "path": "core/src/com/google/inject/internal/State.java", "license": "apache-2.0", "size": 7326 }
[ "com.google.inject.Key" ]
import com.google.inject.Key;
import com.google.inject.*;
[ "com.google.inject" ]
com.google.inject;
2,241,812
private static void otherPane(final Player player, final ItemMap itemMap) { Interface otherPane = new Interface(false, 3, GUIName, player); SchedulerUtils.runAsync(() -> { otherPane.addButton(new Button(fillerPaneGItem), 4); otherPane.addButton(new Button(headerStack(player, itemMap))); otherPane.addButto...
static void function(final Player player, final ItemMap itemMap) { Interface otherPane = new Interface(false, 3, GUIName, player); SchedulerUtils.runAsync(() -> { otherPane.addButton(new Button(fillerPaneGItem), 4); otherPane.addButton(new Button(headerStack(player, itemMap))); otherPane.addButton(new Button(fillerPane...
/** * Opens the Pane for the Player. * This Pane is for modifying special items. * * @param player - The Player to have the Pane opened. * @param itemMap - The ItemMap currently being modified. */
Opens the Pane for the Player. This Pane is for modifying special items
otherPane
{ "repo_name": "RockinChaos/ItemJoin", "path": "src/me/RockinChaos/itemjoin/utils/interfaces/menus/Menu.java", "license": "lgpl-3.0", "size": 522918 }
[ "org.bukkit.Color", "org.bukkit.entity.Player" ]
import org.bukkit.Color; import org.bukkit.entity.Player;
import org.bukkit.*; import org.bukkit.entity.*;
[ "org.bukkit", "org.bukkit.entity" ]
org.bukkit; org.bukkit.entity;
282,056
public void paint(FlowFigure figure, Graphics g, Rectangle where, int sides) { }
void function(FlowFigure figure, Graphics g, Rectangle where, int sides) { }
/** * Subclasses should override this method to paint each box's border. * * @see FlowBorder#paint(FlowFigure, Graphics, Rectangle, int) */
Subclasses should override this method to paint each box's border
paint
{ "repo_name": "opensagres/xdocreport.eclipse", "path": "rap/org.eclipse.draw2d/src/org/eclipse/draw2d/text/AbstractFlowBorder.java", "license": "lgpl-2.1", "size": 2462 }
[ "org.eclipse.draw2d.Graphics", "org.eclipse.draw2d.geometry.Rectangle" ]
import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.*; import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
405,529
private void expandValue( List<String> tokens, String attributeName, String value, Tokenize tokenize) { value = expand(attributeName, value); if (tokenize == Tokenize.YES) { try { ShellUtils.tokenize(tokens, value); } catch (ShellUtils.TokenizationException e) { ...
void function( List<String> tokens, String attributeName, String value, Tokenize tokenize) { value = expand(attributeName, value); if (tokenize == Tokenize.YES) { try { ShellUtils.tokenize(tokens, value); } catch (ShellUtils.TokenizationException e) { ruleContext.attributeError(attributeName, e.getMessage()); } } else ...
/** * Expands make variables and $(location) tags in value, and optionally tokenizes the result. */
Expands make variables and $(location) tags in value, and optionally tokenizes the result
expandValue
{ "repo_name": "damienmg/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/Expander.java", "license": "apache-2.0", "size": 7984 }
[ "com.google.devtools.build.lib.shell.ShellUtils", "java.util.List" ]
import com.google.devtools.build.lib.shell.ShellUtils; import java.util.List;
import com.google.devtools.build.lib.shell.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,683,365
static Rule createRule( Package.Builder pkgBuilder, RuleClass ruleClass, Map<String, Object> attributeValues, EventHandler eventHandler, FuncallExpression ast, Location location) throws InvalidRuleException, NameConflictException { Preconditions.checkNotNull(ruleClass); ...
static Rule createRule( Package.Builder pkgBuilder, RuleClass ruleClass, Map<String, Object> attributeValues, EventHandler eventHandler, FuncallExpression ast, Location location) throws InvalidRuleException, NameConflictException { Preconditions.checkNotNull(ruleClass); String ruleClassName = ruleClass.getName(); Objec...
/** * Creates and returns a rule instance. * * <p>It is the caller's responsibility to add the rule to the package (the caller may choose not * to do so if, for example, the rule has errors).</p> */
Creates and returns a rule instance. It is the caller's responsibility to add the rule to the package (the caller may choose not to do so if, for example, the rule has errors)
createRule
{ "repo_name": "charlieaustin/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java", "license": "apache-2.0", "size": 6407 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.events.EventHandler", "com.google.devtools.build.lib.events.Location", "com.google.devtools.build.lib.packages.Package", "com.google.devtools.build.lib.syntax.FuncallExpression", "com.google.devtools.build.lib.syntax.Label", "java.ut...
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.events.Location; import com.google.devtools.build.lib.packages.Package; import com.google.devtools.build.lib.syntax.FuncallExpression; import com.google.devtools.build.lib.syntax.L...
import com.google.common.base.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.syntax.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,018,699
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Object>> getWithResponseAsync(Context context) { if (this.client.getInstanceUrl() == null) { return Mono.error( new IllegalArgumentException( "Parameter this.client.getInstanceUrl...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Object>> function(Context context) { if (this.client.getInstanceUrl() == null) { return Mono.error( new IllegalArgumentException( STR)); } final String accept = STR; return service.get(this.client.getInstanceUrl(), accept, context); }
/** * Retrieves metadata about the attestation signing keys in use by the attestation service. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws CloudErrorException thrown if the request is rej...
Retrieves metadata about the attestation signing keys in use by the attestation service
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/implementation/MetadataConfigurationsImpl.java", "license": "mit", "size": 3308 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
660,687
public void testGetAndAccumulateNPE() { Runnable[] throwingActions = { () -> new AtomicLong().getAndAccumulate(1L, null), () -> new AtomicInteger().getAndAccumulate(1, null), () -> new AtomicReference().getAndAccumulate(one, null), () -> new AtomicLongArray(1)...
void function() { Runnable[] throwingActions = { () -> new AtomicLong().getAndAccumulate(1L, null), () -> new AtomicInteger().getAndAccumulate(1, null), () -> new AtomicReference().getAndAccumulate(one, null), () -> new AtomicLongArray(1).getAndAccumulate(0, 1L, null), () -> new AtomicIntegerArray(1).getAndAccumulate(0...
/** * All Atomic getAndAccumulate methods throw NullPointerException * on null function argument */
All Atomic getAndAccumulate methods throw NullPointerException on null function argument
testGetAndAccumulateNPE
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/test/java/util/concurrent/tck/Atomic8Test.java", "license": "gpl-2.0", "size": 24432 }
[ "java.util.concurrent.atomic.AtomicInteger", "java.util.concurrent.atomic.AtomicIntegerArray", "java.util.concurrent.atomic.AtomicLong", "java.util.concurrent.atomic.AtomicLongArray", "java.util.concurrent.atomic.AtomicReference", "java.util.concurrent.atomic.AtomicReferenceArray" ]
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicIntegerArray; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLongArray; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
2,721,504
public void upsertDocument(@Nonnull String entityName, @Nonnull String document, @Nonnull String docId) { final String indexName = indexConvention.getIndexName(entityRegistry.getEntitySpec(entityName)); final IndexRequest indexRequest = new IndexRequest(indexName).id(docId).source(document, XContentType.JSON)...
void function(@Nonnull String entityName, @Nonnull String document, @Nonnull String docId) { final String indexName = indexConvention.getIndexName(entityRegistry.getEntitySpec(entityName)); final IndexRequest indexRequest = new IndexRequest(indexName).id(docId).source(document, XContentType.JSON); final UpdateRequest u...
/** * Updates or inserts the given search document. * * @param entityName name of the entity * @param document the document to update / insert * @param docId the ID of the document */
Updates or inserts the given search document
upsertDocument
{ "repo_name": "linkedin/WhereHows", "path": "metadata-io/src/main/java/com/linkedin/metadata/search/elasticsearch/update/ESWriteDAO.java", "license": "apache-2.0", "size": 3155 }
[ "javax.annotation.Nonnull", "org.elasticsearch.action.index.IndexRequest", "org.elasticsearch.action.update.UpdateRequest", "org.elasticsearch.common.xcontent.XContentType" ]
import javax.annotation.Nonnull; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.common.xcontent.XContentType;
import javax.annotation.*; import org.elasticsearch.action.index.*; import org.elasticsearch.action.update.*; import org.elasticsearch.common.xcontent.*;
[ "javax.annotation", "org.elasticsearch.action", "org.elasticsearch.common" ]
javax.annotation; org.elasticsearch.action; org.elasticsearch.common;
317,661
private String getMethod(final HttpServletRequest request) { String method = request.getRequestURI(); if (method.indexOf('?') >= 0) { method = StringUtils.substringBefore(method, "?"); } final int pos = method.lastIndexOf('/'); if (pos >= 0) { m...
String function(final HttpServletRequest request) { String method = request.getRequestURI(); if (method.indexOf('?') >= 0) { method = StringUtils.substringBefore(method, "?"); } final int pos = method.lastIndexOf('/'); if (pos >= 0) { method = method.substring(pos + 1); } return method; }
/** * Return the method to call according to the url. * * @param request the incoming http request * @return the method to call according to the url */
Return the method to call according to the url
getMethod
{ "repo_name": "jasonchw/cas", "path": "cas-server-support-oauth/src/main/java/org/jasig/cas/support/oauth/web/BaseOAuthWrapperController.java", "license": "apache-2.0", "size": 4299 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.commons.lang3.StringUtils" ]
import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils;
import javax.servlet.http.*; import org.apache.commons.lang3.*;
[ "javax.servlet", "org.apache.commons" ]
javax.servlet; org.apache.commons;
2,626,577
@Nullable public static DBType getTypeByName(@Nullable String strName) { if (strName == null) { return null; } return DBType.valueOf(strName.toUpperCase()); }
static DBType function(@Nullable String strName) { if (strName == null) { return null; } return DBType.valueOf(strName.toUpperCase()); }
/** * Looks up a DBType by name. Names are not case-sensitive. * * @param strName the name of the type to lookup, typically corresponds * to the type name, e.g. DBType.ORACLE.toString(); * @return the property DBType, or null if none exists */
Looks up a DBType by name. Names are not case-sensitive
getTypeByName
{ "repo_name": "EvilMcJerkface/atlasdb", "path": "commons-db/src/main/java/com/palantir/nexus/db/DBType.java", "license": "apache-2.0", "size": 2791 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,521,682
Assertions.checkState(!isCreateCalled); this.tag = tag; return this; }
Assertions.checkState(!isCreateCalled); this.tag = tag; return this; }
/** * Sets a tag for the media source which will be published in the {@link * com.google.android.exoplayer2.Timeline} of the source as {@link * com.google.android.exoplayer2.Timeline.Window#tag}. * * @param tag A tag for the media source. * @return This factory, for convenience. * @th...
Sets a tag for the media source which will be published in the <code>com.google.android.exoplayer2.Timeline</code> of the source as <code>com.google.android.exoplayer2.Timeline.Window#tag</code>
setTag
{ "repo_name": "MaTriXy/ExoPlayer", "path": "library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaSource.java", "license": "apache-2.0", "size": 17702 }
[ "com.google.android.exoplayer2.util.Assertions" ]
import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
1,426,083
public static String formatPercent(final double e) { if( Double.isNaN(e) || Double.isInfinite(e) ) return "NaN"; final NumberFormat f = NumberFormat.getPercentInstance(); f.setMinimumFractionDigits(6); return f.format(e); }
static String function(final double e) { if( Double.isNaN(e) Double.isInfinite(e) ) return "NaN"; final NumberFormat f = NumberFormat.getPercentInstance(); f.setMinimumFractionDigits(6); return f.format(e); }
/** * Format a percent. Using 6 decimal places. * * @param e * The percent to format. * @return The formatted percent. */
Format a percent. Using 6 decimal places
formatPercent
{ "repo_name": "krzysztof-magosa/encog-java-core", "path": "src/main/java/org/encog/util/Format.java", "license": "apache-2.0", "size": 5418 }
[ "java.text.NumberFormat" ]
import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
2,240,056
protected int getOrderableVariantType() throws StandardException { // The default is VARIANT return Qualifier.VARIANT; }
int function() throws StandardException { return Qualifier.VARIANT; }
/** * Return the variant type for the underlying expression. * The variant type can be: * VARIANT - variant within a scan * (method calls and non-static field access) * SCAN_INVARIANT - invariant within a scan * (column references from outer tables) * QUERY_INVARIANT - invariant wi...
Return the variant type for the underlying expression. The variant type can be: VARIANT - variant within a scan (method calls and non-static field access) SCAN_INVARIANT - invariant within a scan (column references from outer tables) QUERY_INVARIANT - invariant within the life of a query (constant expressions)
getOrderableVariantType
{ "repo_name": "gemxd/gemfirexd-oss", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/compile/ValueNode.java", "license": "apache-2.0", "size": 52298 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.store.access.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
618,749
static ZookeeperDomainManager withMocks(String domain, CuratorFrameworkFactory.Builder mockClientBuilder, LeaderSelector mockLeaderSelector) { return new ZookeeperDomainManager(domain, mockClientBuilder, mockLeaderSelector); }
static ZookeeperDomainManager withMocks(String domain, CuratorFrameworkFactory.Builder mockClientBuilder, LeaderSelector mockLeaderSelector) { return new ZookeeperDomainManager(domain, mockClientBuilder, mockLeaderSelector); }
/** * Static factory method for use in unit tests using mocks. * * @param domain the domain to manage * @param mockClientBuilder the mock client * @param mockLeaderSelector the mock leader selector */
Static factory method for use in unit tests using mocks
withMocks
{ "repo_name": "jeffgdotorg/opennms", "path": "features/distributed/coordination/zookeeper/src/main/java/org/opennms/features/distributed/coordination/zookeeper/ZookeeperDomainManager.java", "license": "gpl-2.0", "size": 7590 }
[ "org.apache.curator.framework.CuratorFrameworkFactory", "org.apache.curator.framework.recipes.leader.LeaderSelector" ]
import org.apache.curator.framework.CuratorFrameworkFactory; import org.apache.curator.framework.recipes.leader.LeaderSelector;
import org.apache.curator.framework.*; import org.apache.curator.framework.recipes.leader.*;
[ "org.apache.curator" ]
org.apache.curator;
2,428,919
public CqQuery[] getAllCqs(final String regionName)throws CqException{ if (regionName == null){ throw new IllegalArgumentException(LocalizedStrings.CqService_NULL_ARGUMENT_0.toLocalizedString("regionName")); } String[] cqNames = null; CqQuery[] cQuerys = null; synchronized(this.bas...
CqQuery[] function(final String regionName)throws CqException{ if (regionName == null){ throw new IllegalArgumentException(LocalizedStrings.CqService_NULL_ARGUMENT_0.toLocalizedString(STR)); } String[] cqNames = null; CqQuery[] cQuerys = null; synchronized(this.baseRegionToCqNameMap){ ArrayList cqs = (ArrayList)this.ba...
/** * Retruns all the cqs on a given region. * */
Retruns all the cqs on a given region
getAllCqs
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CqService.java", "license": "apache-2.0", "size": 77786 }
[ "com.gemstone.gemfire.cache.query.CqException", "com.gemstone.gemfire.cache.query.CqQuery", "com.gemstone.gemfire.internal.i18n.LocalizedStrings", "java.util.ArrayList" ]
import com.gemstone.gemfire.cache.query.CqException; import com.gemstone.gemfire.cache.query.CqQuery; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import java.util.ArrayList;
import com.gemstone.gemfire.cache.query.*; import com.gemstone.gemfire.internal.i18n.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
419,510
protected Shape parsePolygonShape(WKTReader.State state) throws ParseException { ShapeFactory.PolygonBuilder polygonBuilder = shapeFactory.polygon(); if (!state.nextIfEmptyAndSkipZM()) { polygonBuilder = polygon(state, polygonBuilder); } return polygonBuilder.buildOrRect(); }
Shape function(WKTReader.State state) throws ParseException { ShapeFactory.PolygonBuilder polygonBuilder = shapeFactory.polygon(); if (!state.nextIfEmptyAndSkipZM()) { polygonBuilder = polygon(state, polygonBuilder); } return polygonBuilder.buildOrRect(); }
/** * Parses a POLYGON shape from the raw string. It might return a * {@link org.locationtech.spatial4j.shape.Rectangle} if the polygon is one. * * <pre> * coordinateSequenceList * </pre> */
Parses a POLYGON shape from the raw string. It might return a <code>org.locationtech.spatial4j.shape.Rectangle</code> if the polygon is one. <code> coordinateSequenceList </code>
parsePolygonShape
{ "repo_name": "spatial4j/spatial4j", "path": "src/main/java/org/locationtech/spatial4j/io/WKTReader.java", "license": "apache-2.0", "size": 23403 }
[ "java.text.ParseException", "org.locationtech.spatial4j.shape.Shape", "org.locationtech.spatial4j.shape.ShapeFactory" ]
import java.text.ParseException; import org.locationtech.spatial4j.shape.Shape; import org.locationtech.spatial4j.shape.ShapeFactory;
import java.text.*; import org.locationtech.spatial4j.shape.*;
[ "java.text", "org.locationtech.spatial4j" ]
java.text; org.locationtech.spatial4j;
2,111,299
NegotiableCapability getDecodeCapability();
NegotiableCapability getDecodeCapability();
/** * Returns the capabilities of this <code>TileDecoder</code> as a * <code>NegotiableCapability</code>. * * @see com.lightcrafts.mediax.jai.remote.NegotiableCapability */
Returns the capabilities of this <code>TileDecoder</code> as a <code>NegotiableCapability</code>
getDecodeCapability
{ "repo_name": "MarinnaCole/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/tilecodec/TileDecoderFactory.java", "license": "bsd-3-clause", "size": 3333 }
[ "com.lightcrafts.mediax.jai.remote.NegotiableCapability" ]
import com.lightcrafts.mediax.jai.remote.NegotiableCapability;
import com.lightcrafts.mediax.jai.remote.*;
[ "com.lightcrafts.mediax" ]
com.lightcrafts.mediax;
2,768,017
public NumberFormat getRealFormat() { return realFormat; }
NumberFormat function() { return realFormat; }
/** * Access the realFormat. * @return the realFormat. */
Access the realFormat
getRealFormat
{ "repo_name": "SpoonLabs/astor", "path": "examples/Math-issue-340/src/main/java/org/apache/commons/math/complex/ComplexFormat.java", "license": "gpl-2.0", "size": 13704 }
[ "java.text.NumberFormat" ]
import java.text.NumberFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,664,954
@Test public void testEvaluateSimpleConjunction() { Map<String, Boolean> values = new HashMap<>(); Formula f = and("A", "B"); assertNull(new FormulaEvaluator(values).visit(f)); values.put("A", true); values.put("B", true); assertTrue(new...
void function() { Map<String, Boolean> values = new HashMap<>(); Formula f = and("A", "B"); assertNull(new FormulaEvaluator(values).visit(f)); values.put("A", true); values.put("B", true); assertTrue(new FormulaEvaluator(values).visit(f)); values.put("A", true); values.put("B", false); assertFalse(new FormulaEvaluator(...
/** * Tests whether conjunctions are evaluated correctly. */
Tests whether conjunctions are evaluated correctly
testEvaluateSimpleConjunction
{ "repo_name": "KernelHaven/KernelHaven", "path": "test/net/ssehub/kernel_haven/util/logic/FormulaEvaluatorTest.java", "license": "apache-2.0", "size": 6876 }
[ "java.util.HashMap", "java.util.Map", "net.ssehub.kernel_haven.util.logic.FormulaBuilder", "org.junit.Assert" ]
import java.util.HashMap; import java.util.Map; import net.ssehub.kernel_haven.util.logic.FormulaBuilder; import org.junit.Assert;
import java.util.*; import net.ssehub.kernel_haven.util.logic.*; import org.junit.*;
[ "java.util", "net.ssehub.kernel_haven", "org.junit" ]
java.util; net.ssehub.kernel_haven; org.junit;
2,514,256
@Override public void register() { GameRegistry.registerBlock(this, ItemBlockMulti.class, this.getUnlocalizedName()); for(int i=0;i<subBlocksArray.length;i++) { SubBlock sb = subBlocksArray[i]; if(sb != null) { this.setHarvestLevel( ...
void function() { GameRegistry.registerBlock(this, ItemBlockMulti.class, this.getUnlocalizedName()); for(int i=0;i<subBlocksArray.length;i++) { SubBlock sb = subBlocksArray[i]; if(sb != null) { this.setHarvestLevel( mbHarvestTool == null ? sb.getHarvestTool(0) : mbHarvestTool, Math.max(sb.getHarvestLevel(0), this.getMu...
/** * Registers the block with the GameRegistry and sets the harvestlevels for all subblocks */
Registers the block with the GameRegistry and sets the harvestlevels for all subblocks
register
{ "repo_name": "katzenpapst/amunra", "path": "src/main/java/de/katzenpapst/amunra/block/ore/BlockOreMulti.java", "license": "mit", "size": 3965 }
[ "de.katzenpapst.amunra.block.SubBlock", "de.katzenpapst.amunra.item.ItemBlockMulti", "net.minecraft.item.ItemStack", "net.minecraftforge.oredict.OreDictionary" ]
import de.katzenpapst.amunra.block.SubBlock; import de.katzenpapst.amunra.item.ItemBlockMulti; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary;
import de.katzenpapst.amunra.block.*; import de.katzenpapst.amunra.item.*; import net.minecraft.item.*; import net.minecraftforge.oredict.*;
[ "de.katzenpapst.amunra", "net.minecraft.item", "net.minecraftforge.oredict" ]
de.katzenpapst.amunra; net.minecraft.item; net.minecraftforge.oredict;
2,797,056
public PropertyValue getProperty(QName name);
PropertyValue function(QName name);
/** * Get a property by name. * @param name The name of the property to get. * @return A PropertyValue */
Get a property by name
getProperty
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/repository/source/java/org/alfresco/repo/avm/AVMNode.java", "license": "lgpl-3.0", "size": 7132 }
[ "org.alfresco.repo.domain.PropertyValue", "org.alfresco.service.namespace.QName" ]
import org.alfresco.repo.domain.PropertyValue; import org.alfresco.service.namespace.QName;
import org.alfresco.repo.domain.*; import org.alfresco.service.namespace.*;
[ "org.alfresco.repo", "org.alfresco.service" ]
org.alfresco.repo; org.alfresco.service;
761,971
final Map<String,MetricDatum> uniqueMetrics = new HashMap<String,MetricDatum>(); long startNano = System.nanoTime(); while(true) { final long elapsedNano = System.nanoTime() - startNano; if (elapsedNano >= timeoutNano) { return toPutMetricDataRequests(uni...
final Map<String,MetricDatum> uniqueMetrics = new HashMap<String,MetricDatum>(); long startNano = System.nanoTime(); while(true) { final long elapsedNano = System.nanoTime() - startNano; if (elapsedNano >= timeoutNano) { return toPutMetricDataRequests(uniqueMetrics); } MetricDatum datum = queue.poll(timeoutNano - elaps...
/** * Returns the next batch of {@link PutMetricDataRequest} to be sent to * Amazon CloudWatch, blocking as necessary to gather and accumulate the * necessary statistics. If there is no metrics data, this call blocks * indefinitely. If there is metrics data, this call will block up to about * {...
Returns the next batch of <code>PutMetricDataRequest</code> to be sent to Amazon CloudWatch, blocking as necessary to gather and accumulate the necessary statistics. If there is no metrics data, this call blocks indefinitely. If there is metrics data, this call will block up to about <code>CloudWatchMetricConfig#getQue...
nextUploadUnits
{ "repo_name": "jentfoo/aws-sdk-java", "path": "aws-java-sdk-cloudwatchmetrics/src/main/java/com/amazonaws/metrics/internal/cloudwatch/BlockingRequestBuilder.java", "license": "apache-2.0", "size": 12052 }
[ "com.amazonaws.metrics.AwsSdkMetrics", "com.amazonaws.services.cloudwatch.model.MetricDatum", "java.util.HashMap", "java.util.Map", "java.util.concurrent.TimeUnit" ]
import com.amazonaws.metrics.AwsSdkMetrics; import com.amazonaws.services.cloudwatch.model.MetricDatum; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit;
import com.amazonaws.metrics.*; import com.amazonaws.services.cloudwatch.model.*; import java.util.*; import java.util.concurrent.*;
[ "com.amazonaws.metrics", "com.amazonaws.services", "java.util" ]
com.amazonaws.metrics; com.amazonaws.services; java.util;
2,062,217
public RecordIterator<KeyValueEntry> getKeys(KeySelector selector, StoreTransaction txh) throws StorageException;
RecordIterator<KeyValueEntry> function(KeySelector selector, StoreTransaction txh) throws StorageException;
/** * Returns an iterator over all keys in this store that match the given KeySelector. The keys may be * ordered but not necessarily. * * @param selector The selector to use for key filtering. * @param txh The transaction context for the operation. * @return An iterator over all keys...
Returns an iterator over all keys in this store that match the given KeySelector. The keys may be ordered but not necessarily
getKeys
{ "repo_name": "boorad/titan", "path": "titan-core/src/main/java/com/thinkaurelius/titan/diskstorage/keycolumnvalue/keyvalue/CacheStore.java", "license": "apache-2.0", "size": 1704 }
[ "com.thinkaurelius.titan.diskstorage.StorageException", "com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreTransaction", "com.thinkaurelius.titan.diskstorage.util.RecordIterator" ]
import com.thinkaurelius.titan.diskstorage.StorageException; import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreTransaction; import com.thinkaurelius.titan.diskstorage.util.RecordIterator;
import com.thinkaurelius.titan.diskstorage.*; import com.thinkaurelius.titan.diskstorage.keycolumnvalue.*; import com.thinkaurelius.titan.diskstorage.util.*;
[ "com.thinkaurelius.titan" ]
com.thinkaurelius.titan;
2,319,987
public Locale getLocale() { return locale; }
Locale function() { return locale; }
/** * Returns the locale used when creating formats. * * @return the locale used to create formats. */
Returns the locale used when creating formats
getLocale
{ "repo_name": "openweave/openweave-core", "path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/java/text/MessageFormat.java", "license": "apache-2.0", "size": 50792 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,018,764
private void compileLocals(NodeCounterGenerator nodeCounterGen, MatchGenerator matchGen, InstructionList il) { int field; LocalVariableGen local; ConstantPoolGen cpg = nodeCounterGen.getConstantPool(); // Get NodeCounter._iterator and store locally local = matchGen.addLocalVa...
void function(NodeCounterGenerator nodeCounterGen, MatchGenerator matchGen, InstructionList il) { int field; LocalVariableGen local; ConstantPoolGen cpg = nodeCounterGen.getConstantPool(); local = matchGen.addLocalVariable(STR, Util.getJCRefType(NODE_ITERATOR_SIG), null, null); field = cpg.addFieldref(NODE_COUNTER, STR...
/** * This method compiles code that is common to matchesFrom() and * matchesCount() in the auxillary class. */
This method compiles code that is common to matchesFrom() and matchesCount() in the auxillary class
compileLocals
{ "repo_name": "kcsl/immutability-benchmark", "path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xalan/xsltc/compiler/Number.java", "license": "mit", "size": 18421 }
[ "org.apache.bcel.generic.ConstantPoolGen", "org.apache.bcel.generic.InstructionList", "org.apache.bcel.generic.LocalVariableGen", "org.apache.xalan.xsltc.compiler.util.MatchGenerator", "org.apache.xalan.xsltc.compiler.util.NodeCounterGenerator", "org.apache.xalan.xsltc.compiler.util.Util" ]
import org.apache.bcel.generic.ConstantPoolGen; import org.apache.bcel.generic.InstructionList; import org.apache.bcel.generic.LocalVariableGen; import org.apache.xalan.xsltc.compiler.util.MatchGenerator; import org.apache.xalan.xsltc.compiler.util.NodeCounterGenerator; import org.apache.xalan.xsltc.compiler.util.Util;
import org.apache.bcel.generic.*; import org.apache.xalan.xsltc.compiler.util.*;
[ "org.apache.bcel", "org.apache.xalan" ]
org.apache.bcel; org.apache.xalan;
2,842,222
private void accept() throws IgniteCheckedException { try { while (!closed && selector.isOpen() && !Thread.currentThread().isInterrupted()) { // Wake up every 2 seconds to check if closed. if (selector.select(2000) > 0) ...
void function() throws IgniteCheckedException { try { while (!closed && selector.isOpen() && !Thread.currentThread().isInterrupted()) { if (selector.select(2000) > 0) processSelectedKeys(selector.selectedKeys()); } } catch (ClosedByInterruptException e) { if (log.isDebugEnabled()) log.debug(STR + this + STR + e.getMess...
/** * Accepts connections and schedules them for processing by one of read workers. * * @throws IgniteCheckedException If failed. */
Accepts connections and schedules them for processing by one of read workers
accept
{ "repo_name": "murador/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java", "license": "apache-2.0", "size": 83316 }
[ "java.io.IOException", "java.nio.channels.ClosedByInterruptException", "java.nio.channels.ClosedSelectorException", "org.apache.ignite.IgniteCheckedException" ]
import java.io.IOException; import java.nio.channels.ClosedByInterruptException; import java.nio.channels.ClosedSelectorException; import org.apache.ignite.IgniteCheckedException;
import java.io.*; import java.nio.channels.*; import org.apache.ignite.*;
[ "java.io", "java.nio", "org.apache.ignite" ]
java.io; java.nio; org.apache.ignite;
107,955
private void loadTabuTables(String fileName) throws Exception { File file = newFile(fileName); tabuTableNames = new CsvFile(file); } private Map<String, String> schemaMapping;
void function(String fileName) throws Exception { File file = newFile(fileName); tabuTableNames = new CsvFile(file); } private Map<String, String> schemaMapping;
/** * Loads 'tabu' tables file. */
Loads 'tabu' tables file
loadTabuTables
{ "repo_name": "Recombine/jailer", "path": "src/main/net/sf/jailer/CommandLineParser.java", "license": "apache-2.0", "size": 14700 }
[ "java.io.File", "java.util.Map", "net.sf.jailer.util.CsvFile" ]
import java.io.File; import java.util.Map; import net.sf.jailer.util.CsvFile;
import java.io.*; import java.util.*; import net.sf.jailer.util.*;
[ "java.io", "java.util", "net.sf.jailer" ]
java.io; java.util; net.sf.jailer;
762,161
void setRuleDescExclusionFilter(Pattern exclusionFilter);
void setRuleDescExclusionFilter(Pattern exclusionFilter);
/** * Sets the exclusion filter to use for this planner. Rules which match the * given pattern will not be fired regardless of whether or when they are * added to the planner. * * @param exclusionFilter pattern to match for exclusion; null to disable * filtering */
Sets the exclusion filter to use for this planner. Rules which match the given pattern will not be fired regardless of whether or when they are added to the planner
setRuleDescExclusionFilter
{ "repo_name": "xhoong/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptPlanner.java", "license": "apache-2.0", "size": 11477 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,463,231
void enterCreateFunctionStatement(@NotNull CQLParser.CreateFunctionStatementContext ctx); void exitCreateFunctionStatement(@NotNull CQLParser.CreateFunctionStatementContext ctx);
void enterCreateFunctionStatement(@NotNull CQLParser.CreateFunctionStatementContext ctx); void exitCreateFunctionStatement(@NotNull CQLParser.CreateFunctionStatementContext ctx);
/** * Exit a parse tree produced by {@link CQLParser#createFunctionStatement}. */
Exit a parse tree produced by <code>CQLParser#createFunctionStatement</code>
exitCreateFunctionStatement
{ "repo_name": "HuaweiBigData/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java", "license": "apache-2.0", "size": 58667 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,798,810
public DTDHandler getDTDHandler() { return handler; }
DTDHandler function() { return handler; }
/** * Return the DTD handler. * * @return The DTD handler. * @see XMLReader#getDTDHandler() */
Return the DTD handler
getDTDHandler
{ "repo_name": "alastrina123/debrief", "path": "org.mwc.asset.comms/docs/restlet_src/org.restlet.ext.xml/org/restlet/ext/xml/internal/AbstractXmlReader.java", "license": "epl-1.0", "size": 6132 }
[ "org.xml.sax.DTDHandler" ]
import org.xml.sax.DTDHandler;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,601,812
public Iterator<String> datastreamIdIterator(); /** * Gets an iterable view that consists of versions of the same datastream * that is identified by the requested datastream identifier. * <p> * Datastreams within any iterators produced here are references to the * actual datastreams in...
Iterator<String> function(); /** * Gets an iterable view that consists of versions of the same datastream * that is identified by the requested datastream identifier. * <p> * Datastreams within any iterators produced here are references to the * actual datastreams in this DigitalObject, so modifying their contents is *...
/** * Gets an Iterator over the datastream ids in this object. * <p> * </p> * The Iterator is not tied to the underlying Collection and cannot be used * to remove datastreams. * * @return A new Iterator of datastream ids, possibly of zero size but never * null. */
Gets an Iterator over the datastream ids in this object. The Iterator is not tied to the underlying Collection and cannot be used to remove datastreams
datastreamIdIterator
{ "repo_name": "hbarnard/fcrepo-phaidra", "path": "fcrepo-server/src/main/java/org/fcrepo/server/storage/types/DigitalObject.java", "license": "apache-2.0", "size": 11380 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,883,705
public int hashCode() { int result; result = ((branchQualifier != null) ? Arrays.hashCode(branchQualifier) : 0); result = (31 * result) + formatId; result = (31 * result) + ((globalTransactionID != null) ? Arrays.hashCode(globalTransactionID) : 0); return result; }
int function() { int result; result = ((branchQualifier != null) ? Arrays.hashCode(branchQualifier) : 0); result = (31 * result) + formatId; result = (31 * result) + ((globalTransactionID != null) ? Arrays.hashCode(globalTransactionID) : 0); return result; }
/** * Computes a hashCode of the tx id to allow them to be used efficiently in hashing data structures. * * @return A hash code of the transaction id. */
Computes a hashCode of the tx id to allow them to be used efficiently in hashing data structures
hashCode
{ "repo_name": "rupertlssmith/lojix", "path": "base/common/src/main/com/thesett/common/tx/TxIdImpl.java", "license": "apache-2.0", "size": 5520 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,706,509
public int read(ByteBuffer dst, long position) throws IOException { if (_file.mode() == dCacheFile.Mode.WRITE_ONLY) throw new IOException("Not in read mode."); long oldPosition = _file.tell(); _file.seek(position, false); int result = read(dst); _file.seek(oldPos...
int function(ByteBuffer dst, long position) throws IOException { if (_file.mode() == dCacheFile.Mode.WRITE_ONLY) throw new IOException(STR); long oldPosition = _file.tell(); _file.seek(position, false); int result = read(dst); _file.seek(oldPosition, false); return result; }
/** * Read from a specified position in the file without changing the location * of the file's cursor. * * @param dst The ByteBuffer into which the read bytes will be stored * @param position The position in the file to read from * @return The number of bytes successfully read. -1 of ...
Read from a specified position in the file without changing the location of the file's cursor
read
{ "repo_name": "MonALISA-CIT/fdt", "path": "src/edu/caltech/hep/dcapj/nio/dCacheFileChannel.java", "license": "apache-2.0", "size": 8793 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,179,438
public Timestamp getDateDoc () { if (m_DateDoc != null) return m_DateDoc; int index = p_po.get_ColumnIndex("DateDoc"); if (index != -1) { m_DateDoc = (Timestamp)p_po.get_Value(index); if (m_DateDoc != null) return m_DateDoc; } m_DateDoc = m_doc.getDateDoc(); return m_DateDoc; ...
Timestamp function () { if (m_DateDoc != null) return m_DateDoc; int index = p_po.get_ColumnIndex(STR); if (index != -1) { m_DateDoc = (Timestamp)p_po.get_Value(index); if (m_DateDoc != null) return m_DateDoc; } m_DateDoc = m_doc.getDateDoc(); return m_DateDoc; }
/** * Get Document Date * @return document date */
Get Document Date
getDateDoc
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/acct/DocLine.java", "license": "gpl-2.0", "size": 27398 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,241,394
public static boolean isAccessible(IProject project) { return project != null && project.isAccessible(); }
static boolean function(IProject project) { return project != null && project.isAccessible(); }
/** * Returns <code>true</code> if the given project is not <code>null</code> and is accessible. * * @param project * @return <code>true</code> if accessible; <code>false</code> otherwise. * @see IProject#isAccessible() */
Returns <code>true</code> if the given project is not <code>null</code> and is accessible
isAccessible
{ "repo_name": "shakaran/studio3", "path": "plugins/com.aptana.core/src/com/aptana/core/util/ResourceUtil.java", "license": "gpl-3.0", "size": 17070 }
[ "org.eclipse.core.resources.IProject" ]
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
470,479
protected IBoxResourceHub createResourceHub() { return new BoxResourceHub(); }
IBoxResourceHub function() { return new BoxResourceHub(); }
/** * Create a resource hub * * @return IBoxResourceHub */
Create a resource hub
createResourceHub
{ "repo_name": "shelsonjava/box-java-sdk-v2", "path": "BoxJavaLibraryV2/src/com/box/boxjavalibv2/BoxClient.java", "license": "apache-2.0", "size": 24646 }
[ "com.box.boxjavalibv2.jsonparsing.BoxResourceHub", "com.box.boxjavalibv2.jsonparsing.IBoxResourceHub" ]
import com.box.boxjavalibv2.jsonparsing.BoxResourceHub; import com.box.boxjavalibv2.jsonparsing.IBoxResourceHub;
import com.box.boxjavalibv2.jsonparsing.*;
[ "com.box.boxjavalibv2" ]
com.box.boxjavalibv2;
70,119
public List<CmsRole> getRoles(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(cms, ouFqn); List<CmsGroup> groups = m_securityManager.getGroups(cms.getRequestContext(), ou, includeSubOus, true); ...
List<CmsRole> function(CmsObject cms, String ouFqn, boolean includeSubOus) throws CmsException { CmsOrganizationalUnit ou = OpenCms.getOrgUnitManager().readOrganizationalUnit(cms, ouFqn); List<CmsGroup> groups = m_securityManager.getGroups(cms.getRequestContext(), ou, includeSubOus, true); List<CmsRole> roles = new Arr...
/** * Returns all roles, in the given organizational unit.<p> * * @param cms the opencms context * @param ouFqn the fully qualified name of the organizational unit of the role * @param includeSubOus include roles of child organizational units * * @return a list of all <code>{@link Cm...
Returns all roles, in the given organizational unit
getRoles
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/security/CmsRoleManager.java", "license": "lgpl-2.1", "size": 18883 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.opencms.file.CmsGroup", "org.opencms.file.CmsObject", "org.opencms.main.CmsException", "org.opencms.main.OpenCms" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.opencms.file.CmsGroup; import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
741,536
//-----------------// // getShapedGlyphs // //-----------------// public Collection<Glyph> getShapedGlyphs (Shape shape) { List<Glyph> found = new ArrayList<>(); for (Glyph glyph : getActiveGlyphs()) { if (glyph.getShape() == shape) { found.add(...
Collection<Glyph> function (Shape shape) { List<Glyph> found = new ArrayList<>(); for (Glyph glyph : getActiveGlyphs()) { if (glyph.getShape() == shape) { found.add(glyph); } } return found; }
/** * Report the collection of glyphs whose shape is identical to the provided * shape * * @param shape the imposed shape * @return the (perhaps empty) collection of active glyphs with right shape */
Report the collection of glyphs whose shape is identical to the provided shape
getShapedGlyphs
{ "repo_name": "jlpoolen/libreveris", "path": "src/main/omr/sheet/Sheet.java", "license": "lgpl-3.0", "size": 42737 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,155,686
// the equivalent query is as follows: // update JobInfoElement set status='FAILED', updateTime=$max, // finishTime=$max, // exitCode=$zombie_code, statusMsg='Job has been marked as a zombie' // where updateTime < $min and (status='RUNNING' or status='INIT')" long currentTime = S...
long currentTime = System.currentTimeMillis(); long zombieTime = conf.getLong( STR, 1800000); ClauseBuilder setCriteria = new ClauseBuilder(ClauseBuilder.COMMA); setCriteria.append(STR); setCriteria.append(STR + currentTime); setCriteria.append(STR + currentTime); int exitCode = Types.SubprocessStatus.ZOMBIE_JOB.code()...
/** * Mark jobs as zombies if status hasn't been updated for * netflix.genie.server.janitor.zombie.delta.ms. * * @return Number of jobs marked as zombies * @throws Exception * if there is any error during the process */
Mark jobs as zombies if status hasn't been updated for netflix.genie.server.janitor.zombie.delta.ms
markZombies
{ "repo_name": "korrelate/genie", "path": "genie-server/src/main/java/com/netflix/genie/server/jobmanager/impl/JobJanitor.java", "license": "apache-2.0", "size": 5706 }
[ "com.netflix.genie.common.model.Types", "com.netflix.genie.server.persistence.ClauseBuilder", "com.netflix.genie.server.persistence.QueryBuilder" ]
import com.netflix.genie.common.model.Types; import com.netflix.genie.server.persistence.ClauseBuilder; import com.netflix.genie.server.persistence.QueryBuilder;
import com.netflix.genie.common.model.*; import com.netflix.genie.server.persistence.*;
[ "com.netflix.genie" ]
com.netflix.genie;
432,836
@CheckReturnValue default boolean tryWrite(Supplier<? extends T> o) { return tryWrite(o.get()); }
default boolean tryWrite(Supplier<? extends T> o) { return tryWrite(o.get()); }
/** * Writes the specified object {@link Supplier} to the {@link StreamMessage}. The object provided by the * {@link Supplier} will be transferred to the {@link Subscriber}. * * @return {@code true} if the specified object has been scheduled for publication. {@code false} if the * strea...
Writes the specified object <code>Supplier</code> to the <code>StreamMessage</code>. The object provided by the <code>Supplier</code> will be transferred to the <code>Subscriber</code>
tryWrite
{ "repo_name": "minwoox/armeria", "path": "core/src/main/java/com/linecorp/armeria/common/stream/StreamWriter.java", "license": "apache-2.0", "size": 4958 }
[ "java.util.function.Supplier" ]
import java.util.function.Supplier;
import java.util.function.*;
[ "java.util" ]
java.util;
2,306,571
StudiesByTopic result = null; Topic topic = Topic.findTopic(topicId); if (topic != null) { Set<Study> topicStudies = topic.getStudies(); if (topicStudies != null && topicStudies.size() > 0) { Set<StudyInfo> studyInfoSet = new HashSet<StudyInfo>(); Iterator<Study> topicStudiesIterator = topicStudies....
StudiesByTopic result = null; Topic topic = Topic.findTopic(topicId); if (topic != null) { Set<Study> topicStudies = topic.getStudies(); if (topicStudies != null && topicStudies.size() > 0) { Set<StudyInfo> studyInfoSet = new HashSet<StudyInfo>(); Iterator<Study> topicStudiesIterator = topicStudies.iterator(); while (t...
/** * Return direct studies "having" the given Topic ID. */
Return direct studies "having" the given Topic ID
findDirectStudiesByTopic
{ "repo_name": "cosminrentea/roda", "path": "src/main/java/ro/roda/service/StudiesByTopicServiceImpl.java", "license": "gpl-3.0", "size": 4237 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Set", "org.springframework.context.i18n.LocaleContextHolder", "ro.roda.domain.Lang", "ro.roda.domain.Study", "ro.roda.domain.Topic", "ro.roda.domain.TranslatedTopic", "ro.roda.domain.TranslatedTopicPK", "ro.roda.domainjson.StudiesByTopic", "r...
import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.springframework.context.i18n.LocaleContextHolder; import ro.roda.domain.Lang; import ro.roda.domain.Study; import ro.roda.domain.Topic; import ro.roda.domain.TranslatedTopic; import ro.roda.domain.TranslatedTopicPK; import ro.roda.dom...
import java.util.*; import org.springframework.context.i18n.*; import ro.roda.domain.*; import ro.roda.domainjson.*;
[ "java.util", "org.springframework.context", "ro.roda.domain", "ro.roda.domainjson" ]
java.util; org.springframework.context; ro.roda.domain; ro.roda.domainjson;
2,392,387
protected void fireActionPerformed() { // Guaranteed to return a non-null array Object[] listeners = listenerList.getListenerList(); int modifiers = 0; AWTEvent currentEvent = EventQueue.getCurrentEvent(); if (currentEvent instanceof InputEvent) { modifiers ...
void function() { Object[] listeners = listenerList.getListenerList(); int modifiers = 0; AWTEvent currentEvent = EventQueue.getCurrentEvent(); if (currentEvent instanceof InputEvent) { modifiers = ((InputEvent)currentEvent).getModifiers(); } else if (currentEvent instanceof ActionEvent) { modifiers = ((ActionEvent)cur...
/** * Notifies all listeners that have registered interest for * notification on this event type. The event instance * is lazily created. * The listener list is processed in last to * first order. * @see EventListenerList */
Notifies all listeners that have registered interest for notification on this event type. The event instance is lazily created. The listener list is processed in last to first order
fireActionPerformed
{ "repo_name": "Creativa3d/box3d", "path": "paquetesGUIx/src/utilesGUIx/JTextHTML.java", "license": "gpl-2.0", "size": 10515 }
[ "java.awt.AWTEvent", "java.awt.EventQueue", "java.awt.event.ActionEvent", "java.awt.event.ActionListener", "java.awt.event.InputEvent" ]
import java.awt.AWTEvent; import java.awt.EventQueue; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.InputEvent;
import java.awt.*; import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,122,281
DateTime getMinEventTime();
DateTime getMinEventTime();
/** * return the minimum event time for this feed and processor * * @return the minimum event time for this feed and processor */
return the minimum event time for this feed and processor
getMinEventTime
{ "repo_name": "claudiu-stanciu/kylo", "path": "core/operational-metadata/operational-metadata-api/src/main/java/com/thinkbiganalytics/metadata/api/jobrepo/nifi/NifiFeedProcessorStats.java", "license": "apache-2.0", "size": 8776 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
333,308
@Nonnull public static String getResults() { StringBuilder sb = new StringBuilder(); for (Entry<String, Counter> e : cumulated.entrySet()) { sb.append(e.getValue().getSummary()).append(", (").append(e.getValue().getCount()/1000.0). append(" s)").append(System.lineSeparator()); } ...
static String function() { StringBuilder sb = new StringBuilder(); for (Entry<String, Counter> e : cumulated.entrySet()) { sb.append(e.getValue().getSummary()).append(STR).append(e.getValue().getCount()/1000.0). append(STR).append(System.lineSeparator()); } return sb.toString(); }
/** * get profiling results as string. * * @return */
get profiling results as string
getResults
{ "repo_name": "bencaldwell/learnlib", "path": "core/src/main/java/de/learnlib/statistics/SimpleProfiler.java", "license": "apache-2.0", "size": 2762 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
626,735
public Observable<ServiceResponse<WorkspaceInner>> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String workspaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if...
Observable<ServiceResponse<WorkspaceInner>> function(String resourceGroupName, String workspaceName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (workspaceName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscriptionId() == null) { throw new IllegalArgument...
/** * Gets information about a Workspace. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param workspaceName The name of the workspace. Workspace names can only contain a combination of alphanumeric characters along with dash (-) and underscore (_). The nam...
Gets information about a Workspace
getByResourceGroupWithServiceResponseAsync
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "batchai/resource-manager/v2018_05_01/src/main/java/com/microsoft/azure/management/batchai/v2018_05_01/implementation/WorkspacesInner.java", "license": "mit", "size": 71324 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
775,906
//----------------------------------------------------------------------- public MetaProperty<Currency> currency() { return currency; }
MetaProperty<Currency> function() { return currency; }
/** * The meta-property for the {@code currency} property. * @return the meta-property, not null */
The meta-property for the currency property
currency
{ "repo_name": "nssales/Strata", "path": "modules/finance/src/main/java/com/opengamma/strata/finance/rate/future/IborFuture.java", "license": "apache-2.0", "size": 24020 }
[ "com.opengamma.strata.basics.currency.Currency", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.basics.currency.Currency; import org.joda.beans.MetaProperty;
import com.opengamma.strata.basics.currency.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
1,358,822
Instant getRunInstant();
Instant getRunInstant();
/** * Gets the instant at which the report was run, which may be independent of the valuation date. * * @return the run instant */
Gets the instant at which the report was run, which may be independent of the valuation date
getRunInstant
{ "repo_name": "nssales/Strata", "path": "modules/report-beta/src/main/java/com/opengamma/strata/report/Report.java", "license": "apache-2.0", "size": 2069 }
[ "java.time.Instant" ]
import java.time.Instant;
import java.time.*;
[ "java.time" ]
java.time;
1,158,180
static String buildInstancePath(Type type, Group group, String name) { return buildInstancePath(type.getStr(), group.getStr(), name); }
static String buildInstancePath(Type type, Group group, String name) { return buildInstancePath(type.getStr(), group.getStr(), name); }
/** * Builds an etcd path for the given parameters. * * @param type The type of the instance. * @param group The group of the instance. * @param name The name of the instance. * @return The path for the instance. */
Builds an etcd path for the given parameters
buildInstancePath
{ "repo_name": "INAETICS/Drones-Simulator", "path": "implementation/discovery/api/src/main/java/org/inaetics/dronessimulator/discovery/api/Instance.java", "license": "apache-2.0", "size": 4721 }
[ "org.inaetics.dronessimulator.discovery.api.discoverynode.Group", "org.inaetics.dronessimulator.discovery.api.discoverynode.Type" ]
import org.inaetics.dronessimulator.discovery.api.discoverynode.Group; import org.inaetics.dronessimulator.discovery.api.discoverynode.Type;
import org.inaetics.dronessimulator.discovery.api.discoverynode.*;
[ "org.inaetics.dronessimulator" ]
org.inaetics.dronessimulator;
1,151,266
public Boolean ApproveRequest(int[] reqId,int[] appQty) { Boolean status = false; try { //tx = session.beginTransaction(); tx = session.beginTransaction(); List request; int i=0; for(i=0; i<reqId.length;i++) { //Update the Requested Drug. Set to Approved TrnRequestDrugs req = (Tr...
Boolean function(int[] reqId,int[] appQty) { Boolean status = false; try { tx = session.beginTransaction(); List request; int i=0; for(i=0; i<reqId.length;i++) { TrnRequestDrugs req = (TrnRequestDrugs) session.get(TrnRequestDrugs.class,reqId[i]); req.setProcessed(true); session.update(req); request = session.createQuer...
/** * Approves the pending drug requests * @author Vishwa * @param reqId * @param appQty * @return */
Approves the pending drug requests
ApproveRequest
{ "repo_name": "SLIIT-FacultyOfComputing/Digital-Pulz-for-Hospitals", "path": "HIS_Latest_Project_29-07-2016/Backend/NewWorkspace_2016/HIS_API/src/main/java/lib/driver/pharmacy/driver_class/DrugDBDriver.java", "license": "apache-2.0", "size": 36328 }
[ "java.util.List", "org.hibernate.HibernateException" ]
import java.util.List; import org.hibernate.HibernateException;
import java.util.*; import org.hibernate.*;
[ "java.util", "org.hibernate" ]
java.util; org.hibernate;
1,113,415
default FileEndpointConsumerBuilder sorter(Comparator<Object> sorter) { doSetProperty("sorter", sorter); return this; }
default FileEndpointConsumerBuilder sorter(Comparator<Object> sorter) { doSetProperty(STR, sorter); return this; }
/** * Pluggable sorter as a java.util.Comparator class. * * The option is a: * <code>java.util.Comparator&lt;org.apache.camel.component.file.GenericFile&lt;java.io.File&gt;&gt;</code> type. * * Group: sort */
Pluggable sorter as a java.util.Comparator class. The option is a: <code>java.util.Comparator&lt;org.apache.camel.component.file.GenericFile&lt;java.io.File&gt;&gt;</code> type. Group: sort
sorter
{ "repo_name": "adessaigne/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/FileEndpointBuilderFactory.java", "license": "apache-2.0", "size": 150030 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
1,598,573
public void runWithVerifier(BitmapVerifier bitmapVerifier) { if (mTestCases.size() == 0) { throw new IllegalStateException("Need at least one test to run"); } for (TestCase testCase : mTestCases) { Bitmap testCaseBitmap = captureRenderSpec(tes...
void function(BitmapVerifier bitmapVerifier) { if (mTestCases.size() == 0) { throw new IllegalStateException(STR); } for (TestCase testCase : mTestCases) { Bitmap testCaseBitmap = captureRenderSpec(testCase); assertBitmapIsVerified(testCaseBitmap, bitmapVerifier, testCase.getDebugString()); } } private static final int...
/** * Runs a test where each testcase is independent of the others and each is checked against * the verifier given. */
Runs a test where each testcase is independent of the others and each is checked against the verifier given
runWithVerifier
{ "repo_name": "wiki2014/Learning-Summary", "path": "alps/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ActivityTestBase.java", "license": "gpl-3.0", "size": 14957 }
[ "android.graphics.Bitmap", "android.uirendering.cts.bitmapverifiers.BitmapVerifier" ]
import android.graphics.Bitmap; import android.uirendering.cts.bitmapverifiers.BitmapVerifier;
import android.graphics.*; import android.uirendering.cts.bitmapverifiers.*;
[ "android.graphics", "android.uirendering" ]
android.graphics; android.uirendering;
915,115
private static void parseArgs(String[] args) throws IOException, FileFormatException, HammockException, InterruptedException, ExecutionException, CLIException, Exception { if (args.length < 1) { throw new CLIException("First argument must be a command. Run \"java -jar Hammock.jar --help\" for mo...
static void function(String[] args) throws IOException, FileFormatException, HammockException, InterruptedException, ExecutionException, CLIException, Exception { if (args.length < 1) { throw new CLIException(STRjava -jar Hammock.jar --help\STR); } if (args[0].equals(STR) args[0].equals("-help") args[0].equals("help") ...
/** * Parses command line arguments and runs appropriate routines * * @param args * @throws IOException * @throws FileFormatException * @throws HammockException * @throws InterruptedException * @throws ExecutionException * @throws Exception */
Parses command line arguments and runs appropriate routines
parseArgs
{ "repo_name": "hammock-dev/hammock", "path": "src/cz/krejciadam/hammock/Hammock.java", "license": "gpl-3.0", "size": 79499 }
[ "java.io.IOException", "java.util.List", "java.util.concurrent.ExecutionException" ]
import java.io.IOException; import java.util.List; import java.util.concurrent.ExecutionException;
import java.io.*; import java.util.*; import java.util.concurrent.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,878,190
private static SwtUniversalImage loadFromSimpleVFS( Display display, String location ) { try { InputStream s = KettleVFS.getInputStream( location ); if ( s == null ) { return null; } try { return loadImage( display, s, location ); } finally { IOUtils.closeQuie...
static SwtUniversalImage function( Display display, String location ) { try { InputStream s = KettleVFS.getInputStream( location ); if ( s == null ) { return null; } try { return loadImage( display, s, location ); } finally { IOUtils.closeQuietly( s ); } } catch ( KettleFileException e ) { } return null; }
/** * Internal image loading from Kettle's VFS. */
Internal image loading from Kettle's VFS
loadFromSimpleVFS
{ "repo_name": "emartin-pentaho/pentaho-kettle", "path": "ui/src/main/java/org/pentaho/di/ui/util/SwtSvgImageUtil.java", "license": "apache-2.0", "size": 10911 }
[ "java.io.InputStream", "org.apache.commons.io.IOUtils", "org.eclipse.swt.widgets.Display", "org.pentaho.di.core.SwtUniversalImage", "org.pentaho.di.core.exception.KettleFileException", "org.pentaho.di.core.vfs.KettleVFS" ]
import java.io.InputStream; import org.apache.commons.io.IOUtils; import org.eclipse.swt.widgets.Display; import org.pentaho.di.core.SwtUniversalImage; import org.pentaho.di.core.exception.KettleFileException; import org.pentaho.di.core.vfs.KettleVFS;
import java.io.*; import org.apache.commons.io.*; import org.eclipse.swt.widgets.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.vfs.*;
[ "java.io", "org.apache.commons", "org.eclipse.swt", "org.pentaho.di" ]
java.io; org.apache.commons; org.eclipse.swt; org.pentaho.di;
620,570