method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static HttpStatus forbidden()
{
return new HttpStatus(HttpServletResponse.SC_FORBIDDEN);
} | static HttpStatus function() { return new HttpStatus(HttpServletResponse.SC_FORBIDDEN); } | /**
* Creates an instance with status code <code>403 Forbidden</code>.
*/ | Creates an instance with status code <code>403 Forbidden</code> | forbidden | {
"repo_name": "apache/tapestry-5",
"path": "tapestry-core/src/main/java/org/apache/tapestry5/services/HttpStatus.java",
"license": "apache-2.0",
"size": 8173
} | [
"javax.servlet.http.HttpServletResponse"
] | import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 515,359 |
public BigDecimal getA_Split_Percent ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Split_Percent);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Split_Percent); if (bd == null) return Env.ZERO; return bd; } | /** Get Split Percentage.
@return Split Percentage */ | Get Split Percentage | getA_Split_Percent | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_A_Asset_Change.java",
"license": "gpl-2.0",
"size": 39409
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 2,312,026 |
public void setDocumentLocator(Locator locator) {
this.locator = locator;
} | void function(Locator locator) { this.locator = locator; } | /**
* Sets the locator in the project helper for future reference.
*
* @param locator The locator used by the parser.
* Will not be <code>null</code>.
* @see org.xml.sax.ContentHandler#setDocumentLocator(Locator)
*/ | Sets the locator in the project helper for future reference | setDocumentLocator | {
"repo_name": "antlibs/ant-contrib",
"path": "src/main/java/net/sf/antcontrib/walls/WallsFileHandler.java",
"license": "apache-2.0",
"size": 5257
} | [
"org.xml.sax.Locator"
] | import org.xml.sax.Locator; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,847,205 |
@Test
public void testSelectWhereIsNotNull() {
SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE))
.where(Criterion.isNotNull(new FieldReference(INT_FIELD)));
String expectedSql = "SELECT * FROM " + tableName(TEST_TABLE) + " WHERE (intField IS NOT NULL)";
ass... | void function() { SelectStatement stmt = new SelectStatement().from(new TableReference(TEST_TABLE)) .where(Criterion.isNotNull(new FieldReference(INT_FIELD))); String expectedSql = STR + tableName(TEST_TABLE) + STR; assertEquals(STR, expectedSql, testDialect.convertStatementToSQL(stmt)); } | /**
* Tests a select with a not null check clause.
*/ | Tests a select with a not null check clause | testSelectWhereIsNotNull | {
"repo_name": "badgerwithagun/morf",
"path": "morf-testsupport/src/main/java/org/alfasoftware/morf/jdbc/AbstractSqlDialectTest.java",
"license": "apache-2.0",
"size": 201465
} | [
"org.alfasoftware.morf.sql.SelectStatement",
"org.alfasoftware.morf.sql.element.Criterion",
"org.alfasoftware.morf.sql.element.FieldReference",
"org.alfasoftware.morf.sql.element.TableReference",
"org.junit.Assert"
] | import org.alfasoftware.morf.sql.SelectStatement; import org.alfasoftware.morf.sql.element.Criterion; import org.alfasoftware.morf.sql.element.FieldReference; import org.alfasoftware.morf.sql.element.TableReference; import org.junit.Assert; | import org.alfasoftware.morf.sql.*; import org.alfasoftware.morf.sql.element.*; import org.junit.*; | [
"org.alfasoftware.morf",
"org.junit"
] | org.alfasoftware.morf; org.junit; | 2,713,264 |
static IntCollector<?, char[]> toCharArray() {
return of(CharBuffer::new, CharBuffer::add, CharBuffer::addAll, CharBuffer::toArray);
}
| static IntCollector<?, char[]> toCharArray() { return of(CharBuffer::new, CharBuffer::add, CharBuffer::addAll, CharBuffer::toArray); } | /**
* Returns an {@code IntCollector} that produces the {@code char[]} array of
* the input elements converting them via {@code (char)} casting. If no
* elements are present, the result is an empty array.
*
* @return an {@code IntCollector} that produces the {@code char[]} array of
*... | Returns an IntCollector that produces the char[] array of the input elements converting them via (char) casting. If no elements are present, the result is an empty array | toCharArray | {
"repo_name": "amaembo/streamex",
"path": "src/main/java/one/util/streamex/IntCollector.java",
"license": "apache-2.0",
"size": 25112
} | [
"one.util.streamex.Internals"
] | import one.util.streamex.Internals; | import one.util.streamex.*; | [
"one.util.streamex"
] | one.util.streamex; | 2,245,275 |
@Test
public void testFilterAuthenticatedUserOverridesTrustedUser() throws Exception
{
String expectedUserId = "testUser";
HashMap<String, Object> requestHeaders = new HashMap<>();
// Execute filters with security disabled
Authentication authentication1 = executeAuthenticati... | void function() throws Exception { String expectedUserId = STR; HashMap<String, Object> requestHeaders = new HashMap<>(); Authentication authentication1 = executeAuthenticationFilters(false, requestHeaders); assertAuthenticatedUserId(TrustedApplicationUserBuilder.TRUSTED_USER_ID, TrustedApplicationUserBuilder.TRUSTED_U... | /**
* When the filters are executed with security disabled, and the filters are run again with security enabled, the trusted user should no longer be in the
* context and instead the user should be created based on the headers given in the request.
*
* @throws Exception
*/ | When the filters are executed with security disabled, and the filters are run again with security enabled, the trusted user should no longer be in the context and instead the user should be created based on the headers given in the request | testFilterAuthenticatedUserOverridesTrustedUser | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-app/src/test/java/org/finra/herd/app/security/SecurityFilterChainTest.java",
"license": "apache-2.0",
"size": 10149
} | [
"java.util.HashMap",
"org.springframework.security.core.Authentication"
] | import java.util.HashMap; import org.springframework.security.core.Authentication; | import java.util.*; import org.springframework.security.core.*; | [
"java.util",
"org.springframework.security"
] | java.util; org.springframework.security; | 134,537 |
public void setTitleStyle(Style s) {
title.setUnselectedStyle(s);
} | void function(Style s) { title.setUnselectedStyle(s); } | /**
* Sets the style of the title programmatically
*
* @param s new style
* @deprecated this method doesn't take into consideration multiple styles
*/ | Sets the style of the title programmatically | setTitleStyle | {
"repo_name": "skyHALud/codenameone",
"path": "CodenameOne/src/com/codename1/ui/Form.java",
"license": "gpl-2.0",
"size": 99398
} | [
"com.codename1.ui.plaf.Style"
] | import com.codename1.ui.plaf.Style; | import com.codename1.ui.plaf.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 651,482 |
ReceiveSubscriptionMessageResult receiveSubscriptionMessage(
String topicPath, String subscriptionName,
ReceiveMessageOptions options) throws ServiceException; | ReceiveSubscriptionMessageResult receiveSubscriptionMessage( String topicPath, String subscriptionName, ReceiveMessageOptions options) throws ServiceException; | /**
* Receives a subscription message using the specified receive message
* options.
*
* @param topicPath
* A <code>String</code> object that represents the name of the
* topic to receive.
* @param subscriptionName
* A <code>String</code> object ... | Receives a subscription message using the specified receive message options | receiveSubscriptionMessage | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "services/azure-servicebus/src/main/java/com/microsoft/windowsazure/services/servicebus/ServiceBusContract.java",
"license": "apache-2.0",
"size": 23765
} | [
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.services.servicebus.models.ReceiveMessageOptions",
"com.microsoft.windowsazure.services.servicebus.models.ReceiveSubscriptionMessageResult"
] | import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.services.servicebus.models.ReceiveMessageOptions; import com.microsoft.windowsazure.services.servicebus.models.ReceiveSubscriptionMessageResult; | import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.services.servicebus.models.*; | [
"com.microsoft.windowsazure"
] | com.microsoft.windowsazure; | 330,662 |
void reportJobIssuesAsEvents(EventSubmitter eventSubmitter)
throws TroubleshooterException; | void reportJobIssuesAsEvents(EventSubmitter eventSubmitter) throws TroubleshooterException; | /**
* Sends the current collection of issues as GobblinTrackingEvents.
*
* Those events can be consumed by upstream and analytical systems.
*
* Can be disabled with
* {@link org.apache.gobblin.configuration.ConfigurationKeys.TROUBLESHOOTER_DISABLE_EVENT_REPORTING}.
* */ | Sends the current collection of issues as GobblinTrackingEvents. Those events can be consumed by upstream and analytical systems. Can be disabled with <code>org.apache.gobblin.configuration.ConfigurationKeys.TROUBLESHOOTER_DISABLE_EVENT_REPORTING</code> | reportJobIssuesAsEvents | {
"repo_name": "shirshanka/gobblin",
"path": "gobblin-runtime/src/main/java/org/apache/gobblin/runtime/troubleshooter/AutomaticTroubleshooter.java",
"license": "apache-2.0",
"size": 3591
} | [
"org.apache.gobblin.metrics.event.EventSubmitter"
] | import org.apache.gobblin.metrics.event.EventSubmitter; | import org.apache.gobblin.metrics.event.*; | [
"org.apache.gobblin"
] | org.apache.gobblin; | 643,788 |
public BpmnModel createOneTaskTestProcess() {
BpmnModel model = new BpmnModel();
org.activiti.bpmn.model.Process process = new org.activiti.bpmn.model.Process();
model.addProcess(process);
process.setId("oneTaskProcess");
process.setName("The one task process");
StartEvent startEvent = new S... | BpmnModel function() { BpmnModel model = new BpmnModel(); org.activiti.bpmn.model.Process process = new org.activiti.bpmn.model.Process(); model.addProcess(process); process.setId(STR); process.setName(STR); StartEvent startEvent = new StartEvent(); startEvent.setId("start"); process.addFlowElement(startEvent); UserTas... | /**
* Since the 'one task process' is used everywhere the actual process content
* doesn't matter, instead of copying around the BPMN 2.0 xml one could use
* this method which gives a {@link BpmnModel} version of the same process back.
*/ | Since the 'one task process' is used everywhere the actual process content doesn't matter, instead of copying around the BPMN 2.0 xml one could use this method which gives a <code>BpmnModel</code> version of the same process back | createOneTaskTestProcess | {
"repo_name": "stefan-ziel/Activiti",
"path": "modules/activiti5-test/src/main/java/org/activiti5/engine/impl/test/AbstractActivitiTestCase.java",
"license": "apache-2.0",
"size": 14456
} | [
"org.activiti.bpmn.model.BpmnModel",
"org.activiti.bpmn.model.EndEvent",
"org.activiti.bpmn.model.SequenceFlow",
"org.activiti.bpmn.model.StartEvent",
"org.activiti.bpmn.model.UserTask"
] | import org.activiti.bpmn.model.BpmnModel; import org.activiti.bpmn.model.EndEvent; import org.activiti.bpmn.model.SequenceFlow; import org.activiti.bpmn.model.StartEvent; import org.activiti.bpmn.model.UserTask; | import org.activiti.bpmn.model.*; | [
"org.activiti.bpmn"
] | org.activiti.bpmn; | 2,767,832 |
@Override
public void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
CategoryAxis domainAxis, ValueAxis rangeAxis) {
CategoryDataset dataset = plot.getDataset();
int catIndex = dataset.getColumnIndex(this.category);
int catCount = dataset.getColumnCount();
... | void function(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, CategoryAxis domainAxis, ValueAxis rangeAxis) { CategoryDataset dataset = plot.getDataset(); int catIndex = dataset.getColumnIndex(this.category); int catCount = dataset.getColumnCount(); float anchorX = 0.0f; float anchorY = 0.0f; PlotOrientation or... | /**
* Draws the annotation.
*
* @param g2 the graphics device.
* @param plot the plot.
* @param dataArea the data area.
* @param domainAxis the domain axis.
* @param rangeAxis the range axis.
*/ | Draws the annotation | draw | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/annotations/CategoryTextAnnotation.java",
"license": "lgpl-2.1",
"size": 8545
} | [
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.api.RectangleEdge",
"org.jfree.chart.axis.CategoryAxis",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.chart.plot.Plot",
"org.jfree.chart.plot.PlotOrientation",
"org.jfree.chart.text.TextUtils",
... | import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.api.RectangleEdge; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.Plot; import org.jfree.chart.plot.PlotOrientation; import org.jfr... | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.api.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.text.*; import org.jfree.data.category.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] | java.awt; org.jfree.chart; org.jfree.data; | 1,429,859 |
private HorizonBindingProvider findFirstMatchingBindingProvider(String itemName, Command command) {
HorizonBindingProvider firstMatchingProvider = null;
for (HorizonBindingProvider provider : this.providers) {
String commandLine = provider.getHorizonCommand(itemName, command.toString());... | HorizonBindingProvider function(String itemName, Command command) { HorizonBindingProvider firstMatchingProvider = null; for (HorizonBindingProvider provider : this.providers) { String commandLine = provider.getHorizonCommand(itemName, command.toString()); if (commandLine != null) { firstMatchingProvider = provider; br... | /**
* Find the first matching {@link HorizonBindingProvider} according to
* <code>itemName</code> and <code>command</code>. If no direct match is
* found, a second match is issued with wilcard-command '*'.
*
* @param itemName
* @param command
*
* @return the matching binding prov... | Find the first matching <code>HorizonBindingProvider</code> according to <code>itemName</code> and <code>command</code>. If no direct match is found, a second match is issued with wilcard-command '*' | findFirstMatchingBindingProvider | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.horizon/src/main/java/org/openhab/binding/horizon/internal/HorizonBinding.java",
"license": "epl-1.0",
"size": 6197
} | [
"org.openhab.binding.horizon.HorizonBindingProvider",
"org.openhab.core.types.Command"
] | import org.openhab.binding.horizon.HorizonBindingProvider; import org.openhab.core.types.Command; | import org.openhab.binding.horizon.*; import org.openhab.core.types.*; | [
"org.openhab.binding",
"org.openhab.core"
] | org.openhab.binding; org.openhab.core; | 1,714,332 |
@Override
public int hashCode() {
int hash = 7;
hash = 29 * hash + this.value;
hash = 29 * hash + Objects.hashCode(this.numeral);
return hash;
} | int function() { int hash = 7; hash = 29 * hash + this.value; hash = 29 * hash + Objects.hashCode(this.numeral); return hash; } | /**
* Returns the hash of this RomanInteger.
* <p>
* The hashcode is created using the int value and the RomanNumeral. Uses
* {@link Objects#hashCode(java.lang.Object)} and overrides
* {@link Object#hashCode()}.
*
* @return the hash of this RomanInteger.
* @see Object#hashCode()
... | Returns the hash of this RomanInteger. The hashcode is created using the int value and the RomanNumeral. Uses <code>Objects#hashCode(java.lang.Object)</code> and overrides <code>Object#hashCode()</code> | hashCode | {
"repo_name": "TheMatjaz/jNumerus",
"path": "src/main/java/it/matjaz/jnumerus/RomanInteger.java",
"license": "mpl-2.0",
"size": 10653
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,711,375 |
@Test
public void geodeLoggerLogsToMainLogFileWithHigherSecurityLogLevel() {
Properties config = new Properties();
config.setProperty(LOCATORS, "");
config.setProperty(LOG_FILE, mainLogFilePath);
config.setProperty(LOG_LEVEL, FINE.name());
config.setProperty(SECURITY_LOG_LEVEL, INFO.name());
... | void function() { Properties config = new Properties(); config.setProperty(LOCATORS, ""); config.setProperty(LOG_FILE, mainLogFilePath); config.setProperty(LOG_LEVEL, FINE.name()); config.setProperty(SECURITY_LOG_LEVEL, INFO.name()); system = (InternalDistributedSystem) DistributedSystem.connect(config); DistributionCo... | /**
* tests scenario where security log has not been set but a level has been set to a less granular
* level than that of the regular log. Verifies that the correct logs for security show up in the
* regular log as expected
*/ | tests scenario where security log has not been set but a level has been set to a less granular level than that of the regular log. Verifies that the correct logs for security show up in the regular log as expected | geodeLoggerLogsToMainLogFileWithHigherSecurityLogLevel | {
"repo_name": "davebarnes97/geode",
"path": "geode-log4j/src/integrationTest/java/org/apache/geode/logging/log4j/internal/impl/LoggingWithDistributedSystemIntegrationTest.java",
"license": "apache-2.0",
"size": 59167
} | [
"java.util.Properties",
"org.apache.geode.distributed.DistributedSystem",
"org.apache.geode.distributed.internal.DistributionConfig",
"org.apache.geode.distributed.internal.InternalDistributedSystem",
"org.apache.geode.logging.internal.spi.LogWriterLevel",
"org.apache.geode.test.assertj.LogFileAssert",
... | import java.util.Properties; import org.apache.geode.distributed.DistributedSystem; import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.logging.internal.spi.LogWriterLevel; import org.apache.geode.test.assertj.L... | import java.util.*; import org.apache.geode.distributed.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.logging.internal.spi.*; import org.apache.geode.test.assertj.*; import org.apache.geode.test.awaitility.*; import org.apache.logging.log4j.*; import org.assertj.core.api.*; | [
"java.util",
"org.apache.geode",
"org.apache.logging",
"org.assertj.core"
] | java.util; org.apache.geode; org.apache.logging; org.assertj.core; | 2,081,686 |
public com.mozu.api.contracts.commerceruntime.fulfillment.DigitalPackage createDigitalPackage(com.mozu.api.contracts.commerceruntime.fulfillment.DigitalPackage digitalPackage, String orderId, String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.commerceruntime.fulfillment.DigitalPackage> cl... | com.mozu.api.contracts.commerceruntime.fulfillment.DigitalPackage function(com.mozu.api.contracts.commerceruntime.fulfillment.DigitalPackage digitalPackage, String orderId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.fulfillment.DigitalPackage> client = com.mozu.api.clien... | /**
* Lets you apply a digital package to the order using the orderId and digitalPackage parameters.
* <p><pre><code>
* DigitalPackage digitalpackage = new DigitalPackage();
* DigitalPackage digitalPackage = digitalpackage.createDigitalPackage( digitalPackage, orderId, responseFields);
* </code></pre></p>
... | Lets you apply a digital package to the order using the orderId and digitalPackage parameters. <code><code> DigitalPackage digitalpackage = new DigitalPackage(); DigitalPackage digitalPackage = digitalpackage.createDigitalPackage( digitalPackage, orderId, responseFields); </code></code> | createDigitalPackage | {
"repo_name": "lakshmi-nair/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/orders/DigitalPackageResource.java",
"license": "mit",
"size": 10245
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,733,425 |
public synchronized void flush() throws IOException {
checkNotClosed();
trimToSize();
journalWriter.flush();
} | synchronized void function() throws IOException { checkNotClosed(); trimToSize(); journalWriter.flush(); } | /**
* Force buffered operations to the filesystem.
*/ | Force buffered operations to the filesystem | flush | {
"repo_name": "msdgwzhy6/AndroidDemo",
"path": "app/src/main/java/com/socks/androiddemo/utils/cache/DiskLruCache.java",
"license": "apache-2.0",
"size": 33905
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 555,473 |
private ShardSnapshotMetaDeleteResult deleteFromShardSnapshotMeta(
Set<SnapshotId> survivingSnapshots,
IndexId indexId,
int snapshotShardId,
Collection<SnapshotId> snapshotIds,
BlobContainer shardContainer,
Set<String> blobs,
BlobStoreIndexShardSnapshots snaps... | ShardSnapshotMetaDeleteResult function( Set<SnapshotId> survivingSnapshots, IndexId indexId, int snapshotShardId, Collection<SnapshotId> snapshotIds, BlobContainer shardContainer, Set<String> blobs, BlobStoreIndexShardSnapshots snapshots, long indexGeneration ) { List<SnapshotFiles> newSnapshotsList = new ArrayList<>()... | /**
* Delete snapshot from shard level metadata.
*
* @param indexGeneration generation to write the new shard level level metadata to. If negative a uuid id shard generation should be
* used
*/ | Delete snapshot from shard level metadata | deleteFromShardSnapshotMeta | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java",
"license": "apache-2.0",
"size": 176266
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"java.util.Set",
"java.util.stream.Collectors",
"org.elasticsearch.common.blobstore.BlobContainer",
"org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshots",
"org.elasticsearch.index.snapshots.b... | import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.elasticsearch.common.blobstore.BlobContainer; import org.elasticsearch.index.snapshots.blobstore.BlobStoreIndexShardSnapshots; import org.elast... | import java.io.*; import java.util.*; import java.util.stream.*; import org.elasticsearch.common.blobstore.*; import org.elasticsearch.index.snapshots.blobstore.*; import org.elasticsearch.repositories.*; import org.elasticsearch.snapshots.*; | [
"java.io",
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.repositories",
"org.elasticsearch.snapshots"
] | java.io; java.util; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.repositories; org.elasticsearch.snapshots; | 2,155,122 |
public void update(long time) throws ObjectNotSupportedException {
Iterator<Transformation> it = transformations.iterator();
while (it.hasNext()) {
Transformation trans = it.next();
if (time >= trans.getBegin() && time <= trans.getEnd()) {
trans.apply(this, time);
}
}
} | void function(long time) throws ObjectNotSupportedException { Iterator<Transformation> it = transformations.iterator(); while (it.hasNext()) { Transformation trans = it.next(); if (time >= trans.getBegin() && time <= trans.getEnd()) { trans.apply(this, time); } } } | /**
* Update characteristics according to the given time and the
* transformations of the light.
*
* @param time
* the time in the scene for the update.
*/ | Update characteristics according to the given time and the transformations of the light | update | {
"repo_name": "guiguito/SiJaRay",
"path": "src/Raytracer/RaytracerObject.java",
"license": "apache-2.0",
"size": 2631
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 95,902 |
// try to get the resource input stream
if (isContentCache()) {
synchronized (this) {
if (buffer == null) {
log.debug("Reading resource: {} into the content cache", resourceUri);
try (InputStream is = getResourceAsInputStreamWithoutCache()) {
... | if (isContentCache()) { synchronized (this) { if (buffer == null) { log.debug(STR, resourceUri); try (InputStream is = getResourceAsInputStreamWithoutCache()) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); IOHelper.copy(IOHelper.buffered(is), bos); buffer = bos.toByteArray(); } } } log.debug(STR, resourceUr... | /**
* Gets the resource as an input stream considering the cache flag as well.
* <p/>
* If cache is enabled then the resource content is cached in an internal buffer and this content is
* returned to avoid loading the resource over and over again.
*
* @return the input stream
* @throw... | Gets the resource as an input stream considering the cache flag as well. If cache is enabled then the resource content is cached in an internal buffer and this content is returned to avoid loading the resource over and over again | getResourceAsInputStream | {
"repo_name": "punkhorn/camel-upstream",
"path": "core/camel-support/src/main/java/org/apache/camel/component/ResourceEndpoint.java",
"license": "apache-2.0",
"size": 6400
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.InputStream",
"org.apache.camel.util.IOHelper"
] | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import org.apache.camel.util.IOHelper; | import java.io.*; import org.apache.camel.util.*; | [
"java.io",
"org.apache.camel"
] | java.io; org.apache.camel; | 930,836 |
public static <T> int hashCodeForSet(final Collection<T> set) {
if (set == null) {
return 0;
}
int hashCode = 0;
for (final T obj : set) {
if (obj != null) {
hashCode += obj.hashCode();
}
}
return hashCode;
}
... | static <T> int function(final Collection<T> set) { if (set == null) { return 0; } int hashCode = 0; for (final T obj : set) { if (obj != null) { hashCode += obj.hashCode(); } } return hashCode; } /** * Returns a synchronized set backed by the given set. * <p> * You must manually synchronize on the returned set's iterat... | /**
* Generates a hash code using the algorithm specified in
* {@link java.util.Set#hashCode()}.
* <p>
* This method is useful for implementing <code>Set</code> when you cannot
* extend AbstractSet. The method takes Collection instances to enable other
* collection types to use the Set imp... | Generates a hash code using the algorithm specified in <code>java.util.Set#hashCode()</code>. This method is useful for implementing <code>Set</code> when you cannot extend AbstractSet. The method takes Collection instances to enable other collection types to use the Set implementation algorithm | hashCodeForSet | {
"repo_name": "krivachy/compgs03_mutation_testing",
"path": "src/main/java/org/apache/commons/collections4/SetUtils.java",
"license": "apache-2.0",
"size": 12929
} | [
"java.util.Collection",
"java.util.Set"
] | import java.util.Collection; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,463,401 |
context.addPropertyAccessor(new BeanFactoryAccessor());
context.setBeanResolver(new BeanFactoryResolver(applicationContext));
context.setRootObject(applicationContext);
} | context.addPropertyAccessor(new BeanFactoryAccessor()); context.setBeanResolver(new BeanFactoryResolver(applicationContext)); context.setRootObject(applicationContext); } | /**
* To set application context
* @param applicationContext must not be {@literal null}.
* @throws BeansException the bean exception
*/ | To set application context | setApplicationContext | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentEntity.java",
"license": "mit",
"size": 2069
} | [
"org.springframework.context.expression.BeanFactoryAccessor",
"org.springframework.context.expression.BeanFactoryResolver"
] | import org.springframework.context.expression.BeanFactoryAccessor; import org.springframework.context.expression.BeanFactoryResolver; | import org.springframework.context.expression.*; | [
"org.springframework.context"
] | org.springframework.context; | 2,104,470 |
public static double getValueAsDouble(byte[] key,
NavigableMap<byte[], byte[]> infoValues) {
byte[] value = infoValues.get(key);
if (value != null) {
return Bytes.toDouble(value);
} else {
return 0.0;
}
} | static double function(byte[] key, NavigableMap<byte[], byte[]> infoValues) { byte[] value = infoValues.get(key); if (value != null) { return Bytes.toDouble(value); } else { return 0.0; } } | /**
* return a value from the NavigableMap as a Double
* @param key to be looked up for the value
* @param infoValues - the map containing the key values
* @return value as Double or 0.0
*/ | return a value from the NavigableMap as a Double | getValueAsDouble | {
"repo_name": "ogre0403/hraven",
"path": "hraven-core/src/main/java/com/twitter/hraven/util/ByteUtil.java",
"license": "apache-2.0",
"size": 10013
} | [
"java.util.NavigableMap",
"org.apache.hadoop.hbase.util.Bytes"
] | import java.util.NavigableMap; import org.apache.hadoop.hbase.util.Bytes; | import java.util.*; import org.apache.hadoop.hbase.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 676,996 |
public File getCurrentDir() {
return new File(root, STORAGE_DIR_CURRENT);
} | File function() { return new File(root, STORAGE_DIR_CURRENT); } | /**
* Directory {@code current} contains latest files defining
* the file system meta-data.
*
* @return the directory path
*/ | Directory current contains latest files defining the file system meta-data | getCurrentDir | {
"repo_name": "messi49/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java",
"license": "apache-2.0",
"size": 40355
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,681,076 |
@Nonnull
public ThumbnailSetRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | ThumbnailSetRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/ThumbnailSetRequest.java",
"license": "mit",
"size": 5772
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 192,100 |
public void onClick_left(View v){
double longitudeDouble = Double.valueOf(longitude);
longitudeDouble -= scrollSpeed/Math.pow(2,zoom);
longitude = "" + longitudeDouble;
showMap();
}
| void function(View v){ double longitudeDouble = Double.valueOf(longitude); longitudeDouble -= scrollSpeed/Math.pow(2,zoom); longitude = "" + longitudeDouble; showMap(); } | /**
* Decreases the center point's longitude (moves the map west) and updates with a new map image.
*
* The longitude decrease is proportional to the zoom level, so a consistent "movement" of the map is achieved
* regardless of zoom level.
*/ | Decreases the center point's longitude (moves the map west) and updates with a new map image. The longitude decrease is proportional to the zoom level, so a consistent "movement" of the map is achieved regardless of zoom level | onClick_left | {
"repo_name": "CMPUT301W15T14/ExpenseExpress",
"path": "src/team14/expenseexpress/maps/MapActivity.java",
"license": "gpl-3.0",
"size": 11058
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,266,682 |
@Override
public SimpleEdgeStream<K, EV> filterVertices(FilterFunction<Vertex<K, NullValue>> filter) {
DataStream<Edge<K, EV>> remainingEdges = this.edges
.filter(new ApplyVertexFilterToEdges<K, EV>(filter));
return new SimpleEdgeStream<>(remainingEdges, this.context);
}
private static final cla... | SimpleEdgeStream<K, EV> function(FilterFunction<Vertex<K, NullValue>> filter) { DataStream<Edge<K, EV>> remainingEdges = this.edges .filter(new ApplyVertexFilterToEdges<K, EV>(filter)); return new SimpleEdgeStream<>(remainingEdges, this.context); } private static final class ApplyVertexFilterToEdges<K, EV> implements F... | /**
* Apply a filter to each vertex in the graph stream
* Since this is an edge-only stream, the vertex filter can only access the key of vertices
*
* @param filter the filter function to apply.
* @return the filtered graph stream.
*/ | Apply a filter to each vertex in the graph stream Since this is an edge-only stream, the vertex filter can only access the key of vertices | filterVertices | {
"repo_name": "BenjaminSchiller/FlinkWrapper",
"path": "src/main/java/org/apache/flink/graph/streaming/SimpleEdgeStream.java",
"license": "apache-2.0",
"size": 18058
} | [
"org.apache.flink.api.common.functions.FilterFunction",
"org.apache.flink.graph.Edge",
"org.apache.flink.graph.Vertex",
"org.apache.flink.streaming.api.datastream.DataStream",
"org.apache.flink.types.NullValue"
] | import org.apache.flink.api.common.functions.FilterFunction; import org.apache.flink.graph.Edge; import org.apache.flink.graph.Vertex; import org.apache.flink.streaming.api.datastream.DataStream; import org.apache.flink.types.NullValue; | import org.apache.flink.api.common.functions.*; import org.apache.flink.graph.*; import org.apache.flink.streaming.api.datastream.*; import org.apache.flink.types.*; | [
"org.apache.flink"
] | org.apache.flink; | 784,474 |
public static BitSet union(BitSet set0, BitSet... sets) {
final BitSet s = (BitSet) set0.clone();
for (BitSet set : sets) {
s.or(set);
}
return s;
} | static BitSet function(BitSet set0, BitSet... sets) { final BitSet s = (BitSet) set0.clone(); for (BitSet set : sets) { s.or(set); } return s; } | /** Returns a BitSet that is the union of the given BitSets. Does not modify
* any of the inputs. */ | Returns a BitSet that is the union of the given BitSets. Does not modify | union | {
"repo_name": "sreev/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/util/BitSets.java",
"license": "apache-2.0",
"size": 10403
} | [
"java.util.BitSet"
] | import java.util.BitSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,539,552 |
@VisibleForTesting static URI getClassPathEntry(File jarFile, String path)
throws URISyntaxException {
URI uri = new URI(path);
return uri.isAbsolute()
? uri
: new File(jarFile.getParentFile(), path.replace('/', File.separatorChar)).toURI();
}
} | @VisibleForTesting static URI getClassPathEntry(File jarFile, String path) throws URISyntaxException { URI uri = new URI(path); return uri.isAbsolute() ? uri : new File(jarFile.getParentFile(), path.replace('/', File.separatorChar)).toURI(); } } | /**
* Returns the absolute uri of the Class-Path entry value as specified in
* <a
* href="http://docs.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#Main%20Attributes">
* JAR File Specification</a>. Even though the specification only talks about relative urls,
* absolute urls are actual... | Returns the absolute uri of the Class-Path entry value as specified in JAR File Specification. Even though the specification only talks about relative urls, absolute urls are actually supported too (for example, in Maven surefire plugin) | getClassPathEntry | {
"repo_name": "cmelchior/caliper",
"path": "old/caliper/main/java/com/google/caliper/runner/JarFinder.java",
"license": "apache-2.0",
"size": 7180
} | [
"com.google.common.annotations.VisibleForTesting",
"java.io.File",
"java.net.URISyntaxException"
] | import com.google.common.annotations.VisibleForTesting; import java.io.File; import java.net.URISyntaxException; | import com.google.common.annotations.*; import java.io.*; import java.net.*; | [
"com.google.common",
"java.io",
"java.net"
] | com.google.common; java.io; java.net; | 1,750,381 |
@SuppressWarnings("deprecation")
public void setBehindWidth(int i) {
int width;
Display display = ((WindowManager) getContext().getSystemService(
Context.WINDOW_SERVICE)).getDefaultDisplay();
try {
Class<?> cls = Display.class;
Class<?>[] parameterTypes = { Point.class };
Point parameter = new Po... | @SuppressWarnings(STR) void function(int i) { int width; Display display = ((WindowManager) getContext().getSystemService( Context.WINDOW_SERVICE)).getDefaultDisplay(); try { Class<?> cls = Display.class; Class<?>[] parameterTypes = { Point.class }; Point parameter = new Point(); Method method = cls.getMethod(STR, para... | /**
* Sets the behind width.
*
* @param i
* The width the Sliding Menu will open to, in pixels
*/ | Sets the behind width | setBehindWidth | {
"repo_name": "Amuck/SlidingMenuLib",
"path": "src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java",
"license": "apache-2.0",
"size": 30629
} | [
"android.content.Context",
"android.graphics.Point",
"android.view.Display",
"android.view.WindowManager",
"java.lang.reflect.Method"
] | import android.content.Context; import android.graphics.Point; import android.view.Display; import android.view.WindowManager; import java.lang.reflect.Method; | import android.content.*; import android.graphics.*; import android.view.*; import java.lang.reflect.*; | [
"android.content",
"android.graphics",
"android.view",
"java.lang"
] | android.content; android.graphics; android.view; java.lang; | 1,671,986 |
public static KeyStore getKeystore() {
KeyStore trustStore = null;
try {
trustStore = KeyStore.getInstance(KeyStore.getDefaultType());
trustStore.load(null, null);
} catch (Throwable t) {
t.printStackTrace();
}
return trustStore;
} | static KeyStore function() { KeyStore trustStore = null; try { trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); trustStore.load(null, null); } catch (Throwable t) { t.printStackTrace(); } return trustStore; } | /**
* Gets a Default KeyStore
*
* @return KeyStore
*/ | Gets a Default KeyStore | getKeystore | {
"repo_name": "jinmiao0601/demo",
"path": "app/src/main/java/com/appcutt/libs/net/http/MySSLSocketFactory.java",
"license": "apache-2.0",
"size": 7299
} | [
"java.security.KeyStore"
] | import java.security.KeyStore; | import java.security.*; | [
"java.security"
] | java.security; | 834,603 |
EAttribute getLocationType_IncludeSource(); | EAttribute getLocationType_IncludeSource(); | /**
* Returns the meta object for the attribute '{@link bitub.support.p2.LocationType#isIncludeSource <em>Include Source</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Include Source</em>'.
* @see bitub.support.p2.LocationType#isIncludeSource()
... | Returns the meta object for the attribute '<code>bitub.support.p2.LocationType#isIncludeSource Include Source</code>'. | getLocationType_IncludeSource | {
"repo_name": "bekraft/bitub.support",
"path": "plugins/bitub.support.p2/src-gen/bitub/support/p2/P2Package.java",
"license": "epl-1.0",
"size": 41896
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 55,428 |
public static boolean isExprCall(Node n) {
return n.isExprResult()
&& n.getFirstChild().isCall();
} | static boolean function(Node n) { return n.isExprResult() && n.getFirstChild().isCall(); } | /**
* Is this node a call expression statement?
*
* @param n The node
* @return True if {@code n} is EXPR_RESULT and {@code n}'s
* first child is CALL
*/ | Is this node a call expression statement | isExprCall | {
"repo_name": "shantanusharma/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 180617
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 533,333 |
public ShortAssert assertShort(int index) {
Object value = value(index);
return Assertions.assertShort(value);
} | ShortAssert function(int index) { Object value = value(index); return Assertions.assertShort(value); } | /**
* Asserts that there is a {@link Short} at the given index returning the
* {@link ShortAssert} object so that further assertions can be chained
*/ | Asserts that there is a <code>Short</code> at the given index returning the <code>ShortAssert</code> object so that further assertions can be chained | assertShort | {
"repo_name": "dhirajsb/fabric8",
"path": "components/jolokia-assertions/src/main/java/io/fabric8/jolokia/assertions/JSONArrayAssert.java",
"license": "apache-2.0",
"size": 6834
} | [
"org.assertj.core.api.ShortAssert"
] | import org.assertj.core.api.ShortAssert; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 767,797 |
@ZapApiIgnore
public String[] getSecurityProtocolsEnabled() {
return Arrays.copyOf(securityProtocolsEnabled, securityProtocolsEnabled.length);
} | String[] function() { return Arrays.copyOf(securityProtocolsEnabled, securityProtocolsEnabled.length); } | /**
* Returns the security protocols enabled (SSL/TLS) for outgoing connections.
*
* @return the security protocols enabled for outgoing connections.
* @since 2.3.0
*/ | Returns the security protocols enabled (SSL/TLS) for outgoing connections | getSecurityProtocolsEnabled | {
"repo_name": "gmaran23/zaproxy",
"path": "zap/src/main/java/org/parosproxy/paros/network/ConnectionParam.java",
"license": "apache-2.0",
"size": 40611
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,345,247 |
public SVGAnimatedString getIn1() {
return in;
} | SVGAnimatedString function() { return in; } | /**
* <b>DOM</b>: Implements {@link
* SVGFEDisplacementMapElement#getIn1()}.
*/ | DOM: Implements <code>SVGFEDisplacementMapElement#getIn1()</code> | getIn1 | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMFEDisplacementMapElement.java",
"license": "apache-2.0",
"size": 6084
} | [
"org.w3c.dom.svg.SVGAnimatedString"
] | import org.w3c.dom.svg.SVGAnimatedString; | import org.w3c.dom.svg.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,772,056 |
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
if (key.equals(IContentOutlinePage.class)) {
return showOutlineView() ? getContentOutlinePage() : null;
}
else if (key.equals(IPropertySheetPage.class)) {
return getPropertySheetPage();
}
else if (key.equals(IGotoMarker.c... | @SuppressWarnings(STR) Object function(Class key) { if (key.equals(IContentOutlinePage.class)) { return showOutlineView() ? getContentOutlinePage() : null; } else if (key.equals(IPropertySheetPage.class)) { return getPropertySheetPage(); } else if (key.equals(IGotoMarker.class)) { return this; } else { return super.get... | /**
* This is how the framework determines which interfaces we implement.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This is how the framework determines which interfaces we implement. | getAdapter | {
"repo_name": "KAMP-Research/KAMP",
"path": "bundles/Toometa/de.uka.ipd.sdq.dsexplore.qml.contracttype.editor/src/de/uka/ipd/sdq/dsexplore/qml/contracttype/presentation/QMLContractTypeEditor.java",
"license": "apache-2.0",
"size": 55387
} | [
"org.eclipse.ui.ide.IGotoMarker",
"org.eclipse.ui.views.contentoutline.IContentOutlinePage",
"org.eclipse.ui.views.properties.IPropertySheetPage"
] | import org.eclipse.ui.ide.IGotoMarker; import org.eclipse.ui.views.contentoutline.IContentOutlinePage; import org.eclipse.ui.views.properties.IPropertySheetPage; | import org.eclipse.ui.ide.*; import org.eclipse.ui.views.contentoutline.*; import org.eclipse.ui.views.properties.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 2,757,979 |
@Override
public DcObject createItem() {
return new Loan();
} | DcObject function() { return new Loan(); } | /**
* Creates a new instance of a loan.
* @see Loan
*/ | Creates a new instance of a loan | createItem | {
"repo_name": "alexeq/datacrown",
"path": "datacrow-core/_source/net/datacrow/core/modules/LoanModule.java",
"license": "gpl-3.0",
"size": 7053
} | [
"net.datacrow.core.objects.DcObject",
"net.datacrow.core.objects.Loan"
] | import net.datacrow.core.objects.DcObject; import net.datacrow.core.objects.Loan; | import net.datacrow.core.objects.*; | [
"net.datacrow.core"
] | net.datacrow.core; | 2,856,616 |
Map<Long, ConfigGroup> getConfigGroups(); | Map<Long, ConfigGroup> getConfigGroups(); | /**
* Get config groups associated with this cluster
* @return unmodifiable map of config group id to config group. Will not return null.
*/ | Get config groups associated with this cluster | getConfigGroups | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java",
"license": "apache-2.0",
"size": 24252
} | [
"java.util.Map",
"org.apache.ambari.server.state.configgroup.ConfigGroup"
] | import java.util.Map; import org.apache.ambari.server.state.configgroup.ConfigGroup; | import java.util.*; import org.apache.ambari.server.state.configgroup.*; | [
"java.util",
"org.apache.ambari"
] | java.util; org.apache.ambari; | 860,444 |
void reinitialize(File f) {
if(contains(f)) {
// int row = getRow(f);
// get(row).initialize(f);
// fireTableRowsUpdated(row, row);
}
} | void reinitialize(File f) { if(contains(f)) { } } | /**
* Reinitializes a dataline that is using the given initialize object.
*/ | Reinitializes a dataline that is using the given initialize object | reinitialize | {
"repo_name": "titus08/frostwire-desktop",
"path": "src/com/frostwire/gui/library/LibraryInternetRadioTableModel.java",
"license": "gpl-3.0",
"size": 3564
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,845,011 |
public List<Function> getFunctions(TFunctionCategory category,
String dbName, String fnPattern, boolean exactMatch)
throws DatabaseNotFoundException {
RetryTracker retries = new RetryTracker(
String.format("fetching functions from %s", dbName));
while (true) {
try {
return do... | List<Function> function(TFunctionCategory category, String dbName, String fnPattern, boolean exactMatch) throws DatabaseNotFoundException { RetryTracker retries = new RetryTracker( String.format(STR, dbName)); while (true) { try { return doGetFunctions(category, dbName, fnPattern, exactMatch); } catch(InconsistentMetad... | /**
* Returns all function signatures that match the pattern. If pattern is null,
* matches all functions. If exactMatch is true, treats fnPattern as a function
* name instead of pattern and returns exact match only.
*/ | Returns all function signatures that match the pattern. If pattern is null, matches all functions. If exactMatch is true, treats fnPattern as a function name instead of pattern and returns exact match only | getFunctions | {
"repo_name": "cloudera/Impala",
"path": "fe/src/main/java/org/apache/impala/service/Frontend.java",
"license": "apache-2.0",
"size": 67467
} | [
"java.util.List",
"org.apache.impala.catalog.DatabaseNotFoundException",
"org.apache.impala.catalog.Function",
"org.apache.impala.catalog.local.InconsistentMetadataFetchException",
"org.apache.impala.thrift.TFunctionCategory"
] | import java.util.List; import org.apache.impala.catalog.DatabaseNotFoundException; import org.apache.impala.catalog.Function; import org.apache.impala.catalog.local.InconsistentMetadataFetchException; import org.apache.impala.thrift.TFunctionCategory; | import java.util.*; import org.apache.impala.catalog.*; import org.apache.impala.catalog.local.*; import org.apache.impala.thrift.*; | [
"java.util",
"org.apache.impala"
] | java.util; org.apache.impala; | 886,136 |
public static String[] getNodeAttributes( Node node ) {
NamedNodeMap nnm = node.getAttributes();
if ( nnm != null ) {
String[] attributes = new String[nnm.getLength()];
for ( int i = 0; i < nnm.getLength(); i++ ) {
Node attr = nnm.item( i );
attributes[i] = attr.getNodeName();
... | static String[] function( Node node ) { NamedNodeMap nnm = node.getAttributes(); if ( nnm != null ) { String[] attributes = new String[nnm.getLength()]; for ( int i = 0; i < nnm.getLength(); i++ ) { Node attr = nnm.item( i ); attributes[i] = attr.getNodeName(); } return attributes; } return null; } | /**
* Get all the attributes in a certain node (on the root level)
*
* @param node
* The node to examine
* @return an array of strings containing the names of the attributes.
*/ | Get all the attributes in a certain node (on the root level) | getNodeAttributes | {
"repo_name": "codek/pentaho-kettle",
"path": "core/src/org/pentaho/di/core/xml/XMLHandler.java",
"license": "apache-2.0",
"size": 37433
} | [
"org.w3c.dom.NamedNodeMap",
"org.w3c.dom.Node"
] | import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,743,467 |
public String getMapperClassName() {
return getClass(
PAMapReduceFrameworkProperties
.getPropertyAsString(PAMapReduceFrameworkProperties.HADOOP_MAPPER_CLASS_PROPERTY_NAME
.getKey()), Mapper.class).getName();
} | String function() { return getClass( PAMapReduceFrameworkProperties .getPropertyAsString(PAMapReduceFrameworkProperties.HADOOP_MAPPER_CLASS_PROPERTY_NAME .getKey()), Mapper.class).getName(); } | /**
* Retrieve the {@link Mapper} class for the Hadoop job
*
* @return the {@link Mapper} class
*/ | Retrieve the <code>Mapper</code> class for the Hadoop job | getMapperClassName | {
"repo_name": "acontes/scheduling",
"path": "src/scheduler/src/org/ow2/proactive/scheduler/ext/mapreduce/PAHadoopJobConfiguration.java",
"license": "agpl-3.0",
"size": 16286
} | [
"org.apache.hadoop.mapreduce.Mapper"
] | import org.apache.hadoop.mapreduce.Mapper; | import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 243,451 |
private void adjustTaxLotsUnits(BigDecimal totalTaxLotsUnits, BigDecimal transLineUnits, EndowmentTransactionTaxLotLine oldestTaxLot, boolean isSource) {
if (totalTaxLotsUnits.compareTo(transLineUnits) != 0 && oldestTaxLot != null) {
BigDecimal diff = transLineUnits.subtract(totalTaxLotsUnit... | void function(BigDecimal totalTaxLotsUnits, BigDecimal transLineUnits, EndowmentTransactionTaxLotLine oldestTaxLot, boolean isSource) { if (totalTaxLotsUnits.compareTo(transLineUnits) != 0 && oldestTaxLot != null) { BigDecimal diff = transLineUnits.subtract(totalTaxLotsUnits); if (isSource) { oldestTaxLot.setLotUnits(o... | /**
* Adjusts the oldest tax lot units if the transaction line units do not match the total of the tax lot units.
*
* @param totalTaxLotsUnits
* @param transLineUnits
* @param oldestTaxLot
* @param isSource
*/ | Adjusts the oldest tax lot units if the transaction line units do not match the total of the tax lot units | adjustTaxLotsUnits | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/endow/document/service/impl/UpdateUnitShareAdjustmentDocumentTaxLotsServiceImpl.java",
"license": "agpl-3.0",
"size": 8730
} | [
"java.math.BigDecimal",
"org.kuali.kfs.module.endow.businessobject.EndowmentTransactionTaxLotLine"
] | import java.math.BigDecimal; import org.kuali.kfs.module.endow.businessobject.EndowmentTransactionTaxLotLine; | import java.math.*; import org.kuali.kfs.module.endow.businessobject.*; | [
"java.math",
"org.kuali.kfs"
] | java.math; org.kuali.kfs; | 2,757,164 |
@Transactional
public Result saveManualAssessment(ModelingSubmission modelingSubmission, List<Feedback> modelingAssessment, ModelingExercise modelingExercise) {
Result result = modelingSubmission.getResult();
if (result == null) {
result = new Result();
}
// check the... | Result function(ModelingSubmission modelingSubmission, List<Feedback> modelingAssessment, ModelingExercise modelingExercise) { Result result = modelingSubmission.getResult(); if (result == null) { result = new Result(); } if (result.getCompletionDate() != null) { checkAssessmentDueDate(modelingExercise); } checkGeneral... | /**
* This function is used for saving a manual assessment/result. It sets the assessment type to MANUAL and sets the assessor attribute. Furthermore, it saves the result in the
* database.
*
* @param modelingSubmission the modeling submission to which the feedback belongs to
* @param modelingA... | This function is used for saving a manual assessment/result. It sets the assessment type to MANUAL and sets the assessor attribute. Furthermore, it saves the result in the database | saveManualAssessment | {
"repo_name": "ls1intum/ArTEMiS",
"path": "src/main/java/de/tum/in/www1/artemis/service/ModelingAssessmentService.java",
"license": "mit",
"size": 6526
} | [
"de.tum.in.www1.artemis.domain.Feedback",
"de.tum.in.www1.artemis.domain.Result",
"de.tum.in.www1.artemis.domain.User",
"de.tum.in.www1.artemis.domain.enumeration.AssessmentType",
"de.tum.in.www1.artemis.domain.modeling.ModelingExercise",
"de.tum.in.www1.artemis.domain.modeling.ModelingSubmission",
"jav... | import de.tum.in.www1.artemis.domain.Feedback; import de.tum.in.www1.artemis.domain.Result; import de.tum.in.www1.artemis.domain.User; import de.tum.in.www1.artemis.domain.enumeration.AssessmentType; import de.tum.in.www1.artemis.domain.modeling.ModelingExercise; import de.tum.in.www1.artemis.domain.modeling.ModelingSu... | import de.tum.in.www1.artemis.domain.*; import de.tum.in.www1.artemis.domain.enumeration.*; import de.tum.in.www1.artemis.domain.modeling.*; import java.util.*; | [
"de.tum.in",
"java.util"
] | de.tum.in; java.util; | 1,703,461 |
public static Aspect.Builder all(Collection<Class<? extends Component>> types) {
return new Builder().all(types);
} | static Aspect.Builder function(Collection<Class<? extends Component>> types) { return new Builder().all(types); } | /**
* Returns an aspect where an entity must possess all of the specified
* component types.
*
* @param types
* a required component type
*
* @return an aspect that can be matched against entities
*/ | Returns an aspect where an entity must possess all of the specified component types | all | {
"repo_name": "snorrees/artemis-odb",
"path": "artemis/src/main/java/com/artemis/Aspect.java",
"license": "apache-2.0",
"size": 10707
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,677,845 |
public String replacement(String input) {
Matcher matcher = pattern.matcher(input);
if (matcher.matches()) {
StringBuilder sb = new StringBuilder();
boolean group = false;
for (int i = 0; i < rule.length(); i++) {
char c... | String function(String input) { Matcher matcher = pattern.matcher(input); if (matcher.matches()) { StringBuilder sb = new StringBuilder(); boolean group = false; for (int i = 0; i < rule.length(); i++) { char ch = rule.charAt(i); if (group) { sb.append(matcher.group(Character.digit(ch, 10))); group = false; } else if (... | /**
* Replace the input if it matches the pattern.
*
* @param input the input string.
* @return the replacement, if the input matches, otherwise null.
*/ | Replace the input if it matches the pattern | replacement | {
"repo_name": "agentlab/org.glassfish.jersey",
"path": "plugins/org.glassfish.jersey.common/src/main/java/org/glassfish/jersey/message/internal/NounInflector.java",
"license": "epl-1.0",
"size": 27261
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 940,029 |
public boolean wasInsertedDuringTransaction(EntityPersister persister, Serializable id);
public static interface NaturalIdHelper {
public static final Serializable INVALID_NATURAL_ID_REFERENCE = new Serializable() {}; | boolean function(EntityPersister persister, Serializable id); public static interface NaturalIdHelper { public static final Serializable INVALID_NATURAL_ID_REFERENCE = new Serializable() {}; | /**
* Allows callers to check to see if the identified entity was inserted during the current transaction.
*
* @param persister The entity persister
* @param id The id
*
* @return True if inserted during this transaction, false otherwise.
*/ | Allows callers to check to see if the identified entity was inserted during the current transaction | wasInsertedDuringTransaction | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/main/java/org/hibernate/engine/spi/PersistenceContext.java",
"license": "mit",
"size": 29150
} | [
"java.io.Serializable",
"org.hibernate.persister.entity.EntityPersister"
] | import java.io.Serializable; import org.hibernate.persister.entity.EntityPersister; | import java.io.*; import org.hibernate.persister.entity.*; | [
"java.io",
"org.hibernate.persister"
] | java.io; org.hibernate.persister; | 2,835,838 |
public List<Concept> process(Query query) {
List<Facet> facets = query.getFacets();
if (facets != null) {
for (Facet facet : facets) {
facet.accept(visitor);
}
}
return null;
} | List<Concept> function(Query query) { List<Facet> facets = query.getFacets(); if (facets != null) { for (Facet facet : facets) { facet.accept(visitor); } } return null; } | /**
* Transforms a query into a list of concepts contained in the query
*
* @param query The query
* @return A list of concepts
*/ | Transforms a query into a list of concepts contained in the query | process | {
"repo_name": "mucke/mucke",
"path": "mucke-backend/src/main/java/at/tuwien/mucke/query/QueryManager.java",
"license": "gpl-3.0",
"size": 6006
} | [
"at.tuwien.mucke.concept.Concept",
"at.tuwien.mucke.documentmodel.Facet",
"java.util.List"
] | import at.tuwien.mucke.concept.Concept; import at.tuwien.mucke.documentmodel.Facet; import java.util.List; | import at.tuwien.mucke.concept.*; import at.tuwien.mucke.documentmodel.*; import java.util.*; | [
"at.tuwien.mucke",
"java.util"
] | at.tuwien.mucke; java.util; | 465,762 |
@GET("/hello")
@PermitAll
public Message helloPublic(String who) {
return new Message().setMessage(String.format(
"hello %s, it's %s",
who, DateTime.now().toString("HH:mm:ss")));
}
public static class MyPOJO {
@NotNull
String value;
pu... | @GET(STR) Message function(String who) { return new Message().setMessage(String.format( STR, who, DateTime.now().toString(STR))); } public static class MyPOJO { String value; public String getValue(){ return value; } | /**
* Say hello to anybody.
*
* Does not require authentication.
*
* @return a Message to say hello
*/ | Say hello to anybody. Does not require authentication | helloPublic | {
"repo_name": "code-troopers/jenkins-workflow-demo-repo",
"path": "srv/src/main/java/com/codetroopers/demo/jenkins/rest/HelloResource.java",
"license": "mit",
"size": 1733
} | [
"com.codetroopers.demo.jenkins.domain.Message",
"org.joda.time.DateTime"
] | import com.codetroopers.demo.jenkins.domain.Message; import org.joda.time.DateTime; | import com.codetroopers.demo.jenkins.domain.*; import org.joda.time.*; | [
"com.codetroopers.demo",
"org.joda.time"
] | com.codetroopers.demo; org.joda.time; | 605,848 |
void doDataflowEdit(WorkflowBundle dataflow, Edit<?> edit)
throws EditException; | void doDataflowEdit(WorkflowBundle dataflow, Edit<?> edit) throws EditException; | /**
* Do an {@link Edit} affecting the given {@link WorkflowBundle}.
* <p>
* The edit is {@link Edit#doEdit() performed} and the edit can later be
* undone using {@link EditManager#undoDataflowEdit(WorkflowBundle)}.
* <p>
* Note that any events previously undone with
* {@link EditManager#undoDataflowEdit(... | Do an <code>Edit</code> affecting the given <code>WorkflowBundle</code>. The edit is <code>Edit#doEdit() performed</code> and the edit can later be undone using <code>EditManager#undoDataflowEdit(WorkflowBundle)</code>. Note that any events previously undone with <code>EditManager#undoDataflowEdit(WorkflowBundle)</code... | doDataflowEdit | {
"repo_name": "ThilinaManamgoda/incubator-taverna-workbench",
"path": "taverna-edits-api/src/main/java/org/apache/taverna/workbench/edits/EditManager.java",
"license": "apache-2.0",
"size": 7802
} | [
"org.apache.taverna.scufl2.api.container.WorkflowBundle"
] | import org.apache.taverna.scufl2.api.container.WorkflowBundle; | import org.apache.taverna.scufl2.api.container.*; | [
"org.apache.taverna"
] | org.apache.taverna; | 1,614,416 |
public void viewDisplay(ImageDisplay node, boolean internal)
{
if (!(node instanceof ImageNode)) return;
EventBus bus = DataBrowserAgent.getRegistry().getEventBus();
DataObject data = null;
Object uo = node.getHierarchyObject();
Object go;
ViewImageObject object;
if (uo instanceof ImageData) {
if (... | void function(ImageDisplay node, boolean internal) { if (!(node instanceof ImageNode)) return; EventBus bus = DataBrowserAgent.getRegistry().getEventBus(); DataObject data = null; Object uo = node.getHierarchyObject(); Object go; ViewImageObject object; if (uo instanceof ImageData) { if (model instanceof SearchModel mo... | /**
* Implemented as specified by the {@link DataBrowser} interface.
* @see DataBrowser#viewDisplay(ImageDisplay, boolean)
*/ | Implemented as specified by the <code>DataBrowser</code> interface | viewDisplay | {
"repo_name": "knabar/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowserComponent.java",
"license": "gpl-2.0",
"size": 57362
} | [
"org.openmicroscopy.shoola.agents.dataBrowser.DataBrowserAgent",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.WellSampleNode",
"org.openmicroscopy.shoola.agents.eve... | import org.openmicroscopy.shoola.agents.dataBrowser.DataBrowserAgent; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageDisplay; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode; import org.openmicroscopy.shoola.agents.dataBrowser.browser.WellSampleNode; import org.openmicroscopy.sho... | import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.agents.events.hiviewer.*; import org.openmicroscopy.shoola.agents.events.iviewer.*; import org.openmicroscopy.shoola.env.*; import org.openmicroscopy.shoola.env.data.events.*; import org.openmicroscopy.shoola.env.event.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 684,145 |
private Result pDirectDeclarator$$Tail1(final int yyStart)
throws IOException {
Result yyResult;
int yyBase;
int yyOption1;
Node yyOpValue1;
Action<Node> yyValue;
ParseError yyError = ParseError.DUMMY;
// Alternative 1.
yyResult = pSymbol(yySta... | private Result pDirectDeclarator$$Tail1(final int yyStart) throws IOException { Result yyResult; int yyBase; int yyOption1; Node yyOpValue1; Action<Node> yyValue; ParseError yyError = ParseError.DUMMY; yyResult = pSymbol(yyStart); if (yyResult.hasValue("(")) { yyResult = pPushScope(yyResult.index); yyError = yyResult.s... | /**
* Parse synthetic nonterminal
* xtc.lang.jeannie.Jeannie.DirectDeclarator$$Tail1.
*
* @param yyStart The index.
* @return The result.
* @throws IOException Signals an I/O error.
*/ | Parse synthetic nonterminal xtc.lang.jeannie.Jeannie.DirectDeclarator$$Tail1 | pDirectDeclarator$$Tail1 | {
"repo_name": "wandoulabs/xtc-rats",
"path": "xtc-core/src/main/java/xtc/lang/jeannie/JeannieParser.java",
"license": "lgpl-2.1",
"size": 647687
} | [
"java.io.IOException",
"xtc.parser.ParseError",
"xtc.parser.Result",
"xtc.tree.Node",
"xtc.util.Action"
] | import java.io.IOException; import xtc.parser.ParseError; import xtc.parser.Result; import xtc.tree.Node; import xtc.util.Action; | import java.io.*; import xtc.parser.*; import xtc.tree.*; import xtc.util.*; | [
"java.io",
"xtc.parser",
"xtc.tree",
"xtc.util"
] | java.io; xtc.parser; xtc.tree; xtc.util; | 2,001,435 |
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
super.tightMarshal2(wireFormat, o, dataOut, bs);
DataResponse info = (DataResponse)o;
tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs);
... | void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); DataResponse info = (DataResponse)o; tightMarshalNestedObject2(wireFormat, (DataStructure)info.getData(), dataOut, bs); } | /**
* Write a object instance to data output stream
*
* @param o the instance to be marshaled
* @param dataOut the output stream
* @throws IOException thrown if an error occurs
*/ | Write a object instance to data output stream | tightMarshal2 | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/openwire/v1/DataResponseMarshaller.java",
"license": "epl-1.0",
"size": 4371
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.activemq.command.DataResponse",
"org.apache.activemq.command.DataStructure",
"org.apache.activemq.openwire.BooleanStream",
"org.apache.activemq.openwire.OpenWireFormat"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.command.DataResponse; import org.apache.activemq.command.DataStructure; import org.apache.activemq.openwire.BooleanStream; import org.apache.activemq.openwire.OpenWireFormat; | import java.io.*; import org.apache.activemq.command.*; import org.apache.activemq.openwire.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 1,539,610 |
public Feature[] getPeaks() {
return peaks.values().toArray(new Feature[0]);
}
| Feature[] function() { return peaks.values().toArray(new Feature[0]); } | /**
* Return peaks assigned to this row
*/ | Return peaks assigned to this row | getPeaks | {
"repo_name": "dyrlund/mzmine2",
"path": "src/main/java/net/sf/mzmine/datamodel/impl/SimplePeakListRow.java",
"license": "gpl-2.0",
"size": 8685
} | [
"net.sf.mzmine.datamodel.Feature"
] | import net.sf.mzmine.datamodel.Feature; | import net.sf.mzmine.datamodel.*; | [
"net.sf.mzmine"
] | net.sf.mzmine; | 1,895,610 |
public Map<String, String> getMetadataHeaders() {
return metadataHeaders;
} | Map<String, String> function() { return metadataHeaders; } | /**
* Request metadata headers
* @return mapping <HTTP header name, Metadata key name> for copying HTTP headers to Tile metadata
* @since 31125
*/ | Request metadata headers | getMetadataHeaders | {
"repo_name": "danyalzia/ShortestPath",
"path": "src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java",
"license": "gpl-3.0",
"size": 4416
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,344,988 |
public static UserTransaction getUserTransaction() throws NamingException {
if (utx == null) {
Context ctx= (Context) new InitialContext();
String url = AppConstants.getInstance().getProperty(USERTRANSACTION_URL1_KEY,null);
log.debug("looking up UserTransaction ["+url+"] in context ["+ctx.toString()+"]");... | static UserTransaction function() throws NamingException { if (utx == null) { Context ctx= (Context) new InitialContext(); String url = AppConstants.getInstance().getProperty(USERTRANSACTION_URL1_KEY,null); log.debug(STR+url+STR+ctx.toString()+"]"); try { utx = (UserTransaction)ctx.lookup(url); } catch (Exception e) { ... | /**
* Returns a UserTransaction object, that is used by Receivers and PipeLines to demarcate transactions.
*/ | Returns a UserTransaction object, that is used by Receivers and PipeLines to demarcate transactions | getUserTransaction | {
"repo_name": "smhoekstra/iaf",
"path": "JavaSource/nl/nn/adapterframework/util/JtaUtil.java",
"license": "apache-2.0",
"size": 16518
} | [
"javax.naming.Context",
"javax.naming.InitialContext",
"javax.naming.NamingException",
"javax.transaction.UserTransaction"
] | import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.transaction.UserTransaction; | import javax.naming.*; import javax.transaction.*; | [
"javax.naming",
"javax.transaction"
] | javax.naming; javax.transaction; | 1,441,220 |
protected Object convertToString(Class type, Object value) {
if (value instanceof Date) {
DateFormat df = new SimpleDateFormat(DateUtil.getDatePattern());
if (value instanceof Timestamp) {
df = new SimpleDateFormat(DateUtil.getDateTimePattern());
}
... | Object function(Class type, Object value) { if (value instanceof Date) { DateFormat df = new SimpleDateFormat(DateUtil.getDatePattern()); if (value instanceof Timestamp) { df = new SimpleDateFormat(DateUtil.getDateTimePattern()); } try { return df.format(value); } catch (Exception e) { e.printStackTrace(); throw new Co... | /**
* Convert a java.util.Date to a String
* @param type Date or Timestamp
* @param value value to convert
* @return Converted value for property population
*/ | Convert a java.util.Date to a String | convertToString | {
"repo_name": "kumaramit01/DIY",
"path": "core/src/main/java/org/imirsel/nema/util/DateConverter.java",
"license": "apache-2.0",
"size": 3206
} | [
"java.sql.Timestamp",
"java.text.DateFormat",
"java.text.SimpleDateFormat",
"java.util.Date",
"org.apache.commons.beanutils.ConversionException"
] | import java.sql.Timestamp; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import org.apache.commons.beanutils.ConversionException; | import java.sql.*; import java.text.*; import java.util.*; import org.apache.commons.beanutils.*; | [
"java.sql",
"java.text",
"java.util",
"org.apache.commons"
] | java.sql; java.text; java.util; org.apache.commons; | 176,326 |
Observable<TopicSearchResult> searchInTopic(User user, Topic topic, long startFromPostId, String word, String author, boolean firstSearch); | Observable<TopicSearchResult> searchInTopic(User user, Topic topic, long startFromPostId, String word, String author, boolean firstSearch); | /**
* Searches a particular word and/or author in a topic, starting at a given post id.
*/ | Searches a particular word and/or author in a topic, starting at a given post id | searchInTopic | {
"repo_name": "Ayuget/Redface",
"path": "app/src/main/java/com/ayuget/redface/data/api/MDService.java",
"license": "apache-2.0",
"size": 5380
} | [
"com.ayuget.redface.data.api.model.Topic",
"com.ayuget.redface.data.api.model.TopicSearchResult",
"com.ayuget.redface.data.api.model.User"
] | import com.ayuget.redface.data.api.model.Topic; import com.ayuget.redface.data.api.model.TopicSearchResult; import com.ayuget.redface.data.api.model.User; | import com.ayuget.redface.data.api.model.*; | [
"com.ayuget.redface"
] | com.ayuget.redface; | 1,432,525 |
int opus_multistream_encode_float(PointerByReference st, FloatByReference pcm, int frame_size, Pointer data,
int max_data_bytes); | int opus_multistream_encode_float(PointerByReference st, FloatByReference pcm, int frame_size, Pointer data, int max_data_bytes); | /**
* Opus multistream encode float.
*
* @param st the st
* @param pcm the pcm
* @param frame_size the frame size
* @param data the data
* @param max_data_bytes the max data bytes
* @return the int
*/ | Opus multistream encode float | opus_multistream_encode_float | {
"repo_name": "lpatino10/android-sdk",
"path": "library/src/main/java/com/ibm/watson/developer_cloud/android/library/audio/opus/JNAOpus.java",
"license": "apache-2.0",
"size": 40064
} | [
"com.sun.jna.Pointer",
"com.sun.jna.ptr.FloatByReference",
"com.sun.jna.ptr.PointerByReference"
] | import com.sun.jna.Pointer; import com.sun.jna.ptr.FloatByReference; import com.sun.jna.ptr.PointerByReference; | import com.sun.jna.*; import com.sun.jna.ptr.*; | [
"com.sun.jna"
] | com.sun.jna; | 554,740 |
public void setMaxSize( int maxRows , int maxCols )
{
this.maxRows = maxRows; this.maxCols = maxCols;
Q = new DenseMatrix64F(maxRows,maxRows);
R = new DenseMatrix64F(maxRows,maxCols);
Y = new DenseMatrix64F(maxRows,1);
Z = new DenseMatrix64F(maxRows,1);
} | void function( int maxRows , int maxCols ) { this.maxRows = maxRows; this.maxCols = maxCols; Q = new DenseMatrix64F(maxRows,maxRows); R = new DenseMatrix64F(maxRows,maxCols); Y = new DenseMatrix64F(maxRows,1); Z = new DenseMatrix64F(maxRows,1); } | /**
* Changes the size of the matrix it can solve for
*
* @param maxRows Maximum number of rows in the matrix it will decompose.
* @param maxCols Maximum number of columns in the matrix it will decompose.
*/ | Changes the size of the matrix it can solve for | setMaxSize | {
"repo_name": "benralexander/efficient-java-matrix-library",
"path": "src/org/ejml/alg/dense/linsol/qr/LinearSolverQr.java",
"license": "apache-2.0",
"size": 4507
} | [
"org.ejml.data.DenseMatrix64F"
] | import org.ejml.data.DenseMatrix64F; | import org.ejml.data.*; | [
"org.ejml.data"
] | org.ejml.data; | 2,422,904 |
protected void onSelected() {
// Fire change
ValueChangeEvent.fire(this, value);
} | void function() { ValueChangeEvent.fire(this, value); } | /**
* Fire ValueChangeHandler classes attached to this object if there are any.
*
*/ | Fire ValueChangeHandler classes attached to this object if there are any | onSelected | {
"repo_name": "freemed/freemed",
"path": "ui/gwt/src/main/java/org/freemedsoftware/gwt/client/widget/AsyncPicklistWidgetBase.java",
"license": "gpl-2.0",
"size": 6939
} | [
"com.google.gwt.event.logical.shared.ValueChangeEvent"
] | import com.google.gwt.event.logical.shared.ValueChangeEvent; | import com.google.gwt.event.logical.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,791,881 |
public void setCancelDate(Date cancelDate) {
this.cancelDate = cancelDate;
} | void function(Date cancelDate) { this.cancelDate = cancelDate; } | /**
* Sets the cancelDate attribute value.
*
* @param cancelDate The cancelDate to set.
*/ | Sets the cancelDate attribute value | setCancelDate | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/DisbursementVoucherDocument.java",
"license": "agpl-3.0",
"size": 80760
} | [
"java.sql.Date"
] | import java.sql.Date; | import java.sql.*; | [
"java.sql"
] | java.sql; | 899,694 |
public K lastKey() {
if ( size == 0 ) throw new NoSuchElementException();
return key[ last ];
}
public Comparator <? super K> comparator() { return null; } | K function() { if ( size == 0 ) throw new NoSuchElementException(); return key[ last ]; } public Comparator <? super K> comparator() { return null; } | /** Returns the last key of this map in iteration order.
*
* @return the last key in iteration order.
*/ | Returns the last key of this map in iteration order | lastKey | {
"repo_name": "karussell/fastutil",
"path": "src/it/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap.java",
"license": "apache-2.0",
"size": 49106
} | [
"java.util.Comparator",
"java.util.NoSuchElementException"
] | import java.util.Comparator; import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 1,351,356 |
private void testCaseExecution() throws InterruptedException, RemoteException {
LOG.entering("ManInTheMiddle", "testCaseExecution()");
//Collection<MethodDescription> remainingMethods = schedule.methods();
//while (remainingMethods.size() > 0) {
while(true) {
MethodDesc... | void function() throws InterruptedException, RemoteException { LOG.entering(STR, STR); while(true) { MethodDescription md = tester.takeMethodDescription(); this.methodExecution(md); this.waitForExecutionFinished(); } } | /**
* Waits for execution messages from parent and dispatches to children.
*
* @throws InterruptedException
* @throws RemoteException
*/ | Waits for execution messages from parent and dispatches to children | testCaseExecution | {
"repo_name": "sunye/Macaw",
"path": "horda-coordinator/src/main/java/org/atlanmod/horda/coordinator/distributed/MiddleTester.java",
"license": "gpl-3.0",
"size": 10016
} | [
"java.rmi.RemoteException",
"org.atlanmod.commons.common.MethodDescription"
] | import java.rmi.RemoteException; import org.atlanmod.commons.common.MethodDescription; | import java.rmi.*; import org.atlanmod.commons.common.*; | [
"java.rmi",
"org.atlanmod.commons"
] | java.rmi; org.atlanmod.commons; | 482,896 |
public static void writeIteratorsToConf(Class<?> implementingClass, Configuration conf,
Collection<IteratorSetting> iterators) {
String confKey = enumToConfKey(implementingClass, ScanOpts.ITERATORS);
StringBuilder iterBuilder = new StringBuilder();
int count = 0;
for (IteratorSetting cfg : itera... | static void function(Class<?> implementingClass, Configuration conf, Collection<IteratorSetting> iterators) { String confKey = enumToConfKey(implementingClass, ScanOpts.ITERATORS); StringBuilder iterBuilder = new StringBuilder(); int count = 0; for (IteratorSetting cfg : iterators) { ByteArrayOutputStream baos = new By... | /**
* Serialize the iterators to the hadoop configuration under one key.
*/ | Serialize the iterators to the hadoop configuration under one key | writeIteratorsToConf | {
"repo_name": "phrocker/accumulo-1",
"path": "hadoop-mapreduce/src/main/java/org/apache/accumulo/hadoopImpl/mapreduce/lib/InputConfigurator.java",
"license": "apache-2.0",
"size": 38769
} | [
"java.io.ByteArrayOutputStream",
"java.io.DataOutputStream",
"java.io.IOException",
"java.util.Base64",
"java.util.Collection",
"org.apache.accumulo.core.client.IteratorSetting",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.util.StringUtils"
] | import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.Base64; import java.util.Collection; import org.apache.accumulo.core.client.IteratorSetting; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.StringUtils; | import java.io.*; import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*; | [
"java.io",
"java.util",
"org.apache.accumulo",
"org.apache.hadoop"
] | java.io; java.util; org.apache.accumulo; org.apache.hadoop; | 2,396,535 |
public static String getString(Context context, String key) {
SharedPreferences mainPref =
context.getSharedPreferences(context.getResources()
.getString(R.string.shared_pref_package),
Context.MODE_PRIVATE
);
return mainPref.getStri... | static String function(Context context, String key) { SharedPreferences mainPref = context.getSharedPreferences(context.getResources() .getString(R.string.shared_pref_package), Context.MODE_PRIVATE ); return mainPref.getString(key, null); } | /**
* Retrieve string data from shared preferences in private mode.
* @param context - The context of activity which is requesting to put data.
* @param key - Used to identify the value to to be retrieved.
*/ | Retrieve string data from shared preferences in private mode | getString | {
"repo_name": "laki88/product-mdm",
"path": "modules/mobile-agents/android/system-service/app/src/main/java/org/wso2/emm/system/service/utils/Preference.java",
"license": "apache-2.0",
"size": 5646
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 1,655,310 |
@Nullable
public Teamwork patch(@Nonnull final Teamwork sourceTeamwork) throws ClientException {
return send(HttpMethod.PATCH, sourceTeamwork);
} | Teamwork function(@Nonnull final Teamwork sourceTeamwork) throws ClientException { return send(HttpMethod.PATCH, sourceTeamwork); } | /**
* Patches this Teamwork with a source
*
* @param sourceTeamwork the source object with updates
* @return the updated Teamwork
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/ | Patches this Teamwork with a source | patch | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TeamworkRequest.java",
"license": "mit",
"size": 5705
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.Teamwork",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.Teamwork; import javax.annotation.Nonnull; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,350,712 |
public OperatorGraph build(Class<? extends FlowDescription> flowClass) {
FlowDescription description = analyze(flowClass);
return driver.build(description);
} | OperatorGraph function(Class<? extends FlowDescription> flowClass) { FlowDescription description = analyze(flowClass); return driver.build(description); } | /**
* Builds an operator graph.
* @param flowClass the target flow-part class
* @return the built operator graph
*/ | Builds an operator graph | build | {
"repo_name": "akirakw/asakusafw-compiler",
"path": "compiler-project/analyzer/src/main/java/com/asakusafw/lang/compiler/analyzer/FlowPartBuilder.java",
"license": "apache-2.0",
"size": 9955
} | [
"com.asakusafw.lang.compiler.model.graph.OperatorGraph",
"com.asakusafw.vocabulary.flow.FlowDescription"
] | import com.asakusafw.lang.compiler.model.graph.OperatorGraph; import com.asakusafw.vocabulary.flow.FlowDescription; | import com.asakusafw.lang.compiler.model.graph.*; import com.asakusafw.vocabulary.flow.*; | [
"com.asakusafw.lang",
"com.asakusafw.vocabulary"
] | com.asakusafw.lang; com.asakusafw.vocabulary; | 438,004 |
public PointF getDrawablePointFromTouchPoint(PointF p) {
return transformCoordTouchToBitmap(p.x, p.y, true);
} | PointF function(PointF p) { return transformCoordTouchToBitmap(p.x, p.y, true); } | /**
* For a given point on the view (ie, a touch event), returns the
* point relative to the original drawable's coordinate system.
*
* @param p
* @return PointF relative to original drawable's coordinate system.
*/ | For a given point on the view (ie, a touch event), returns the point relative to the original drawable's coordinate system | getDrawablePointFromTouchPoint | {
"repo_name": "mirajp1/footprints-x4-android",
"path": "app/src/main/java/com/techo/fpx4/TouchImageView.java",
"license": "gpl-2.0",
"size": 31550
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,162,727 |
public UpdateResponse deleteById(String id, int commitWithinMs) throws SolrServerException, IOException {
UpdateRequest req = new UpdateRequest();
req.deleteById(id);
req.setCommitWithin(commitWithinMs);
return req.process(this);
} | UpdateResponse function(String id, int commitWithinMs) throws SolrServerException, IOException { UpdateRequest req = new UpdateRequest(); req.deleteById(id); req.setCommitWithin(commitWithinMs); return req.process(this); } | /**
* Deletes a single document by unique ID, specifying max time before commit
* @param id the ID of the document to delete
* @param commitWithinMs max time (in ms) before a commit will happen
* @throws SolrServerException
* @throws IOException
* @since 3.6
*/ | Deletes a single document by unique ID, specifying max time before commit | deleteById | {
"repo_name": "Lythimus/lptv",
"path": "apache-solr-3.6.0/solr/solrj/src/java/org/apache/solr/client/solrj/SolrServer.java",
"license": "gpl-2.0",
"size": 12363
} | [
"java.io.IOException",
"org.apache.solr.client.solrj.request.UpdateRequest",
"org.apache.solr.client.solrj.response.UpdateResponse"
] | import java.io.IOException; import org.apache.solr.client.solrj.request.UpdateRequest; import org.apache.solr.client.solrj.response.UpdateResponse; | import java.io.*; import org.apache.solr.client.solrj.request.*; import org.apache.solr.client.solrj.response.*; | [
"java.io",
"org.apache.solr"
] | java.io; org.apache.solr; | 698,035 |
public String munge( String str )
{
if ( str == null )
return Str.EMPTY;
str = Str.trimToNull(WHITESPACE_REGEX.matcher(str).replaceAll(" "));
if ( str == null )
return Str.EMPTY;
for ( Munger munger : mungers )
{
final String munged = munger.munge(str);
if ( munged != nul... | String function( String str ) { if ( str == null ) return Str.EMPTY; str = Str.trimToNull(WHITESPACE_REGEX.matcher(str).replaceAll(" ")); if ( str == null ) return Str.EMPTY; for ( Munger munger : mungers ) { final String munged = munger.munge(str); if ( munged != null ) return munged; } return str; } | /**
* Perform the substitution operation on the string.
*
* @param str
* String to perform the substitution on.
* @return The substituted string, or <code>str</code> trimmed of any leading
* and trailing white space if there was no substitution.
*/ | Perform the substitution operation on the string | munge | {
"repo_name": "evmcl/erudite",
"path": "src/main/java/com/evanmclean/erudite/config/TitleMunger.java",
"license": "apache-2.0",
"size": 6024
} | [
"com.evanmclean.evlib.lang.Str"
] | import com.evanmclean.evlib.lang.Str; | import com.evanmclean.evlib.lang.*; | [
"com.evanmclean.evlib"
] | com.evanmclean.evlib; | 53,606 |
private void initData(Context context) {
gestureDetector = new GestureDetector(context, gestureListener);
gestureDetector.setIsLongpressEnabled(false);
scroller = new Scroller(context);
} | void function(Context context) { gestureDetector = new GestureDetector(context, gestureListener); gestureDetector.setIsLongpressEnabled(false); scroller = new Scroller(context); } | /**
* Initializes class data
*
* @param context
* the context
*/ | Initializes class data | initData | {
"repo_name": "slowfall/tel",
"path": "TLEShine/src/com/tranway/Oband_Fitnessband/widget/WheelView.java",
"license": "apache-2.0",
"size": 25412
} | [
"android.content.Context",
"android.view.GestureDetector",
"android.widget.Scroller"
] | import android.content.Context; import android.view.GestureDetector; import android.widget.Scroller; | import android.content.*; import android.view.*; import android.widget.*; | [
"android.content",
"android.view",
"android.widget"
] | android.content; android.view; android.widget; | 1,718,186 |
@Override
public Application getApplicationById(int id) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(id);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
... | Application function(int id) throws APIManagementException { Application application = apiMgtDAO.getApplicationById(id); if (application != null) { Set<APIKey> keys = getApplicationKeys(application.getId()); for (APIKey key : keys) { application.addKey(key); } } return application; } | /**
* Returns the corresponding application given the Id
* @param id Id of the Application
* @return it will return Application corresponds to the id.
* @throws APIManagementException
*/ | Returns the corresponding application given the Id | getApplicationById | {
"repo_name": "jaadds/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java",
"license": "apache-2.0",
"size": 317390
} | [
"java.util.Set",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.APIKey",
"org.wso2.carbon.apimgt.api.model.Application"
] | import java.util.Set; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIKey; import org.wso2.carbon.apimgt.api.model.Application; | import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 945,007 |
@Override
protected JPanel createButtonPanel() {
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
JButton copyBtn = new JButton("Copy to clipboard");
copyBtn.addActionListener(e -> copyToClipboard());
panel.add(copyBtn);
JButton okBtn = new JButton("Don... | JPanel function() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5)); JButton copyBtn = new JButton(STR); copyBtn.addActionListener(e -> copyToClipboard()); panel.add(copyBtn); JButton okBtn = new JButton("Done"); okBtn.addActionListener(e -> onOK()); panel.add(okBtn); return panel; } | /**
* Creates the button panel with 'Done' and 'Copy to clipboard' buttons.
*
* @return the button panel
*/ | Creates the button panel with 'Done' and 'Copy to clipboard' buttons | createButtonPanel | {
"repo_name": "geotools/geotools",
"path": "modules/unsupported/swing/src/main/java/org/geotools/swing/dialog/JAboutDialog.java",
"license": "lgpl-2.1",
"size": 9108
} | [
"java.awt.FlowLayout",
"javax.swing.JButton",
"javax.swing.JPanel"
] | import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 535,204 |
@Test
public void testInLoGetPosition() throws IOException {
Repository<InductionLoop> inLoRepo = conn.getInductionLoopRepository();
InductionLoop loop = inLoRepo.getByID("e1_0");
assertEquals(30, loop.getPosition(), 0);
}
| void function() throws IOException { Repository<InductionLoop> inLoRepo = conn.getInductionLoopRepository(); InductionLoop loop = inLoRepo.getByID("e1_0"); assertEquals(30, loop.getPosition(), 0); } | /**
* Checks the get position method of an induction loop (E1).
*
* @throws IOException
*/ | Checks the get position method of an induction loop (E1) | testInLoGetPosition | {
"repo_name": "702nADOS/sumo",
"path": "tools/contributed/traci4j/test/java/it/polito/appeal/traci/test/TraCITest.java",
"license": "gpl-3.0",
"size": 32242
} | [
"it.polito.appeal.traci.InductionLoop",
"it.polito.appeal.traci.Repository",
"java.io.IOException",
"org.junit.Assert"
] | import it.polito.appeal.traci.InductionLoop; import it.polito.appeal.traci.Repository; import java.io.IOException; import org.junit.Assert; | import it.polito.appeal.traci.*; import java.io.*; import org.junit.*; | [
"it.polito.appeal",
"java.io",
"org.junit"
] | it.polito.appeal; java.io; org.junit; | 1,797,906 |
private static PBXObjectRef createPBXBuildFile(PBXObjectRef fileRef,
Map<String, Object> settings) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("fileRef", fileRef);
map.put("isa", "PBXBuildFile");
if (settings !... | static PBXObjectRef function(PBXObjectRef fileRef, Map<String, Object> settings) { Map<String, Object> map = new HashMap<String, Object>(); map.put(STR, fileRef); map.put("isa", STR); if (settings != null) { map.put(STR, settings); } return new PBXObjectRef(map); } | /**
* Create PBXBuildFile.
*
* @param fileRef source file.
* @param settings build settings.
* @return PBXBuildFile.
*/ | Create PBXBuildFile | createPBXBuildFile | {
"repo_name": "dougm/ant-contrib-cpptasks",
"path": "src/main/java/net/sf/antcontrib/cpptasks/apple/XcodeProjectWriter.java",
"license": "apache-2.0",
"size": 41651
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,994,869 |
public String makeDisplayValue(MessageBroker messageBroker, Parameter parameter) {
Codes codes = getCodes();
if (isSingleValue()) {
String sValue = formatValue(parameter,getSingleValue().getValue());
sValue = codes.lookupDisplayValue(messageBroker,sValue);
return sValue;
} else {
S... | String function(MessageBroker messageBroker, Parameter parameter) { Codes codes = getCodes(); if (isSingleValue()) { String sValue = formatValue(parameter,getSingleValue().getValue()); sValue = codes.lookupDisplayValue(messageBroker,sValue); return sValue; } else { StringBuffer sb = new StringBuffer(); String sDelimite... | /**
* Makes the display value for a parameter.
* <p/>
* The output component is suitable for display on the
* metadata details page.
* @param messageBroker the message broker
* @param parameter the associated parameter
* @return the UI input component
*/ | Makes the display value for a parameter. The output component is suitable for display on the metadata details page | makeDisplayValue | {
"repo_name": "Esri/geoportal-server",
"path": "geoportal/src/com/esri/gpt/catalog/schema/Content.java",
"license": "apache-2.0",
"size": 24264
} | [
"com.esri.gpt.framework.jsf.MessageBroker",
"com.esri.gpt.framework.util.Val"
] | import com.esri.gpt.framework.jsf.MessageBroker; import com.esri.gpt.framework.util.Val; | import com.esri.gpt.framework.jsf.*; import com.esri.gpt.framework.util.*; | [
"com.esri.gpt"
] | com.esri.gpt; | 540,848 |
@SuppressWarnings("rawtypes")
public PurApItem getItemByLineNumber(int lineNumber) {
for (Iterator iter = items.iterator(); iter.hasNext(); ) {
PurApItem item = (PurApItem) iter.next();
if (item.getItemLineNumber().intValue() == lineNumber) {
return item;
... | @SuppressWarnings(STR) PurApItem function(int lineNumber) { for (Iterator iter = items.iterator(); iter.hasNext(); ) { PurApItem item = (PurApItem) iter.next(); if (item.getItemLineNumber().intValue() == lineNumber) { return item; } } return null; } | /**
* Iterates through the items of the document and returns the item with the line number equal to the number given, or null if a
* match is not found.
*
* @param lineNumber line number to match on.
* @return the PurchasingAp Item if a match is found, else null.
*/ | Iterates through the items of the document and returns the item with the line number equal to the number given, or null if a match is not found | getItemByLineNumber | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/document/PurchasingAccountsPayableDocumentBase.java",
"license": "agpl-3.0",
"size": 52309
} | [
"java.util.Iterator",
"org.kuali.kfs.module.purap.businessobject.PurApItem"
] | import java.util.Iterator; import org.kuali.kfs.module.purap.businessobject.PurApItem; | import java.util.*; import org.kuali.kfs.module.purap.businessobject.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 19,083 |
public void invertExpense(int recordID) {
SelectBillDetails billDet = new SelectBillDetails();
billDet.SelectBillDetailsWithID("" + recordID);
//System.out.println(billDet.toString());
InsertIncome newInc = new InsertIncome(Integer.parseInt(billDet.getCID()),billDet.getPrice(),billDe... | void function(int recordID) { SelectBillDetails billDet = new SelectBillDetails(); billDet.SelectBillDetailsWithID("" + recordID); InsertIncome newInc = new InsertIncome(Integer.parseInt(billDet.getCID()),billDet.getPrice(),billDet.getDateOfPayment(),billDet.getComment()); } | /**
* This method will invert an expense record by creating the reverse income
* record
*/ | This method will invert an expense record by creating the reverse income record | invertExpense | {
"repo_name": "nickapos/myBill",
"path": "src/main/java/gr/oncrete/nick/mybill/BusinessLogic/InvertRecord.java",
"license": "gpl-3.0",
"size": 1816
} | [
"gr.oncrete.nick.mybill.BusinessLogic"
] | import gr.oncrete.nick.mybill.BusinessLogic; | import gr.oncrete.nick.mybill.*; | [
"gr.oncrete.nick"
] | gr.oncrete.nick; | 2,640,617 |
public static Map<Bytes, Set<Column>> toRCM(String... entries) {
Map<Bytes, Set<Column>> ret = new HashMap<>();
for (String entry : entries) {
String[] rcv = entry.split(",");
if (rcv.length != 2) {
throw new IllegalArgumentException(
"expected <row>,<col fam>:<col qual>[:col ... | static Map<Bytes, Set<Column>> function(String... entries) { Map<Bytes, Set<Column>> ret = new HashMap<>(); for (String entry : entries) { String[] rcv = entry.split(","); if (rcv.length != 2) { throw new IllegalArgumentException( STR + entry); } Bytes row = Bytes.of(rcv[0]); String[] colFields = rcv[1].split(":"); Col... | /**
* toRCM stands for "To Row Column Map". This is a convenience function that takes strings of the
* format {@code <row>,<col fam>:<col qual>[:col vis]} and generates a row, column map.
*/ | toRCM stands for "To Row Column Map". This is a convenience function that takes strings of the format ,:[:col vis] and generates a row, column map | toRCM | {
"repo_name": "keith-turner/fluo-recipes",
"path": "modules/core/src/test/java/org/apache/fluo/recipes/core/types/MockSnapshotBase.java",
"license": "apache-2.0",
"size": 5440
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.apache.fluo.api.data.Bytes",
"org.apache.fluo.api.data.Column"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.fluo.api.data.Bytes; import org.apache.fluo.api.data.Column; | import java.util.*; import org.apache.fluo.api.data.*; | [
"java.util",
"org.apache.fluo"
] | java.util; org.apache.fluo; | 1,319,268 |
// TODO should probably be pulled up as a common API
public static String getHostPort(SocketAddress socketAddress) {
if (socketAddress == null) {
return ThriftConstants.UNKNOWN_ADDRESS;
}
if (socketAddress instanceof InetSocketAddress) {
InetSocketAddress ad... | static String function(SocketAddress socketAddress) { if (socketAddress == null) { return ThriftConstants.UNKNOWN_ADDRESS; } if (socketAddress instanceof InetSocketAddress) { InetSocketAddress addr = (InetSocketAddress)socketAddress; return addr.getHostName() + ":" + addr.getPort(); } return getSocketAddress(socketAddr... | /**
* Returns the hostname and port information retrieved from the given {@link SocketAddress}.
*
* @param inetSocketAddress the <tt>InetSocketAddress</tt> instance to retrieve the host/port information from
* @return the host/port retrieved from the given <tt>socketAddress</tt>,
* o... | Returns the hostname and port information retrieved from the given <code>SocketAddress</code> | getHostPort | {
"repo_name": "gspandy/pinpoint",
"path": "plugins/thrift/src/main/java/com/navercorp/pinpoint/plugin/thrift/ThriftUtils.java",
"license": "apache-2.0",
"size": 7206
} | [
"java.net.InetSocketAddress",
"java.net.SocketAddress"
] | import java.net.InetSocketAddress; import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 34,675 |
@Override
public int update(final Uri uri, final ContentValues values,
final String where, final String[] whereArgs) {
Helpers.validateSelection(where, sAppReadableColumnsSet);
SQLiteDatabase db = mOpenHelper.getWritableDatabase();
int count;
boolean startService =... | int function(final Uri uri, final ContentValues values, final String where, final String[] whereArgs) { Helpers.validateSelection(where, sAppReadableColumnsSet); SQLiteDatabase db = mOpenHelper.getWritableDatabase(); int count; boolean startService = false; if (values.containsKey(Downloads.Impl.COLUMN_DELETED)) { if (v... | /**
* Updates a row in the database
*/ | Updates a row in the database | update | {
"repo_name": "msafin/wmc",
"path": "src/com/sharegogo/wireless/download/DownloadProvider.java",
"license": "gpl-2.0",
"size": 48644
} | [
"android.content.ContentValues",
"android.content.Context",
"android.content.Intent",
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"android.net.Uri",
"android.os.Binder",
"android.os.Process"
] | import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.net.Uri; import android.os.Binder; import android.os.Process; | import android.content.*; import android.database.*; import android.database.sqlite.*; import android.net.*; import android.os.*; | [
"android.content",
"android.database",
"android.net",
"android.os"
] | android.content; android.database; android.net; android.os; | 2,061,463 |
ChronoLocalDate getMaximumLocalDate(); | ChronoLocalDate getMaximumLocalDate(); | /**
* Get the maximum value for the column.
* @return maximum value as a LocalDate
*/ | Get the maximum value for the column | getMaximumLocalDate | {
"repo_name": "omalley/orc",
"path": "java/core/src/java/org/apache/orc/DateColumnStatistics.java",
"license": "apache-2.0",
"size": 1884
} | [
"java.time.chrono.ChronoLocalDate"
] | import java.time.chrono.ChronoLocalDate; | import java.time.chrono.*; | [
"java.time"
] | java.time; | 1,847,580 |
@Schema(example = "ACME Corp.", description = "User's company")
public String getCompany() {
return company;
} | @Schema(example = STR, description = STR) String function() { return company; } | /**
* User's company
* @return company
**/ | User's company | getCompany | {
"repo_name": "iterate-ch/cyberduck",
"path": "brick/src/main/java/ch/cyberduck/core/brick/io/swagger/client/model/UsersBody.java",
"license": "gpl-3.0",
"size": 36113
} | [
"io.swagger.v3.oas.annotations.media.Schema"
] | import io.swagger.v3.oas.annotations.media.Schema; | import io.swagger.v3.oas.annotations.media.*; | [
"io.swagger.v3"
] | io.swagger.v3; | 976,705 |
public void setProperties(Properties props, boolean printProps) {
this.props = props;
StringBuilder sb = new StringBuilder(stringRep);
for (Enumeration e = props.propertyNames(); e.hasMoreElements();) {
String key = (String) e.nextElement();
String val = props.getProperty(key);
if ... | void function(Properties props, boolean printProps) { this.props = props; StringBuilder sb = new StringBuilder(stringRep); for (Enumeration e = props.propertyNames(); e.hasMoreElements();) { String key = (String) e.nextElement(); String val = props.getProperty(key); if (!(key.length() == 0 && val.length() == 0)) { if (... | /**
* Initialize using values in Properties file.
*
* @param props
* The properties object used for initialization
* @param printProps
* Whether to print the properties to stderr as it works.
*/ | Initialize using values in Properties file | setProperties | {
"repo_name": "PeterisP/LVTagger",
"path": "src/main/java/edu/stanford/nlp/sequences/SeqClassifierFlags.java",
"license": "gpl-2.0",
"size": 92782
} | [
"edu.stanford.nlp.optimization.StochasticCalculateMethods",
"edu.stanford.nlp.process.WordShapeClassifier",
"edu.stanford.nlp.util.ReflectionLoading",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.Properties",
"java.util.StringTokenizer"
] | import edu.stanford.nlp.optimization.StochasticCalculateMethods; import edu.stanford.nlp.process.WordShapeClassifier; import edu.stanford.nlp.util.ReflectionLoading; import java.util.ArrayList; import java.util.Enumeration; import java.util.Properties; import java.util.StringTokenizer; | import edu.stanford.nlp.optimization.*; import edu.stanford.nlp.process.*; import edu.stanford.nlp.util.*; import java.util.*; | [
"edu.stanford.nlp",
"java.util"
] | edu.stanford.nlp; java.util; | 900,304 |
public void testGetFileLinkPathForDeletedFile() throws IOException, SAXException {
final HashMap<String,Path> pathMap = createPathMap("rawchangelog-with-deleted-file");
final Path path = pathMap.get("bar");
final URL fileLink = bitbucketWeb.getFileLink(path);
assertEquals(BITBUCKET_U... | void function() throws IOException, SAXException { final HashMap<String,Path> pathMap = createPathMap(STR); final Path path = pathMap.get("bar"); final URL fileLink = bitbucketWeb.getFileLink(path); assertEquals(BITBUCKET_URL + STR, String.valueOf(fileLink)); } | /**
* Test method for {@link BitbucketWeb#getFileLink(hudson.plugins.git.GitChangeSet.Path)}.
* @throws org.xml.sax.SAXException
* @throws java.io.IOException
*/ | Test method for <code>BitbucketWeb#getFileLink(hudson.plugins.git.GitChangeSet.Path)</code> | testGetFileLinkPathForDeletedFile | {
"repo_name": "jglick/git-plugin",
"path": "src/test/java/hudson/plugins/git/browser/BitbucketWebTest.java",
"license": "mit",
"size": 5128
} | [
"hudson.plugins.git.GitChangeSet",
"java.io.IOException",
"java.util.HashMap",
"org.xml.sax.SAXException"
] | import hudson.plugins.git.GitChangeSet; import java.io.IOException; import java.util.HashMap; import org.xml.sax.SAXException; | import hudson.plugins.git.*; import java.io.*; import java.util.*; import org.xml.sax.*; | [
"hudson.plugins.git",
"java.io",
"java.util",
"org.xml.sax"
] | hudson.plugins.git; java.io; java.util; org.xml.sax; | 709,874 |
FlowScope getOutcomeFlowScope(int nodeType, boolean outcome) {
if (nodeType == Token.AND && outcome ||
nodeType == Token.OR && !outcome) {
// We know that the whole expression must have executed.
return rightScope;
} else {
return getJoinedFlowScope();
}
}
} | FlowScope getOutcomeFlowScope(int nodeType, boolean outcome) { if (nodeType == Token.AND && outcome nodeType == Token.OR && !outcome) { return rightScope; } else { return getJoinedFlowScope(); } } } | /**
* Gets the outcome scope if we do know the outcome of the entire
* expression.
*/ | Gets the outcome scope if we do know the outcome of the entire expression | getOutcomeFlowScope | {
"repo_name": "superkonduktr/closure-compiler",
"path": "src/com/google/javascript/jscomp/TypeInference.java",
"license": "apache-2.0",
"size": 64389
} | [
"com.google.javascript.jscomp.type.FlowScope",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.jscomp.type.FlowScope; import com.google.javascript.rhino.Token; | import com.google.javascript.jscomp.type.*; import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,211,348 |
private void simulateSkeleton() {
if (constraints != null && constraints.size() > 0) {
boolean applyStaticConstraints = true;
if (animations != null) {
TempVars vars = TempVars.get();
AnimChannel animChannel = animControl.createChannel();
... | void function() { if (constraints != null && constraints.size() > 0) { boolean applyStaticConstraints = true; if (animations != null) { TempVars vars = TempVars.get(); AnimChannel animChannel = animControl.createChannel(); for (Animation animation : animations) { float[] animationTimeBoundaries = this.computeAnimationT... | /**
* Simulates the bone node.
*/ | Simulates the bone node | simulateSkeleton | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "branches/3.0/engine/src/blender/com/clockwork/scene/plugins/blender/constraints/SimulationNode.java",
"license": "apache-2.0",
"size": 18526
} | [
"com.clockwork.animation.AnimChannel",
"com.clockwork.animation.Animation",
"com.clockwork.animation.Bone",
"com.clockwork.animation.BoneTrack",
"com.clockwork.animation.Track",
"com.clockwork.math.Quaternion",
"com.clockwork.math.Transform",
"com.clockwork.math.Vector3f",
"com.clockwork.util.TempVa... | import com.clockwork.animation.AnimChannel; import com.clockwork.animation.Animation; import com.clockwork.animation.Bone; import com.clockwork.animation.BoneTrack; import com.clockwork.animation.Track; import com.clockwork.math.Quaternion; import com.clockwork.math.Transform; import com.clockwork.math.Vector3f; import... | import com.clockwork.animation.*; import com.clockwork.math.*; import com.clockwork.util.*; import java.util.*; | [
"com.clockwork.animation",
"com.clockwork.math",
"com.clockwork.util",
"java.util"
] | com.clockwork.animation; com.clockwork.math; com.clockwork.util; java.util; | 1,361,267 |
public final Property<HistoricalTimeSeriesMaster> historicalTimeSeriesMaster() {
return metaBean().historicalTimeSeriesMaster().createProperty(this);
} | final Property<HistoricalTimeSeriesMaster> function() { return metaBean().historicalTimeSeriesMaster().createProperty(this); } | /**
* Gets the the {@code historicalTimeSeriesMaster} property.
* @return the property, not null
*/ | Gets the the historicalTimeSeriesMaster property | historicalTimeSeriesMaster | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Web/src/main/java/com/opengamma/web/historicaltimeseries/WebHistoricalTimeSeriesData.java",
"license": "apache-2.0",
"size": 17835
} | [
"com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesMaster",
"org.joda.beans.Property"
] | import com.opengamma.master.historicaltimeseries.HistoricalTimeSeriesMaster; import org.joda.beans.Property; | import com.opengamma.master.historicaltimeseries.*; import org.joda.beans.*; | [
"com.opengamma.master",
"org.joda.beans"
] | com.opengamma.master; org.joda.beans; | 920,976 |
return CodeChangeSettings.class.equals(clazz);
}
/**
* {@inheritDoc} | return CodeChangeSettings.class.equals(clazz); } /** * {@inheritDoc} | /**
* This validator only supports {@link org.codeqinvest.quality.CodeChangeSettings} type.
*/ | This validator only supports <code>org.codeqinvest.quality.CodeChangeSettings</code> type | supports | {
"repo_name": "CodeQInvest/codeq-invest",
"path": "web-ui/src/main/java/org/codeqinvest/web/project/CodeChangeSettingsValidator.java",
"license": "gpl-3.0",
"size": 1824
} | [
"org.codeqinvest.quality.CodeChangeSettings"
] | import org.codeqinvest.quality.CodeChangeSettings; | import org.codeqinvest.quality.*; | [
"org.codeqinvest.quality"
] | org.codeqinvest.quality; | 1,371,957 |
void save(Data buff, FileStore file, UndoLog log) {
buff.reset();
append(buff, log);
filePos = (int) (file.getFilePointer() / Constants.FILE_BLOCK_SIZE);
file.write(buff.getBytes(), 0, buff.length());
row = null;
state = STORED;
} | void save(Data buff, FileStore file, UndoLog log) { buff.reset(); append(buff, log); filePos = (int) (file.getFilePointer() / Constants.FILE_BLOCK_SIZE); file.write(buff.getBytes(), 0, buff.length()); row = null; state = STORED; } | /**
* Save the row in the file using a buffer.
*
* @param buff the buffer
* @param file the file
* @param log the undo log
*/ | Save the row in the file using a buffer | save | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/engine/UndoLogRecord.java",
"license": "mpl-2.0",
"size": 7995
} | [
"org.h2.store.Data",
"org.h2.store.FileStore"
] | import org.h2.store.Data; import org.h2.store.FileStore; | import org.h2.store.*; | [
"org.h2.store"
] | org.h2.store; | 1,731,692 |
public long getTimeDurationHelper(String name, String vStr, TimeUnit unit) {
vStr = vStr.trim();
vStr = StringUtils.toLowerCase(vStr);
ParsedTimeDuration vUnit = ParsedTimeDuration.unitFor(vStr);
if (null == vUnit) {
logDeprecation("No unit for " + name + "(" + vStr + ") ... | long function(String name, String vStr, TimeUnit unit) { vStr = vStr.trim(); vStr = StringUtils.toLowerCase(vStr); ParsedTimeDuration vUnit = ParsedTimeDuration.unitFor(vStr); if (null == vUnit) { logDeprecation(STR + name + "(" + vStr + STR + unit); vUnit = ParsedTimeDuration.unitFor(unit); } else { vStr = vStr.substr... | /**
* Return time duration in the given time unit. Valid units are encoded in properties as
* suffixes: nanoseconds (ns), microseconds (us), milliseconds (ms), seconds (s), minutes (m),
* hours (h), and days (d).
*
* @param name Property name
* @param vStr The string value with time unit s... | Return time duration in the given time unit. Valid units are encoded in properties as suffixes: nanoseconds (ns), microseconds (us), milliseconds (ms), seconds (s), minutes (m), hours (h), and days (d) | getTimeDurationHelper | {
"repo_name": "apache/flink",
"path": "flink-filesystems/flink-fs-hadoop-shaded/src/main/java/org/apache/hadoop/conf/Configuration.java",
"license": "apache-2.0",
"size": 134180
} | [
"java.util.concurrent.TimeUnit",
"org.apache.hadoop.util.StringUtils"
] | import java.util.concurrent.TimeUnit; import org.apache.hadoop.util.StringUtils; | import java.util.concurrent.*; import org.apache.hadoop.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,962,119 |
@Selector
public void getSessionsForDeviceOwner(Person teacher, HttpRequest request) {
Transaction tx = teacher.tx().getPackage().connect(teacher);
try {
// The device's label is included in the request and the
// device should be retrieved using the label.
... | void function(Person teacher, HttpRequest request) { Transaction tx = teacher.tx().getPackage().connect(teacher); try { Device device = (Device) APIUtils.getObjectFromRequest(STR, teacher.tx(), request); Iterable<Device> devices = Persons.getOwnedDevices(teacher.tx(), teacher); if (device != null) { boolean contains = ... | /**
* Is called by a teacher user to get the list of sessions for a device. The
* teacher should be the owner of the device. If the deivce is null, the
* method finds the sessions for all devices owned by the teacher
*
* @param teacher
* The Person object containing the teacher... | Is called by a teacher user to get the list of sessions for a device. The teacher should be the owner of the device. If the deivce is null, the method finds the sessions for all devices owned by the teacher | getSessionsForDeviceOwner | {
"repo_name": "whilkes/realm-platform",
"path": "api/src/main/java/net/realmproject/platform/api/ITeacherAPIReceiver.java",
"license": "gpl-3.0",
"size": 22648
} | [
"java.io.IOException",
"java.util.ArrayList",
"net.objectof.corc.web.v2.HttpRequest",
"net.objectof.model.Transaction",
"net.realmproject.platform.api.utils.APIUtils",
"net.realmproject.platform.schema.Device",
"net.realmproject.platform.schema.Person",
"net.realmproject.platform.schema.Session",
"n... | import java.io.IOException; import java.util.ArrayList; import net.objectof.corc.web.v2.HttpRequest; import net.objectof.model.Transaction; import net.realmproject.platform.api.utils.APIUtils; import net.realmproject.platform.schema.Device; import net.realmproject.platform.schema.Person; import net.realmproject.platfor... | import java.io.*; import java.util.*; import net.objectof.corc.web.v2.*; import net.objectof.model.*; import net.realmproject.platform.api.utils.*; import net.realmproject.platform.schema.*; import net.realmproject.platform.util.*; import net.realmproject.platform.util.model.*; | [
"java.io",
"java.util",
"net.objectof.corc",
"net.objectof.model",
"net.realmproject.platform"
] | java.io; java.util; net.objectof.corc; net.objectof.model; net.realmproject.platform; | 2,167,393 |
public float setupProgress() throws IOException; | float function() throws IOException; | /**
* Get the <i>progress</i> of the job's setup-tasks, as a float between 0.0
* and 1.0. When all setup tasks have completed, the function returns 1.0.
*
* @return the progress of the job's setup-tasks.
* @throws IOException
*/ | Get the progress of the job's setup-tasks, as a float between 0.0 and 1.0. When all setup tasks have completed, the function returns 1.0 | setupProgress | {
"repo_name": "apache/hadoop-common",
"path": "src/mapred/org/apache/hadoop/mapred/RunningJob.java",
"license": "apache-2.0",
"size": 5750
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 238,243 |
public SamlSpMetadataBuilder signingCertificate(X509Certificate signingCertificate) {
this.signingCertificate = signingCertificate;
return this;
} | SamlSpMetadataBuilder function(X509Certificate signingCertificate) { this.signingCertificate = signingCertificate; return this; } | /**
* The certificate that the service provider users to sign SAML requests.
*/ | The certificate that the service provider users to sign SAML requests | signingCertificate | {
"repo_name": "robin13/elasticsearch",
"path": "x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/saml/SamlSpMetadataBuilder.java",
"license": "apache-2.0",
"size": 18509
} | [
"java.security.cert.X509Certificate"
] | import java.security.cert.X509Certificate; | import java.security.cert.*; | [
"java.security"
] | java.security; | 2,531,206 |
private void initialize() {
frame = new JFrame();
frame.setIconImage(Toolkit.getDefaultToolkit().getImage(
ArmasNPC.class
.getResource("/images/Historias de Zagas, logo.png")));
frame.setTitle("Historias de Zagas");
frame.setBounds(100, 100, 380, 301);
frame.setLocationRelativeTo(null);
... | void function() { frame = new JFrame(); frame.setIconImage(Toolkit.getDefaultToolkit().getImage( ArmasNPC.class .getResource(STR))); frame.setTitle(STR); frame.setBounds(100, 100, 380, 301); frame.setLocationRelativeTo(null); frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.setResizable(false); frame.g... | /**
* Initialize the contents of the frame.
*/ | Initialize the contents of the frame | initialize | {
"repo_name": "ZagasTales/HistoriasdeZagas",
"path": "src Graf/es/thesinsprods/zagastales/juegozagas/jugar/master/InfoAcc3NPC.java",
"license": "cc0-1.0",
"size": 7615
} | [
"java.awt.Color",
"java.awt.Toolkit",
"javax.swing.JFrame",
"javax.swing.JScrollPane",
"javax.swing.JTextArea",
"javax.swing.JTextField"
] | import java.awt.Color; import java.awt.Toolkit; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,686,327 |
static boolean nodeTypeMayHaveSideEffects(Node n) {
return nodeTypeMayHaveSideEffects(n, null);
} | static boolean nodeTypeMayHaveSideEffects(Node n) { return nodeTypeMayHaveSideEffects(n, null); } | /**
* Returns true if the current node's type implies side effects.
*
* This is a non-recursive version of the may have side effects
* check; used to check wherever the current node's type is one of
* the reason's why a subtree has side effects.
*/ | Returns true if the current node's type implies side effects. This is a non-recursive version of the may have side effects check; used to check wherever the current node's type is one of the reason's why a subtree has side effects | nodeTypeMayHaveSideEffects | {
"repo_name": "007slm/kissy",
"path": "tools/module-compiler/src/com/google/javascript/jscomp/NodeUtil.java",
"license": "mit",
"size": 77263
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,186,516 |
public VendorCreditMemoDocument getCreditMemoDocumentById(Integer purchasingDocumentIdentifier); | VendorCreditMemoDocument function(Integer purchasingDocumentIdentifier); | /**
* Retrieves the Credit Memo document by the purapDocumentIdentifier.
*
* @param purchasingDocumentIdentifier The purapDocumentIdentifier of the credit memo to be retrieved.
* @return The credit memo document whose purapDocumentIdentifier matches the input parameter... | Retrieves the Credit Memo document by the purapDocumentIdentifier | getCreditMemoDocumentById | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/document/service/CreditMemoService.java",
"license": "agpl-3.0",
"size": 7182
} | [
"org.kuali.kfs.module.purap.document.VendorCreditMemoDocument"
] | import org.kuali.kfs.module.purap.document.VendorCreditMemoDocument; | import org.kuali.kfs.module.purap.document.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 991,290 |
@Pure
@Inline(value = "$3.compare($1, $2)", constantExpression = true, imported = Integer.class)
public static int operator_spaceship(short left, int right) {
return Integer.compare(left, right);
} | @Inline(value = STR, constantExpression = true, imported = Integer.class) static int function(short left, int right) { return Integer.compare(left, right); } | /** The number comparison operator. This is equivalent to the Java
* {@code compareTo} function on numbers. This function is null-safe.
*
* @param left a number
* @param right a number.
* @return the value {@code 0} if {@code left == right};
* a value less than {@code 0} if {@code left < right}; ... | The number comparison operator. This is equivalent to the Java compareTo function on numbers. This function is null-safe | operator_spaceship | {
"repo_name": "sarl/sarl",
"path": "main/coreplugins/io.sarl.lang.core/src/io/sarl/lang/scoping/extensions/numbers/comparison/PrimitiveShortComparisonExtensions.java",
"license": "apache-2.0",
"size": 13360
} | [
"org.eclipse.xtext.xbase.lib.Inline"
] | import org.eclipse.xtext.xbase.lib.Inline; | import org.eclipse.xtext.xbase.lib.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 138,410 |
public ControllerAxis getAxis(Driver driver, Axis.Type axisType) throws Exception {
ControllerAxis found = null;
for (ControllerAxis axis : getAxes(driver)) {
if (axis.getType() == axisType) {
if (found != null) {
// Make this future-proof:
... | ControllerAxis function(Driver driver, Axis.Type axisType) throws Exception { ControllerAxis found = null; for (ControllerAxis axis : getAxes(driver)) { if (axis.getType() == axisType) { if (found != null) { throw new Exception(STR+found.getName()+STR+axis.getName()+STR+axisType+STR); } found = axis; } } return found; ... | /**
* From the AxisLocation, return the driver axis of the given type.
*
* @param driver
* @param axisType
* @return
* @throws Exception
*/ | From the AxisLocation, return the driver axis of the given type | getAxis | {
"repo_name": "openpnp/openpnp",
"path": "src/main/java/org/openpnp/model/AxesLocation.java",
"license": "gpl-3.0",
"size": 23830
} | [
"org.openpnp.spi.Axis",
"org.openpnp.spi.ControllerAxis",
"org.openpnp.spi.Driver"
] | import org.openpnp.spi.Axis; import org.openpnp.spi.ControllerAxis; import org.openpnp.spi.Driver; | import org.openpnp.spi.*; | [
"org.openpnp.spi"
] | org.openpnp.spi; | 2,094,882 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.