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
void saveApprovedChanges(AssetTransferDocument document);
void saveApprovedChanges(AssetTransferDocument document);
/** * This method is called when the work flow document is reached its final approval * <ol> * <li>Gets the latest asset details from DB</li> * <li>Save asset owner data</li> * <li>Save location changes </li> * <li>Save organization changes</li> * <li>Create offset payments</li> ...
This method is called when the work flow document is reached its final approval Gets the latest asset details from DB Save asset owner data Save location changes Save organization changes Create offset payments Create new payments Update original payments
saveApprovedChanges
{ "repo_name": "bhutchinson/kfs", "path": "kfs-cam/src/main/java/org/kuali/kfs/module/cam/document/service/AssetTransferService.java", "license": "agpl-3.0", "size": 1640 }
[ "org.kuali.kfs.module.cam.document.AssetTransferDocument" ]
import org.kuali.kfs.module.cam.document.AssetTransferDocument;
import org.kuali.kfs.module.cam.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
2,427,196
public List<String> getDependencies() { if (this.mode == Mode.UBERJAR) { return this.applicationManifest.getDependencies(); } return Collections.emptyList(); }
List<String> function() { if (this.mode == Mode.UBERJAR) { return this.applicationManifest.getDependencies(); } return Collections.emptyList(); }
/** * List of <i>application-level</i> dependencies. * * <p>Only applicable for uberjar executions.</p> * * @return The list of Maven GAVs for application dependencies. */
List of application-level dependencies. Only applicable for uberjar executions
getDependencies
{ "repo_name": "emag/wildfly-swarm", "path": "core/bootstrap/src/main/java/org/wildfly/swarm/bootstrap/env/ApplicationEnvironment.java", "license": "apache-2.0", "size": 13212 }
[ "java.util.Collections", "java.util.List" ]
import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,854,201
void readFields(DataInput in) throws IOException;
void readFields(DataInput in) throws IOException;
/** * Deserialize the fields of this object from <code>in</code>. * * <p>For efficiency, implementations should attempt to re-use storage in the * existing object where possible.</p> * * @param in <code>DataInput</code> to deseriablize this object from. * @throws IOException */
Deserialize the fields of this object from <code>in</code>. For efficiency, implementations should attempt to re-use storage in the existing object where possible
readFields
{ "repo_name": "saman-aghazadeh/hadoop-2.5.2-netcdf", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Writable.java", "license": "apache-2.0", "size": 2918 }
[ "java.io.DataInput", "java.io.IOException" ]
import java.io.DataInput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,854,895
return Unmodifiable.Map0.instance(); } /** * Returns an unmodifiable map containing a single mapping. * See <a href="#unmodifiable">Unmodifiable Maps</a> for details. * * @param <K> the {@code Map}'s key type * @param <V> the {@code Map}'s value type * @param k1 the mappi...
return Unmodifiable.Map0.instance(); } /** * Returns an unmodifiable map containing a single mapping. * See <a href=STR>Unmodifiable Maps</a> for details. * * @param <K> the {@code Map}'s key type * @param <V> the {@code Map}'s value type * @param k1 the mapping's key * @param v1 the mapping's value * @return a {@code ...
/** * Returns an unmodifiable map containing zero mappings. * See <a href="#unmodifiable">Unmodifiable Maps</a> for details. * * @param <K> the {@code Map}'s key type * @param <V> the {@code Map}'s value type * @return an empty {@code Map} * * @since 9 */
Returns an unmodifiable map containing zero mappings. See Unmodifiable Maps for details
of
{ "repo_name": "streamsupport/streamsupport", "path": "src/literal/java/java8/util/Maps2.java", "license": "gpl-2.0", "size": 20740 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,290,352
public void sendPing(boolean force) throws IOException { if (initiateDisabled) { return; } long now = System.nanoTime(); if (force || now - lastPingNanoTime > pingIntervalNano) { lastPingNanoTime = now; byte[]...
void function(boolean force) throws IOException { if (initiateDisabled) { return; } long now = System.nanoTime(); if (force now - lastPingNanoTime > pingIntervalNano) { lastPingNanoTime = now; byte[] payload = new byte[8]; synchronized (socketWrapper) { int sentSequence = ++sequence; PingRecord pingRecord = new PingRec...
/** * Check to see if a ping was sent recently and, if not, send one. * * @param force Send a ping, even if one was sent recently * * @throws IOException If an I/O issue prevents the ping from being sent */
Check to see if a ping was sent recently and, if not, send one
sendPing
{ "repo_name": "IAMTJW/Tomcat-8.5.20", "path": "tomcat-8.5.20/java/org/apache/coyote/http2/Http2UpgradeHandler.java", "license": "apache-2.0", "size": 62651 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,309,635
public void setInputEncoding(String encoding) { error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); }
void function(String encoding) { error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); }
/** * <p>Based on the <a * href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document * Object Model (DOM) Level 3 Core Specification of 07 April 2004.</a>. * <p> * An attribute specifying, as part of the XML declaration, the encoding * of this document. This is <code>null</code> when uns...
Based on the Document Object Model (DOM) Level 3 Core Specification of 07 April 2004.. An attribute specifying, as part of the XML declaration, the encoding of this document. This is <code>null</code> when unspecified
setInputEncoding
{ "repo_name": "mirego/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/UnImplNode.java", "license": "apache-2.0", "size": 54550 }
[ "org.apache.xml.res.XMLErrorResources" ]
import org.apache.xml.res.XMLErrorResources;
import org.apache.xml.res.*;
[ "org.apache.xml" ]
org.apache.xml;
1,639,945
public static <K, V> MapBinder<K, V> newMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType) { binder = binder.skipSources(MapBinder.class, RealMapBinder.class); return newMapBinder(binder, keyType, valueType, Key.get(mapOf(keyType, valueType)), Key.get(mapOfProvide...
static <K, V> MapBinder<K, V> function(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType) { binder = binder.skipSources(MapBinder.class, RealMapBinder.class); return newMapBinder(binder, keyType, valueType, Key.get(mapOf(keyType, valueType)), Key.get(mapOfProviderOf(keyType, valueType)), Key.get(mapOf(key...
/** * Returns a new mapbinder that collects entries of {@code keyType}/{@code valueType} in a * {@link Map} that is itself bound with no binding annotation. */
Returns a new mapbinder that collects entries of keyType/valueType in a <code>Map</code> that is itself bound with no binding annotation
newMapBinder
{ "repo_name": "fizzy33/guice3", "path": "extensions/multibindings/src/com/google/inject/multibindings/MapBinder.java", "license": "apache-2.0", "size": 26628 }
[ "com.google.inject.Binder", "com.google.inject.Key", "com.google.inject.TypeLiteral", "com.google.inject.multibindings.Multibinder" ]
import com.google.inject.Binder; import com.google.inject.Key; import com.google.inject.TypeLiteral; import com.google.inject.multibindings.Multibinder;
import com.google.inject.*; import com.google.inject.multibindings.*;
[ "com.google.inject" ]
com.google.inject;
54,586
public static void addOntology(Ontology ontology) { ontologies.add(ontology); }
static void function(Ontology ontology) { ontologies.add(ontology); }
/** * Registers an <code>Ontology</code>. * * @param ontology an ontology */
Registers an <code>Ontology</code>
addOntology
{ "repo_name": "ffund/sirius", "path": "sirius-application/question-answer/src/info/ephyra/questionanalysis/QuestionAnalysis.java", "license": "bsd-3-clause", "size": 7511 }
[ "info.ephyra.nlp.semantics.ontologies.Ontology" ]
import info.ephyra.nlp.semantics.ontologies.Ontology;
import info.ephyra.nlp.semantics.ontologies.*;
[ "info.ephyra.nlp" ]
info.ephyra.nlp;
108,558
void remove(Header header) throws CillaServiceException;
void remove(Header header) throws CillaServiceException;
/** * Removes a header, deleting its resources. * * @param header * {@link Header} to be removed */
Removes a header, deleting its resources
remove
{ "repo_name": "shred/cilla", "path": "cilla-service/src/main/java/org/shredzone/cilla/service/HeaderService.java", "license": "agpl-3.0", "size": 3874 }
[ "org.shredzone.cilla.core.model.Header", "org.shredzone.cilla.ws.exception.CillaServiceException" ]
import org.shredzone.cilla.core.model.Header; import org.shredzone.cilla.ws.exception.CillaServiceException;
import org.shredzone.cilla.core.model.*; import org.shredzone.cilla.ws.exception.*;
[ "org.shredzone.cilla" ]
org.shredzone.cilla;
1,485,712
@RequestMapping(value="/config/identifiers") public JsonResponseView configIdentifiers(final Model model) { model.addAttribute(new JsonResponse<Map<String, JsonVarConfig>>( jsonPipetConfig.getIdentifiers(), new JsonMeta(HttpStatus.OK.value()))); return new JsonResponseView(); ...
@RequestMapping(value=STR) JsonResponseView function(final Model model) { model.addAttribute(new JsonResponse<Map<String, JsonVarConfig>>( jsonPipetConfig.getIdentifiers(), new JsonMeta(HttpStatus.OK.value()))); return new JsonResponseView(); }
/** * Returns the configured identifiers from the pipet configuration file. */
Returns the configured identifiers from the pipet configuration file
configIdentifiers
{ "repo_name": "indeedeng/proctor-pipet", "path": "proctor-pipet-core/src/main/java/com/indeed/proctor/pipet/core/web/RestController.java", "license": "apache-2.0", "size": 8015 }
[ "com.indeed.proctor.pipet.core.config.JsonVarConfig", "com.indeed.proctor.pipet.core.model.JsonMeta", "com.indeed.proctor.pipet.core.model.JsonResponse", "java.util.Map", "org.springframework.http.HttpStatus", "org.springframework.ui.Model", "org.springframework.web.bind.annotation.RequestMapping" ]
import com.indeed.proctor.pipet.core.config.JsonVarConfig; import com.indeed.proctor.pipet.core.model.JsonMeta; import com.indeed.proctor.pipet.core.model.JsonResponse; import java.util.Map; import org.springframework.http.HttpStatus; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.R...
import com.indeed.proctor.pipet.core.config.*; import com.indeed.proctor.pipet.core.model.*; import java.util.*; import org.springframework.http.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*;
[ "com.indeed.proctor", "java.util", "org.springframework.http", "org.springframework.ui", "org.springframework.web" ]
com.indeed.proctor; java.util; org.springframework.http; org.springframework.ui; org.springframework.web;
891,641
private int appendSampleEncryptionData(TrackBundle trackBundle) { TrackFragment trackFragment = trackBundle.fragment; ParsableByteArray sampleEncryptionData = trackFragment.sampleEncryptionData; int sampleDescriptionIndex = trackFragment.header.sampleDescriptionIndex; TrackEncryptionBox encryptionBox ...
int function(TrackBundle trackBundle) { TrackFragment trackFragment = trackBundle.fragment; ParsableByteArray sampleEncryptionData = trackFragment.sampleEncryptionData; int sampleDescriptionIndex = trackFragment.header.sampleDescriptionIndex; TrackEncryptionBox encryptionBox = trackFragment.trackEncryptionBox != null ?...
/** * Appends the corresponding encryption data to the {@link TrackOutput} contained in the given * {@link TrackBundle}. * * @param trackBundle The {@link TrackBundle} that contains the {@link Track} for which the * Sample encryption data must be output. * @return The number of written bytes. *...
Appends the corresponding encryption data to the <code>TrackOutput</code> contained in the given <code>TrackBundle</code>
appendSampleEncryptionData
{ "repo_name": "jcable/ExoPlayer", "path": "library/src/main/java/com/google/android/exoplayer2/extractor/mp4/FragmentedMp4Extractor.java", "license": "apache-2.0", "size": 53874 }
[ "com.google.android.exoplayer2.extractor.TrackOutput", "com.google.android.exoplayer2.util.ParsableByteArray" ]
import com.google.android.exoplayer2.extractor.TrackOutput; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.extractor.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
1,692,655
@Test void testHiveCastAsInt() { String query = "select cast( cast(\"employee_id\" as varchar) as int) " + "from \"foodmart\".\"reserve_employee\" "; final String expected = "SELECT CAST(CAST(employee_id AS VARCHAR) AS INT)\n" + "FROM foodmart.reserve_employee"; sql(query).withHive().ok(ex...
@Test void testHiveCastAsInt() { String query = STRemployee_id\STR + STRfoodmart\".\"reserve_employee\" "; final String expected = STR + STR; sql(query).withHive().ok(expected); }
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-3282">[CALCITE-3282] * HiveSqlDialect unparse Interger type as Int in order * to be compatible with Hive1.x</a>. */
Test case for [CALCITE-3282] HiveSqlDialect unparse Interger type as Int in order
testHiveCastAsInt
{ "repo_name": "jcamachor/calcite", "path": "core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java", "license": "apache-2.0", "size": 255920 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,548,304
private boolean shardExistsInNode(final NodeGatewayStartedShards response) { return response.storeException() != null || response.allocationId() != null; }
boolean function(final NodeGatewayStartedShards response) { return response.storeException() != null response.allocationId() != null; }
/** * A shard exists/existed in a node only if shard state file exists in the node */
A shard exists/existed in a node only if shard state file exists in the node
shardExistsInNode
{ "repo_name": "sneivandt/elasticsearch", "path": "core/src/main/java/org/elasticsearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java", "license": "apache-2.0", "size": 12748 }
[ "org.elasticsearch.gateway.TransportNodesListGatewayStartedShards" ]
import org.elasticsearch.gateway.TransportNodesListGatewayStartedShards;
import org.elasticsearch.gateway.*;
[ "org.elasticsearch.gateway" ]
org.elasticsearch.gateway;
1,292,281
return call( new GetRequest(path("list")) .setParam("ps", request.getPs()) .setParam("q", request.getQ()) .setMediaType(MediaTypes.JSON) ).content(); }
return call( new GetRequest(path("list")) .setParam("ps", request.getPs()) .setParam("q", request.getQ()) .setMediaType(MediaTypes.JSON) ).content(); }
/** * * This is part of the internal API. * This is a GET request. * @see <a href="https://next.sonarqube.com/sonarqube/web_api/api/languages/list">Further information about this action online (including a response example)</a> * @since 5.1 */
This is part of the internal API. This is a GET request
list
{ "repo_name": "SonarSource/sonarqube", "path": "sonar-ws/src/main/java/org/sonarqube/ws/client/languages/LanguagesService.java", "license": "lgpl-3.0", "size": 1918 }
[ "org.sonarqube.ws.MediaTypes", "org.sonarqube.ws.client.GetRequest" ]
import org.sonarqube.ws.MediaTypes; import org.sonarqube.ws.client.GetRequest;
import org.sonarqube.ws.*; import org.sonarqube.ws.client.*;
[ "org.sonarqube.ws" ]
org.sonarqube.ws;
1,275,920
public void setPassiveLocalIPAddress(InetAddress inetAddress) { this.__passiveLocalHost = inetAddress; }
void function(InetAddress inetAddress) { this.__passiveLocalHost = inetAddress; }
/** * Set the local IP address to use in passive mode. * Useful when there are multiple network cards. * * @param inetAddress The local IP address of this machine. */
Set the local IP address to use in passive mode. Useful when there are multiple network cards
setPassiveLocalIPAddress
{ "repo_name": "AriaLyy/DownloadUtil", "path": "AriaFtpPlug/src/main/java/aria/apache/commons/net/ftp/FTPClient.java", "license": "apache-2.0", "size": 152886 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,541,545
public void setMapImages(final Map mapImages) { this.mapImages = mapImages; } // // // Clickodrome // // // Since we only have two mouse events to listen to, we'll use the same // method to generate the appropriate hyperlinks and distinguish // between them when we react to the mouse events. ...
void function(final Map mapImages) { this.mapImages = mapImages; } private static final int JUMP = 0; private static final int MOVE = 1; private LinkController myController = new LinkController();
/** * Set the map of the images. * @param mapImages The mapImages to set */
Set the map of the images
setMapImages
{ "repo_name": "GenomicParisCentre/doelan", "path": "src/main/java/fr/ens/transcriptome/doelan/gui/DoelanEditorKit.java", "license": "gpl-2.0", "size": 7216 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,238,126
public Map<WellSetBigInteger, List<BigDecimal>> setsAggregated(Collection<WellSetBigInteger> collection, MathContext mc) { Preconditions.checkNotNull(collection, "The well set collection cannot be null."); Map<WellSetBigInteger, List<BigDecimal>> results = new TreeMap<WellSetBigInteger, Li...
Map<WellSetBigInteger, List<BigDecimal>> function(Collection<WellSetBigInteger> collection, MathContext mc) { Preconditions.checkNotNull(collection, STR); Map<WellSetBigInteger, List<BigDecimal>> results = new TreeMap<WellSetBigInteger, List<BigDecimal>>(); for(WellSetBigInteger set : collection) { List<BigDecimal> agg...
/** * Returns the aggregated statistic for each well set. * @param Collection<WellSetBigInteger> collection of well sets * @param MathContext the math context * @return map of well sets and aggregated results */
Returns the aggregated statistic for each well set
setsAggregated
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/bigintegerflex/stat/DescriptiveStatisticListBigIntegerContext.java", "license": "apache-2.0", "size": 24705 }
[ "com.github.jessemull.microflex.bigintegerflex.plate.WellBigInteger", "com.github.jessemull.microflex.bigintegerflex.plate.WellSetBigInteger", "com.google.common.base.Preconditions", "java.math.BigDecimal", "java.math.MathContext", "java.util.ArrayList", "java.util.Collection", "java.util.List", "ja...
import com.github.jessemull.microflex.bigintegerflex.plate.WellBigInteger; import com.github.jessemull.microflex.bigintegerflex.plate.WellSetBigInteger; import com.google.common.base.Preconditions; import java.math.BigDecimal; import java.math.MathContext; import java.util.ArrayList; import java.util.Collection; import...
import com.github.jessemull.microflex.bigintegerflex.plate.*; import com.google.common.base.*; import java.math.*; import java.util.*;
[ "com.github.jessemull", "com.google.common", "java.math", "java.util" ]
com.github.jessemull; com.google.common; java.math; java.util;
2,539,360
@SuppressWarnings("unchecked") private void setListSelection(DataElement<?> rDataElement, String sSelection, boolean bAdd) { UserInterfaceContext rContext = getElementComponent().getContext(); List<?> rValues = rDataElement.getAllowedValues(); String sNullValue = rDataElement.get...
@SuppressWarnings(STR) void function(DataElement<?> rDataElement, String sSelection, boolean bAdd) { UserInterfaceContext rContext = getElementComponent().getContext(); List<?> rValues = rDataElement.getAllowedValues(); String sNullValue = rDataElement.getProperty(NULL_VALUE, null); if (sNullValue != null) { sNullValue...
/*************************************** * Sets the selection for data elements that are based on a list validator. * * @param rDataElement The data element to set the value of * @param sSelection The string value of the selection to set * @param bAdd TRUE to add a value to a list data element, FALS...
Sets the selection for data elements that are based on a list validator
setListSelection
{ "repo_name": "esoco/esoco-gwt", "path": "src/main/java/de/esoco/gwt/client/ui/ValueListDataElementUI.java", "license": "apache-2.0", "size": 25688 }
[ "de.esoco.data.element.DataElement", "de.esoco.data.element.ListDataElement", "de.esoco.ewt.UserInterfaceContext", "java.util.List" ]
import de.esoco.data.element.DataElement; import de.esoco.data.element.ListDataElement; import de.esoco.ewt.UserInterfaceContext; import java.util.List;
import de.esoco.data.element.*; import de.esoco.ewt.*; import java.util.*;
[ "de.esoco.data", "de.esoco.ewt", "java.util" ]
de.esoco.data; de.esoco.ewt; java.util;
1,671,028
@ServiceMethod(returns = ReturnType.SINGLE) public ServerSecurityAlertPolicyInner createOrUpdate( String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { return cre...
@ServiceMethod(returns = ReturnType.SINGLE) ServerSecurityAlertPolicyInner function( String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { return createOrUpdateAsync(resourceGroupName, serverName, securityAlertPolicyNa...
/** * Creates or updates a threat detection policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The serve...
Creates or updates a threat detection policy
createOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java", "license": "mit", "size": 43102 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner", "com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner; import com.azure.resourcemanager.mariadb.models.SecurityAlertPolicyName;
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.mariadb.fluent.models.*; import com.azure.resourcemanager.mariadb.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,896,170
protected MarkUpAttributes parseAttributes( String commentForm ) { PatternMatcher matcher = new Perl5Matcher(); PatternMatcherInput input = new PatternMatcherInput( commentForm ); MarkUpAttributes m = new MarkUpAttributes() ; while ( matcher.contains( inpu...
MarkUpAttributes function( String commentForm ) { PatternMatcher matcher = new Perl5Matcher(); PatternMatcherInput input = new PatternMatcherInput( commentForm ); MarkUpAttributes m = new MarkUpAttributes() ; while ( matcher.contains( input, _parsePattern ) ) { MatchResult result = matcher.getMatch(); String name = res...
/** * Create a <code>MarkUpAttributes</code> object from a <code>String</code> * like * * <! name= "power-talk" placeholder-date = "01-Nov-8" --> * * @param commentForm The attributes in serialized form */
Create a <code>MarkUpAttributes</code> object from a <code>String</code> like
parseAttributes
{ "repo_name": "janekdb/ntropa", "path": "presentation/wps/src/org/ntropa/build/html/StandardFragmentTokenizer.java", "license": "apache-2.0", "size": 11908 }
[ "org.apache.oro.text.regex.MatchResult", "org.apache.oro.text.regex.PatternMatcher", "org.apache.oro.text.regex.PatternMatcherInput", "org.apache.oro.text.regex.Perl5Matcher" ]
import org.apache.oro.text.regex.MatchResult; import org.apache.oro.text.regex.PatternMatcher; import org.apache.oro.text.regex.PatternMatcherInput; import org.apache.oro.text.regex.Perl5Matcher;
import org.apache.oro.text.regex.*;
[ "org.apache.oro" ]
org.apache.oro;
1,181,945
public Map<String, ContentStore> getContentStores(int maxRetries) throws ContentStoreException;
Map<String, ContentStore> function(int maxRetries) throws ContentStoreException;
/** * Gets all available content stores. * * @param maxRetries number of retries to perform if a content store call fails * @return a map of content stores to content store IDs * @throws ContentStoreException if the content store list cannot be retrieved */
Gets all available content stores
getContentStores
{ "repo_name": "duracloud/duracloud", "path": "storeclient/src/main/java/org/duracloud/client/ContentStoreManager.java", "license": "apache-2.0", "size": 4206 }
[ "java.util.Map", "org.duracloud.error.ContentStoreException" ]
import java.util.Map; import org.duracloud.error.ContentStoreException;
import java.util.*; import org.duracloud.error.*;
[ "java.util", "org.duracloud.error" ]
java.util; org.duracloud.error;
901,766
void rnnSetTBPTTState(Map<String, INDArray> state);
void rnnSetTBPTTState(Map<String, INDArray> state);
/** * Set the RNN truncated backpropagations through time (TBPTT) state for the recurrent layer. * The TBPTT state is used to store intermediate activations/state between updating parameters when doing * TBPTT learning * * @param state TBPTT state to set */
Set the RNN truncated backpropagations through time (TBPTT) state for the recurrent layer. The TBPTT state is used to store intermediate activations/state between updating parameters when doing TBPTT learning
rnnSetTBPTTState
{ "repo_name": "xuzhongxing/deeplearning4j", "path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/api/layers/RecurrentLayer.java", "license": "apache-2.0", "size": 3936 }
[ "java.util.Map", "org.nd4j.linalg.api.ndarray.INDArray" ]
import java.util.Map; import org.nd4j.linalg.api.ndarray.INDArray;
import java.util.*; import org.nd4j.linalg.api.ndarray.*;
[ "java.util", "org.nd4j.linalg" ]
java.util; org.nd4j.linalg;
1,885,751
@SuppressWarnings("unchecked") private void registerMbean(Object obj, @Nullable String cacheName, boolean near) throws IgniteCheckedException { if (U.IGNITE_MBEANS_DISABLED) return; assert obj != null; MBeanServer srvr = ctx.config().getMBeanServer(); asser...
@SuppressWarnings(STR) void function(Object obj, @Nullable String cacheName, boolean near) throws IgniteCheckedException { if (U.IGNITE_MBEANS_DISABLED) return; assert obj != null; MBeanServer srvr = ctx.config().getMBeanServer(); assert srvr != null; cacheName = U.maskName(cacheName); cacheName = near ? cacheName + "-...
/** * Registers MBean for cache components. * * @param obj Cache component. * @param cacheName Cache name. * @param near Near flag. * @throws IgniteCheckedException If registration failed. */
Registers MBean for cache components
registerMbean
{ "repo_name": "endian675/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java", "license": "apache-2.0", "size": 172471 }
[ "javax.management.MBeanServer", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.util.typedef.internal.U", "org.apache.ignite.mxbean.IgniteMBeanAware", "org.jetbrains.annotations.Nullable" ]
import javax.management.MBeanServer; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.mxbean.IgniteMBeanAware; import org.jetbrains.annotations.Nullable;
import javax.management.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.mxbean.*; import org.jetbrains.annotations.*;
[ "javax.management", "org.apache.ignite", "org.jetbrains.annotations" ]
javax.management; org.apache.ignite; org.jetbrains.annotations;
177,718
private boolean try_remove_edge(int p_net_no, ShapeSearchTree p_autoroute_search_tree) { if (!(this.from_room instanceof IncompleteFreeSpaceExpansionRoom)) { return false; } IncompleteFreeSpaceExpansionRoom curr_incomplete_room = (IncompleteFreeSpaceExpansionRoom) thi...
boolean function(int p_net_no, ShapeSearchTree p_autoroute_search_tree) { if (!(this.from_room instanceof IncompleteFreeSpaceExpansionRoom)) { return false; } IncompleteFreeSpaceExpansionRoom curr_incomplete_room = (IncompleteFreeSpaceExpansionRoom) this.from_room; if (!(curr_incomplete_room.get_shape() instanceof IntB...
/** * Check, that each side of the romm shape has at least one touching neighbour. * Otherwise the room shape will be improved the by enlarging. * Returns true, if the room shape was changed. */
Check, that each side of the romm shape has at least one touching neighbour. Otherwise the room shape will be improved the by enlarging. Returns true, if the room shape was changed
try_remove_edge
{ "repo_name": "nick-less/freerouting", "path": "src/main/java/autoroute/SortedOrthogonalRoomNeighbours.java", "license": "gpl-3.0", "size": 32663 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,371,157
public InputStream getDataStream() throws IOException;
InputStream function() throws IOException;
/** * Get the data from the underlying storage. * @return * @throws IOException */
Get the data from the underlying storage
getDataStream
{ "repo_name": "wpride/javarosa", "path": "core/src/org/javarosa/core/data/IDataPointer.java", "license": "apache-2.0", "size": 1584 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,086,672
@SuppressWarnings("unchecked") public void update(DownloadPolicy policy) throws IOException { finished = false; // fetch list of changes // example changes data: Log.d(TAG, "updating store"); Fetcher fetcher = getFetcher(); // get database information Map<String, Object> dbInfo =...
@SuppressWarnings(STR) void function(DownloadPolicy policy) throws IOException { finished = false; Log.d(TAG, STR); Fetcher fetcher = getFetcher(); Map<String, Object> dbInfo = fetcher.fetchJSON(database.getUrl()); if(dbInfo != null) { Log.d(TAG, STR + dbInfo.toString()); Integer delCount = (Integer) dbInfo.get(STR); I...
/** * Runs an update against the remote CouchDB database, using the given download policy. * @param policy * @throws IOException */
Runs an update against the remote CouchDB database, using the given download policy
update
{ "repo_name": "NextFaze/couchdbsyncer-android", "path": "src/au/com/team2moro/couchdbsyncer/Syncer.java", "license": "apache-2.0", "size": 9486 }
[ "android.util.Log", "java.io.IOException", "java.util.Collection", "java.util.Date", "java.util.List", "java.util.Map" ]
import android.util.Log; import java.io.IOException; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Map;
import android.util.*; import java.io.*; import java.util.*;
[ "android.util", "java.io", "java.util" ]
android.util; java.io; java.util;
1,666,240
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String resourceGroupName, String resourceName, String agentPoolName);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String resourceGroupName, String resourceName, String agentPoolName);
/** * Deletes an agent pool in the specified managed cluster. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the managed cluster resource. * @param agentPoolName The name of the agent pool. * @throws IllegalArgumentException thrown if paramet...
Deletes an agent pool in the specified managed cluster
beginDeleteAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/fluent/AgentPoolsClient.java", "license": "mit", "size": 34328 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.PollerFlux" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*;
[ "com.azure.core" ]
com.azure.core;
342,597
public void removeMenu( JMenu menu) { for (Iterator<MenuWithListener> menuWithListenerIterator=menus.iterator(); menuWithListenerIterator.hasNext(); ) { MenuWithListener menuWithListener = menuWithListenerIterator.next(); if (menu.equals(menuWithListener.getMenu())) { menuWithListenerIterato...
void function( JMenu menu) { for (Iterator<MenuWithListener> menuWithListenerIterator=menus.iterator(); menuWithListenerIterator.hasNext(); ) { MenuWithListener menuWithListener = menuWithListenerIterator.next(); if (menu.equals(menuWithListener.getMenu())) { menuWithListenerIterator.remove(); break; } } }
/** * Removes a menu generated by {@link #createMenu(OpenRecentMenu.FileSelectedListener) * createMenu} from the list of managed menus. * * @param menu The menu to removed. */
Removes a menu generated by <code>#createMenu(OpenRecentMenu.FileSelectedListener) createMenu</code> from the list of managed menus
removeMenu
{ "repo_name": "tensberg/jgloss-mirror", "path": "jdictionary/src/main/java/jgloss/ui/OpenRecentMenu.java", "license": "gpl-2.0", "size": 6978 }
[ "java.util.Iterator", "javax.swing.JMenu" ]
import java.util.Iterator; import javax.swing.JMenu;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
682,337
public StoredSortedMap getShipmentByPartMap() { return shipmentByPartMap; }
StoredSortedMap function() { return shipmentByPartMap; }
/** * Return a map view of the shipment-by-part index. */
Return a map view of the shipment-by-part index
getShipmentByPartMap
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/examples/collections/ship/sentity/SampleViews.java", "license": "apache-2.0", "size": 13530 }
[ "com.sleepycat.collections.StoredSortedMap" ]
import com.sleepycat.collections.StoredSortedMap;
import com.sleepycat.collections.*;
[ "com.sleepycat.collections" ]
com.sleepycat.collections;
2,448,907
@Test public void testInToSemiJoinWithoutCast() throws SQLException { final String sql = "SELECT e.name\n" + "FROM emps AS e\n" + "WHERE e.empno in " + range(130, SqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD); sql("smart", sql).returns("NAME=Alice").ok(); }
@Test void function() throws SQLException { final String sql = STR + STR + STR + range(130, SqlToRelConverter.DEFAULT_IN_SUB_QUERY_THRESHOLD); sql("smart", sql).returns(STR).ok(); }
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-1051">[CALCITE-1051] * Underflow exception due to scaling IN clause literals</a>. */
Test case for [CALCITE-1051]
testInToSemiJoinWithoutCast
{ "repo_name": "arina-ielchiieva/calcite", "path": "example/csv/src/test/java/org/apache/calcite/test/CsvTest.java", "license": "apache-2.0", "size": 37426 }
[ "java.sql.SQLException", "org.apache.calcite.sql2rel.SqlToRelConverter", "org.junit.Test" ]
import java.sql.SQLException; import org.apache.calcite.sql2rel.SqlToRelConverter; import org.junit.Test;
import java.sql.*; import org.apache.calcite.sql2rel.*; import org.junit.*;
[ "java.sql", "org.apache.calcite", "org.junit" ]
java.sql; org.apache.calcite; org.junit;
2,002,094
public void setAxisProperties(Axis axis) { super.setAxisProperties(axis); LogAxis logAxis = (LogAxis) axis; if (!isAutoTickUnitSelection()) { logAxis.setTickUnit(new NumberTickUnit(manualTickUnitValue)); } }
void function(Axis axis) { super.setAxisProperties(axis); LogAxis logAxis = (LogAxis) axis; if (!isAutoTickUnitSelection()) { logAxis.setTickUnit(new NumberTickUnit(manualTickUnitValue)); } }
/** * Sets the properties of the specified axis to match the properties * defined on this panel. * * @param axis the axis. */
Sets the properties of the specified axis to match the properties defined on this panel
setAxisProperties
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/chart/editor/DefaultLogAxisEditor.java", "license": "mit", "size": 5125 }
[ "org.jfree.chart.axis.Axis", "org.jfree.chart.axis.LogAxis", "org.jfree.chart.axis.NumberTickUnit" ]
import org.jfree.chart.axis.Axis; import org.jfree.chart.axis.LogAxis; import org.jfree.chart.axis.NumberTickUnit;
import org.jfree.chart.axis.*;
[ "org.jfree.chart" ]
org.jfree.chart;
612,616
@SuppressWarnings("unchecked") public final Object remove(final String key) { Map<String, Object> map; try { map = (Map<String, Object>) value; } catch (ClassCastException e) { throw new IllegalStateException("Not an object."); } return map.remove...
@SuppressWarnings(STR) final Object function(final String key) { Map<String, Object> map; try { map = (Map<String, Object>) value; } catch (ClassCastException e) { throw new IllegalStateException(STR); } return map.remove(key); }
/** * Removes an object field. * @param key the object key. * @return the value that was removed, or null if the key does not exist. * @throws IllegalStateException if the JSOG is not an object. */
Removes an object field
remove
{ "repo_name": "JeffreyRodriguez/JSOG", "path": "src/main/java/net/sf/jsog/JSOG.java", "license": "unlicense", "size": 56094 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,874,394
@WebResult(name = "out", targetNamespace = "") @RequestWrapper(localName = "UpdateSystemParameter", targetNamespace = "http://ehealth.eu/StorageComponent/", className = "eu.ehealth.db.storagecomponent.UpdateSystemParameter") @WebMethod(operationName = "UpdateSystemParameter", action = "http://ehealth.eu/StorageCom...
@WebResult(name = "out", targetNamespace = STRUpdateSystemParameterSTRhttp: @WebMethod(operationName = STR, action = STRUpdateSystemParameterResponseSTRhttp: eu.ehealth.db.xsd.OperationResult function( @WebParam(name = "typeSTR") int type, @WebParam(name = "valueSTRSTRlocaleSTR") eu.ehealth.db.xsd.SystemParameter local...
/** * The UpdateSystemParametermethod updates the system parameter. It returns * the parameter id in the database or an error-code. */
The UpdateSystemParametermethod updates the system parameter. It returns the parameter id in the database or an error-code
updateSystemParameter
{ "repo_name": "SeaCloudsEU/SoftCare-Case-Study", "path": "softcare-ws/src/main/java/eu/ehealth/StorageComponent.java", "license": "apache-2.0", "size": 66574 }
[ "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult" ]
import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult;
import javax.jws.*;
[ "javax.jws" ]
javax.jws;
676,378
public boolean containsDomainRange(Date from, Date to) { return true; }
boolean function(Date from, Date to) { return true; }
/** * Returns <code>true</code> if the timeline includes the specified * domain value range. * * @param from the start date. * @param to the end date. * * @return <code>true</code>. */
Returns <code>true</code> if the timeline includes the specified domain value range
containsDomainRange
{ "repo_name": "ibestvina/multithread-centiscape", "path": "CentiScaPe2.1/src/main/java/org/jfree/chart/axis/DateAxis.java", "license": "mit", "size": 66431 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,456,079
protected InputStream getStreamFromDrawable(String imageUri, Object extra) { String drawableIdString = Scheme.DRAWABLE.crop(imageUri); int drawableId = Integer.parseInt(drawableIdString); return context.getResources().openRawResource(drawableId); }
InputStream function(String imageUri, Object extra) { String drawableIdString = Scheme.DRAWABLE.crop(imageUri); int drawableId = Integer.parseInt(drawableIdString); return context.getResources().openRawResource(drawableId); }
/** * Retrieves {@link InputStream} of image by URI (image is located in drawable resources of application). * * @param imageUri Image URI * @param extra Auxiliary object which was passed to {@link DisplayImageOptions.Builder#extraForDownloader(Object) * DisplayImageOptions.extraForDownload...
Retrieves <code>InputStream</code> of image by URI (image is located in drawable resources of application)
getStreamFromDrawable
{ "repo_name": "coryjthompson/cordova-plugin-multiple-media-selection", "path": "src/android/com/nostra13/universalimageloader/core/download/BaseImageDownloader.java", "license": "mit", "size": 12299 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,125,659
public Adapter createLineObjectAdapter() { return null; }
Adapter function() { return null; }
/** * Creates a new adapter for an object of class '{@link com.archimatetool.model.ILineObject <em>Line Object</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases...
Creates a new adapter for an object of class '<code>com.archimatetool.model.ILineObject Line Object</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway.
createLineObjectAdapter
{ "repo_name": "archimatetool/archi", "path": "com.archimatetool.model/src/com/archimatetool/model/util/ArchimateAdapterFactory.java", "license": "mit", "size": 112141 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
357,301
public T prepareCreate(ActionEvent event) { T newItem; try { newItem = itemClass.newInstance(); this.selected = newItem; initializeEmbeddableKey(); return newItem; } catch (InstantiationException | IllegalAccessException ex) { Logge...
T function(ActionEvent event) { T newItem; try { newItem = itemClass.newInstance(); this.selected = newItem; initializeEmbeddableKey(); return newItem; } catch (InstantiationException IllegalAccessException ex) { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex); } return null; }
/** * Creates a new instance of an underlying entity and assigns it to Selected * property. * * @param event an event from the widget that wants to create a new, * unmanaged Entity for the data layer * @return a new, unmanaged Entity */
Creates a new instance of an underlying entity and assigns it to Selected property
prepareCreate
{ "repo_name": "alejo86a/cineUdea-crud", "path": "src/java/co/edu/udea/cine/controller/AbstractController.java", "license": "apache-2.0", "size": 8342 }
[ "java.util.logging.Level", "java.util.logging.Logger", "javax.faces.event.ActionEvent" ]
import java.util.logging.Level; import java.util.logging.Logger; import javax.faces.event.ActionEvent;
import java.util.logging.*; import javax.faces.event.*;
[ "java.util", "javax.faces" ]
java.util; javax.faces;
2,786,221
public void killPrimaryEndpoint() // throws ServerException { boolean ok = false; if (this.queueManager != null) { QueueManager.QueueConnections cons = this.queueManager.getAllConnections(); Connection con = cons.getPrimary(); if (con != null) { final String msg = "killing primary ...
void function() { boolean ok = false; if (this.queueManager != null) { QueueManager.QueueConnections cons = this.queueManager.getAllConnections(); Connection con = cons.getPrimary(); if (con != null) { final String msg = STR; logger.info(STR, msg); Exception e = new Exception(msg); try { processException(e, con); } cat...
/** * Test hook used to simulate a kill of the primaryEndpoint */
Test hook used to simulate a kill of the primaryEndpoint
killPrimaryEndpoint
{ "repo_name": "smanvi-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/cache/client/internal/PoolImpl.java", "license": "apache-2.0", "size": 56476 }
[ "org.apache.geode.cache.client.ServerConnectivityException" ]
import org.apache.geode.cache.client.ServerConnectivityException;
import org.apache.geode.cache.client.*;
[ "org.apache.geode" ]
org.apache.geode;
1,445,574
@Override public int evalToBuffer(QueryContext context, byte []buffer, int offset) throws SQLException { TableIterator []rows = context.getTableIterators(); TableIterator row = rows[getTableIndex()]; return row.getBuffer(getColumn(), buffer, off...
int function(QueryContext context, byte []buffer, int offset) throws SQLException { TableIterator []rows = context.getTableIterators(); TableIterator row = rows[getTableIndex()]; return row.getBuffer(getColumn(), buffer, offset); }
/** * Evaluates the expression to a buffer * * @param result the result buffer * * @return the length of the result */
Evaluates the expression to a buffer
evalToBuffer
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/resin/src/com/caucho/db/sql/AbstractIdExpr.java", "license": "gpl-2.0", "size": 6512 }
[ "com.caucho.db.table.TableIterator", "java.sql.SQLException" ]
import com.caucho.db.table.TableIterator; import java.sql.SQLException;
import com.caucho.db.table.*; import java.sql.*;
[ "com.caucho.db", "java.sql" ]
com.caucho.db; java.sql;
1,733,237
protected List<String> getListFromChildElement(Node node, String childName) { // get all child nodes NodeList children = node.getChildNodes(); // iterate over the child nodes until the node with childName is found for (int j = 0; j < children.getLength(); j++) { Node child = children.item(j); ...
List<String> function(Node node, String childName) { NodeList children = node.getChildNodes(); for (int j = 0; j < children.getLength(); j++) { Node child = children.item(j); if (child.getNodeType() == org.w3c.dom.Node.ELEMENT_NODE && child.getNodeName().equals(childName)) { List<String> values = new ArrayList<>(child....
/** * returns a list of values from a child node of the first parameter. The * list values are expected to be atomic, i.e. no complex node structures * * @param node * the node containing the data * @param childName * the name of the child node * @return a list of values f...
returns a list of values from a child node of the first parameter. The list values are expected to be atomic, i.e. no complex node structures
getListFromChildElement
{ "repo_name": "olehmberg/winter", "path": "winter-framework/src/main/java/de/uni_mannheim/informatik/dws/winter/model/io/XMLMatchableReader.java", "license": "apache-2.0", "size": 8307 }
[ "java.util.ArrayList", "java.util.List", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import java.util.ArrayList; import java.util.List; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
832,038
public boolean isNullSelected() { return (con != null && con instanceof PathConstraintNull); }
boolean function() { return (con != null && con instanceof PathConstraintNull); }
/** * Return true if editing an existing constraint and 'has a value' or 'has no value' has been * selected. * @return true if a null constraint was selected */
Return true if editing an existing constraint and 'has a value' or 'has no value' has been selected
isNullSelected
{ "repo_name": "drhee/toxoMine", "path": "intermine/web/main/src/org/intermine/web/logic/query/DisplayConstraint.java", "license": "lgpl-2.1", "size": 33874 }
[ "org.intermine.pathquery.PathConstraintNull" ]
import org.intermine.pathquery.PathConstraintNull;
import org.intermine.pathquery.*;
[ "org.intermine.pathquery" ]
org.intermine.pathquery;
1,143,475
EJBLocalObject ejb = null; try { ejb = getSessionBeanInstance(); Method method = invocation.getMethod(); if (method.getDeclaringClass().isInstance(ejb)) { // directly implemented return method.invoke(ejb, invocation.getArguments()); } else { // not directly implemented Method ejbMetho...
EJBLocalObject ejb = null; try { ejb = getSessionBeanInstance(); Method method = invocation.getMethod(); if (method.getDeclaringClass().isInstance(ejb)) { return method.invoke(ejb, invocation.getArguments()); } else { Method ejbMethod = ejb.getClass().getMethod(method.getName(), method.getParameterTypes()); return ejbM...
/** * This implementation "creates" a new EJB instance for each invocation. * Can be overridden for custom invocation strategies. * <p>Alternatively, override getSessionBeanInstance and * releaseSessionBeanInstance to change EJB instance creation, * for example to hold a single shared EJB instance. */
This implementation "creates" a new EJB instance for each invocation. Can be overridden for custom invocation strategies. Alternatively, override getSessionBeanInstance and releaseSessionBeanInstance to change EJB instance creation, for example to hold a single shared EJB instance
invoke
{ "repo_name": "mattxia/spring-2.5-analysis", "path": "src/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java", "license": "apache-2.0", "size": 5650 }
[ "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "javax.ejb.CreateException", "javax.ejb.EJBLocalObject", "javax.naming.NamingException" ]
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import javax.ejb.CreateException; import javax.ejb.EJBLocalObject; import javax.naming.NamingException;
import java.lang.reflect.*; import javax.ejb.*; import javax.naming.*;
[ "java.lang", "javax.ejb", "javax.naming" ]
java.lang; javax.ejb; javax.naming;
1,933,689
public void unregisterDataObserver(PersonalDataManagerObserver observer) { ThreadUtils.assertOnUiThread(); assert (mDataObservers.size() > 0); assert (mDataObservers.contains(observer)); mDataObservers.remove(observer); }
void function(PersonalDataManagerObserver observer) { ThreadUtils.assertOnUiThread(); assert (mDataObservers.size() > 0); assert (mDataObservers.contains(observer)); mDataObservers.remove(observer); }
/** * Unregisters the provided observer. */
Unregisters the provided observer
unregisterDataObserver
{ "repo_name": "mogoweb/365browser", "path": "app/src/main/java/org/chromium/chrome/browser/autofill/PersonalDataManager.java", "license": "apache-2.0", "size": 39081 }
[ "org.chromium.base.ThreadUtils" ]
import org.chromium.base.ThreadUtils;
import org.chromium.base.*;
[ "org.chromium.base" ]
org.chromium.base;
709,518
rootPane = new javax.swing.JPanel(); displayPanel = new javax.swing.JPanel(); header = new javax.swing.JLabel(); labelSearch = new javax.swing.JLabel(); searchKey = new javax.swing.JTextField(); actionGo = new javax.swing.JButton(); scrollerPane = new javax.swing....
rootPane = new javax.swing.JPanel(); displayPanel = new javax.swing.JPanel(); header = new javax.swing.JLabel(); labelSearch = new javax.swing.JLabel(); searchKey = new javax.swing.JTextField(); actionGo = new javax.swing.JButton(); scrollerPane = new javax.swing.JScrollPane(); resultTable = new javax.swing.JTable(); a...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "24thsaint/Rave-Tristan", "path": "src/com/albertos/displays/menu/InventoryDisplay.java", "license": "gpl-2.0", "size": 41537 }
[ "java.awt.CardLayout", "javax.swing.JList", "javax.swing.JTable" ]
import java.awt.CardLayout; import javax.swing.JList; import javax.swing.JTable;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,135,791
TraversalStrategy a = new StrategyA(), b = new StrategyB(), c = new StrategyC(), d = new StrategyD(), e = new StrategyE(), k = new StrategyK(); List<TraversalStrategy> s; //Dependency well defined s...
TraversalStrategy a = new StrategyA(), b = new StrategyB(), c = new StrategyC(), d = new StrategyD(), e = new StrategyE(), k = new StrategyK(); List<TraversalStrategy> s; s = Stream.of(b, a) .collect(Collectors.toList()); TraversalStrategies.sortStrategies(s); assertEquals(2,s.size()); assertEquals(a,s.get(0)); assertE...
/** * Tests that {@link com.tinkerpop.gremlin.process.TraversalStrategies#sortStrategies(java.util.List)} * works as advertised. This class defines a bunch of dummy strategies which define an order. It is verified * that the right order is being returned. */
Tests that <code>com.tinkerpop.gremlin.process.TraversalStrategies#sortStrategies(java.util.List)</code> works as advertised. This class defines a bunch of dummy strategies which define an order. It is verified that the right order is being returned
testTraversalStrategySorting
{ "repo_name": "Lab41/tinkerpop3", "path": "gremlin-test/src/test/java/com/tinkerpop/gremlin/process/TraversalStrategiesTest.java", "license": "apache-2.0", "size": 5176 }
[ "java.util.List", "java.util.stream.Collectors", "java.util.stream.Stream", "org.junit.Assert" ]
import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; import org.junit.Assert;
import java.util.*; import java.util.stream.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,711,524
public static void updateType(final Connection connection, final BaseType baseType, final String name, final int size, final boolean isSigned, final INaviModule module) throws CouldntSaveDataException { try { final PreparedStatement statement = connection.prepareStatement("UPDA...
static void function(final Connection connection, final BaseType baseType, final String name, final int size, final boolean isSigned, final INaviModule module) throws CouldntSaveDataException { try { final PreparedStatement statement = connection.prepareStatement(STR + CTableNames.BASE_TYPES_TABLE + STR); try { stateme...
/** * Updates the record of the given base type in the database. * * @param connection The connection to the database. * @param baseType The type whose database representation should be updated. * @param name The new name of the base type. * @param size The new size of the base type. * @param isSig...
Updates the record of the given base type in the database
updateType
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Database/PostgreSQL/Functions/PostgreSQLTypeFunctions.java", "license": "apache-2.0", "size": 58800 }
[ "com.google.security.zynamics.binnavi.Database", "com.google.security.zynamics.binnavi.disassembly.INaviModule", "com.google.security.zynamics.binnavi.disassembly.types.BaseType", "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException" ]
import com.google.security.zynamics.binnavi.Database; import com.google.security.zynamics.binnavi.disassembly.INaviModule; import com.google.security.zynamics.binnavi.disassembly.types.BaseType; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException;
import com.google.security.zynamics.binnavi.*; import com.google.security.zynamics.binnavi.disassembly.*; import com.google.security.zynamics.binnavi.disassembly.types.*; import java.sql.*;
[ "com.google.security", "java.sql" ]
com.google.security; java.sql;
1,017,870
@Guarded(NotNullGuard.class) @NotNull InputStream toStream();
@Guarded(NotNullGuard.class) @NotNull InputStream toStream();
/** * Convert this object into a stream. * * @return an InputStream */
Convert this object into a stream
toStream
{ "repo_name": "sillelien/dollar-core", "path": "src/main/java/com/sillelien/dollar/api/TypeAware.java", "license": "apache-2.0", "size": 9120 }
[ "com.sillelien.dollar.api.guard.Guarded", "com.sillelien.dollar.api.guard.NotNullGuard", "java.io.InputStream", "org.jetbrains.annotations.NotNull" ]
import com.sillelien.dollar.api.guard.Guarded; import com.sillelien.dollar.api.guard.NotNullGuard; import java.io.InputStream; import org.jetbrains.annotations.NotNull;
import com.sillelien.dollar.api.guard.*; import java.io.*; import org.jetbrains.annotations.*;
[ "com.sillelien.dollar", "java.io", "org.jetbrains.annotations" ]
com.sillelien.dollar; java.io; org.jetbrains.annotations;
300,056
CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException;
CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException;
/** * Gets the character content of this file object, if available. * Any byte that cannot be decoded will be replaced by the default * translation character. In addition, a diagnostic may be * reported unless {@code ignoreEncodingErrors} is true. * * @param ignoreEncodingErrors ignore en...
Gets the character content of this file object, if available. Any byte that cannot be decoded will be replaced by the default translation character. In addition, a diagnostic may be reported unless ignoreEncodingErrors is true
getCharContent
{ "repo_name": "syntelos/gap-data", "path": "gae/src/gap/jac/tools/FileObject.java", "license": "lgpl-3.0", "size": 7223 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,394,659
public List<SuggestedFix> processMatch(Match match) { return ImmutableList.of(); }
List<SuggestedFix> function(Match match) { return ImmutableList.of(); }
/** * Processes one {@link Match} at a time. There is no order guaranteed for * when this function will be called with the Match. * @param match The {@link Match} from the node and traversal for any match * that {@link #matches} returned true for. * @return List of {@link SuggestedFix} classes that w...
Processes one <code>Match</code> at a time. There is no order guaranteed for when this function will be called with the Match
processMatch
{ "repo_name": "maio/closure-compiler", "path": "src/com/google/javascript/refactoring/Scanner.java", "license": "apache-2.0", "size": 2714 }
[ "com.google.common.collect.ImmutableList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import java.util.List;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,640,043
@ServiceMethod(returns = ReturnType.SINGLE) public ApplicationInner update( String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { return updateAsync(resourceGroupName, accountName, applicationName, parameters).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) ApplicationInner function( String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { return updateAsync(resourceGroupName, accountName, applicationName, parameters).block(); }
/** * Updates settings for the specified application. * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationName The name of the application. This must be unique within the account. ...
Updates settings for the specified application
update
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java", "license": "mit", "size": 56593 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.batch.fluent.models.ApplicationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.batch.fluent.models.ApplicationInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.batch.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
653,776
private void verifyBlob(final int expectedVal, final int expectedSize, final Blob blob) throws IOException, SQLException { final InputStream stream = blob.getBinaryStream(); int blobSize = 0; for (int val = stream.read();...
void function(final int expectedVal, final int expectedSize, final Blob blob) throws IOException, SQLException { final InputStream stream = blob.getBinaryStream(); int blobSize = 0; for (int val = stream.read(); val!=-1; val = stream.read()) { blobSize++; if (expectedVal!=val) { assertEquals(STR + blobSize, expectedVal...
/** * Verifies that the blob is consistent * @param expectedVal the InputStream for the Blob should return this value * for every byte * @param expectedSize the BLOB should have this size * @param blob the BLOB to check * @exception SQLException causes test to fail with ...
Verifies that the blob is consistent
verifyBlob
{ "repo_name": "lpxz/grail-derby104", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BLOBTest.java", "license": "apache-2.0", "size": 17815 }
[ "java.io.IOException", "java.io.InputStream", "java.sql.Blob", "java.sql.SQLException" ]
import java.io.IOException; import java.io.InputStream; import java.sql.Blob; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
825,694
void validateGroupPermission(User user, Group targetGroup, Permission requiredPermission);
void validateGroupPermission(User user, Group targetGroup, Permission requiredPermission);
/** * Checks if a user has a required permission on a group and throws an error if the user does not * @param user The user for whom we are checking permission * @param targetGroup The group on which we are checking permission * @param requiredPermission The permission (from the Permission enum) to ...
Checks if a user has a required permission on a group and throws an error if the user does not
validateGroupPermission
{ "repo_name": "grassrootza/grassroot-platform", "path": "grassroot-services/src/main/java/za/org/grassroot/services/PermissionBroker.java", "license": "bsd-3-clause", "size": 3323 }
[ "za.org.grassroot.core.domain.Permission", "za.org.grassroot.core.domain.User", "za.org.grassroot.core.domain.group.Group" ]
import za.org.grassroot.core.domain.Permission; import za.org.grassroot.core.domain.User; import za.org.grassroot.core.domain.group.Group;
import za.org.grassroot.core.domain.*; import za.org.grassroot.core.domain.group.*;
[ "za.org.grassroot" ]
za.org.grassroot;
1,995,429
public static void main(String[] args) throws DCMAException { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "classpath:/META-INF/applicationContext-auto-learn-classification.xml"); context.start(); AutoLearnService docushareExportService = ApplicationContextUtil.getSingleBean...
static void function(String[] args) throws DCMAException { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( STR); context.start(); AutoLearnService docushareExportService = ApplicationContextUtil.getSingleBeanOfType(context, AutoLearnService.class); docushareExportService.learnFilesForClassi...
/** * Main method. * @param args String[] * @throws DCMAException if error occurs */
Main method
main
{ "repo_name": "kuzavas/ephesoft", "path": "dcma-auto-learn-classification/src/main/java/com/ephesoft/dcma/autolearn/service/AutoLearnServiceImpl.java", "license": "agpl-3.0", "size": 5775 }
[ "com.ephesoft.dcma.core.DCMAException", "com.ephesoft.dcma.da.id.BatchInstanceID", "com.ephesoft.dcma.util.ApplicationContextUtil", "org.springframework.context.support.ClassPathXmlApplicationContext" ]
import com.ephesoft.dcma.core.DCMAException; import com.ephesoft.dcma.da.id.BatchInstanceID; import com.ephesoft.dcma.util.ApplicationContextUtil; import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.ephesoft.dcma.core.*; import com.ephesoft.dcma.da.id.*; import com.ephesoft.dcma.util.*; import org.springframework.context.support.*;
[ "com.ephesoft.dcma", "org.springframework.context" ]
com.ephesoft.dcma; org.springframework.context;
1,933,283
public static SimpleDateFormat getDateFormat (Language language) { return getDateFormat (DisplayType.Date, language); } // getDateFormat
static SimpleDateFormat function (Language language) { return getDateFormat (DisplayType.Date, language); }
/** * Return Date Format * @param language Language * @return date format */
Return Date Format
getDateFormat
{ "repo_name": "mgrigioni/oseb", "path": "base/src/org/compiere/util/DisplayType.java", "license": "gpl-2.0", "size": 18019 }
[ "java.text.SimpleDateFormat" ]
import java.text.SimpleDateFormat;
import java.text.*;
[ "java.text" ]
java.text;
2,284,773
public void testUpdatability() throws Exception { this.rs = null; createTable("updatabilityBug", "(id int(10) unsigned NOT NULL auto_increment, field1 varchar(32) NOT NULL default ''," + " field2 varchar(128) NOT NULL default '', field3 varchar(128) default N...
void function() throws Exception { this.rs = null; createTable(STR, STR + STR + STR, STR); this.stmt.executeUpdate(STR); String sQuery = STR; this.pstmt = this.conn.prepareStatement(sQuery, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); this.conn.setAutoCommit(false); this.pstmt.setInt(1, 1); this.rs = t...
/** * Tests that result sets can be updated when all parameters are correctly * set. * * @throws Exception * if any errors occur */
Tests that result sets can be updated when all parameters are correctly set
testUpdatability
{ "repo_name": "scopej/mysql-connector-j", "path": "src/testsuite/regression/ResultSetRegressionTest.java", "license": "gpl-2.0", "size": 218685 }
[ "java.sql.ResultSet" ]
import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,317,704
protected Appendable createStdoutProcessor(final EnsTestCase e, final Connection c) { return createOutputProcessor(e, c); }
Appendable function(final EnsTestCase e, final Connection c) { return createOutputProcessor(e, c); }
/** * <p> * Creates an Appendable object to which stdout is delegated. Overwrite * this method to determine what is to be done with output sent to stdout * from the subprocess. * </p> * */
Creates an Appendable object to which stdout is delegated. Overwrite this method to determine what is to be done with output sent to stdout from the subprocess.
createStdoutProcessor
{ "repo_name": "Ensembl/ensj-healthcheck", "path": "src/org/ensembl/healthcheck/testcase/AbstractShellBasedTestCase.java", "license": "apache-2.0", "size": 7120 }
[ "java.sql.Connection" ]
import java.sql.Connection;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,136,721
public AmazonS3 getClient(String region) { if (region == null) { throw new IllegalArgumentException("S3 region must be specified"); } AmazonS3 client = clientsByRegion.get(region); return client != null ? client : cacheClient(region); }
AmazonS3 function(String region) { if (region == null) { throw new IllegalArgumentException(STR); } AmazonS3 client = clientsByRegion.get(region); return client != null ? client : cacheClient(region); }
/** * Returns a client for the requested region, or throws an exception when * unable. * * @param region * The region the returned {@link AmazonS3} will be * configured to use. * @return A client for the given region from the cache, either instantiated * ...
Returns a client for the requested region, or throws an exception when unable
getClient
{ "repo_name": "dagnir/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/S3ClientCache.java", "license": "apache-2.0", "size": 8587 }
[ "com.amazonaws.services.s3.AmazonS3" ]
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
1,578,689
public TimeStampToken getTimeStampToken() { return timeStampToken; }
TimeStampToken function() { return timeStampToken; }
/** * Gets the timestamp token if there is one. * @return the timestamp token or null * @since 2.1.6 */
Gets the timestamp token if there is one
getTimeStampToken
{ "repo_name": "yogthos/itext", "path": "src/com/lowagie/text/pdf/PdfPKCS7.java", "license": "lgpl-3.0", "size": 67830 }
[ "org.bouncycastle.tsp.TimeStampToken" ]
import org.bouncycastle.tsp.TimeStampToken;
import org.bouncycastle.tsp.*;
[ "org.bouncycastle.tsp" ]
org.bouncycastle.tsp;
1,475,101
protected long allocatePoller(int size, long pool, int timeout) { try { return Poll.create(size, pool, 0, timeout * 1000); } catch (Error e) { if (Status.APR_STATUS_IS_EINVAL(e.getError())) { log.info(sm.getString("endpoint.poll.limitedpollsize", "" + size)); ...
long function(int size, long pool, int timeout) { try { return Poll.create(size, pool, 0, timeout * 1000); } catch (Error e) { if (Status.APR_STATUS_IS_EINVAL(e.getError())) { log.info(sm.getString(STR, STRendpoint.poll.initfail"), e); return -1; } } }
/** * Allocate a new poller of the specified size. */
Allocate a new poller of the specified size
allocatePoller
{ "repo_name": "deathspeeder/class-guard", "path": "apache-tomcat-7.0.53-src/java/org/apache/tomcat/util/net/AprEndpoint.java", "license": "gpl-2.0", "size": 97240 }
[ "org.apache.tomcat.jni.Error", "org.apache.tomcat.jni.Poll", "org.apache.tomcat.jni.Status" ]
import org.apache.tomcat.jni.Error; import org.apache.tomcat.jni.Poll; import org.apache.tomcat.jni.Status;
import org.apache.tomcat.jni.*;
[ "org.apache.tomcat" ]
org.apache.tomcat;
1,844,211
public static String toString(File file, Charset charset) throws IOException { checkNotNull(file); checkNotNull(charset); return new String(toByteArray(file), charset); }
static String function(File file, Charset charset) throws IOException { checkNotNull(file); checkNotNull(charset); return new String(toByteArray(file), charset); }
/** * Reads all characters from a file into a {@link String}, using the given * character set. * * @param file the file to read from * @param charset the charset used to decode the input stream; see {@link * Charsets} for helpful predefined constants * @return a string containing all the charac...
Reads all characters from a file into a <code>String</code>, using the given character set
toString
{ "repo_name": "user234/setyon-guava-libraries-clone", "path": "guava/src/com/google/common/io/Files.java", "license": "apache-2.0", "size": 29392 }
[ "com.google.common.base.Preconditions", "java.io.File", "java.io.IOException", "java.nio.charset.Charset" ]
import com.google.common.base.Preconditions; import java.io.File; import java.io.IOException; import java.nio.charset.Charset;
import com.google.common.base.*; import java.io.*; import java.nio.charset.*;
[ "com.google.common", "java.io", "java.nio" ]
com.google.common; java.io; java.nio;
1,025,249
public void awaitHostController(long start, ControlledProcessState.State state) throws InterruptedException, TimeoutException { checkClosed(); boolean hcAvailable = false; long deadline = start + configuration.getStartupTimeoutInSeconds() * 1000; while (!hcAvailable && getProcessExit...
void function(long start, ControlledProcessState.State state) throws InterruptedException, TimeoutException { checkClosed(); boolean hcAvailable = false; long deadline = start + configuration.getStartupTimeoutInSeconds() * 1000; while (!hcAvailable && getProcessExitCode() < 0) { hcAvailable = isHostControllerInState(st...
/** * Poll until {@link #isHostControllerInState(ControlledProcessState.State)} returns {@code true} or the * {@link WildFlyManagedConfiguration#getStartupTimeoutInSeconds() configured timeout} is reached. * * @param start time in milliseconds that should be used as the starting time for the timeout...
Poll until <code>#isHostControllerInState(ControlledProcessState.State)</code> returns true or the <code>WildFlyManagedConfiguration#getStartupTimeoutInSeconds() configured timeout</code> is reached
awaitHostController
{ "repo_name": "aloubyansky/wildfly-core", "path": "testsuite/shared/src/main/java/org/jboss/as/test/integration/domain/management/util/DomainLifecycleUtil.java", "license": "lgpl-2.1", "size": 36763 }
[ "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException", "org.jboss.as.controller.ControlledProcessState" ]
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.jboss.as.controller.ControlledProcessState;
import java.util.concurrent.*; import org.jboss.as.controller.*;
[ "java.util", "org.jboss.as" ]
java.util; org.jboss.as;
121,533
public void importKey(final String keyname, final File keyFile, final boolean makeDefault) { KeyManager.addKey(getName(), keyname, keyFile); if (makeDefault) { setDefaultKeypair(keyname); store(); } }
void function(final String keyname, final File keyFile, final boolean makeDefault) { KeyManager.addKey(getName(), keyname, keyFile); if (makeDefault) { setDefaultKeypair(keyname); store(); } }
/** * Imports a key to the Scarlet Nebula system, and optionally makes it * default and saves the server. * * @param keyname * The key's name * @param keyFile * The file to copy from * @param makeDefault * True if it should become default, false otherwise. */
Imports a key to the Scarlet Nebula system, and optionally makes it default and saves the server
importKey
{ "repo_name": "Ivesvdf/Scarlet-Nebula", "path": "src/be/ac/ua/comp/scarletnebula/core/CloudProvider.java", "license": "gpl-3.0", "size": 34833 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
746,922
List<VdsStatic> getAllWithIpAddress(String address);
List<VdsStatic> getAllWithIpAddress(String address);
/** * Finds all instances with the given ip address. * @param address * the ip address * @return the list of instances */
Finds all instances with the given ip address
getAllWithIpAddress
{ "repo_name": "jtux270/translate", "path": "ovirt/3.6_source/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsStaticDao.java", "license": "gpl-3.0", "size": 1459 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.VdsStatic" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.VdsStatic;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
719,361
Subscriber getSubscriberById(String accessToken) throws APIManagementException;
Subscriber getSubscriberById(String accessToken) throws APIManagementException;
/** * Retrieves the subscriber from the given access token * * @param accessToken Subscriber key * @return Subscriber * @throws APIManagementException if failed to get Subscriber from access token */
Retrieves the subscriber from the given access token
getSubscriberById
{ "repo_name": "jaadds/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIManager.java", "license": "apache-2.0", "size": 36284 }
[ "org.wso2.carbon.apimgt.api.model.Subscriber" ]
import org.wso2.carbon.apimgt.api.model.Subscriber;
import org.wso2.carbon.apimgt.api.model.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
2,199,026
public void setAliases(Map<String, String> aliases) { this.aliases = aliases; }
void function(Map<String, String> aliases) { this.aliases = aliases; }
/** * Alias a Class to a shorter name to be used in XML elements. */
Alias a Class to a shorter name to be used in XML elements
setAliases
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/model/dataformat/XStreamDataFormat.java", "license": "apache-2.0", "size": 19020 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,651,116
EReference getref_PositionPoint_PositionPoint_Position_Source();
EReference getref_PositionPoint_PositionPoint_Position_Source();
/** * Returns the meta object for the reference '{@link outageDetectionMjtrace.ref_PositionPoint_PositionPoint_Position#getSource <em>Source</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Source</em>'. * @see outageDetectionMjtrace.ref_PositionPoint_...
Returns the meta object for the reference '<code>outageDetectionMjtrace.ref_PositionPoint_PositionPoint_Position#getSource Source</code>'.
getref_PositionPoint_PositionPoint_Position_Source
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/outageDetectionMjtrace/OutageDetectionMjtracePackage.java", "license": "mit", "size": 15208 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,681,385
public AppliedPTransform<?, ?, ?> getProducingTransformInternal();
AppliedPTransform<?, ?, ?> function();
/** * Returns the {@link AppliedPTransform} that this {@link PValue} is an output of. * * <p>For internal use only. */
Returns the <code>AppliedPTransform</code> that this <code>PValue</code> is an output of. For internal use only
getProducingTransformInternal
{ "repo_name": "tweise/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/values/PValue.java", "license": "apache-2.0", "size": 1397 }
[ "org.apache.beam.sdk.transforms.AppliedPTransform" ]
import org.apache.beam.sdk.transforms.AppliedPTransform;
import org.apache.beam.sdk.transforms.*;
[ "org.apache.beam" ]
org.apache.beam;
2,636,833
public static String getArtifactVersion(final VersionRange range){ if(range.getRecommendedVersion() != null){ return range.getRecommendedVersion().toString(); } if(range.hasRestrictions()){ for(Restriction restriction : range.getRestrictions()){ if(re...
static String function(final VersionRange range){ if(range.getRecommendedVersion() != null){ return range.getRecommendedVersion().toString(); } if(range.hasRestrictions()){ for(Restriction restriction : range.getRestrictions()){ if(restriction.getLowerBound() != null){ return restriction.getLowerBound().toString(); } i...
/** * Finds a version out of a range * * @param range VersionRange * @return String */
Finds a version out of a range
getArtifactVersion
{ "repo_name": "Axway/grapes-maven-plugin", "path": "src/main/java/org/axway/grapes/maven/resolver/ArtifactResolver.java", "license": "apache-2.0", "size": 4312 }
[ "org.apache.maven.artifact.versioning.Restriction", "org.apache.maven.artifact.versioning.VersionRange" ]
import org.apache.maven.artifact.versioning.Restriction; import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.artifact.versioning.*;
[ "org.apache.maven" ]
org.apache.maven;
253,814
Logger logger = LoggerFactory.getLogger(EventProcessorClientSample.class); Consumer<EventContext> processEvent = eventContext -> { logger.info( "Processing event: Event Hub name = {}; consumer group name = {}; partition id = {}; sequence number = {}", eventCon...
Logger logger = LoggerFactory.getLogger(EventProcessorClientSample.class); Consumer<EventContext> processEvent = eventContext -> { logger.info( STR, eventContext.getPartitionContext().getEventHubName(), eventContext.getPartitionContext().getConsumerGroup(), eventContext.getPartitionContext().getPartitionId(), eventCont...
/** * Main method to demonstrate starting and stopping a {@link EventProcessorClient}. * * @param args The input arguments to this executable. * @throws Exception If there are any errors while running the {@link EventProcessorClient}. */
Main method to demonstrate starting and stopping a <code>EventProcessorClient</code>
main
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/eventhubs/azure-messaging-eventhubs/src/samples/java/com/azure/messaging/eventhubs/EventProcessorClientSample.java", "license": "mit", "size": 3778 }
[ "com.azure.messaging.eventhubs.models.ErrorContext", "com.azure.messaging.eventhubs.models.EventContext", "java.util.concurrent.TimeUnit", "java.util.function.Consumer", "org.slf4j.Logger", "org.slf4j.LoggerFactory" ]
import com.azure.messaging.eventhubs.models.ErrorContext; import com.azure.messaging.eventhubs.models.EventContext; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
import com.azure.messaging.eventhubs.models.*; import java.util.concurrent.*; import java.util.function.*; import org.slf4j.*;
[ "com.azure.messaging", "java.util", "org.slf4j" ]
com.azure.messaging; java.util; org.slf4j;
453,762
public QueueMetrics getMetrics() { return queue.getMetrics(); }
QueueMetrics function() { return queue.getMetrics(); }
/** * Get metrics reference from containing queue. */
Get metrics reference from containing queue
getMetrics
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSAppAttempt.java", "license": "apache-2.0", "size": 52273 }
[ "org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics" ]
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,474,636
public static SettingHandler forMethods(Setting s, List<Method> overloads) { // TODO add returned types to typed handlers since they may need to flatten objects before sending them // for registration with labrad, we need to keep track of the full list // of accepted and returned types across all ove...
static SettingHandler function(Setting s, List<Method> overloads) { List<TypeDescriptor> accepts = Lists.newArrayList(); List<TypeDescriptor> returns = Lists.newArrayList(); List<TypedHandler> handlers = Lists.newArrayList(); for (Method m : overloads) { TypedHandler th = getHandler(m, s); for (TypeDescriptor typeTD : ...
/** * Create a SettingHandler for a method or set of overridden methods * @param s * @param overloads * @return */
Create a SettingHandler for a method or set of overridden methods
forMethods
{ "repo_name": "martinisgroup/jlabrad", "path": "JLabrad/src/org/labrad/SettingHandlers.java", "license": "gpl-2.0", "size": 16219 }
[ "com.google.common.collect.Lists", "com.google.common.collect.Maps", "java.lang.reflect.Method", "java.util.List", "java.util.Map", "org.labrad.annotations.Setting", "org.labrad.data.Data", "org.labrad.handlers.OverloadedSettingHandler", "org.labrad.types.Type", "org.labrad.types.TypeDescriptor" ]
import com.google.common.collect.Lists; import com.google.common.collect.Maps; import java.lang.reflect.Method; import java.util.List; import java.util.Map; import org.labrad.annotations.Setting; import org.labrad.data.Data; import org.labrad.handlers.OverloadedSettingHandler; import org.labrad.types.Type; import org.l...
import com.google.common.collect.*; import java.lang.reflect.*; import java.util.*; import org.labrad.annotations.*; import org.labrad.data.*; import org.labrad.handlers.*; import org.labrad.types.*;
[ "com.google.common", "java.lang", "java.util", "org.labrad.annotations", "org.labrad.data", "org.labrad.handlers", "org.labrad.types" ]
com.google.common; java.lang; java.util; org.labrad.annotations; org.labrad.data; org.labrad.handlers; org.labrad.types;
2,277,959
protected void loadTemplates(File resource) { if (resource.isDirectory()) { File[] files = resource.listFiles(); for (File file : files) { this.loadTemplates(file); } } else if (resource.isFile()) { try { loadTemplates(new FileInputStream(resource), resource.getAbsolutePath()); } catch (Ex...
void function(File resource) { if (resource.isDirectory()) { File[] files = resource.listFiles(); for (File file : files) { this.loadTemplates(file); } } else if (resource.isFile()) { try { loadTemplates(new FileInputStream(resource), resource.getAbsolutePath()); } catch (Exception e) { throw new TemplateInitException(...
/** * load templates by given resource * * @param resource * resource */
load templates by given resource
loadTemplates
{ "repo_name": "nnest/sparrow", "path": "sparrow-simple/src/main/java/com/github/nnest/sparrow/simple/context/SimpleCommandTemplateContext.java", "license": "mit", "size": 3515 }
[ "com.github.nnest.sparrow.simple.TemplateInitException", "java.io.File", "java.io.FileInputStream" ]
import com.github.nnest.sparrow.simple.TemplateInitException; import java.io.File; import java.io.FileInputStream;
import com.github.nnest.sparrow.simple.*; import java.io.*;
[ "com.github.nnest", "java.io" ]
com.github.nnest; java.io;
2,275,024
protected void paintMarker(Graphics g, MapMarker marker) { Point p = getMapPosition(marker.getLat(), marker.getLon(), marker.getMarkerStyle() == MapMarker.STYLE.FIXED); Integer radius = getRadius(marker, p); if (scrollWrapEnabled) { int tilesize = tileSource.getTileSize(); ...
void function(Graphics g, MapMarker marker) { Point p = getMapPosition(marker.getLat(), marker.getLon(), marker.getMarkerStyle() == MapMarker.STYLE.FIXED); Integer radius = getRadius(marker, p); if (scrollWrapEnabled) { int tilesize = tileSource.getTileSize(); int mapSize = tilesize << zoom; if (p == null) { p = getMap...
/** * Paint a single marker. * @param g Graphics used for painting * @param marker marker to paint */
Paint a single marker
paintMarker
{ "repo_name": "berniejenny/MapAnalyst", "path": "src/org/openstreetmap/gui/jmapviewer/JMapViewer.java", "license": "gpl-2.0", "size": 43281 }
[ "java.awt.Graphics", "java.awt.Point", "org.openstreetmap.gui.jmapviewer.interfaces.MapMarker" ]
import java.awt.Graphics; import java.awt.Point; import org.openstreetmap.gui.jmapviewer.interfaces.MapMarker;
import java.awt.*; import org.openstreetmap.gui.jmapviewer.interfaces.*;
[ "java.awt", "org.openstreetmap.gui" ]
java.awt; org.openstreetmap.gui;
800,209
@Override public PrivateKey getDefaultSigningKey() { return _privateKeyCache.getPrivateKey(getDefaultKeyID().digest()); }
PrivateKey function() { return _privateKeyCache.getPrivateKey(getDefaultKeyID().digest()); }
/** * Get private key * @return private key */
Get private key
getDefaultSigningKey
{ "repo_name": "yyhpys/ccnx-trace-interest", "path": "javasrc/src/org/ccnx/ccn/impl/security/keys/BasicKeyManager.java", "license": "lgpl-2.1", "size": 48404 }
[ "java.security.PrivateKey" ]
import java.security.PrivateKey;
import java.security.*;
[ "java.security" ]
java.security;
1,395,203
Map<String, Integer> getFacetQuery();
Map<String, Integer> getFacetQuery();
/** Returns the result of the query facet, i.e., the map from queries to the number of hits. * @return The result of the query facet, i.e., the map from queries to the number of hits. */
Returns the result of the query facet, i.e., the map from queries to the number of hits
getFacetQuery
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/jsp/search/result/I_CmsSearchResultWrapper.java", "license": "lgpl-2.1", "size": 7200 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,779,310
public void unPublishPort() { // unregister with epmd OtpEpmd.unPublishPort(this); // close the local descriptor (if we have one) try { if (super.epmd != null) { super.epmd.close(); } } catch (final IOException e) { } s...
void function() { OtpEpmd.unPublishPort(this); try { if (super.epmd != null) { super.epmd.close(); } } catch (final IOException e) { } super.epmd = null; }
/** * Unregister the server node's name and port number from the Erlang port * mapper, thus preventing any new connections from remote nodes. */
Unregister the server node's name and port number from the Erlang port mapper, thus preventing any new connections from remote nodes
unPublishPort
{ "repo_name": "CloudI/CloudI", "path": "src/api/java/com/ericsson/otp/erlang/OtpSelf.java", "license": "mit", "size": 10666 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
596,318
public List<ROI> read(Collection rois, ROIComponent component, long userID) throws NoSuchROIException, ROICreationException, ROICreationException { if (rois == null || rois.size() == 0) return new ArrayList<ROI>(); return inputStrategy.readROI(rois, component, userID); }
List<ROI> function(Collection rois, ROIComponent component, long userID) throws NoSuchROIException, ROICreationException, ROICreationException { if (rois == null rois.size() == 0) return new ArrayList<ROI>(); return inputStrategy.readROI(rois, component, userID); }
/** * Converts the ROIs hosted in the passed collection and returns the * collection. * * @param rois The server side ROI to convert. * @param component * @param userID The identifier of the user currently logged in. * @throws NoSuchROIException * @throws ROICreationException * @returns See above. ...
Converts the ROIs hosted in the passed collection and returns the collection
read
{ "repo_name": "jballanc/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/roi/io/ServerROIStrategy.java", "license": "gpl-2.0", "size": 3515 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.openmicroscopy.shoola.util.roi.ROIComponent", "org.openmicroscopy.shoola.util.roi.exception.NoSuchROIException", "org.openmicroscopy.shoola.util.roi.exception.ROICreationException" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.openmicroscopy.shoola.util.roi.ROIComponent; import org.openmicroscopy.shoola.util.roi.exception.NoSuchROIException; import org.openmicroscopy.shoola.util.roi.exception.ROICreationException;
import java.util.*; import org.openmicroscopy.shoola.util.roi.*; import org.openmicroscopy.shoola.util.roi.exception.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
296,671
public static void doStopScheduledJobs(AdminClient adminClient, Integer nodeId, List<String> jobIds) { for(String jobId: jobIds) { System.out.println("Stopping job id " + jobId); ...
static void function(AdminClient adminClient, Integer nodeId, List<String> jobIds) { for(String jobId: jobIds) { System.out.println(STR + jobId); adminClient.rpcOps.stopScheduledJob(nodeId, jobId); System.out.println(STR + jobId); } } } public static class SubCommandScheduledEnable extends AbstractAdminCommand { privat...
/** * Stop jobs on a single nodes. * * @param adminClient An instance of AdminClient points to given cluster * @param node Node to stop jobs * @param jobIds List of jobs to be stopped */
Stop jobs on a single nodes
doStopScheduledJobs
{ "repo_name": "cshaxu/voldemort", "path": "src/java/voldemort/tools/admin/command/AdminCommandScheduled.java", "license": "apache-2.0", "size": 16967 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,348,178
void expand(Variables variables, StringBuilder flag); } @Immutable private static class StringLiteralChunk implements StringChunk, Serializable { private final String text; private StringLiteralChunk(String text) { this.text = text; }
void expand(Variables variables, StringBuilder flag); } private static class StringLiteralChunk implements StringChunk, Serializable { private final String text; private StringLiteralChunk(String text) { this.text = text; }
/** * Expands this chunk. * * @param variables binding of variable names to their values for a single flag expansion. * @param flag the flag content to append to. */
Expands this chunk
expand
{ "repo_name": "mikelikespie/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java", "license": "apache-2.0", "size": 80464 }
[ "java.io.Serializable" ]
import java.io.Serializable;
import java.io.*;
[ "java.io" ]
java.io;
2,717,923
protected void setPathForCollections(OrcURL url, String urlComponent, int top, int skip, String select, String expand, String filter, String orderBy) { if (top > -1) { url.addQueryStringParameter("$top", Integer.valueOf(top).toString()); } if (skip > -1) { url....
void function(OrcURL url, String urlComponent, int top, int skip, String select, String expand, String filter, String orderBy) { if (top > -1) { url.addQueryStringParameter("$top", Integer.valueOf(top).toString()); } if (skip > -1) { url.addQueryStringParameter("$skip", Integer.valueOf(skip).toString()); } if (select !...
/** * Sets path for collections. * * @param url the url * @param urlComponent the url component * @param top the top * @param skip the skip * @param select the select * @param expand the expand * @param filter the filter * @param orderBy the order by */
Sets path for collections
setPathForCollections
{ "repo_name": "MSOpenTech/orc-for-java-shared", "path": "orc-engine-core/src/main/java/com/microsoft/services/orc/OrcCollectionFetcher.java", "license": "mit", "size": 9085 }
[ "com.microsoft.services.orc.interfaces.OrcURL" ]
import com.microsoft.services.orc.interfaces.OrcURL;
import com.microsoft.services.orc.interfaces.*;
[ "com.microsoft.services" ]
com.microsoft.services;
1,006,419
public static PathFragment getObjDirectory(Label ruleLabel) { return AnalysisUtils.getUniqueDirectory(ruleLabel, new PathFragment("_objs")); }
static PathFragment function(Label ruleLabel) { return AnalysisUtils.getUniqueDirectory(ruleLabel, new PathFragment("_objs")); }
/** * Returns the directory where object files are created. */
Returns the directory where object files are created
getObjDirectory
{ "repo_name": "abergmeier-dsfishlabs/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java", "license": "apache-2.0", "size": 25316 }
[ "com.google.devtools.build.lib.analysis.AnalysisUtils", "com.google.devtools.build.lib.cmdline.Label", "com.google.devtools.build.lib.vfs.PathFragment" ]
import com.google.devtools.build.lib.analysis.AnalysisUtils; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.vfs.PathFragment;
import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.devtools" ]
com.google.devtools;
632,214
public void setImage(Image image) { fImage = image; }
void function(Image image) { fImage = image; }
/** * Sets the proposal's image or <code>null</code> if no image is desired. * * @param image the desired image. */
Sets the proposal's image or <code>null</code> if no image is desired
setImage
{ "repo_name": "TypeFox/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/ui/text/java/correction/ChangeCorrectionProposal.java", "license": "epl-1.0", "size": 15227 }
[ "org.eclipse.swt.graphics.Image" ]
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
947,944
public Context createSubcontext(String name) throws NamingException { return getBoundContext().createSubcontext(parseName(name)); }
Context function(String name) throws NamingException { return getBoundContext().createSubcontext(parseName(name)); }
/** * Creates and binds a new context. * * @param name the name of the context to create; may not be empty * @return the newly created context * @exception NameAlreadyBoundException if name is already bound * @exception InvalidAttributesException if creation of the subcontext * requ...
Creates and binds a new context
createSubcontext
{ "repo_name": "sguazt/dcsj-sharegrid-portal", "path": "src/java/it/unipmn/di/dcs/sharegrid/web/management/naming/ManagementSelectorContext.java", "license": "gpl-3.0", "size": 24878 }
[ "javax.naming.Context", "javax.naming.NamingException" ]
import javax.naming.Context; import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
1,937,623
public Problem setProblem(int problemId) throws CloudCoderAuthenticationException; /** * Load the problem text of the user's work on the current {@link Problem}. * * @return the {@link ProblemText}
Problem function(int problemId) throws CloudCoderAuthenticationException; /** * Load the problem text of the user's work on the current {@link Problem}. * * @return the {@link ProblemText}
/** * Set the {@link Problem} the user wants to work on. * * @param problemId the problem id * @return the {@link Problem}, or null if the user is not permitted to work on the problem * @throws CloudCoderAuthenticationException if the user is not logged in */
Set the <code>Problem</code> the user wants to work on
setProblem
{ "repo_name": "cloudcoderdotorg/CloudCoder", "path": "CloudCoder/src/org/cloudcoder/app/client/rpc/EditCodeService.java", "license": "agpl-3.0", "size": 3288 }
[ "org.cloudcoder.app.shared.model.CloudCoderAuthenticationException", "org.cloudcoder.app.shared.model.Problem", "org.cloudcoder.app.shared.model.ProblemText" ]
import org.cloudcoder.app.shared.model.CloudCoderAuthenticationException; import org.cloudcoder.app.shared.model.Problem; import org.cloudcoder.app.shared.model.ProblemText;
import org.cloudcoder.app.shared.model.*;
[ "org.cloudcoder.app" ]
org.cloudcoder.app;
703,374
public void stopScoAudio() { ThreadUtils.checkIsOnMainThread(); Log.d(Config.LOGTAG, "stopScoAudio: BT state=" + bluetoothState + ", " + "SCO is on: " + isScoOn()); if (bluetoothState != State.SCO_CONNECTING && bluetoothState != State.SCO_CONNECTED) { return; ...
void function() { ThreadUtils.checkIsOnMainThread(); Log.d(Config.LOGTAG, STR + bluetoothState + STR + STR + isScoOn()); if (bluetoothState != State.SCO_CONNECTING && bluetoothState != State.SCO_CONNECTED) { return; } cancelTimer(); audioManager.stopBluetoothSco(); audioManager.setBluetoothScoOn(false); bluetoothState ...
/** * Stops Bluetooth SCO connection with remote device. */
Stops Bluetooth SCO connection with remote device
stopScoAudio
{ "repo_name": "gamefreak/Conversations", "path": "src/main/java/eu/siacs/conversations/services/AppRTCBluetoothManager.java", "license": "gpl-3.0", "size": 25148 }
[ "android.util.Log", "eu.siacs.conversations.Config", "org.webrtc.ThreadUtils" ]
import android.util.Log; import eu.siacs.conversations.Config; import org.webrtc.ThreadUtils;
import android.util.*; import eu.siacs.conversations.*; import org.webrtc.*;
[ "android.util", "eu.siacs.conversations", "org.webrtc" ]
android.util; eu.siacs.conversations; org.webrtc;
1,436,536
public static RexNode isDistinctFrom( RexBuilder rexBuilder, RexNode x, RexNode y, boolean neg) { RexNode ret = null; if (x.getType().isStruct()) { assert y.getType().isStruct(); List<RelDataTypeField> xFields = x.getType().getFieldList(); List<RelDataTypeField> yFiel...
static RexNode function( RexBuilder rexBuilder, RexNode x, RexNode y, boolean neg) { RexNode ret = null; if (x.getType().isStruct()) { assert y.getType().isStruct(); List<RelDataTypeField> xFields = x.getType().getFieldList(); List<RelDataTypeField> yFields = y.getType().getFieldList(); assert xFields.size() == yFields...
/** * Returns a translation of the <code>IS DISTINCT FROM</code> (or <code>IS * NOT DISTINCT FROM</code>) sql operator. * * @param neg if false, returns a translation of IS NOT DISTINCT FROM */
Returns a translation of the <code>IS DISTINCT FROM</code> (or <code>IS NOT DISTINCT FROM</code>) sql operator
isDistinctFrom
{ "repo_name": "dindin5258/calcite", "path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java", "license": "apache-2.0", "size": 130007 }
[ "java.util.List", "org.apache.calcite.rel.type.RelDataTypeField", "org.apache.calcite.rex.RexBuilder", "org.apache.calcite.rex.RexNode", "org.apache.calcite.sql.fun.SqlStdOperatorTable", "org.apache.calcite.util.Pair" ]
import java.util.List; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.fun.SqlStdOperatorTable; import org.apache.calcite.util.Pair;
import java.util.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.sql.fun.*; import org.apache.calcite.util.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
709,218
public File getCSVInputFile() { return csvInputFile; }
File function() { return csvInputFile; }
/** * Gets the InputFile * * @return */
Gets the InputFile
getCSVInputFile
{ "repo_name": "SmithRWORNL/ice", "path": "src/org.eclipse.ice.viz.service/src/org/eclipse/ice/viz/service/csv/CSVDataLoader.java", "license": "epl-1.0", "size": 25883 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,996,440
public static String composeQualifierPath( String qualNS, String qualName) throws XMPException { assertQualNS(qualNS); assertQualName(qualName); XMPPath qualPath = XMPPathParser.expandXPath(qualNS, qualName); if (qualPath.size() != 2) { throw new XMPException("The qualifier name must be simple...
static String function( String qualNS, String qualName) throws XMPException { assertQualNS(qualNS); assertQualName(qualName); XMPPath qualPath = XMPPathParser.expandXPath(qualNS, qualName); if (qualPath.size() != 2) { throw new XMPException(STR, XMPError.BADXPATH); } return "/?" + qualPath.getSegment(XMPPath.STEP_ROOT_...
/** * Compose the path expression for a qualifier. * * @param qualNS The namespace URI for the qualifier. May be <code>null</code> or the empty * string if the qualifier is in the XML empty namespace. * @param qualName The name of the qualifier. Must be a simple XML name, must not be * <code>...
Compose the path expression for a qualifier
composeQualifierPath
{ "repo_name": "kesenhoo/Camera2", "path": "src/com/adobe/xmp/XMPPathFactory.java", "license": "apache-2.0", "size": 11633 }
[ "com.adobe.xmp.impl.xpath.XMPPath", "com.adobe.xmp.impl.xpath.XMPPathParser" ]
import com.adobe.xmp.impl.xpath.XMPPath; import com.adobe.xmp.impl.xpath.XMPPathParser;
import com.adobe.xmp.impl.xpath.*;
[ "com.adobe.xmp" ]
com.adobe.xmp;
2,852,660
public DataBean setCurrencyId(final Long _currencyId) throws EFapsException { final CurrencyInst currencyInst = CurrencyInst.get(_currencyId); // only dolar and soles are working! if (currencyInst.getUUID().toString().equals("691758fc-a060-4bd5-b1fa-b33296...
DataBean function(final Long _currencyId) throws EFapsException { final CurrencyInst currencyInst = CurrencyInst.get(_currencyId); if (currencyInst.getUUID().toString().equals(STR)) { currency = "D"; } else { currency = "S"; } return this; } /** * Setter method for instance variable {@link #transDate}. * * @param _tran...
/** * Sets the currency id. * * @param _currencyId the _currency id * @return the data bean * @throws EFapsException the e faps exception */
Sets the currency id
setCurrencyId
{ "repo_name": "eFaps/eFapsApp-Accounting", "path": "src/main/efaps/ESJP/org/efaps/esjp/accounting/export/sc/JournalSC1617_Base.java", "license": "apache-2.0", "size": 57663 }
[ "org.efaps.esjp.erp.CurrencyInst", "org.efaps.util.EFapsException" ]
import org.efaps.esjp.erp.CurrencyInst; import org.efaps.util.EFapsException;
import org.efaps.esjp.erp.*; import org.efaps.util.*;
[ "org.efaps.esjp", "org.efaps.util" ]
org.efaps.esjp; org.efaps.util;
2,053,083
public static boolean canUpdate(Version from, Version to) { return from.getMajor() == to.getMajor() && from.getMinor() == to.getMinor() && from.getPatch() <= to.getPatch(); } private static final class SimpleVersion extends AbstractVersion { private static fina...
static boolean function(Version from, Version to) { return from.getMajor() == to.getMajor() && from.getMinor() == to.getMinor() && from.getPatch() <= to.getPatch(); } private static final class SimpleVersion extends AbstractVersion { private static final long serialVersionUID = 1L; private final int major; private fina...
/** * Determine if an "update" can be done between the from and to versions. * * @param from Version updating from * @param to Version updating to * @return true if the major and minor versions match and the from.patch value is less than or equal to the to.patch value */
Determine if an "update" can be done between the from and to versions
canUpdate
{ "repo_name": "Jasig/SSP-Platform", "path": "uportal-war/src/main/java/org/jasig/portal/version/VersionUtils.java", "license": "apache-2.0", "size": 3340 }
[ "org.jasig.portal.version.om.Version" ]
import org.jasig.portal.version.om.Version;
import org.jasig.portal.version.om.*;
[ "org.jasig.portal" ]
org.jasig.portal;
1,956,622
static MovFnPipelineAggregationBuilder parse(XContentParser parser) throws IOException { parser.nextToken(); if (parser.currentToken().equals(XContentParser.Token.START_OBJECT)) { parser.nextToken(); if (parser.currentToken().equals(XContentParser.Token.FIELD_NAME)) { ...
static MovFnPipelineAggregationBuilder parse(XContentParser parser) throws IOException { parser.nextToken(); if (parser.currentToken().equals(XContentParser.Token.START_OBJECT)) { parser.nextToken(); if (parser.currentToken().equals(XContentParser.Token.FIELD_NAME)) { String aggName = parser.currentName(); parser.nextT...
/** * Used for serialization testing, since pipeline aggs serialize themselves as a named object but are parsed * as a regular object with the name passed in. */
Used for serialization testing, since pipeline aggs serialize themselves as a named object but are parsed as a regular object with the name passed in
parse
{ "repo_name": "coding0011/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/aggregations/pipeline/MovFnPipelineAggregationBuilder.java", "license": "apache-2.0", "size": 10259 }
[ "java.io.IOException", "org.elasticsearch.common.xcontent.XContentParser" ]
import java.io.IOException; import org.elasticsearch.common.xcontent.XContentParser;
import java.io.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
13,043
EClass getMultilineComment_();
EClass getMultilineComment_();
/** * Returns the meta object for class '{@link cruise.umple.umple.MultilineComment_ <em>Multiline Comment </em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Multiline Comment </em>'. * @see cruise.umple.umple.MultilineComment_ * @generated */
Returns the meta object for class '<code>cruise.umple.umple.MultilineComment_ Multiline Comment </code>'.
getMultilineComment_
{ "repo_name": "ahmedvc/umple", "path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java", "license": "mit", "size": 485842 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
391,982
public Axis getZAxis() { return this.zAxis; }
Axis function() { return this.zAxis; }
/** * Get z axis * @return Z axis */
Get z axis
getZAxis
{ "repo_name": "meteoinfo/meteoinfolib", "path": "src/org/meteoinfo/chart/plot/Plot3D.java", "license": "lgpl-3.0", "size": 77286 }
[ "org.meteoinfo.chart.axis.Axis" ]
import org.meteoinfo.chart.axis.Axis;
import org.meteoinfo.chart.axis.*;
[ "org.meteoinfo.chart" ]
org.meteoinfo.chart;
2,766,873
boolean useExtendedFormats () throws SQLException // @A3A { validateConnection(); return connection_.useExtendedFormats(); }
boolean useExtendedFormats () throws SQLException { validateConnection(); return connection_.useExtendedFormats(); }
/** * Indicates if the connection is using extended formats. * @return true if the connection is using extended formats, false otherwise. **/
Indicates if the connection is using extended formats
useExtendedFormats
{ "repo_name": "piguangming/jt400", "path": "cvsroot/src/com/ibm/as400/access/AS400JDBCConnectionHandle.java", "license": "epl-1.0", "size": 76139 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
439,145
public void addImageCache(FragmentManager fragmentManager, float memCacheSizePercent) { mImageCache = ImageCache.getInstance(fragmentManager, memCacheSizePercent); }
void function(FragmentManager fragmentManager, float memCacheSizePercent) { mImageCache = ImageCache.getInstance(fragmentManager, memCacheSizePercent); }
/** * Adds an {@link ImageCache} to this image loader. * * @param fragmentManager A FragmentManager to use to retain the cache over configuration * changes such as an orientation change. * @param memCacheSizePercent The cache size as a percent of available app mem...
Adds an <code>ImageCache</code> to this image loader
addImageCache
{ "repo_name": "aarya123/CampusFeedv2", "path": "CampusFeed/src/com/purdue/CampusFeed/Utils/ImageLoader.java", "license": "apache-2.0", "size": 17105 }
[ "android.support.v4.app.FragmentManager" ]
import android.support.v4.app.FragmentManager;
import android.support.v4.app.*;
[ "android.support" ]
android.support;
988,638
String getDatabaseColumnTypeDefinition( DatabaseInterface databaseInterface, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr );
String getDatabaseColumnTypeDefinition( DatabaseInterface databaseInterface, String tk, String pk, boolean use_autoinc, boolean add_fieldname, boolean add_cr );
/** * Ask for suggestions as to how this plugin data type should be represented in the specified database interface * * @param databaseInterface * The database type/dialect to get the column type definition for * @param tk * Is this a technical key field? * @param pk * ...
Ask for suggestions as to how this plugin data type should be represented in the specified database interface
getDatabaseColumnTypeDefinition
{ "repo_name": "matthewtckr/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/row/ValueMetaInterface.java", "license": "apache-2.0", "size": 38578 }
[ "org.pentaho.di.core.database.DatabaseInterface" ]
import org.pentaho.di.core.database.DatabaseInterface;
import org.pentaho.di.core.database.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,738,331
protected List<Fleet> findVisibleFleets(Player toPlayer, boolean shouldSee, Player owner, int ds) { List<Fleet> result = new ArrayList<>(); for (Fleet f : owner.fleets.keySet()) { if (f.owner == owner && (toPlayer.fleets.containsKey(f) || !shouldSee) && toPlayer.withinLimits(f.x, f.y, ds))...
List<Fleet> function(Player toPlayer, boolean shouldSee, Player owner, int ds) { List<Fleet> result = new ArrayList<>(); for (Fleet f : owner.fleets.keySet()) { if (f.owner == owner && (toPlayer.fleets.containsKey(f) !shouldSee) && toPlayer.withinLimits(f.x, f.y, ds)) { result.add(f); } } return result; }
/** * Find visible fleets considering the current exploration limits as well. * @param toPlayer who should see the fleets * @param shouldSee should the player see the ship? * @param owner the owner of the fleets * @param ds the distance from limits * @return the list of fleets found */
Find visible fleets considering the current exploration limits as well
findVisibleFleets
{ "repo_name": "p-smith/open-ig", "path": "src/hu/openig/scripting/missions/Mission.java", "license": "lgpl-3.0", "size": 30560 }
[ "hu.openig.model.Fleet", "hu.openig.model.Player", "java.util.ArrayList", "java.util.List" ]
import hu.openig.model.Fleet; import hu.openig.model.Player; import java.util.ArrayList; import java.util.List;
import hu.openig.model.*; import java.util.*;
[ "hu.openig.model", "java.util" ]
hu.openig.model; java.util;
2,371,368
protected Map<Long, Placement> loadTimetable(Element timetableRoot) { Map<Long, Placement> timetable = new HashMap<Long, Placement>(); HashMap<Long, RoomLocation> rooms = new HashMap<Long, RoomLocation>(); for (Iterator<?> i = timetableRoot.element("rooms").elementIterator("room"); i.hasNext...
Map<Long, Placement> function(Element timetableRoot) { Map<Long, Placement> timetable = new HashMap<Long, Placement>(); HashMap<Long, RoomLocation> rooms = new HashMap<Long, RoomLocation>(); for (Iterator<?> i = timetableRoot.element("rooms").elementIterator("room"); i.hasNext();) { Element roomEl = (Element)i.next(); ...
/** * Load given timetable * @param timetableRoot document root in the course timetabling XML format * @return loaded timetable (map class id: assigned placement) */
Load given timetable
loadTimetable
{ "repo_name": "UniTime/cpsolver", "path": "src/org/cpsolver/studentsct/StudentSectioningXMLLoader.java", "license": "lgpl-3.0", "size": 63607 }
[ "java.util.HashMap", "java.util.Iterator", "java.util.Map", "org.cpsolver.coursett.model.Placement", "org.cpsolver.coursett.model.RoomLocation", "org.cpsolver.coursett.model.TimeLocation", "org.dom4j.Element" ]
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.cpsolver.coursett.model.Placement; import org.cpsolver.coursett.model.RoomLocation; import org.cpsolver.coursett.model.TimeLocation; import org.dom4j.Element;
import java.util.*; import org.cpsolver.coursett.model.*; import org.dom4j.*;
[ "java.util", "org.cpsolver.coursett", "org.dom4j" ]
java.util; org.cpsolver.coursett; org.dom4j;
293,242
private final Component resolveAutomaticLink(final MarkupContainer container, final String id, final ComponentTag tag) { final Page page = container.getPage(); // Make the id (page-)unique final String autoId = id + Integer.toString(page.getAutoIndex()); // get the tag name, which is something like 'a' ...
final Component function(final MarkupContainer container, final String id, final ComponentTag tag) { final Page page = container.getPage(); final String autoId = id + Integer.toString(page.getAutoIndex()); final String tagName = tag.getName(); if (tag.getId() == null) { tag.setId(autoId); tag.setAutoComponentTag(true);...
/** * Resolves the given tag's page class and page parameters by parsing the tag component name and * then searching for a page class at the absolute or relative URL specified by the href * attribute of the tag. * <p> * None html references are treated similar. * * @param container * The con...
Resolves the given tag's page class and page parameters by parsing the tag component name and then searching for a page class at the absolute or relative URL specified by the href attribute of the tag. None html references are treated similar
resolveAutomaticLink
{ "repo_name": "Servoy/wicket", "path": "wicket/src/main/java/org/apache/wicket/markup/resolver/AutoLinkResolver.java", "license": "apache-2.0", "size": 26672 }
[ "org.apache.wicket.Component", "org.apache.wicket.MarkupContainer", "org.apache.wicket.Page", "org.apache.wicket.markup.ComponentTag" ]
import org.apache.wicket.Component; import org.apache.wicket.MarkupContainer; import org.apache.wicket.Page; import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.*; import org.apache.wicket.markup.*;
[ "org.apache.wicket" ]
org.apache.wicket;
2,852,610
@Test( timeout = 30000 ) public void testLoggingRegistryConcurrentInitialization() throws InterruptedException, ExecutionException { CountDownLatch start = new CountDownLatch( 1 ); int count = 1000; CompletionService<LoggingRegistry> drover = registerHounds( count, start ); // fire! start.count...
@Test( timeout = 30000 ) void function() throws InterruptedException, ExecutionException { CountDownLatch start = new CountDownLatch( 1 ); int count = 1000; CompletionService<LoggingRegistry> drover = registerHounds( count, start ); start.countDown(); Set<LoggingRegistry> distinct = new HashSet<LoggingRegistry>(); int ...
/** * Test that LoggingRegistry is concurrent-sage initialized over multiple calls. Creating more than 1000 threads can * cause significant performance impact. * * @throws InterruptedException * @throws ExecutionException * */
Test that LoggingRegistry is concurrent-sage initialized over multiple calls. Creating more than 1000 threads can cause significant performance impact
testLoggingRegistryConcurrentInitialization
{ "repo_name": "ma459006574/pentaho-kettle", "path": "core/test-src/org/pentaho/di/core/logging/LoggingRegistrySingltonTest.java", "license": "apache-2.0", "size": 3527 }
[ "java.util.HashSet", "java.util.Set", "java.util.concurrent.CompletionService", "java.util.concurrent.CountDownLatch", "java.util.concurrent.ExecutionException", "java.util.concurrent.Future", "java.util.concurrent.TimeUnit", "junit.framework.Assert", "org.junit.Test" ]
import java.util.HashSet; import java.util.Set; import java.util.concurrent.CompletionService; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import junit.framework.Assert; import org.junit.Test;
import java.util.*; import java.util.concurrent.*; import junit.framework.*; import org.junit.*;
[ "java.util", "junit.framework", "org.junit" ]
java.util; junit.framework; org.junit;
2,038,159