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 Displayable getDisplayable()
{
if(displayable != null)
return displayable;
displayable = constructDisplayable();
return displayable;
}
| Displayable function() { if(displayable != null) return displayable; displayable = constructDisplayable(); return displayable; } | /**
* Get a (possibly cached) Displayable for this menu.
* @return A Displayable that represents this menu, either cached
* or freshly constructed with constructDisplayable
*/ | Get a (possibly cached) Displayable for this menu | getDisplayable | {
"repo_name": "henryk/xbmc_control",
"path": "src/ch/ploetzli/xbmc/j2me/SubMenu.java",
"license": "gpl-2.0",
"size": 6048
} | [
"javax.microedition.lcdui.Displayable"
] | import javax.microedition.lcdui.Displayable; | import javax.microedition.lcdui.*; | [
"javax.microedition"
] | javax.microedition; | 1,524,705 |
@Override
@SuppressWarnings("unchecked")
public void put(int index, Object value) {
switch (index) {
case 0:
this.tableName = (String)value;
break;
case 1:
this.viewName = (String)value;
break;
case... | @SuppressWarnings(STR) void function(int index, Object value) { switch (index) { case 0: this.tableName = (String)value; break; case 1: this.viewName = (String)value; break; case 2: this.isString = (Boolean)value; break; case 3: this.value = (Double)value; break; case 4: this.valueStr = (String)value; break; case 5: th... | /**
* This method supports the Avro framework and is not intended to be called
* directly by the user.
*
* @param index the position of the field to set
* @param value the value to set
*
* @throws IndexOutOfBoundsException
*
*/ | This method supports the Avro framework and is not intended to be called directly by the user | put | {
"repo_name": "GPUdb/gpudb-api-java",
"path": "api/src/main/java/com/gpudb/protocol/FilterByValueRequest.java",
"license": "mit",
"size": 18189
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,284,092 |
public TierDto load(String org, String envName, String name) throws APIException {
try {
Tier tier = tierManager.load(name, "", envName);
return tier.toDto();
} catch (EntityNotFoundException e) {
throw new APIException(e);
}
} | TierDto function(String org, String envName, String name) throws APIException { try { Tier tier = tierManager.load(name, "", envName); return tier.toDto(); } catch (EntityNotFoundException e) { throw new APIException(e); } } | /**
* Find a specific tier described by its name from the environment belongs.
*
* @param org
* The organization which contains the environment.
* @param envName
* The name id of the environment.
* @param name
* The name of the tier to be found.
... | Find a specific tier described by its name from the environment belongs | load | {
"repo_name": "Fiware/cloud.PaaS",
"path": "rest-api/src/main/java/com/telefonica/euro_iaas/paasmanager/rest/resources/AbstractTierResourceImpl.java",
"license": "apache-2.0",
"size": 11135
} | [
"com.telefonica.euro_iaas.paasmanager.model.Tier",
"com.telefonica.euro_iaas.paasmanager.model.dto.TierDto",
"com.telefonica.euro_iaas.paasmanager.rest.exception.APIException",
"com.telefonica.fiware.commons.dao.EntityNotFoundException"
] | import com.telefonica.euro_iaas.paasmanager.model.Tier; import com.telefonica.euro_iaas.paasmanager.model.dto.TierDto; import com.telefonica.euro_iaas.paasmanager.rest.exception.APIException; import com.telefonica.fiware.commons.dao.EntityNotFoundException; | import com.telefonica.euro_iaas.paasmanager.model.*; import com.telefonica.euro_iaas.paasmanager.model.dto.*; import com.telefonica.euro_iaas.paasmanager.rest.exception.*; import com.telefonica.fiware.commons.dao.*; | [
"com.telefonica.euro_iaas",
"com.telefonica.fiware"
] | com.telefonica.euro_iaas; com.telefonica.fiware; | 1,535,001 |
@Nullable @Optional @Input
List<String> getJvmArgs(); | @Nullable @Optional List<String> getJvmArgs(); | /**
* Returns the extra arguments to use to launch the JVM for the process. Does not include system properties and the
* minimum/maximum heap size.
*
* @return The arguments. Returns an empty list if there are no arguments.
*/ | Returns the extra arguments to use to launch the JVM for the process. Does not include system properties and the minimum/maximum heap size | getJvmArgs | {
"repo_name": "lsmaira/gradle",
"path": "subprojects/core-api/src/main/java/org/gradle/process/JavaForkOptions.java",
"license": "apache-2.0",
"size": 8888
} | [
"java.util.List",
"javax.annotation.Nullable",
"org.gradle.api.tasks.Optional"
] | import java.util.List; import javax.annotation.Nullable; import org.gradle.api.tasks.Optional; | import java.util.*; import javax.annotation.*; import org.gradle.api.tasks.*; | [
"java.util",
"javax.annotation",
"org.gradle.api"
] | java.util; javax.annotation; org.gradle.api; | 2,250,392 |
@SmallTest
@Feature({"Gestures"})
public void testTouchMoveCoalescing() throws Exception {
final long downTime = SystemClock.uptimeMillis();
final long eventTime = SystemClock.uptimeMillis();
mGestureHandler.hasTouchEventHandlers(true);
MotionEvent event = motionEvent(Motio... | @Feature({STR}) void function() throws Exception { final long downTime = SystemClock.uptimeMillis(); final long eventTime = SystemClock.uptimeMillis(); mGestureHandler.hasTouchEventHandlers(true); MotionEvent event = motionEvent(MotionEvent.ACTION_DOWN, downTime, downTime); assertTrue(mGestureHandler.onTouchEvent(event... | /**
* Verify that touch move events are properly coalesced.
* @throws Exception
*/ | Verify that touch move events are properly coalesced | testTouchMoveCoalescing | {
"repo_name": "qtekfun/htcDesire820Kernel",
"path": "external/chromium_org/content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java",
"license": "gpl-2.0",
"size": 109438
} | [
"android.os.SystemClock",
"android.view.MotionEvent",
"org.chromium.base.test.util.Feature"
] | import android.os.SystemClock; import android.view.MotionEvent; import org.chromium.base.test.util.Feature; | import android.os.*; import android.view.*; import org.chromium.base.test.util.*; | [
"android.os",
"android.view",
"org.chromium.base"
] | android.os; android.view; org.chromium.base; | 1,275,260 |
boolean exists( Path path ) throws IOException; | boolean exists( Path path ) throws IOException; | /**
* Does the path reference an object?
*
* @param path Path
* @return {@code true} if the path points to an object
* @throws IOException Error communicating with the file system
*/ | Does the path reference an object | exists | {
"repo_name": "mkambol/pentaho-hadoop-shims",
"path": "common-fragment-V1/src/main/java/org/pentaho/hadoop/shim/api/internal/fs/FileSystem.java",
"license": "apache-2.0",
"size": 2670
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,712,342 |
public void elementDecl(String name, String model) throws SAXException
{
return;
}
| void function(String name, String model) throws SAXException { return; } | /**
* Does nothing.
* @see org.xml.sax.ext.DeclHandler#elementDecl(String, String)
*/ | Does nothing | elementDecl | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xml/serializer/ToHTMLSAXHandler.java",
"license": "gpl-3.0",
"size": 23281
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,122,632 |
private static void randomizeFetchSourceContextParams(Consumer<FetchSourceContext> consumer, Map<String, String> expectedParams) {
if (randomBoolean()) {
if (randomBoolean()) {
boolean fetchSource = randomBoolean();
consumer.accept(new FetchSourceContext(fetchSour... | static void function(Consumer<FetchSourceContext> consumer, Map<String, String> expectedParams) { if (randomBoolean()) { if (randomBoolean()) { boolean fetchSource = randomBoolean(); consumer.accept(new FetchSourceContext(fetchSource)); if (fetchSource == false) { expectedParams.put(STR, "false"); } } else { int numInc... | /**
* Randomize the {@link FetchSourceContext} request parameters.
*/ | Randomize the <code>FetchSourceContext</code> request parameters | randomizeFetchSourceContextParams | {
"repo_name": "scottsom/elasticsearch",
"path": "client/rest-high-level/src/test/java/org/elasticsearch/client/RequestTests.java",
"license": "apache-2.0",
"size": 69387
} | [
"java.util.Map",
"java.util.function.Consumer",
"org.elasticsearch.search.fetch.subphase.FetchSourceContext"
] | import java.util.Map; import java.util.function.Consumer; import org.elasticsearch.search.fetch.subphase.FetchSourceContext; | import java.util.*; import java.util.function.*; import org.elasticsearch.search.fetch.subphase.*; | [
"java.util",
"org.elasticsearch.search"
] | java.util; org.elasticsearch.search; | 1,545,246 |
private String deploySourceVDB(String sourceVDBName, String modelName, String dataSourceName, String jndiName, String translator) throws DataVirtUiException {
try {
// Get VDB with the supplied name.
// -- If it already exists, return its status
VDBMetaData sourceVdb = clientAccessor... | String function(String sourceVDBName, String modelName, String dataSourceName, String jndiName, String translator) throws DataVirtUiException { try { VDBMetaData sourceVdb = clientAccessor.getClient().getVDB(sourceVDBName,1); if(sourceVdb!=null) { String sourceVdbStatus = getVDBStatusMessage(sourceVDBName); if(!sourceV... | /**
* Deploys a SourceVDB for the specified dataSource, if it doesnt already exist
* @param sourceVDBName the name of the source VDB
* @param modelName the name of the model
* @param dataSourceName the name of the datasource
* @param jndiName the JNDI name of the datasource
* @param transl... | Deploys a SourceVDB for the specified dataSource, if it doesnt already exist | deploySourceVDB | {
"repo_name": "mdrillin/teiid-authoring",
"path": "teiid-authoring-webapp/src/main/java/org/teiid/authoring/backend/server/services/TeiidService.java",
"license": "apache-2.0",
"size": 45986
} | [
"java.io.ByteArrayInputStream",
"java.util.Properties",
"org.teiid.adminapi.impl.ModelMetaData",
"org.teiid.adminapi.impl.VDBMetaData",
"org.teiid.authoring.share.Constants",
"org.teiid.authoring.share.exceptions.DataVirtUiException"
] | import java.io.ByteArrayInputStream; import java.util.Properties; import org.teiid.adminapi.impl.ModelMetaData; import org.teiid.adminapi.impl.VDBMetaData; import org.teiid.authoring.share.Constants; import org.teiid.authoring.share.exceptions.DataVirtUiException; | import java.io.*; import java.util.*; import org.teiid.adminapi.impl.*; import org.teiid.authoring.share.*; import org.teiid.authoring.share.exceptions.*; | [
"java.io",
"java.util",
"org.teiid.adminapi",
"org.teiid.authoring"
] | java.io; java.util; org.teiid.adminapi; org.teiid.authoring; | 1,198,497 |
public double DistanceFrom(Point2D.Double point) {
return lanes.get(0).GetPoint(0).distance(point);
}
| double function(Point2D.Double point) { return lanes.get(0).GetPoint(0).distance(point); } | /**
* Calculates the distance from the specified point
* @param point
* @return
*/ | Calculates the distance from the specified point | DistanceFrom | {
"repo_name": "rudhir-upretee/Sumo_With_Netsim",
"path": "tools/contributed/trafficmodeler/src/roadnetwork/Edge.java",
"license": "gpl-3.0",
"size": 10631
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 1,069,536 |
private TridasObject getNewHierarchy(ReplaceHierarchyEvent event)
{
log.debug("Searching webservice for new hierarchy");
// create an entity for reading
WSIEntity entity = new WSIEntity();
entity.setId(event.newParent.getIdentifier().getValue());
if(event.newParent instanceof TridasMeasurementSeries)
... | TridasObject function(ReplaceHierarchyEvent event) { log.debug(STR); WSIEntity entity = new WSIEntity(); entity.setId(event.newParent.getIdentifier().getValue()); if(event.newParent instanceof TridasMeasurementSeries) { entity.setType(EntityType.MEASUREMENT_SERIES); } else if(event.newParent instanceof TridasRadius) { ... | /**
* Get a TridasObject populated with children all the way down to Radius or
* Series. This represents the new hierarchy that we want to use.
*
* @param event
* @return
*/ | Get a TridasObject populated with children all the way down to Radius or Series. This represents the new hierarchy that we want to use | getNewHierarchy | {
"repo_name": "petebrew/tellervo",
"path": "src/main/java/org/tellervo/desktop/io/command/ReplaceHierarchyCommand.java",
"license": "gpl-3.0",
"size": 8415
} | [
"org.tellervo.desktop.io.control.ReplaceHierarchyEvent",
"org.tellervo.desktop.wsi.tellervo.TellervoResourceAccessDialog",
"org.tellervo.desktop.wsi.tellervo.TellervoResourceProperties",
"org.tellervo.desktop.wsi.tellervo.resources.EntityResource",
"org.tellervo.schema.EntityType",
"org.tellervo.schema.Te... | import org.tellervo.desktop.io.control.ReplaceHierarchyEvent; import org.tellervo.desktop.wsi.tellervo.TellervoResourceAccessDialog; import org.tellervo.desktop.wsi.tellervo.TellervoResourceProperties; import org.tellervo.desktop.wsi.tellervo.resources.EntityResource; import org.tellervo.schema.EntityType; import org.t... | import org.tellervo.desktop.io.control.*; import org.tellervo.desktop.wsi.tellervo.*; import org.tellervo.desktop.wsi.tellervo.resources.*; import org.tellervo.schema.*; import org.tridas.schema.*; | [
"org.tellervo.desktop",
"org.tellervo.schema",
"org.tridas.schema"
] | org.tellervo.desktop; org.tellervo.schema; org.tridas.schema; | 633,287 |
protected boolean isSessionLocallyTransacted(Session session) {
if (!super.isSessionLocallyTransacted(session)) {
return false;
}
JmsResourceHolder resourceHolder =
(JmsResourceHolder) TransactionSynchronizationManager.getResource(getConnectionFactory());
return (resourceHolder == null || resourceHold... | boolean function(Session session) { if (!super.isSessionLocallyTransacted(session)) { return false; } JmsResourceHolder resourceHolder = (JmsResourceHolder) TransactionSynchronizationManager.getResource(getConnectionFactory()); return (resourceHolder == null resourceHolder instanceof LocallyExposedJmsResourceHolder !re... | /**
* This implementation checks whether the Session is externally synchronized.
* In this case, the Session is not locally transacted, despite the listener
* container's "sessionTransacted" flag being set to "true".
* @see org.springframework.jms.connection.JmsResourceHolder
*/ | This implementation checks whether the Session is externally synchronized. In this case, the Session is not locally transacted, despite the listener container's "sessionTransacted" flag being set to "true" | isSessionLocallyTransacted | {
"repo_name": "cbeams-archive/spring-framework-2.5.x",
"path": "src/org/springframework/jms/listener/AbstractPollingMessageListenerContainer.java",
"license": "apache-2.0",
"size": 19910
} | [
"javax.jms.Session",
"org.springframework.jms.connection.JmsResourceHolder",
"org.springframework.transaction.support.TransactionSynchronizationManager"
] | import javax.jms.Session; import org.springframework.jms.connection.JmsResourceHolder; import org.springframework.transaction.support.TransactionSynchronizationManager; | import javax.jms.*; import org.springframework.jms.connection.*; import org.springframework.transaction.support.*; | [
"javax.jms",
"org.springframework.jms",
"org.springframework.transaction"
] | javax.jms; org.springframework.jms; org.springframework.transaction; | 2,019,761 |
public static TextField<JFormattedTextField> formatted(Format format) {
return new TextField<>(new JFormattedTextField(format));
} | static TextField<JFormattedTextField> function(Format format) { return new TextField<>(new JFormattedTextField(format)); } | /**
* Create a {@link JFormattedTextField} using the specified format.
* @return a {@code TextField} for further configuration
*/ | Create a <code>JFormattedTextField</code> using the specified format | formatted | {
"repo_name": "jonestimd/swing-extensions",
"path": "src/main/java/io/github/jonestimd/swing/component/TextField.java",
"license": "mit",
"size": 7648
} | [
"java.text.Format",
"javax.swing.JFormattedTextField"
] | import java.text.Format; import javax.swing.JFormattedTextField; | import java.text.*; import javax.swing.*; | [
"java.text",
"javax.swing"
] | java.text; javax.swing; | 1,731,250 |
@Override
public IBlockState getFallBlockType(IBlockState myState)
{
return TFCBlocks.Rubble.getDefaultState().withProperty(BlockRubble.META_PROPERTY, myState.getValue(META_PROPERTY));
} | IBlockState function(IBlockState myState) { return TFCBlocks.Rubble.getDefaultState().withProperty(BlockRubble.META_PROPERTY, myState.getValue(META_PROPERTY)); } | /*******************************************************************************
* 1. Content
*******************************************************************************/ | 1. Content | getFallBlockType | {
"repo_name": "CHeuberger/TFC2",
"path": "src/Common/com/bioxx/tfc2/blocks/BlockStoneBrick.java",
"license": "gpl-3.0",
"size": 2309
} | [
"com.bioxx.tfc2.TFCBlocks",
"com.bioxx.tfc2.blocks.terrain.BlockRubble",
"net.minecraft.block.state.IBlockState"
] | import com.bioxx.tfc2.TFCBlocks; import com.bioxx.tfc2.blocks.terrain.BlockRubble; import net.minecraft.block.state.IBlockState; | import com.bioxx.tfc2.*; import com.bioxx.tfc2.blocks.terrain.*; import net.minecraft.block.state.*; | [
"com.bioxx.tfc2",
"net.minecraft.block"
] | com.bioxx.tfc2; net.minecraft.block; | 1,345,376 |
private static int resultToCause(int rc) {
switch (rc) {
case Activity.RESULT_OK:
case Intents.RESULT_SMS_HANDLED:
// Cause code is ignored on success.
return 0;
case Intents.RESULT_SMS_OUT_OF_MEMORY:
return CommandsInterfac... | static int function(int rc) { switch (rc) { case Activity.RESULT_OK: case Intents.RESULT_SMS_HANDLED: return 0; case Intents.RESULT_SMS_OUT_OF_MEMORY: return CommandsInterface.GSM_SMS_FAIL_CAUSE_MEMORY_CAPACITY_EXCEEDED; case Intents.RESULT_SMS_GENERIC_ERROR: default: return CommandsInterface.GSM_SMS_FAIL_CAUSE_UNSPECI... | /**
* Convert Android result code to 3GPP SMS failure cause.
* @param rc the Android SMS intent result value
* @return 0 for success, or a 3GPP SMS failure cause value
*/ | Convert Android result code to 3GPP SMS failure cause | resultToCause | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/com/android/internal/telephony/gsm/GsmInboundSmsHandler.java",
"license": "apache-2.0",
"size": 6942
} | [
"android.app.Activity",
"android.provider.Telephony",
"com.android.internal.telephony.CommandsInterface"
] | import android.app.Activity; import android.provider.Telephony; import com.android.internal.telephony.CommandsInterface; | import android.app.*; import android.provider.*; import com.android.internal.telephony.*; | [
"android.app",
"android.provider",
"com.android.internal"
] | android.app; android.provider; com.android.internal; | 2,159,268 |
EClass getText(); | EClass getText(); | /**
* Returns the meta object for class '{@link fr.obeo.dsl.game.Text <em>Text</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Text</em>'.
* @see fr.obeo.dsl.game.Text
* @generated
*/ | Returns the meta object for class '<code>fr.obeo.dsl.game.Text Text</code>'. | getText | {
"repo_name": "Obeo/Game-Designer",
"path": "plugins/fr.obeo.dsl.game/src-gen/fr/obeo/dsl/game/GamePackage.java",
"license": "epl-1.0",
"size": 149639
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,371,719 |
public T caseHandler(Handler object) {
return null;
} | T function(Handler object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Handler</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the resul... | Returns the result of interpreting the object as an instance of 'Handler'. This implementation returns null; returning a non-null result will terminate the switch. | caseHandler | {
"repo_name": "markus1978/clickwatch",
"path": "core/de.hub.clickwatch.core/src/de/hub/clickwatch/model/util/ClickWatchModelSwitch.java",
"license": "apache-2.0",
"size": 11352
} | [
"de.hub.clickwatch.model.Handler"
] | import de.hub.clickwatch.model.Handler; | import de.hub.clickwatch.model.*; | [
"de.hub.clickwatch"
] | de.hub.clickwatch; | 56,586 |
public static void populateSpecialFieldMenu(JMenu menu, SpecialField field, JabRefFrame frame) {
menu.setText(field.getMenuString());
menu.setIcon(((IconTheme.FontBasedIcon) field.getRepresentingIcon()).createSmallIcon());
for (SpecialFieldValue val : field.getValues()) {
menu.ad... | static void function(JMenu menu, SpecialField field, JabRefFrame frame) { menu.setText(field.getMenuString()); menu.setIcon(((IconTheme.FontBasedIcon) field.getRepresentingIcon()).createSmallIcon()); for (SpecialFieldValue val : field.getValues()) { menu.add(val.getMenuAction(frame)); } } | /**
* Remove all types from the menu.
* Then cycle through all available values, and add them.
*/ | Remove all types from the menu. Then cycle through all available values, and add them | populateSpecialFieldMenu | {
"repo_name": "mairdl/jabref",
"path": "src/main/java/net/sf/jabref/gui/menus/RightClickMenu.java",
"license": "mit",
"size": 13612
} | [
"javax.swing.JMenu",
"net.sf.jabref.gui.IconTheme",
"net.sf.jabref.gui.JabRefFrame",
"net.sf.jabref.specialfields.SpecialField",
"net.sf.jabref.specialfields.SpecialFieldValue"
] | import javax.swing.JMenu; import net.sf.jabref.gui.IconTheme; import net.sf.jabref.gui.JabRefFrame; import net.sf.jabref.specialfields.SpecialField; import net.sf.jabref.specialfields.SpecialFieldValue; | import javax.swing.*; import net.sf.jabref.gui.*; import net.sf.jabref.specialfields.*; | [
"javax.swing",
"net.sf.jabref"
] | javax.swing; net.sf.jabref; | 229,777 |
private static void compareEmployees(Employee e1, Employee e2) {
assertEquals("The employees' first names don't match!", e1.getFirstName(), e2.getFirstName());
assertEquals("The employees' last names don't match!", e1.getLastName(), e2.getLastName());
assertEquals("The employees' birthdates... | static void function(Employee e1, Employee e2) { assertEquals(STR, e1.getFirstName(), e2.getFirstName()); assertEquals(STR, e1.getLastName(), e2.getLastName()); assertEquals(STR, e1.getBirthDate(), e2.getBirthDate()); assertEquals(STR, e1.getGender(), e2.getGender()); assertEquals(STR, e1.getJobTitle(), e2.getJobTitle(... | /**
* Compares two persons via assertions.
*
* @param e1
* @param e2
*/ | Compares two persons via assertions | compareEmployees | {
"repo_name": "gammalgris/jmul",
"path": "Utilities/Persistence-Tests/src/test/jmul/persistence/scenarios/scenario007/Scenario007SerializationTest.java",
"license": "gpl-3.0",
"size": 6471
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 849,688 |
@Nonnull
public static String spoiler(@Nonnull String input)
{
String sanitized = MarkdownSanitizer.escape(input, ~MarkdownSanitizer.SPOILER);
return "||" + sanitized + "||";
} | static String function(@Nonnull String input) { String sanitized = MarkdownSanitizer.escape(input, ~MarkdownSanitizer.SPOILER); return " " + sanitized + " "; } | /**
* Escapes already existing spoiler regions in the input
* and applies spoiler formatting to the entire string.
* <br>The resulting string will be {@code "||" + escaped(input) + "||"}.
*
* @param input
* The input to spoiler
*
* @return The resulting output
*/ | Escapes already existing spoiler regions in the input and applies spoiler formatting to the entire string. The resulting string will be "||" + escaped(input) + "||" | spoiler | {
"repo_name": "DV8FromTheWorld/JDA",
"path": "src/main/java/net/dv8tion/jda/api/utils/MarkdownUtil.java",
"license": "apache-2.0",
"size": 6806
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,183,188 |
public static InternalSession getSession()
{
InternalSession session = SESSION.get();
if (session == null)
{
throw new IllegalStateException("session == null"); //$NON-NLS-1$
}
return session;
} | static InternalSession function() { InternalSession session = SESSION.get(); if (session == null) { throw new IllegalStateException(STR); } return session; } | /**
* Returns the session associated with the current thread.
*
* @return Never <code>null</code>.
* @throws IllegalStateException
* if no session is associated with the current thread.
* @since 3.0
*/ | Returns the session associated with the current thread | getSession | {
"repo_name": "IHTSDO/snow-owl",
"path": "dependencies/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/StoreThreadLocal.java",
"license": "apache-2.0",
"size": 3254
} | [
"org.eclipse.emf.cdo.spi.server.InternalSession"
] | import org.eclipse.emf.cdo.spi.server.InternalSession; | import org.eclipse.emf.cdo.spi.server.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,815,353 |
public long write(OutputStream out, Iterator<DiffEntry> changes) throws IOException {
final ObjectDatabase objectDatabase = repository.objectDatabase();
out = new CountingOutputStream(out);
// avoids sending the same metadata object multiple times
Set<ObjectId> writtenMetadataIds = ... | long function(OutputStream out, Iterator<DiffEntry> changes) throws IOException { final ObjectDatabase objectDatabase = repository.objectDatabase(); out = new CountingOutputStream(out); Set<ObjectId> writtenMetadataIds = new HashSet<ObjectId>(); byte[] oidbuffer = new byte[ObjectId.NUM_BYTES]; long objectCount = 0; whi... | /**
* Writes the set of changes to the provided output stream.
*
* @param out the stream to write to
* @param changes the changes to write
* @throws IOException
* @return the number of objects written
*/ | Writes the set of changes to the provided output stream | write | {
"repo_name": "smesdaghi/geogig",
"path": "src/core/src/main/java/org/locationtech/geogig/remote/BinaryPackedChanges.java",
"license": "bsd-3-clause",
"size": 11376
} | [
"com.google.common.io.CountingOutputStream",
"java.io.DataOutput",
"java.io.DataOutputStream",
"java.io.IOException",
"java.io.OutputStream",
"java.util.HashSet",
"java.util.Iterator",
"java.util.Set",
"org.locationtech.geogig.api.NodeRef",
"org.locationtech.geogig.api.ObjectId",
"org.locationte... | import com.google.common.io.CountingOutputStream; import java.io.DataOutput; import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.HashSet; import java.util.Iterator; import java.util.Set; import org.locationtech.geogig.api.NodeRef; import org.locationtech.geogig.api... | import com.google.common.io.*; import java.io.*; import java.util.*; import org.locationtech.geogig.api.*; import org.locationtech.geogig.api.plumbing.diff.*; import org.locationtech.geogig.storage.*; import org.locationtech.geogig.storage.datastream.*; | [
"com.google.common",
"java.io",
"java.util",
"org.locationtech.geogig"
] | com.google.common; java.io; java.util; org.locationtech.geogig; | 2,461,080 |
public void addToMenu(int menuID, JMenuItem entry)
{
if (menuID < 0 || menus.length <= menuID)
throw new IllegalArgumentException("Invalid menu id: "+menuID+".");
if (entry == null)
throw new NullPointerException("No entry");
menus[menuID].add(entry);
Iterator<JMenu> i;
JMenu menu;
if ... | void function(int menuID, JMenuItem entry) { if (menuID < 0 menus.length <= menuID) throw new IllegalArgumentException(STR+menuID+"."); if (entry == null) throw new NullPointerException(STR); menus[menuID].add(entry); Iterator<JMenu> i; JMenu menu; if (menuID == WINDOW_MENU) { i = windowMenus.iterator(); while (i.hasNe... | /**
* Implemented as specified by {@link TaskBar}.
* @see TaskBar#addToMenu(int, JMenuItem)
*/ | Implemented as specified by <code>TaskBar</code> | addToMenu | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/ui/TaskBarView.java",
"license": "gpl-2.0",
"size": 21196
} | [
"java.util.Iterator",
"javax.swing.JMenu",
"javax.swing.JMenuItem"
] | import java.util.Iterator; import javax.swing.JMenu; import javax.swing.JMenuItem; | import java.util.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,391,744 |
if (profile != null)
return profile;
// initialize all profiles that will be following another user
List<Profile> profiles = new ArrayList<>();
// whether the database needs to be reset and have these profiles be recreated
boolean needToReset = false;
for (... | if (profile != null) return profile; List<Profile> profiles = new ArrayList<>(); boolean needToReset = false; for (int i = 0; i < 15; ++i){ Profile profile = new Profile(STR + i); Map<String, String> map = new HashMap<>(); map.put("name", profile.getName()); Pair<Profile, Boolean> result = ElasticSearchUtilities.getObj... | /**
* initialize all necessary profiles if they have not been yet
* @return the profile that is following all the other profiles
* @throws InterruptedException
*/ | initialize all necessary profiles if they have not been yet | init | {
"repo_name": "CMPUT301F17T15/CIA",
"path": "app/src/androidTest/java/com/cmput301/cia/intent/ViewFollowedUsersIntentTests.java",
"license": "mit",
"size": 10846
} | [
"android.util.Pair",
"com.cmput301.cia.models.Follow",
"com.cmput301.cia.models.Habit",
"com.cmput301.cia.models.Profile",
"com.cmput301.cia.utilities.ElasticSearchUtilities",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import android.util.Pair; import com.cmput301.cia.models.Follow; import com.cmput301.cia.models.Habit; import com.cmput301.cia.models.Profile; import com.cmput301.cia.utilities.ElasticSearchUtilities; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import android.util.*; import com.cmput301.cia.models.*; import com.cmput301.cia.utilities.*; import java.util.*; | [
"android.util",
"com.cmput301.cia",
"java.util"
] | android.util; com.cmput301.cia; java.util; | 120,921 |
public static IElementDefn getElementDefn( String elementName )
{
IElementDefn defn = getMetaDataDictionary( ).getElement( elementName );
if ( defn == null )
{
defn = getMetaDataDictionary( ).getExtension( elementName );
}
return defn;
} | static IElementDefn function( String elementName ) { IElementDefn defn = getMetaDataDictionary( ).getElement( elementName ); if ( defn == null ) { defn = getMetaDataDictionary( ).getExtension( elementName ); } return defn; } | /**
* Gets the definition for the element with the specified name
*
* @param elementName
* the name of the element
*
* @return Returns the definition, or null if the element is not defined.
*/ | Gets the definition for the element with the specified name | getElementDefn | {
"repo_name": "sguan-actuate/birt",
"path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java",
"license": "epl-1.0",
"size": 91152
} | [
"org.eclipse.birt.report.model.api.metadata.IElementDefn"
] | import org.eclipse.birt.report.model.api.metadata.IElementDefn; | import org.eclipse.birt.report.model.api.metadata.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 1,870,388 |
private Uri whichContentStore() {
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
return android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else {
return android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI;
}
... | Uri function() { if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { return android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI; } else { return android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI; } } | /**
* Determine if we are storing the images in internal or external storage
* @return Uri
*/ | Determine if we are storing the images in internal or external storage | whichContentStore | {
"repo_name": "agurlazar/prototype-v.0",
"path": "plugins/cordova-plugin-camera/src/android/CameraLauncher.java",
"license": "apache-2.0",
"size": 42997
} | [
"android.net.Uri",
"android.os.Environment",
"android.provider.MediaStore"
] | import android.net.Uri; import android.os.Environment; import android.provider.MediaStore; | import android.net.*; import android.os.*; import android.provider.*; | [
"android.net",
"android.os",
"android.provider"
] | android.net; android.os; android.provider; | 2,055,823 |
private boolean isInternalSymbol(long funcDecl) {
switch (Z3_decl_kind.fromInt(Native.getDeclKind(z3context, funcDecl))) {
case Z3_OP_SELECT:
case Z3_OP_ARRAY_EXT:
return true;
default:
return Z3_IRRELEVANT_MODEL_TERM_PATTERN
.matcher(z3creator.symbolToString(Native.g... | boolean function(long funcDecl) { switch (Z3_decl_kind.fromInt(Native.getDeclKind(z3context, funcDecl))) { case Z3_OP_SELECT: case Z3_OP_ARRAY_EXT: return true; default: return Z3_IRRELEVANT_MODEL_TERM_PATTERN .matcher(z3creator.symbolToString(Native.getDeclName(z3context, funcDecl))) .matches(); } } | /**
* The symbol "!" is part of temporary symbols used for quantified formulas or aliases. This
* method is only a heuristic, because the user can also create a symbol containing "!".
*/ | The symbol "!" is part of temporary symbols used for quantified formulas or aliases. This method is only a heuristic, because the user can also create a symbol containing "!" | isInternalSymbol | {
"repo_name": "sosy-lab/java-smt",
"path": "src/org/sosy_lab/java_smt/solvers/z3/Z3Model.java",
"license": "apache-2.0",
"size": 14611
} | [
"com.microsoft.z3.Native"
] | import com.microsoft.z3.Native; | import com.microsoft.z3.*; | [
"com.microsoft.z3"
] | com.microsoft.z3; | 2,113,825 |
@Override
public void setActiveEditor(IEditorPart part) {
super.setActiveEditor(part);
activeEditorPart = part;
// Switch to the new selection provider.
//
if (selectionProvider != null) {
selectionProvider.removeSelectionChangedListener(this);
}
if (part == null) {
selectionProvider = null;
... | void function(IEditorPart part) { super.setActiveEditor(part); activeEditorPart = part; selectionProvider.removeSelectionChangedListener(this); } if (part == null) { selectionProvider = null; } else { selectionProvider = part.getSite().getSelectionProvider(); selectionProvider.addSelectionChangedListener(this); selecti... | /**
* When the active editor changes, this remembers the change and registers with it as a selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | When the active editor changes, this remembers the change and registers with it as a selection provider. | setActiveEditor | {
"repo_name": "KAMP-Research/KAMP",
"path": "bundles/Toometa/toometa.glossary.editor/src/glossary/presentation/GlossaryActionBarContributor.java",
"license": "apache-2.0",
"size": 13957
} | [
"org.eclipse.jface.viewers.SelectionChangedEvent",
"org.eclipse.ui.IEditorPart"
] | import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.ui.IEditorPart; | import org.eclipse.jface.viewers.*; import org.eclipse.ui.*; | [
"org.eclipse.jface",
"org.eclipse.ui"
] | org.eclipse.jface; org.eclipse.ui; | 873,032 |
void onRenderedFirstFrame(Surface surface); | void onRenderedFirstFrame(Surface surface); | /**
* Called when a frame is rendered for the first time since setting the surface, and when a frame
* is rendered for the first time since the renderer was reset.
*
* @param surface The {@link Surface} to which a first frame has been rendered, or {@code null} if
* the renderer renders to something t... | Called when a frame is rendered for the first time since setting the surface, and when a frame is rendered for the first time since the renderer was reset | onRenderedFirstFrame | {
"repo_name": "profosure/porogram",
"path": "TMessagesProj/src/main/java/com/porogram/profosure1/messenger/exoplayer2/video/VideoRendererEventListener.java",
"license": "gpl-2.0",
"size": 8215
} | [
"android.view.Surface"
] | import android.view.Surface; | import android.view.*; | [
"android.view"
] | android.view; | 215,228 |
public static Long getNodePropertySize(final Node node)
throws RepositoryException {
Long size = 0L;
for (final PropertyIterator i = node.getProperties(); i.hasNext();) {
final Property p = i.nextProperty();
if (p.isMultiple()) {
for (final Value v : p... | static Long function(final Node node) throws RepositoryException { Long size = 0L; for (final PropertyIterator i = node.getProperties(); i.hasNext();) { final Property p = i.nextProperty(); if (p.isMultiple()) { for (final Value v : p.getValues()) { size += v.getBinary().getSize(); } } else { size += p.getBinary().getS... | /**
* Get the total size of a Node's properties
*
* @param node the node
* @return size in bytes
* @throws RepositoryException if repository exception occurred
*/ | Get the total size of a Node's properties | getNodePropertySize | {
"repo_name": "ruebot/fcrepo4",
"path": "fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/services/ServiceHelpers.java",
"license": "apache-2.0",
"size": 6499
} | [
"javax.jcr.Node",
"javax.jcr.Property",
"javax.jcr.PropertyIterator",
"javax.jcr.RepositoryException",
"javax.jcr.Value"
] | import javax.jcr.Node; import javax.jcr.Property; import javax.jcr.PropertyIterator; import javax.jcr.RepositoryException; import javax.jcr.Value; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 2,728,477 |
protected String doIt() throws Exception
{
String[] tables = new String[] {"AD_Window_Access", "AD_Process_Access", "AD_Form_Access",
"AD_Workflow_Access", "AD_Task_Access", "AD_Document_Action_Access",
X_AD_Role_Included.Table_Name,
};
String[] keycolumns = new String[] {"AD_Window_ID", "AD_Process_... | String function() throws Exception { String[] tables = new String[] {STR, STR, STR, STR, STR, STR, X_AD_Role_Included.Table_Name, }; String[] keycolumns = new String[] {STR, STR, STR, STR, STR, STR, X_AD_Role_Included.COLUMNNAME_Included_Role_ID, }; int action = 0; for ( int i = 0; i < tables.length; i++ ) { String tab... | /**
* Copy the role access records
* @return info
* @throws Exception
*/ | Copy the role access records | doIt | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-legacy/org/compiere/process/CopyRole.java",
"license": "gpl-2.0",
"size": 4661
} | [
"java.math.BigDecimal",
"org.compiere.util.DB",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.DB; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 2,741,753 |
private void assignDoubleNullsNoRepeatingNoSelection(int keyIndex, int index, int size,
DoubleColumnVector columnVector) {
for(int r = 0; r < size; ++r) {
if (!columnVector.isNull[r]) {
vectorHashKeyWrappers[r].assignDouble(index, columnVector.vector[r]);
} else {
vectorHashKeyWr... | void function(int keyIndex, int index, int size, DoubleColumnVector columnVector) { for(int r = 0; r < size; ++r) { if (!columnVector.isNull[r]) { vectorHashKeyWrappers[r].assignDouble(index, columnVector.vector[r]); } else { vectorHashKeyWrappers[r].assignNullDouble(keyIndex, index); } } } | /**
* Helper method to assign values from a vector column into the key wrapper.
* Optimized for Double type, possible nulls, repeat values.
*/ | Helper method to assign values from a vector column into the key wrapper. Optimized for Double type, possible nulls, repeat values | assignDoubleNullsNoRepeatingNoSelection | {
"repo_name": "sankarh/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/vector/wrapper/VectorHashKeyWrapperBatch.java",
"license": "apache-2.0",
"size": 41372
} | [
"org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector"
] | import org.apache.hadoop.hive.ql.exec.vector.DoubleColumnVector; | import org.apache.hadoop.hive.ql.exec.vector.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 912,105 |
public boolean hasTitle(org.ontoware.rdf2go.model.node.Node value) {
return Base.hasValue(this.model, this.getResource(), TITLE, value);
} | boolean function(org.ontoware.rdf2go.model.node.Node value) { return Base.hasValue(this.model, this.getResource(), TITLE, value); } | /**
* Check if org.ontoware.rdfreactor.generator.java.JProperty@5bbe2ed3 has
* the given value (maybe among other values).
*
* @param value
* the value to be checked
* @return true if this property contains (maybe among other) the given
* value
*
* ... | Check if org.ontoware.rdfreactor.generator.java.JProperty@5bbe2ed3 has the given value (maybe among other values) | hasTitle | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-sioc/src/main/java/org/rdfs/sioc/Thing.java",
"license": "mit",
"size": 317844
} | [
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdfreactor"
] | org.ontoware.rdfreactor; | 1,084,061 |
protected void showTabs() {
if (getPageCount() > 1) {
setPageText(0, getString("_UI_SelectionPage_label"));
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y - 6);
... | void function() { if (getPageCount() > 1) { setPageText(0, getString(STR)); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); } } } | /**
* If there is more than one page in the multi-page editor part,
* this shows the tabs at the bottom.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | If there is more than one page in the multi-page editor part, this shows the tabs at the bottom. | showTabs | {
"repo_name": "aciancone/klapersuite",
"path": "klapersuite.metamodel.klaper.editor/src/klaper/probability/presentation/ProbabilityEditor.java",
"license": "epl-1.0",
"size": 54031
} | [
"org.eclipse.swt.custom.CTabFolder",
"org.eclipse.swt.graphics.Point"
] | import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.graphics.Point; | import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 742,190 |
public Dimension getMaximumSize(JComponent a) {
Dimension returnValue =
((ComponentUI) (uis.elementAt(0))).getMaximumSize(a);
for (int i = 1; i < uis.size(); i++) {
((ComponentUI) (uis.elementAt(i))).getMaximumSize(a);
}
return returnValue;
} | Dimension function(JComponent a) { Dimension returnValue = ((ComponentUI) (uis.elementAt(0))).getMaximumSize(a); for (int i = 1; i < uis.size(); i++) { ((ComponentUI) (uis.elementAt(i))).getMaximumSize(a); } return returnValue; } | /**
* Invokes the <code>getMaximumSize</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/ | Invokes the <code>getMaximumSize</code> method on each UI handled by this object | getMaximumSize | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/javax/swing/plaf/multi/MultiLabelUI.java",
"license": "gpl-2.0",
"size": 7557
} | [
"java.awt.Dimension",
"javax.swing.JComponent",
"javax.swing.plaf.ComponentUI"
] | import java.awt.Dimension; import javax.swing.JComponent; import javax.swing.plaf.ComponentUI; | import java.awt.*; import javax.swing.*; import javax.swing.plaf.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,055,812 |
Promise<InfoResponse> info(Path project, String target, String revision, boolean children, @Nullable Credentials credentials); | Promise<InfoResponse> info(Path project, String target, String revision, boolean children, @Nullable Credentials credentials); | /**
* Retrieves the information about repository item.
*
* @param project
* relative path to the project in local workspace
* @param target
* target to operate
* @param revision
* revision, use HEAD to specify latest revision
* @param credentials
... | Retrieves the information about repository item | info | {
"repo_name": "snjeza/che",
"path": "plugins/plugin-svn/che-plugin-svn-ext-ide/src/main/java/org/eclipse/che/plugin/svn/ide/SubversionClientService.java",
"license": "epl-1.0",
"size": 13709
} | [
"org.eclipse.che.api.promises.client.Promise",
"org.eclipse.che.commons.annotation.Nullable",
"org.eclipse.che.ide.api.user.Credentials",
"org.eclipse.che.ide.resource.Path",
"org.eclipse.che.plugin.svn.shared.InfoResponse"
] | import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.commons.annotation.Nullable; import org.eclipse.che.ide.api.user.Credentials; import org.eclipse.che.ide.resource.Path; import org.eclipse.che.plugin.svn.shared.InfoResponse; | import org.eclipse.che.api.promises.client.*; import org.eclipse.che.commons.annotation.*; import org.eclipse.che.ide.api.user.*; import org.eclipse.che.ide.resource.*; import org.eclipse.che.plugin.svn.shared.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,215,231 |
private final String getDateTime() {
final SimpleDateFormat gmtFormat =
new SimpleDateFormat("E, d MMM yyyy HH:mm:ss 'GMT'", Locale.US);
gmtFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
return gmtFormat.format(new Date());
} | final String function() { final SimpleDateFormat gmtFormat = new SimpleDateFormat(STR, Locale.US); gmtFormat.setTimeZone(TimeZone.getTimeZone("GMT")); return gmtFormat.format(new Date()); } | /**
* Get formatted date/time timestamp for http response header.
*
* @return example: Thu, 02 Jan 2014 16:34:42 GMT
*/ | Get formatted date/time timestamp for http response header | getDateTime | {
"repo_name": "PoiXson/NanoHTTPlib",
"path": "core/src/main/java/com/poixson/nanosocket/NanoHTTPserver.java",
"license": "bsd-3-clause",
"size": 26264
} | [
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.Locale",
"java.util.TimeZone"
] | import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 774,742 |
boolean isCompatible(String version) {
// Versions are compatible if they have the same major version no
int currentMajorVersion = NumberUtils.toInt(schemaVersion.substring(0, schemaVersion.indexOf('.')));
int givenMajorVersion = NumberUtils.toInt(version.substring(0, version.indexOf('.')));... | boolean isCompatible(String version) { int currentMajorVersion = NumberUtils.toInt(schemaVersion.substring(0, schemaVersion.indexOf('.'))); int givenMajorVersion = NumberUtils.toInt(version.substring(0, version.indexOf('.'))); return currentMajorVersion == givenMajorVersion; } | /**
* Is the current Index instance compatible with the given version number
*
* @param version The version number to compare the current Index against
*
* @return true if the current major version number is equal to the given
* major version number, otherwise false
*/ | Is the current Index instance compatible with the given version number | isCompatible | {
"repo_name": "eugene7646/autopsy",
"path": "KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/Index.java",
"license": "apache-2.0",
"size": 4930
} | [
"org.apache.commons.lang.math.NumberUtils"
] | import org.apache.commons.lang.math.NumberUtils; | import org.apache.commons.lang.math.*; | [
"org.apache.commons"
] | org.apache.commons; | 545,401 |
int port = System.getenv("PORT") != null
? Integer.parseInt(System.getenv("PORT")) : DEFAULT_PORT;
Spark.port(port);
Spark.before(CorsUtil::headers);
Spark.options("
Spark.after(
(req, res) -> {
res.type("application/json");
});
Spark.after(
... | int port = System.getenv("PORT") != null ? Integer.parseInt(System.getenv("PORT")) : DEFAULT_PORT; Spark.port(port); Spark.before(CorsUtil::headers); Spark.options(STRapplication/jsonSTR/statusSTRstatusSTRokSTR/talk", (req, res) -> { Message user = null; Message bot = null; try { user = new Gson().fromJson(req.body(), ... | /**
* The entry point of the APIs.
* This method activates and runs the server.
* @param args
* Unused arguments.
*/ | The entry point of the APIs. This method activates and runs the server | main | {
"repo_name": "curiosone-bot/curiosone-core",
"path": "src/main/java/com/github/bot/curiosone/api/Main.java",
"license": "mit",
"size": 2275
} | [
"com.github.bot.curiosone.core.workflow.Logic",
"com.github.bot.curiosone.core.workflow.Message",
"com.google.gson.Gson",
"com.google.gson.JsonSyntaxException"
] | import com.github.bot.curiosone.core.workflow.Logic; import com.github.bot.curiosone.core.workflow.Message; import com.google.gson.Gson; import com.google.gson.JsonSyntaxException; | import com.github.bot.curiosone.core.workflow.*; import com.google.gson.*; | [
"com.github.bot",
"com.google.gson"
] | com.github.bot; com.google.gson; | 2,054,232 |
private void insertMusicPath(String path) {
final Directory directory = new Directory(path);
insertDirectory(directory);
} | void function(String path) { final Directory directory = new Directory(path); insertDirectory(directory); } | /**
* Inserts the given path as a default music directory into the DB.
*
* @param path The path to insert into the DB.
*/ | Inserts the given path as a default music directory into the DB | insertMusicPath | {
"repo_name": "larsdroid/Player",
"path": "app/src/main/java/org/willemsens/player/persistence/MusicDao.java",
"license": "mit",
"size": 16507
} | [
"org.willemsens.player.persistence.entities.Directory"
] | import org.willemsens.player.persistence.entities.Directory; | import org.willemsens.player.persistence.entities.*; | [
"org.willemsens.player"
] | org.willemsens.player; | 379,055 |
protected AvailableImplementations createAvailableImplementations() {
AvailableImplementations available = new AvailableImplementationsImpl();
available.register(
DiscountingInterestRateSwapFn.class,
DiscountingInterestRateSwapCalculatorFactory.class,
DiscountingFXForwardYieldCurveNode... | AvailableImplementations function() { AvailableImplementations available = new AvailableImplementationsImpl(); available.register( DiscountingInterestRateSwapFn.class, DiscountingInterestRateSwapCalculatorFactory.class, DiscountingFXForwardYieldCurveNodeSensitivitiesFn.class, DiscountingFXForwardSpotPnLSeriesFn.class, ... | /**
* Create the available implementations.
*
* @return the available implementations, not null
*/ | Create the available implementations | createAvailableImplementations | {
"repo_name": "jeorme/OG-Platform",
"path": "sesame/sesame-component/src/test/java/com/opengamma/sesame/component/RecordingDataTest.java",
"license": "apache-2.0",
"size": 20398
} | [
"com.opengamma.financial.analytics.conversion.FXForwardSecurityConverter",
"com.opengamma.financial.analytics.curve.ConfigDBCurveConstructionConfigurationSource",
"com.opengamma.financial.analytics.curve.exposure.ConfigDBInstrumentExposuresProvider",
"com.opengamma.sesame.CurveDefinitionCurveLabellingFn",
"... | import com.opengamma.financial.analytics.conversion.FXForwardSecurityConverter; import com.opengamma.financial.analytics.curve.ConfigDBCurveConstructionConfigurationSource; import com.opengamma.financial.analytics.curve.exposure.ConfigDBInstrumentExposuresProvider; import com.opengamma.sesame.CurveDefinitionCurveLabell... | import com.opengamma.financial.analytics.conversion.*; import com.opengamma.financial.analytics.curve.*; import com.opengamma.financial.analytics.curve.exposure.*; import com.opengamma.sesame.*; import com.opengamma.sesame.equity.*; import com.opengamma.sesame.function.*; import com.opengamma.sesame.fxforward.*; import... | [
"com.opengamma.financial",
"com.opengamma.sesame"
] | com.opengamma.financial; com.opengamma.sesame; | 1,798,086 |
Table override = c.getAnnotation(Table.class);
if (override != null && override.value().length() <= 0) throw new IllegalArgumentException(c + " has a Table annotation with an empty name");
return (override == null) ? c.getSimpleName() : override.value();
}
/**
* Returns the name of the column associated with... | Table override = c.getAnnotation(Table.class); if (override != null && override.value().length() <= 0) throw new IllegalArgumentException(c + STR); return (override == null) ? c.getSimpleName() : override.value(); } /** * Returns the name of the column associated with field {@code f}. * Column name defaults to the name... | /**
* Returns the name of the table associated with class {@code c}.
* Table name defaults to the name of the class, but may be customized with the {@link Table} annotation.
* @param c class to get table name for
* @return name of table matching {@code c}
* @see Table
*/ | Returns the name of the table associated with class c. Table name defaults to the name of the class, but may be customized with the <code>Table</code> annotation | getName | {
"repo_name": "kkorolyov/SQLOb",
"path": "src/main/java/dev/kkorolyov/sqlob/util/PersistenceHelper.java",
"license": "bsd-3-clause",
"size": 2941
} | [
"dev.kkorolyov.sqlob.annotation.Column",
"dev.kkorolyov.sqlob.annotation.Table"
] | import dev.kkorolyov.sqlob.annotation.Column; import dev.kkorolyov.sqlob.annotation.Table; | import dev.kkorolyov.sqlob.annotation.*; | [
"dev.kkorolyov.sqlob"
] | dev.kkorolyov.sqlob; | 1,031,120 |
public Event newEvent(String event, String resource, boolean modify)
{
return new BaseEvent(event, resource, modify, NotificationService.NOTI_OPTIONAL, null);
} | Event function(String event, String resource, boolean modify) { return new BaseEvent(event, resource, modify, NotificationService.NOTI_OPTIONAL, null); } | /**
* Construct a Event object.
*
* @param event
* The Event id.
* @param resource
* The resource reference.
* @param modify
* Set to true if this event caused a resource modification, false if it was just an access.
* @return A new Event object that can be used with this service.... | Construct a Event object | newEvent | {
"repo_name": "OpenCollabZA/sakai",
"path": "kernel/kernel-impl/src/main/java/org/sakaiproject/event/impl/BaseEventTrackingService.java",
"license": "apache-2.0",
"size": 23732
} | [
"org.sakaiproject.event.api.Event",
"org.sakaiproject.event.api.NotificationService"
] | import org.sakaiproject.event.api.Event; import org.sakaiproject.event.api.NotificationService; | import org.sakaiproject.event.api.*; | [
"org.sakaiproject.event"
] | org.sakaiproject.event; | 344,531 |
public void testSet() {
final ListIterator<E> it = makeObject();
if (!supportsSet()) {
// check for UnsupportedOperationException if not supported
try {
it.set(addSetValue());
} catch (final UnsupportedOperationException ex) {}
return;... | void function() { final ListIterator<E> it = makeObject(); if (!supportsSet()) { try { it.set(addSetValue()); } catch (final UnsupportedOperationException ex) {} return; } try { it.set(addSetValue()); fail(); } catch (final IllegalStateException ex) {} it.next(); it.set(addSetValue()); it.set(addSetValue()); } | /**
* Test set behaviour.
*/ | Test set behaviour | testSet | {
"repo_name": "MuShiiii/commons-collections",
"path": "src/test/java/org/apache/commons/collections4/iterators/AbstractListIteratorTest.java",
"license": "apache-2.0",
"size": 8008
} | [
"java.util.ListIterator"
] | import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,719,044 |
public void testContentModelElement004() {
dtd = new DTDGetter("TestContentModelSemantic");
ContentModel cm2 = new ContentModel('*', new ContentModel());
BitSet bs1 = new BitSet(128);
bs1.set(1);
BitSet bs2 = new BitSet(7);
AttributeList al = new AttributeList("... | void function() { dtd = new DTDGetter(STR); ContentModel cm2 = new ContentModel('*', new ContentModel()); BitSet bs1 = new BitSet(128); bs1.set(1); BitSet bs2 = new BitSet(7); AttributeList al = new AttributeList("bigC", -2147483648, -1, "value", new Vector(), new AttributeList(null)); Element el = dtd.defineElement(""... | /**
* Test method for
* 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)'*
* ContentModel(Element( "",',',false,false,('*',new
* ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new
* Vector(),new AttributeLi... | Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(Element)' ContentModel(Element( "",',',false,false,('*',new ContentModel()),BitSet(128).set(1),BitSet(7),AttributeList("bigC",-2147483648,-1,"value",new Vector(),new AttributeList(null)) . It checks if an instance is creat... | testContentModelElement004 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/swing/src/test/api/java.injected/org/apache/harmony/swing/tests/javax/swing/text/parser/ContentModelCompatilityTest.java",
"license": "gpl-2.0",
"size": 153261
} | [
"java.util.BitSet",
"java.util.Vector",
"javax.swing.text.html.parser.AttributeList",
"javax.swing.text.html.parser.ContentModel",
"javax.swing.text.html.parser.Element",
"javax.swing.text.parser.utils.DTDGetter"
] | import java.util.BitSet; import java.util.Vector; import javax.swing.text.html.parser.AttributeList; import javax.swing.text.html.parser.ContentModel; import javax.swing.text.html.parser.Element; import javax.swing.text.parser.utils.DTDGetter; | import java.util.*; import javax.swing.text.html.parser.*; import javax.swing.text.parser.utils.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 2,386,959 |
void fireActionPerformed()
{
fireActionPerformed(new ActionEvent(this, ticks++, "Timer"));
} | void fireActionPerformed() { fireActionPerformed(new ActionEvent(this, ticks++, "Timer")); } | /**
* Fire the action event, named "Timer" and having the numeric
* identifier, equal to the numer of events that have been
* already fired before.
*/ | Fire the action event, named "Timer" and having the numeric identifier, equal to the numer of events that have been already fired before | fireActionPerformed | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/javax/swing/Timer.java",
"license": "gpl-2.0",
"size": 12727
} | [
"java.awt.event.ActionEvent"
] | import java.awt.event.ActionEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 128,073 |
public void doTestTableScanners() throws Exception {
// Setup
ThriftServerRunner.HBaseHandler handler =
new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration());
handler.createTable(tableAname, getColumnDescriptors());
// Apply timestamped Mutations to rowA
long time1 = System.currentTi... | void function() throws Exception { ThriftServerRunner.HBaseHandler handler = new ThriftServerRunner.HBaseHandler(UTIL.getConfiguration()); handler.createTable(tableAname, getColumnDescriptors()); long time1 = System.currentTimeMillis(); handler.mutateRowTs(tableAname, rowAname, getMutations(), time1, null); Thread.slee... | /**
* Tests the four different scanner-opening methods (with and without
* a stoprow, with and without a timestamp).
*
* @throws Exception
*/ | Tests the four different scanner-opening methods (with and without a stoprow, with and without a timestamp) | doTestTableScanners | {
"repo_name": "intel-hadoop/hbase-rhino",
"path": "hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java",
"license": "apache-2.0",
"size": 31989
} | [
"java.nio.ByteBuffer",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hbase.thrift.ThriftServerRunner",
"org.apache.hadoop.hbase.thrift.generated.Mutation",
"org.apache.hadoop.hbase.thrift.generated.TRowResult",
"org.apache.hadoop.hbase.thrift.generated.TScan",
"org.apache.hadoop.hbase.ut... | import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.thrift.ThriftServerRunner; import org.apache.hadoop.hbase.thrift.generated.Mutation; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.thrift.generated.TScan; import org... | import java.nio.*; import java.util.*; import org.apache.hadoop.hbase.thrift.*; import org.apache.hadoop.hbase.thrift.generated.*; import org.apache.hadoop.hbase.util.*; import org.junit.*; | [
"java.nio",
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.nio; java.util; org.apache.hadoop; org.junit; | 21,919 |
public void drawResultBitmap(Bitmap barcode) {
resultBitmap = barcode;
invalidate();
} | void function(Bitmap barcode) { resultBitmap = barcode; invalidate(); } | /**
* Draw a bitmap with the result points highlighted instead of the live
* scanning display.
*
* @param barcode
* An image of the decoded barcode.
*/ | Draw a bitmap with the result points highlighted instead of the live scanning display | drawResultBitmap | {
"repo_name": "lab702-flyme/sweo_android",
"path": "app/src/main/java/view/ViewfinderView.java",
"license": "apache-2.0",
"size": 8017
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 934,046 |
public void getColumns(List<String> columns) {
if (_children == null || _children.isEmpty()) {
if (_expressionType == ExpressionType.IDENTIFIER) {
columns.add(_expression);
}
return;
}
for (TransformExpressionTree child : _children) {
child.getColumns(columns);
}
} | void function(List<String> columns) { if (_children == null _children.isEmpty()) { if (_expressionType == ExpressionType.IDENTIFIER) { columns.add(_expression); } return; } for (TransformExpressionTree child : _children) { child.getColumns(columns); } } | /**
* Returns a list of columns from the leaf nodes of the tree.
* Caller passes a list where columns are stored and returned.
*
* @param columns Output columns
*/ | Returns a list of columns from the leaf nodes of the tree. Caller passes a list where columns are stored and returned | getColumns | {
"repo_name": "sajavadi/pinot",
"path": "pinot-common/src/main/java/com/linkedin/pinot/common/request/transform/TransformExpressionTree.java",
"license": "apache-2.0",
"size": 5021
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,507,859 |
@Override
public Long getUserActiveTeamId() {
final Team team = this.getUserActiveTeam();
if (team == null) {
return null;
}
return team.getId();
} | Long function() { final Team team = this.getUserActiveTeam(); if (team == null) { return null; } return team.getId(); } | /**
* Method that return the active team of the current connected user
*
* @return Team the active team id
*/ | Method that return the active team of the current connected user | getUserActiveTeamId | {
"repo_name": "ama-axelor/axelor-business-suite",
"path": "axelor-base/src/main/java/com/axelor/apps/base/service/user/UserServiceImpl.java",
"license": "agpl-3.0",
"size": 10336
} | [
"com.axelor.team.db.Team"
] | import com.axelor.team.db.Team; | import com.axelor.team.db.*; | [
"com.axelor.team"
] | com.axelor.team; | 1,344,121 |
public void testFieldsCannotBeSetToNull() {
SimpleQueryStringBuilder qb = createTestQueryBuilder();
try {
qb.fields(null);
fail("Expected NullPointerException");
} catch (NullPointerException e) {
assertThat(e.getMessage(), is("fields cannot be null"));
... | void function() { SimpleQueryStringBuilder qb = createTestQueryBuilder(); try { qb.fields(null); fail(STR); } catch (NullPointerException e) { assertThat(e.getMessage(), is(STR)); } } | /**
* The following should fail fast - never silently set the map containing
* fields and weights to null but refuse to accept null instead.
* */ | The following should fail fast - never silently set the map containing fields and weights to null but refuse to accept null instead | testFieldsCannotBeSetToNull | {
"repo_name": "socialrank/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/index/query/SimpleQueryStringBuilderTests.java",
"license": "apache-2.0",
"size": 16903
} | [
"org.hamcrest.Matchers"
] | import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 2,685,195 |
protected void checkExpandedCustomNodes() {
TreeItemIdNode custom = getCustomTree();
if (custom == null) {
return;
}
// Get the expanded rows
Set<String> expanded = getExpandedRows();
// Process Top Level
for (TreeItemIdNode node : custom.getChildren()) {
processCheckExpandedCustom... | void function() { TreeItemIdNode custom = getCustomTree(); if (custom == null) { return; } Set<String> expanded = getExpandedRows(); for (TreeItemIdNode node : custom.getChildren()) { processCheckExpandedCustomNodes(node, expanded); } } /** * {@inheritDoc} | /**
* Check if custom nodes that are expanded need their child nodes added from the model.
*/ | Check if custom nodes that are expanded need their child nodes added from the model | checkExpandedCustomNodes | {
"repo_name": "Joshua-Barclay/wcomponents",
"path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WTree.java",
"license": "gpl-3.0",
"size": 39637
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,073,678 |
public KualiDecimal getFinancialDocumentFiveDollarAmount() {
return financialDocumentFiveDollarAmount;
} | KualiDecimal function() { return financialDocumentFiveDollarAmount; } | /**
* Gets the financialDocumentFiveDollarAmount attribute.
* @return Returns the financialDocumentFiveDollarAmount.
*/ | Gets the financialDocumentFiveDollarAmount attribute | getFinancialDocumentFiveDollarAmount | {
"repo_name": "ua-eas/kfs-devops-automation-fork",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/CashManagementDocument.java",
"license": "agpl-3.0",
"size": 30786
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 1,501,659 |
public static int[] calcSortOrder(final int[] arr1, final int[] arr2, int length) {
if (arr1.length < length || arr2.length < length)
throw new IllegalArgumentException("Arrays must not be shorter than given length");
IndirectComparator comp = (indexA, indexB) -> {
final int ... | static int[] function(final int[] arr1, final int[] arr2, int length) { if (arr1.length < length arr2.length < length) throw new IllegalArgumentException(STR); IndirectComparator comp = (indexA, indexB) -> { final int arr1cmp = Integer.compare(arr1[indexA], arr1[indexB]); return arr1cmp != 0 ? arr1cmp : Integer.compare... | /**
* This method calculates the sort order of the first {@param length} element-pairs given by two arrays.
* The order is chosen such that it sorts the element-pairs first by the first and second by the second array.
* The input arrays are not manipulated by this method.
*
* @param length must... | This method calculates the sort order of the first length element-pairs given by two arrays. The order is chosen such that it sorts the element-pairs first by the first and second by the second array. The input arrays are not manipulated by this method | calcSortOrder | {
"repo_name": "routexl/graphhopper",
"path": "core/src/main/java/com/graphhopper/util/ArrayUtil.java",
"license": "apache-2.0",
"size": 9194
} | [
"com.carrotsearch.hppc.sorting.IndirectComparator",
"com.carrotsearch.hppc.sorting.IndirectSort"
] | import com.carrotsearch.hppc.sorting.IndirectComparator; import com.carrotsearch.hppc.sorting.IndirectSort; | import com.carrotsearch.hppc.sorting.*; | [
"com.carrotsearch.hppc"
] | com.carrotsearch.hppc; | 486,487 |
public static int[] deserialize(final InputStream inputStream) throws IOException {
final byte[] sizeAr = new byte[INT_SIZE];
inputStream.read(sizeAr);
int size = ByteBuffer.wrap(sizeAr).asIntBuffer().get();
final byte[] imageAr = new byte[size];
// Wait until we've received... | static int[] function(final InputStream inputStream) throws IOException { final byte[] sizeAr = new byte[INT_SIZE]; inputStream.read(sizeAr); int size = ByteBuffer.wrap(sizeAr).asIntBuffer().get(); final byte[] imageAr = new byte[size]; while (inputStream.available() < size) { ; } inputStream.read(imageAr); final Buffe... | /**
* Deserialize a message over the socket into full blown image data.
*
* @param inputStream
* @return
*/ | Deserialize a message over the socket into full blown image data | deserialize | {
"repo_name": "rap2363/WhiteRaven",
"path": "src/main/java/web/transport/ImageMessage.java",
"license": "mit",
"size": 3111
} | [
"java.awt.Graphics2D",
"java.awt.image.BufferedImage",
"java.awt.image.DataBufferInt",
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.nio.ByteBuffer",
"javax.imageio.ImageIO"
] | import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import javax.imageio.ImageIO; | import java.awt.*; import java.awt.image.*; import java.io.*; import java.nio.*; import javax.imageio.*; | [
"java.awt",
"java.io",
"java.nio",
"javax.imageio"
] | java.awt; java.io; java.nio; javax.imageio; | 1,044,064 |
public Set<String> getAggregatedTypes() {
return aggregatedTypes;
} | Set<String> function() { return aggregatedTypes; } | /**
* Contains the types that aggregating annotation processors registered themselves for.
* These types need to be reprocessed no matter what source changes are made to ensure that the generated types contain all relevant information.
*/ | Contains the types that aggregating annotation processors registered themselves for. These types need to be reprocessed no matter what source changes are made to ensure that the generated types contain all relevant information | getAggregatedTypes | {
"repo_name": "gradle/gradle",
"path": "subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/incremental/processing/AnnotationProcessingResult.java",
"license": "apache-2.0",
"size": 4623
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,256,083 |
public static void dropTestSequences(Database database, String... sequenceNames) {
for (String sequenceName : sequenceNames) {
try {
String correctCaseSequenceName = database.toCorrectCaseIdentifier(sequenceName);
database.dropSequence(database.getDefaultSchem... | static void function(Database database, String... sequenceNames) { for (String sequenceName : sequenceNames) { try { String correctCaseSequenceName = database.toCorrectCaseIdentifier(sequenceName); database.dropSequence(database.getDefaultSchemaName(), correctCaseSequenceName); } catch (DbMaintainException e) { } } } | /**
* Drops the test sequence
*
* @param database The database, not null
* @param sequenceNames The sequences to drop
*/ | Drops the test sequence | dropTestSequences | {
"repo_name": "intouchfollowup/dbmaintain",
"path": "dbmaintain/src/test/java/org/dbmaintain/util/SQLTestUtils.java",
"license": "apache-2.0",
"size": 10960
} | [
"org.dbmaintain.database.Database"
] | import org.dbmaintain.database.Database; | import org.dbmaintain.database.*; | [
"org.dbmaintain.database"
] | org.dbmaintain.database; | 2,044,453 |
Observable<ServiceResponse<LocalDate>> getUnderflowDateWithServiceResponseAsync(); | Observable<ServiceResponse<LocalDate>> getUnderflowDateWithServiceResponseAsync(); | /**
* Get underflow date value.
*
* @return the observable to the LocalDate object
*/ | Get underflow date value | getUnderflowDateWithServiceResponseAsync | {
"repo_name": "yugangw-msft/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydate/Dates.java",
"license": "mit",
"size": 7371
} | [
"com.microsoft.rest.ServiceResponse",
"org.joda.time.LocalDate"
] | import com.microsoft.rest.ServiceResponse; import org.joda.time.LocalDate; | import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.rest; org.joda.time; | 2,841,933 |
Request deleteLiveLogJob(final String sessionId, final String jobId, AsyncCallback<Boolean> callback); | Request deleteLiveLogJob(final String sessionId, final String jobId, AsyncCallback<Boolean> callback); | /**
* Clean the remote live log object
* @param sessionId current session id
* @param jobId id of the job for which live logs should be cleaned
*/ | Clean the remote live log object | deleteLiveLogJob | {
"repo_name": "ow2-proactive/scheduling-portal",
"path": "scheduler-portal/src/main/java/org/ow2/proactive_grid_cloud_portal/scheduler/client/SchedulerServiceAsync.java",
"license": "agpl-3.0",
"size": 20554
} | [
"com.google.gwt.http.client.Request",
"com.google.gwt.user.client.rpc.AsyncCallback"
] | import com.google.gwt.http.client.Request; import com.google.gwt.user.client.rpc.AsyncCallback; | import com.google.gwt.http.client.*; import com.google.gwt.user.client.rpc.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,342,621 |
LOGGER.error("Error: {}", e.getMessage(), e);
return new ErrorBuilder()
.status(Status.FORBIDDEN)
.simpleMessage(e.getMessage())
.detailMessage(ExceptionUtils.getStackTrace(e))
.build();
}
/**
* Create an {@link uk.gov.gchq.gaffer.cor... | LOGGER.error(STR, e.getMessage(), e); return new ErrorBuilder() .status(Status.FORBIDDEN) .simpleMessage(e.getMessage()) .detailMessage(ExceptionUtils.getStackTrace(e)) .build(); } /** * Create an {@link uk.gov.gchq.gaffer.core.exception.Error} object from a * {@link uk.gov.gchq.gaffer.core.exception.GafferCheckedExcep... | /**
* Create an {@link uk.gov.gchq.gaffer.core.exception.Error} object from an
* {@link UnauthorisedException}.
*
* @param e the exception object
* @return a newly constructed {@link uk.gov.gchq.gaffer.core.exception.Error}
*/ | Create an <code>uk.gov.gchq.gaffer.core.exception.Error</code> object from an <code>UnauthorisedException</code> | from | {
"repo_name": "GovernmentCommunicationsHeadquarters/Gaffer",
"path": "core/exception/src/main/java/uk/gov/gchq/gaffer/core/exception/ErrorFactory.java",
"license": "apache-2.0",
"size": 4227
} | [
"org.apache.commons.lang3.exception.ExceptionUtils",
"uk.gov.gchq.gaffer.core.exception.Error"
] | import org.apache.commons.lang3.exception.ExceptionUtils; import uk.gov.gchq.gaffer.core.exception.Error; | import org.apache.commons.lang3.exception.*; import uk.gov.gchq.gaffer.core.exception.*; | [
"org.apache.commons",
"uk.gov.gchq"
] | org.apache.commons; uk.gov.gchq; | 1,826,321 |
public boolean writeDeliveryToFedora(DeliveryTitleInfo deli, boolean force) throws JAXBException {
ByteArrayOutputStream os = MarshallerFunctions.marshallDeliveryTitleInfo(deli);
return writeToCurrentItemInFedora(deli.getDeliveryName(), deli.getNewspaperTitle(), os.toByteArray(), force);
} | boolean function(DeliveryTitleInfo deli, boolean force) throws JAXBException { ByteArrayOutputStream os = MarshallerFunctions.marshallDeliveryTitleInfo(deli); return writeToCurrentItemInFedora(deli.getDeliveryName(), deli.getNewspaperTitle(), os.toByteArray(), force); } | /**
* Write the delivery to the title-object in fedora
*
* @param deli
* @return
*
* @throws JAXBException
*/ | Write the delivery to the title-object in fedora | writeDeliveryToFedora | {
"repo_name": "statsbiblioteket/digital-pligtaflevering-aviser-tools",
"path": "tools/dpa-manualcontrol/src/main/java/org/statsbiblioteket/digital_pligtaflevering_aviser/ui/datamodel/serializers/DeliveryFedoraCommunication.java",
"license": "apache-2.0",
"size": 14786
} | [
"java.io.ByteArrayOutputStream",
"javax.xml.bind.JAXBException",
"org.statsbiblioteket.digital_pligtaflevering_aviser.ui.datamodel.DeliveryTitleInfo"
] | import java.io.ByteArrayOutputStream; import javax.xml.bind.JAXBException; import org.statsbiblioteket.digital_pligtaflevering_aviser.ui.datamodel.DeliveryTitleInfo; | import java.io.*; import javax.xml.bind.*; import org.statsbiblioteket.digital_pligtaflevering_aviser.ui.datamodel.*; | [
"java.io",
"javax.xml",
"org.statsbiblioteket.digital_pligtaflevering_aviser"
] | java.io; javax.xml; org.statsbiblioteket.digital_pligtaflevering_aviser; | 155,595 |
private Set<int[]> extractPositions(Set<Object> value) {
final Set<int[]> res = new LinkedHashSet<int[]>();
for (Object object : value) {
res.add((int[])object);
}
return res;
} | Set<int[]> function(Set<Object> value) { final Set<int[]> res = new LinkedHashSet<int[]>(); for (Object object : value) { res.add((int[])object); } return res; } | /**
* Casts the given {@link Set} of {@link Object} which are indead int[].
*
* @param value
* the {@link Set} of {@link Object} which are indead int[]
* @return the {@link Set} of int[]
*/ | Casts the given <code>Set</code> of <code>Object</code> which are indead int[] | extractPositions | {
"repo_name": "ModelWriter/Source",
"path": "plugins/eu.modelwriter.semantic/src/eu/modelwriter/semantic/internal/SemanticAnnotator.java",
"license": "epl-1.0",
"size": 14708
} | [
"java.util.LinkedHashSet",
"java.util.Set"
] | import java.util.LinkedHashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 41,548 |
private void addNestedFieldExamples() {
add(new WHeading(HeadingLevel.H2, "Label nesting which is technically OK"));
WPanel errorLayoutPanel = new WPanel();
errorLayoutPanel.setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.LARGE));
errorLayoutPanel.setMargin(new Margin(null, null, Size.XL, null));
add... | void function() { add(new WHeading(HeadingLevel.H2, STR)); WPanel errorLayoutPanel = new WPanel(); errorLayoutPanel.setLayout(new FlowLayout(FlowLayout.VERTICAL, Size.LARGE)); errorLayoutPanel.setMargin(new Margin(null, null, Size.XL, null)); add(errorLayoutPanel); errorLayoutPanel.add(new ExplanatoryText(STR + STR)); ... | /**
* Examples showing WLabel with a nested input control WComponent.
* This is VERY dangerous as only a very few WComponents are valid for this scenario. If you go down this route: stop!!
* These are really here for framework testing, not as examples as to how to do things.
*/ | Examples showing WLabel with a nested input control WComponent. This is VERY dangerous as only a very few WComponents are valid for this scenario. If you go down this route: stop!! These are really here for framework testing, not as examples as to how to do things | addNestedFieldExamples | {
"repo_name": "marksreeves/wcomponents",
"path": "wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/theme/WLabelExample.java",
"license": "gpl-3.0",
"size": 13936
} | [
"com.github.bordertech.wcomponents.HeadingLevel",
"com.github.bordertech.wcomponents.Margin",
"com.github.bordertech.wcomponents.Size",
"com.github.bordertech.wcomponents.WHeading",
"com.github.bordertech.wcomponents.WLabel",
"com.github.bordertech.wcomponents.WPanel",
"com.github.bordertech.wcomponents... | import com.github.bordertech.wcomponents.HeadingLevel; import com.github.bordertech.wcomponents.Margin; import com.github.bordertech.wcomponents.Size; import com.github.bordertech.wcomponents.WHeading; import com.github.bordertech.wcomponents.WLabel; import com.github.bordertech.wcomponents.WPanel; import com.github.bo... | import com.github.bordertech.wcomponents.*; import com.github.bordertech.wcomponents.examples.common.*; import com.github.bordertech.wcomponents.layout.*; | [
"com.github.bordertech"
] | com.github.bordertech; | 757,823 |
public void publish(final String channel, final String message) {
publish(Collections.singleton(channel), Collections.singletonList(message));
} | void function(final String channel, final String message) { publish(Collections.singleton(channel), Collections.singletonList(message)); } | /**
* Sugar method for publishing a single message to a single channel.
* @param channel to publish to.
* @param message sent to channel.
*/ | Sugar method for publishing a single message to a single channel | publish | {
"repo_name": "lithiumtech/rdbi",
"path": "rdbi-recipes/src/main/java/com/lithium/dbi/rdbi/recipes/channel/ChannelPublisher.java",
"license": "apache-2.0",
"size": 4583
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,750,908 |
public void start() {
reactorMain.execute(() -> {
try {
LOGGER.info("Reactor started, waiting for events...");
eventLoop();
} catch (IOException e) {
LOGGER.error("exception in event loop", e);
}
});
} | void function() { reactorMain.execute(() -> { try { LOGGER.info(STR); eventLoop(); } catch (IOException e) { LOGGER.error(STR, e); } }); } | /**
* Starts the reactor event loop in a new thread.
*/ | Starts the reactor event loop in a new thread | start | {
"repo_name": "italoag/java-design-patterns",
"path": "reactor/src/main/java/com/iluwatar/reactor/framework/NioReactor.java",
"license": "mit",
"size": 9422
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,540,056 |
public MinecraftServer getServer()
{
return player.getServer();
}
};
minecraftserver.getFunctionManager().execute(functionobject, icommandsender);
}
} | MinecraftServer function() { return player.getServer(); } }; minecraftserver.getFunctionManager().execute(functionobject, icommandsender); } } | /**
* Get the Minecraft server instance
*/ | Get the Minecraft server instance | getServer | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/advancements/AdvancementRewards.java",
"license": "gpl-3.0",
"size": 9408
} | [
"net.minecraft.server.MinecraftServer"
] | import net.minecraft.server.MinecraftServer; | import net.minecraft.server.*; | [
"net.minecraft.server"
] | net.minecraft.server; | 894,117 |
private Member getConstructorOrMethod(String name, boolean searchSuperTypes,
boolean publicOnly, Class<?>[] parameterTypes) throws NoSuchMethodException {
if (searchSuperTypes && !publicOnly) {
throw new AssertionError(); // can't lookup non-public members recursively
}
... | Member function(String name, boolean searchSuperTypes, boolean publicOnly, Class<?>[] parameterTypes) throws NoSuchMethodException { if (searchSuperTypes && !publicOnly) { throw new AssertionError(); } if (name == null) { throw new NullPointerException(STR); } if (parameterTypes == null) { parameterTypes = EmptyArray.C... | /**
* Returns a constructor or method with the given name. Use "<init>" to return a constructor.
*/ | Returns a constructor or method with the given name. Use "" to return a constructor | getConstructorOrMethod | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/java/lang/Class.java",
"license": "apache-2.0",
"size": 51633
} | [
"java.lang.reflect.Member",
"java.lang.reflect.Modifier",
"java.util.Arrays"
] | import java.lang.reflect.Member; import java.lang.reflect.Modifier; import java.util.Arrays; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,725,822 |
final OrderedCurrencyPair test = OrderedCurrencyPair.of(Currency.GBP, Currency.USD);
assertEquals(Currency.GBP, test.getFirstCurrency());
assertEquals(Currency.USD, test.getSecondCurrency());
assertEquals("OrderedCurrencyPair{firstCurrency=GBP, secondCurrency=USD}", test.toString());
} | final OrderedCurrencyPair test = OrderedCurrencyPair.of(Currency.GBP, Currency.USD); assertEquals(Currency.GBP, test.getFirstCurrency()); assertEquals(Currency.USD, test.getSecondCurrency()); assertEquals(STR, test.toString()); } | /**
* Tests construction from two currencies.
*/ | Tests construction from two currencies | testOfCurrencyCurrencyOrder1 | {
"repo_name": "McLeodMoores/starling",
"path": "projects/util/src/test/java/com/opengamma/util/money/OrderedCurrencyPairTest.java",
"license": "apache-2.0",
"size": 6265
} | [
"org.testng.Assert"
] | import org.testng.Assert; | import org.testng.*; | [
"org.testng"
] | org.testng; | 2,532,237 |
public static String getMessageJSON(Exception exception, String endClass) {
// START BUILD JSON
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JSONObject jsonobj_error = new JSONObject(); // {}
JSONObject jsonobj_error_data = new JSONObject(); // {}
JSONArra... | static String function(Exception exception, String endClass) { Gson gson = new GsonBuilder().setPrettyPrinting().create(); JSONObject jsonobj_error = new JSONObject(); JSONObject jsonobj_error_data = new JSONObject(); JSONArray jsonarray_element = new JSONArray(); for (StackTraceElement element : exception.getStackTrac... | /**
* JSON ERROR MESSAGE for catch exceptions
*
* @param exception
* @param endClass
* @return error message JSON
*/ | JSON ERROR MESSAGE for catch exceptions | getMessageJSON | {
"repo_name": "mainzed/labelingsystem-server",
"path": "api/src/main/java/exceptions/Logging.java",
"license": "mit",
"size": 4227
} | [
"com.google.gson.Gson",
"com.google.gson.GsonBuilder",
"org.json.simple.JSONArray",
"org.json.simple.JSONObject"
] | import com.google.gson.Gson; import com.google.gson.GsonBuilder; import org.json.simple.JSONArray; import org.json.simple.JSONObject; | import com.google.gson.*; import org.json.simple.*; | [
"com.google.gson",
"org.json.simple"
] | com.google.gson; org.json.simple; | 505,602 |
public void testRequestClasspathContainerUpdate() throws CoreException {
IJavaProject testProject = getTestProject();
IClasspathContainer classpathContainer = JavaCore.getClasspathContainer(
defaultRuntimePath, testProject);
final List<IClasspathEntry> newClasspathEntries = new ArrayList<IClassp... | void function() throws CoreException { IJavaProject testProject = getTestProject(); IClasspathContainer classpathContainer = JavaCore.getClasspathContainer( defaultRuntimePath, testProject); final List<IClasspathEntry> newClasspathEntries = new ArrayList<IClasspathEntry>(); IClasspathEntry[] classpathEntries = classpat... | /**
* TODO: We need to revisit this test. Since we don't allow container updates
* right now, it is not clear that the test is sufficiently strong.
*/ | right now, it is not clear that the test is sufficiently strong | testRequestClasspathContainerUpdate | {
"repo_name": "briandealwis/gwt-eclipse-plugin",
"path": "plugins/com.gwtplugins.gwt.eclipse.core.test/src/com/google/gwt/eclipse/core/runtime/GWTRuntimeContainerInitializerTest.java",
"license": "epl-1.0",
"size": 7692
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.Path",
"org.eclipse.jdt.core.IClasspathAttribute",
"org.eclipse.jdt.core.IClasspathContainer",
"org.eclipse.jdt.core.IClasspathEntry",
"org.eclipse.jdt.core.... | import java.util.ArrayList; import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IClasspathAttribute; import org.eclipse.jdt.core.IClasspathContainer; import org.eclipse.jdt.core.IClasspathEntry; im... | import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; | [
"java.util",
"org.eclipse.core",
"org.eclipse.jdt"
] | java.util; org.eclipse.core; org.eclipse.jdt; | 964,461 |
private static void fillVMAddresses(HotSpotVMConfigStore config) {
for (VMField vmField : config.getFields().values()) {
if (vmField.value != null && vmField.value instanceof Long) {
final long address = (Long) vmField.value;
String value = vmField.name;
... | static void function(HotSpotVMConfigStore config) { for (VMField vmField : config.getFields().values()) { if (vmField.value != null && vmField.value instanceof Long) { final long address = (Long) vmField.value; String value = vmField.name; if (address != 0) { vmAddresses.put(address, value); } } } for (Entry<String, Lo... | /**
* Returns a value-name map of all {@link VMField} fields.
*/ | Returns a value-name map of all <code>VMField</code> fields | fillVMAddresses | {
"repo_name": "md-5/jdk10",
"path": "src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/DataBuilder.java",
"license": "gpl-2.0",
"size": 9240
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 584,382 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<VirtualHubInner> listByResourceGroup(String resourceGroupName); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<VirtualHubInner> listByResourceGroup(String resourceGroupName); | /**
* Lists all the VirtualHubs in a resource group.
*
* @param resourceGroupName The resource group name of the VirtualHub.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is re... | Lists all the VirtualHubs in a resource group | listByResourceGroup | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/VirtualHubsClient.java",
"license": "mit",
"size": 30840
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.network.fluent.models.VirtualHubInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.network.fluent.models.VirtualHubInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,573,412 |
private boolean contains(BratBaseRelation r1, BratBaseRelation r2,
BratDocument doc1, BratDocument doc2) {
for (String role1 : r1.getArguments().keySet()) {
String argId1 = r1.getArgId(role1);
checkArgument(
argId1.length() > 0 && argId1.charAt(0) == 'T',
"Does ... | boolean function(BratBaseRelation r1, BratBaseRelation r2, BratDocument doc1, BratDocument doc2) { for (String role1 : r1.getArguments().keySet()) { String argId1 = r1.getArgId(role1); checkArgument( argId1.length() > 0 && argId1.charAt(0) == 'T', STR, r1); if (!r2.containsRole(role1)) { return false; } String argId2 =... | /**
* for every role:arg in r1, r2 contains role:arg
*/ | for every role:arg in r1, r2 contains role:arg | contains | {
"repo_name": "yfpeng/pengyifan-brat",
"path": "src/main/java/com/pengyifan/brat/util/BratMerge.java",
"license": "bsd-3-clause",
"size": 10076
} | [
"com.google.common.base.Preconditions",
"com.pengyifan.brat.BratBaseRelation",
"com.pengyifan.brat.BratDocument",
"com.pengyifan.brat.BratEntity"
] | import com.google.common.base.Preconditions; import com.pengyifan.brat.BratBaseRelation; import com.pengyifan.brat.BratDocument; import com.pengyifan.brat.BratEntity; | import com.google.common.base.*; import com.pengyifan.brat.*; | [
"com.google.common",
"com.pengyifan.brat"
] | com.google.common; com.pengyifan.brat; | 1,945,609 |
public synchronized void mark(final int limit) {
try {
in.mark(limit);
} catch (IOException ioe) {
throw new RuntimeException(ioe.getMessage());
}
} | synchronized void function(final int limit) { try { in.mark(limit); } catch (IOException ioe) { throw new RuntimeException(ioe.getMessage()); } } | /**
* Marks the read limit of the Reader.
*
* @param limit the maximum limit of bytes that can be read before the
* mark position becomes invalid
*/ | Marks the read limit of the Reader | mark | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/drools-master/drools-core/src/main/java/org/drools/core/io/impl/ReaderInputStream.java",
"license": "mit",
"size": 5939
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,777,567 |
private void smartPut(HashMap<URI, Model> map, URI key, Statement s) {
if (map.containsKey(key))
map.get(key).add(s);
else {
Model m = new LinkedHashModel();
m.add(s);
map.put(key, m);
}
} | void function(HashMap<URI, Model> map, URI key, Statement s) { if (map.containsKey(key)) map.get(key).add(s); else { Model m = new LinkedHashModel(); m.add(s); map.put(key, m); } } | /**
* quick function to support multiple statements linked to one md5sum
*
* @param map
* @param key
* @param s
*/ | quick function to support multiple statements linked to one md5sum | smartPut | {
"repo_name": "nvdk/ods-lodms-plugins",
"path": "lodms-ods-transformers/web-translator/src/main/java/com/tenforce/lodms/transformers/translators/TranslationCache.java",
"license": "gpl-2.0",
"size": 7443
} | [
"java.util.HashMap",
"org.openrdf.model.Model",
"org.openrdf.model.Statement",
"org.openrdf.model.impl.LinkedHashModel"
] | import java.util.HashMap; import org.openrdf.model.Model; import org.openrdf.model.Statement; import org.openrdf.model.impl.LinkedHashModel; | import java.util.*; import org.openrdf.model.*; import org.openrdf.model.impl.*; | [
"java.util",
"org.openrdf.model"
] | java.util; org.openrdf.model; | 1,147,845 |
public static Option provision(final InputStream... streams) {
validateNotNull(streams, "streams");
final UrlProvisionOption[] options = new UrlProvisionOption[streams.length];
int i = 0;
for (InputStream stream : streams) {
options[i++] = streamBundle(stream);
}... | static Option function(final InputStream... streams) { validateNotNull(streams, STR); final UrlProvisionOption[] options = new UrlProvisionOption[streams.length]; int i = 0; for (InputStream stream : streams) { options[i++] = streamBundle(stream); } return provision(options); } | /**
* Creates a composite option of {@link ProvisionOption}s. This is handy when bundles are built
* on the fly via TinyBundles.
*
* @param streams
* provision sources
*
* @return composite option of provision options
*
* @throws IllegalArgumentException
*... | Creates a composite option of <code>ProvisionOption</code>s. This is handy when bundles are built on the fly via TinyBundles | provision | {
"repo_name": "ops4j/org.ops4j.pax.exam2",
"path": "core/pax-exam/src/main/java/org/ops4j/pax/exam/CoreOptions.java",
"license": "apache-2.0",
"size": 30795
} | [
"java.io.InputStream",
"org.ops4j.lang.NullArgumentException",
"org.ops4j.pax.exam.options.UrlProvisionOption"
] | import java.io.InputStream; import org.ops4j.lang.NullArgumentException; import org.ops4j.pax.exam.options.UrlProvisionOption; | import java.io.*; import org.ops4j.lang.*; import org.ops4j.pax.exam.options.*; | [
"java.io",
"org.ops4j.lang",
"org.ops4j.pax"
] | java.io; org.ops4j.lang; org.ops4j.pax; | 158,171 |
public static AdminClient createAdminClient(String[] dirServiceAddresses, UserCredentials userCredentials,
SSLOptions sslOptions, Options options) {
return createAdminClient(defaultType, dirServiceAddresses, userCredentials, sslOptions, options);
} | static AdminClient function(String[] dirServiceAddresses, UserCredentials userCredentials, SSLOptions sslOptions, Options options) { return createAdminClient(defaultType, dirServiceAddresses, userCredentials, sslOptions, options); } | /**
* Returns an instance of a admin client with multiple DIR Addresses.
*
* @param dirServiceAddresses
* Addresses of the DIR services (Format: ip-addr:port, e.g. localhost:32638)
* @param userCredentials
* Name and Groups of the user.
* @param sslOptions
... | Returns an instance of a admin client with multiple DIR Addresses | createAdminClient | {
"repo_name": "rbaerzib/xtreemfs",
"path": "java/servers/src/org/xtreemfs/common/libxtreemfs/ClientFactory.java",
"license": "bsd-3-clause",
"size": 7788
} | [
"org.xtreemfs.foundation.SSLOptions",
"org.xtreemfs.foundation.pbrpc.generatedinterfaces.RPC"
] | import org.xtreemfs.foundation.SSLOptions; import org.xtreemfs.foundation.pbrpc.generatedinterfaces.RPC; | import org.xtreemfs.foundation.*; import org.xtreemfs.foundation.pbrpc.generatedinterfaces.*; | [
"org.xtreemfs.foundation"
] | org.xtreemfs.foundation; | 1,572,918 |
public void assign(Task task) {
LOG.info("New task received.");
if (this.task != null) {
try {
LOG.error("Worker already busy with another task");
taskManager.fail(this.task, new TaskCompletionFailedException("The worker was assigned a new task before it c... | void function(Task task) { LOG.info(STR); if (this.task != null) { try { LOG.error(STR); taskManager.fail(this.task, new TaskCompletionFailedException(STR)); } catch (TaskContextException e) { throw new IllegalStateException(); } } this.task = task; } | /**
* Assigns a new task to the worker thread
* @param task the task to be carried out
*/ | Assigns a new task to the worker thread | assign | {
"repo_name": "agileapes/couteau",
"path": "couteau-concurrency/src/main/java/com/mmnaseri/couteau/concurrency/worker/TaskWorker.java",
"license": "mit",
"size": 7015
} | [
"com.mmnaseri.couteau.concurrency.error.TaskCompletionFailedException",
"com.mmnaseri.couteau.concurrency.error.TaskContextException",
"com.mmnaseri.couteau.concurrency.task.Task"
] | import com.mmnaseri.couteau.concurrency.error.TaskCompletionFailedException; import com.mmnaseri.couteau.concurrency.error.TaskContextException; import com.mmnaseri.couteau.concurrency.task.Task; | import com.mmnaseri.couteau.concurrency.error.*; import com.mmnaseri.couteau.concurrency.task.*; | [
"com.mmnaseri.couteau"
] | com.mmnaseri.couteau; | 120,920 |
void invalidate(String bpid, Block invalidBlks[]) throws IOException; | void invalidate(String bpid, Block invalidBlks[]) throws IOException; | /**
* Invalidates the specified blocks
* @param bpid Block pool Id
* @param invalidBlks - the blocks to be invalidated
* @throws IOException
*/ | Invalidates the specified blocks | invalidate | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/FsDatasetSpi.java",
"license": "apache-2.0",
"size": 21835
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.Block"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,554,217 |
public static ExpectedCondition<Boolean> urlMatches(final String regex) {
return new ExpectedCondition<Boolean>() {
private String currentUrl;
private Pattern pattern;
private Matcher matcher; | static ExpectedCondition<Boolean> function(final String regex) { return new ExpectedCondition<Boolean>() { private String currentUrl; private Pattern pattern; private Matcher matcher; | /**
* Expectation for the URL to match a specific regular expression
*
* @param regex the regular expression that the URL should match
* @return <code>true</code> if the URL matches the specified regular expression
*/ | Expectation for the URL to match a specific regular expression | urlMatches | {
"repo_name": "dibagga/selenium",
"path": "java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java",
"license": "apache-2.0",
"size": 50698
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 535,241 |
public void setValue(int v) {
setTypedValue(v, AdjustmentEvent.TRACK);
} | void function(int v) { setTypedValue(v, AdjustmentEvent.TRACK); } | /**
* Sets the value of this scrollbar to the specified value.
* <p>
* If the value supplied is less than the current minimum or
* greater than the current maximum, then one of those values is
* substituted, as appropriate.
*
* @param v the new value of the scrollbar
*/ | Sets the value of this scrollbar to the specified value. If the value supplied is less than the current minimum or greater than the current maximum, then one of those values is substituted, as appropriate | setValue | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/java/awt/ScrollPaneAdjustable.java",
"license": "gpl-2.0",
"size": 14924
} | [
"java.awt.event.AdjustmentEvent"
] | import java.awt.event.AdjustmentEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 546,953 |
@RequestMapping(value = "/template/{id:[\\d]+}/delete", method = { RequestMethod.GET })
@ResponseBody
public IRestResponse deleteTemplate(@PathVariable final long id, HttpServletRequest request)
throws UnsupportedEncodingException {
logger.info("Request received. URL: '/lider/report/template/{}/delete'", id);... | @RequestMapping(value = STR, method = { RequestMethod.GET }) IRestResponse function(@PathVariable final long id, HttpServletRequest request) throws UnsupportedEncodingException { logger.info(STR, id); IRestResponse restResponse = reportProcessor.deleteTemplate(id); logger.debug(STR, restResponse.toJson()); return restR... | /**
* Delete template specified by id.
*
* @param id
* @param request
* @return
* @throws UnsupportedEncodingException
*/ | Delete template specified by id | deleteTemplate | {
"repo_name": "Pardus-LiderAhenk/lider",
"path": "lider-web/src/main/java/tr/org/liderahenk/web/controller/ReportController.java",
"license": "lgpl-3.0",
"size": 12551
} | [
"java.io.UnsupportedEncodingException",
"javax.servlet.http.HttpServletRequest",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"tr.org.liderahenk.lider.core.api.rest.responses.IRest... | import java.io.UnsupportedEncodingException; import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import tr.org.liderahenk.lider.core.api.res... | import java.io.*; import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; import tr.org.liderahenk.lider.core.api.rest.responses.*; | [
"java.io",
"javax.servlet",
"org.springframework.web",
"tr.org.liderahenk"
] | java.io; javax.servlet; org.springframework.web; tr.org.liderahenk; | 678,038 |
@Override
public void processingInstruction(String target, String data) throws SAXException {
writeText4Links();
write("<?");
write(target);
write(' ');
write(data);
write("?>");
if (elementLevel < 1) {
write('\n');
}
super.proc... | void function(String target, String data) throws SAXException { writeText4Links(); write("<?"); write(target); write(' '); write(data); write("?>"); if (elementLevel < 1) { write('\n'); } super.processingInstruction(target, data); } | /**
* Write a processing instruction.
* <p>
* Pass the event on down the filter chain for further processing.
*
* @param target The PI target.
* @param data The PI data.
* @throws org.xml.sax.SAXException If there is an error writing the PI, or if a handler
* ... | Write a processing instruction. Pass the event on down the filter chain for further processing | processingInstruction | {
"repo_name": "1gravity/Android-RTEditor",
"path": "RTEditor/src/main/java/com/onegravity/rteditor/converter/tagsoup/HTMLWriter.java",
"license": "apache-2.0",
"size": 41140
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,641,707 |
void addProject(Project project) throws ExecutionException, InterruptedException; | void addProject(Project project) throws ExecutionException, InterruptedException; | /**
* Add project to event service.
*
* @param project project to add
* @throws ExecutionException error pushing project to event server
* @throws InterruptedException event thread was interrupted
*/ | Add project to event service | addProject | {
"repo_name": "clebi/projecter-spark",
"path": "src/main/java/org/clebi/projecterspark/services/events/ProjectEventService.java",
"license": "apache-2.0",
"size": 1121
} | [
"java.util.concurrent.ExecutionException",
"org.clebi.projecterspark.models.Project"
] | import java.util.concurrent.ExecutionException; import org.clebi.projecterspark.models.Project; | import java.util.concurrent.*; import org.clebi.projecterspark.models.*; | [
"java.util",
"org.clebi.projecterspark"
] | java.util; org.clebi.projecterspark; | 2,881,609 |
void filter( Text prefix, Text body, Text suffix, BlockType type );
| void filter( Text prefix, Text body, Text suffix, BlockType type ); | /** Replace the contents of the body parameter with the filtered version. The output is the contents of the body
* parameter. That is, the body will hold the filtered input.
*
* @param prefix empty with TEXT blocks. Holds the surrounding markup (e.g. the <listing> tag or backquote) for code.
* N... | Replace the contents of the body parameter with the filtered version. The output is the contents of the body parameter. That is, the body will hold the filtered input | filter | {
"repo_name": "aholub/hml",
"path": "Hml/src/com/holub/hml/Filter.java",
"license": "bsd-3-clause",
"size": 3588
} | [
"com.holub.text.Text"
] | import com.holub.text.Text; | import com.holub.text.*; | [
"com.holub.text"
] | com.holub.text; | 1,704,703 |
public GeneralNames getDataLocations()
{
return data.getDataLocations();
} | GeneralNames function() { return data.getDataLocations(); } | /**
* Get data locations, where the copy of request Data can be obtained.
* Note: the exact meaning of field is up to applications.
* Note: this field can be set by DVCS.
*
* @return
*/ | Get data locations, where the copy of request Data can be obtained. Note: the exact meaning of field is up to applications. Note: this field can be set by DVCS | getDataLocations | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/dvcs/DVCSRequestInfo.java",
"license": "mit",
"size": 6296
} | [
"org.bouncycastle.asn1.x509.GeneralNames"
] | import org.bouncycastle.asn1.x509.GeneralNames; | import org.bouncycastle.asn1.x509.*; | [
"org.bouncycastle.asn1"
] | org.bouncycastle.asn1; | 420,583 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(org_eclipse_smarthome_schemas_thing_description_v1__0SimplifiedPackage.Literals.OPTIO... | void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (org_eclipse_smarthome_schemas_thing_description_v1__0SimplifiedPackage.Literals.OPTIONS_TYPE__OPTIONS, org_eclipse_smarthome_schemas_thing_... | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "xmlintelledit/classes.edit/src/org_eclipse_smarthome_schemas_thing_description_v1__0Simplified/provider/OptionsTypeItemProvider.java",
"license": "mit",
"size": 5452
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,063,630 |
@Test
public void testT1RV6D3_T1LV10D1() {
test_id = getTestId("T1RV6D3", "T1LV10D1", "142");
String src = selectTRVD("T1RV6D3");
String dest = selectTLVD("T1LV10D1");
String result = ".";
try {
result = TRVD_TLVD_Action(src, dest);
} catch (RecognitionException e) {
e.printStackTrac... | void function() { test_id = getTestId(STR, STR, "142"); 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(ReturnFailure... | /**
* Perform the test for the given matrix column (T1RV6D3) and row
* (T1LV10D1).
*
*/ | Perform the test for the given matrix column (T1RV6D3) and row (T1LV10D1) | testT1RV6D3_T1LV10D1 | {
"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,450 |
public EventJournal onEventStopped(LogEvent event); | EventJournal function(LogEvent event); | /**
* Callback hook triggered when a journal event is stopped.
* @param event
* @return
*/ | Callback hook triggered when a journal event is stopped | onEventStopped | {
"repo_name": "davidonlaptop/logshaper",
"path": "src/main/java/net/davidlauzon/logshaper/journal/EventJournal.java",
"license": "apache-2.0",
"size": 2675
} | [
"net.davidlauzon.logshaper.event.LogEvent"
] | import net.davidlauzon.logshaper.event.LogEvent; | import net.davidlauzon.logshaper.event.*; | [
"net.davidlauzon.logshaper"
] | net.davidlauzon.logshaper; | 2,221,924 |
public static Arc2D computeArc(double x0, double y0,
double rx, double ry,
double angle,
boolean largeArcFlag,
boolean sweepFlag,
double x, d... | static Arc2D function(double x0, double y0, double rx, double ry, double angle, boolean largeArcFlag, boolean sweepFlag, double x, double y) { double dx2 = (x0 - x) / 2.0; double dy2 = (y0 - y) / 2.0; angle = Math.toRadians(angle % 360.0); double cosAngle = Math.cos(angle); double sinAngle = Math.sin(angle); double y1 ... | /**
* This constructs an unrotated Arc2D from the SVG specification of an
* Elliptical arc. To get the final arc you need to apply a rotation
* transform such as:
*
* AffineTransform.getRotateInstance
* (angle, arc.getX()+arc.getWidth()/2, arc.getY()+arc.getHeight()/2);
*/ | This constructs an unrotated Arc2D from the SVG specification of an Elliptical arc. To get the final arc you need to apply a rotation transform such as: AffineTransform.getRotateInstance (angle, arc.getX()+arc.getWidth()/2, arc.getY()+arc.getHeight()/2) | computeArc | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/ext/awt/geom/ExtendedGeneralPath.java",
"license": "apache-2.0",
"size": 24122
} | [
"java.awt.geom.Arc2D"
] | import java.awt.geom.Arc2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,009,090 |
public TimeZone getTimeZone() {
return timeZone;
} | TimeZone function() { return timeZone; } | /**
* Returns the time zone of the date.
*
* @return the time zone
*/ | Returns the time zone of the date | getTimeZone | {
"repo_name": "jdahlstrom/vaadin.react",
"path": "client/src/main/java/com/vaadin/client/renderers/DateRenderer.java",
"license": "apache-2.0",
"size": 3125
} | [
"com.google.gwt.i18n.client.TimeZone"
] | import com.google.gwt.i18n.client.TimeZone; | import com.google.gwt.i18n.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,745,952 |
public void setNonStrokingColor(int g) throws IOException
{
if (isOutside255Interval(g))
{
throw new IllegalArgumentException("Parameter must be within 0..255, but is " + g);
}
setNonStrokingColor(g / 255f);
} | void function(int g) throws IOException { if (isOutside255Interval(g)) { throw new IllegalArgumentException(STR + g); } setNonStrokingColor(g / 255f); } | /**
* Set the non-stroking color in the DeviceGray color space. Range is 0..255.
*
* @param g The gray value.
* @throws IOException If an IO error occurs while writing to the stream.
* @throws IllegalArgumentException If the parameter is invalid.
*/ | Set the non-stroking color in the DeviceGray color space. Range is 0..255 | setNonStrokingColor | {
"repo_name": "benmccann/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java",
"license": "apache-2.0",
"size": 73640
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,370,683 |
//
// Network actions.
//
// Start of user code Network_Kind_Up_action
@Override
public void up()
{
LOGGER.debug("Action up() called on " + this);
// Network State Machine.
switch(getOcciNetworkState().getValue()) {
case NetworkStatus.INACTIVE_VALUE:
LOGGER.debug("Fire transition(state=inactive, a... | void function() { LOGGER.debug(STR + this); switch(getOcciNetworkState().getValue()) { case NetworkStatus.INACTIVE_VALUE: LOGGER.debug(STRup\")..."); if(true){ setOcciNetworkState(NetworkStatus.ACTIVE); } else if(true){ setOcciNetworkState(NetworkStatus.ERROR); } break; default: break; } } | /**
* Implement OCCI action:
* - scheme: http://schemas.ogf.org/occi/infrastructure/network/action#
* - term: up
* - title:
*/ | Implement OCCI action: - scheme: HREF - term: up - title: | up | {
"repo_name": "occiware/OCCI-Studio",
"path": "plugins/org.eclipse.cmf.occi.infrastructure.connector.dummy/src-gen/org/eclipse/cmf/occi/infrastructure/connector/dummy/NetworkConnector.java",
"license": "epl-1.0",
"size": 4045
} | [
"org.eclipse.cmf.occi.infrastructure.NetworkStatus"
] | import org.eclipse.cmf.occi.infrastructure.NetworkStatus; | import org.eclipse.cmf.occi.infrastructure.*; | [
"org.eclipse.cmf"
] | org.eclipse.cmf; | 905,371 |
EAttribute getContents_Contents(); | EAttribute getContents_Contents(); | /**
* Returns the meta object for the attribute '{@link io.opensemantics.semiotics.model.assessment.Contents#getContents <em>Contents</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Contents</em>'.
* @see io.opensemantics.semiotics.model.assessmen... | Returns the meta object for the attribute '<code>io.opensemantics.semiotics.model.assessment.Contents#getContents Contents</code>'. | getContents_Contents | {
"repo_name": "CoastalHacking/semiotics-main",
"path": "bundles/io.opensemantics.semiotics.model.assessment/src-gen/io/opensemantics/semiotics/model/assessment/AssessmentPackage.java",
"license": "apache-2.0",
"size": 151116
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,795,314 |
@Override
public void startDoc(final int docID, final int termDocFreq)
throws IOException {
if (docID < 0) {
throw new CorruptIndexException("docs out of order (" + docID + ") (docOut: " + docOut + ")");
}
if (docWriter.isFull()) {
if ((++blockCount % blockSkipInterval) == 0) {
sk... | void function(final int docID, final int termDocFreq) throws IOException { if (docID < 0) { throw new CorruptIndexException(STR + docID + STR + docOut + ")"); } if (docWriter.isFull()) { if ((++blockCount % blockSkipInterval) == 0) { skipWriter.setSkipData(docWriter.getFirstDocId()); skipWriter.bufferSkip(blockCount); ... | /**
* Adds a new doc in this term. If this returns null
* then we just skip consuming positions.
* <p>
* {@code termDocFreq} parameter is ignored as term frequency in document is
* not used.
*/ | Adds a new doc in this term. If this returns null then we just skip consuming positions. termDocFreq parameter is ignored as term frequency in document is not used | startDoc | {
"repo_name": "rdelbru/SIREn",
"path": "siren-core/src/main/java/org/sindice/siren/index/codecs/siren10/Siren10PostingsWriter.java",
"license": "apache-2.0",
"size": 16252
} | [
"java.io.IOException",
"org.apache.lucene.index.CorruptIndexException",
"org.sindice.siren.analysis.filter.VIntPayloadCodec"
] | import java.io.IOException; import org.apache.lucene.index.CorruptIndexException; import org.sindice.siren.analysis.filter.VIntPayloadCodec; | import java.io.*; import org.apache.lucene.index.*; import org.sindice.siren.analysis.filter.*; | [
"java.io",
"org.apache.lucene",
"org.sindice.siren"
] | java.io; org.apache.lucene; org.sindice.siren; | 2,863,813 |
// http://www.ebi.ac.uk/Tools/dbfetch/dbfetch?db=livelists&id=JN556047&style=raw
// ERROR 1 Unknown database [livelists].
public String lookupGenbankIds(List<String> genbankId) throws IOException {
StringBuilder sb = new StringBuilder();
sb.append("http://www.ebi.ac.uk/Tools/dbfetch/dbfetch?id=");
for (int i =... | String function(List<String> genbankId) throws IOException { StringBuilder sb = new StringBuilder(); sb.append(STR,STR&retmode=xml"); urlString = sb.toString(); return getResponse(url); } | /** lookup Genbank/ENAIds.
*
* seems to work at EBI. retrieves whole entry
*
* @param genbankId
* @return
* @throws IOException
*/ | lookup Genbank/ENAIds. seems to work at EBI. retrieves whole entry | lookupGenbankIds | {
"repo_name": "petermr/ami-plugin",
"path": "src/main/java/org/xmlcml/ami2/lookups/ENALookup.java",
"license": "apache-2.0",
"size": 1487
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 655,438 |
private void writeQRYDSC(DRDAStatement stmt, boolean FDODSConly)
throws DRDAProtocolException, SQLException
{
ResultSet rs = null;
ResultSetMetaData rsmeta = null;
ParameterMetaData pmeta = null;
if (!stmt.needsToSendParamData)
rs = stmt.getResultSet();
if (rs == null) // this is a CallableStatement... | void function(DRDAStatement stmt, boolean FDODSConly) throws DRDAProtocolException, SQLException { ResultSet rs = null; ResultSetMetaData rsmeta = null; ParameterMetaData pmeta = null; if (!stmt.needsToSendParamData) rs = stmt.getResultSet(); if (rs == null) pmeta = stmt.getParameterMetaData(); else rsmeta = rs.getMeta... | /**
* Write QRYDSC - Query Answer Set Description
*
* @param stmt DRDAStatement we are working on
* @param FDODSConly simply the FDODSC, without the wrap
*
* Instance Variables
* SQLDTAGRP - required
*
* Only 84 columns can be sent in a single QRYDSC. If there are more columns
* they must be sen... | Write QRYDSC - Query Answer Set Description | writeQRYDSC | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfirexd/core/src/drda/java/com/pivotal/gemfirexd/internal/impl/drda/DRDAConnThread.java",
"license": "apache-2.0",
"size": 357866
} | [
"com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager",
"java.sql.ParameterMetaData",
"java.sql.ResultSet",
"java.sql.ResultSetMetaData",
"java.sql.SQLException"
] | import com.pivotal.gemfirexd.internal.iapi.services.sanity.SanityManager; import java.sql.ParameterMetaData; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; | import com.pivotal.gemfirexd.internal.iapi.services.sanity.*; import java.sql.*; | [
"com.pivotal.gemfirexd",
"java.sql"
] | com.pivotal.gemfirexd; java.sql; | 2,617,895 |
public static Logger getLogger(final String logName) {
LogManager manager = LogManager.getLogManager();
Logger loggerToModify = manager.getLogger(logName);
return loggerToModify;
} | static Logger function(final String logName) { LogManager manager = LogManager.getLogManager(); Logger loggerToModify = manager.getLogger(logName); return loggerToModify; } | /**
* Gets a logger from the LogManager.
*
* @param logName
* name of the logger
* @return The Logger object
* @since org.openntf.domino 1.0.0
*/ | Gets a logger from the LogManager | getLogger | {
"repo_name": "OpenNTF/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/logging/LogUtils.java",
"license": "apache-2.0",
"size": 10312
} | [
"java.util.logging.LogManager",
"java.util.logging.Logger"
] | import java.util.logging.LogManager; import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,680,558 |
public int getRelationship(AffineTransform lhsTransform, Shape rhs,
AffineTransform at) {
// MAKE SURE ANY CHANGES YOU MAKE IN THIS METHOD YOU MAKE TO THE
// OTHER GETRELATIONSHIP METHOD
PathIterator rhsi = rhs.getPathIterator(at);
Rectangle2D rhsBounds;
if (rhs instanceof AreaXIterator) {
AreaXItera... | int function(AffineTransform lhsTransform, Shape rhs, AffineTransform at) { PathIterator rhsi = rhs.getPathIterator(at); Rectangle2D rhsBounds; if (rhs instanceof AreaXIterator) { AreaXIterator axi = (AreaXIterator) rhs; rhsBounds = axi.curves.bounds; } try { rhsBounds = ShapeBounds.getBounds(rhs, at); if (lhsTransform... | /**
* Studies this object (the LHS) and the argument (the RHS) to determine the
* relationship.
*
* @param lhsTransform
* an optional AffineTransform to apply to this operand.
* @param rhs
* a shape to iterate over.
* @param at
* an optional AffineTransform to apply t... | Studies this object (the LHS) and the argument (the RHS) to determine the relationship | getRelationship | {
"repo_name": "mickleness/pumpernickel",
"path": "src/main/java/com/pump/geom/area/AreaXBody.java",
"license": "mit",
"size": 35257
} | [
"com.pump.geom.AreaX",
"com.pump.geom.EmptyPathException",
"com.pump.geom.ShapeBounds",
"java.awt.Shape",
"java.awt.geom.AffineTransform",
"java.awt.geom.PathIterator",
"java.awt.geom.Rectangle2D"
] | import com.pump.geom.AreaX; import com.pump.geom.EmptyPathException; import com.pump.geom.ShapeBounds; import java.awt.Shape; import java.awt.geom.AffineTransform; import java.awt.geom.PathIterator; import java.awt.geom.Rectangle2D; | import com.pump.geom.*; import java.awt.*; import java.awt.geom.*; | [
"com.pump.geom",
"java.awt"
] | com.pump.geom; java.awt; | 1,206,305 |
public List<T> getAllValues() {
return this.capturingMatcher.getAllValues();
}
| List<T> function() { return this.capturingMatcher.getAllValues(); } | /**
* Returns all captured values. Use it in case the verified method was called multiple times.
* <p>
* Example:
* <pre class="code"><code class="java">
* ArgumentCaptor<Person> peopleCaptor = ArgumentCaptor.forClass(Person.class);
* verify(mock, times(2)).doSomething(peo... | Returns all captured values. Use it in case the verified method was called multiple times. Example: ArgumentCaptor<Person> peopleCaptor = ArgumentCaptor.forClass(Person.class); verify(mock, times(2)).doSomething(peopleCaptor.capture()); List<Person> capturedPeople = peopleCaptor.getAllValues(); assertEquals... | getAllValues | {
"repo_name": "android-ia/platform_external_mockito",
"path": "src/org/mockito/ArgumentCaptor.java",
"license": "mit",
"size": 7851
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,055,167 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.