method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private int parseCurrentNumber(ByteBuf buffer) { int number = 0; int readerIndex = buffer.readerIndex(); byte b = 0; while (true) { if (!buffer.isReadable()) return Integer.MIN_VALUE; b = buffer.readByte(); if (Character.isDigit(b)) { number = number * 10 + (int) (b -...
int function(ByteBuf buffer) { int number = 0; int readerIndex = buffer.readerIndex(); byte b = 0; while (true) { if (!buffer.isReadable()) return Integer.MIN_VALUE; b = buffer.readByte(); if (Character.isDigit(b)) { number = number * 10 + (int) (b - '0'); readerIndex++; } else { buffer.readerIndex(readerIndex); break;...
/** * Helper method to parse the number at the beginning of the buffer * * @param buffer Buffer to read * @return The number found at the beginning of the buffer */
Helper method to parse the number at the beginning of the buffer
parseCurrentNumber
{ "repo_name": "pivotal-amurmann/geode", "path": "geode-core/src/main/java/org/apache/geode/redis/internal/ByteToCommandDecoder.java", "license": "apache-2.0", "size": 6735 }
[ "io.netty.buffer.ByteBuf" ]
import io.netty.buffer.ByteBuf;
import io.netty.buffer.*;
[ "io.netty.buffer" ]
io.netty.buffer;
2,841,971
boolean isResourceAuthorized(IResource resource, PageParameters parameters);
boolean isResourceAuthorized(IResource resource, PageParameters parameters);
/** * Checks whether a request with some parameters is allowed to a resource. * * @param resource * The resource that should be processed * @param parameters * The request parameters * @return {@code true} if the request to this resource is allowed. */
Checks whether a request with some parameters is allowed to a resource
isResourceAuthorized
{ "repo_name": "dashorst/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/authorization/IAuthorizationStrategy.java", "license": "apache-2.0", "size": 4546 }
[ "org.apache.wicket.request.mapper.parameter.PageParameters", "org.apache.wicket.request.resource.IResource" ]
import org.apache.wicket.request.mapper.parameter.PageParameters; import org.apache.wicket.request.resource.IResource;
import org.apache.wicket.request.mapper.parameter.*; import org.apache.wicket.request.resource.*;
[ "org.apache.wicket" ]
org.apache.wicket;
438,724
public static void trackGeofence(GeofenceEventType event, String info) { if (featureFlagManager().isFeatureFlagEnabled("track_geofence")) { LeanplumInternal.trackGeofence(event, 0.0, info, null, null); } }
static void function(GeofenceEventType event, String info) { if (featureFlagManager().isFeatureFlagEnabled(STR)) { LeanplumInternal.trackGeofence(event, 0.0, info, null, null); } }
/** * Advances to a particular state in your application. The string can be any value of your * choosing, and will show up in the dashboard. A state is a section of your app that the user is * currently in. * * @param event Event type. * @param info Basic context associated with the state, such as the...
Advances to a particular state in your application. The string can be any value of your choosing, and will show up in the dashboard. A state is a section of your app that the user is currently in
trackGeofence
{ "repo_name": "Leanplum/Leanplum-Android-SDK", "path": "AndroidSDKCore/src/main/java/com/leanplum/Leanplum.java", "license": "apache-2.0", "size": 82101 }
[ "com.leanplum.internal.LeanplumInternal", "com.leanplum.models.GeofenceEventType" ]
import com.leanplum.internal.LeanplumInternal; import com.leanplum.models.GeofenceEventType;
import com.leanplum.internal.*; import com.leanplum.models.*;
[ "com.leanplum.internal", "com.leanplum.models" ]
com.leanplum.internal; com.leanplum.models;
669,152
public int readInt() throws IOException { return ((_is.read() << 24) | (_is.read() << 16) | (_is.read() << 8) | (_is.read())); }
int function() throws IOException { return ((_is.read() << 24) (_is.read() << 16) (_is.read() << 8) (_is.read())); }
/** * Parses a 32-bit int. */
Parses a 32-bit int
readInt
{ "repo_name": "baratine/baratine", "path": "core/src/main/java/com/caucho/v5/bytecode/ByteCodeParser.java", "license": "gpl-2.0", "size": 14660 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
201,506
private void configureNameService(MiniDFSNNTopology.NSConf nameservice, int nsCounter, boolean manageNameDfsSharedDirs, boolean manageNameDfsDirs, boolean enableManagedDfsDirsRedundancy, boolean format, StartupOption operation, String clusterId, final int nnCounter) throws IOException{ Str...
void function(MiniDFSNNTopology.NSConf nameservice, int nsCounter, boolean manageNameDfsSharedDirs, boolean manageNameDfsDirs, boolean enableManagedDfsDirsRedundancy, boolean format, StartupOption operation, String clusterId, final int nnCounter) throws IOException{ String nsId = nameservice.getId(); String lastDefault...
/** * Do the rest of the NN configuration for things like shared edits, * as well as directory formatting, etc. for a single nameservice * @param nnCounter the count of the number of namenodes already configured/started. Also, * acts as the <i>index</i> to the next NN to start (since indici...
Do the rest of the NN configuration for things like shared edits, as well as directory formatting, etc. for a single nameservice
configureNameService
{ "repo_name": "apurtell/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java", "license": "apache-2.0", "size": 126970 }
[ "java.io.File", "java.io.IOException", "java.util.Collection", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileUtil", "org.apache.hadoop.hdfs.MiniDFSNNTopology", "org.apache.hadoop.hdfs.server.common.HdfsServerConstants", "org.apache.hadoop.hdfs.server.common.Util", "org.apache.had...
import java.io.File; import java.io.IOException; import java.util.Collection; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.hdfs.MiniDFSNNTopology; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.common.U...
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,985,683
public VFSContainer getWikiRootContainer(final OLATResourceable ores) { // Check if Resource is a BusinessGroup, because BusinessGroup-wiki's are stored at a different place if (log.isDebugEnabled()) { log.debug("calculating wiki root container with ores id: " + ores.getResourceableId() ...
VFSContainer function(final OLATResourceable ores) { if (log.isDebugEnabled()) { log.debug(STR + ores.getResourceableId() + STR + ores.getResourceableTypeName(), null); } if (isGroupContextWiki(ores)) { return new OlatRootFolderImpl(getGroupWikiRelPath(ores), null); } else { return getFileResourceManager().getFileResou...
/** * Returns the root-container for certain OLAT-resourceable. * * @param ores * @return */
Returns the root-container for certain OLAT-resourceable
getWikiRootContainer
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/main/java/org/olat/lms/wiki/WikiManager.java", "license": "apache-2.0", "size": 27847 }
[ "org.olat.data.commons.vfs.VFSContainer", "org.olat.data.commons.vfs.olatimpl.OlatRootFolderImpl", "org.olat.system.commons.resource.OLATResourceable" ]
import org.olat.data.commons.vfs.VFSContainer; import org.olat.data.commons.vfs.olatimpl.OlatRootFolderImpl; import org.olat.system.commons.resource.OLATResourceable;
import org.olat.data.commons.vfs.*; import org.olat.data.commons.vfs.olatimpl.*; import org.olat.system.commons.resource.*;
[ "org.olat.data", "org.olat.system" ]
org.olat.data; org.olat.system;
49,335
public List<FormValidation> updateAllSites() throws InterruptedException, ExecutionException { List <Future<FormValidation>> futures = new ArrayList<Future<FormValidation>>(); for (UpdateSite site : getSites()) { Future<FormValidation> future = site.updateDirectly(true); if (...
List<FormValidation> function() throws InterruptedException, ExecutionException { List <Future<FormValidation>> futures = new ArrayList<Future<FormValidation>>(); for (UpdateSite site : getSites()) { Future<FormValidation> future = site.updateDirectly(true); if (future != null) { futures.add(future); } } List<FormValid...
/** * Ensure that all UpdateSites are up to date, without requiring a user to * browse to the instance. * * @return a list of {@link FormValidation} for each updated Update Site * @throws ExecutionException * @throws InterruptedException * @since 1.501 * */
Ensure that all UpdateSites are up to date, without requiring a user to browse to the instance
updateAllSites
{ "repo_name": "ktan2020/jenkins-1.507", "path": "core/src/main/java/hudson/model/UpdateCenter.java", "license": "mit", "size": 52328 }
[ "hudson.util.FormValidation", "java.util.ArrayList", "java.util.List", "java.util.concurrent.ExecutionException", "java.util.concurrent.Future" ]
import hudson.util.FormValidation; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future;
import hudson.util.*; import java.util.*; import java.util.concurrent.*;
[ "hudson.util", "java.util" ]
hudson.util; java.util;
1,334,279
public static String offerListToString(List<Offer> offers) { List<String> offersAsStrings = Lists.transform(offers, offerToStringTransform); return String.format("[\n%s]", StringUtils.join(offersAsStrings, ",\n")); }
static String function(List<Offer> offers) { List<String> offersAsStrings = Lists.transform(offers, offerToStringTransform); return String.format(STR, StringUtils.join(offersAsStrings, ",\n")); }
/** * Pretty-print List of mesos protobuf Offers. */
Pretty-print List of mesos protobuf Offers
offerListToString
{ "repo_name": "erikdw/storm-mesos", "path": "storm/src/main/storm/mesos/util/PrettyProtobuf.java", "license": "apache-2.0", "size": 10397 }
[ "com.google.common.collect.Lists", "java.util.List", "org.apache.commons.lang3.StringUtils", "org.apache.mesos.Protos" ]
import com.google.common.collect.Lists; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.apache.mesos.Protos;
import com.google.common.collect.*; import java.util.*; import org.apache.commons.lang3.*; import org.apache.mesos.*;
[ "com.google.common", "java.util", "org.apache.commons", "org.apache.mesos" ]
com.google.common; java.util; org.apache.commons; org.apache.mesos;
2,680,561
PagedList<DataLakeAnalyticsAccount> listByResourceGroupNext(final String nextPageLink);
PagedList<DataLakeAnalyticsAccount> listByResourceGroupNext(final String nextPageLink);
/** * Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any. * * @param nextPageLink The NextLink from the previous successful call to List operation. * @return the PagedList&lt;DataLakeAnalyticsAccount&gt; object...
Gets the first page of Data Lake Analytics accounts, if any, within a specific resource group. This includes a link to the next page, if any
listByResourceGroupNext
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java", "license": "mit", "size": 41301 }
[ "com.microsoft.azure.PagedList", "com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount" ]
import com.microsoft.azure.PagedList; import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccount;
import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,691,023
public static String param(Map<String, Object> map) { ArrayList<String> list = new ArrayList<String>(); for (Map.Entry<String, Object> entry : map.entrySet()) { if (entry.getValue() != "") { list.add(entry.getKey() + "=" + entry.getValue() + "&"); } } ...
static String function(Map<String, Object> map) { ArrayList<String> list = new ArrayList<String>(); for (Map.Entry<String, Object> entry : map.entrySet()) { if (entry.getValue() != STR=STR&"); } } int size = list.size(); String[] arrayToSort = list.toArray(new String[size]); Arrays.sort(arrayToSort, String.CASE_INSENSI...
/** * Build Url param from map * * @param map source * @return url param */
Build Url param from map
param
{ "repo_name": "smjie2800/spring-cloud-microservice-redis-activemq-hibernate-mysql", "path": "microservice-provider-pay/src/main/java/com/boyuanitsm/pay/wxpay/common/Util.java", "license": "mit", "size": 5732 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.Map" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,751,844
RequestHeadersSpec<?> body(BodyInserter<?, ? super ClientHttpRequest> inserter); /** * Shortcut for {@link #body(BodyInserter)} with a * {@linkplain BodyInserters#fromValue value inserter}. * As of 5.2 this method delegates to {@link #bodyValue(Object)}. * @deprecated as of Spring Framework 5.2 in f...
RequestHeadersSpec<?> body(BodyInserter<?, ? super ClientHttpRequest> inserter); /** * Shortcut for {@link #body(BodyInserter)} with a * {@linkplain BodyInserters#fromValue value inserter}. * As of 5.2 this method delegates to {@link #bodyValue(Object)}. * @deprecated as of Spring Framework 5.2 in favor of {@link #body...
/** * Set the body of the request using the given body inserter. * See {@link BodyInserters} for built-in {@link BodyInserter} implementations. * @param inserter the body inserter to use for the request body * @return this builder * @see org.springframework.web.reactive.function.BodyInserters */
Set the body of the request using the given body inserter. See <code>BodyInserters</code> for built-in <code>BodyInserter</code> implementations
body
{ "repo_name": "spring-projects/spring-framework", "path": "spring-webflux/src/main/java/org/springframework/web/reactive/function/client/WebClient.java", "license": "apache-2.0", "size": 33699 }
[ "org.springframework.http.client.reactive.ClientHttpRequest", "org.springframework.web.reactive.function.BodyInserter", "org.springframework.web.reactive.function.BodyInserters" ]
import org.springframework.http.client.reactive.ClientHttpRequest; import org.springframework.web.reactive.function.BodyInserter; import org.springframework.web.reactive.function.BodyInserters;
import org.springframework.http.client.reactive.*; import org.springframework.web.reactive.function.*;
[ "org.springframework.http", "org.springframework.web" ]
org.springframework.http; org.springframework.web;
86,065
public PojoField getFieldByColumn(String column) { List<F> fields = getFields(); if (fields == null || fields.isEmpty()) return null; for (PojoField field : fields) { if (field.getColumn().equals(column)) return field; } return null;...
PojoField function(String column) { List<F> fields = getFields(); if (fields == null fields.isEmpty()) return null; for (PojoField field : fields) { if (field.getColumn().equals(column)) return field; } return null; }
/** * Returns POJO field by Cassandra table column name. * * @param column column name. * * @return POJO field or null if not exists. */
Returns POJO field by Cassandra table column name
getFieldByColumn
{ "repo_name": "NSAmelchev/ignite", "path": "modules/cassandra/store/src/main/java/org/apache/ignite/cache/store/cassandra/persistence/PersistenceSettings.java", "license": "apache-2.0", "size": 19465 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,367,061
public static EntityPlayerMP getCommandSenderAsPlayer(ICommandSender p_71521_0_) { if (p_71521_0_ instanceof EntityPlayerMP) { return (EntityPlayerMP)p_71521_0_; } else { throw new PlayerNotFoundException("You must specify which player you wish to ...
static EntityPlayerMP function(ICommandSender p_71521_0_) { if (p_71521_0_ instanceof EntityPlayerMP) { return (EntityPlayerMP)p_71521_0_; } else { throw new PlayerNotFoundException(STR, new Object[0]); } }
/** * Returns the given ICommandSender as a EntityPlayer or throw an exception. */
Returns the given ICommandSender as a EntityPlayer or throw an exception
getCommandSenderAsPlayer
{ "repo_name": "Myrninvollo/Server", "path": "src/net/minecraft/command/CommandBase.java", "license": "gpl-2.0", "size": 18138 }
[ "net.minecraft.entity.player.EntityPlayerMP" ]
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
2,324,267
void addLeadingZeroes(final Document document, final int maxLen, final int offs) { if (document.getLength() < maxLen) { for (int i = document.getLength(); i < maxLen; i++) { try { document.insertString(offs, "0", null); } catch (final BadLocati...
void addLeadingZeroes(final Document document, final int maxLen, final int offs) { if (document.getLength() < maxLen) { for (int i = document.getLength(); i < maxLen; i++) { try { document.insertString(offs, "0", null); } catch (final BadLocationException ex) { Logger.getLogger(ParcelInputField.class.getName()) .log(Le...
/** * DOCUMENT ME! * * @param document DOCUMENT ME! * @param maxLen DOCUMENT ME! * @param offs DOCUMENT ME! */
DOCUMENT ME
addLeadingZeroes
{ "repo_name": "cismet/cids-custom-wuppertal", "path": "src/main/java/de/cismet/cids/custom/wupp/client/alkis/AbstractInputField.java", "license": "lgpl-3.0", "size": 14872 }
[ "javax.swing.text.BadLocationException", "javax.swing.text.Document", "org.apache.log4j.Level", "org.apache.log4j.Logger" ]
import javax.swing.text.BadLocationException; import javax.swing.text.Document; import org.apache.log4j.Level; import org.apache.log4j.Logger;
import javax.swing.text.*; import org.apache.log4j.*;
[ "javax.swing", "org.apache.log4j" ]
javax.swing; org.apache.log4j;
762,048
ServiceResponseWithHeaders<Void, LROSADsDeleteAsyncRelativeRetryInvalidJsonPollingHeaders> deleteAsyncRelativeRetryInvalidJsonPolling() throws CloudException, IOException, InterruptedException;
ServiceResponseWithHeaders<Void, LROSADsDeleteAsyncRelativeRetryInvalidJsonPollingHeaders> deleteAsyncRelativeRetryInvalidJsonPolling() throws CloudException, IOException, InterruptedException;
/** * Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status. * * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization ...
Long running delete request, service returns a 202 to the initial request. Poll the endpoint indicated in the Azure-AsyncOperation header for operation status
deleteAsyncRelativeRetryInvalidJsonPolling
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROSADsOperations.java", "license": "mit", "size": 104323 }
[ "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponseWithHeaders", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponseWithHeaders; import java.io.IOException;
import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.microsoft.azure; com.microsoft.rest; java.io;
1,617,406
@Test public void genomicCritrionTypes() { ExpressionLevelCriterion criterion = new ExpressionLevelCriterion(); criterion.setRangeType(RangeTypeEnum.INSIDE_RANGE); criterion.setLowerLimit(1.0f); criterion.setUpperLimit(3.0f); Set<Gene> genes = new HashSet<Gene>(); ...
void function() { ExpressionLevelCriterion criterion = new ExpressionLevelCriterion(); criterion.setRangeType(RangeTypeEnum.INSIDE_RANGE); criterion.setLowerLimit(1.0f); criterion.setUpperLimit(3.0f); Set<Gene> genes = new HashSet<Gene>(); Gene gene = new Gene(); gene.setSymbol("Gene"); genes.add(gene); ExpressionLevel...
/** * Tests determination of genomic criteria match types. */
Tests determination of genomic criteria match types
genomicCritrionTypes
{ "repo_name": "NCIP/caintegrator", "path": "caintegrator-war/test/src/gov/nih/nci/caintegrator/application/query/ExpressionLevelCriterionHandlerTest.java", "license": "bsd-3-clause", "size": 8411 }
[ "gov.nih.nci.caintegrator.domain.application.ExpressionLevelCriterion", "gov.nih.nci.caintegrator.domain.application.RangeTypeEnum", "gov.nih.nci.caintegrator.domain.genomic.Gene", "java.util.HashSet", "java.util.Set", "org.junit.Assert" ]
import gov.nih.nci.caintegrator.domain.application.ExpressionLevelCriterion; import gov.nih.nci.caintegrator.domain.application.RangeTypeEnum; import gov.nih.nci.caintegrator.domain.genomic.Gene; import java.util.HashSet; import java.util.Set; import org.junit.Assert;
import gov.nih.nci.caintegrator.domain.application.*; import gov.nih.nci.caintegrator.domain.genomic.*; import java.util.*; import org.junit.*;
[ "gov.nih.nci", "java.util", "org.junit" ]
gov.nih.nci; java.util; org.junit;
2,608,422
@Test(timeout=60000) public void testThreeEqualList() { final List<String> list1 = Arrays.asList("abc", "def", "geh"); final SortedIteratorMerger<String> mergeIterator = new SortedIteratorMerger<String>( Arrays.asList(list1.iterator(), list1.iterator(), list1.iterator()), STRING_COMPARATOR, DEFAU...
@Test(timeout=60000) void function() { final List<String> list1 = Arrays.asList("abc", "def", "geh"); final SortedIteratorMerger<String> mergeIterator = new SortedIteratorMerger<String>( Arrays.asList(list1.iterator(), list1.iterator(), list1.iterator()), STRING_COMPARATOR, DEFAULT_DUPLICATE_RESOLVER); final List<Strin...
/** * Test three lists */
Test three lists
testThreeEqualList
{ "repo_name": "jnidzwetzki/bboxdb", "path": "bboxdb-commons/src/test/java/org/bboxdb/TestSortedIteratorMerger.java", "license": "apache-2.0", "size": 8568 }
[ "java.util.Arrays", "java.util.List", "org.bboxdb.commons.SortedIteratorMerger", "org.junit.Assert", "org.junit.Test" ]
import java.util.Arrays; import java.util.List; import org.bboxdb.commons.SortedIteratorMerger; import org.junit.Assert; import org.junit.Test;
import java.util.*; import org.bboxdb.commons.*; import org.junit.*;
[ "java.util", "org.bboxdb.commons", "org.junit" ]
java.util; org.bboxdb.commons; org.junit;
2,176,376
List<String> sourceLemmas = source.getLemmas(); List<String> targetLemmas = target.getLemmas(); for (String sourceLemma : sourceLemmas) { for (String targetLemma : targetLemmas) { if (sourceLemma.equals(targetLemma)) { return IMappingElement.EQUIVALEN...
List<String> sourceLemmas = source.getLemmas(); List<String> targetLemmas = target.getLemmas(); for (String sourceLemma : sourceLemmas) { for (String targetLemma : targetLemmas) { if (sourceLemma.equals(targetLemma)) { return IMappingElement.EQUIVALENCE; } } } return IMappingElement.IDK; }
/** * Computes the relation with WordNet lemma matcher. * * @param source the gloss of source * @param target the gloss of target * @return synonym or IDk relation */
Computes the relation with WordNet lemma matcher
match
{ "repo_name": "opendatatrentino/s-match", "path": "src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNLemma.java", "license": "lgpl-2.1", "size": 1484 }
[ "it.unitn.disi.smatch.data.mappings.IMappingElement", "java.util.List" ]
import it.unitn.disi.smatch.data.mappings.IMappingElement; import java.util.List;
import it.unitn.disi.smatch.data.mappings.*; import java.util.*;
[ "it.unitn.disi", "java.util" ]
it.unitn.disi; java.util;
1,400,121
@Transactional(onUnits = {}) public void assertAllEntitiesHaveBeenPersisted() { checkState(!storedEntities.isEmpty(), "no entities to check"); for (TestEntity storedEntity : storedEntities) { assertNotNull("At least one entity which should have been persisted was NOT found in the DB. " + tasks, ...
@Transactional(onUnits = {}) void function() { checkState(!storedEntities.isEmpty(), STR); for (TestEntity storedEntity : storedEntities) { assertNotNull(STR + tasks, emProvider.get() .find(TestEntity.class, storedEntity.getId())); } }
/** * Check all stored entities if they actually have been persisted in the DB. */
Check all stored entities if they actually have been persisted in the DB
assertAllEntitiesHaveBeenPersisted
{ "repo_name": "tocktix/onami-persist", "path": "src/test/java/org/apache/onami/persist/test/transaction/testframework/TransactionalWorker.java", "license": "apache-2.0", "size": 6688 }
[ "com.google.common.base.Preconditions", "org.apache.onami.persist.Transactional", "org.apache.onami.persist.test.TestEntity", "org.junit.Assert" ]
import com.google.common.base.Preconditions; import org.apache.onami.persist.Transactional; import org.apache.onami.persist.test.TestEntity; import org.junit.Assert;
import com.google.common.base.*; import org.apache.onami.persist.*; import org.apache.onami.persist.test.*; import org.junit.*;
[ "com.google.common", "org.apache.onami", "org.junit" ]
com.google.common; org.apache.onami; org.junit;
906,254
public void execute() throws BuildException { if (tarFile == null) { throw new BuildException("tarfile attribute must be set!", getLocation()); } if (tarFile.exists() && tarFile.isDirectory()) { throw new BuildException("tarfile i...
void function() throws BuildException { if (tarFile == null) { throw new BuildException(STR, getLocation()); } if (tarFile.exists() && tarFile.isDirectory()) { throw new BuildException(STR, getLocation()); } if (tarFile.exists() && !tarFile.canWrite()) { throw new BuildException(STR, getLocation()); } Vector savedFileS...
/** * do the business * @throws BuildException on error */
do the business
execute
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/taskdefs/Tar.java", "license": "mit", "size": 34387 }
[ "java.io.BufferedOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.util.Enumeration", "java.util.Vector", "org.apache.tools.ant.BuildException", "org.apache.tools.ant.Project", "org.apache.tools.ant.types.ResourceCollection", "org.apache.tools.ant.util.FileUti...
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Enumeration; import java.util.Vector; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.types.ResourceCollection; import org....
import java.io.*; import java.util.*; import org.apache.tools.ant.*; import org.apache.tools.ant.types.*; import org.apache.tools.ant.util.*; import org.apache.tools.tar.*;
[ "java.io", "java.util", "org.apache.tools" ]
java.io; java.util; org.apache.tools;
1,850,701
long getLastMajorCompactionTimestampForRegion(final byte[] regionName) throws IOException;
long getLastMajorCompactionTimestampForRegion(final byte[] regionName) throws IOException;
/** * Get the timestamp of the last major compaction for the passed region. * * The timestamp of the oldest HFile resulting from a major compaction of that region, * or 0 if no such HFile could be found. * * @param regionName region to examine * @return the last major compaction timestamp or 0 *...
Get the timestamp of the last major compaction for the passed region. The timestamp of the oldest HFile resulting from a major compaction of that region, or 0 if no such HFile could be found
getLastMajorCompactionTimestampForRegion
{ "repo_name": "SeekerResource/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java", "license": "apache-2.0", "size": 60792 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,881,047
public List<URI> find(String dir) { List<URI> results = new java.util.ArrayList<URI>(); File directory = new File(dir); if (directory.isDirectory()) { walk(directory, results); } return results; }
List<URI> function(String dir) { List<URI> results = new java.util.ArrayList<URI>(); File directory = new File(dir); if (directory.isDirectory()) { walk(directory, results); } return results; }
/** * Searches a given directory for font files. * * @param dir directory to search * @return list&lt;URI&gt; of font files */
Searches a given directory for font files
find
{ "repo_name": "ZhenyaM/veraPDF-pdfbox", "path": "fontbox/src/main/java/org/apache/fontbox/util/autodetect/FontFileFinder.java", "license": "apache-2.0", "size": 4317 }
[ "java.io.File", "java.util.List" ]
import java.io.File; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
7,401
public static List<NabuccoPropertyDescriptor> getPropertyDescriptorList() { return PropertyCache.getInstance().retrieve(SequenceConfigExtension.class).getAllProperties(); }
static List<NabuccoPropertyDescriptor> function() { return PropertyCache.getInstance().retrieve(SequenceConfigExtension.class).getAllProperties(); }
/** * Getter for the PropertyDescriptorList. * * @return the List<NabuccoPropertyDescriptor>. */
Getter for the PropertyDescriptorList
getPropertyDescriptorList
{ "repo_name": "NABUCCO/org.nabucco.framework.base", "path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/extension/schema/setup/SequenceConfigExtension.java", "license": "epl-1.0", "size": 8959 }
[ "java.util.List", "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import java.util.List; import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import java.util.*; import org.nabucco.framework.base.facade.datatype.property.*;
[ "java.util", "org.nabucco.framework" ]
java.util; org.nabucco.framework;
261,541
@ApiModelProperty(value = "") public TargetTypeEnum getTargetType() { return targetType; }
@ApiModelProperty(value = "") TargetTypeEnum function() { return targetType; }
/** * Get targetType * @return targetType **/
Get targetType
getTargetType
{ "repo_name": "LogSentinel/logsentinel-java-client", "path": "src/main/java/com/logsentinel/model/AutomatedResponse.java", "license": "mit", "size": 7501 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,540,134
public final MetaProperty<Integer> code() { return _code; }
final MetaProperty<Integer> function() { return _code; }
/** * The meta-property for the {@code code} property. * @return the meta-property, not null */
The meta-property for the code property
code
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Bloomberg/src/main/java/com/opengamma/bbg/referencedata/ReferenceDataError.java", "license": "apache-2.0", "size": 13571 }
[ "org.joda.beans.MetaProperty" ]
import org.joda.beans.MetaProperty;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,442,045
private UserRole getRole() { HttpSession httpSession = getSession(); UserRole role = HttpUtilities.getUserRole(httpSession); return role; }
UserRole function() { HttpSession httpSession = getSession(); UserRole role = HttpUtilities.getUserRole(httpSession); return role; }
/** * Gets the role. * * @return the role */
Gets the role
getRole
{ "repo_name": "alexript/balas", "path": "src/net/autosauler/ballance/server/DocumentServiceImpl.java", "license": "apache-2.0", "size": 7876 }
[ "javax.servlet.http.HttpSession", "net.autosauler.ballance.shared.UserRole" ]
import javax.servlet.http.HttpSession; import net.autosauler.ballance.shared.UserRole;
import javax.servlet.http.*; import net.autosauler.ballance.shared.*;
[ "javax.servlet", "net.autosauler.ballance" ]
javax.servlet; net.autosauler.ballance;
567,204
@Test public void testAccessAclNotInherited() throws IOException { Path parent = new Path("/testAccessAclNotInherited"); hdfs.mkdirs(parent); // parent have both access acl and default acl List<AclEntry> acls = Lists.newArrayList( aclEntry(DEFAULT, USER, "foo", READ_EXECUTE), aclEntr...
void function() throws IOException { Path parent = new Path(STR); hdfs.mkdirs(parent); List<AclEntry> acls = Lists.newArrayList( aclEntry(DEFAULT, USER, "foo", READ_EXECUTE), aclEntry(ACCESS, USER, READ_WRITE), aclEntry(ACCESS, GROUP, READ), aclEntry(ACCESS, OTHER, READ), aclEntry(ACCESS, USER, "bar", ALL)); hdfs.setAc...
/** * Verify that access acl does not get inherited on newly created subdir/file. * @throws IOException */
Verify that access acl does not get inherited on newly created subdir/file
testAccessAclNotInherited
{ "repo_name": "apurtell/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestExtendedAcls.java", "license": "apache-2.0", "size": 17292 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.AclEntry", "org.apache.hadoop.fs.permission.AclStatus", "org.apache.hadoop.hdfs.server.namenode.AclTestHelpers", "org.apache.hadoop.util.Lists", "org.junit.Assert" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.AclEntry; import org.apache.hadoop.fs.permission.AclStatus; import org.apache.hadoop.hdfs.server.namenode.AclTestHelpers; import org.apache.hadoop.util.Lists; import org.junit.Assert;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.util.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.junit" ]
java.io; java.util; org.apache.hadoop; org.junit;
2,114,637
public ImmutableList<String> getCompileAndLinkFlags() { return clangFlags; } public static class Converter extends EnumConverter<AppleBitcodeMode> { public Converter() { super(AppleBitcodeMode.class, "apple bitcode mode"); } } static final EnumCodec<AppleBitcodeMode>...
ImmutableList<String> function() { return clangFlags; } public static class Converter extends EnumConverter<AppleBitcodeMode> { public Converter() { super(AppleBitcodeMode.class, STR); } } static final EnumCodec<AppleBitcodeMode> CODEC = new EnumCodec<>(AppleBitcodeMode.class); }
/** * Returns the flags that should be added to compile and link actions to use this * bitcode setting. */
Returns the flags that should be added to compile and link actions to use this bitcode setting
getCompileAndLinkFlags
{ "repo_name": "spxtr/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java", "license": "apache-2.0", "size": 25064 }
[ "com.google.common.collect.ImmutableList", "com.google.devtools.build.lib.skyframe.serialization.EnumCodec", "com.google.devtools.common.options.EnumConverter" ]
import com.google.common.collect.ImmutableList; import com.google.devtools.build.lib.skyframe.serialization.EnumCodec; import com.google.devtools.common.options.EnumConverter;
import com.google.common.collect.*; import com.google.devtools.build.lib.skyframe.serialization.*; import com.google.devtools.common.options.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
2,148,230
public Map<String, Path<?>[]> asMap() { return Collections.unmodifiableMap(attrMapping); } }
Map<String, Path<?>[]> function() { return Collections.unmodifiableMap(attrMapping); } }
/** * Returns a {@link Map} with the attribute mappings added to the factory. * @return the attribute mappings */
Returns a <code>Map</code> with the attribute mappings added to the factory
asMap
{ "repo_name": "DISID/springlets", "path": "springlets-data/springlets-data-jpa/src/main/java/io/springlets/data/jpa/repository/support/QueryDslRepositorySupportExt.java", "license": "apache-2.0", "size": 12801 }
[ "com.querydsl.core.types.Path", "java.util.Collections", "java.util.Map" ]
import com.querydsl.core.types.Path; import java.util.Collections; import java.util.Map;
import com.querydsl.core.types.*; import java.util.*;
[ "com.querydsl.core", "java.util" ]
com.querydsl.core; java.util;
747,395
public void setMarginLineEnabled(boolean enabled) { if (enabled!=marginLineEnabled) { marginLineEnabled = enabled; if (marginLineEnabled) { Rectangle visibleRect = getVisibleRect(); repaint(marginLineX,visibleRect.y, 1,visibleRect.height); } } }
void function(boolean enabled) { if (enabled!=marginLineEnabled) { marginLineEnabled = enabled; if (marginLineEnabled) { Rectangle visibleRect = getVisibleRect(); repaint(marginLineX,visibleRect.y, 1,visibleRect.height); } } }
/** * Enables or disables the margin line. * * @param enabled Whether or not the margin line should be enabled. * @see #isMarginLineEnabled */
Enables or disables the margin line
setMarginLineEnabled
{ "repo_name": "thomasgalvin/ThirdParty", "path": "RText/RText-Editor/src/main/java/org/fife/ui/rtextarea/RTextAreaBase.java", "license": "apache-2.0", "size": 35052 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,818,532
private PreparedStatement insertAtom(RandomVariableAtom atom) { RDBMSPredicateHandle ph = getHandle(atom.getPredicate()); PreparedStatement insert = insertStatement.get(atom.getPredicate()); int sqlIndex = 1; Term[] arguments = atom.getArguments(); try { // First, fill in arguments for (int i = 0;...
PreparedStatement function(RandomVariableAtom atom) { RDBMSPredicateHandle ph = getHandle(atom.getPredicate()); PreparedStatement insert = insertStatement.get(atom.getPredicate()); int sqlIndex = 1; Term[] arguments = atom.getArguments(); try { for (int i = 0; i < ph.argumentColumns().length; i++) { if (arguments[i] in...
/** * Helper method to fill in the fields of a PreparedStatement for an insert * @param atom */
Helper method to fill in the fields of a PreparedStatement for an insert
insertAtom
{ "repo_name": "JackSullivan/psl", "path": "psl-core/src/main/java/edu/umd/cs/psl/database/rdbms/RDBMSDatabase.java", "license": "apache-2.0", "size": 21998 }
[ "edu.umd.cs.psl.model.argument.Attribute", "edu.umd.cs.psl.model.argument.Term", "edu.umd.cs.psl.model.argument.UniqueID", "edu.umd.cs.psl.model.atom.RandomVariableAtom", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import edu.umd.cs.psl.model.argument.Attribute; import edu.umd.cs.psl.model.argument.Term; import edu.umd.cs.psl.model.argument.UniqueID; import edu.umd.cs.psl.model.atom.RandomVariableAtom; import java.sql.PreparedStatement; import java.sql.SQLException;
import edu.umd.cs.psl.model.argument.*; import edu.umd.cs.psl.model.atom.*; import java.sql.*;
[ "edu.umd.cs", "java.sql" ]
edu.umd.cs; java.sql;
2,824,854
public void completed(IJavaElement element, Object data);
void function(IJavaElement element, Object data);
/** * announces that the calculation for the element has completed * * @param handle * @param data */
announces that the calculation for the element has completed
completed
{ "repo_name": "leonardobsjr/metrics3", "path": "net.sourceforge.metrics/src/net/sourceforge/metrics/builder/IMetricsProgressListener.java", "license": "epl-1.0", "size": 2087 }
[ "org.eclipse.jdt.core.IJavaElement" ]
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
15,004
public XMLString substring(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (len > m_length) len = m_length; if (len <= 0) return XString.EMPTYSTRING; else { int start = m_start + beginIndex; return new XStringForFSB(fsb(), start, len)...
XMLString function(int beginIndex, int endIndex) { int len = endIndex - beginIndex; if (len > m_length) len = m_length; if (len <= 0) return XString.EMPTYSTRING; else { int start = m_start + beginIndex; return new XStringForFSB(fsb(), start, len); } }
/** * Returns a new string that is a substring of this string. The * substring begins at the specified <code>beginIndex</code> and * extends to the character at index <code>endIndex - 1</code>. * Thus the length of the substring is <code>endIndex-beginIndex</code>. * * @param beginIndex t...
Returns a new string that is a substring of this string. The substring begins at the specified <code>beginIndex</code> and extends to the character at index <code>endIndex - 1</code>. Thus the length of the substring is <code>endIndex-beginIndex</code>
substring
{ "repo_name": "kcsl/immutability-benchmark", "path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xpath/objects/XStringForFSB.java", "license": "mit", "size": 29255 }
[ "org.apache.xml.utils.XMLString" ]
import org.apache.xml.utils.XMLString;
import org.apache.xml.utils.*;
[ "org.apache.xml" ]
org.apache.xml;
1,325,050
public ModuleMetaData getModuleInfo(String moduleName, String moduleVersion) throws ModuleMgtException { AxisModule axisModule = getAxisModule(moduleName, moduleVersion); if (axisModule == null) { log.error("Module " + moduleName + "-" + moduleVersion + " cannnot be found!"); ...
ModuleMetaData function(String moduleName, String moduleVersion) throws ModuleMgtException { AxisModule axisModule = getAxisModule(moduleName, moduleVersion); if (axisModule == null) { log.error(STR + moduleName + "-" + moduleVersion + STR); throw new ModuleMgtException(ModuleMgtException.ERROR, ModuleMgtMessageKeys.MO...
/** * Return all available module meta-data (not counts) * * @param moduleName - * moduleName * @param moduleVersion - * moduleVersion * @return moduleMetaData info of the module * @throws ModuleMgtException - * ...
Return all available module meta-data (not counts)
getModuleInfo
{ "repo_name": "pubudu08/carbon-deployment", "path": "components/service-mgt/module-mgt/org.wso2.carbon.module.mgt/src/main/java/org/wso2/carbon/module/mgt/service/ModuleAdminService.java", "license": "apache-2.0", "size": 44290 }
[ "org.apache.axis2.description.AxisModule", "org.wso2.carbon.module.mgt.ModuleMetaData", "org.wso2.carbon.module.mgt.ModuleMgtException", "org.wso2.carbon.module.mgt.ModuleMgtMessageKeys" ]
import org.apache.axis2.description.AxisModule; import org.wso2.carbon.module.mgt.ModuleMetaData; import org.wso2.carbon.module.mgt.ModuleMgtException; import org.wso2.carbon.module.mgt.ModuleMgtMessageKeys;
import org.apache.axis2.description.*; import org.wso2.carbon.module.mgt.*;
[ "org.apache.axis2", "org.wso2.carbon" ]
org.apache.axis2; org.wso2.carbon;
2,032,061
protected void addExplicit(IgniteTxEntry e) { if (e.explicitVersion() != null) { if (explicitVers == null) explicitVers = new LinkedList<>(); if (!explicitVers.contains(e.explicitVersion())) { explicitVers.add(e.explicitVersion()); if...
void function(IgniteTxEntry e) { if (e.explicitVersion() != null) { if (explicitVers == null) explicitVers = new LinkedList<>(); if (!explicitVers.contains(e.explicitVersion())) { explicitVers.add(e.explicitVersion()); if (log.isDebugEnabled()) log.debug(STR + e.explicitVersion() + STR + this + ']'); cctx.tm().addAlter...
/** * Adds explicit version if there is one. * * @param e Transaction entry. */
Adds explicit version if there is one
addExplicit
{ "repo_name": "psadusumilli/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java", "license": "apache-2.0", "size": 40320 }
[ "java.util.LinkedList", "org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry" ]
import java.util.LinkedList; import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
import java.util.*; import org.apache.ignite.internal.processors.cache.transactions.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
148,559
protected IChunkProvider createChunkProvider() { this.clientChunkProvider = new ChunkProviderClient(this); return this.clientChunkProvider; }
IChunkProvider function() { this.clientChunkProvider = new ChunkProviderClient(this); return this.clientChunkProvider; }
/** * Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider? */
Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider
createChunkProvider
{ "repo_name": "SkidJava/BaseClient", "path": "lucid_1.8.8/net/minecraft/client/multiplayer/WorldClient.java", "license": "gpl-2.0", "size": 18076 }
[ "net.minecraft.world.chunk.IChunkProvider" ]
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.chunk.*;
[ "net.minecraft.world" ]
net.minecraft.world;
2,745,938
static void bindAsHighPriority(int pid) { SandboxedProcessConnection connection = mServiceMap.get(pid); if (connection == null) { Log.w(TAG, "Tried to bind a non-existent connection to pid: " + pid); return; } connection.bindHighPriority(); }
static void bindAsHighPriority(int pid) { SandboxedProcessConnection connection = mServiceMap.get(pid); if (connection == null) { Log.w(TAG, STR + pid); return; } connection.bindHighPriority(); }
/** * Bind a sandboxed process as a high priority process so that it has the same * priority as the main process. This can be used for the foreground renderer * process to distinguish it from the the background renderer process. * * @param pid The process handle of the service connection obtain...
Bind a sandboxed process as a high priority process so that it has the same priority as the main process. This can be used for the foreground renderer process to distinguish it from the the background renderer process
bindAsHighPriority
{ "repo_name": "keishi/chromium", "path": "content/public/android/java/src/org/chromium/content/browser/SandboxedProcessLauncher.java", "license": "bsd-3-clause", "size": 12303 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
513,088
@SuppressWarnings("unused") public void setOkColor(String color) { mOkColor = Color.parseColor(color); }
@SuppressWarnings(STR) void function(String color) { mOkColor = Color.parseColor(color); }
/** * Set the text color of the OK button * * @param color the color you want */
Set the text color of the OK button
setOkColor
{ "repo_name": "wdullaer/MaterialDateTimePicker", "path": "library/src/main/java/com/wdullaer/materialdatetimepicker/date/DatePickerDialog.java", "license": "apache-2.0", "size": 43909 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,822,426
public int getBandwidth(String name) throws SdpParseException { if (name == null) return -1; else if (bandwidthList == null) return -1; for (int i = 0; i < bandwidthList.size(); i++) { Object o = bandwidthList.elementAt(i); if (o instanceof BandwidthField) { BandwidthField b = (B...
int function(String name) throws SdpParseException { if (name == null) return -1; else if (bandwidthList == null) return -1; for (int i = 0; i < bandwidthList.size(); i++) { Object o = bandwidthList.elementAt(i); if (o instanceof BandwidthField) { BandwidthField b = (BandwidthField) o; String type = b.getType(); if (ty...
/** * Returns the integer value of the specified bandwidth name. * * @param name name - the name of the bandwidth type * @throws SdpParseException * @return the value of the named bandwidth */
Returns the integer value of the specified bandwidth name
getBandwidth
{ "repo_name": "darkmi/rtspproxy", "path": "src/main/java/gov/nist/javax/sdp/SessionDescriptionImpl.java", "license": "gpl-2.0", "size": 26798 }
[ "gov.nist.javax.sdp.fields.BandwidthField", "javax.sdp.SdpParseException" ]
import gov.nist.javax.sdp.fields.BandwidthField; import javax.sdp.SdpParseException;
import gov.nist.javax.sdp.fields.*; import javax.sdp.*;
[ "gov.nist.javax", "javax.sdp" ]
gov.nist.javax; javax.sdp;
742,306
public void testReadMeFiles() throws SQLException, IOException { Statement s = createStatement(); s.close(); TestConfiguration currentConfig = TestConfiguration.getCurrent(); String dbPath = currentConfig.getDatabasePath(currentConfig.getDefaultDatabaseName()); switch (ge...
void function() throws SQLException, IOException { Statement s = createStatement(); s.close(); TestConfiguration currentConfig = TestConfiguration.getCurrent(); String dbPath = currentConfig.getDatabasePath(currentConfig.getDefaultDatabaseName()); switch (getPhase()) { case PH_CREATE: case PH_SOFT_UPGRADE: case PH_POST...
/** * DERBY-5996(Create readme files (cautioning users against modifying * database files) at database hard upgrade time) * Simple test to make sure readme files are getting created */
DERBY-5996(Create readme files (cautioning users against modifying database files) at database hard upgrade time) Simple test to make sure readme files are getting created
testReadMeFiles
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_10.java", "license": "apache-2.0", "size": 18110 }
[ "java.io.File", "java.io.IOException", "java.sql.SQLException", "java.sql.Statement", "org.apache.derbyTesting.junit.TestConfiguration" ]
import java.io.File; import java.io.IOException; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.TestConfiguration;
import java.io.*; import java.sql.*; import org.apache.*;
[ "java.io", "java.sql", "org.apache" ]
java.io; java.sql; org.apache;
2,347,718
private void clipViewOnTheRight(Rect curViewBound, float curViewWidth, int right) { curViewBound.right = (int) (right - mClipPadding); curViewBound.left = (int) (curViewBound.right - curViewWidth); }
void function(Rect curViewBound, float curViewWidth, int right) { curViewBound.right = (int) (right - mClipPadding); curViewBound.left = (int) (curViewBound.right - curViewWidth); }
/** * Set bounds for the right textView including clip padding. * * @param curViewBound * current bounds. * @param curViewWidth * width of the view. */
Set bounds for the right textView including clip padding
clipViewOnTheRight
{ "repo_name": "jcjordyn130/simpleirc", "path": "viewPagerIndicator/src/main/java/com/viewpagerindicator/TitlePageIndicator.java", "license": "gpl-3.0", "size": 29951 }
[ "android.graphics.Rect" ]
import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
837,423
public void setAgentName(Name agentName) { this.agentName = agentName; }
void function(Name agentName) { this.agentName = agentName; }
/** * The name of the agent. * * @param agentName the Name. */
The name of the agent
setAgentName
{ "repo_name": "NABUCCO/org.nabucco.framework.setup", "path": "org.nabucco.framework.setup.facade.message/src/main/gen/org/nabucco/framework/setup/facade/message/agent/AgentNameRq.java", "license": "epl-1.0", "size": 5383 }
[ "org.nabucco.framework.base.facade.datatype.Name" ]
import org.nabucco.framework.base.facade.datatype.Name;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,585,249
static int innerMain(final Configuration c, final String [] args) throws Exception { return ToolRunner.run(c, new HLogPerformanceEvaluation(), args); }
static int innerMain(final Configuration c, final String [] args) throws Exception { return ToolRunner.run(c, new HLogPerformanceEvaluation(), args); }
/** * The guts of the {@link #main} method. * Call this method to avoid the {@link #main(String[])} System.exit. * @param args * @return errCode * @throws Exception */
The guts of the <code>#main</code> method. Call this method to avoid the <code>#main(String[])</code> System.exit
innerMain
{ "repo_name": "lilonglai/hbase-0.96.2", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/HLogPerformanceEvaluation.java", "license": "apache-2.0", "size": 16315 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.util.ToolRunner" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.ToolRunner;
import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,417,399
public void modified(Object key, Object value, Cache<Object, Object> cache);
void function(Object key, Object value, Cache<Object, Object> cache);
/** * Function called when a modification on a key in a cache is performed The function is called * after the action * * @param key the key of the cache that was modified * @param value the value associated with the key that was modified * @param cache the cache that was modified */
Function called when a modification on a key in a cache is performed The function is called after the action
modified
{ "repo_name": "leads-project/multicloud-mr", "path": "common/src/main/java/eu/leads/processor/plugins/PluginInterface.java", "license": "apache-2.0", "size": 2568 }
[ "org.infinispan.Cache" ]
import org.infinispan.Cache;
import org.infinispan.*;
[ "org.infinispan" ]
org.infinispan;
2,646,444
default <V> Func1<T, V> andThen(Func1<? super R, ? extends V> after) { Objects.requireNonNull(after); return (T t) -> after.apply(apply(t)); }
default <V> Func1<T, V> andThen(Func1<? super R, ? extends V> after) { Objects.requireNonNull(after); return (T t) -> after.apply(apply(t)); }
/** * Returns a composed function that first applies this function to * its input, and then applies the {@code after} function to the result. * If evaluation of either function throws an exception, it is relayed to * the caller of the composed function. * * @param <V> the type of output of...
Returns a composed function that first applies this function to its input, and then applies the after function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function
andThen
{ "repo_name": "soundvibe/funk4j", "path": "src/main/java/funk4j/functions/Func1.java", "license": "apache-2.0", "size": 2732 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,937,849
@ServiceMethod(returns = ReturnType.SINGLE) CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName);
@ServiceMethod(returns = ReturnType.SINGLE) CredentialResultsInner listClusterMonitoringUserCredentials(String resourceGroupName, String resourceName);
/** * Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @throws IllegalArgumentException thrown if parameters fai...
Gets cluster monitoring user credential of the managed cluster with a specified resource group and name
listClusterMonitoringUserCredentials
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/ManagedClustersClient.java", "license": "mit", "size": 63960 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.containerservice.fluent.models.CredentialResultsInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.containerservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,789,532
final Options options = getOptions(); final CommandLineParser parser = new DefaultParser(); try { final CommandLine cli = parser.parse(options, args); return cli.getOptionProperties(TRIPLEA_PROPERTY_PREFIX); } catch (final ParseException e) { throw new IllegalArgumentException("Failed to p...
final Options options = getOptions(); final CommandLineParser parser = new DefaultParser(); try { final CommandLine cli = parser.parse(options, args); return cli.getOptionProperties(TRIPLEA_PROPERTY_PREFIX); } catch (final ParseException e) { throw new IllegalArgumentException(STR + Arrays.toString(args), e); } }
/** * Parses the set of input parameters for things that look like "-Pkey=value" and will return the * key/value pairs as a Properties object. */
Parses the set of input parameters for things that look like "-Pkey=value" and will return the key/value pairs as a Properties object
getTripleaProperties
{ "repo_name": "ssoloff/triplea-game-triplea", "path": "game-core/src/main/java/games/strategy/engine/framework/ArgParsingHelper.java", "license": "gpl-3.0", "size": 1773 }
[ "java.util.Arrays", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.CommandLineParser", "org.apache.commons.cli.DefaultParser", "org.apache.commons.cli.Options", "org.apache.commons.cli.ParseException" ]
import java.util.Arrays; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException;
import java.util.*; import org.apache.commons.cli.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
844,472
void update(BinaryInput value, int index, EventMode mode);
void update(BinaryInput value, int index, EventMode mode);
/** * Update a value in the database * @param value measurement to update * @param index index of measurement * @param mode EventMode to use */
Update a value in the database
update
{ "repo_name": "thiagoralves/OpenPLC_v2", "path": "dnp3/java/bindings/src/main/java/com/automatak/dnp3/Database.java", "license": "gpl-3.0", "size": 4019 }
[ "com.automatak.dnp3.enums.EventMode" ]
import com.automatak.dnp3.enums.EventMode;
import com.automatak.dnp3.enums.*;
[ "com.automatak.dnp3" ]
com.automatak.dnp3;
599,112
public ScaleTwoDecimal getApplicableAmt() { return applicableAmt; }
ScaleTwoDecimal function() { return applicableAmt; }
/** Getter for property applicableAmt. * @return Value of property applicableAmt. * */
Getter for property applicableAmt
getApplicableAmt
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/coeus/common/budget/impl/calculator/BreakUpInterval.java", "license": "agpl-3.0", "size": 7294 }
[ "org.kuali.coeus.sys.api.model.ScaleTwoDecimal" ]
import org.kuali.coeus.sys.api.model.ScaleTwoDecimal;
import org.kuali.coeus.sys.api.model.*;
[ "org.kuali.coeus" ]
org.kuali.coeus;
256,264
public JTextField getCampoTipoLesion() { if (campoTipoLesion == null) { campoTipoLesion = new JTextField(); campoTipoLesion.setPreferredSize(new Dimension(500, 20)); campoTipoLesion.setMinimumSize(new Dimension(500, 20)); } return campoTipoLesion; }
JTextField function() { if (campoTipoLesion == null) { campoTipoLesion = new JTextField(); campoTipoLesion.setPreferredSize(new Dimension(500, 20)); campoTipoLesion.setMinimumSize(new Dimension(500, 20)); } return campoTipoLesion; }
/** * This method initializes campoTipoLesion * * @return javax.swing.JTextField */
This method initializes campoTipoLesion
getCampoTipoLesion
{ "repo_name": "lucianait10/BasicVet", "path": "source_basicvet/cuGestionarFichaClinica/PanelPiel.java", "license": "gpl-3.0", "size": 16608 }
[ "java.awt.Dimension", "javax.swing.JTextField" ]
import java.awt.Dimension; import javax.swing.JTextField;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
152,627
public boolean addChild(INode node, final boolean setModTime, final int latestSnapshotId) { final int low = searchChildren(node.getLocalNameBytes()); if (low >= 0) { return false; } if (isInLatestSnapshot(latestSnapshotId)) { // create snapshot feature if necessary DirectoryWi...
boolean function(INode node, final boolean setModTime, final int latestSnapshotId) { final int low = searchChildren(node.getLocalNameBytes()); if (low >= 0) { return false; } if (isInLatestSnapshot(latestSnapshotId)) { DirectoryWithSnapshotFeature sf = this.getDirectoryWithSnapshotFeature(); if (sf == null) { sf = this...
/** * Add a child inode to the directory. * * @param node INode to insert * @param setModTime set modification time for the parent node * not needed when replaying the addition and * the parent already has the proper mod time * @return false if the child with t...
Add a child inode to the directory
addChild
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java", "license": "apache-2.0", "size": 36327 }
[ "org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature" ]
import org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature;
import org.apache.hadoop.hdfs.server.namenode.snapshot.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,256,231
public static void require( final boolean condition, final String format, final Object...objects) throws RuntimeException { if (!condition) throw new LibraryException(String.format(format, objects)); }
static void function( final boolean condition, final String format, final Object...objects) throws RuntimeException { if (!condition) throw new LibraryException(String.format(format, objects)); }
/** * Throws an error if a <b>pre-condition</b> is not verified * <p> * @param condition is a condition to be verified * @param message is a message emitted. * @throws a LibraryException if the condition is not met */
Throws an error if a pre-condition is not verified
require
{ "repo_name": "spolnik/QuantJLib", "path": "src/main/java/org/quantjlib/QL.java", "license": "apache-2.0", "size": 12831 }
[ "org.quantjlib.lang.exceptions.LibraryException" ]
import org.quantjlib.lang.exceptions.LibraryException;
import org.quantjlib.lang.exceptions.*;
[ "org.quantjlib.lang" ]
org.quantjlib.lang;
278,049
protected static IndexService createIndex(String index, Settings settings, String type, Object... mappings) { CreateIndexRequestBuilder createIndexRequestBuilder = client().admin().indices().prepareCreate(index).setSettings(settings); if (type != null && mappings != null) { createIndexRe...
static IndexService function(String index, Settings settings, String type, Object... mappings) { CreateIndexRequestBuilder createIndexRequestBuilder = client().admin().indices().prepareCreate(index).setSettings(settings); if (type != null && mappings != null) { createIndexRequestBuilder.addMapping(type, mappings); } re...
/** * Create a new index on the singleton node with the provided index settings. */
Create a new index on the singleton node with the provided index settings
createIndex
{ "repo_name": "zeroctu/elasticsearch", "path": "core/src/test/java/org/elasticsearch/test/ESSingleNodeTestCase.java", "license": "apache-2.0", "size": 10894 }
[ "org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder", "org.elasticsearch.common.settings.Settings", "org.elasticsearch.index.IndexService" ]
import org.elasticsearch.action.admin.indices.create.CreateIndexRequestBuilder; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexService;
import org.elasticsearch.action.admin.indices.create.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.index.*;
[ "org.elasticsearch.action", "org.elasticsearch.common", "org.elasticsearch.index" ]
org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.index;
1,120,733
public Time getDayFromLocation(float x) { int dayStart = mShowWeekNum ? (mWidth - mPadding * 2) / mNumCells + mPadding : mPadding; if (x < dayStart || x > mWidth - mPadding) { return null; } // Selection is (x - start) / (pixels/day) == (x -s) * day / pixels int d...
Time function(float x) { int dayStart = mShowWeekNum ? (mWidth - mPadding * 2) / mNumCells + mPadding : mPadding; if (x < dayStart x > mWidth - mPadding) { return null; } int dayPosition = (int) ((x - dayStart) * mNumDays / (mWidth - dayStart - mPadding)); int day = mFirstJulianDay + dayPosition; Time time = new Time(m...
/** * Calculates the day that the given x position is in, accounting for week * number. Returns a Time referencing that day or null if * * @param x The x position of the touch event * @return A time object for the tapped day or null if the position wasn't * in a day */
Calculates the day that the given x position is in, accounting for week number. Returns a Time referencing that day or null if
getDayFromLocation
{ "repo_name": "goacg/mobi_android", "path": "CalendarView/src/mobi/hubtech/calendarview/SimpleWeekView.java", "license": "gpl-2.0", "size": 21123 }
[ "android.text.format.Time" ]
import android.text.format.Time;
import android.text.format.*;
[ "android.text" ]
android.text;
882,262
public InetSocketAddress getLocalAddress() { return localAddress; }
InetSocketAddress function() { return localAddress; }
/** * get local address. * * @return local address */
get local address
getLocalAddress
{ "repo_name": "alibaba/dubbo", "path": "dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java", "license": "apache-2.0", "size": 20662 }
[ "java.net.InetSocketAddress" ]
import java.net.InetSocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
276,202
public void attrAdded(Attr node, String newv) { if (!changing) { valid = false; } fireBaseAttributeListeners(); if (!hasAnimVal) { fireAnimatedAttributeListeners(); } }
void function(Attr node, String newv) { if (!changing) { valid = false; } fireBaseAttributeListeners(); if (!hasAnimVal) { fireAnimatedAttributeListeners(); } }
/** * Called when an Attr node has been added. */
Called when an Attr node has been added
attrAdded
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/dom/svg/SVGOMAnimatedBoolean.java", "license": "apache-2.0", "size": 5362 }
[ "org.w3c.dom.Attr" ]
import org.w3c.dom.Attr;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
886,908
@Override public void exitExpressionMinus(@NotNull BigDataScriptParser.ExpressionMinusContext ctx) { }
@Override public void exitExpressionMinus(@NotNull BigDataScriptParser.ExpressionMinusContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterExpressionMinus
{ "repo_name": "leepc12/BigDataScript", "path": "src/org/bds/antlr/BigDataScriptBaseListener.java", "license": "apache-2.0", "size": 36363 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
449,799
CompletionStage<String> redirectURL(String openID, String callbackURL, Map<String, String> axRequired);
CompletionStage<String> redirectURL(String openID, String callbackURL, Map<String, String> axRequired);
/** * Retrieve the URL where the user should be redirected to start the OpenID authentication process * * @param openID the open ID * @param callbackURL the callback url. * @param axRequired the required ax * @return A completion stage of the URL as a string. */
Retrieve the URL where the user should be redirected to start the OpenID authentication process
redirectURL
{ "repo_name": "Shenker93/playframework", "path": "framework/src/play-openid/src/main/java/play/libs/openid/OpenIdClient.java", "license": "apache-2.0", "size": 2695 }
[ "java.util.Map", "java.util.concurrent.CompletionStage" ]
import java.util.Map; import java.util.concurrent.CompletionStage;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,047,677
public UpdateRequestBuilder setUpsert(Map source, XContentType contentType) { request.upsert(source, contentType); return this; }
UpdateRequestBuilder function(Map source, XContentType contentType) { request.upsert(source, contentType); return this; }
/** * Sets the doc source of the update request to be used when the document does not exists. */
Sets the doc source of the update request to be used when the document does not exists
setUpsert
{ "repo_name": "anti-social/elasticsearch", "path": "src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java", "license": "apache-2.0", "size": 11206 }
[ "java.util.Map", "org.elasticsearch.common.xcontent.XContentType" ]
import java.util.Map; import org.elasticsearch.common.xcontent.XContentType;
import java.util.*; import org.elasticsearch.common.xcontent.*;
[ "java.util", "org.elasticsearch.common" ]
java.util; org.elasticsearch.common;
1,594,322
private JSONArray populateContactArray(int limit, HashMap<String, Boolean> populate, Cursor c) { String contactId = ""; String rawId = ""; String oldContactId = ""; boolean newContact = true; String mimetype = ""; JSONArray contacts = new JSONArray(); JSONObject contact...
JSONArray function(int limit, HashMap<String, Boolean> populate, Cursor c) { String contactId = STRSTRSTRSTRidSTRrawIdSTRdisplayNameSTRnameSTRnameSTRphoneNumbersSTRemailsSTRaddressesSTRorganizationsSTRimsSTRnoteSTRnoteSTRnicknameSTRnicknameSTRurlsSTRbirthdaySTRbirthdaySTRphotos",populate)) { photos.put(photoQuery(c, co...
/** * Creates an array of contacts from the cursor you pass in * * @param limit max number of contacts for the array * @param populate whether or not you should populate a certain value * @param c the cursor * @return a JSONArray of contacts */
Creates an array of contacts from the cursor you pass in
populateContactArray
{ "repo_name": "brycecurtis/cordova-android", "path": "framework/src/com/phonegap/ContactAccessorSdk5.java", "license": "apache-2.0", "size": 83394 }
[ "android.database.Cursor", "android.util.Log", "java.util.HashMap", "org.json.JSONArray", "org.json.JSONException" ]
import android.database.Cursor; import android.util.Log; import java.util.HashMap; import org.json.JSONArray; import org.json.JSONException;
import android.database.*; import android.util.*; import java.util.*; import org.json.*;
[ "android.database", "android.util", "java.util", "org.json" ]
android.database; android.util; java.util; org.json;
1,702,599
public void teleopInit() { shooterMotor.set(0); driver = new RobotDrive(2,1); drive = new Thread(driveJob); shoot = new Thread(shootJob); //feed = new Thread(feedJob); drive.start(); shoot.start(); //feed.start(); ...
void function() { shooterMotor.set(0); driver = new RobotDrive(2,1); drive = new Thread(driveJob); shoot = new Thread(shootJob); drive.start(); shoot.start(); }
/** * This function is called when teleoperated mode start. */
This function is called when teleoperated mode start
teleopInit
{ "repo_name": "4673Programming/LarryCapucha", "path": "src/com/solarmxli/larrycapucha/v2_0/LarryCapucha.java", "license": "bsd-3-clause", "size": 6954 }
[ "edu.wpi.first.wpilibj.RobotDrive" ]
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,532,608
public static void rollbackInsideProc(int p1, ResultSet[] data) throws SQLException { Connection conn = DriverManager.getConnection( "jdbc:default:connection"); PreparedStatement ps = conn.prepareStatement( "select * from dellater1 where i = ?"); ps.setInt(1, p1); ...
static void function(int p1, ResultSet[] data) throws SQLException { Connection conn = DriverManager.getConnection( STR); PreparedStatement ps = conn.prepareStatement( STR); ps.setInt(1, p1); data[0] = ps.executeQuery(); conn.rollback(); conn.close(); }
/** * A test case for DERBY-3304. An explicit rollback inside the procedure * should close all the resultsets created before the call to the * procedure and any resultsets created inside the procedure including * the dynamic resultsets. * * @param p1 * @param data * @throws SQLE...
A test case for DERBY-3304. An explicit rollback inside the procedure should close all the resultsets created before the call to the procedure and any resultsets created inside the procedure including the dynamic resultsets
rollbackInsideProc
{ "repo_name": "kavin256/Derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java", "license": "apache-2.0", "size": 102778 }
[ "java.sql.Connection", "java.sql.DriverManager", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,362,753
public boolean invalidSetMethod(Context context, String leftreference, String rightreference, Info info);
boolean function(Context context, String leftreference, String rightreference, Info info);
/** * Called when object is null or there is no setter for the given * property. invalidSetMethod() will be called in sequence for * each link in the chain until a true value is returned. It's * recommended that false be returned as a default to allow * for easy chaining. * * @par...
Called when object is null or there is no setter for the given property. invalidSetMethod() will be called in sequence for each link in the chain until a true value is returned. It's recommended that false be returned as a default to allow for easy chaining
invalidSetMethod
{ "repo_name": "zhiqinghuang/core", "path": "src/org/apache/velocity/app/event/InvalidReferenceEventHandler.java", "license": "gpl-3.0", "size": 7942 }
[ "org.apache.velocity.context.Context", "org.apache.velocity.util.introspection.Info" ]
import org.apache.velocity.context.Context; import org.apache.velocity.util.introspection.Info;
import org.apache.velocity.context.*; import org.apache.velocity.util.introspection.*;
[ "org.apache.velocity" ]
org.apache.velocity;
1,164,307
super.setUp(); counter = Counter.newCounter(true); counterThread = new TimerThread(counter); counterThread.start(); final String docText[] = { "docThatNeverMatchesSoWeCanRequireLastDocCollectedToBeGreaterThanZero", "one blah three", "one foo three multiOne", "one foobar t...
super.setUp(); counter = Counter.newCounter(true); counterThread = new TimerThread(counter); counterThread.start(); final String docText[] = { STR, STR, STR, STR, STR, STR, STR, STR, }; directory = newDirectory(); RandomIndexWriter iw = new RandomIndexWriter(random, directory, newIndexWriterConfig(TEST_VERSION_CURRENT,...
/** * initializes searcher with a document set */
initializes searcher with a document set
setUp
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java", "license": "apache-2.0", "size": 11971 }
[ "org.apache.lucene.analysis.MockAnalyzer", "org.apache.lucene.index.RandomIndexWriter", "org.apache.lucene.queryParser.QueryParser", "org.apache.lucene.search.TimeLimitingCollector", "org.apache.lucene.util.Counter" ]
import org.apache.lucene.analysis.MockAnalyzer; import org.apache.lucene.index.RandomIndexWriter; import org.apache.lucene.queryParser.QueryParser; import org.apache.lucene.search.TimeLimitingCollector; import org.apache.lucene.util.Counter;
import org.apache.lucene.*; import org.apache.lucene.analysis.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.lucene.util.*;
[ "org.apache.lucene" ]
org.apache.lucene;
513,376
public Observable<ServiceResponse<Page<ManagedClusterInner>>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } ...
Observable<ServiceResponse<Page<ManagedClusterInner>>> function(final String resourceGroupName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); }
/** * Lists managed clusters in the specified subscription and resource group. * Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster. * ServiceResponse<PageImpl<ManagedClusterInner>> * @param resourceGroupName The name of t...
Lists managed clusters in the specified subscription and resource group. Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed cluster
listByResourceGroupSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/containerservice/mgmt-v2020_07_01/src/main/java/com/microsoft/azure/management/containerservice/v2020_07_01/implementation/ManagedClustersInner.java", "license": "mit", "size": 155942 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,050,488
public int read() throws IOException { int result = -1; try { if (false) { } else if (this.charReader != null && isEncoded) { result = this.charReader.read(); } else if (this.byteStream != null) { result = this.byteStream.read(); ...
int function() throws IOException { int result = -1; try { if (false) { } else if (this.charReader != null && isEncoded) { result = this.charReader.read(); } else if (this.byteStream != null) { result = this.byteStream.read(); } else { } } catch (IOException exc) { throw exc; } return result; }
/** Reads a single character or byte. * This method will block until a character is available, * an I/O error occurs, or the end of the stream is reached. * @return The character or byte read, as an integer in the range 0 to 65535 (0x00-0xffff), * or -1 if the end of the stream has been reached....
Reads a single character or byte. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached
read
{ "repo_name": "gfis/dbat", "path": "src/main/java/org/teherba/common/URIReader.java", "license": "apache-2.0", "size": 35492 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,808,934
public ScoreboardHandler processor(Consumer<PlayerScoreboard> consumer) { this.processor = consumer; return this; }
ScoreboardHandler function(Consumer<PlayerScoreboard> consumer) { this.processor = consumer; return this; }
/** * Updates the action for our handler. In theory * it's what puts the text required in place. * * @param consumer what handles this * @return this handler */
Updates the action for our handler. In theory it's what puts the text required in place
processor
{ "repo_name": "OutdatedVersion/hyleria", "path": "plugin/core/src/main/java/com/hyleria/scoreboard/ScoreboardHandler.java", "license": "mpl-2.0", "size": 4648 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,497,833
private void checkSevered(BasicTestTree parent, BasicTestTree child) { // Make sure the child's parent is not the same parent. assertTrue(parent != child.getParent()); // Get the list of children and check its size vs the reported size from // getNumberOfChildren(). List<BasicTestTree> children = pa...
void function(BasicTestTree parent, BasicTestTree child) { assertTrue(parent != child.getParent()); List<BasicTestTree> children = parent.getChildren(); assertEquals(children.size(), parent.getNumberOfChildren()); boolean found = false; for (int i = 0; !found && i < children.size(); i++) { found = (child == children.ge...
/** * Checks that the child is not connected to the parent. * * @param parent * The parent tree. Assumed not to be null. * @param child * The child tree. Assumed not to be null. */
Checks that the child is not connected to the parent
checkSevered
{ "repo_name": "jdeyton/ActionTree", "path": "src/com.bar.foo.test/src/com/bar/foo/tree/test/BasicTreeTester.java", "license": "bsd-3-clause", "size": 17650 }
[ "java.util.List", "org.junit.Assert" ]
import java.util.List; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,867,148
public static void setBatchScan(Class<?> implementingClass, Configuration conf, boolean enableFeature) { conf.setBoolean(enumToConfKey(implementingClass, Features.BATCH_SCANNER), enableFeature); }
static void function(Class<?> implementingClass, Configuration conf, boolean enableFeature) { conf.setBoolean(enumToConfKey(implementingClass, Features.BATCH_SCANNER), enableFeature); }
/** * Controls the use of the {@link BatchScanner} in this job. Using this feature will group ranges * by their source tablet per InputSplit and use BatchScanner to read them. * * <p> * By default, this feature is <b>disabled</b>. * * @param implementingClass * the class whose name will...
Controls the use of the <code>BatchScanner</code> in this job. Using this feature will group ranges by their source tablet per InputSplit and use BatchScanner to read them. By default, this feature is disabled
setBatchScan
{ "repo_name": "mjwall/accumulo", "path": "core/src/main/java/org/apache/accumulo/core/clientImpl/mapreduce/lib/InputConfigurator.java", "license": "apache-2.0", "size": 38140 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,749,824
public static byte[] moveMonsterResponse(int objectid, short moveid, int currentMp, boolean useSkills, int skillId, int skillLevel) { final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(13); mplew.writeShort(SendOpcode.MOVE_MONSTER_RESPONSE.getValue()); ...
static byte[] function(int objectid, short moveid, int currentMp, boolean useSkills, int skillId, int skillLevel) { final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter(13); mplew.writeShort(SendOpcode.MOVE_MONSTER_RESPONSE.getValue()); mplew.writeInt(objectid); mplew.writeShort(moveid); mplew....
/** * Gets a response to a move monster packet. * * @param objectid The ObjectID of the monster being moved. * @param moveid The movement ID. * @param currentMp The current MP of the monster. * @param useSkills Can the monster use skills? * @param skillId T...
Gets a response to a move monster packet
moveMonsterResponse
{ "repo_name": "ronancpl/MapleSolaxiaV2", "path": "src/tools/MaplePacketCreator.java", "license": "agpl-3.0", "size": 404136 }
[ "net.opcodes.SendOpcode", "tools.data.output.MaplePacketLittleEndianWriter" ]
import net.opcodes.SendOpcode; import tools.data.output.MaplePacketLittleEndianWriter;
import net.opcodes.*; import tools.data.output.*;
[ "net.opcodes", "tools.data.output" ]
net.opcodes; tools.data.output;
2,473,037
@Override public HSSFCellStyle getRowStyle() { if(!isFormatted()) { return null; } short styleIndex = row.getXFIndex(); ExtendedFormatRecord xf = book.getWorkbook().getExFormatAt(styleIndex); return new HSSFCellStyle(styleIndex, xf, book); }
HSSFCellStyle function() { if(!isFormatted()) { return null; } short styleIndex = row.getXFIndex(); ExtendedFormatRecord xf = book.getWorkbook().getExFormatAt(styleIndex); return new HSSFCellStyle(styleIndex, xf, book); }
/** * Returns the whole-row cell styles. Most rows won't * have one of these, so will return null. Call * {@link #isFormatted()} to check first. */
Returns the whole-row cell styles. Most rows won't have one of these, so will return null. Call <code>#isFormatted()</code> to check first
getRowStyle
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/java/org/apache/poi/hssf/usermodel/HSSFRow.java", "license": "apache-2.0", "size": 24118 }
[ "org.apache.poi.hssf.record.ExtendedFormatRecord" ]
import org.apache.poi.hssf.record.ExtendedFormatRecord;
import org.apache.poi.hssf.record.*;
[ "org.apache.poi" ]
org.apache.poi;
1,406,623
@Override public Structure clone() { Structure n = new StructureImpl(); // go through whole substructure and clone ... // copy structure data n.setPDBCode(getPDBCode()); n.setName(getName()); //TODO the header data is not being deep-copied, that's a minor issue since it is just some static metadata, ...
Structure function() { Structure n = new StructureImpl(); n.setPDBCode(getPDBCode()); n.setName(getName()); n.setPDBHeader(pdbHeader); n.setDBRefs(this.getDBRefs()); n.setConnections(getConnections()); n.setSites(getSites()); for (int i=0;i<nrModels();i++){ List<Chain> cloned_model = new ArrayList<Chain>(); for (int j=...
/** returns an identical copy of this structure . * @return an identical Structure object */
returns an identical copy of this structure
clone
{ "repo_name": "paolopavan/biojava", "path": "biojava-structure/src/main/java/org/biojava/nbio/structure/StructureImpl.java", "license": "lgpl-2.1", "size": 19647 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
895,733
public void setMetadataProfiles(final Collection<? extends Citation> newValues) { metadataProfiles = writeCollection(newValues, metadataProfiles, Citation.class); }
void function(final Collection<? extends Citation> newValues) { metadataProfiles = writeCollection(newValues, metadataProfiles, Citation.class); }
/** * Set the citation(s) for the profile(s) of the metadata standard to which the metadata conform. * Metadata profile standard citations should include an identifier. * * @param newValues the new profile(s) to which the metadata conform. * * @since 0.5 */
Set the citation(s) for the profile(s) of the metadata standard to which the metadata conform. Metadata profile standard citations should include an identifier
setMetadataProfiles
{ "repo_name": "apache/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/DefaultMetadata.java", "license": "apache-2.0", "size": 75665 }
[ "java.util.Collection", "org.opengis.metadata.citation.Citation" ]
import java.util.Collection; import org.opengis.metadata.citation.Citation;
import java.util.*; import org.opengis.metadata.citation.*;
[ "java.util", "org.opengis.metadata" ]
java.util; org.opengis.metadata;
2,709,051
protected final void setFile(final File file) throws DBException { this.file = file; fileIsNew = !file.exists(); try { if ((!file.exists()) || file.canWrite()) { try { raf = new RandomAccessFile(file, "rw"); final FileChanne...
final void function(final File file) throws DBException { this.file = file; fileIsNew = !file.exists(); try { if ((!file.exists()) file.canWrite()) { try { raf = new RandomAccessFile(file, "rw"); final FileChannel channel = raf.getChannel(); final FileLock lock = channel.tryLock(); if (lock == null) {readOnly = true;} ...
/** * setFile sets the file object for this Paged. * *@param file The File */
setFile sets the file object for this Paged
setFile
{ "repo_name": "jessealama/exist", "path": "src/org/exist/storage/btree/Paged.java", "license": "lgpl-2.1", "size": 38715 }
[ "java.io.File", "java.io.IOException", "java.io.RandomAccessFile", "java.nio.channels.FileChannel", "java.nio.channels.FileLock", "java.nio.channels.NonWritableChannelException" ]
import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; import java.nio.channels.NonWritableChannelException;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,836,382
public PaintType getLabelOutlinePaintType() { return this.labelOutlinePaintType; } /** * Sets the section label outline paint and sends a {@link PlotChangeEvent}
PaintType function() { return this.labelOutlinePaintType; } /** * Sets the section label outline paint and sends a {@link PlotChangeEvent}
/** * Returns the section label outline paint. * * @return The paint type (possibly <code>null</code>). * * @see #setLabelOutlinePaint(PaintType paintType) */
Returns the section label outline paint
getLabelOutlinePaintType
{ "repo_name": "djun100/afreechart", "path": "src/org/afree/chart/plot/PiePlot.java", "license": "lgpl-3.0", "size": 119920 }
[ "org.afree.chart.event.PlotChangeEvent", "org.afree.graphics.PaintType" ]
import org.afree.chart.event.PlotChangeEvent; import org.afree.graphics.PaintType;
import org.afree.chart.event.*; import org.afree.graphics.*;
[ "org.afree.chart", "org.afree.graphics" ]
org.afree.chart; org.afree.graphics;
2,312,177
public String toString() { StringBuilder format = new StringBuilder (PIPE).append(REG) .append(PIPE).append(TextUtil.checkSize(IND_OPER, 1, 1)) .append(PIPE).append(TextUtil.checkSize(IND_EMIT, 1)) .append(PIPE).append(isCancelled ? "" : COD_PART) ...
String function() { StringBuilder format = new StringBuilder (PIPE).append(REG) .append(PIPE).append(TextUtil.checkSize(IND_OPER, 1, 1)) .append(PIPE).append(TextUtil.checkSize(IND_EMIT, 1)) .append(PIPE).append(isCancelled ? STRddMMyyyySTRddMMyyyy", false)) .append(PIPE).append(TextUtil.checkSize(TextUtil.toNumeric(VL...
/** * Formata o Bloco A Registro 100 * * @return */
Formata o Bloco A Registro 100
toString
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempierelbr/sped/src/org/adempierelbr/sped/efd/piscofins/beans/RA100.java", "license": "gpl-2.0", "size": 10278 }
[ "org.adempierelbr.util.TextUtil" ]
import org.adempierelbr.util.TextUtil;
import org.adempierelbr.util.*;
[ "org.adempierelbr.util" ]
org.adempierelbr.util;
2,707,812
private static JFreeChart createChart() { XYSeries series1 = new XYSeries("Series 1"); series1.add(1.0, 1.0); series1.add(2.0, 2.0); series1.add(3.0, 3.0); XYDataset dataset = new XYSeriesCollection(series1); return ChartFactory.createXYAreaChart("Area Chart", "...
static JFreeChart function() { XYSeries series1 = new XYSeries(STR); series1.add(1.0, 1.0); series1.add(2.0, 2.0); series1.add(3.0, 3.0); XYDataset dataset = new XYSeriesCollection(series1); return ChartFactory.createXYAreaChart(STR, STR, "Range", dataset); } static class LocalListener implements ChartChangeListener { ...
/** * Create a test chart. * * @return The chart. */
Create a test chart
createChart
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/chart/XYAreaChartTest.java", "license": "lgpl-2.1", "size": 5622 }
[ "org.jfree.chart.event.ChartChangeListener", "org.jfree.data.Range", "org.jfree.data.xy.XYDataset", "org.jfree.data.xy.XYSeries", "org.jfree.data.xy.XYSeriesCollection" ]
import org.jfree.chart.event.ChartChangeListener; import org.jfree.data.Range; import org.jfree.data.xy.XYDataset; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.chart.event.*; import org.jfree.data.*; import org.jfree.data.xy.*;
[ "org.jfree.chart", "org.jfree.data" ]
org.jfree.chart; org.jfree.data;
2,802,506
public List<FileInfoChecksum> getOldestChecksumsForChecker(int start, int maxResults, Date beforeDate);
List<FileInfoChecksum> function(int start, int maxResults, Date beforeDate);
/** * Get the oldest checked checksums where check = true. * * @param start - start position in the number of * @param maxResults - maximum number of results to retrieve. * @param beforeDate - checksum must have been recalcuated before the given date. * * @return - all checksums that should be c...
Get the oldest checked checksums where check = true
getOldestChecksumsForChecker
{ "repo_name": "nate-rcl/irplus", "path": "file_db/src/edu/ur/file/db/FileInfoChecksumService.java", "license": "apache-2.0", "size": 2044 }
[ "java.util.Date", "java.util.List" ]
import java.util.Date; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,361,405
public LifecycleCallbackType<T> removeLifecycleCallbackClass() { childNode.removeChildren("lifecycle-callback-class"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: LifecycleCallbackType ElementNam...
LifecycleCallbackType<T> function() { childNode.removeChildren(STR); return this; }
/** * Removes the <code>lifecycle-callback-class</code> element * @return the current instance of <code>LifecycleCallbackType<T></code> */
Removes the <code>lifecycle-callback-class</code> element
removeLifecycleCallbackClass
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/javaee5/LifecycleCallbackTypeImpl.java", "license": "epl-1.0", "size": 4346 }
[ "org.jboss.shrinkwrap.descriptor.api.javaee5.LifecycleCallbackType" ]
import org.jboss.shrinkwrap.descriptor.api.javaee5.LifecycleCallbackType;
import org.jboss.shrinkwrap.descriptor.api.javaee5.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
895,105
public static int run(String[] args, final PrintStream status, final PrintStream out) throws Exception { class Listener extends XJCListener { ConsoleErrorReporter cer = new ConsoleErrorReporter(out==null?new PrintStream(new NullStream()):out);
static int function(String[] args, final PrintStream status, final PrintStream out) throws Exception { class Listener extends XJCListener { ConsoleErrorReporter cer = new ConsoleErrorReporter(out==null?new PrintStream(new NullStream()):out);
/** * Performs schema compilation and prints the status/error into the * specified PrintStream. * * <p> * This method could be used to trigger XJC from other tools, * such as Ant or IDE. * * @param args * specified command line parameters. If there is an error *...
Performs schema compilation and prints the status/error into the specified PrintStream. This method could be used to trigger XJC from other tools, such as Ant or IDE
run
{ "repo_name": "bulldog2011/mxjc", "path": "src/main/java/com/leansoft/mxjc/Driver.java", "license": "mit", "size": 19553 }
[ "com.sun.tools.xjc.ConsoleErrorReporter", "com.sun.tools.xjc.XJCListener", "com.sun.tools.xjc.util.NullStream", "java.io.PrintStream" ]
import com.sun.tools.xjc.ConsoleErrorReporter; import com.sun.tools.xjc.XJCListener; import com.sun.tools.xjc.util.NullStream; import java.io.PrintStream;
import com.sun.tools.xjc.*; import com.sun.tools.xjc.util.*; import java.io.*;
[ "com.sun.tools", "java.io" ]
com.sun.tools; java.io;
2,551,099
UpgradeEntity getUpgradeInProgress();
UpgradeEntity getUpgradeInProgress();
/** * Gets an {@link UpgradeEntity} if there is an upgrade in progress or an * upgrade that has been suspended. This will return the associated * {@link UpgradeEntity} if it exists. * * @return an upgrade which will either be in progress or suspended, or * {@code null} if none. * */
Gets an <code>UpgradeEntity</code> if there is an upgrade in progress or an upgrade that has been suspended. This will return the associated <code>UpgradeEntity</code> if it exists
getUpgradeInProgress
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java", "license": "apache-2.0", "size": 24252 }
[ "org.apache.ambari.server.orm.entities.UpgradeEntity" ]
import org.apache.ambari.server.orm.entities.UpgradeEntity;
import org.apache.ambari.server.orm.entities.*;
[ "org.apache.ambari" ]
org.apache.ambari;
860,456
public void save() { if (this.saveFilename == null || !(new File(this.saveFilename).exists())) { System.out.println("Datei 1: " + this.saveFilename); this.firePropertyChange(DocumentPanelController.UNKNOWN_SAVE_FILE, null, null); } else { ...
void function() { if (this.saveFilename == null !(new File(this.saveFilename).exists())) { System.out.println(STR + this.saveFilename); this.firePropertyChange(DocumentPanelController.UNKNOWN_SAVE_FILE, null, null); } else { DiptychonLogger.info(STR, this.saveFilename); System.out.println(STR + this.saveFilename); this...
/** * Saves the current project if a name has been specified */
Saves the current project if a name has been specified
save
{ "repo_name": "Diptychon/Diptychon", "path": "src/Diptychon/src/de/diptychon/models/data/Digital.java", "license": "gpl-3.0", "size": 60359 }
[ "de.diptychon.DiptychonLogger", "de.diptychon.controller.DocumentPanelController", "java.io.File" ]
import de.diptychon.DiptychonLogger; import de.diptychon.controller.DocumentPanelController; import java.io.File;
import de.diptychon.*; import de.diptychon.controller.*; import java.io.*;
[ "de.diptychon", "de.diptychon.controller", "java.io" ]
de.diptychon; de.diptychon.controller; java.io;
1,782,975
@Override protected ImmutableList<BuildRule> resolve( BuildRuleResolver resolver, ImmutableList<BuildTarget> input) throws MacroException { return FluentIterable.from(super.resolve(resolver, input)) .filter(CxxPreprocessorDep.class::isInstance) .toList(); }
ImmutableList<BuildRule> function( BuildRuleResolver resolver, ImmutableList<BuildTarget> input) throws MacroException { return FluentIterable.from(super.resolve(resolver, input)) .filter(CxxPreprocessorDep.class::isInstance) .toList(); }
/** * Make sure all resolved targets are instances of {@link CxxPreprocessorDep}. */
Make sure all resolved targets are instances of <code>CxxPreprocessorDep</code>
resolve
{ "repo_name": "justinmuller/buck", "path": "src/com/facebook/buck/cxx/CxxGenruleDescription.java", "license": "apache-2.0", "size": 29033 }
[ "com.facebook.buck.model.BuildTarget", "com.facebook.buck.model.MacroException", "com.facebook.buck.rules.BuildRule", "com.facebook.buck.rules.BuildRuleResolver", "com.google.common.collect.FluentIterable", "com.google.common.collect.ImmutableList" ]
import com.facebook.buck.model.BuildTarget; import com.facebook.buck.model.MacroException; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.rules.BuildRuleResolver; import com.google.common.collect.FluentIterable; import com.google.common.collect.ImmutableList;
import com.facebook.buck.model.*; import com.facebook.buck.rules.*; import com.google.common.collect.*;
[ "com.facebook.buck", "com.google.common" ]
com.facebook.buck; com.google.common;
986,615
private void processIfUngraded( AssignmentSubmission submission, boolean isNext ) { String flag = isNext ? FLAG_NEXT_UNGRADED : FLAG_PREV_UNGRADED; resetNavOptions( flag ); // If the submission is ungraded, set the appropriate flag and reference; return true if( !submission.getGraded() ) { applyNavOpt...
void function( AssignmentSubmission submission, boolean isNext ) { String flag = isNext ? FLAG_NEXT_UNGRADED : FLAG_PREV_UNGRADED; resetNavOptions( flag ); if( !submission.getGraded() ) { applyNavOption( flag, submission ); } }
/** * SAK-29314 - Determine if the given assignment submission is graded or not, whether * it has an actual 'submission' or not. * * @param submission - the submission to be checked * @param isNext - true/false; is for next submission (true), or previous (false) */
SAK-29314 - Determine if the given assignment submission is graded or not, whether it has an actual 'submission' or not
processIfUngraded
{ "repo_name": "rodriguezdevera/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 685575 }
[ "org.sakaiproject.assignment.api.AssignmentSubmission" ]
import org.sakaiproject.assignment.api.AssignmentSubmission;
import org.sakaiproject.assignment.api.*;
[ "org.sakaiproject.assignment" ]
org.sakaiproject.assignment;
1,051,754
@DELETE @Path("{guid}/traits/{traitName}") @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public Response deleteTrait(@Context HttpServletRequest request, @PathParam("guid") String guid, @PathParam(TRAIT_NAME) String traitName) { ...
@Path(STR) @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) Response function(@Context HttpServletRequest request, @PathParam("guid") String guid, @PathParam(TRAIT_NAME) String traitName) { LOG.info(STR, traitName, guid); try { metadataService.deleteTrait(guid, trait...
/** * Deletes a given trait from an existing entity represented by a guid. * * @param guid globally unique identifier for the entity * @param traitName name of the trait */
Deletes a given trait from an existing entity represented by a guid
deleteTrait
{ "repo_name": "jnhagelberg/incubator-atlas", "path": "webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java", "license": "apache-2.0", "size": 33413 }
[ "javax.servlet.http.HttpServletRequest", "javax.ws.rs.Consumes", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.WebApplicationException", "javax.ws.rs.core.Context", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.apache.atlas.AtlasClient", "org...
import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apac...
import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.atlas.*; import org.apache.atlas.typesystem.exception.*; import org.apache.atlas.web.util.*; import org.codehaus.jettison.json.*;
[ "javax.servlet", "javax.ws", "org.apache.atlas", "org.codehaus.jettison" ]
javax.servlet; javax.ws; org.apache.atlas; org.codehaus.jettison;
642,807
public final int doAfterBody() throws JspException { // Use the body of the tag as input for the date BodyContent body = getBodyContent(); String s = body.getString().trim(); // Clear the body since we will output only the formatted date body.clearBody(); if( ou...
final int function() throws JspException { BodyContent body = getBodyContent(); String s = body.getString().trim(); body.clearBody(); if( output_date == null ) { long time; try { time = Long.valueOf(s).longValue(); output_date = new Date(time); } catch(NumberFormatException nfe) { } } return SKIP_BODY; }
/** * Method called at end of format tag body. * * @return SKIP_BODY */
Method called at end of format tag body
doAfterBody
{ "repo_name": "getrailo/railo", "path": "railo-java/railo-core/src/org/apache/taglibs/datetime/FormatTag.java", "license": "lgpl-2.1", "size": 7688 }
[ "java.util.Date", "javax.servlet.jsp.JspException", "javax.servlet.jsp.tagext.BodyContent" ]
import java.util.Date; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyContent;
import java.util.*; import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*;
[ "java.util", "javax.servlet" ]
java.util; javax.servlet;
505,920
public SVGNumber replaceItem(SVGNumber newItem, int index) throws DOMException, SVGException { return (SVGNumber)replaceItemImpl(newItem,index); }
SVGNumber function(SVGNumber newItem, int index) throws DOMException, SVGException { return (SVGNumber)replaceItemImpl(newItem,index); }
/** * <b>DOM</b>: Implements {@link SVGNumberList#replaceItem(SVGNumber,int)}. */
DOM: Implements <code>SVGNumberList#replaceItem(SVGNumber,int)</code>
replaceItem
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/dom/svg/AbstractSVGNumberList.java", "license": "apache-2.0", "size": 7504 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.svg.SVGException", "org.w3c.dom.svg.SVGNumber" ]
import org.w3c.dom.DOMException; import org.w3c.dom.svg.SVGException; import org.w3c.dom.svg.SVGNumber;
import org.w3c.dom.*; import org.w3c.dom.svg.*;
[ "org.w3c.dom" ]
org.w3c.dom;
384,682
public static String getHostname() { if ( cachedHostname != null ) { return cachedHostname; } // In case we don't want to leave anything to doubt... // String systemHostname = EnvUtil.getSystemProperty( KETTLE_SYSTEM_HOSTNAME ); if ( !Utils.isEmpty( systemHostname ) ) { cachedHos...
static String function() { if ( cachedHostname != null ) { return cachedHostname; } if ( !Utils.isEmpty( systemHostname ) ) { cachedHostname = systemHostname; return systemHostname; } String lastHostname = STR; try { Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); while ( en.hasMoreElements(...
/** * Determine the hostname of the machine Kettle is running on * * @return The hostname */
Determine the hostname of the machine Kettle is running on
getHostname
{ "repo_name": "roboguy/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/Const.java", "license": "apache-2.0", "size": 124822 }
[ "java.net.InetAddress", "java.net.NetworkInterface", "java.net.SocketException", "java.util.Enumeration", "org.pentaho.di.core.util.Utils" ]
import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.Enumeration; import org.pentaho.di.core.util.Utils;
import java.net.*; import java.util.*; import org.pentaho.di.core.util.*;
[ "java.net", "java.util", "org.pentaho.di" ]
java.net; java.util; org.pentaho.di;
549,877
protected void initTGroupMembersRelatedByPerson() { if (collTGroupMembersRelatedByPerson == null) { collTGroupMembersRelatedByPerson = new ArrayList<TGroupMember>(); } }
void function() { if (collTGroupMembersRelatedByPerson == null) { collTGroupMembersRelatedByPerson = new ArrayList<TGroupMember>(); } }
/** * Temporary storage of collTGroupMembersRelatedByPerson to save a possible db hit in * the event objects are add to the collection, but the * complete collection is never requested. */
Temporary storage of collTGroupMembersRelatedByPerson to save a possible db hit in the event objects are add to the collection, but the complete collection is never requested
initTGroupMembersRelatedByPerson
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTPerson.java", "license": "gpl-3.0", "size": 1013508 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,206,881
private boolean addCallbackMethods(SootClass currentClass, Set<SootClass> referenceClasses, String callbackSignature) { // If no callbacks are declared for the current class, there is nothing // to be done here if (currentClass == null) return false; if (!this.callbackFunctions.containsKey(currentClass...
boolean function(SootClass currentClass, Set<SootClass> referenceClasses, String callbackSignature) { if (currentClass == null) return false; if (!this.callbackFunctions.containsKey(currentClass.getName())) return false; boolean callbackFound = false; Map<SootClass, Set<SootMethod>> callbackClasses = new HashMap<SootCl...
/** * Generates invocation statements for all callback methods which need to * be invoked during the given class' run cycle. * @param currentClass The class for which we currently build the lifecycle * @param referenceClasses The classes for which no new instances shall be * created, but rather existing ones...
Generates invocation statements for all callback methods which need to be invoked during the given class' run cycle
addCallbackMethods
{ "repo_name": "johspaeth/soot-infoflow", "path": "src/soot/jimple/infoflow/entryPointCreators/AndroidEntryPointCreator.java", "license": "lgpl-2.1", "size": 43921 }
[ "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.Map", "java.util.Set" ]
import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
874,611
@DELETE @Path("job/{noteId}/{paragraphId}") @ZeppelinApi public Response stopParagraph(@PathParam("noteId") String noteId, @PathParam("paragraphId") String paragraphId) throws IOException, IllegalArgumentException { LOG.info("stop paragraph job {} ", noteId); Note note = notebook.get...
@Path(STR) Response function(@PathParam(STR) String noteId, @PathParam(STR) String paragraphId) throws IOException, IllegalArgumentException { LOG.info(STR, noteId); Note note = notebook.getNote(noteId); checkIfNoteIsNotNull(note); checkIfUserCanRun(noteId, STR); Paragraph p = note.getParagraph(paragraphId); checkIfPar...
/** * Stop(delete) paragraph job REST API. * * @param noteId ID of Note * @param paragraphId ID of Paragraph * @return JSON with status.OK * @throws IOException * @throws IllegalArgumentException */
Stop(delete) paragraph job REST API
stopParagraph
{ "repo_name": "herval/zeppelin", "path": "zeppelin-server/src/main/java/org/apache/zeppelin/rest/NotebookRestApi.java", "license": "apache-2.0", "size": 37911 }
[ "java.io.IOException", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.Response", "org.apache.zeppelin.notebook.Note", "org.apache.zeppelin.notebook.Paragraph", "org.apache.zeppelin.server.JsonResponse" ]
import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; import org.apache.zeppelin.notebook.Note; import org.apache.zeppelin.notebook.Paragraph; import org.apache.zeppelin.server.JsonResponse;
import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.zeppelin.notebook.*; import org.apache.zeppelin.server.*;
[ "java.io", "javax.ws", "org.apache.zeppelin" ]
java.io; javax.ws; org.apache.zeppelin;
2,475,980
public KernelNodeBo getNodeBo() { final Node node = traverser.getNode(); if (node == null || getKernelQedeqBo() == null) { return null; } return getKernelQedeqBo().getLabels().getNode(node.getId()); } /** * Start traverse of QedeqBo. If during the traverse a...
KernelNodeBo function() { final Node node = traverser.getNode(); if (node == null getKernelQedeqBo() == null) { return null; } return getKernelQedeqBo().getLabels().getNode(node.getId()); } /** * Start traverse of QedeqBo. If during the traverse a {@link ModuleDataException}
/** * Get node that is currently parsed. Might be <code>null</code>. * * @return QEDEQ node were are currently in. */
Get node that is currently parsed. Might be <code>null</code>
getNodeBo
{ "repo_name": "m-31/qedeq", "path": "QedeqKernelBo/src/org/qedeq/kernel/bo/service/basis/ControlVisitor.java", "license": "gpl-2.0", "size": 21592 }
[ "org.qedeq.kernel.bo.module.KernelNodeBo", "org.qedeq.kernel.se.base.module.Node", "org.qedeq.kernel.se.common.ModuleDataException" ]
import org.qedeq.kernel.bo.module.KernelNodeBo; import org.qedeq.kernel.se.base.module.Node; import org.qedeq.kernel.se.common.ModuleDataException;
import org.qedeq.kernel.bo.module.*; import org.qedeq.kernel.se.base.module.*; import org.qedeq.kernel.se.common.*;
[ "org.qedeq.kernel" ]
org.qedeq.kernel;
292,906
public File getFile() { return file; }
File function() { return file; }
/** * Returns the file this commit record was loaded from. Never <tt>null</tt>, * unless {@linkplain #getId() commit id} is {@linkplain #INIT_COMMIT_ID}. */
Returns the file this commit record was loaded from. Never null, unless #getId() commit id is #INIT_COMMIT_ID
getFile
{ "repo_name": "gnahraf/io-util", "path": "src/main/java/com/gnahraf/io/store/karoon/CommitRecord.java", "license": "apache-2.0", "size": 4181 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,325,440
public void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.info("Get from " + request.getRemoteHost() + " - " + request.getRemoteAddr()); doPost (request, response); } // doGet
void function (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.info(STR + request.getRemoteHost() + STR + request.getRemoteAddr()); doPost (request, response); }
/************************************************************************** * Process the HTTP Get request * * @param request request * @param response response * @throws ServletException * @throws IOException */
Process the HTTP Get request
doGet
{ "repo_name": "erpcya/adempierePOS", "path": "serverApps/src/main/servlet/org/compiere/wstore/EMailServlet.java", "license": "gpl-2.0", "size": 4528 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
104,036
private void developerAccessGit( GitScmProviderRepository gitRepo ) { sink.paragraph(); linkPatternedText( getI18nString( "devaccess.git.intro" ) ); sink.paragraph_(); gitClone( gitRepo.getPushUrl() ); } // Mercurial
void function( GitScmProviderRepository gitRepo ) { sink.paragraph(); linkPatternedText( getI18nString( STR ) ); sink.paragraph_(); gitClone( gitRepo.getPushUrl() ); }
/** * Create the documentation to provide an developer access with a <code>Git</code> SCM. For example, generate * the following command line: * <p> * git clone repo * </p> * * @param gitRepo */
Create the documentation to provide an developer access with a <code>Git</code> SCM. For example, generate the following command line: git clone repo
developerAccessGit
{ "repo_name": "sonatype/maven-plugins", "path": "maven-project-info-reports-plugin/src/main/java/org/apache/maven/report/projectinfo/ScmReport.java", "license": "apache-2.0", "size": 33046 }
[ "org.apache.maven.scm.provider.git.repository.GitScmProviderRepository" ]
import org.apache.maven.scm.provider.git.repository.GitScmProviderRepository;
import org.apache.maven.scm.provider.git.repository.*;
[ "org.apache.maven" ]
org.apache.maven;
2,140,216
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.advanceLinePaint = SerialUtilities.readPaint(stream); this.advanceLineStroke = SerialUtilities.readStroke(stream); }
void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.advanceLinePaint = SerialUtilities.readPaint(stream); this.advanceLineStroke = SerialUtilities.readStroke(stream); }
/** * Provides serialization support. * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */
Provides serialization support
readObject
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/axis/CyclicNumberAxis.java", "license": "lgpl-2.1", "size": 42414 }
[ "java.io.IOException", "java.io.ObjectInputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
1,224,863
private void updateMigrateCost(SuperStepReportContainer ssrc) { if (this.graphBytes == 0) { this.graphBytes = 1; } this.migrateCost = (this.rwCheckPointT != 0 ? this.rwCheckPointT : this.loadDataT) * (this.graphBytes + this.messageBytes) / this.graphBytes; ssrc.setStaffRu...
void function(SuperStepReportContainer ssrc) { if (this.graphBytes == 0) { this.graphBytes = 1; } this.migrateCost = (this.rwCheckPointT != 0 ? this.rwCheckPointT : this.loadDataT) * (this.graphBytes + this.messageBytes) / this.graphBytes; ssrc.setStaffRunTime(this.staffRunTime); ssrc.setStaffID(this.getSid().getStaffI...
/** * Compute the migrate cost and report migrate information to bspcontroller. * * @param ssrc */
Compute the migrate cost and report migrate information to bspcontroller
updateMigrateCost
{ "repo_name": "LiuJianan/Graduate-Graph", "path": "src/java/com/chinamobile/bcbsp/bspstaff/BSPStaff.java", "license": "apache-2.0", "size": 138171 }
[ "com.chinamobile.bcbsp.sync.SuperStepReportContainer" ]
import com.chinamobile.bcbsp.sync.SuperStepReportContainer;
import com.chinamobile.bcbsp.sync.*;
[ "com.chinamobile.bcbsp" ]
com.chinamobile.bcbsp;
1,144,028
@SuppressWarnings("null") private void removeSpuriousCPE(Dependency dependency) { final List<Identifier> ids = new ArrayList<>(dependency.getIdentifiers()); Collections.sort(ids); final ListIterator<Identifier> mainItr = ids.listIterator(); while (mainItr.hasNext()) { ...
@SuppressWarnings("null") void function(Dependency dependency) { final List<Identifier> ids = new ArrayList<>(dependency.getIdentifiers()); Collections.sort(ids); final ListIterator<Identifier> mainItr = ids.listIterator(); while (mainItr.hasNext()) { final Identifier currentId = mainItr.next(); final VulnerableSoftwar...
/** * <p> * Intended to remove spurious CPE entries. By spurious we mean duplicate, * less specific CPE entries.</p> * <p> * Example:</p> * <code> * cpe:/a:some-vendor:some-product * cpe:/a:some-vendor:some-product:1.5 * cpe:/a:some-vendor:some-product:1.5.2 * </code> ...
Intended to remove spurious CPE entries. By spurious we mean duplicate, less specific CPE entries. Example: <code> cpe:/a:some-vendor:some-product cpe:/a:some-vendor:some-product:1.5 cpe:/a:some-vendor:some-product:1.5.2 </code> Should be trimmed to: <code> cpe:/a:some-vendor:some-product:1.5.2 </code>
removeSpuriousCPE
{ "repo_name": "Prakhash/security-tools", "path": "external/dependency-check-core-3.0.2/src/main/java/org/owasp/dependencycheck/analyzer/FalsePositiveAnalyzer.java", "license": "apache-2.0", "size": 23791 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "java.util.ListIterator", "org.owasp.dependencycheck.dependency.Dependency", "org.owasp.dependencycheck.dependency.Identifier", "org.owasp.dependencycheck.dependency.VulnerableSoftware" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.ListIterator; import org.owasp.dependencycheck.dependency.Dependency; import org.owasp.dependencycheck.dependency.Identifier; import org.owasp.dependencycheck.dependency.VulnerableSoftware;
import java.util.*; import org.owasp.dependencycheck.dependency.*;
[ "java.util", "org.owasp.dependencycheck" ]
java.util; org.owasp.dependencycheck;
2,144,201
@SuppressWarnings("unchecked") public T findByTokenId(String tokenId) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; try { query = pm.newQuery(clazz); query.setFilter("tokenId == param"); query.declareParameters("String param"); Collection<T> tokens = (Collection<...
@SuppressWarnings(STR) T function(String tokenId) { PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = null; try { query = pm.newQuery(clazz); query.setFilter(STR); query.declareParameters(STR); Collection<T> tokens = (Collection<T>) query.execute(tokenId); return tokens.isEmpty() ? null : tokens....
/** * Looks up the {@link GaeOAuthToken} entity with the given token ID. * @param tokenId Token ID. * @return The corresponding {@link GaeOAuthToken} entity. */
Looks up the <code>GaeOAuthToken</code> entity with the given token ID
findByTokenId
{ "repo_name": "biegleux/gae-oauth-tokenstore", "path": "src/main/java/com/github/biegleux/gae/oauth/tokenstore/persistence/GaeOAuthTokenRepository.java", "license": "apache-2.0", "size": 3201 }
[ "java.util.Collection", "javax.jdo.PersistenceManager", "javax.jdo.Query" ]
import java.util.Collection; import javax.jdo.PersistenceManager; import javax.jdo.Query;
import java.util.*; import javax.jdo.*;
[ "java.util", "javax.jdo" ]
java.util; javax.jdo;
245,896
public final Point2D getPoint2D(Point2D srcPt, Point2D dstPt) { if (dstPt == null) { dstPt = new Point2D.Float(); } dstPt.setLocation(srcPt.getX(), srcPt.getY()); return dstPt; }
final Point2D function(Point2D srcPt, Point2D dstPt) { if (dstPt == null) { dstPt = new Point2D.Float(); } dstPt.setLocation(srcPt.getX(), srcPt.getY()); return dstPt; }
/** * Returns the location of the destination point given a * point in the source. If dstPt is non-null, it will * be used to hold the return value. Since this is not a geometric * operation, the srcPt will equal the dstPt. */
Returns the location of the destination point given a point in the source. If dstPt is non-null, it will be used to hold the return value. Since this is not a geometric operation, the srcPt will equal the dstPt
getPoint2D
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.desktop/share/classes/java/awt/image/ConvolveOp.java", "license": "gpl-2.0", "size": 12894 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,244,570