method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Collection<Replica> replicasOfTopicInBroker(String topic) {
Map<Integer, Replica> topicReplicas = _topicReplicas.get(topic);
return (topicReplicas == null) ? Collections.emptyList() : topicReplicas.values();
} | Collection<Replica> function(String topic) { Map<Integer, Replica> topicReplicas = _topicReplicas.get(topic); return (topicReplicas == null) ? Collections.emptyList() : topicReplicas.values(); } | /**
* Get replicas for topic.
*
* @param topic Topic of the requested replicas.
* @return Replicas in this broker sharing the given topic.
*/ | Get replicas for topic | replicasOfTopicInBroker | {
"repo_name": "GergoHong/cruise-control",
"path": "cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/model/Broker.java",
"license": "bsd-2-clause",
"size": 14367
} | [
"java.util.Collection",
"java.util.Collections",
"java.util.Map"
] | import java.util.Collection; import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,142,066 |
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) {
eventManager.addPropertyChangeListener(propertyName, listener);
} | void function(String propertyName, PropertyChangeListener listener) { eventManager.addPropertyChangeListener(propertyName, listener); } | /**
* Add a PropertyChangeListener for a specific property. The
* listener will be invoked only when a call on
* firePropertyChange names that specific property. The case of
* the name is ignored.
*
* @since JAI 1.1
*/ | Add a PropertyChangeListener for a specific property. The listener will be invoked only when a call on firePropertyChange names that specific property. The case of the name is ignored | addPropertyChangeListener | {
"repo_name": "MarinnaCole/LightZone",
"path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/MultiResolutionRenderableImage.java",
"license": "bsd-3-clause",
"size": 17811
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 1,045,775 |
public IOException getReason() {
return this.reason;
} | IOException function() { return this.reason; } | /**
* Retrieves the underlying <tt>IOException</tt>.
*
* @return Value of property reason.
*/ | Retrieves the underlying IOException | getReason | {
"repo_name": "RabadanLab/Pegasus",
"path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/persist/LockFile.java",
"license": "mit",
"size": 97427
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,072,453 |
private int countFeatures(final String s) {
// do this with jdom, because I don't know how to do it with the sax stuff
try {
final SAXBuilder builder = new SAXBuilder(false);
final Document doc = builder.build(new StringReader(s));
final Element rootObject = doc.g... | int function(final String s) { try { final SAXBuilder builder = new SAXBuilder(false); final Document doc = builder.build(new StringReader(s)); final Element rootObject = doc.getRootElement(); return rootObject.getChildren(STR, Namespace.getNamespace(STRerror during featurecounting", jex); return -1; } } | /**
* DOCUMENT ME!
*
* @param s DOCUMENT ME!
*
* @return DOCUMENT ME!
*/ | DOCUMENT ME | countFeatures | {
"repo_name": "cismet/cismap-commons",
"path": "src/main/java/de/cismet/cismap/commons/wfsforms/WFSFormsListAndComboBoxModel.java",
"license": "lgpl-3.0",
"size": 21146
} | [
"java.io.StringReader",
"org.jdom.Document",
"org.jdom.Element",
"org.jdom.Namespace",
"org.jdom.input.SAXBuilder"
] | import java.io.StringReader; import org.jdom.Document; import org.jdom.Element; import org.jdom.Namespace; import org.jdom.input.SAXBuilder; | import java.io.*; import org.jdom.*; import org.jdom.input.*; | [
"java.io",
"org.jdom",
"org.jdom.input"
] | java.io; org.jdom; org.jdom.input; | 2,900,554 |
icon = Strings.nullToEmpty(icon);
vCode = Strings.nullToEmpty(vCode);
vName = Strings.nullToEmpty(vName);
useslocation = Strings.nullToEmpty(useslocation);
return "{\"" + SettingsConstants.PROJECT_YOUNG_ANDROID_SETTINGS + "\":{" +
"\"" + SettingsConstants.YOUNG_ANDROID_SETTINGS_ICON + "\":\"" +
... | icon = Strings.nullToEmpty(icon); vCode = Strings.nullToEmpty(vCode); vName = Strings.nullToEmpty(vName); useslocation = Strings.nullToEmpty(useslocation); return "{\"STR\":{" + "\"STR\":\"STR\",\"STR\":\"STR\",\"STR\":\"STR\",\"STR\":\"STR\"}}"; } | /**
* Returns project settings that can be used when creating a new project.
*/ | Returns project settings that can be used when creating a new project | getProjectSettings | {
"repo_name": "satgod/appinventor",
"path": "appinventor/appengine/src/com/google/appinventor/server/project/youngandroid/YoungAndroidProjectService.java",
"license": "mit",
"size": 36108
} | [
"com.google.common.base.Strings"
] | import com.google.common.base.Strings; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 27,536 |
public static void main(String[] args) {
LambdaFormTestCase.runTests(LFMultiThreadCachingTest::new, EnumSet.allOf(TestMethods.class));
} | static void function(String[] args) { LambdaFormTestCase.runTests(LFMultiThreadCachingTest::new, EnumSet.allOf(TestMethods.class)); } | /**
* Main routine for multiple threaded lambda forms caching test.
*
* @param args Accepts no arguments.
*/ | Main routine for multiple threaded lambda forms caching test | main | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/lang/invoke/LFCaching/LFMultiThreadCachingTest.java",
"license": "gpl-2.0",
"size": 5851
} | [
"java.util.EnumSet"
] | import java.util.EnumSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,779,891 |
public static String nextValue(StringReader in) throws IOException {
StringWriter w = new StringWriter();
boolean inQuotedValue = false;
boolean openQuote = false;
int c = in.read();
if (c == QUOTE)
inQuotedValue = true;
else if (c == DELIMITER) {
return null;
} else if (c >= 0) {
w.write(c);
... | static String function(StringReader in) throws IOException { StringWriter w = new StringWriter(); boolean inQuotedValue = false; boolean openQuote = false; int c = in.read(); if (c == QUOTE) inQuotedValue = true; else if (c == DELIMITER) { return null; } else if (c >= 0) { w.write(c); } else { throw new IOException(STR... | /**
* Obtains the next value from a {@link StringReader}.
*
* @param in
* @return An escaped value
* @throws IOException
*/ | Obtains the next value from a <code>StringReader</code> | nextValue | {
"repo_name": "turbomanage/storm-gen",
"path": "storm-apt/api/src/main/java/com/turbomanage/storm/csv/CsvUtils.java",
"license": "apache-2.0",
"size": 5343
} | [
"java.io.IOException",
"java.io.StringReader",
"java.io.StringWriter"
] | import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; | import java.io.*; | [
"java.io"
] | java.io; | 1,030,799 |
public String getBuildLog(String registrationId, RpcContext... jsonRpcContext) throws IOException, JsonClientException {
List<Object> args = new ArrayList<Object>();
args.add(registrationId);
TypeReference<List<String>> retType = new TypeReference<List<String>>() {};
List<String> res... | String function(String registrationId, RpcContext... jsonRpcContext) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(registrationId); TypeReference<List<String>> retType = new TypeReference<List<String>>() {}; List<String> res = caller.jsonrpcCall(STR, args, retType, true... | /**
* <p>Original spec-file function name: get_build_log</p>
* <pre>
* </pre>
* @param registrationId instance of String
* @return instance of String
* @throws IOException if an IO exception occurs
* @throws JsonClientException if a JSON RPC exception occurs
*/ | Original spec-file function name: get_build_log <code> </code> | getBuildLog | {
"repo_name": "kbase/catalog",
"path": "lib/java/us/kbase/catalog/CatalogClient.java",
"license": "mit",
"size": 50592
} | [
"com.fasterxml.jackson.core.type.TypeReference",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"us.kbase.common.service.JsonClientException",
"us.kbase.common.service.RpcContext"
] | import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.RpcContext; | import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"us.kbase.common"
] | com.fasterxml.jackson; java.io; java.util; us.kbase.common; | 723,989 |
static public Object get( Object object, String name ) throws MissingFieldException, InvocationTargetException
{
CallResolutionContext context = CallResolutionContext.forPropertyRead( object, name );
MethodCall call = CallResolver.resolvePropertyRead( context );
if( call == null )
throw new MissingFieldExc... | static Object function( Object object, String name ) throws MissingFieldException, InvocationTargetException { CallResolutionContext context = CallResolutionContext.forPropertyRead( object, name ); MethodCall call = CallResolver.resolvePropertyRead( context ); if( call == null ) throw new MissingFieldException( object,... | /**
* Reads a field of an object.
*
* @param object An object.
* @param name The name of the field.
* @return The value of the field.
* @throws MissingFieldException
* @throws InvocationTargetException
*/ | Reads a field of an object | get | {
"repo_name": "sindicate/solidstack.old",
"path": "src/solidstack/script/java/Java.java",
"license": "apache-2.0",
"size": 8420
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 401,398 |
final void println(final String tag, final CharSequence value) throws IOException {
out.write(margin);
out.write('<');
out.write(tag);
out.write('>');
if (value != null) {
out.write(value.toString());
}
out.write("</");
final int s = tag.in... | final void println(final String tag, final CharSequence value) throws IOException { out.write(margin); out.write('<'); out.write(tag); out.write('>'); if (value != null) { out.write(value.toString()); } out.write("</"); final int s = tag.indexOf(' '); out.write(tag, 0, (s >= 0) ? s : tag.length()); out.write('>'); out.... | /**
* Writes the given text in the given HTML element.
* The {@code &}, {@code <} and {@code >} characters are <strong>not</strong> escaped.
* For escaping those characters, invoke <code>println(tag, {@linkplain #escape(CharSequence) escape}(value))</code>.
*
* @param tag The HTML tag without ... | Writes the given text in the given HTML element. The &, characters are not escaped. For escaping those characters, invoke <code>println(tag, #escape(CharSequence) escape(value))</code> | println | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-referencing/src/test/java/org/apache/sis/referencing/report/HTMLGenerator.java",
"license": "apache-2.0",
"size": 9932
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 822,185 |
public ContentResource getResource(String id) throws PermissionException, IdUnusedException, TypeException; | ContentResource function(String id) throws PermissionException, IdUnusedException, TypeException; | /**
* Access the resource with this resource id. For non-collection resources only. The resource content and properties are accessible from the returned Resource object.
*
* @param id
* The id of the resource.
* @exception PermissionException
* if the user does not have permissions to rea... | Access the resource with this resource id. For non-collection resources only. The resource content and properties are accessible from the returned Resource object | getResource | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "kernel/api/src/main/java/org/sakaiproject/content/api/ContentHostingService.java",
"license": "apache-2.0",
"size": 93228
} | [
"org.sakaiproject.exception.IdUnusedException",
"org.sakaiproject.exception.PermissionException",
"org.sakaiproject.exception.TypeException"
] | import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.exception.PermissionException; import org.sakaiproject.exception.TypeException; | import org.sakaiproject.exception.*; | [
"org.sakaiproject.exception"
] | org.sakaiproject.exception; | 1,461,698 |
public void addItem(Item item) {
this.items.add(item);
} | void function(Item item) { this.items.add(item); } | /**
* Adds an item that will be purchased.
* <p>
* At least one item must be added for a successful order.
*
* @param item the {@link Item} object to add to the list of items that the order contains.
*/ | Adds an item that will be purchased. At least one item must be added for a successful order | addItem | {
"repo_name": "DopplerEffect666/safecharge-java",
"path": "src/main/java/com/safecharge/request/SafechargeOrderDetailsRequest.java",
"license": "mit",
"size": 7409
} | [
"com.safecharge.model.Item"
] | import com.safecharge.model.Item; | import com.safecharge.model.*; | [
"com.safecharge.model"
] | com.safecharge.model; | 2,377,110 |
public ScriptCallback runScript(SecurityContext ctx, ScriptObject script)
throws DSOutOfServiceException, DSAccessException
{
return null;
} | ScriptCallback function(SecurityContext ctx, ScriptObject script) throws DSOutOfServiceException, DSAccessException { return null; } | /**
* No-op implementation
* @see OmeroImageService#runScript(ScriptObject)
*/ | No-op implementation | runScript | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/TEST/org/openmicroscopy/shoola/env/data/NullRenderingService.java",
"license": "gpl-2.0",
"size": 15256
} | [
"org.openmicroscopy.shoola.env.data.model.ScriptObject",
"org.openmicroscopy.shoola.env.data.util.SecurityContext"
] | import org.openmicroscopy.shoola.env.data.model.ScriptObject; import org.openmicroscopy.shoola.env.data.util.SecurityContext; | import org.openmicroscopy.shoola.env.data.model.*; import org.openmicroscopy.shoola.env.data.util.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,268,379 |
public void save() throws Exception {
MindRaider.noteCustodian.save(this);
} | void function() throws Exception { MindRaider.noteCustodian.save(this); } | /**
* Save concept.
*
* @throws Exception
* a generic exception.
*/ | Save concept | save | {
"repo_name": "dvorka/mindraider",
"path": "mr7/src/main/java/com/emental/mindraider/core/rest/resource/ConceptResource.java",
"license": "apache-2.0",
"size": 16959
} | [
"com.emental.mindraider.core.MindRaider"
] | import com.emental.mindraider.core.MindRaider; | import com.emental.mindraider.core.*; | [
"com.emental.mindraider"
] | com.emental.mindraider; | 2,369,200 |
public ServiceFuture<Void> beginStopAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallba... | ServiceFuture<Void> function(String resourceGroupName, String networkWatcherName, String packetCaptureName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginStopWithServiceResponseAsync(resourceGroupName, networkWatcherName, packetCaptureName), serviceCallback); } | /**
* Stops a specified packet capture session.
*
* @param resourceGroupName The name of the resource group.
* @param networkWatcherName The name of the network watcher.
* @param packetCaptureName The name of the packet capture session.
* @param serviceCallback the async ServiceCallback to... | Stops a specified packet capture session | beginStopAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/PacketCapturesInner.java",
"license": "mit",
"size": 60394
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,780,489 |
public String decode(final String string) throws AciURLCodecException {
// This is what we'll return...
String returnValue = null;
try {
if (string != null) {
returnValue = new String(URLCodec.decodeUrl(string.getBytes(US_ASCII)), UTF8);
}
} c... | String function(final String string) throws AciURLCodecException { String returnValue = null; try { if (string != null) { returnValue = new String(URLCodec.decodeUrl(string.getBytes(US_ASCII)), UTF8); } } catch (final UnsupportedEncodingException DecoderException uee) { throw new AciURLCodecException(uee); } return ret... | /**
* Decodes a URL safe string into its original form using the UTF-8 charset. Escaped characters are converted back
* to their original representation.
* @param string URL safe string to convert into its original form
* @return original string
* @throws AciURLCodecException Thrown if URL deco... | Decodes a URL safe string into its original form using the UTF-8 charset. Escaped characters are converted back to their original representation | decode | {
"repo_name": "hpautonomy/java-aci-api-ng",
"path": "src/main/java/com/autonomy/aci/client/util/AciURLCodec.java",
"license": "mit",
"size": 4330
} | [
"java.io.UnsupportedEncodingException",
"org.apache.commons.codec.DecoderException",
"org.apache.commons.codec.net.URLCodec"
] | import java.io.UnsupportedEncodingException; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.net.URLCodec; | import java.io.*; import org.apache.commons.codec.*; import org.apache.commons.codec.net.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 1,993,291 |
@Test
public void verifyMultiplyCalculation() throws InterruptedException {
BigInteger result = cut.multiply ( new BigInteger[] { BigInteger.valueOf (2L), BigInteger.valueOf (2L) } );
assertThat("Should have received expected value", result,
is(BigInteger.valueOf(4L)));
} | void function() throws InterruptedException { BigInteger result = cut.multiply ( new BigInteger[] { BigInteger.valueOf (2L), BigInteger.valueOf (2L) } ); assertThat(STR, result, is(BigInteger.valueOf(4L))); } | /**
* Verify that all given names are dispatched to greeting channel with expected greetings.
*/ | Verify that all given names are dispatched to greeting channel with expected greetings | verifyMultiplyCalculation | {
"repo_name": "andifalk/spring-integration-workshop",
"path": "integration-calculator/src/test/java/info/novatec/integration/hello/service/HelloServiceIntegrationTest.java",
"license": "apache-2.0",
"size": 2769
} | [
"java.math.BigInteger",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import java.math.BigInteger; import org.hamcrest.Matchers; import org.junit.Assert; | import java.math.*; import org.hamcrest.*; import org.junit.*; | [
"java.math",
"org.hamcrest",
"org.junit"
] | java.math; org.hamcrest; org.junit; | 661,850 |
@ApiAuthentication(additionalCheck = ApiAuthenticationBizdockCheck.class)
@ApiOperation(value = "Update the specified Requirement Severity, default for empty fields : null", notes = "Update a requirement severity", response = RequirementSeverityRequest.class, httpMethod = "PUT")
@ApiImplicitParams({
... | @ApiAuthentication(additionalCheck = ApiAuthenticationBizdockCheck.class) @ApiOperation(value = STR, notes = STR, response = RequirementSeverityRequest.class, httpMethod = "PUT") @ApiImplicitParams({ @ApiImplicitParam(name = "body", value = STR, required = true, dataType = STR, paramType = "body") }) @ApiResponses(valu... | /**
* Update a requirement severity.
*
* WARNING: If an optional attribute is not given, then its current value
* will be settled to null.
*
* @param id
* the requirement severity id
*
* @return the JSON object of the corresponding requirement severity.
*/ | Update a requirement severity. will be settled to null | udpateRequirementSeverity | {
"repo_name": "theAgileFactory/maf-desktop-app",
"path": "app/controllers/api/core/RequirementSeverityApiController.java",
"license": "gpl-2.0",
"size": 9535
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.wordnik.swagger.annotations.ApiImplicitParam",
"com.wordnik.swagger.annotations.ApiImplicitParams",
"com.wordnik.swagger.annotations.ApiOperation",
"com.wordnik.swagger.annotations.ApiParam",
"com.wordnik.swagger.annotations.ApiResponse",
"com.wordnik.swag... | import com.fasterxml.jackson.databind.JsonNode; import com.wordnik.swagger.annotations.ApiImplicitParam; import com.wordnik.swagger.annotations.ApiImplicitParams; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; import com.wordnik.swagger.annotations.ApiResponse; imp... | import com.fasterxml.jackson.databind.*; import com.wordnik.swagger.annotations.*; import java.util.*; import javax.ws.rs.*; | [
"com.fasterxml.jackson",
"com.wordnik.swagger",
"java.util",
"javax.ws"
] | com.fasterxml.jackson; com.wordnik.swagger; java.util; javax.ws; | 2,604,489 |
protected Message interceptMessage(Message message, String messageType, TestContext context) {
return message;
} | Message function(Message message, String messageType, TestContext context) { return message; } | /**
* Intercept the message construction. Subclasses may overwrite this method and modify message payload.
* @param message the payload
* @param messageType
* @param context the current test context
*/ | Intercept the message construction. Subclasses may overwrite this method and modify message payload | interceptMessage | {
"repo_name": "christophd/citrus",
"path": "core/citrus-base/src/main/java/com/consol/citrus/validation/interceptor/AbstractMessageConstructionInterceptor.java",
"license": "apache-2.0",
"size": 2834
} | [
"com.consol.citrus.context.TestContext",
"com.consol.citrus.message.Message"
] | import com.consol.citrus.context.TestContext; import com.consol.citrus.message.Message; | import com.consol.citrus.context.*; import com.consol.citrus.message.*; | [
"com.consol.citrus"
] | com.consol.citrus; | 1,049,363 |
public static void notEmpty(Map map) {
notEmpty(map, "[Assertion failed] - this map must not be empty; it must contain at least one entry");
} | static void function(Map map) { notEmpty(map, STR); } | /**
* Assert that a Map has entries; that is, it must not be <code>null</code>
* and must have at least one entry.
*
* <pre class="code">
* Assert.notEmpty(map);
* </pre>
*
* @param map
* the map to check
* @throws IllegalArgumentException
* if the map is <code>null</code>... | Assert that a Map has entries; that is, it must not be <code>null</code> and must have at least one entry. Assert.notEmpty(map); </code> | notEmpty | {
"repo_name": "tylerchen/tc-util-project",
"path": "src/main/java/org/iff/infra/util/Assert.java",
"license": "mit",
"size": 19871
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 649,177 |
@Override
public String getDefault() {
OdfElement parentElement = (OdfElement)getOwnerElement();
String defaultValue = null;
if (parentElement != null) {
defaultValue=DEFAULT_VALUE;
}
return defaultValue;
} | String function() { OdfElement parentElement = (OdfElement)getOwnerElement(); String defaultValue = null; if (parentElement != null) { defaultValue=DEFAULT_VALUE; } return defaultValue; } | /**
* Returns the default value of {@odf.attribute table:range-usable-as}.
*
* @return the default value as <code>String</code> dependent of its element name
* return <code>null</code> if the default value does not exist
*/ | Returns the default value of | getDefault | {
"repo_name": "jbjonesjr/geoproponis",
"path": "external/odfdom-java-0.8.10-incubating-sources/org/odftoolkit/odfdom/dom/attribute/table/TableRangeUsableAsAttribute.java",
"license": "gpl-2.0",
"size": 4166
} | [
"org.odftoolkit.odfdom.pkg.OdfElement"
] | import org.odftoolkit.odfdom.pkg.OdfElement; | import org.odftoolkit.odfdom.pkg.*; | [
"org.odftoolkit.odfdom"
] | org.odftoolkit.odfdom; | 1,466,408 |
public PutIndexTemplateRequest alias(Alias alias) {
aliases.add(alias);
return this;
} | PutIndexTemplateRequest function(Alias alias) { aliases.add(alias); return this; } | /**
* Adds an alias that will be added when the index gets created.
*
* @param alias The metadata for the new alias
* @return the index template creation request
*/ | Adds an alias that will be added when the index gets created | alias | {
"repo_name": "nknize/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/indices/PutIndexTemplateRequest.java",
"license": "apache-2.0",
"size": 15082
} | [
"org.elasticsearch.action.admin.indices.alias.Alias"
] | import org.elasticsearch.action.admin.indices.alias.Alias; | import org.elasticsearch.action.admin.indices.alias.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 1,149,512 |
public static TypeAdapterFactory newTypeHierarchyFactory(
Class<?> hierarchyType, Object typeAdapter) {
return new SingleTypeFactory(typeAdapter, null, false, hierarchyType);
}
private static final class SingleTypeFactory implements TypeAdapterFactory {
private final TypeToken<?> exactType;
pri... | static TypeAdapterFactory function( Class<?> hierarchyType, Object typeAdapter) { return new SingleTypeFactory(typeAdapter, null, false, hierarchyType); } private static final class SingleTypeFactory implements TypeAdapterFactory { private final TypeToken<?> exactType; private final boolean matchRawType; private final ... | /**
* Returns a new factory that will match each type's raw type for assignability
* to {@code hierarchyType}.
*/ | Returns a new factory that will match each type's raw type for assignability to hierarchyType | newTypeHierarchyFactory | {
"repo_name": "google/gson",
"path": "gson/src/main/java/com/google/gson/internal/bind/TreeTypeAdapter.java",
"license": "apache-2.0",
"size": 6216
} | [
"com.google.gson.Gson",
"com.google.gson.JsonDeserializer",
"com.google.gson.JsonSerializer",
"com.google.gson.TypeAdapterFactory",
"com.google.gson.reflect.TypeToken"
] | import com.google.gson.Gson; import com.google.gson.JsonDeserializer; import com.google.gson.JsonSerializer; import com.google.gson.TypeAdapterFactory; import com.google.gson.reflect.TypeToken; | import com.google.gson.*; import com.google.gson.reflect.*; | [
"com.google.gson"
] | com.google.gson; | 199,885 |
public double[] getCapletForwardRates() {
int n = _capletsArray.length;
Set<Double> ts = new TreeSet<>();
for (int i = 0; i < n; i++) {
ts.add(_capletsArray[i].getForward());
}
return ArrayUtils.toPrimitive(ts.toArray(new Double[0]));
} | double[] function() { int n = _capletsArray.length; Set<Double> ts = new TreeSet<>(); for (int i = 0; i < n; i++) { ts.add(_capletsArray[i].getForward()); } return ArrayUtils.toPrimitive(ts.toArray(new Double[0])); } | /**
* Get the forward rates for the period covered by the caplets.
* @return the forward rates - these are order by (caplet) fixing time, then strike.
*/ | Get the forward rates for the period covered by the caplets | getCapletForwardRates | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/interestrate/capletstripping/MultiCapFloorPricer.java",
"license": "apache-2.0",
"size": 17653
} | [
"java.util.Set",
"java.util.TreeSet",
"org.apache.commons.lang.ArrayUtils"
] | import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang.ArrayUtils; | import java.util.*; import org.apache.commons.lang.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,871,031 |
public Statement getStatement(int position);
| Statement function(int position); | /**
* Access statement by index
*
* @param position
* Index of statement
* @return Statement at position
*/ | Access statement by index | getStatement | {
"repo_name": "sefaakca/EvoSuite-Sefa",
"path": "client/src/main/java/org/evosuite/testcase/TestCase.java",
"license": "lgpl-3.0",
"size": 13289
} | [
"org.evosuite.testcase.statements.Statement"
] | import org.evosuite.testcase.statements.Statement; | import org.evosuite.testcase.statements.*; | [
"org.evosuite.testcase"
] | org.evosuite.testcase; | 1,214,085 |
private void close(final Transaction txn, final Connection conn) throws DataProviderException
{
if (txn == null)
{
try
{
conn.close();
}
catch (final SQLException e)
{
throw new DataProviderExce... | void function(final Transaction txn, final Connection conn) throws DataProviderException { if (txn == null) { try { conn.close(); } catch (final SQLException e) { throw new DataProviderException(STR, e); } } } | /**
* Closes the given connection. If the connection is participating in a transaction this call
* has no effect.
*
* @param txn
* the current transaction or {@code null} when there is no active transaction
* @param conn
* the {@link Connection} to close
... | Closes the given connection. If the connection is participating in a transaction this call has no effect | close | {
"repo_name": "perbone/udao",
"path": "udao-provider-jdbc/src/main/java/io/perbone/udao/provider/jdbc/JdbcDataSourceImpl.java",
"license": "apache-2.0",
"size": 106396
} | [
"io.perbone.udao.spi.DataProviderException",
"io.perbone.udao.transaction.Transaction",
"java.sql.Connection",
"java.sql.SQLException"
] | import io.perbone.udao.spi.DataProviderException; import io.perbone.udao.transaction.Transaction; import java.sql.Connection; import java.sql.SQLException; | import io.perbone.udao.spi.*; import io.perbone.udao.transaction.*; import java.sql.*; | [
"io.perbone.udao",
"java.sql"
] | io.perbone.udao; java.sql; | 2,690,838 |
public void retainIconForPageUrl(String url) {
if (url != null) {
mEventHandler.postMessage(
Message.obtain(null, EventHandler.RETAIN_ICON, url));
}
} | void function(String url) { if (url != null) { mEventHandler.postMessage( Message.obtain(null, EventHandler.RETAIN_ICON, url)); } } | /**
* Retain the icon for the given page url.
* @param url The page's url.
*/ | Retain the icon for the given page url | retainIconForPageUrl | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/webkit/WebIconDatabase.java",
"license": "gpl-3.0",
"size": 11435
} | [
"android.os.Message"
] | import android.os.Message; | import android.os.*; | [
"android.os"
] | android.os; | 1,416,103 |
public List<SoftButtonCapabilities> getSoftButtonCapabilities() throws SdlException {
// Test if proxy has been disposed
if (_proxyDisposed) {
throw new SdlException("This object has been disposed, it is no long capable of executing methods.", SdlExceptionCause.SDL_PROXY_DISPOSED);
}
// Test SDL ... | List<SoftButtonCapabilities> function() throws SdlException { if (_proxyDisposed) { throw new SdlException(STR, SdlExceptionCause.SDL_PROXY_DISPOSED); } if (!_appInterfaceRegisterd) { throw new SdlException(STR, SdlExceptionCause.SDL_UNAVAILABLE); } return _softButtonCapabilities; } | /**
* Gets getSoftButtonCapabilities set when application interface is registered.
*
* @return softButtonCapabilities
* @throws SdlException
*/ | Gets getSoftButtonCapabilities set when application interface is registered | getSoftButtonCapabilities | {
"repo_name": "mrapitis/sdl_android",
"path": "sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyALM.java",
"license": "bsd-3-clause",
"size": 64206
} | [
"com.smartdevicelink.exception.SdlException",
"com.smartdevicelink.exception.SdlExceptionCause",
"com.smartdevicelink.proxy.rpc.SoftButtonCapabilities",
"java.util.List"
] | import com.smartdevicelink.exception.SdlException; import com.smartdevicelink.exception.SdlExceptionCause; import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities; import java.util.List; | import com.smartdevicelink.exception.*; import com.smartdevicelink.proxy.rpc.*; import java.util.*; | [
"com.smartdevicelink.exception",
"com.smartdevicelink.proxy",
"java.util"
] | com.smartdevicelink.exception; com.smartdevicelink.proxy; java.util; | 2,243,708 |
protected Control createContents( Composite parent )
{
ZDebug.print( 4, "createControl( ", parent, " )" );
Composite mainComposite = SWTUtil.createGridLayoutComposite( parent, 1 );
SWTUtil.gridDataFillHorizontal( mainComposite );
SWTUtil.removeLayoutMargins( (GridLayout) mainComposite.... | Control function( Composite parent ) { ZDebug.print( 4, STR, parent, STR ); Composite mainComposite = SWTUtil.createGridLayoutComposite( parent, 1 ); SWTUtil.gridDataFillHorizontal( mainComposite ); SWTUtil.removeLayoutMargins( (GridLayout) mainComposite.getLayout() ); { Group group = SWTUtil.createGroup( mainComposite... | /**
* Create the preference controls.
*/ | Create the preference controls | createContents | {
"repo_name": "brocade/vTM-eclipse",
"path": "plugin/src/com/zeus/eclipsePlugin/preferences/MainPage.java",
"license": "bsd-3-clause",
"size": 3193
} | [
"com.zeus.eclipsePlugin.ZDebug",
"com.zeus.eclipsePlugin.ZLang",
"com.zeus.eclipsePlugin.consts.Preference",
"com.zeus.eclipsePlugin.swt.SWTEnableListener",
"com.zeus.eclipsePlugin.swt.SWTSet",
"com.zeus.eclipsePlugin.swt.SWTUtil",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.widgets.Button",... | import com.zeus.eclipsePlugin.ZDebug; import com.zeus.eclipsePlugin.ZLang; import com.zeus.eclipsePlugin.consts.Preference; import com.zeus.eclipsePlugin.swt.SWTEnableListener; import com.zeus.eclipsePlugin.swt.SWTSet; import com.zeus.eclipsePlugin.swt.SWTUtil; import org.eclipse.swt.layout.GridLayout; import org.eclip... | import com.zeus.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"com.zeus",
"org.eclipse.swt"
] | com.zeus; org.eclipse.swt; | 2,295,564 |
@GET("/users/{user}")
Flowable<GitHubUser> user(@Path("user") String user); | @GET(STR) Flowable<GitHubUser> user(@Path("user") String user); | /**
* See https://developer.github.com/v3/users/
*/ | See HREF | user | {
"repo_name": "weiwenqiang/GitHub",
"path": "expert/realm-java/examples/rxJavaExample/src/main/java/io/realm/examples/rxjava/retrofit/GitHubApi.java",
"license": "apache-2.0",
"size": 928
} | [
"io.reactivex.Flowable"
] | import io.reactivex.Flowable; | import io.reactivex.*; | [
"io.reactivex"
] | io.reactivex; | 1,991,034 |
@Test(expectedExceptions = ValidationException.class)
public void testMakeArbitraryDirectoryNormalUser() throws ServerError {
repo.makeDir(UUID.randomUUID().toString(), false);
} | @Test(expectedExceptions = ValidationException.class) void function() throws ServerError { repo.makeDir(UUID.randomUUID().toString(), false); } | /**
* A normal user cannot create a directory outside their own parent directory if it violates the template path.
* @throws ServerError expected directory creation error
*/ | A normal user cannot create a directory outside their own parent directory if it violates the template path | testMakeArbitraryDirectoryNormalUser | {
"repo_name": "manics/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/ManagedRepositoryTest.java",
"license": "gpl-2.0",
"size": 41537
} | [
"java.util.UUID",
"org.testng.annotations.Test"
] | import java.util.UUID; import org.testng.annotations.Test; | import java.util.*; import org.testng.annotations.*; | [
"java.util",
"org.testng.annotations"
] | java.util; org.testng.annotations; | 1,850,336 |
static public String getDisplayName(ULocale objectLocale) {
return getShim().getDisplayName(objectLocale, ULocale.getDefault(Category.DISPLAY));
} | static String function(ULocale objectLocale) { return getShim().getDisplayName(objectLocale, ULocale.getDefault(Category.DISPLAY)); } | /**
* {@icu} Returns the name of the collator for the objectLocale, localized for the
* default <code>DISPLAY</code> locale.
* @param objectLocale the locale of the collator
* @return the display name
* @see com.ibm.icu.util.ULocale.Category#DISPLAY
* @stable ICU 3.2
*/ | Returns the name of the collator for the objectLocale, localized for the default <code>DISPLAY</code> locale | getDisplayName | {
"repo_name": "Miracle121/quickdic-dictionary.dictionary",
"path": "jars/icu4j-52_1/main/classes/collate/src/com/ibm/icu/text/Collator.java",
"license": "apache-2.0",
"size": 51649
} | [
"com.ibm.icu.util.ULocale"
] | import com.ibm.icu.util.ULocale; | import com.ibm.icu.util.*; | [
"com.ibm.icu"
] | com.ibm.icu; | 1,046,259 |
@Test
public void testIsAnimate()
{
assertFalse(resizableBehavior.isAnimate());
resizableBehavior.setAnimate(true);
assertTrue(resizableBehavior.isAnimate());
} | void function() { assertFalse(resizableBehavior.isAnimate()); resizableBehavior.setAnimate(true); assertTrue(resizableBehavior.isAnimate()); } | /**
* Test method for
* {@link org.odlabs.wiquery.ui.resizable.ResizableBehavior#isAnimate()}.
*/ | Test method for <code>org.odlabs.wiquery.ui.resizable.ResizableBehavior#isAnimate()</code> | testIsAnimate | {
"repo_name": "WiQuery/wiquery",
"path": "wiquery-jquery-ui/src/test/java/org/odlabs/wiquery/ui/resizable/ResizableBehaviorTestCase.java",
"license": "mit",
"size": 10375
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,286,099 |
protected I_CmsIndexWriter createIndexWriter(boolean create, I_CmsReport report) throws CmsIndexException {
indexWriterUnlock(report);
IndexWriter indexWriter;
try {
File f = new File(getPath());
if (!f.exists()) {
f = f.getParentFile();
... | I_CmsIndexWriter function(boolean create, I_CmsReport report) throws CmsIndexException { indexWriterUnlock(report); IndexWriter indexWriter; try { File f = new File(getPath()); if (!f.exists()) { f = f.getParentFile(); if ((f != null) && (!f.exists())) { f.mkdirs(); } create = true; } FSDirectory dir = FSDirectory.open... | /**
* Creates a new index writer.<p>
*
* @param create if <code>true</code> a whole new index is created, if <code>false</code> an existing index is updated
* @param report the report
*
* @return the created new index writer
*
* @throws CmsIndexException in case the writer cou... | Creates a new index writer | createIndexWriter | {
"repo_name": "it-tavis/opencms-core",
"path": "src/org/opencms/search/CmsSearchIndex.java",
"license": "lgpl-2.1",
"size": 93424
} | [
"java.io.File",
"org.apache.lucene.index.IndexWriter",
"org.apache.lucene.index.IndexWriterConfig",
"org.apache.lucene.store.FSDirectory"
] | import java.io.File; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.store.FSDirectory; | import java.io.*; import org.apache.lucene.index.*; import org.apache.lucene.store.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 2,821,465 |
public static Collection<InetSocketAddress> toSocketAddresses(Collection<String> addrs,
Collection<String> hostNames, int port) {
List<InetSocketAddress> res = new ArrayList<>(addrs.size());
Iterator<String> hostNamesIt = hostNames.iterator();
for (String addr : addrs) {
... | static Collection<InetSocketAddress> function(Collection<String> addrs, Collection<String> hostNames, int port) { List<InetSocketAddress> res = new ArrayList<>(addrs.size()); Iterator<String> hostNamesIt = hostNames.iterator(); for (String addr : addrs) { String hostName = hostNamesIt.hasNext() ? hostNamesIt.next() : n... | /**
* Returns tha list of resolved socket addresses. First addresses are resolved by host names,
* if this attempt fails then the addresses are resolved by ip addresses.
*
* @param addrs Addresses.
* @param hostNames Host names.
* @param port Port.
* @return Socket addresses for given... | Returns tha list of resolved socket addresses. First addresses are resolved by host names, if this attempt fails then the addresses are resolved by ip addresses | toSocketAddresses | {
"repo_name": "agoncharuk/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 289549
} | [
"java.net.InetSocketAddress",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"java.util.List",
"org.apache.ignite.internal.util.typedef.F"
] | import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import org.apache.ignite.internal.util.typedef.F; | import java.net.*; import java.util.*; import org.apache.ignite.internal.util.typedef.*; | [
"java.net",
"java.util",
"org.apache.ignite"
] | java.net; java.util; org.apache.ignite; | 1,222,373 |
public static Collection flatten(double[] self) {
return flatten(toList(self), new ArrayList());
} | static Collection function(double[] self) { return flatten(toList(self), new ArrayList()); } | /**
* Flatten an array. This array and any nested arrays or
* collections have their contents (recursively) added to the new collection.
*
* @param self a double Array to flatten
* @return a flattened Collection
* @since 1.6.0
*/ | Flatten an array. This array and any nested arrays or collections have their contents (recursively) added to the new collection | flatten | {
"repo_name": "apache/incubator-groovy",
"path": "src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 703151
} | [
"java.util.ArrayList",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,620,755 |
public static Offset<BigInteger> within(BigInteger value) {
return Offset.offset(value);
} | static Offset<BigInteger> function(BigInteger value) { return Offset.offset(value); } | /**
* Assertions entry point for BigInteger {@link Offset} to use with isCloseTo assertions.
* <p>
* Typical usage :
* <pre><code class='java'> assertThat(BigInteger.TEN).isCloseTo(new BigInteger("11"), within(new BigInteger("2")));</code></pre>
*
* @since 2.7.0 / 3.7.0
* @param value the allowed o... | Assertions entry point for BigInteger <code>Offset</code> to use with isCloseTo assertions. Typical usage : <code> assertThat(BigInteger.TEN).isCloseTo(new BigInteger("11"), within(new BigInteger("2")));</code></code> | within | {
"repo_name": "xasx/assertj-core",
"path": "src/main/java/org/assertj/core/api/Assertions.java",
"license": "apache-2.0",
"size": 123012
} | [
"java.math.BigInteger",
"org.assertj.core.data.Offset"
] | import java.math.BigInteger; import org.assertj.core.data.Offset; | import java.math.*; import org.assertj.core.data.*; | [
"java.math",
"org.assertj.core"
] | java.math; org.assertj.core; | 2,081,928 |
@Test
public void testEmptyReadGzipUncompressed() throws Exception {
byte[] input = generateInput(0);
File tmpFile = tmpFolder.newFile("test.gz");
Files.write(input, tmpFile);
verifyReadContents(input, tmpFile, CompressionMode.GZIP);
} | void function() throws Exception { byte[] input = generateInput(0); File tmpFile = tmpFolder.newFile(STR); Files.write(input, tmpFile); verifyReadContents(input, tmpFile, CompressionMode.GZIP); } | /**
* Test reading an empty input file with gzip; it must be interpreted as uncompressed because the
* gzip header is two bytes.
*/ | Test reading an empty input file with gzip; it must be interpreted as uncompressed because the gzip header is two bytes | testEmptyReadGzipUncompressed | {
"repo_name": "rangadi/beam",
"path": "sdks/java/core/src/test/java/org/apache/beam/sdk/io/CompressedSourceTest.java",
"license": "apache-2.0",
"size": 28581
} | [
"com.google.common.io.Files",
"java.io.File",
"org.apache.beam.sdk.io.CompressedSource"
] | import com.google.common.io.Files; import java.io.File; import org.apache.beam.sdk.io.CompressedSource; | import com.google.common.io.*; import java.io.*; import org.apache.beam.sdk.io.*; | [
"com.google.common",
"java.io",
"org.apache.beam"
] | com.google.common; java.io; org.apache.beam; | 889,879 |
private INodeAttributeProvider getUserFilteredAttributeProvider(
UserGroupInformation ugi) {
if (attributeProvider == null ||
(ugi != null && isUserBypassingExtAttrProvider(ugi.getUserName()))) {
return null;
}
return attributeProvider;
} | INodeAttributeProvider function( UserGroupInformation ugi) { if (attributeProvider == null (ugi != null && isUserBypassingExtAttrProvider(ugi.getUserName()))) { return null; } return attributeProvider; } | /**
* Return attributeProvider or null if ugi is to bypass attributeProvider.
* @param ugi
* @return configured attributeProvider or null
*/ | Return attributeProvider or null if ugi is to bypass attributeProvider | getUserFilteredAttributeProvider | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 76824
} | [
"org.apache.hadoop.security.UserGroupInformation"
] | import org.apache.hadoop.security.UserGroupInformation; | import org.apache.hadoop.security.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,732,137 |
public double calculateRightInset(final double width) {
double result = this.right;
if (this.unitType == UnitType.RELATIVE) {
result = (this.right * width);
}
return result;
} | double function(final double width) { double result = this.right; if (this.unitType == UnitType.RELATIVE) { result = (this.right * width); } return result; } | /**
* Returns the right margin.
*
* @param width the width of the base rectangle.
*
* @return The right margin (in Java2D units).
*/ | Returns the right margin | calculateRightInset | {
"repo_name": "apetresc/JCommon",
"path": "src/main/java/org/jfree/ui/RectangleInsets.java",
"license": "lgpl-2.1",
"size": 17672
} | [
"org.jfree.util.UnitType"
] | import org.jfree.util.UnitType; | import org.jfree.util.*; | [
"org.jfree.util"
] | org.jfree.util; | 1,768,573 |
//-----------------------------------------------------------------------
public Frequency getOffsetFixing() {
return _offsetFixing;
} | Frequency function() { return _offsetFixing; } | /**
* Gets the offset fixing frequency.
* @return the value of the property
*/ | Gets the offset fixing frequency | getOffsetFixing | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial-types/src/main/java/com/opengamma/financial/security/swap/FloatingInterestRateLeg.java",
"license": "apache-2.0",
"size": 16264
} | [
"com.opengamma.financial.convention.frequency.Frequency"
] | import com.opengamma.financial.convention.frequency.Frequency; | import com.opengamma.financial.convention.frequency.*; | [
"com.opengamma.financial"
] | com.opengamma.financial; | 1,645,611 |
private void verifyListenerValue(VM vm, final MemoryState state, final int value,
final boolean useWaitCriterion) {
vm.invoke(new SerializableCallable() {
private static final long serialVersionUID = 1L; | void function(VM vm, final MemoryState state, final int value, final boolean useWaitCriterion) { vm.invoke(new SerializableCallable() { private static final long serialVersionUID = 1L; | /**
* Verifies that the test listener value on the given vm is what is expected Note that for remote
* events useWaitCriterion must be true. Note also that since off-heap local events are async
* local events must also set useWaitCriterion to true.
*
* @param vm the vm where verification should take plac... | Verifies that the test listener value on the given vm is what is expected Note that for remote events useWaitCriterion must be true. Note also that since off-heap local events are async local events must also set useWaitCriterion to true | verifyListenerValue | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache/management/MemoryThresholdsOffHeapDUnitTest.java",
"license": "apache-2.0",
"size": 74895
} | [
"org.apache.geode.internal.cache.control.MemoryThresholds",
"org.apache.geode.test.dunit.SerializableCallable"
] | import org.apache.geode.internal.cache.control.MemoryThresholds; import org.apache.geode.test.dunit.SerializableCallable; | import org.apache.geode.internal.cache.control.*; import org.apache.geode.test.dunit.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,890,588 |
public com.mozu.api.contracts.reference.CountryWithStatesCollection getCountriesWithStates(String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.reference.CountryWithStatesCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getCountriesWithStatesClient( responseFields);
... | com.mozu.api.contracts.reference.CountryWithStatesCollection function(String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.reference.CountryWithStatesCollection> client = com.mozu.api.clients.platform.ReferenceDataClient.getCountriesWithStatesClient( responseFields); client.setContext(_apiContext... | /**
* Retrieves the entire list of countries that the system supports.
* <p><pre><code>
* ReferenceData referencedata = new ReferenceData();
* CountryWithStatesCollection countryWithStatesCollection = referencedata.getCountriesWithStates( responseFields);
* </code></pre></p>
* @param responseFields A list o... | Retrieves the entire list of countries that the system supports. <code><code> ReferenceData referencedata = new ReferenceData(); CountryWithStatesCollection countryWithStatesCollection = referencedata.getCountriesWithStates( responseFields); </code></code> | getCountriesWithStates | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java",
"license": "mit",
"size": 20912
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,173,855 |
public void removePropertyChangeListener(PropertyChangeListener listener) {
if (listener != null) {
synchronized (this) {
if (changeSupport != null) {
changeSupport.removePropertyChangeListener(listener);
}
}
}
} | void function(PropertyChangeListener listener) { if (listener != null) { synchronized (this) { if (changeSupport != null) { changeSupport.removePropertyChangeListener(listener); } } } } | /**
* Removes a PropertyChangeListener from the listener list. This method
* should be used to remove the PropertyChangeListeners that were
* registered for all bound properties of this class.
* <p>
* If listener is null, no exception is thrown and no action is performed.
*
* @param l... | Removes a PropertyChangeListener from the listener list. This method should be used to remove the PropertyChangeListeners that were registered for all bound properties of this class. If listener is null, no exception is thrown and no action is performed | removePropertyChangeListener | {
"repo_name": "openjdk-mirror/jdk7u-jdk",
"path": "src/share/classes/java/awt/KeyboardFocusManager.java",
"license": "gpl-2.0",
"size": 128306
} | [
"java.beans.PropertyChangeListener"
] | import java.beans.PropertyChangeListener; | import java.beans.*; | [
"java.beans"
] | java.beans; | 2,486,560 |
public void setState(PaxosState.Phase state) {
this.state = state;
} | void function(PaxosState.Phase state) { this.state = state; } | /**
* The Paxos state indicates where in the state machine
* this message was sent.
*/ | The Paxos state indicates where in the state machine this message was sent | setState | {
"repo_name": "jhorey/Paja",
"path": "src/gov/ornl/paja/roles/PaxosMessage.java",
"license": "apache-2.0",
"size": 6852
} | [
"gov.ornl.paja.proto.PaxosState"
] | import gov.ornl.paja.proto.PaxosState; | import gov.ornl.paja.proto.*; | [
"gov.ornl.paja"
] | gov.ornl.paja; | 1,832,925 |
@Override
public Path toPath() {
return Paths.get(toURI());
} | Path function() { return Paths.get(toURI()); } | /**
* Turns the file object into a {@link Path} object.
*
* @return the path object
*/ | Turns the file object into a <code>Path</code> object | toPath | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/core/io/PlaceholderFile.java",
"license": "gpl-3.0",
"size": 38426
} | [
"java.nio.file.Path",
"java.nio.file.Paths"
] | import java.nio.file.Path; import java.nio.file.Paths; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 1,123,885 |
public void setRadioButtonImages(Image selected, Image unselected) {
if (selected == null || unselected == null) {
rButtonImages = null;
} else {
rButtonImages = new Image[]{unselected, selected};
}
} | void function(Image selected, Image unselected) { if (selected == null unselected == null) { rButtonImages = null; } else { rButtonImages = new Image[]{unselected, selected}; } } | /**
* Sets images for radio button selected/unselected modes
*
* @param selected the image to draw in order to represent a selected radio button
* @param unselected the image to draw in order to represent an unselected radio button
*/ | Sets images for radio button selected/unselected modes | setRadioButtonImages | {
"repo_name": "diamonddevgroup/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/plaf/DefaultLookAndFeel.java",
"license": "gpl-2.0",
"size": 108045
} | [
"com.codename1.ui.Image"
] | import com.codename1.ui.Image; | import com.codename1.ui.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 1,693,772 |
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
out.println("<HTML>");
out.... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(STR); PrintWriter out = response.getWriter(); out.println(STR- out.println(STR); out.println(STR); out.println(STR); out.print(STR); out.print(this.getClass()); out.println(STR); out.pr... | /**
* The doPost method of the servlet. <br>
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @... | The doPost method of the servlet. This method is called when a form has its tag value method equals to post | doPost | {
"repo_name": "blueiou/mymovie",
"path": "src/com/servlet/TestServlet.java",
"license": "mit",
"size": 2613
} | [
"java.io.IOException",
"java.io.PrintWriter",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 944,136 |
protected HandlerMethod createHandlerMethod(Object handler, Method method) {
HandlerMethod handlerMethod;
if (handler instanceof String) {
String beanName = (String) handler;
handlerMethod = new HandlerMethod(beanName, getApplicationContext(), method);
}
else {
handlerMethod = new HandlerMethod(hand... | HandlerMethod function(Object handler, Method method) { HandlerMethod handlerMethod; if (handler instanceof String) { String beanName = (String) handler; handlerMethod = new HandlerMethod(beanName, getApplicationContext(), method); } else { handlerMethod = new HandlerMethod(handler, method); } return handlerMethod; } | /**
* Create the HandlerMethod instance.
* @param handler either a bean name or an actual handler instance
* @param method the target method
* @return the created HandlerMethod
*/ | Create the HandlerMethod instance | createHandlerMethod | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-webmvc-4.0/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.java",
"license": "apache-2.0",
"size": 15326
} | [
"java.lang.reflect.Method",
"org.springframework.web.method.HandlerMethod"
] | import java.lang.reflect.Method; import org.springframework.web.method.HandlerMethod; | import java.lang.reflect.*; import org.springframework.web.method.*; | [
"java.lang",
"org.springframework.web"
] | java.lang; org.springframework.web; | 2,560,028 |
protected void sendSensorReading(Event evt) {
sendToChannel(evt, AbstractChannel.RECEIVER);
if (evt.getEventType().equals(SensorReadingEvent.HEART_RATE)){
Log.e("AbstractSensor", "this's heartrate event");
storeHeartRateEvent((HeartRateEvent) evt);
}
}
| void function(Event evt) { sendToChannel(evt, AbstractChannel.RECEIVER); if (evt.getEventType().equals(SensorReadingEvent.HEART_RATE)){ Log.e(STR, STR); storeHeartRateEvent((HeartRateEvent) evt); } } | /**
* Sends an event to the reading channel.
* @param sensor reading
*/ | Sends an event to the reading channel | sendSensorReading | {
"repo_name": "myHealthAssistant-tudarmstadt/myHealthHub",
"path": "src/de/tudarmstadt/dvs/myhealthassistant/myhealthhub/sensormodules/AbstractSensorModule.java",
"license": "gpl-3.0",
"size": 5433
} | [
"android.util.Log",
"de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.AbstractChannel",
"de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.Event",
"de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.sensorreadings.SensorReadingEvent",
"de.tudarmstadt.dvs.myhealthassistant.myhealthhub.event... | import android.util.Log; import de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.AbstractChannel; import de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.Event; import de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.sensorreadings.SensorReadingEvent; import de.tudarmstadt.dvs.myhealthassistant.myh... | import android.util.*; import de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.*; import de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.sensorreadings.*; import de.tudarmstadt.dvs.myhealthassistant.myhealthhub.events.sensorreadings.cardiovascular.*; | [
"android.util",
"de.tudarmstadt.dvs"
] | android.util; de.tudarmstadt.dvs; | 35,146 |
// First decode with inJustDecodeBounds=true to check dimensions
final BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), resourceId, options);
// Calculate inSampleSize
options.inSampleSize = calculateInSampl... | final BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; BitmapFactory.decodeResource(context.getResources(), resourceId, options); options.inSampleSize = calculateInSampleSize(options, reqSideLength, reqSideLength); options.inJustDecodeBounds = false; return new BitmapDrawa... | /**
* Load scaled versions of drawables to save memory, i.e. the main menu button images etc.
* does not need to use 100% size.
* @param resourceId
* @param reqSideLength
* @return Scaled Drawable
*/ | Load scaled versions of drawables to save memory, i.e. the main menu button images etc. does not need to use 100% size | getSquareScaledDrawable | {
"repo_name": "cbedoy/AmazingViews",
"path": "app/src/main/java/cbedoy/amazingviews/utils/ImageScaler.java",
"license": "apache-2.0",
"size": 2106
} | [
"android.graphics.BitmapFactory",
"android.graphics.drawable.BitmapDrawable"
] | import android.graphics.BitmapFactory; import android.graphics.drawable.BitmapDrawable; | import android.graphics.*; import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 1,475,173 |
String name = "testname";
Function function = new SimpleFunction.Builder(name)
.build();
assertEquals(name, function.getName());
} | String name = STR; Function function = new SimpleFunction.Builder(name) .build(); assertEquals(name, function.getName()); } | /**
* Test method for {@link org.gerryai.htn.simple.logic.impl.SimplePredicate#getName()}.
*/ | Test method for <code>org.gerryai.htn.simple.logic.impl.SimplePredicate#getName()</code> | testGetName | {
"repo_name": "purple52/gerryai",
"path": "htn-simple/src/test/java/org/gerryai/htn/simple/logic/impl/SimpleFunctionTest.java",
"license": "agpl-3.0",
"size": 5062
} | [
"org.gerryai.logic.Function",
"org.junit.Assert"
] | import org.gerryai.logic.Function; import org.junit.Assert; | import org.gerryai.logic.*; import org.junit.*; | [
"org.gerryai.logic",
"org.junit"
] | org.gerryai.logic; org.junit; | 2,773,727 |
private void afterCompleted(Canvas canvas) {
canvas.drawCircle(x, y, raduis, loadingPaint);
if (hookCount == HOOK_COUNT - 1) {
e.y = e.y + littleStep;
c.x = c.x - littleStep;
d.x = d.x + littleStep;
d.y = d.y - littleStep;
isCompleted = fal... | void function(Canvas canvas) { canvas.drawCircle(x, y, raduis, loadingPaint); if (hookCount == HOOK_COUNT - 1) { e.y = e.y + littleStep; c.x = c.x - littleStep; d.x = d.x + littleStep; d.y = d.y - littleStep; isCompleted = false; isEnd = true; } else { e.x = x; e.y = y + hookStepY * (hookCount + 1); lengthX = lengthX *... | /**
* the animate after loading
* @param canvas
*/ | the animate after loading | afterCompleted | {
"repo_name": "lgx0955/ArrowDownloadButton",
"path": "library/src/main/java/com/fenjuly/library/ArrowDownloadButton.java",
"license": "mit",
"size": 22526
} | [
"android.graphics.Canvas"
] | import android.graphics.Canvas; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 667,732 |
public static OType getTypeByClass(final Class<?> iClass) {
if (iClass == null)
return null;
for (final OType type : TYPES)
for (int i = 0; i < type.javaTypes.length; ++i) {
if (type.javaTypes[i] == iClass)
return type;
if (type.javaTypes[i] == Array.class && iCl... | static OType function(final Class<?> iClass) { if (iClass == null) return null; for (final OType type : TYPES) for (int i = 0; i < type.javaTypes.length; ++i) { if (type.javaTypes[i] == iClass) return type; if (type.javaTypes[i] == Array.class && iClass.isArray()) return type; } int priority = 0; boolean comparedAtLeas... | /**
* Return the correspondent type by checking the "assignability" of the class received as parameter.
*
* @param iClass
* Class to check
* @return OType instance if found, otherwise null
*/ | Return the correspondent type by checking the "assignability" of the class received as parameter | getTypeByClass | {
"repo_name": "nengxu/OrientDB",
"path": "core/src/main/java/com/orientechnologies/orient/core/metadata/schema/OType.java",
"license": "apache-2.0",
"size": 19647
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,511,376 |
@Override
public void register(SystemStreamPartition systemStreamPartition, String offset) {
LOG.info("Registering ssp {} with starting offset {}", systemStreamPartition, offset);
sspToOffset.put(systemStreamPartition, offset);
} | void function(SystemStreamPartition systemStreamPartition, String offset) { LOG.info(STR, systemStreamPartition, offset); sspToOffset.put(systemStreamPartition, offset); } | /**
* Register a SystemStreamPartition to this SystemConsumer. The SystemConsumer
* should try and read messages from all SystemStreamPartitions that are
* registered to it. SystemStreamPartitions should only be registered before
* start is called.
* @param systemStreamPartition
* The System... | Register a SystemStreamPartition to this SystemConsumer. The SystemConsumer should try and read messages from all SystemStreamPartitions that are registered to it. SystemStreamPartitions should only be registered before start is called | register | {
"repo_name": "fredji97/samza",
"path": "samza-core/src/main/java/org/apache/samza/system/inmemory/InMemorySystemConsumer.java",
"license": "apache-2.0",
"size": 6602
} | [
"org.apache.samza.system.SystemStreamPartition"
] | import org.apache.samza.system.SystemStreamPartition; | import org.apache.samza.system.*; | [
"org.apache.samza"
] | org.apache.samza; | 2,852,257 |
@Nonnull
public java.util.concurrent.CompletableFuture<InferenceClassification> putAsync(@Nonnull final InferenceClassification newInferenceClassification) {
return sendAsync(HttpMethod.PUT, newInferenceClassification);
} | java.util.concurrent.CompletableFuture<InferenceClassification> function(@Nonnull final InferenceClassification newInferenceClassification) { return sendAsync(HttpMethod.PUT, newInferenceClassification); } | /**
* Creates a InferenceClassification with a new object
*
* @param newInferenceClassification the object to create/update
* @return a future with the result
*/ | Creates a InferenceClassification with a new object | putAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/InferenceClassificationRequest.java",
"license": "mit",
"size": 6553
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.InferenceClassification",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.InferenceClassification; import javax.annotation.Nonnull; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,531,385 |
DataSource ds = null;
try {
Context jndiCtx = new InitialContext();
home = (AuditRecordLocalHome) jndiCtx
.lookup("java:comp/env/ejb/AuditRecord");
ds = (DataSource) jndiCtx.lookup("java:comp/env/jdbc/DS");
String envVal = (String) jndiCtx.look... | DataSource ds = null; try { Context jndiCtx = new InitialContext(); home = (AuditRecordLocalHome) jndiCtx .lookup(STR); ds = (DataSource) jndiCtx.lookup(STR); String envVal = (String) jndiCtx.lookup(STR); database = Arrays.asList(DATABASE).indexOf(envVal); if (database == -1) { throw new EJBException( STR + envVal); } ... | /**
* Sets the sessionContext attribute of the QueryAuditRecordBean object
*
* @param sessionContext The new sessionContext value
*/ | Sets the sessionContext attribute of the QueryAuditRecordBean object | setSessionContext | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-arr/tags/DCM4JBOSS_2_7_6/src/java/org/dcm4chex/arr/ejb/session/QueryAuditRecordBean.java",
"license": "apache-2.0",
"size": 18546
} | [
"java.sql.SQLException",
"java.util.Arrays",
"javax.ejb.EJBException",
"javax.naming.Context",
"javax.naming.InitialContext",
"javax.naming.NamingException",
"javax.sql.DataSource",
"org.dcm4chex.arr.ejb.entity.AuditRecordLocalHome"
] | import java.sql.SQLException; import java.util.Arrays; import javax.ejb.EJBException; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; import org.dcm4chex.arr.ejb.entity.AuditRecordLocalHome; | import java.sql.*; import java.util.*; import javax.ejb.*; import javax.naming.*; import javax.sql.*; import org.dcm4chex.arr.ejb.entity.*; | [
"java.sql",
"java.util",
"javax.ejb",
"javax.naming",
"javax.sql",
"org.dcm4chex.arr"
] | java.sql; java.util; javax.ejb; javax.naming; javax.sql; org.dcm4chex.arr; | 2,897,313 |
@Generated
@Selector("initWithTunnelRemoteAddress:")
public native NETunnelNetworkSettings initWithTunnelRemoteAddress(String address); | @Selector(STR) native NETunnelNetworkSettings function(String address); | /**
* initWithTunnelRemoteAddress:
* <p>
* This function initializes a newly-allocated NETunnelNetworkSettings object with a given tunnel remote address.
*
* @param address The address of the remote endpoint that is providing the tunnel service.
*/ | initWithTunnelRemoteAddress: This function initializes a newly-allocated NETunnelNetworkSettings object with a given tunnel remote address | initWithTunnelRemoteAddress | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/networkextension/NETunnelNetworkSettings.java",
"license": "apache-2.0",
"size": 7854
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,931,737 |
public void setMetrics(ClusterMetrics metrics) {
this.metrics = metrics;
} | void function(ClusterMetrics metrics) { this.metrics = metrics; } | /**
* Sets node metrics.
*
* @param metrics Node metrics.
*/ | Sets node metrics | setMetrics | {
"repo_name": "nivanov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/testframework/GridTestNode.java",
"license": "apache-2.0",
"size": 6153
} | [
"org.apache.ignite.cluster.ClusterMetrics"
] | import org.apache.ignite.cluster.ClusterMetrics; | import org.apache.ignite.cluster.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 958,616 |
@PUT
@Path("/enablewarden")
@Produces(MediaType.APPLICATION_JSON)
@Description("Enables warden.")
public Response enableWarden(@Context HttpServletRequest req) {
validatePrivilegedUser(req);
managementService.enableWarden();
return Response.status(Status.OK).build();
} | @Path(STR) @Produces(MediaType.APPLICATION_JSON) @Description(STR) Response function(@Context HttpServletRequest req) { validatePrivilegedUser(req); managementService.enableWarden(); return Response.status(Status.OK).build(); } | /**
* Enables the warden.
*
* @param req The HTTP request.
*
* @return Response object indicating whether the operation was successful or not.
*/ | Enables the warden | enableWarden | {
"repo_name": "jbhatt-salesforce/Warden-Service",
"path": "ArgusWebServices/src/main/java/com/salesforce/dva/argus/ws/resources/ManagementResources.java",
"license": "bsd-3-clause",
"size": 16969
} | [
"com.salesforce.dva.argus.ws.annotation.Description",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import com.salesforce.dva.argus.ws.annotation.Description; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import com.salesforce.dva.argus.ws.annotation.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"com.salesforce.dva",
"javax.servlet",
"javax.ws"
] | com.salesforce.dva; javax.servlet; javax.ws; | 2,234,271 |
private void processMatsMapping(MatsMapping matsMapping, Method method, Object bean) {
if (log.isDebugEnabled()) log.debug(LOG_PREFIX + "Processing @MatsMapping method '"
+ simpleMethodDescription(method) + "':#: Annotation:[" + matsMapping + "]");
// ?: Is the endpointId == ""?
... | void function(MatsMapping matsMapping, Method method, Object bean) { if (log.isDebugEnabled()) log.debug(LOG_PREFIX + STR + simpleMethodDescription(method) + STR + matsMapping + "]"); if (matsMapping.endpointId().equals(STRThe STR is missing endpointId (or 'value')STRThe STR shall not be annotated with @Transactional,S... | /**
* Processes a method annotated with {@link MatsMapping @MatsMapping} - note that one method can have multiple such
* annotations, and this method will be invoked for each of them.
*/ | Processes a method annotated with <code>MatsMapping @MatsMapping</code> - note that one method can have multiple such annotations, and this method will be invoked for each of them | processMatsMapping | {
"repo_name": "stolsvik/mats",
"path": "mats-spring/src/main/java/io/mats3/spring/MatsSpringAnnotationRegistration.java",
"license": "apache-2.0",
"size": 83942
} | [
"io.mats3.MatsEndpoint",
"java.lang.reflect.Method",
"org.springframework.transaction.annotation.Transactional"
] | import io.mats3.MatsEndpoint; import java.lang.reflect.Method; import org.springframework.transaction.annotation.Transactional; | import io.mats3.*; import java.lang.reflect.*; import org.springframework.transaction.annotation.*; | [
"io.mats3",
"java.lang",
"org.springframework.transaction"
] | io.mats3; java.lang; org.springframework.transaction; | 1,792,735 |
public InternetEnum internet() {
return this.internet;
} | InternetEnum function() { return this.internet; } | /**
* Get the internet property: Connectivity to internet is enabled or disabled.
*
* @return the internet value.
*/ | Get the internet property: Connectivity to internet is enabled or disabled | internet | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/fluent/models/PrivateCloudUpdateProperties.java",
"license": "mit",
"size": 5531
} | [
"com.azure.resourcemanager.avs.models.InternetEnum"
] | import com.azure.resourcemanager.avs.models.InternetEnum; | import com.azure.resourcemanager.avs.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 658,508 |
@Override
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
super.tightUnmarshal(wireFormat, o, dataIn, bs);
ConnectionInfo info = (ConnectionInfo) o;
info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wir... | void function(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); ConnectionInfo info = (ConnectionInfo) o; info.setConnectionId((ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); info.setClientId(tightUnmarshalSt... | /**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/ | Un-marshal an object instance from the data input stream | tightUnmarshal | {
"repo_name": "tabish121/OpenWire",
"path": "openwire-core/src/main/java/io/openwire/codec/v9/ConnectionInfoMarshaller.java",
"license": "apache-2.0",
"size": 7584
} | [
"io.openwire.codec.BooleanStream",
"io.openwire.codec.OpenWireFormat",
"io.openwire.commands.BrokerId",
"io.openwire.commands.ConnectionId",
"io.openwire.commands.ConnectionInfo",
"java.io.DataInput",
"java.io.IOException"
] | import io.openwire.codec.BooleanStream; import io.openwire.codec.OpenWireFormat; import io.openwire.commands.BrokerId; import io.openwire.commands.ConnectionId; import io.openwire.commands.ConnectionInfo; import java.io.DataInput; import java.io.IOException; | import io.openwire.codec.*; import io.openwire.commands.*; import java.io.*; | [
"io.openwire.codec",
"io.openwire.commands",
"java.io"
] | io.openwire.codec; io.openwire.commands; java.io; | 1,365,921 |
protected void writeBlockletInfoToFile(List<BlockletInfoColumnar> infoList, FileChannel channel,
String filePath) throws CarbonDataWriterException {
try {
// get the current file position
long currentPosition = channel.size();
CarbonFooterWriter writer = new CarbonFooterWriter(filePath);
... | void function(List<BlockletInfoColumnar> infoList, FileChannel channel, String filePath) throws CarbonDataWriterException { try { long currentPosition = channel.size(); CarbonFooterWriter writer = new CarbonFooterWriter(filePath); FileFooter convertFileMeta = CarbonMetadataUtil .convertFilterFooter2(infoList, localCard... | /**
* This method will write metadata at the end of file file format in thrift format
*/ | This method will write metadata at the end of file file format in thrift format | writeBlockletInfoToFile | {
"repo_name": "JihongMA/incubator-carbondata",
"path": "processing/src/main/java/org/apache/carbondata/processing/store/writer/v2/CarbonFactDataWriterImplV2.java",
"license": "apache-2.0",
"size": 11638
} | [
"java.io.IOException",
"java.nio.channels.FileChannel",
"java.util.List",
"org.apache.carbondata.core.metadata.BlockletInfoColumnar",
"org.apache.carbondata.core.util.CarbonMetadataUtil",
"org.apache.carbondata.core.writer.CarbonFooterWriter",
"org.apache.carbondata.format.FileFooter",
"org.apache.car... | import java.io.IOException; import java.nio.channels.FileChannel; import java.util.List; import org.apache.carbondata.core.metadata.BlockletInfoColumnar; import org.apache.carbondata.core.util.CarbonMetadataUtil; import org.apache.carbondata.core.writer.CarbonFooterWriter; import org.apache.carbondata.format.FileFooter... | import java.io.*; import java.nio.channels.*; import java.util.*; import org.apache.carbondata.core.metadata.*; import org.apache.carbondata.core.util.*; import org.apache.carbondata.core.writer.*; import org.apache.carbondata.format.*; import org.apache.carbondata.processing.store.writer.exception.*; | [
"java.io",
"java.nio",
"java.util",
"org.apache.carbondata"
] | java.io; java.nio; java.util; org.apache.carbondata; | 1,641,874 |
public int countOfTxtsFromEditor()
{
drone.waitForElement(By.cssSelector("button[id$='default-form-cancel-button']"), maxPageLoadingTime);
drone.switchToFrame(IFRAME_ID);
int noOfElements = drone.findAndWaitForElements(By.cssSelector("#tinymce>p")).size();
drone.switchToDefa... | int function() { drone.waitForElement(By.cssSelector(STR), maxPageLoadingTime); drone.switchToFrame(IFRAME_ID); int noOfElements = drone.findAndWaitForElements(By.cssSelector(STR)).size(); drone.switchToDefaultContent(); return noOfElements; } | /**
* return the count of text lines entered in editor.
*
* @return
*/ | return the count of text lines entered in editor | countOfTxtsFromEditor | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/share-po/src/main/java/org/alfresco/po/share/site/document/EditHtmlDocumentPage.java",
"license": "lgpl-3.0",
"size": 4840
} | [
"org.openqa.selenium.By"
] | import org.openqa.selenium.By; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 2,366,864 |
public static BufferedImage getChat() {
return chat;
} | static BufferedImage function() { return chat; } | /**
* Devuelve el sprite del chat. <br>
*
* @return Sprite del chat. <br>
*/ | Devuelve el sprite del chat. | getChat | {
"repo_name": "JavaATR/jrpg-2017b-cliente",
"path": "src/main/resources/recursos/Recursos.java",
"license": "mit",
"size": 38422
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,158,727 |
public void setCountry(String country) throws ProcessException {
if (country == null) {
if (this.country != null) {
this.country = country;
this.lastQuery = System.currentTimeMillis();
// Atualiza flag de atualização.
CHANGED = true... | void function(String country) throws ProcessException { if (country == null) { if (this.country != null) { this.country = country; this.lastQuery = System.currentTimeMillis(); CHANGED = true; } } else if (!country.equals(this.country)) { this.country = country; this.lastQuery = System.currentTimeMillis(); CHANGED = tru... | /**
* Altera o pais da pessoa.
* @param country o novo pais da pessoa.
* @throws ProcessException se houver falha no processamento.
*/ | Altera o pais da pessoa | setCountry | {
"repo_name": "robertol/SPFBL",
"path": "src/net/spfbl/whois/Handle.java",
"license": "gpl-3.0",
"size": 13315
} | [
"net.spfbl.core.ProcessException"
] | import net.spfbl.core.ProcessException; | import net.spfbl.core.*; | [
"net.spfbl.core"
] | net.spfbl.core; | 1,146,820 |
T actionGet(long timeout, TimeUnit unit) throws ElasticSearchException; | T actionGet(long timeout, TimeUnit unit) throws ElasticSearchException; | /**
* Similar to {@link #get(long, java.util.concurrent.TimeUnit)}, just wrapping the {@link InterruptedException} with
* {@link org.elasticsearch.ElasticSearchInterruptedException}, and throwing the actual
* cause of the {@link java.util.concurrent.ExecutionException}.
* <p/>
* <p>Note, the ac... | Similar to <code>#get(long, java.util.concurrent.TimeUnit)</code>, just wrapping the <code>InterruptedException</code> with <code>org.elasticsearch.ElasticSearchInterruptedException</code>, and throwing the actual cause of the <code>java.util.concurrent.ExecutionException</code>. Note, the actual cause is unwrapped to ... | actionGet | {
"repo_name": "Kreolwolf1/Elastic",
"path": "src/main/java/org/elasticsearch/action/ActionFuture.java",
"license": "apache-2.0",
"size": 4418
} | [
"java.util.concurrent.TimeUnit",
"org.elasticsearch.ElasticSearchException"
] | import java.util.concurrent.TimeUnit; import org.elasticsearch.ElasticSearchException; | import java.util.concurrent.*; import org.elasticsearch.*; | [
"java.util",
"org.elasticsearch"
] | java.util; org.elasticsearch; | 541,239 |
Observable<ServiceResponse<Void>> putSmallDecimalWithServiceResponseAsync(BigDecimal numberBody); | Observable<ServiceResponse<Void>> putSmallDecimalWithServiceResponseAsync(BigDecimal numberBody); | /**
* Put small decimal value 2.5976931e-101.
*
* @param numberBody the BigDecimal value
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
*/ | Put small decimal value 2.5976931e-101 | putSmallDecimalWithServiceResponseAsync | {
"repo_name": "sergey-shandar/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodynumber/Numbers.java",
"license": "mit",
"size": 34974
} | [
"com.microsoft.rest.ServiceResponse",
"java.math.BigDecimal"
] | import com.microsoft.rest.ServiceResponse; import java.math.BigDecimal; | import com.microsoft.rest.*; import java.math.*; | [
"com.microsoft.rest",
"java.math"
] | com.microsoft.rest; java.math; | 1,632,934 |
public static synchronized void clear() {
Log.getLogWriter().info("Clearing DeltaObserver saved data");
toDeltaKeys = new ArrayList();
fromDeltaKeys = new ArrayList();
hasDeltaKeys = new ArrayList();
currentReferences = new HashMap();
} | static synchronized void function() { Log.getLogWriter().info(STR); toDeltaKeys = new ArrayList(); fromDeltaKeys = new ArrayList(); hasDeltaKeys = new ArrayList(); currentReferences = new HashMap(); } | /** Clear the saved lists.
*/ | Clear the saved lists | clear | {
"repo_name": "papicella/snappy-store",
"path": "tests/core/src/main/java/delta/DeltaObserver.java",
"license": "apache-2.0",
"size": 5329
} | [
"java.util.ArrayList",
"java.util.HashMap"
] | import java.util.ArrayList; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,128,612 |
private void searchLeaf(LeafReaderContext ctx, Weight weight, Collector collector) throws IOException {
cancellable.checkCancelled();
weight = wrapWeight(weight);
final LeafCollector leafCollector;
try {
leafCollector = collector.getLeafCollector(ctx);
} catch (Co... | void function(LeafReaderContext ctx, Weight weight, Collector collector) throws IOException { cancellable.checkCancelled(); weight = wrapWeight(weight); final LeafCollector leafCollector; try { leafCollector = collector.getLeafCollector(ctx); } catch (CollectionTerminatedException e) { return; } Bits liveDocs = ctx.rea... | /**
* Lower-level search API.
*
* {@link LeafCollector#collect(int)} is called for every matching document in
* the provided <code>ctx</code>.
*/ | Lower-level search API. <code>LeafCollector#collect(int)</code> is called for every matching document in the provided <code>ctx</code> | searchLeaf | {
"repo_name": "ern/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/search/internal/ContextIndexSearcher.java",
"license": "apache-2.0",
"size": 13813
} | [
"java.io.IOException",
"org.apache.lucene.index.LeafReaderContext",
"org.apache.lucene.search.BulkScorer",
"org.apache.lucene.search.CollectionTerminatedException",
"org.apache.lucene.search.Collector",
"org.apache.lucene.search.LeafCollector",
"org.apache.lucene.search.Scorer",
"org.apache.lucene.sea... | import java.io.IOException; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.BulkScorer; import org.apache.lucene.search.CollectionTerminatedException; import org.apache.lucene.search.Collector; import org.apache.lucene.search.LeafCollector; import org.apache.lucene.search.Scorer; impor... | import java.io.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.lucene.util.*; | [
"java.io",
"org.apache.lucene"
] | java.io; org.apache.lucene; | 1,658,103 |
public final MetaProperty<List<U>> typeUList() {
return typeUList;
} | final MetaProperty<List<U>> function() { return typeUList; } | /**
* The meta-property for the {@code typeUList} property.
* @return the meta-property, not null
*/ | The meta-property for the typeUList property | typeUList | {
"repo_name": "JodaOrg/joda-beans",
"path": "src/test/java/org/joda/beans/sample/DoubleGenericsNoExtendsNoSuper.java",
"license": "apache-2.0",
"size": 19531
} | [
"java.util.List",
"org.joda.beans.MetaProperty"
] | import java.util.List; import org.joda.beans.MetaProperty; | import java.util.*; import org.joda.beans.*; | [
"java.util",
"org.joda.beans"
] | java.util; org.joda.beans; | 1,113,743 |
public ApplicationGatewayBackendHealthPool withBackendHttpSettingsCollection(List<ApplicationGatewayBackendHealthHttpSettings> backendHttpSettingsCollection) {
this.backendHttpSettingsCollection = backendHttpSettingsCollection;
return this;
} | ApplicationGatewayBackendHealthPool function(List<ApplicationGatewayBackendHealthHttpSettings> backendHttpSettingsCollection) { this.backendHttpSettingsCollection = backendHttpSettingsCollection; return this; } | /**
* Set the backendHttpSettingsCollection value.
*
* @param backendHttpSettingsCollection the backendHttpSettingsCollection value to set
* @return the ApplicationGatewayBackendHealthPool object itself.
*/ | Set the backendHttpSettingsCollection value | withBackendHttpSettingsCollection | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHealthPool.java",
"license": "mit",
"size": 2452
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 734,983 |
public DenseLargeFComplexMatrix3D getIfft2Slices(final boolean scale) {
if (fft2Slices == null) {
fft2Slices = new FloatFFT_2D(rows, columns);
}
final DenseLargeFComplexMatrix3D C = new DenseLargeFComplexMatrix3D(slices, rows, columns);
final float[][][] cElems = C.e... | DenseLargeFComplexMatrix3D function(final boolean scale) { if (fft2Slices == null) { fft2Slices = new FloatFFT_2D(rows, columns); } final DenseLargeFComplexMatrix3D C = new DenseLargeFComplexMatrix3D(slices, rows, columns); final float[][][] cElems = C.elements(); int nthreads = ConcurrencyUtils.getNumberOfThreads(); i... | /**
* Returns new complex matrix which is the 2D inverse of the discrete
* Fourier transform (IDFT) of each slice of this matrix.
*
* @param scale
* if true then scaling is performed
*
* @return the 2D inverse of the discrete Fourier transform (IDFT) of each
... | Returns new complex matrix which is the 2D inverse of the discrete Fourier transform (IDFT) of each slice of this matrix | getIfft2Slices | {
"repo_name": "Shappiro/GEOFRAME",
"path": "PROJECTS/oms3.proj.richards1d/src/JAVA/parallelcolt-code/src/cern/colt/matrix/tfloat/impl/DenseLargeFloatMatrix3D.java",
"license": "gpl-3.0",
"size": 32669
} | [
"edu.emory.mathcs.utils.ConcurrencyUtils",
"java.util.concurrent.Future"
] | import edu.emory.mathcs.utils.ConcurrencyUtils; import java.util.concurrent.Future; | import edu.emory.mathcs.utils.*; import java.util.concurrent.*; | [
"edu.emory.mathcs",
"java.util"
] | edu.emory.mathcs; java.util; | 958,971 |
@Override
public void write(final byte b[], final int off, final int len) throws IOException
{
checkThreshold(len);
getStream().write(b, off, len);
written += len;
} | void function(final byte b[], final int off, final int len) throws IOException { checkThreshold(len); getStream().write(b, off, len); written += len; } | /**
* Writes <code>len</code> bytes from the specified byte array starting at
* offset <code>off</code> to this output stream.
*
* @param b The byte array from which the data will be written.
* @param off The start offset in the byte array.
* @param len The number of bytes to write.
... | Writes <code>len</code> bytes from the specified byte array starting at offset <code>off</code> to this output stream | write | {
"repo_name": "jankill/commons-io",
"path": "src/main/java/org/apache/commons/io/output/ThresholdingOutputStream.java",
"license": "apache-2.0",
"size": 7566
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,385,254 |
public void setEntityResolver(XMLEntityResolver entityResolver) {
if (fEntityResolver != entityResolver) {
// Overflow. We actually need to reset the
// modCount on every XMLGrammarLoaderContainer.
if (++fModCount < 0) {
clearModCounts();
... | void function(XMLEntityResolver entityResolver) { if (fEntityResolver != entityResolver) { if (++fModCount < 0) { clearModCounts(); } fEntityResolver = entityResolver; } } | /**
* Sets the entity resolver.
*
* @param entityResolver The new entity resolver.
*/ | Sets the entity resolver | setEntityResolver | {
"repo_name": "AaronZhangL/SplitCharater",
"path": "xerces-2_11_0/src/org/apache/xerces/parsers/XMLGrammarPreparser.java",
"license": "gpl-2.0",
"size": 15426
} | [
"org.apache.xerces.xni.parser.XMLEntityResolver"
] | import org.apache.xerces.xni.parser.XMLEntityResolver; | import org.apache.xerces.xni.parser.*; | [
"org.apache.xerces"
] | org.apache.xerces; | 582,894 |
protected IndexShard newShard(ShardId shardId, boolean primary, IndexingOperationListener... listeners) throws IOException {
ShardRouting shardRouting = TestShardRouting.newShardRouting(shardId, randomAlphaOfLength(5), primary,
ShardRoutingState.INITIALIZING,
primary ? RecoverySource... | IndexShard function(ShardId shardId, boolean primary, IndexingOperationListener... listeners) throws IOException { ShardRouting shardRouting = TestShardRouting.newShardRouting(shardId, randomAlphaOfLength(5), primary, ShardRoutingState.INITIALIZING, primary ? RecoverySource.EmptyStoreRecoverySource.INSTANCE : RecoveryS... | /**
* creates a new initializing shard. The shard will have its own unique data path.
*
* @param shardId the shard id to use
* @param primary indicates whether to a primary shard (ready to recover from an empty store) or a replica
* (ready to recover from another shard)
... | creates a new initializing shard. The shard will have its own unique data path | newShard | {
"repo_name": "HonzaKral/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java",
"license": "apache-2.0",
"size": 44064
} | [
"java.io.IOException",
"org.elasticsearch.cluster.routing.RecoverySource",
"org.elasticsearch.cluster.routing.ShardRouting",
"org.elasticsearch.cluster.routing.ShardRoutingState",
"org.elasticsearch.cluster.routing.TestShardRouting",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.index... | import java.io.IOException; import org.elasticsearch.cluster.routing.RecoverySource; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.cluster.routing.TestShardRouting; import org.elasticsearch.common.settings.Settings; import org... | import java.io.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.index.engine.*; | [
"java.io",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index"
] | java.io; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; | 1,845,819 |
@Override
public User updateStatus(
long userId, int status, ServiceContext serviceContext)
throws PortalException, SystemException {
User user = userPersistence.findByPrimaryKey(userId);
if ((status == WorkflowConstants.STATUS_APPROVED) &&
(user.getStatus() != WorkflowConstants.STATUS_APPROVED)) {
... | User function( long userId, int status, ServiceContext serviceContext) throws PortalException, SystemException { User user = userPersistence.findByPrimaryKey(userId); if ((status == WorkflowConstants.STATUS_APPROVED) && (user.getStatus() != WorkflowConstants.STATUS_APPROVED)) { validateCompanyMaxUsers(user.getCompanyId... | /**
* Updates the user's workflow status.
*
* @param userId the primary key of the user
* @param status the user's new workflow status
* @param serviceContext the service context to be applied. You can specify
* an unencrypted custom password (used by an LDAP listener) for the
* user vi... | Updates the user's workflow status | updateStatus | {
"repo_name": "jtydhr88/blade.tools",
"path": "blade.migrate.liferay70/projects/filetests/ContactNameExceptionImport.java",
"license": "apache-2.0",
"size": 193517
} | [
"com.liferay.portal.kernel.exception.PortalException",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.Validator",
"com.liferay.portal.kernel.workflow.WorkflowConstants",
"com.liferay.portal.model.User",
"com.liferay.portal.service.ServiceContext"
] | import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.Validator; import com.liferay.portal.kernel.workflow.WorkflowConstants; import com.liferay.portal.model.User; import com.liferay.portal.service.ServiceContext; | import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; import com.liferay.portal.kernel.workflow.*; import com.liferay.portal.model.*; import com.liferay.portal.service.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 1,568,625 |
public Update set(final Expression... exps) {
this.columns.addAll(Arrays.asList(exps));
return this;
} | Update function(final Expression... exps) { this.columns.addAll(Arrays.asList(exps)); return this; } | /**
* The set keyword.
*
* @param exps The expressions.
* @return This expression.
*/ | The set keyword | set | {
"repo_name": "feedzai/pdb",
"path": "src/main/java/com/feedzai/commons/sql/abstraction/dml/Update.java",
"license": "apache-2.0",
"size": 3582
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 934,151 |
public void post() throws ClientException {
this.send(HttpMethod.POST, body);
} | void function() throws ClientException { this.send(HttpMethod.POST, body); } | /**
* Creates the CallTransfer
*
* @throws ClientException an exception occurs if there was an error while the request was sent
*/ | Creates the CallTransfer | post | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/CallTransferRequest.java",
"license": "mit",
"size": 2073
} | [
"com.microsoft.graph.core.ClientException",
"com.microsoft.graph.http.HttpMethod"
] | import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; | import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 330,937 |
public void setSearchFilter(String searchFilter) {
if (!m_metadata.isSearchable()) {
return;
}
if (searchFilter == null) {
searchFilter = "";
}
m_searchFilter = searchFilter;
boolean showAll = CmsStringUtil.isNotEmptyOrWhitespaceOnly(m_searchF... | void function(String searchFilter) { if (!m_metadata.isSearchable()) { return; } if (searchFilter == null) { searchFilter = STR"; if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(sCol)) { CmsListOrderEnum order = getCurrentSortOrder(); setSortedColumn(sCol); if (order == CmsListOrderEnum.ORDER_DESCENDING) { setSortedColumn... | /**
* Sets the search filter.<p>
*
* @param searchFilter the search filter to set
*/ | Sets the search filter | setSearchFilter | {
"repo_name": "serrapos/opencms-core",
"path": "src/org/opencms/workplace/list/CmsHtmlList.java",
"license": "lgpl-2.1",
"size": 37115
} | [
"org.opencms.util.CmsStringUtil"
] | import org.opencms.util.CmsStringUtil; | import org.opencms.util.*; | [
"org.opencms.util"
] | org.opencms.util; | 2,559,579 |
public static String stringOfChar(char ch, int count) {
StringBuffer buf = new StringBuffer();
for (int i = 0; i < count; i++) {
buf.append(ch);
}
return buf.toString();
}
private int outputDimension = 2;
private DecimalFormat formatter;
private boolean... | static String function(char ch, int count) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < count; i++) { buf.append(ch); } return buf.toString(); } private int outputDimension = 2; private DecimalFormat formatter; private boolean isFormatted = false; private boolean useFormatting = false; private int coord... | /**
* Returns a <code>String</code> of repeated characters.
*
* @param ch the character to repeat
* @param count the number of times to repeat the character
* @return a <code>String</code> of characters
*/ | Returns a <code>String</code> of repeated characters | stringOfChar | {
"repo_name": "geotools/geotools",
"path": "modules/library/main/src/main/java/org/geotools/geometry/jts/WKTWriter2.java",
"license": "lgpl-2.1",
"size": 30217
} | [
"java.text.DecimalFormat"
] | import java.text.DecimalFormat; | import java.text.*; | [
"java.text"
] | java.text; | 1,266,799 |
EReference getFnCallExpr_Args(); | EReference getFnCallExpr_Args(); | /**
* Returns the meta object for the containment reference list '{@link com.rockwellcollins.atc.agree.agree.FnCallExpr#getArgs <em>Args</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Args</em>'.
* @see com.rockwellcollins.atc.agree.... | Returns the meta object for the containment reference list '<code>com.rockwellcollins.atc.agree.agree.FnCallExpr#getArgs Args</code>'. | getFnCallExpr_Args | {
"repo_name": "smaccm/smaccm",
"path": "fm-workbench/agree/com.rockwellcollins.atc.agree/src-gen/com/rockwellcollins/atc/agree/agree/AgreePackage.java",
"license": "bsd-3-clause",
"size": 292940
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,185,980 |
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
//this.setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity);
this.bipedHead.render(par7);
this.bipedBody.render(par7);
this.bipedRightArm.render(par7);
this.bipedLeftArm.render(par... | void function(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { this.bipedHead.render(par7); this.bipedBody.render(par7); this.bipedRightArm.render(par7); this.bipedLeftArm.render(par7); this.bipedRightLeg.render(par7); this.bipedLeftLeg.render(par7); this.bipedHeadwear.render... | /**
* Sets the models various rotation angles then renders the model.
*/ | Sets the models various rotation angles then renders the model | render | {
"repo_name": "NuenoB/OpenBlocks_UCHILE",
"path": "src/openblocks/client/model/ModelAttackingTree.java",
"license": "gpl-3.0",
"size": 3158
} | [
"net.minecraft.entity.Entity"
] | import net.minecraft.entity.Entity; | import net.minecraft.entity.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 1,726,804 |
public SubResource backendHttpSettings() {
return this.backendHttpSettings;
} | SubResource function() { return this.backendHttpSettings; } | /**
* Get backend http settings resource of URL path map path rule.
*
* @return the backendHttpSettings value
*/ | Get backend http settings resource of URL path map path rule | backendHttpSettings | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/network/v2020_06_01/ApplicationGatewayPathRule.java",
"license": "mit",
"size": 7089
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,817,404 |
public static Map<Float, List<Point2D.Float>> dbconnection(
final String connector) {
Map<Float, List<Point2D.Float>> coordinates = null;
try {
Connection conn = DriverManager.getConnection(connector);
Statement statement = conn.createStatement();
... | static Map<Float, List<Point2D.Float>> function( final String connector) { Map<Float, List<Point2D.Float>> coordinates = null; try { Connection conn = DriverManager.getConnection(connector); Statement statement = conn.createStatement(); coordinates = retriveData(statement.executeQuery(QUERY)); statement.close(); conn.c... | /**
* Method connecting to database and gets the data needed to perform the
* Plain algorithm
*
* @param connector
* @return The Map with coordinates in 2D space with key which is result of
* function z = f(x,y).
*/ | Method connecting to database and gets the data needed to perform the Plain algorithm | dbconnection | {
"repo_name": "M4GiK/ztp-projects",
"path": "Plain/Main.java",
"license": "mit",
"size": 3238
} | [
"java.awt.geom.Point2D",
"java.sql.Connection",
"java.sql.DriverManager",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.List",
"java.util.Map"
] | import java.awt.geom.Point2D; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.List; import java.util.Map; | import java.awt.geom.*; import java.sql.*; import java.util.*; | [
"java.awt",
"java.sql",
"java.util"
] | java.awt; java.sql; java.util; | 681,945 |
public static void setCacheColorHintSafely(ListView lv, int hint) {
try {
lv.setCacheColorHint(hint);
} catch (IndexOutOfBoundsException e) {
// Ignore
System.out.println("Android Bug avoided");
}
}
| static void function(ListView lv, int hint) { try { lv.setCacheColorHint(hint); } catch (IndexOutOfBoundsException e) { System.out.println(STR); } } | /**
* Call setCacheColorHint on a listview and trap IndexOutOfBoundsException.
*
* There is a bug in Android 2.2-2.3 (approx) that causes this call to throw
* exceptions *sometimes* (circumstances unclear):
*
* http://code.google.com/p/android/issues/detail?id=9775
*
* Ideally this code... | Call setCacheColorHint on a listview and trap IndexOutOfBoundsException. There is a bug in Android 2.2-2.3 (approx) that causes this call to throw exceptions *sometimes* (circumstances unclear): HREF Ideally this code should use reflection to set it, or check android versions | setCacheColorHintSafely | {
"repo_name": "eleybourn/Book-Catalogue",
"path": "src/com/eleybourn/bookcatalogue/utils/Utils.java",
"license": "gpl-3.0",
"size": 70928
} | [
"android.widget.ListView"
] | import android.widget.ListView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,492,943 |
protected void bind(final IOSession session) {
Args.notNull(session, "I/O session");
this.session.setBufferStatus(null);
setSession(session);
}
| void function(final IOSession session) { Args.notNull(session, STR); this.session.setBufferStatus(null); setSession(session); } | /**
* Binds the connection to a different {@link IOSession}. This may be necessary
* when the underlying I/O session gets upgraded with SSL/TLS encryption.
*
* @since 4.2
*/ | Binds the connection to a different <code>IOSession</code>. This may be necessary when the underlying I/O session gets upgraded with SSL/TLS encryption | bind | {
"repo_name": "vuzzan/openclinic",
"path": "src/org/apache/http/impl/nio/NHttpConnectionBase.java",
"license": "apache-2.0",
"size": 21170
} | [
"org.apache.http.nio.reactor.IOSession",
"org.apache.http.util.Args"
] | import org.apache.http.nio.reactor.IOSession; import org.apache.http.util.Args; | import org.apache.http.nio.reactor.*; import org.apache.http.util.*; | [
"org.apache.http"
] | org.apache.http; | 2,580,915 |
private static long getMethodHash(Method method) {
return methodToHash_Maps.get(method.getDeclaringClass()).get(method);
}
private static class MethodToHash_Maps
extends WeakClassHashMap<Map<Method,Long>>
{
MethodToHash_Maps() {} | static long function(Method method) { return methodToHash_Maps.get(method.getDeclaringClass()).get(method); } private static class MethodToHash_Maps extends WeakClassHashMap<Map<Method,Long>> { MethodToHash_Maps() {} | /**
* Returns the method hash for the specified method. Subsequent calls
* to "getMethodHash" passing the same method argument should be faster
* since this method caches internally the result of the method to
* method hash mapping. The method hash is calculated using the
* "computeMethodHash... | Returns the method hash for the specified method. Subsequent calls to "getMethodHash" passing the same method argument should be faster since this method caches internally the result of the method to method hash mapping. The method hash is calculated using the "computeMethodHash" method | getMethodHash | {
"repo_name": "universsky/openjdk",
"path": "jdk/src/java.rmi/share/classes/java/rmi/server/RemoteObjectInvocationHandler.java",
"license": "gpl-2.0",
"size": 10958
} | [
"java.lang.reflect.Method",
"java.util.Map"
] | import java.lang.reflect.Method; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 1,250,998 |
protected void setAtlas(Atlas atlas) {
this.atlas = atlas;
setSprite(sprite);
} | void function(Atlas atlas) { this.atlas = atlas; setSprite(sprite); } | /**
* Set entity sprite atlas
*
* @param atlas to set
*/ | Set entity sprite atlas | setAtlas | {
"repo_name": "IonAgorria/Ouroboros",
"path": "src/com/agorria/ouroboros/simulation/entity/Entity.java",
"license": "gpl-3.0",
"size": 50202
} | [
"com.agorria.ouroboros.core.Atlas"
] | import com.agorria.ouroboros.core.Atlas; | import com.agorria.ouroboros.core.*; | [
"com.agorria.ouroboros"
] | com.agorria.ouroboros; | 1,074,396 |
public void setDocentes(Set<Docente> docentes) {
this.docentes = docentes;
} | void function(Set<Docente> docentes) { this.docentes = docentes; } | /**
* Define o conjunto de docentes que desenvolvem atividades no curso.
* @param docentes Conjunto de docentes do curso.
*/ | Define o conjunto de docentes que desenvolvem atividades no curso | setDocentes | {
"repo_name": "praticaes/muralCentralUFG",
"path": "src/main/java/br/ufg/inf/fabrica/muralufg/central/organizacao/Curso.java",
"license": "cc0-1.0",
"size": 5354
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 701,527 |
public boolean accept(ClusterMessage msg) {
return (msg instanceof SessionMessage);
}
| boolean function(ClusterMessage msg) { return (msg instanceof SessionMessage); } | /**
* Accept only SessionMessage
*
* @param msg
* ClusterMessage
* @return boolean - returns true to indicate that messageReceived should be
* invoked. If false is returned, the messageReceived method will
* not be invoked.
*/ | Accept only SessionMessage | accept | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-tomcat-6.0.48/java/org/apache/catalina/ha/session/ClusterSessionListener.java",
"license": "apache-2.0",
"size": 4719
} | [
"org.apache.catalina.ha.ClusterMessage"
] | import org.apache.catalina.ha.ClusterMessage; | import org.apache.catalina.ha.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,525,745 |
public static HighlightBuilder highlight() {
return new HighlightBuilder();
}
private QueryBuilder queryBuilder;
private BytesReference queryBinary;
private FilterBuilder filterBuilder;
private BytesReference filterBinary;
private int from = -1;
private int size = -1;
... | static HighlightBuilder function() { return new HighlightBuilder(); } QueryBuilder queryBuilder; private BytesReference queryBinary; private FilterBuilder filterBuilder; private BytesReference filterBinary; private int from = -1; private int size = -1; private Boolean explain; private Boolean version; private List<Sort... | /**
* A static factory method to construct new search highlights.
*/ | A static factory method to construct new search highlights | highlight | {
"repo_name": "exercitussolus/yolo",
"path": "src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "agpl-3.0",
"size": 27772
} | [
"gnu.trove.map.hash.TObjectFloatHashMap",
"java.util.List",
"org.elasticsearch.common.bytes.BytesReference",
"org.elasticsearch.index.query.FilterBuilder",
"org.elasticsearch.index.query.QueryBuilder",
"org.elasticsearch.search.facet.FacetBuilder",
"org.elasticsearch.search.fetch.source.FetchSourceConte... | import gnu.trove.map.hash.TObjectFloatHashMap; import java.util.List; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.index.query.FilterBuilder; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.search.facet.FacetBuilder; import org.elasticsearch.search.fetch.sou... | import gnu.trove.map.hash.*; import java.util.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.index.query.*; import org.elasticsearch.search.facet.*; import org.elasticsearch.search.fetch.source.*; import org.elasticsearch.search.highlight.*; import org.elasticsearch.search.rescore.*; import org.el... | [
"gnu.trove.map",
"java.util",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.search"
] | gnu.trove.map; java.util; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.search; | 967,155 |
protected void addTitlePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_DirectedTopoSolidPropertyType_title_feature"),
getString("_UI_Propert... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), GmlPackage.eINSTANCE.getDirectedTopoSolidPropertyType_Title(), true, false, false, ItemPropertyDe... | /**
* This adds a property descriptor for the Title feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Title feature. | addTitlePropertyDescriptor | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/DirectedTopoSolidPropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 13457
} | [
"net.opengis.gml.GmlPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import net.opengis.gml.GmlPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import net.opengis.gml.*; import org.eclipse.emf.edit.provider.*; | [
"net.opengis.gml",
"org.eclipse.emf"
] | net.opengis.gml; org.eclipse.emf; | 1,278,639 |
public void setPriceReimbursed (BigDecimal PriceReimbursed)
{
set_Value (COLUMNNAME_PriceReimbursed, PriceReimbursed);
} | void function (BigDecimal PriceReimbursed) { set_Value (COLUMNNAME_PriceReimbursed, PriceReimbursed); } | /** Set Price Reimbursed.
@param PriceReimbursed
The reimbursed price (in currency of the employee's AP price list)
*/ | Set Price Reimbursed | setPriceReimbursed | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "adempiere_360/base/src/org/compiere/model/X_S_TimeExpenseLine.java",
"license": "gpl-2.0",
"size": 20033
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 945,517 |
public int loadTable(final Table t, final byte[][] f) throws IOException {
return loadTable(t, f, null);
} | int function(final Table t, final byte[][] f) throws IOException { return loadTable(t, f, null); } | /**
* Load table of multiple column families with rows from 'aaa' to 'zzz'.
* @param t Table
* @param f Array of Families to load
* @return Count of rows loaded.
* @throws IOException
*/ | Load table of multiple column families with rows from 'aaa' to 'zzz' | loadTable | {
"repo_name": "SeekerResource/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 145665
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.Table"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.Table; | import java.io.*; import org.apache.hadoop.hbase.client.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 16,756 |
protected PathConstraint createPathConstraint(PathConstraint pathConstraint, String newPath) {
PathConstraint newPathConstraint = null;
ConstraintOp op = pathConstraint.getOp();
if (pathConstraint instanceof PathConstraintAttribute) {
newPathConstraint = new PathConstraintAttribu... | PathConstraint function(PathConstraint pathConstraint, String newPath) { PathConstraint newPathConstraint = null; ConstraintOp op = pathConstraint.getOp(); if (pathConstraint instanceof PathConstraintAttribute) { newPathConstraint = new PathConstraintAttribute(newPath, op, ((PathConstraintAttribute) pathConstraint).get... | /**
* Create a pathconstraint with the same operator and value of path contraint given in input
* and with the path given in input
* @param pathConstraint the source path contraint
* @param newPath the new path
* @return the path constraint created
*/ | Create a pathconstraint with the same operator and value of path contraint given in input and with the path given in input | createPathConstraint | {
"repo_name": "elsiklab/intermine",
"path": "intermine/api/main/src/org/intermine/api/profile/PathQueryUpdate.java",
"license": "lgpl-2.1",
"size": 9369
} | [
"org.intermine.metadata.ConstraintOp",
"org.intermine.pathquery.PathConstraint",
"org.intermine.pathquery.PathConstraintAttribute",
"org.intermine.pathquery.PathConstraintBag",
"org.intermine.pathquery.PathConstraintLookup",
"org.intermine.pathquery.PathConstraintLoop",
"org.intermine.pathquery.PathCons... | import org.intermine.metadata.ConstraintOp; import org.intermine.pathquery.PathConstraint; import org.intermine.pathquery.PathConstraintAttribute; import org.intermine.pathquery.PathConstraintBag; import org.intermine.pathquery.PathConstraintLookup; import org.intermine.pathquery.PathConstraintLoop; import org.intermin... | import org.intermine.metadata.*; import org.intermine.pathquery.*; | [
"org.intermine.metadata",
"org.intermine.pathquery"
] | org.intermine.metadata; org.intermine.pathquery; | 2,279,441 |
public static String[] toStringArray(ArrayList<String> src) {
String[] ret = new String[src.size()];
return src.toArray(ret);
} | static String[] function(ArrayList<String> src) { String[] ret = new String[src.size()]; return src.toArray(ret); } | /**
* Parses {@code ArrayList<String>} into {@code String[]}.
*
* @param src is the ArrayList of strings
* @return an array of strings
*/ | Parses ArrayList into String[] | toStringArray | {
"repo_name": "EvilMcJerkface/alluxio",
"path": "core/common/src/main/java/alluxio/util/CommonUtils.java",
"license": "apache-2.0",
"size": 29883
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,033,188 |
List<String> getMountPoints(String path) throws IOException; | List<String> getMountPoints(String path) throws IOException; | /**
* Get a list of mount points for a path. Results are from the mount table
* cache.
*
* @param path Path to get the mount points under.
* @return List of mount points present at this path. Return zero-length
* list if the path is a mount point but there are no mount points
* unde... | Get a list of mount points for a path. Results are from the mount table cache | getMountPoints | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/FileSubclusterResolver.java",
"license": "apache-2.0",
"size": 3129
} | [
"java.io.IOException",
"java.util.List"
] | import java.io.IOException; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 391,880 |
protected int countRowsInTable(String tableName) {
return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName);
} | int function(String tableName) { return JdbcTestUtils.countRowsInTable(this.jdbcTemplate, tableName); } | /**
* Convenience method for counting the rows in the given table.
* @param tableName table name to count rows in
* @return the number of rows in the table
* @see JdbcTestUtils#countRowsInTable
*/ | Convenience method for counting the rows in the given table | countRowsInTable | {
"repo_name": "leogoing/spring_jeesite",
"path": "spring-test-4.0/org/springframework/test/context/testng/AbstractTransactionalTestNGSpringContextTests.java",
"license": "apache-2.0",
"size": 7845
} | [
"org.springframework.test.jdbc.JdbcTestUtils"
] | import org.springframework.test.jdbc.JdbcTestUtils; | import org.springframework.test.jdbc.*; | [
"org.springframework.test"
] | org.springframework.test; | 1,797,011 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.