method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static byte[] convertToXmlByteArray(RestoreObjectRequest restoreObjectRequest) throws SdkClientException { XmlWriter xml = new XmlWriter(); xml.start("RestoreRequest"); if (restoreObjectRequest.getExpirationInDays() != -1) { xml.start("Days").value(Integer.toString(resto...
static byte[] function(RestoreObjectRequest restoreObjectRequest) throws SdkClientException { XmlWriter xml = new XmlWriter(); xml.start(STR); if (restoreObjectRequest.getExpirationInDays() != -1) { xml.start("Days").value(Integer.toString(restoreObjectRequest.getExpirationInDays())).end(); } final GlacierJobParameters...
/** * Converts the RestoreObjectRequest to an XML fragment that can be sent to * the RestoreObject operation of Amazon S3. * * @param restoreObjectRequest * The container which provides options for restoring an object, * which was transitioned to the Glacier from S3 w...
Converts the RestoreObjectRequest to an XML fragment that can be sent to the RestoreObject operation of Amazon S3
convertToXmlByteArray
{ "repo_name": "jentfoo/aws-sdk-java", "path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/model/transform/RequestXmlFactory.java", "license": "apache-2.0", "size": 12658 }
[ "com.amazonaws.SdkClientException", "com.amazonaws.services.s3.internal.XmlWriter", "com.amazonaws.services.s3.model.GlacierJobParameters", "com.amazonaws.services.s3.model.RestoreObjectRequest" ]
import com.amazonaws.SdkClientException; import com.amazonaws.services.s3.internal.XmlWriter; import com.amazonaws.services.s3.model.GlacierJobParameters; import com.amazonaws.services.s3.model.RestoreObjectRequest;
import com.amazonaws.*; import com.amazonaws.services.s3.internal.*; import com.amazonaws.services.s3.model.*;
[ "com.amazonaws", "com.amazonaws.services" ]
com.amazonaws; com.amazonaws.services;
2,658,254
public static void instanceStarted(BundleContext bundleContext, Collection<String> instances, Long timeout) throws Exception { CompletionService<Boolean> completionService = new ExecutorCompletionService<Boolean>(EXECUTOR); List<Future<Boolean>> waitForstarted = new LinkedList<Future<Boolean>>(); ...
static void function(BundleContext bundleContext, Collection<String> instances, Long timeout) throws Exception { CompletionService<Boolean> completionService = new ExecutorCompletionService<Boolean>(EXECUTOR); List<Future<Boolean>> waitForstarted = new LinkedList<Future<Boolean>>(); StringBuilder sb = new StringBuilder...
/** * Wait for all containers to become registered. */
Wait for all containers to become registered
instanceStarted
{ "repo_name": "jludvice/fabric8", "path": "itests/paxexam/common/src/main/java/io/fabric8/itests/paxexam/support/Provision.java", "license": "apache-2.0", "size": 12432 }
[ "java.util.Collection", "java.util.LinkedList", "java.util.List", "java.util.concurrent.CompletionService", "java.util.concurrent.ExecutorCompletionService", "java.util.concurrent.Future", "java.util.concurrent.TimeUnit", "org.osgi.framework.BundleContext" ]
import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.concurrent.CompletionService; import java.util.concurrent.ExecutorCompletionService; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import org.osgi.framework.BundleContext;
import java.util.*; import java.util.concurrent.*; import org.osgi.framework.*;
[ "java.util", "org.osgi.framework" ]
java.util; org.osgi.framework;
47,805
public Builder addMethodImports(final Collection<Method> methods) { methodImports.addAll(methods); return this; }
Builder function(final Collection<Method> methods) { methodImports.addAll(methods); return this; }
/** * Overload to {@link #addMethodImports(Method...)}. */
Overload to <code>#addMethodImports(Method...)</code>
addMethodImports
{ "repo_name": "jorgebay/tinkerpop", "path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/DefaultImportCustomizer.java", "license": "apache-2.0", "size": 4494 }
[ "java.lang.reflect.Method", "java.util.Collection" ]
import java.lang.reflect.Method; import java.util.Collection;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
354,366
@RequestMapping(value = "/transacts", method = RequestMethod.GET) public String setupForm(Model model) { return "listTransactionsView"; }
@RequestMapping(value = STR, method = RequestMethod.GET) String function(Model model) { return STR; }
/** * Method will be called in initial page load at GET /transacts */
Method will be called in initial page load at GET /transacts
setupForm
{ "repo_name": "victorangelo/exercise", "path": "Dashboard/src/main/java/com/transact/controller/TransactController.java", "license": "gpl-3.0", "size": 5569 }
[ "org.springframework.ui.Model", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod" ]
import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.ui.*; import org.springframework.web.bind.annotation.*;
[ "org.springframework.ui", "org.springframework.web" ]
org.springframework.ui; org.springframework.web;
1,780,755
@Test public void testSLRemoteEnvEntry_String_NotExist() throws Exception { try { // The test case looks for a environment variable named "envStringNotExist". String tempStr = fejb1.getStringEnvVar("envStringNotExist"); fail("Get environment not exist should have fail...
void function() throws Exception { try { String tempStr = fejb1.getStringEnvVar(STR); fail(STR + tempStr); } catch (NamingException ne) { svLogger.info(STR + ne.getClass().getName()); } }
/** * (ive36) Test an env-entry of type String where there is no env-entry. */
(ive36) Test an env-entry of type String where there is no env-entry
testSLRemoteEnvEntry_String_NotExist
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XRemoteSpecWeb.war/src/com/ibm/ejb2x/base/spec/slr/web/SLRemoteImplEnvEntryServlet.java", "license": "epl-1.0", "size": 39112 }
[ "javax.naming.NamingException", "org.junit.Assert" ]
import javax.naming.NamingException; import org.junit.Assert;
import javax.naming.*; import org.junit.*;
[ "javax.naming", "org.junit" ]
javax.naming; org.junit;
823,999
public static ColorStateList getNewTabTilePlusTintList(Context context, boolean isIncognito) { return AppCompatResources.getColorStateList(context, isIncognito ? R.color.new_tab_tile_plus_color_incognito : R.color.new_tab_tile_plus_color); }
static ColorStateList function(Context context, boolean isIncognito) { return AppCompatResources.getColorStateList(context, isIncognito ? R.color.new_tab_tile_plus_color_incognito : R.color.new_tab_tile_plus_color); }
/** * Returns the {@link ColorStateList} to use for the plus sign in new tab tile based on the * incognito mode. * * @param context {@link Context} used to retrieve color. * @param isIncognito Whether the color is used for incognito mode. * @return The {@link ColorStateList} for new tab ti...
Returns the <code>ColorStateList</code> to use for the plus sign in new tab tile based on the incognito mode
getNewTabTilePlusTintList
{ "repo_name": "scheib/chromium", "path": "chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java", "license": "bsd-3-clause", "size": 30707 }
[ "android.content.Context", "android.content.res.ColorStateList", "androidx.appcompat.content.res.AppCompatResources" ]
import android.content.Context; import android.content.res.ColorStateList; import androidx.appcompat.content.res.AppCompatResources;
import android.content.*; import android.content.res.*; import androidx.appcompat.content.res.*;
[ "android.content", "androidx.appcompat" ]
android.content; androidx.appcompat;
1,977,433
public HashMap<UUID, Trade> getTrades() { HashMap<UUID, Trade> tr = new HashMap<>(); for (Trade t: trades){ tr.put(t.getTradeUUID(), t); } return tr; }
HashMap<UUID, Trade> function() { HashMap<UUID, Trade> tr = new HashMap<>(); for (Trade t: trades){ tr.put(t.getTradeUUID(), t); } return tr; }
/** * Get all trades the user is involved in. * * @return the trades, as a hash map */
Get all trades the user is involved in
getTrades
{ "repo_name": "CMPUT301F15T03/301p", "path": "T03/app/src/main/java/ca/ualberta/cmput301/t03/trading/TradeList.java", "license": "gpl-3.0", "size": 6427 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
819,655
private void deleteBuddy(Buddy buddy) { // Remove buddy DeleteBuddyResponseEvent responseEvent = coreService.removeBuddy( new DeleteBuddyRequestEvent(buddy.toBuddyDetails()) ); // Failure if (!responseEvent.isSuccess()) { // Notify the admin abo...
void function(Buddy buddy) { DeleteBuddyResponseEvent responseEvent = coreService.removeBuddy( new DeleteBuddyRequestEvent(buddy.toBuddyDetails()) ); if (!responseEvent.isSuccess()) { if (log.isWarnEnabled()) { log.warn(String.format(STR, responseEvent.getExceptionMessage())); } if (log.isDebugEnabled()) { log.debug(re...
/** * Removes buddy from the system * * @param buddy Buddy */
Removes buddy from the system
deleteBuddy
{ "repo_name": "marcelmika/lims", "path": "docroot/WEB-INF/src/com/marcelmika/lims/portal/hooks/UserListener.java", "license": "mit", "size": 3204 }
[ "com.marcelmika.lims.api.events.buddy.DeleteBuddyRequestEvent", "com.marcelmika.lims.api.events.buddy.DeleteBuddyResponseEvent", "com.marcelmika.lims.portal.domain.Buddy" ]
import com.marcelmika.lims.api.events.buddy.DeleteBuddyRequestEvent; import com.marcelmika.lims.api.events.buddy.DeleteBuddyResponseEvent; import com.marcelmika.lims.portal.domain.Buddy;
import com.marcelmika.lims.api.events.buddy.*; import com.marcelmika.lims.portal.domain.*;
[ "com.marcelmika.lims" ]
com.marcelmika.lims;
1,531,358
return new ComparatorCondition("=", this, new LiteralOperand( new LinkedHashSet<String>(Arrays.asList(values)))); }
return new ComparatorCondition("=", this, new LiteralOperand( new LinkedHashSet<String>(Arrays.asList(values)))); }
/** * Returns a <a href= * "http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.SpecifyingConditions.html#ConditionExpressionReference.Comparators" * >comparator condition</a> (that evaluates to true if the value of the * current attribute is equal to the set of specified val...
Returns a comparator condition (that evaluates to true if the value of the current attribute is equal to the set of specified values) for building condition expression
eq
{ "repo_name": "dagnir/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/xspec/SS.java", "license": "apache-2.0", "size": 12373 }
[ "java.util.Arrays", "java.util.LinkedHashSet" ]
import java.util.Arrays; import java.util.LinkedHashSet;
import java.util.*;
[ "java.util" ]
java.util;
2,682,112
public static void print(Component comp, String uri, String cssuri) { String script = "zk.print('" + comp.getUuid() + "', '" + uri + "'"; if (cssuri != null) { if (uri.contains("zkau") && !cssuri.startsWith("/")) cssuri = "/" + cssuri; //absolute path if using default template.zul within jar file ...
static void function(Component comp, String uri, String cssuri) { String script = STR + comp.getUuid() + STR + uri + "'"; if (cssuri != null) { if (uri.contains("zkau") && !cssuri.startsWith("/")) cssuri = "/" + cssuri; script += STR + cssuri + "');"; } else { script += ");"; } Clients.evalJavaScript(script); }
/** * The specific component to print with custom template ZUL page and print CSS style * @param comp any ZK component * @param uri the path to the template ZUL page * @param cssuri the path to the CSS file */
The specific component to print with custom template ZUL page and print CSS style
print
{ "repo_name": "VincentJian/print", "path": "src/main/java/org/zkoss/addon/print/PrintUtil.java", "license": "gpl-2.0", "size": 1333 }
[ "org.zkoss.zk.ui.Component", "org.zkoss.zk.ui.util.Clients" ]
import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zk.ui.*; import org.zkoss.zk.ui.util.*;
[ "org.zkoss.zk" ]
org.zkoss.zk;
210,704
@Test public void isInstitutionalRessourceManagerFor() { Identity owner1 = JunitTestHelper.createAndPersistIdentityAsUser("instit-" + UUID.randomUUID().toString()); Identity owner2 = JunitTestHelper.createAndPersistIdentityAsUser("instit-" + UUID.randomUUID().toString()); Identity part3 = JunitTestHelper.crea...
void function() { Identity owner1 = JunitTestHelper.createAndPersistIdentityAsUser(STR + UUID.randomUUID().toString()); Identity owner2 = JunitTestHelper.createAndPersistIdentityAsUser(STR + UUID.randomUUID().toString()); Identity part3 = JunitTestHelper.createAndPersistIdentityAsUser(STR + UUID.randomUUID().toString()...
/** * How can be a resource manager if Constants.ORESOURCE_USERMANAGER is never used? */
How can be a resource manager if Constants.ORESOURCE_USERMANAGER is never used
isInstitutionalRessourceManagerFor
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/test/java/org/olat/repository/RepositoryManagerTest.java", "license": "apache-2.0", "size": 44418 }
[ "java.util.UUID", "junit.framework.Assert", "org.olat.basesecurity.Constants", "org.olat.basesecurity.SecurityGroup", "org.olat.core.id.Identity", "org.olat.core.id.UserConstants", "org.olat.test.JunitTestHelper" ]
import java.util.UUID; import junit.framework.Assert; import org.olat.basesecurity.Constants; import org.olat.basesecurity.SecurityGroup; import org.olat.core.id.Identity; import org.olat.core.id.UserConstants; import org.olat.test.JunitTestHelper;
import java.util.*; import junit.framework.*; import org.olat.basesecurity.*; import org.olat.core.id.*; import org.olat.test.*;
[ "java.util", "junit.framework", "org.olat.basesecurity", "org.olat.core", "org.olat.test" ]
java.util; junit.framework; org.olat.basesecurity; org.olat.core; org.olat.test;
564,236
public static boolean equipWithItem(final Player player, final String clazz, final String info) { ItemTestHelper.generateRPClasses(); final Item item = SingletonRepository.getEntityManager().getItem(clazz); item.setInfoString(info); return player.equipToInventoryOnly(item); }
static boolean function(final Player player, final String clazz, final String info) { ItemTestHelper.generateRPClasses(); final Item item = SingletonRepository.getEntityManager().getItem(clazz); item.setInfoString(info); return player.equipToInventoryOnly(item); }
/** * Equip the player with the given item and set the given item string. * * @param player * @param clazz * @param info * @return success flag */
Equip the player with the given item and set the given item string
equipWithItem
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "tests/utilities/PlayerTestHelper.java", "license": "gpl-2.0", "size": 10785 }
[ "games.stendhal.server.core.engine.SingletonRepository", "games.stendhal.server.entity.item.Item", "games.stendhal.server.entity.player.Player" ]
import games.stendhal.server.core.engine.SingletonRepository; import games.stendhal.server.entity.item.Item; import games.stendhal.server.entity.player.Player;
import games.stendhal.server.core.engine.*; import games.stendhal.server.entity.item.*; import games.stendhal.server.entity.player.*;
[ "games.stendhal.server" ]
games.stendhal.server;
1,954,932
@Test public void testFailuretoReadEdits() throws Exception { assertTrue(fs.mkdirs(new Path(TEST_DIR1))); HATestUtil.waitForStandbyToCatchUp(nn0, nn1); // If these two ops are applied twice, the first op will throw an // exception the second time its replayed. fs.setOwner(new Path(TEST_DIR1...
void function() throws Exception { assertTrue(fs.mkdirs(new Path(TEST_DIR1))); HATestUtil.waitForStandbyToCatchUp(nn0, nn1); fs.setOwner(new Path(TEST_DIR1), "foo", "bar"); assertTrue(fs.delete(new Path(TEST_DIR1), true)); assertTrue(fs.mkdirs(new Path(TEST_DIR2))); assertTrue(fs.mkdirs(new Path(TEST_DIR3))); LimitedEd...
/** * Test that the standby NN won't double-replay earlier edits if it encounters * a failure to read a later edit. */
Test that the standby NN won't double-replay earlier edits if it encounters a failure to read a later edit
testFailuretoReadEdits
{ "repo_name": "plusplusjiajia/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestFailureToReadEdits.java", "license": "apache-2.0", "size": 13653 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter", "org.junit.Assert" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter; import org.junit.Assert;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
2,634,866
public ExternalId getRateFutureNodeId(final LocalDate curveDate, final Tenor tenor, final Tenor rateTenor, final int numberFuturesFromTenor) { if (_rateFutureNodeIds == null) { throw new OpenGammaRuntimeException("Cannot get rate future node id provider for curve node id mapper called " + _name); } ...
ExternalId function(final LocalDate curveDate, final Tenor tenor, final Tenor rateTenor, final int numberFuturesFromTenor) { if (_rateFutureNodeIds == null) { throw new OpenGammaRuntimeException(STR + _name); } final CurveInstrumentProvider mapper = _rateFutureNodeIds.get(tenor); if (mapper != null) { return mapper.get...
/** * Gets the external id of the rate future node at a particular tenor that is valid for that curve date. * * @param curveDate * The curve date * @param tenor * The start tenor * @param rateTenor * The tenor of the future * @param numberFuturesFromTenor * ...
Gets the external id of the rate future node at a particular tenor that is valid for that curve date
getRateFutureNodeId
{ "repo_name": "McLeodMoores/starling", "path": "projects/financial/src/main/java/com/opengamma/financial/analytics/curve/CurveNodeIdMapper.java", "license": "apache-2.0", "size": 64900 }
[ "com.opengamma.OpenGammaRuntimeException", "com.opengamma.financial.analytics.ircurve.CurveInstrumentProvider", "com.opengamma.id.ExternalId", "com.opengamma.util.time.Tenor", "org.threeten.bp.LocalDate" ]
import com.opengamma.OpenGammaRuntimeException; import com.opengamma.financial.analytics.ircurve.CurveInstrumentProvider; import com.opengamma.id.ExternalId; import com.opengamma.util.time.Tenor; import org.threeten.bp.LocalDate;
import com.opengamma.*; import com.opengamma.financial.analytics.ircurve.*; import com.opengamma.id.*; import com.opengamma.util.time.*; import org.threeten.bp.*;
[ "com.opengamma", "com.opengamma.financial", "com.opengamma.id", "com.opengamma.util", "org.threeten.bp" ]
com.opengamma; com.opengamma.financial; com.opengamma.id; com.opengamma.util; org.threeten.bp;
1,720,513
public void assertNull(AssertionInfo info, Object actual) { if (actual == null) { return; } throw failures.failure(info, shouldBeEqual(actual, null, comparisonStrategy, info.representation())); }
void function(AssertionInfo info, Object actual) { if (actual == null) { return; } throw failures.failure(info, shouldBeEqual(actual, null, comparisonStrategy, info.representation())); }
/** * Asserts that the given object is {@code null}. * * @param info contains information about the assertion. * @param actual the given object. * @throws AssertionError if the given object is not {@code null}. */
Asserts that the given object is null
assertNull
{ "repo_name": "dorzey/assertj-core", "path": "src/main/java/org/assertj/core/internal/Objects.java", "license": "apache-2.0", "size": 38624 }
[ "org.assertj.core.api.AssertionInfo", "org.assertj.core.error.ShouldBeEqual" ]
import org.assertj.core.api.AssertionInfo; import org.assertj.core.error.ShouldBeEqual;
import org.assertj.core.api.*; import org.assertj.core.error.*;
[ "org.assertj.core" ]
org.assertj.core;
678,201
void deleteIndexStore(String reason, IndexMetaData metaData, ClusterState clusterState) throws IOException { if (nodeEnv.hasNodeFile()) { synchronized (this) { Index index = metaData.getIndex(); if (hasIndex(index)) { String localUUid = indexSe...
void deleteIndexStore(String reason, IndexMetaData metaData, ClusterState clusterState) throws IOException { if (nodeEnv.hasNodeFile()) { synchronized (this) { Index index = metaData.getIndex(); if (hasIndex(index)) { String localUUid = indexService(index).indexUUID(); throw new IllegalStateException(STR + index.getNam...
/** * Deletes the index store trying to acquire all shards locks for this index. * This method will delete the metadata for the index even if the actual shards can't be locked. * * Package private for testing */
Deletes the index store trying to acquire all shards locks for this index. This method will delete the metadata for the index even if the actual shards can't be locked. Package private for testing
deleteIndexStore
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/indices/IndicesService.java", "license": "apache-2.0", "size": 65029 }
[ "java.io.IOException", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.metadata.IndexMetaData", "org.elasticsearch.index.Index", "org.elasticsearch.index.IndexSettings" ]
import java.io.IOException; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexSettings;
import java.io.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.index.*;
[ "java.io", "org.elasticsearch.cluster", "org.elasticsearch.index" ]
java.io; org.elasticsearch.cluster; org.elasticsearch.index;
389,192
public static String getChannel(Context context) { String channel = getMetaChannel(context, "UMENG_CHANNEL"); return channel; }
static String function(Context context) { String channel = getMetaChannel(context, STR); return channel; }
/** * Gets channel. * * @param context the context * @return the channel */
Gets channel
getChannel
{ "repo_name": "Ryanst/AndroidDemo", "path": "app/src/main/java/com/ryanst/app/util/ChannelUtil.java", "license": "apache-2.0", "size": 1710 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
789,974
public void setControlsEnabled(boolean b) { user.setEnabled(b); pass.setEnabled(b); login.setEnabled(b); enableControls(); //login.requestFocus(); configButton.setEnabled(b); encryptedButton.setEnabled(b); if (groupsBox != null) groupsBox.setEnabled(b); if (b) { setCursor(Cursor.getPredefinedCu...
void function(boolean b) { user.setEnabled(b); pass.setEnabled(b); login.setEnabled(b); enableControls(); configButton.setEnabled(b); encryptedButton.setEnabled(b); if (groupsBox != null) groupsBox.setEnabled(b); if (b) { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); setButtonDefault(login); setButtonDe...
/** * Sets whether or not the buttons composing the display are enabled. * * @param b Pass <code>true</code> if this component should be enabled, * <code>false</code> otherwise. */
Sets whether or not the buttons composing the display are enabled
setControlsEnabled
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/login/ScreenLogin.java", "license": "gpl-2.0", "size": 41801 }
[ "java.awt.Cursor" ]
import java.awt.Cursor;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,334,464
@Override public void propertyChange(PropertyChangeEvent event) { final String prop = event.getProperty(); // If the property is of any interest to us if (prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED) || prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED) || prop.equals(Activator.DECORATORS_CHANGED)) { post...
void function(PropertyChangeEvent event) { final String prop = event.getProperty(); if (prop.equals(TeamUI.GLOBAL_IGNORES_CHANGED) prop.equals(TeamUI.GLOBAL_FILE_TYPES_CHANGED) prop.equals(Activator.DECORATORS_CHANGED)) { postLabelEvent(); } else if (prop.equals(UIPreferences.THEME_UncommittedChangeBackgroundColor) pro...
/** * Callback for IPropertyChangeListener events * * If any of the relevant preferences has been changed we refresh all * decorations (all projects and their resources). * * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) */
Callback for IPropertyChangeListener events If any of the relevant preferences has been changed we refresh all decorations (all projects and their resources)
propertyChange
{ "repo_name": "collaborative-modeling/egit", "path": "org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java", "license": "epl-1.0", "size": 27493 }
[ "org.eclipse.egit.ui.Activator", "org.eclipse.egit.ui.UIPreferences", "org.eclipse.jface.util.PropertyChangeEvent", "org.eclipse.team.ui.TeamUI" ]
import org.eclipse.egit.ui.Activator; import org.eclipse.egit.ui.UIPreferences; import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.team.ui.TeamUI;
import org.eclipse.egit.ui.*; import org.eclipse.jface.util.*; import org.eclipse.team.ui.*;
[ "org.eclipse.egit", "org.eclipse.jface", "org.eclipse.team" ]
org.eclipse.egit; org.eclipse.jface; org.eclipse.team;
2,780,275
protected void ensureClusterStateConsistency() throws IOException { if (cluster() != null && cluster().size() > 0) { final NamedWriteableRegistry namedWriteableRegistry = cluster().getNamedWriteableRegistry(); ClusterState masterClusterState = client().admin().cluster().prepareState(...
void function() throws IOException { if (cluster() != null && cluster().size() > 0) { final NamedWriteableRegistry namedWriteableRegistry = cluster().getNamedWriteableRegistry(); ClusterState masterClusterState = client().admin().cluster().prepareState().all().get().getState(); byte[] masterClusterStateBytes = ClusterS...
/** * Verifies that all nodes that have the same version of the cluster state as master have same cluster state */
Verifies that all nodes that have the same version of the cluster state as master have same cluster state
ensureClusterStateConsistency
{ "repo_name": "s1monw/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 107351 }
[ "java.io.IOException", "java.util.Map", "org.elasticsearch.client.Client", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.common.io.stream.NamedWriteableRegistry", "org.elasticsearch.test.XContentTestUtils" ]
import java.io.IOException; import java.util.Map; import org.elasticsearch.client.Client; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.elasticsearch.test.XContentTestUtils;
import java.io.*; import java.util.*; import org.elasticsearch.client.*; import org.elasticsearch.cluster.*; import org.elasticsearch.common.io.stream.*; import org.elasticsearch.test.*;
[ "java.io", "java.util", "org.elasticsearch.client", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.test" ]
java.io; java.util; org.elasticsearch.client; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.test;
363,099
public List<SAXParseException> getWarnings() { return warnings; }
List<SAXParseException> function() { return warnings; }
/** * Returns the validation warnings */
Returns the validation warnings
getWarnings
{ "repo_name": "kingargyle/turmeric-bot", "path": "camel-core/src/main/java/org/apache/camel/processor/validation/SchemaValidationException.java", "license": "apache-2.0", "size": 2961 }
[ "java.util.List", "org.xml.sax.SAXParseException" ]
import java.util.List; import org.xml.sax.SAXParseException;
import java.util.*; import org.xml.sax.*;
[ "java.util", "org.xml.sax" ]
java.util; org.xml.sax;
2,631,913
@Test public void testGetCheckedException() { final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl(); final Exception ex = new Exception(); init.ex = ex; init.start(); try { init.get(); fail("Exception not thrown!"); ...
void function() { final BackgroundInitializerTestImpl init = new BackgroundInitializerTestImpl(); final Exception ex = new Exception(); init.ex = ex; init.start(); try { init.get(); fail(STR); } catch (final ConcurrentException cex) { assertEquals(STR, ex, cex.getCause()); } }
/** * Tests the get() method if background processing causes a checked * exception. */
Tests the get() method if background processing causes a checked exception
testGetCheckedException
{ "repo_name": "ManfredTremmel/gwt-commons-lang3", "path": "src/test/java/org/apache/commons/lang3/concurrent/BackgroundInitializerTest.java", "license": "apache-2.0", "size": 11320 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,174,473
public void setDocument(PlainDocument plainDocument) { JEditorPane = new JEditorPane(); setDocument("text/plain", plainDocument); }
void function(PlainDocument plainDocument) { JEditorPane = new JEditorPane(); setDocument(STR, plainDocument); }
/** * Method to set a PlainDocument as the Document to print. * * @param plainDocument the PlainDocument to use. */
Method to set a PlainDocument as the Document to print
setDocument
{ "repo_name": "vipinraj/Spark", "path": "core/src/main/java/org/jivesoftware/spark/ui/ChatPrinter.java", "license": "apache-2.0", "size": 14200 }
[ "javax.swing.JEditorPane", "javax.swing.text.PlainDocument" ]
import javax.swing.JEditorPane; import javax.swing.text.PlainDocument;
import javax.swing.*; import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,426,718
@Test public void testIsBlankEmpty() { Assert.assertTrue(Strings.isBlank("")); }
void function() { Assert.assertTrue(Strings.isBlank("")); }
/** * Verify isBlank works with an empty string. */
Verify isBlank works with an empty string
testIsBlankEmpty
{ "repo_name": "TroyHisted/relib", "path": "src/test/java/org/relib/util/StringsTest.java", "license": "apache-2.0", "size": 7086 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,488,688
public static void metaScan(Configuration configuration, MetaScannerVisitor visitor, byte [] userTableName, byte[] row, int rowLimit) throws IOException { metaScan(configuration, null, visitor, userTableName, row, rowLimit, HConstants.META_TABLE_NAME); }
static void function(Configuration configuration, MetaScannerVisitor visitor, byte [] userTableName, byte[] row, int rowLimit) throws IOException { metaScan(configuration, null, visitor, userTableName, row, rowLimit, HConstants.META_TABLE_NAME); }
/** * Scans the meta table and calls a visitor on each RowResult. Uses a table * name and a row name to locate meta regions. And it only scans at most * <code>rowLimit</code> of rows. * * @param configuration HBase configuration. * @param visitor Visitor object. * @param userTableName User table na...
Scans the meta table and calls a visitor on each RowResult. Uses a table name and a row name to locate meta regions. And it only scans at most <code>rowLimit</code> of rows
metaScan
{ "repo_name": "wanhao/IRIndex", "path": "src/main/java/org/apache/hadoop/hbase/client/MetaScanner.java", "license": "apache-2.0", "size": 20879 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.HConstants" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,338,255
private static void setExportInfo(Catalog catalog, ExportType exportType) { Database db = catalog.getClusters().get("cluster").getDatabases().get("database"); if (db.getIsactiveactivedred()) { // add default export configuration to DR conflict table exportType = addExportConf...
static void function(Catalog catalog, ExportType exportType) { Database db = catalog.getClusters().get(STR).getDatabases().get(STR); if (db.getIsactiveactivedred()) { exportType = addExportConfigToDRConflictsTable(catalog, exportType); } if (exportType == null) { return; } List<String> streamList = new ArrayList<String...
/** * Set deployment time settings for export * @param catalog The catalog to be updated. * @param exportsType A reference to the <exports> element of the deployment.xml file. */
Set deployment time settings for export
setExportInfo
{ "repo_name": "creative-quant/voltdb", "path": "src/frontend/org/voltdb/utils/CatalogUtil.java", "license": "agpl-3.0", "size": 92628 }
[ "java.util.ArrayList", "java.util.List", "java.util.Properties", "org.voltdb.catalog.Catalog", "org.voltdb.catalog.Connector", "org.voltdb.catalog.ConnectorProperty", "org.voltdb.catalog.Database", "org.voltdb.common.Constants", "org.voltdb.compiler.deploymentfile.ExportConfigurationType", "org.vo...
import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.voltdb.catalog.Catalog; import org.voltdb.catalog.Connector; import org.voltdb.catalog.ConnectorProperty; import org.voltdb.catalog.Database; import org.voltdb.common.Constants; import org.voltdb.compiler.deploymentfile.ExportCon...
import java.util.*; import org.voltdb.catalog.*; import org.voltdb.common.*; import org.voltdb.compiler.deploymentfile.*; import org.voltdb.export.*;
[ "java.util", "org.voltdb.catalog", "org.voltdb.common", "org.voltdb.compiler", "org.voltdb.export" ]
java.util; org.voltdb.catalog; org.voltdb.common; org.voltdb.compiler; org.voltdb.export;
1,199,381
private void fixCtrlH() { InputMap inputMap = getInputMap(); KeyStroke char010 = KeyStroke.getKeyStroke("typed \010"); InputMap parent = inputMap; while (parent != null) { parent.remove(char010); parent = parent.getParent(); } KeyStroke backspa...
void function() { InputMap inputMap = getInputMap(); KeyStroke char010 = KeyStroke.getKeyStroke(STR); InputMap parent = inputMap; while (parent != null) { parent.remove(char010); parent = parent.getParent(); } KeyStroke backspace = KeyStroke.getKeyStroke(STR); inputMap.put(backspace, DefaultEditorKit.deletePrevCharActi...
/** * Removes the "Ctrl+H <=> Backspace" behavior that Java shows, for some odd reason... */
Removes the "Ctrl+H Backspace" behavior that Java shows, for some odd reason..
fixCtrlH
{ "repo_name": "kevinmcgoldrick/Tank", "path": "tools/agent_debugger/src/main/java/org/fife/ui/rtextarea/RTextArea.java", "license": "epl-1.0", "size": 54300 }
[ "javax.swing.InputMap", "javax.swing.KeyStroke", "javax.swing.text.DefaultEditorKit" ]
import javax.swing.InputMap; import javax.swing.KeyStroke; import javax.swing.text.DefaultEditorKit;
import javax.swing.*; import javax.swing.text.*;
[ "javax.swing" ]
javax.swing;
2,121,240
public List<DependencyInfo> parseFile(String filePath, String fileContents) { return parseFileReader(filePath, new StringReader(fileContents)); }
List<DependencyInfo> function(String filePath, String fileContents) { return parseFileReader(filePath, new StringReader(fileContents)); }
/** * Parses the given file and returns a list of dependency information that it * contained. * It uses the passed in fileContents instead of reading the file. * * @param filePath Path to the file to parse. * @param fileContents The contents to parse. * @return A list of DependencyInfo objects. ...
Parses the given file and returns a list of dependency information that it contained. It uses the passed in fileContents instead of reading the file
parseFile
{ "repo_name": "GoogleChromeLabs/chromeos_smart_card_connector", "path": "third_party/closure-compiler/src/src/com/google/javascript/jscomp/deps/DepsFileRegexParser.java", "license": "apache-2.0", "size": 7269 }
[ "java.io.StringReader", "java.util.List" ]
import java.io.StringReader; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,399,260
public static PathFragment getUniqueDirectory(Label label, PathFragment fragment) { return label.getPackageIdentifier().getSourceRoot().getRelative(fragment) .getRelative(label.getName()); }
static PathFragment function(Label label, PathFragment fragment) { return label.getPackageIdentifier().getSourceRoot().getRelative(fragment) .getRelative(label.getName()); }
/** * Returns a path fragment qualified by the rule name and unique fragment to * disambiguate artifacts produced from the source file appearing in * multiple rules. * * <p>For example "//pkg:target" -> "pkg/&lt;fragment&gt;/target. */
Returns a path fragment qualified by the rule name and unique fragment to disambiguate artifacts produced from the source file appearing in multiple rules. For example "//pkg:target" -> "pkg/&lt;fragment&gt;/target
getUniqueDirectory
{ "repo_name": "iamthearm/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/AnalysisUtils.java", "license": "apache-2.0", "size": 5856 }
[ "com.google.devtools.build.lib.cmdline.Label", "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
658,076
public static void main(String[] args) { if (args.length==0 || args.length>2) { System.err.println ("\nUsage - java org.openqa.jetty.http.HttpServer [<addr>:]<port>"); System.err.println ("\nUsage - java org.openqa.jetty.http.Http...
static void function(String[] args) { if (args.length==0 args.length>2) { System.err.println (STR); System.err.println (STR); System.err.println (STR); System.err.println (STR); System.err.println (STR); System.exit(1); } try{ if (args.length==1) { HttpServer server = new HttpServer(); String host=null; HttpContext con...
/** Construct server from command line arguments. * @param args */
Construct server from command line arguments
main
{ "repo_name": "krosenvold/selenium-git-release-candidate", "path": "java/server/src/org/openqa/jetty/http/HttpServer.java", "license": "apache-2.0", "size": 50160 }
[ "java.io.ObjectInputStream", "org.openqa.jetty.http.handler.DumpHandler", "org.openqa.jetty.http.handler.NotFoundHandler", "org.openqa.jetty.http.handler.ResourceHandler", "org.openqa.jetty.util.InetAddrPort", "org.openqa.jetty.util.LogSupport", "org.openqa.jetty.util.Resource" ]
import java.io.ObjectInputStream; import org.openqa.jetty.http.handler.DumpHandler; import org.openqa.jetty.http.handler.NotFoundHandler; import org.openqa.jetty.http.handler.ResourceHandler; import org.openqa.jetty.util.InetAddrPort; import org.openqa.jetty.util.LogSupport; import org.openqa.jetty.util.Resource;
import java.io.*; import org.openqa.jetty.http.handler.*; import org.openqa.jetty.util.*;
[ "java.io", "org.openqa.jetty" ]
java.io; org.openqa.jetty;
479,960
public OneResponse chmod(String octet) { return chmod(client, id, octet); }
OneResponse function(String octet) { return chmod(client, id, octet); }
/** * Changes the permissions * * @param octet Permissions octed , e.g. 640 * @return If an error occurs the error message contains the reason. */
Changes the permissions
chmod
{ "repo_name": "mattthias/one", "path": "src/oca/java/src/org/opennebula/client/image/Image.java", "license": "apache-2.0", "size": 18831 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
1,178,000
@Nonnull public ApiFuture<WriteResult> update(@Nonnull Map<String, Object> fields, Precondition options) { WriteBatch writeBatch = rpcContext.getFirestore().batch(); return extractFirst(writeBatch.update(this, fields, options).commit()); }
ApiFuture<WriteResult> function(@Nonnull Map<String, Object> fields, Precondition options) { WriteBatch writeBatch = rpcContext.getFirestore().batch(); return extractFirst(writeBatch.update(this, fields, options).commit()); }
/** * Updates fields in the document referred to by this DocumentReference. If the document doesn't * exist yet, the update will fail. * * @param fields A map containing the fields and values with which to update the document. * @param options Preconditions to enforce on this update. * @return An ApiF...
Updates fields in the document referred to by this DocumentReference. If the document doesn't exist yet, the update will fail
update
{ "repo_name": "googleapis/java-firestore", "path": "google-cloud-firestore/src/main/java/com/google/cloud/firestore/DocumentReference.java", "license": "apache-2.0", "size": 18076 }
[ "com.google.api.core.ApiFuture", "java.util.Map", "javax.annotation.Nonnull" ]
import com.google.api.core.ApiFuture; import java.util.Map; import javax.annotation.Nonnull;
import com.google.api.core.*; import java.util.*; import javax.annotation.*;
[ "com.google.api", "java.util", "javax.annotation" ]
com.google.api; java.util; javax.annotation;
533,276
public static void close(final URLConnection connection) throws IOException { if (connection == null) { return; } String protocol = connection.getURL().getProtocol(); if ("file".equals(protocol)) // XXX what about JarUrlConnection ?! { // Close FileUrlConnection's input stream because // other...
static void function(final URLConnection connection) throws IOException { if (connection == null) { return; } String protocol = connection.getURL().getProtocol(); if ("file".equals(protocol)) { connection.getInputStream().close(); } if (connection instanceof HttpURLConnection) { ((HttpURLConnection)connection).disconne...
/** * Closes a connection * * @param connection * @throws IOException */
Closes a connection
close
{ "repo_name": "afiantara/apache-wicket-1.5.7", "path": "src/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java", "license": "apache-2.0", "size": 3523 }
[ "java.io.IOException", "java.net.HttpURLConnection", "java.net.URLConnection" ]
import java.io.IOException; import java.net.HttpURLConnection; import java.net.URLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
757,482
public Controller getController(int i) { if (geometricalControllers == null) { geometricalControllers = new ArrayList<Controller>(1); } return geometricalControllers.get(i); }
Controller function(int i) { if (geometricalControllers == null) { geometricalControllers = new ArrayList<Controller>(1); } return geometricalControllers.get(i); }
/** * Returns the controller in this list of controllers at index i. * * @param i * The index to get a controller from. * @return The controller at index i. * @see com.jme.scene.Controller */
Returns the controller in this list of controllers at index i
getController
{ "repo_name": "accelazh/ThreeBodyProblem", "path": "lib/jME2_0_1-Stable/src/com/jme/scene/Spatial.java", "license": "mit", "size": 62639 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
206,039
EReference getMediatorSequence_Description();
EReference getMediatorSequence_Description();
/** * Returns the meta object for the containment reference '{@link org.wso2.developerstudio.eclipse.esb.MediatorSequence#getDescription <em>Description</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Description</em>'. * @see org.wso2.dev...
Returns the meta object for the containment reference '<code>org.wso2.developerstudio.eclipse.esb.MediatorSequence#getDescription Description</code>'.
getMediatorSequence_Description
{ "repo_name": "chanakaudaya/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.esb/src/org/wso2/developerstudio/eclipse/esb/EsbPackage.java", "license": "apache-2.0", "size": 373548 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,235,288
public void testUpdatePurgedTuple4() throws SQLException { getConnection().setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); Statement s = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); Res...
void function() throws SQLException { getConnection().setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED); Statement s = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = s.executeQuery(STR); rs.next(); int firstKey = rs.getInt(1); int valA = rs.getInt(2); int val...
/** * Test what happens if you update a tuple which is deleted, purged and * then reinserted with the exact same values **/
Test what happens if you update a tuple which is deleted, purged and then reinserted with the exact same values
testUpdatePurgedTuple4
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java", "license": "agpl-3.0", "size": 35162 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,851,194
@Test public void testTokenCache() throws IOException { System.out.println("running dist job"); // make sure JT starts jConf = mrCluster.createJobConf(); // provide namenodes names for the job to get the delegation tokens for String nnUri = dfsCluster.getURI().toString(); jCon...
void function() throws IOException { System.out.println(STR); jConf = mrCluster.createJobConf(); String nnUri = dfsCluster.getURI().toString(); jConf.set(MRJobConfig.JOB_NAMENODES, nnUri + "," + nnUri); jConf.set(JTConfig.JT_USER_NAME, "jt_id"); String[] args = { STR, tokenFileName.toString(), "-m", "1", "-r", "1", "-m...
/** * run a distributed job and verify that TokenCache is available * @throws IOException */
run a distributed job and verify that TokenCache is available
testTokenCache
{ "repo_name": "rekhajoshm/mapreduce-fork", "path": "src/test/mapred/org/apache/hadoop/mapreduce/security/TestTokenCache.java", "license": "apache-2.0", "size": 12972 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.MRJobConfig", "org.apache.hadoop.mapreduce.server.jobtracker.JTConfig", "org.apache.hadoop.util.ToolRunner", "org.junit.Assert" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.mapreduce.server.jobtracker.JTConfig; import org.apache.hadoop.util.ToolRunner; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.server.jobtracker.*; import org.apache.hadoop.util.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
1,553,388
public void sendToAll(FMLProxyPacket pkt) { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); }
void function(FMLProxyPacket pkt) { channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALL); channels.get(Side.SERVER).writeAndFlush(pkt).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE); }
/** * Send a packet to all on the server * * @param pkt */
Send a packet to all on the server
sendToAll
{ "repo_name": "Scrik/Cauldron-1", "path": "eclipse/cauldron/src/main/java/cpw/mods/fml/common/network/FMLEventChannel.java", "license": "gpl-3.0", "size": 6713 }
[ "io.netty.channel.ChannelFutureListener" ]
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.*;
[ "io.netty.channel" ]
io.netty.channel;
2,749,595
@Override public TestElement createTestElement() { CriticalSectionController controller = new CriticalSectionController(); modifyTestElement(controller); return controller; }
TestElement function() { CriticalSectionController controller = new CriticalSectionController(); modifyTestElement(controller); return controller; }
/** * Implements JMeterGUIComponent.createTestElement() */
Implements JMeterGUIComponent.createTestElement()
createTestElement
{ "repo_name": "tuanhq/jmeter", "path": "src/components/org/apache/jmeter/control/gui/CriticalSectionControllerGui.java", "license": "apache-2.0", "size": 5950 }
[ "org.apache.jmeter.control.CriticalSectionController", "org.apache.jmeter.testelement.TestElement" ]
import org.apache.jmeter.control.CriticalSectionController; import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.control.*; import org.apache.jmeter.testelement.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
2,691,935
public List<SqlValidatorNamespace> getChildren() { return Lists.transform(children, scopeChild -> scopeChild.namespace); }
List<SqlValidatorNamespace> function() { return Lists.transform(children, scopeChild -> scopeChild.namespace); }
/** * Returns an immutable list of child namespaces. * * @return list of child namespaces */
Returns an immutable list of child namespaces
getChildren
{ "repo_name": "vlsi/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/sql/validate/ListScope.java", "license": "apache-2.0", "size": 7736 }
[ "com.google.common.collect.Lists", "java.util.List" ]
import com.google.common.collect.Lists; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,331,071
public void setExternalIds(Map<String, String> externalIds) { ColumnDescription columndesc = new ColumnDescription( BridgeColumn.EXTERNALIDS .columnName(), ...
void function(Map<String, String> externalIds) { ColumnDescription columndesc = new ColumnDescription( BridgeColumn.EXTERNALIDS .columnName(), STR, VersionNum.VERSION100); super.setDataHandler(columndesc, externalIds); }
/** * Add a Column entity which column name is "external_ids" to the Row entity * of attributes. * @param externalIds the column data which column name is "external_ids" */
Add a Column entity which column name is "external_ids" to the Row entity of attributes
setExternalIds
{ "repo_name": "sonu283304/onos", "path": "protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Bridge.java", "license": "apache-2.0", "size": 26424 }
[ "java.util.Map", "org.onosproject.ovsdb.rfc.tableservice.ColumnDescription" ]
import java.util.Map; import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
import java.util.*; import org.onosproject.ovsdb.rfc.tableservice.*;
[ "java.util", "org.onosproject.ovsdb" ]
java.util; org.onosproject.ovsdb;
1,395,695
@SuppressWarnings("unchecked") public T asyncHandlers(List<AsyncHandler> value) { this.subresources.asyncHandlers.addAll(value); return (T) this; }
@SuppressWarnings(STR) T function(List<AsyncHandler> value) { this.subresources.asyncHandlers.addAll(value); return (T) this; }
/** * Add all AsyncHandler objects to this subresource * @return this * @param value List of AsyncHandler objects. */
Add all AsyncHandler objects to this subresource
asyncHandlers
{ "repo_name": "wildfly-swarm/wildfly-config-api", "path": "generator/src/test/java/org/wildfly/apigen/test/invocation/logging/Logging.java", "license": "apache-2.0", "size": 17694 }
[ "java.util.List", "org.wildfly.apigen.test.invocation.logging.subsystem.asyncHandler.AsyncHandler" ]
import java.util.List; import org.wildfly.apigen.test.invocation.logging.subsystem.asyncHandler.AsyncHandler;
import java.util.*; import org.wildfly.apigen.test.invocation.logging.subsystem.*;
[ "java.util", "org.wildfly.apigen" ]
java.util; org.wildfly.apigen;
1,316,503
public String get(String name) { return (String)parameters.get(name.trim().toLowerCase(Locale.ENGLISH)); }
String function(String name) { return (String)parameters.get(name.trim().toLowerCase(Locale.ENGLISH)); }
/** * Retrieve the value associated with the given name, or null if there * is no current association. * * @param name the parameter name * @return the parameter's value */
Retrieve the value associated with the given name, or null if there is no current association
get
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxws/src/java.activation/share/classes/javax/activation/MimeTypeParameterList.java", "license": "gpl-2.0", "size": 10957 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,310,200
public void exit(CommonCompositorBase node) { exit((AnnotatedBase)node); }
void function(CommonCompositorBase node) { exit((AnnotatedBase)node); }
/** * Exit compositor base element. * * @param node element being exited */
Exit compositor base element
exit
{ "repo_name": "vkorbut/jibx", "path": "jibx/build/src/org/jibx/schema/SchemaVisitor.java", "license": "bsd-3-clause", "size": 28814 }
[ "org.jibx.schema.elements.AnnotatedBase", "org.jibx.schema.elements.CommonCompositorBase" ]
import org.jibx.schema.elements.AnnotatedBase; import org.jibx.schema.elements.CommonCompositorBase;
import org.jibx.schema.elements.*;
[ "org.jibx.schema" ]
org.jibx.schema;
2,826,020
if (contact != null) return contact; assertID(); try { @Cleanup Cursor cursor = addressBook.provider.query(addressBook.syncAdapterURI(ContentUris.withAppendedId(Groups.CONTENT_URI, id)), new String[] { COLUMN_UID, Groups.TITLE, Groups.NOTES }, null, null, null); if (cursor == null || !...
if (contact != null) return contact; assertID(); try { @Cleanup Cursor cursor = addressBook.provider.query(addressBook.syncAdapterURI(ContentUris.withAppendedId(Groups.CONTENT_URI, id)), new String[] { COLUMN_UID, Groups.TITLE, Groups.NOTES }, null, null, null); if (cursor == null !cursor.moveToNext()) throw new FileNo...
/** * Creates a {@link Contact} (representation of a VCard) from the group. * @throws IllegalArgumentException if group is not persistent yet ({@link #id} is null) */
Creates a <code>Contact</code> (representation of a VCard) from the group
getContact
{ "repo_name": "ElysionT/ContactsDAV", "path": "vcard4android/src/main/java/at/bitfire/vcard4android/AndroidGroup.java", "license": "gpl-3.0", "size": 6764 }
[ "android.content.ContentUris", "android.database.Cursor", "android.os.RemoteException", "android.provider.ContactsContract", "java.io.FileNotFoundException", "org.apache.commons.lang3.StringUtils" ]
import android.content.ContentUris; import android.database.Cursor; import android.os.RemoteException; import android.provider.ContactsContract; import java.io.FileNotFoundException; import org.apache.commons.lang3.StringUtils;
import android.content.*; import android.database.*; import android.os.*; import android.provider.*; import java.io.*; import org.apache.commons.lang3.*;
[ "android.content", "android.database", "android.os", "android.provider", "java.io", "org.apache.commons" ]
android.content; android.database; android.os; android.provider; java.io; org.apache.commons;
1,247,158
public static <T> Queue<T> newSpscQueue() { return hasUnsafe() ? new SpscLinkedQueue<T>() : new SpscLinkedAtomicQueue<T>(); }
static <T> Queue<T> function() { return hasUnsafe() ? new SpscLinkedQueue<T>() : new SpscLinkedAtomicQueue<T>(); }
/** * Create a new {@link Queue} which is safe to use for single producer (one thread!) and a single * consumer (one thread!). */
Create a new <code>Queue</code> which is safe to use for single producer (one thread!) and a single consumer (one thread!)
newSpscQueue
{ "repo_name": "fengjiachun/netty", "path": "common/src/main/java/io/netty/util/internal/PlatformDependent.java", "license": "apache-2.0", "size": 56602 }
[ "java.util.Queue", "org.jctools.queues.SpscLinkedQueue", "org.jctools.queues.atomic.SpscLinkedAtomicQueue" ]
import java.util.Queue; import org.jctools.queues.SpscLinkedQueue; import org.jctools.queues.atomic.SpscLinkedAtomicQueue;
import java.util.*; import org.jctools.queues.*; import org.jctools.queues.atomic.*;
[ "java.util", "org.jctools.queues" ]
java.util; org.jctools.queues;
144,242
public boolean containsDomainValue(Date date) { return containsDomainValue(getTime(date)); }
boolean function(Date date) { return containsDomainValue(getTime(date)); }
/** * Returns <code>true</code> if a value is contained in the timeline. * * @param date date to verify * * @return <code>true</code> if value is contained in the timeline */
Returns <code>true</code> if a value is contained in the timeline
containsDomainValue
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/chart/axis/SegmentedTimeline.java", "license": "mit", "size": 64025 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,034,558
public Name getPrefix(int posn) { Enumeration comps = impl.getPrefix(posn); return (new CompoundName(comps, mySyntax)); }
Name function(int posn) { Enumeration comps = impl.getPrefix(posn); return (new CompoundName(comps, mySyntax)); }
/** * Creates a compound name whose components consist of a prefix of the * components in this compound name. * The result and this compound name share the same syntax. * Subsequent changes to * this compound name does not affect the name that is returned and * vice versa. * ...
Creates a compound name whose components consist of a prefix of the components in this compound name. The result and this compound name share the same syntax. Subsequent changes to this compound name does not affect the name that is returned and vice versa
getPrefix
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/classes/javax/naming/CompoundName.java", "license": "mit", "size": 25642 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,471,986
@Column(name = "FARE_SVR_CD", length = 1, nullable = true) public String getFareSaverCode() { return fareSaverCode; }
@Column(name = STR, length = 1, nullable = true) String function() { return fareSaverCode; }
/** * Gets the fareSaverCode attribute. * @return Returns the fareSaverCode. */
Gets the fareSaverCode attribute
getFareSaverCode
{ "repo_name": "bhutchinson/kfs", "path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/businessobject/AgencyStagingData.java", "license": "agpl-3.0", "size": 52782 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
2,056,223
private void attemptWrite(ConstructableConfiguration config) { Pojo pojo = new Pojo(); pojo.setFoo("Foo!"); SessionFactory sessionFactory = config.buildSessionFactory(); Session session = null; try { session = sessionFactory.openSession()...
void function(ConstructableConfiguration config) { Pojo pojo = new Pojo(); pojo.setFoo("Foo!"); SessionFactory sessionFactory = config.buildSessionFactory(); Session session = null; try { session = sessionFactory.openSession(); Integer result = (Integer) session.save(pojo); assertNotNull(result); session.close(); sessi...
/** * Works Hibernate's configuration by attempting a write to the 'database'. With the latest * hiberanates, the configuration isn't really built until the session factory is built, and even * then, some of the data doesn't exist until a write occurs. * @param config */
Works Hibernate's configuration by attempting a write to the 'database'. With the latest hiberanates, the configuration isn't really built until the session factory is built, and even then, some of the data doesn't exist until a write occurs
attemptWrite
{ "repo_name": "picocontainer/NanoContainer-persistence", "path": "persistence-hibernate-annotations/src/test/org/nanocontainer/persistence/hibernate/annotations/ConstructableConfigurationTestCase.java", "license": "bsd-3-clause", "size": 2889 }
[ "org.hibernate.Session", "org.hibernate.SessionFactory" ]
import org.hibernate.Session; import org.hibernate.SessionFactory;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
756,395
@Test public void testT1RV6D3_T1LV15D3() { test_id = getTestId("T1RV6D3", "T1LV15D3", "159"); String src = selectTRVD("T1RV6D3"); String dest = selectTLVD("T1LV15D3"); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrac...
void function() { test_id = getTestId(STR, STR, "159"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(Success, chec...
/** * Perform the test for the given matrix column (T1RV6D3) and row * (T1LV15D3). * */
Perform the test for the given matrix column (T1RV6D3) and row (T1LV15D3)
testT1RV6D3_T1LV15D3
{ "repo_name": "jason-rhodes/bridgepoint", "path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_12_Generics.java", "license": "apache-2.0", "size": 155634 }
[ "org.xtuml.bp.ui.graphics.editor.GraphicalEditor" ]
import org.xtuml.bp.ui.graphics.editor.GraphicalEditor;
import org.xtuml.bp.ui.graphics.editor.*;
[ "org.xtuml.bp" ]
org.xtuml.bp;
1,489,456
@CheckResult public AdGroup withAllAdsSkipped() { if (count == C.LENGTH_UNSET) { return new AdGroup( 0, new int[0], new Uri[0], new long[0]); } int count = this.states.length; @AdState int[] states = Arrays.copyOf(this.states, c...
AdGroup function() { if (count == C.LENGTH_UNSET) { return new AdGroup( 0, new int[0], new Uri[0], new long[0]); } int count = this.states.length; @AdState int[] states = Arrays.copyOf(this.states, count); for (int i = 0; i < count; i++) { if (states[i] == AD_STATE_AVAILABLE states[i] == AD_STATE_UNAVAILABLE) { states[...
/** * Returns an instance with all unavailable and available ads marked as skipped. If the ad count * hasn't been set, it will be set to zero. */
Returns an instance with all unavailable and available ads marked as skipped. If the ad count hasn't been set, it will be set to zero
withAllAdsSkipped
{ "repo_name": "tntcrowd/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/source/ads/AdPlaybackState.java", "license": "apache-2.0", "size": 18060 }
[ "android.net.Uri", "java.util.Arrays" ]
import android.net.Uri; import java.util.Arrays;
import android.net.*; import java.util.*;
[ "android.net", "java.util" ]
android.net; java.util;
253,487
public PortTypeEditorLinkPersistence getPortTypeEditorLinkPersistence() { return portTypeEditorLinkPersistence; }
PortTypeEditorLinkPersistence function() { return portTypeEditorLinkPersistence; }
/** * Returns the port type editor link persistence. * * @return the port type editor link persistence */
Returns the port type editor link persistence
getPortTypeEditorLinkPersistence
{ "repo_name": "queza85/edison", "path": "edison-portal-framework/edison-appstore-2016-portlet/docroot/WEB-INF/src/org/kisti/edison/science/service/base/ScienceAppManagerServiceBaseImpl.java", "license": "gpl-3.0", "size": 52555 }
[ "org.kisti.edison.science.service.persistence.PortTypeEditorLinkPersistence" ]
import org.kisti.edison.science.service.persistence.PortTypeEditorLinkPersistence;
import org.kisti.edison.science.service.persistence.*;
[ "org.kisti.edison" ]
org.kisti.edison;
991,947
@DataProvider(name = "bindData") static Object[][] bindObjects() { Object[][] data = { {"SimpleString", "SimpleString", 0}, {"String", new XX("now is the time"), 1}, {"String[]", new XX(new String[3]), 3}, {"Long[4]", new XX(new Long[4]), 3...
@DataProvider(name = STR) static Object[][] bindObjects() { Object[][] data = { {STR, STR, 0}, {STR, new XX(STR), 1}, {STR, new XX(new String[3]), 3}, {STR, new XX(new Long[4]), 3}, {STR, new XX(new RejectME()), -1}, }; return data; }
/** * Data to test serialFilter call counts. * - name * - Object * - expected count of calls to checkInput. * * @return array of test data */
Data to test serialFilter call counts. - name - Object - expected count of calls to checkInput
bindObjects
{ "repo_name": "JetBrains/jdk8u_jdk", "path": "test/sun/rmi/server/UnicastServerRef/FilterUSRTest.java", "license": "gpl-2.0", "size": 7140 }
[ "org.testng.annotations.DataProvider" ]
import org.testng.annotations.DataProvider;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
22,809
// Conversion //----------------------------------------------------------------------- public Chronology withUTC() { return INSTANCE_UTC; }
Chronology function() { return INSTANCE_UTC; }
/** * Gets the Chronology in the UTC time zone. * * @return the chronology in UTC */
Gets the Chronology in the UTC time zone
withUTC
{ "repo_name": "aleatorio12/ProVentasConnector", "path": "lib/joda-time-2.4-dist/joda-time-2.4/src/main/java/org/joda/time/chrono/IslamicChronology.java", "license": "gpl-3.0", "size": 21916 }
[ "org.joda.time.Chronology" ]
import org.joda.time.Chronology;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,758,429
public void setInventorySlotContents(int slot, ItemStack itemStack, boolean changed) { hasChanged = changed; if (slot >= OFFSET) { extraItems[slot - OFFSET] = itemStack; } else { super.setInventorySlotContents(slot, itemStack); } }
void function(int slot, ItemStack itemStack, boolean changed) { hasChanged = changed; if (slot >= OFFSET) { extraItems[slot - OFFSET] = itemStack; } else { super.setInventorySlotContents(slot, itemStack); } }
/** * Sets the given item stack to the specified slot in the inventory, mark as dirty according to the boolean argument * @param slot whose content will change * @param itemStack to put in the slot * @param changed if the inventory packet should be sent next tick */
Sets the given item stack to the specified slot in the inventory, mark as dirty according to the boolean argument
setInventorySlotContents
{ "repo_name": "nargacu83/ClassesOfWarcraft", "path": "battlegear mod src/minecraft/mods/battlegear2/api/core/InventoryPlayerBattle.java", "license": "gpl-3.0", "size": 17124 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
1,027,294
@ServiceMethod(returns = ReturnType.SINGLE) Mono<RoleAssignmentMetricsResultInner> getMetricsForSubscriptionAsync();
@ServiceMethod(returns = ReturnType.SINGLE) Mono<RoleAssignmentMetricsResultInner> getMetricsForSubscriptionAsync();
/** * Get role assignment usage metrics for a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return role assignment...
Get role assignment usage metrics for a subscription
getMetricsForSubscriptionAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/RoleAssignmentMetricsClient.java", "license": "mit", "size": 2835 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentMetricsResultInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentMetricsResultInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.authorization.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,385,499
@FIXVersion(introduced = "4.3") @TagNumRef(tagNum = TagNum.Account) public void setAccount(String account) { this.account = account; }
@FIXVersion(introduced = "4.3") @TagNumRef(tagNum = TagNum.Account) void function(String account) { this.account = account; }
/** * Message field setter. * @param account field value */
Message field setter
setAccount
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/MassQuoteAckMsg.java", "license": "gpl-3.0", "size": 29333 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.anno.TagNumRef", "net.hades.fix.message.type.TagNum" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum;
import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*;
[ "net.hades.fix" ]
net.hades.fix;
2,446,240
public DateTime getResponseDateHeader(String headerName);
DateTime function(String headerName);
/** * Returns the value of a header containing a header or {@code null} if no * response header of this type exists or it could not be parsed as a valid * date. * * @param headerName name of header * @return header value. */
Returns the value of a header containing a header or null if no response header of this type exists or it could not be parsed as a valid date
getResponseDateHeader
{ "repo_name": "simonrrr/gdata-java-client", "path": "java/src/com/google/gdata/client/Service.java", "license": "apache-2.0", "size": 83027 }
[ "com.google.gdata.data.DateTime" ]
import com.google.gdata.data.DateTime;
import com.google.gdata.data.*;
[ "com.google.gdata" ]
com.google.gdata;
491,264
private void updateMetaData(CarbonDictionaryWriter dictionaryWriter) throws IOException { if (null != dictionaryWriter) { dictionaryWriter.commit(); } }
void function(CarbonDictionaryWriter dictionaryWriter) throws IOException { if (null != dictionaryWriter) { dictionaryWriter.commit(); } }
/** * update dictionary metadata * * @param dictionaryWriter * @throws IOException */
update dictionary metadata
updateMetaData
{ "repo_name": "sgururajshetty/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGenerator.java", "license": "apache-2.0", "size": 10058 }
[ "java.io.IOException", "org.apache.carbondata.core.writer.CarbonDictionaryWriter" ]
import java.io.IOException; import org.apache.carbondata.core.writer.CarbonDictionaryWriter;
import java.io.*; import org.apache.carbondata.core.writer.*;
[ "java.io", "org.apache.carbondata" ]
java.io; org.apache.carbondata;
1,338,005
public String createContact(ContactDetail contactDetail) { SilverTrace.info("yellowpages", "YellowpagesBmEJB.createContact()", "root.MSG_GEN_ENTER_METHOD"); SilverTrace.info("yellowpages", "YellowpagesBmEJB.createContact()", "root.MSG_GEN_PARAM_VALUE", "contactDetail = " + contact...
String function(ContactDetail contactDetail) { SilverTrace.info(STR, STR, STR); SilverTrace.info(STR, STR, STR, STR + contactDetail.toString()); ContactPK contactPK = null; contactDetail.getPK().setSpace(this.space); contactDetail.getPK().setComponentName(this.componentId); contactDetail.setCreationDate(new Date()); co...
/** * Create a new Contact (only the header - parameters) to the current Topic * @param contactDetail a ContactDetail * @return the id of the new contact * @see com.stratelia.webactiv.util.contact.model.ContactDetail * @exception javax.ejb.FinderException * @exception javax.ejb.CreateException ...
Create a new Contact (only the header - parameters) to the current Topic
createContact
{ "repo_name": "stephaneperry/Silverpeas-Components", "path": "yellowpages/yellowpages-ejb/src/main/java/com/stratelia/webactiv/yellowpages/control/ejb/YellowpagesBmEJB.java", "license": "agpl-3.0", "size": 66673 }
[ "com.stratelia.silverpeas.silvertrace.SilverTrace", "com.stratelia.webactiv.util.contact.model.ContactDetail", "com.stratelia.webactiv.util.contact.model.ContactPK", "com.stratelia.webactiv.util.exception.SilverpeasRuntimeException", "com.stratelia.webactiv.yellowpages.model.YellowpagesRuntimeException", ...
import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.util.contact.model.ContactDetail; import com.stratelia.webactiv.util.contact.model.ContactPK; import com.stratelia.webactiv.util.exception.SilverpeasRuntimeException; import com.stratelia.webactiv.yellowpages.model.YellowpagesRuntime...
import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.util.contact.model.*; import com.stratelia.webactiv.util.exception.*; import com.stratelia.webactiv.yellowpages.model.*; import java.util.*;
[ "com.stratelia.silverpeas", "com.stratelia.webactiv", "java.util" ]
com.stratelia.silverpeas; com.stratelia.webactiv; java.util;
53,416
public AiTile getNearestSafeTiles2() { ai.checkInterruption(); int tmpDistance = 100; AiTile result = null; for (AiTile aiTile : ai.getSecuretiles) { ai.checkInterruption(); int myDistance = ai.getCG().nonCyclicTileDistance(ai.getZone().getOwnHero().getTile(), aiTile); if ( tmpDista...
AiTile function() { ai.checkInterruption(); int tmpDistance = 100; AiTile result = null; for (AiTile aiTile : ai.getSecuretiles) { ai.checkInterruption(); int myDistance = ai.getCG().nonCyclicTileDistance(ai.getZone().getOwnHero().getTile(), aiTile); if ( tmpDistance > myDistance ) { tmpDistance = myDistance; result = ...
/** * Calcule la case hors de danger la plus proche de notre agent parmis ses cases voisines. * * @return result la case hors de danger la plus proche */
Calcule la case hors de danger la plus proche de notre agent parmis ses cases voisines
getNearestSafeTiles2
{ "repo_name": "vlabatut/totalboumboum", "path": "resources/ai/org/totalboumboum/ai/v201314/ais/donmezlabatcamy/v4/TileHandler.java", "license": "gpl-2.0", "size": 20297 }
[ "org.totalboumboum.ai.v201314.adapter.data.AiTile" ]
import org.totalboumboum.ai.v201314.adapter.data.AiTile;
import org.totalboumboum.ai.v201314.adapter.data.*;
[ "org.totalboumboum.ai" ]
org.totalboumboum.ai;
41,698
public static MultipleCurrencyCurveSensitivityMarket of(final Currency ccy, final CurveSensitivityMarket sensitivity) { ArgumentChecker.notNull(ccy, "Currency"); ArgumentChecker.notNull(sensitivity, "Sensitivity"); final TreeMap<Currency, CurveSensitivityMarket> map = new TreeMap<Currency, CurveSensitivit...
static MultipleCurrencyCurveSensitivityMarket function(final Currency ccy, final CurveSensitivityMarket sensitivity) { ArgumentChecker.notNull(ccy, STR); ArgumentChecker.notNull(sensitivity, STR); final TreeMap<Currency, CurveSensitivityMarket> map = new TreeMap<Currency, CurveSensitivityMarket>(); map.put(ccy, sensiti...
/** * Create a new multiple currency sensitivity with one currency. * @param ccy The currency. Not null. * @param sensitivity The sensitivity associated to the currency. Not null. * @return The multiple currency sensitivity. */
Create a new multiple currency sensitivity with one currency
of
{ "repo_name": "charles-cooper/idylfin", "path": "src/com/opengamma/analytics/financial/interestrate/market/description/MultipleCurrencyCurveSensitivityMarket.java", "license": "apache-2.0", "size": 7869 }
[ "com.opengamma.util.ArgumentChecker", "com.opengamma.util.money.Currency", "java.util.TreeMap" ]
import com.opengamma.util.ArgumentChecker; import com.opengamma.util.money.Currency; import java.util.TreeMap;
import com.opengamma.util.*; import com.opengamma.util.money.*; import java.util.*;
[ "com.opengamma.util", "java.util" ]
com.opengamma.util; java.util;
307,505
public static void printAvailableCommands(Map<String, Command> commands, PrintStream printer) { if (commands.isEmpty()) { return; } printer.println("Commands:"); printer.println(); int longestCommandName = commands ...
static void function(Map<String, Command> commands, PrintStream printer) { if (commands.isEmpty()) { return; } printer.println(STR); printer.println(); int longestCommandName = commands .keySet() .stream() .mapToInt(name -> name.length()) .max() .orElse(0); for (Map.Entry<String, Command> commandEntry : commands.entryS...
/** * Print the available commands in <tt>commander</tt>. * * @param commands commands * @param printer printer */
Print the available commands in commander
printAvailableCommands
{ "repo_name": "ivankelly/bookkeeper", "path": "tools/framework/src/main/java/org/apache/bookkeeper/tools/framework/CommandUtils.java", "license": "apache-2.0", "size": 7114 }
[ "java.io.PrintStream", "java.util.Map" ]
import java.io.PrintStream; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
52,097
private void rowToCSV(Row row) { Cell cell = null; int lastCellNum = 0; ArrayList<String> csvLine = new ArrayList<String>(); // Check to ensure that a row was recovered from the sheet as it is // possible that one or more rows between other populated rows could be //...
void function(Row row) { Cell cell = null; int lastCellNum = 0; ArrayList<String> csvLine = new ArrayList<String>(); if(row != null) { lastCellNum = row.getLastCellNum(); for(int i = 0; i <= lastCellNum; i++) { cell = row.getCell(i); if(cell == null) { csvLine.add(""); } else { if(cell.getCellType() != Cell.CELL_TYPE_F...
/** * Called to convert a row of cells into a line of data that can later be * output to the CSV file. * * @param row An instance of either the HSSFRow or XSSFRow classes that * encapsulates information about a row of cells recovered from * an Excel workbook. */
Called to convert a row of cells into a line of data that can later be output to the CSV file
rowToCSV
{ "repo_name": "luanx/stat", "path": "stat-util/src/main/java/com/wantdo/stat/excel/poi_src/ToCSV.java", "license": "apache-2.0", "size": 38493 }
[ "java.util.ArrayList", "org.apache.poi.ss.usermodel.Cell", "org.apache.poi.ss.usermodel.Row" ]
import java.util.ArrayList; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row;
import java.util.*; import org.apache.poi.ss.usermodel.*;
[ "java.util", "org.apache.poi" ]
java.util; org.apache.poi;
2,678,179
public static Type getReturnType(final Method method) { return getType(method.getReturnType()); }
static Type function(final Method method) { return getType(method.getReturnType()); }
/** * Returns the Java type corresponding to the return type of the given * method. * * @param method * a method. * @return the Java type corresponding to the return type of the given * method. */
Returns the Java type corresponding to the return type of the given method
getReturnType
{ "repo_name": "AlterRS/Deobfuscator", "path": "deps/alterrs/asm/Type.java", "license": "mit", "size": 22022 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,189,193
@Test public void includeInitialWindowSizeInFirstSettings_largeWindowSize() throws Exception { int initialWindowSize = 75535; // 65535 + 10000 startTransport( DEFAULT_START_STREAM_ID, null, true, DEFAULT_MAX_MESSAGE_SIZE, initialWindowSize, null); clientTransport.sendConnectionPrefaceAndSett...
void function() throws Exception { int initialWindowSize = 75535; startTransport( DEFAULT_START_STREAM_ID, null, true, DEFAULT_MAX_MESSAGE_SIZE, initialWindowSize, null); clientTransport.sendConnectionPrefaceAndSettings(); ArgumentCaptor<Settings> settings = ArgumentCaptor.forClass(Settings.class); verify(frameWriter, ...
/** * A "large" window size is anything over 65535 (the starting size for any connection-level * flow control value). */
A "large" window size is anything over 65535 (the starting size for any connection-level flow control value)
includeInitialWindowSizeInFirstSettings_largeWindowSize
{ "repo_name": "grpc/grpc-java", "path": "okhttp/src/test/java/io/grpc/okhttp/OkHttpClientTransportTest.java", "license": "apache-2.0", "size": 96916 }
[ "io.grpc.okhttp.internal.framed.Settings", "org.junit.Assert", "org.mockito.ArgumentCaptor", "org.mockito.Mockito" ]
import io.grpc.okhttp.internal.framed.Settings; import org.junit.Assert; import org.mockito.ArgumentCaptor; import org.mockito.Mockito;
import io.grpc.okhttp.internal.framed.*; import org.junit.*; import org.mockito.*;
[ "io.grpc.okhttp", "org.junit", "org.mockito" ]
io.grpc.okhttp; org.junit; org.mockito;
1,009,560
private String getManagerEmail(User manager, IWContext iwc) { try { Email email = getUserBusiness(iwc).getUserMail(manager); if (email != null) { String sEmail = email.getEmailAddress(); if (sEmail != null && !sEmail.equals("")) { return sEmail; } } return "-"; } catch (Exception e) ...
String function(User manager, IWContext iwc) { try { Email email = getUserBusiness(iwc).getUserMail(manager); if (email != null) { String sEmail = email.getEmailAddress(); if (sEmail != null && !sEmail.equals(STR-STR-"; } }
/** * Method getManagerEmail. * * @param manager * @return String */
Method getManagerEmail
getManagerEmail
{ "repo_name": "idega/platform2", "path": "src/se/idega/idegaweb/commune/presentation/ManagerView.java", "license": "gpl-3.0", "size": 8933 }
[ "com.idega.core.contact.data.Email", "com.idega.presentation.IWContext", "com.idega.user.data.User" ]
import com.idega.core.contact.data.Email; import com.idega.presentation.IWContext; import com.idega.user.data.User;
import com.idega.core.contact.data.*; import com.idega.presentation.*; import com.idega.user.data.*;
[ "com.idega.core", "com.idega.presentation", "com.idega.user" ]
com.idega.core; com.idega.presentation; com.idega.user;
1,274,677
VirtualFile getPresentableFile(CompileContext context, Module module, VirtualFile outputRoot, VirtualFile generatedFile);
VirtualFile getPresentableFile(CompileContext context, Module module, VirtualFile outputRoot, VirtualFile generatedFile);
/** * Used by make subsystem to obtain the file that should be opened in the editor instead of generated file if there were errors found * while compiling the generated file * * * @param context current compile context * @param module the module to which the generated file was attributed * @param...
Used by make subsystem to obtain the file that should be opened in the editor instead of generated file if there were errors found while compiling the generated file
getPresentableFile
{ "repo_name": "leafclick/intellij-community", "path": "java/compiler/openapi/src/com/intellij/openapi/compiler/SourceGeneratingCompiler.java", "license": "apache-2.0", "size": 1963 }
[ "com.intellij.openapi.module.Module", "com.intellij.openapi.vfs.VirtualFile" ]
import com.intellij.openapi.module.Module; import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.module.*; import com.intellij.openapi.vfs.*;
[ "com.intellij.openapi" ]
com.intellij.openapi;
2,331,357
synchronized List<TaskStatus> getNonRunningTasks() { List<TaskStatus> result = new ArrayList<TaskStatus>(tasks.size()); for(Map.Entry<TaskAttemptID, TaskInProgress> task: tasks.entrySet()) { if (!runningTasks.containsKey(task.getKey())) { result.add(task.getValue().getStatus()); } } ...
synchronized List<TaskStatus> getNonRunningTasks() { List<TaskStatus> result = new ArrayList<TaskStatus>(tasks.size()); for(Map.Entry<TaskAttemptID, TaskInProgress> task: tasks.entrySet()) { if (!runningTasks.containsKey(task.getKey())) { result.add(task.getValue().getStatus()); } } return result; }
/** * Get the list of stored tasks on this task tracker. * @return */
Get the list of stored tasks on this task tracker
getNonRunningTasks
{ "repo_name": "apache/hadoop-mapreduce", "path": "src/java/org/apache/hadoop/mapred/TaskTracker.java", "license": "apache-2.0", "size": 120136 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,402,387
if (couplingType == ResourceRefInfo.BRANCH_COUPLING_TIGHT) return 0x8000; // value of SQLServerXAResource.SSTRANSTIGHTLYCPLD (32768) // Loose branch coupling is default for Microsoft SQL Server return XAResource.TMNOFLAGS; }
if (couplingType == ResourceRefInfo.BRANCH_COUPLING_TIGHT) return 0x8000; return XAResource.TMNOFLAGS; }
/** * Returns the XA start flag for loose or tight branch coupling * * @param couplingType branch coupling type * @return XA start flag value for the specified coupling type */
Returns the XA start flag for loose or tight branch coupling
branchCouplingSupported
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/MicrosoftSQLServerHelper.java", "license": "epl-1.0", "size": 12692 }
[ "com.ibm.ws.resource.ResourceRefInfo", "javax.transaction.xa.XAResource" ]
import com.ibm.ws.resource.ResourceRefInfo; import javax.transaction.xa.XAResource;
import com.ibm.ws.resource.*; import javax.transaction.xa.*;
[ "com.ibm.ws", "javax.transaction" ]
com.ibm.ws; javax.transaction;
539,308
public void testToArray() { SortedLongSet set = perpare(testArray); long[] sortedArray = new long[testArray.length]; System.arraycopy(testArray, 0, sortedArray, 0, testArray.length); Arrays.sort(sortedArray); assertTrue(Arrays.equals(sortedArray, set.toArray())); SortedLongSet set0 = new SortedLo...
void function() { SortedLongSet set = perpare(testArray); long[] sortedArray = new long[testArray.length]; System.arraycopy(testArray, 0, sortedArray, 0, testArray.length); Arrays.sort(sortedArray); assertTrue(Arrays.equals(sortedArray, set.toArray())); SortedLongSet set0 = new SortedLongSet(); assertTrue(Arrays.equals...
/** * Test method for {@link freenet.support.SortedLongSet#toArray()}. */
Test method for <code>freenet.support.SortedLongSet#toArray()</code>
testToArray
{ "repo_name": "saces/fred", "path": "test/freenet/support/SortedLongSetTest.java", "license": "gpl-2.0", "size": 4241 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,479,731
public void addPropertyChangeListener( PropertyChangeListener listener) { listeners.addPropertyChangeListener( listener); }
void function( PropertyChangeListener listener) { listeners.addPropertyChangeListener( listener); }
/** * Adds a listener which will be notified of changes to the document title. */
Adds a listener which will be notified of changes to the document title
addPropertyChangeListener
{ "repo_name": "tensberg/jgloss-mirror", "path": "jgloss/src/main/java/jgloss/ui/html/JGlossHTMLDoc.java", "license": "gpl-2.0", "size": 27647 }
[ "java.beans.PropertyChangeListener" ]
import java.beans.PropertyChangeListener;
import java.beans.*;
[ "java.beans" ]
java.beans;
1,383,653
public static IoFuture<StreamConnection> performUpgrade(final XnioWorker worker, InetSocketAddress bindAddress, URI uri, final Map<String, List<String>> headers, ChannelListener<? super StreamConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap, ExtendedHandshakeChecker ...
static IoFuture<StreamConnection> function(final XnioWorker worker, InetSocketAddress bindAddress, URI uri, final Map<String, List<String>> headers, ChannelListener<? super StreamConnection> openListener, ChannelListener<? super BoundChannel> bindListener, OptionMap optionMap, ExtendedHandshakeChecker handshakeChecker)...
/** * Connects to the target server using HTTP upgrade. * * @param worker The worker * @param bindAddress The bind address * @param uri The URI to connect to * @param headers Any additional headers to include in the upgrade request. This must include an...
Connects to the target server using HTTP upgrade
performUpgrade
{ "repo_name": "xnio/xnio", "path": "api/src/main/java/org/xnio/http/HttpUpgrade.java", "license": "apache-2.0", "size": 25849 }
[ "java.net.InetSocketAddress", "java.util.List", "java.util.Map", "org.xnio.ChannelListener", "org.xnio.IoFuture", "org.xnio.OptionMap", "org.xnio.StreamConnection", "org.xnio.XnioWorker", "org.xnio.channels.BoundChannel" ]
import java.net.InetSocketAddress; import java.util.List; import java.util.Map; import org.xnio.ChannelListener; import org.xnio.IoFuture; import org.xnio.OptionMap; import org.xnio.StreamConnection; import org.xnio.XnioWorker; import org.xnio.channels.BoundChannel;
import java.net.*; import java.util.*; import org.xnio.*; import org.xnio.channels.*;
[ "java.net", "java.util", "org.xnio", "org.xnio.channels" ]
java.net; java.util; org.xnio; org.xnio.channels;
1,346,959
public static Object call1(Callable fun, Scriptable thisObj, Object arg0, Context cx, Scriptable scope) { return fun.call(cx, scope, thisObj, new Object[] { arg0 } ); }
static Object function(Callable fun, Scriptable thisObj, Object arg0, Context cx, Scriptable scope) { return fun.call(cx, scope, thisObj, new Object[] { arg0 } ); }
/** * Implement ....(arg) call shrinking optimizer code. * * @param fun a {@link org.mozilla.javascript.Callable} object. * @param thisObj a {@link org.mozilla.javascript.Scriptable} object. * @param arg0 a {@link java.lang.Object} object. * @param cx a {@link org.mozilla.javascript.Contex...
Implement ....(arg) call shrinking optimizer code
call1
{ "repo_name": "oswetto/LoboEvolution", "path": "LoboParser/src/main/java/org/mozilla/javascript/optimizer/OptRuntime.java", "license": "gpl-3.0", "size": 18041 }
[ "org.mozilla.javascript.Callable", "org.mozilla.javascript.Context", "org.mozilla.javascript.Scriptable" ]
import org.mozilla.javascript.Callable; import org.mozilla.javascript.Context; import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.*;
[ "org.mozilla.javascript" ]
org.mozilla.javascript;
1,284,369
public GenericSearchBuilder<T, K> op(String name, Object field, Op op) { return left(field, op, name); }
GenericSearchBuilder<T, K> function(String name, Object field, Op op) { return left(field, op, name); }
/** * Adds an condition that starts with open parenthesis. Use cp() to close * the parenthesis. * * @param name parameter name used to set the parameter value later. * @param field field of the entity object * @param op operator * @return this */
Adds an condition that starts with open parenthesis. Use cp() to close the parenthesis
op
{ "repo_name": "GabrielBrascher/cloudstack", "path": "framework/db/src/main/java/com/cloud/utils/db/GenericSearchBuilder.java", "license": "apache-2.0", "size": 9358 }
[ "com.cloud.utils.db.SearchCriteria" ]
import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.db.*;
[ "com.cloud.utils" ]
com.cloud.utils;
497,635
public String getItemMetaDataByLabel(String label) { if (this.itemMetaDataSet != null) { for (Iterator i = this.itemMetaDataSet.iterator(); i.hasNext(); ) { ItemMetaDataIfc itemMetaData = (ItemMetaDataIfc) i.next(); if (itemMetaData.getLabel().equals(label)) { return itemMetaData.getEntry(); ...
String function(String label) { if (this.itemMetaDataSet != null) { for (Iterator i = this.itemMetaDataSet.iterator(); i.hasNext(); ) { ItemMetaDataIfc itemMetaData = (ItemMetaDataIfc) i.next(); if (itemMetaData.getLabel().equals(label)) { return itemMetaData.getEntry(); } } } return null; }
/** * Get meta data by label * @param label * @return */
Get meta data by label
getItemMetaDataByLabel
{ "repo_name": "eemirtekin/Sakai-10.6-TR", "path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/ItemFacade.java", "license": "apache-2.0", "size": 32871 }
[ "java.util.Iterator", "org.sakaiproject.tool.assessment.data.ifc.assessment.ItemMetaDataIfc" ]
import java.util.Iterator; import org.sakaiproject.tool.assessment.data.ifc.assessment.ItemMetaDataIfc;
import java.util.*; import org.sakaiproject.tool.assessment.data.ifc.assessment.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
827,520
public synchronized String modifyScenario(final LGWorkloadConfig lrConfig) throws IOException { this.lrConfig = lrConfig; String newScenarioPath = null; if (lrConfig.getScenarioPath().endsWith(".lrs")) { newScenarioPath = lrConfig.getScenarioPath().replace(SCENARIO_FILE_SUFFIX, "_new" + SCENARIO_FILE_SUFFI...
synchronized String function(final LGWorkloadConfig lrConfig) throws IOException { this.lrConfig = lrConfig; String newScenarioPath = null; if (lrConfig.getScenarioPath().endsWith(".lrs")) { newScenarioPath = lrConfig.getScenarioPath().replace(SCENARIO_FILE_SUFFIX, "_new" + SCENARIO_FILE_SUFFIX); } else { throw new Ill...
/** * Modifies the scenario file according to the passed workload * configuration. * * @param lrConfig * describes the modification on the scenario * @return the path to the new scenario file * @throws IOException * if scenario modification fails */
Modifies the scenario file according to the passed workload configuration
modifyScenario
{ "repo_name": "sopeco/LPE-Common", "path": "org.lpe.common.loadgenerator/src/org/lpe/common/loadgenerator/scenario/ScenarioModifier.java", "license": "apache-2.0", "size": 18030 }
[ "java.io.BufferedReader", "java.io.BufferedWriter", "java.io.FileInputStream", "java.io.FileWriter", "java.io.IOException", "java.io.InputStreamReader", "java.util.LinkedList", "org.lpe.common.loadgenerator.config.LGWorkloadConfig" ]
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import org.lpe.common.loadgenerator.config.LGWorkloadConfig;
import java.io.*; import java.util.*; import org.lpe.common.loadgenerator.config.*;
[ "java.io", "java.util", "org.lpe.common" ]
java.io; java.util; org.lpe.common;
1,400,316
@Override public ThreadContext.ContextStack getContextStack() { return event.getContextStack(); }
ThreadContext.ContextStack function() { return event.getContextStack(); }
/** * Returns a copy of the context stack. * @return a copy of the context stack. */
Returns a copy of the context stack
getContextStack
{ "repo_name": "xnslong/logging-log4j2", "path": "log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEvent.java", "license": "apache-2.0", "size": 11916 }
[ "org.apache.logging.log4j.ThreadContext" ]
import org.apache.logging.log4j.ThreadContext;
import org.apache.logging.log4j.*;
[ "org.apache.logging" ]
org.apache.logging;
913,056
public IJavaElement getJavaElement() { return this.typeRoot; }
IJavaElement function() { return this.typeRoot; }
/** * The Java element (an <code>org.eclipse.jdt.core.ICompilationUnit</code> or an <code>org.eclipse.jdt.core.IClassFile</code>) * this compilation unit was created from, or <code>null</code> if it was not created from a Java element. * * @return the Java element this compilation unit was created from, or <cod...
The Java element (an <code>org.eclipse.jdt.core.ICompilationUnit</code> or an <code>org.eclipse.jdt.core.IClassFile</code>) this compilation unit was created from, or <code>null</code> if it was not created from a Java element
getJavaElement
{ "repo_name": "Niky4000/UsefulUtils", "path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java", "license": "gpl-3.0", "size": 41878 }
[ "org.eclipse.jdt.core.IJavaElement" ]
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
1,649,650
public static void main(String[] args) throws IOException { ExampleHelpers.configureLogging(); LifeExpectancyProcessor.printDocumentation(); LifeExpectancyProcessor processor = new LifeExpectancyProcessor(); ExampleHelpers.processEntitiesFromWikidataDump(processor); processor.writeFinalResults(); }
static void function(String[] args) throws IOException { ExampleHelpers.configureLogging(); LifeExpectancyProcessor.printDocumentation(); LifeExpectancyProcessor processor = new LifeExpectancyProcessor(); ExampleHelpers.processEntitiesFromWikidataDump(processor); processor.writeFinalResults(); }
/** * Main method. Processes the whole dump using this processor and writes the * results to a file. To change which dump file to use and whether to run in * offline mode, modify the settings in {@link ExampleHelpers}. * * @param args * @throws IOException */
Main method. Processes the whole dump using this processor and writes the results to a file. To change which dump file to use and whether to run in offline mode, modify the settings in <code>ExampleHelpers</code>
main
{ "repo_name": "notconfusing/Wikidata-Toolkit", "path": "wdtk-examples/src/main/java/org/wikidata/wdtk/examples/LifeExpectancyProcessor.java", "license": "apache-2.0", "size": 5620 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
245,955
protected void onEldestEntryRemove(Map.Entry<K, V> eldest) { }
void function(Map.Entry<K, V> eldest) { }
/** * Invoked when eldest entry is about to be removed. * * @param eldest eldest entry. */
Invoked when eldest entry is about to be removed
onEldestEntryRemove
{ "repo_name": "scriptella/scriptella-etl", "path": "core/src/java/scriptella/util/LRUMap.java", "license": "apache-2.0", "size": 1584 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,264,635
@RequestMapping(method = RequestMethod.POST, value = "/{functionId:.+}", produces = {APPLICATION_JSON_UTF8_VALUE}) @ApiOperation(value = "execute function", notes = "Execute function with arguments on regions, members, or group(s). By default function will be executed on all nodes if none of (onRegion, ...
@RequestMapping(method = RequestMethod.POST, value = STR, produces = {APPLICATION_JSON_UTF8_VALUE}) @ApiOperation(value = STR, notes = STR) @ApiResponses({@ApiResponse(code = 200, message = "OK."), @ApiResponse(code = 401, message = STR), @ApiResponse(code = 403, message = STR), @ApiResponse(code = 500, message = STR),...
/** * Execute a function on Gemfire data node using REST API call. Arguments to the function are * passed as JSON string in the request body. * * @param functionId represents function to be executed * @param region list of regions on which function to be executed. * @param members list of nodes on whi...
Execute a function on Gemfire data node using REST API call. Arguments to the function are passed as JSON string in the request body
execute
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/FunctionAccessController.java", "license": "apache-2.0", "size": 12867 }
[ "io.swagger.annotations.ApiOperation", "io.swagger.annotations.ApiResponse", "io.swagger.annotations.ApiResponses", "java.util.Collection", "java.util.Set", "org.apache.geode.cache.LowMemoryException", "org.apache.geode.cache.execute.Execution", "org.apache.geode.cache.execute.Function", "org.apache...
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import java.util.Collection; import java.util.Set; import org.apache.geode.cache.LowMemoryException; import org.apache.geode.cache.execute.Execution; import org.apache.geode.cache.execute.F...
import io.swagger.annotations.*; import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.cache.execute.*; import org.apache.geode.internal.cache.execute.*; import org.apache.geode.management.internal.exceptions.*; import org.apache.geode.rest.internal.web.exception.*; import org.apache.geode.rest.i...
[ "io.swagger.annotations", "java.util", "org.apache.geode", "org.springframework.http", "org.springframework.util", "org.springframework.web" ]
io.swagger.annotations; java.util; org.apache.geode; org.springframework.http; org.springframework.util; org.springframework.web;
134,804
public static MoodleGroup createGroup(MoodleGroup group) throws MoodleRestGroupException, UnsupportedEncodingException, MoodleRestException { MoodleGroup[] a=new MoodleGroup[1]; a[0]=group; MoodleGroup[] gps=createGroups(a); return gps[0]; }
static MoodleGroup function(MoodleGroup group) throws MoodleRestGroupException, UnsupportedEncodingException, MoodleRestException { MoodleGroup[] a=new MoodleGroup[1]; a[0]=group; MoodleGroup[] gps=createGroups(a); return gps[0]; }
/** * <p>Method to create a new group in a Moodle course.</p> * * @param group MoodleGroup * @return group MoodleGroup object * @throws MoodleRestGroupException * @throws UnsupportedEncodingException * @throws MoodleRestException */
Method to create a new group in a Moodle course
createGroup
{ "repo_name": "bantonia/MoodleRest", "path": "src/net/beaconhillcott/moodlerest/MoodleRestGroup.java", "license": "gpl-2.0", "size": 65345 }
[ "java.io.UnsupportedEncodingException" ]
import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
2,315,587
@Override public JClusters rename(Name name) { return new JClusters(name, null); } // ------------------------------------------------------------------------- // Row5 type methods // -------------------------------------------------------------------------
JClusters function(Name name) { return new JClusters(name, null); }
/** * Rename this table */
Rename this table
rename
{ "repo_name": "reportportal/commons-dao", "path": "src/main/java/com/epam/ta/reportportal/jooq/tables/JClusters.java", "license": "apache-2.0", "size": 5114 }
[ "org.jooq.Name" ]
import org.jooq.Name;
import org.jooq.*;
[ "org.jooq" ]
org.jooq;
2,675,743
byte[] getDigest() { return Hashing.crc32().hashBytes(payload).asBytes(); }
byte[] getDigest() { return Hashing.crc32().hashBytes(payload).asBytes(); }
/** * crc32 on payload */
crc32 on payload
getDigest
{ "repo_name": "hdsdi3g/MyDMAM", "path": "app/hd3gtv/mydmam/embddb/store/StoreItem.java", "license": "lgpl-3.0", "size": 5809 }
[ "com.google.common.hash.Hashing" ]
import com.google.common.hash.Hashing;
import com.google.common.hash.*;
[ "com.google.common" ]
com.google.common;
2,233,545
public void clickButtonFireIntentService(View view) { Intent serviceRequest = new Intent(this, MyIntentService.class); serviceRequest.setAction(MyIntentService.ACTION_NO1); serviceRequest.putExtra(MyIntentService.EXTRA_PARAM1, "Paul on Thread #" + Thread.currentThread().getId()); sta...
void function(View view) { Intent serviceRequest = new Intent(this, MyIntentService.class); serviceRequest.setAction(MyIntentService.ACTION_NO1); serviceRequest.putExtra(MyIntentService.EXTRA_PARAM1, STR + Thread.currentThread().getId()); startService(serviceRequest); }
/** * onClick listener for button, defined in activity_main.xml */
onClick listener for button, defined in activity_main.xml
clickButtonFireIntentService
{ "repo_name": "matboehmer/moco2016-ExamplesAndDemos", "path": "02-BackgroundOperationsApp/src/main/java/io/moxd/moco2016/backgroundoperations/MainActivity.java", "license": "mit", "size": 5835 }
[ "android.content.Intent", "android.view.View" ]
import android.content.Intent; import android.view.View;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
2,441,186
public int getTrackSupport(int rendererIndex, int groupIndex, int trackIndex) { return rendererFormatSupports[rendererIndex][groupIndex][trackIndex] & RendererCapabilities.FORMAT_SUPPORT_MASK; }
int function(int rendererIndex, int groupIndex, int trackIndex) { return rendererFormatSupports[rendererIndex][groupIndex][trackIndex] & RendererCapabilities.FORMAT_SUPPORT_MASK; }
/** * Returns the extent to which an individual track is supported by the renderer. * * @param rendererIndex The renderer index. * @param groupIndex The index of the track group to which the track belongs. * @param trackIndex The index of the track within the track group. * @return One of ...
Returns the extent to which an individual track is supported by the renderer
getTrackSupport
{ "repo_name": "MaTriXy/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/trackselection/MappingTrackSelector.java", "license": "apache-2.0", "size": 23182 }
[ "com.google.android.exoplayer2.RendererCapabilities" ]
import com.google.android.exoplayer2.RendererCapabilities;
import com.google.android.exoplayer2.*;
[ "com.google.android" ]
com.google.android;
2,796,169
@Override protected synchronized void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); // Stop the Valves in our pipeline (including the basic), if any Valve current = first; if (current == null) { current = basic; } ...
synchronized void function() throws LifecycleException { setState(LifecycleState.STOPPING); Valve current = first; if (current == null) { current = basic; } while (current != null) { if (current instanceof Lifecycle) ((Lifecycle) current).stop(); current = current.getNext(); } }
/** * Stop {@link Valve}s) in this pipeline and implement the requirements * of {@link LifecycleBase#stopInternal()}. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */
Stop <code>Valve</code>s) in this pipeline and implement the requirements of <code>LifecycleBase#stopInternal()</code>
stopInternal
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/catalina/core/StandardPipeline.java", "license": "apache-2.0", "size": 14412 }
[ "org.apache.catalina.Lifecycle", "org.apache.catalina.LifecycleException", "org.apache.catalina.LifecycleState", "org.apache.catalina.Valve" ]
import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; import org.apache.catalina.Valve;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,077,044
protected Schema getFixedSchema(Object fixed) { return ((GenericContainer)fixed).getSchema(); }
Schema function(Object fixed) { return ((GenericContainer)fixed).getSchema(); }
/** Called to obtain the schema of a fixed. By default calls * {GenericContainer#getSchema(). May be overridden for alternate fixed * representations. */
Called to obtain the schema of a fixed. By default calls {GenericContainer#getSchema(). May be overridden for alternate fixed
getFixedSchema
{ "repo_name": "relateiq/avro", "path": "lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java", "license": "apache-2.0", "size": 40400 }
[ "org.apache.avro.Schema" ]
import org.apache.avro.Schema;
import org.apache.avro.*;
[ "org.apache.avro" ]
org.apache.avro;
349,465
public boolean sendMuteCommand(Command command, int zone) throws CommandTypeNotSupportedException;
boolean function(Command command, int zone) throws CommandTypeNotSupportedException;
/** * Send a mute command to the AVR based on the openHAB command * * @param command * @param zone * @return */
Send a mute command to the AVR based on the openHAB command
sendMuteCommand
{ "repo_name": "sebmarchand/openhab2-addons", "path": "addons/binding/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/protocol/AvrConnection.java", "license": "epl-1.0", "size": 3204 }
[ "org.eclipse.smarthome.core.types.Command" ]
import org.eclipse.smarthome.core.types.Command;
import org.eclipse.smarthome.core.types.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
10,602
public void getIamPolicy( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { asyncUnimplementedUnaryCall(getGetIamPolicyMethodHelper(), responseObserver); }
void function( com.google.iam.v1.GetIamPolicyRequest request, io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) { asyncUnimplementedUnaryCall(getGetIamPolicyMethodHelper(), responseObserver); }
/** * * * <pre> * Gets the access control policy for a * [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the * resource exists and does not have a policy set. * Authorization requires the following * [Google IAM](https://cloud.google.com/iam) permission on t...
<code> Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following [Google IAM](HREF) permission on the specified resource parent: `cloudtasks.queues.getIamPolicy` </code>
getIamPolicy
{ "repo_name": "vam-google/google-cloud-java", "path": "google-api-grpc/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java", "license": "apache-2.0", "size": 139467 }
[ "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
896,287
JSONArray getPlatformPluginsForUpdate(VersionNumber from, VersionNumber to) { Jenkins jenkins = Jenkins.get(); JSONArray pluginCategories = JSONArray.fromObject(getPlatformPluginList().toString()); for (Iterator<?> categoryIterator = pluginCategories.iterator(); categoryIterator.hasNext();)...
JSONArray getPlatformPluginsForUpdate(VersionNumber from, VersionNumber to) { Jenkins jenkins = Jenkins.get(); JSONArray pluginCategories = JSONArray.fromObject(getPlatformPluginList().toString()); for (Iterator<?> categoryIterator = pluginCategories.iterator(); categoryIterator.hasNext();) { Object category = category...
/** * Get the platform plugins added in the version range */
Get the platform plugins added in the version range
getPlatformPluginsForUpdate
{ "repo_name": "damianszczepanik/jenkins", "path": "core/src/main/java/jenkins/install/SetupWizard.java", "license": "mit", "size": 33878 }
[ "hudson.model.UpdateSite", "hudson.util.VersionNumber", "java.util.Iterator", "net.sf.json.JSONArray", "net.sf.json.JSONObject" ]
import hudson.model.UpdateSite; import hudson.util.VersionNumber; import java.util.Iterator; import net.sf.json.JSONArray; import net.sf.json.JSONObject;
import hudson.model.*; import hudson.util.*; import java.util.*; import net.sf.json.*;
[ "hudson.model", "hudson.util", "java.util", "net.sf.json" ]
hudson.model; hudson.util; java.util; net.sf.json;
1,444,710
public void eraseInArea(int type) throws IOException;
void function(int type) throws IOException;
/** * Erases the text an attributes within the current area * * @param type the type of erasure (0=erase to beginning of screen, 1=erase to end of screen, 2=erase all) */
Erases the text an attributes within the current area
eraseInArea
{ "repo_name": "appnativa/rare", "path": "source/tenletd/com/appnativa/rare/terminal/iDisplay.java", "license": "gpl-3.0", "size": 15301 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,282,668
public static List<Job> closedOrUnallocatedJobs(ClusterState clusterState) { PersistentTasksCustomMetadata persistentTasks = clusterState.metadata().custom(PersistentTasksCustomMetadata.TYPE); Set<String> openJobIds = MlTasks.openJobIds(persistentTasks); openJobIds.removeAll(MlTasks.unassign...
static List<Job> function(ClusterState clusterState) { PersistentTasksCustomMetadata persistentTasks = clusterState.metadata().custom(PersistentTasksCustomMetadata.TYPE); Set<String> openJobIds = MlTasks.openJobIds(persistentTasks); openJobIds.removeAll(MlTasks.unassignedJobIds(persistentTasks, clusterState.nodes())); ...
/** * Find the configurations for all closed jobs and the jobs that * do not have an allocation in the cluster state. * Closed jobs are those that do not have an associated persistent task, * unallocated jobs have a task but no executing node * * @param clusterState The cluster state ...
Find the configurations for all closed jobs and the jobs that do not have an allocation in the cluster state. Closed jobs are those that do not have an associated persistent task, unallocated jobs have a task but no executing node
closedOrUnallocatedJobs
{ "repo_name": "HonzaKral/elasticsearch", "path": "x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MlConfigMigrator.java", "license": "apache-2.0", "size": 32521 }
[ "java.util.List", "java.util.Set", "java.util.stream.Collectors", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.persistent.PersistentTasksCustomMetadata", "org.elasticsearch.xpack.core.ml.MlMetadata", "org.elasticsearch.xpack.core.ml.MlTasks", "org.elasticsearch.xpack.core.ml.job.config...
import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.persistent.PersistentTasksCustomMetadata; import org.elasticsearch.xpack.core.ml.MlMetadata; import org.elasticsearch.xpack.core.ml.MlTasks; import org.elasticsearch.x...
import java.util.*; import java.util.stream.*; import org.elasticsearch.cluster.*; import org.elasticsearch.persistent.*; import org.elasticsearch.xpack.core.ml.*; import org.elasticsearch.xpack.core.ml.job.config.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.persistent", "org.elasticsearch.xpack" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.persistent; org.elasticsearch.xpack;
1,622,217
private static MethodGenerator compileInit(NodeSortRecordGenerator sortRecord, ConstantPoolGen cpg, String className) { final InstructionList il = new InstructionList(); final MethodGenerator init = ...
static MethodGenerator function(NodeSortRecordGenerator sortRecord, ConstantPoolGen cpg, String className) { final InstructionList il = new InstructionList(); final MethodGenerator init = new MethodGenerator(ACC_PUBLIC, com.sun.org.apache.bcel.internal.generic.Type.VOID, null, null, STR, className, il, cpg); il.append(...
/** * Create a constructor for the new class. Updates the reference to the * collator in the super calls only when the stylesheet specifies a new * language in xsl:sort. */
Create a constructor for the new class. Updates the reference to the collator in the super calls only when the stylesheet specifies a new language in xsl:sort
compileInit
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java", "license": "apache-2.0", "size": 30304 }
[ "com.sun.org.apache.bcel.internal.generic.ConstantPoolGen", "com.sun.org.apache.bcel.internal.generic.InstructionList", "com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator", "com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeSortRecordGenerator", "com.sun.org.apache.xalan.internal...
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.NodeSortRecordGenerator; import com.sun.org.apache....
import com.sun.org.apache.bcel.internal.generic.*; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.*;
[ "com.sun.org" ]
com.sun.org;
2,032,135
@Deprecated public ResourceApk packWithResources( Artifact resourceApk, RuleContext ruleContext, NestedSet<ResourceContainer> resourceContainers, boolean createSource, Artifact proguardCfg) { TransitiveInfoCollection resourcesPrerequisite = ruleContext.getPrerequisite("res...
ResourceApk function( Artifact resourceApk, RuleContext ruleContext, NestedSet<ResourceContainer> resourceContainers, boolean createSource, Artifact proguardCfg) { TransitiveInfoCollection resourcesPrerequisite = ruleContext.getPrerequisite(STR, Mode.TARGET); ResourceContainer resourceContainer = Iterables.getOnlyEleme...
/** * Packages up the manifest with resources, and generates the R.java. * * @deprecated in favor of {@link ApplicationManifest#packWithDataAndResources}. */
Packages up the manifest with resources, and generates the R.java
packWithResources
{ "repo_name": "Krasnyanskiy/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/android/ApplicationManifest.java", "license": "apache-2.0", "size": 20232 }
[ "com.google.common.base.Joiner", "com.google.common.collect.ImmutableList", "com.google.common.collect.Iterables", "com.google.common.collect.Lists", "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.RuleConfiguredTarget", "com.google.devtools.build.lib.analysis.R...
import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget; import com.google.devtools....
import com.google.common.base.*; import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.rules.android.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
1,605,524
List<OFMessage> getMessagesFromCapture() { List<OFMessage> msgs = new ArrayList<OFMessage>(); assertTrue("No write on channel was captured", writeCapture.hasCaptured()); List<List<OFMessage>> capturedVals = writeCapture.getValues(); for (List<OFMessage> oneWriteL...
List<OFMessage> getMessagesFromCapture() { List<OFMessage> msgs = new ArrayList<OFMessage>(); assertTrue(STR, writeCapture.hasCaptured()); List<List<OFMessage>> capturedVals = writeCapture.getValues(); for (List<OFMessage> oneWriteList: capturedVals) msgs.addAll(oneWriteList); writeCapture.reset(); return msgs; }
/** * Extract the list of OFMessages that was captured by the Channel.write() * capture. Will check that something was actually captured first. We'll * collapse the messages from multiple writes into a single list of * OFMessages. * Resets the channelWriteCapture. */
Extract the list of OFMessages that was captured by the Channel.write() capture. Will check that something was actually captured first. We'll collapse the messages from multiple writes into a single list of OFMessages. Resets the channelWriteCapture
getMessagesFromCapture
{ "repo_name": "chinmaymhatre91/floodlight", "path": "src/test/java/net/floodlightcontroller/core/internal/OFChannelHandlerVer13Test.java", "license": "apache-2.0", "size": 18559 }
[ "java.util.ArrayList", "java.util.List", "org.easymock.EasyMock", "org.junit.Assert", "org.projectfloodlight.openflow.protocol.OFMessage" ]
import java.util.ArrayList; import java.util.List; import org.easymock.EasyMock; import org.junit.Assert; import org.projectfloodlight.openflow.protocol.OFMessage;
import java.util.*; import org.easymock.*; import org.junit.*; import org.projectfloodlight.openflow.protocol.*;
[ "java.util", "org.easymock", "org.junit", "org.projectfloodlight.openflow" ]
java.util; org.easymock; org.junit; org.projectfloodlight.openflow;
941,725
public void initialize(RandomAccessInputStream stream) throws IOException;
void function(RandomAccessInputStream stream) throws IOException;
/** * Construct a new POI filesystem around the given stream. * * @throws IOException if an error occurred when reading from the stream. */
Construct a new POI filesystem around the given stream
initialize
{ "repo_name": "ximenesuk/bioformats", "path": "components/bio-formats/src/loci/formats/services/POIService.java", "license": "gpl-2.0", "size": 4210 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,969,338
@Override public String getStudyInstanceUID() { return isDICOMDIR ? getElementValueFromSQ(directoryRecordSeq, Tags.StudyInstanceUID, null) : getElementValue(Tags.StudyInstanceUID, null); }
String function() { return isDICOMDIR ? getElementValueFromSQ(directoryRecordSeq, Tags.StudyInstanceUID, null) : getElementValue(Tags.StudyInstanceUID, null); }
/** * Convenience method to get the contents of the StudyInstanceUID element. * If the DicomObject is a DICOMDIR, the DirectoryRecordSeq element * is searched for the first StudyInstanceUID element. * @return the text of the element or null if the element does not exist. */
Convenience method to get the contents of the StudyInstanceUID element. If the DicomObject is a DICOMDIR, the DirectoryRecordSeq element is searched for the first StudyInstanceUID element
getStudyInstanceUID
{ "repo_name": "blezek/Notion", "path": "src/main/java/org/rsna/ctp/objects/DicomObject.java", "license": "bsd-3-clause", "size": 75827 }
[ "org.dcm4che.dict.Tags" ]
import org.dcm4che.dict.Tags;
import org.dcm4che.dict.*;
[ "org.dcm4che.dict" ]
org.dcm4che.dict;
1,104,245