method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static BigdataSailRepository open(final Properties props) {
if (props.getProperty(Journal.Options.FILE) == null) {
throw new IllegalArgumentException();
}
final BigdataSail sail = new BigdataSail(props);
final BigdataSailRepository repo = new BigdataSailRe... | static BigdataSailRepository function(final Properties props) { if (props.getProperty(Journal.Options.FILE) == null) { throw new IllegalArgumentException(); } final BigdataSail sail = new BigdataSail(props); final BigdataSailRepository repo = new BigdataSailRepository(sail); Code.wrapThrow(() -> repo.initialize()); ret... | /**
* Open and initialize a BigdataSailRepository using the supplied config
* properties. You must specify a journal file in the properties.
*
* @param props
* config properties
* @return
* an open and initialized repository
*/ | Open and initialize a BigdataSailRepository using the supplied config properties. You must specify a journal file in the properties | open | {
"repo_name": "blazegraph/tinkerpop3",
"path": "src/main/java/com/blazegraph/gremlin/embedded/BasicRepositoryProvider.java",
"license": "gpl-2.0",
"size": 6515
} | [
"com.bigdata.journal.Journal",
"com.bigdata.rdf.sail.BigdataSail",
"com.bigdata.rdf.sail.BigdataSailRepository",
"com.blazegraph.gremlin.util.Code",
"java.util.Properties"
] | import com.bigdata.journal.Journal; import com.bigdata.rdf.sail.BigdataSail; import com.bigdata.rdf.sail.BigdataSailRepository; import com.blazegraph.gremlin.util.Code; import java.util.Properties; | import com.bigdata.journal.*; import com.bigdata.rdf.sail.*; import com.blazegraph.gremlin.util.*; import java.util.*; | [
"com.bigdata.journal",
"com.bigdata.rdf",
"com.blazegraph.gremlin",
"java.util"
] | com.bigdata.journal; com.bigdata.rdf; com.blazegraph.gremlin; java.util; | 277,508 |
public static HttpRequest put(final CharSequence baseUrl,
final Map<?, ?> params, final boolean encode) {
String url = append(baseUrl, params);
return put(encode ? encode(url) : url);
} | static HttpRequest function(final CharSequence baseUrl, final Map<?, ?> params, final boolean encode) { String url = append(baseUrl, params); return put(encode ? encode(url) : url); } | /**
* Start a 'PUT' request to the given URL along with the query params
*
* @param baseUrl
* @param params
* the query parameters to include as part of the baseUrl
* @param encode
* true to encode the full URL
*
* @see #append(CharSequence, Map)
* @see #encode(CharSequen... | Start a 'PUT' request to the given URL along with the query params | put | {
"repo_name": "enricodeleo/cordova-HTTP",
"path": "src/android/com/synconset/CordovaHTTP/HttpRequest.java",
"license": "mit",
"size": 91482
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,453,626 |
public boolean evalBoolean(Node node, ExprEnvironment env)
throws XPathException
{
switch (_code) {
case CONST:
return _value;
case BOOLEAN_EQ:
return (_left.evalBoolean(node, env) == _right.evalBoolean(node, env));
case NUMBER_EQ:
return (_left.evalNumber(node, env) == _rig... | boolean function(Node node, ExprEnvironment env) throws XPathException { switch (_code) { case CONST: return _value; case BOOLEAN_EQ: return (_left.evalBoolean(node, env) == _right.evalBoolean(node, env)); case NUMBER_EQ: return (_left.evalNumber(node, env) == _right.evalNumber(node, env)); case STRING_EQ: String lstr ... | /**
* Evaluates the expression as a boolean.
*
* @param node current node
* @param env the environment
*
* @return the boolean representation
*/ | Evaluates the expression as a boolean | evalBoolean | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/xpath/expr/BooleanExpr.java",
"license": "gpl-2.0",
"size": 13473
} | [
"com.caucho.xpath.ExprEnvironment",
"com.caucho.xpath.XPathException",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import com.caucho.xpath.ExprEnvironment; import com.caucho.xpath.XPathException; import org.w3c.dom.Element; import org.w3c.dom.Node; | import com.caucho.xpath.*; import org.w3c.dom.*; | [
"com.caucho.xpath",
"org.w3c.dom"
] | com.caucho.xpath; org.w3c.dom; | 2,467,562 |
public Object evaluate(String path, Stash stash) throws IOException {
if (response == null) {
return null;
}
if (parsedResponse == null) {
// special case: api that don't support body (e.g. exists) return true if 200, false if 404, even if no body
// is_t... | Object function(String path, Stash stash) throws IOException { if (response == null) { return null; } if (parsedResponse == null) { if ("".equals(path) && HttpHead.METHOD_NAME.equals(response.getRequestLine().getMethod())) { return isError() == false; } return null; } return parsedResponse.evaluate(path, stash); } | /**
* Parses the response body and extracts a specific value from it (identified by the provided path)
*/ | Parses the response body and extracts a specific value from it (identified by the provided path) | evaluate | {
"repo_name": "jmluy/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/rest/yaml/ClientYamlTestResponse.java",
"license": "apache-2.0",
"size": 6827
} | [
"java.io.IOException",
"org.apache.http.client.methods.HttpHead"
] | import java.io.IOException; import org.apache.http.client.methods.HttpHead; | import java.io.*; import org.apache.http.client.methods.*; | [
"java.io",
"org.apache.http"
] | java.io; org.apache.http; | 2,477,365 |
void registerCircuitBreakers()
throws JMException; | void registerCircuitBreakers() throws JMException; | /**
* Expose all visible CircuitBreakers in JMX.
*/ | Expose all visible CircuitBreakers in JMX | registerCircuitBreakers | {
"repo_name": "apache/zest-qi4j",
"path": "libraries/circuitbreaker/src/main/java/org/apache/polygene/library/circuitbreaker/jmx/CircuitBreakerManagement.java",
"license": "apache-2.0",
"size": 5721
} | [
"javax.management.JMException"
] | import javax.management.JMException; | import javax.management.*; | [
"javax.management"
] | javax.management; | 263,242 |
public static DatabaseDriver fromJdbcUrl(String url) {
if (StringUtils.hasLength(url)) {
Assert.isTrue(url.startsWith("jdbc"), "URL must start with 'jdbc'");
String urlWithoutPrefix = url.substring("jdbc".length()).toLowerCase();
for (DatabaseDriver driver : values()) {
String prefix = ":" + driver.na... | static DatabaseDriver function(String url) { if (StringUtils.hasLength(url)) { Assert.isTrue(url.startsWith("jdbc"), STR); String urlWithoutPrefix = url.substring("jdbc".length()).toLowerCase(); for (DatabaseDriver driver : values()) { String prefix = ":" + driver.name().toLowerCase() + ":"; if (driver != UNKNOWN && ur... | /**
* Find a {@link DatabaseDriver} for the given URL.
* @param url JDBC URL
* @return the database driver or {@link #UNKNOWN} if not found
*/ | Find a <code>DatabaseDriver</code> for the given URL | fromJdbcUrl | {
"repo_name": "lucassaldanha/spring-boot",
"path": "spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java",
"license": "apache-2.0",
"size": 6563
} | [
"org.springframework.util.Assert",
"org.springframework.util.StringUtils"
] | import org.springframework.util.Assert; import org.springframework.util.StringUtils; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,069,840 |
public boolean isValid() {
if (!TextUtils.isEmpty(mCustomErrorMessage)) {
mErrorMessage = mCustomErrorMessage;
return false;
}
if (isRequired()
&& (TextUtils.isEmpty(mValue) || TextUtils.getTrimmedLength(mValue) == 0)) {
mErrorMessage = mR... | boolean function() { if (!TextUtils.isEmpty(mCustomErrorMessage)) { mErrorMessage = mCustomErrorMessage; return false; } if (isRequired() && (TextUtils.isEmpty(mValue) TextUtils.getTrimmedLength(mValue) == 0)) { mErrorMessage = mRequiredErrorMessage; return false; } if (mValidator != null && !mValidator.isValid(mValue)... | /**
* Returns true if the field value is valid. Also updates the error message.
*
* @return Whether the field value is valid.
*/ | Returns true if the field value is valid. Also updates the error message | isValid | {
"repo_name": "chromium/chromium",
"path": "components/autofill/android/java/src/org/chromium/components/autofill/prefeditor/EditorFieldModel.java",
"license": "bsd-3-clause",
"size": 26944
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,630,764 |
public static List<String> split(String statString) {
return split(statString, 0, STAT_SEPARATOR);
} | static List<String> function(String statString) { return split(statString, 0, STAT_SEPARATOR); } | /**
* This method uses ',' character by default. It is for splitting into key=value tokens.
*
* @param statString the statistics string to be split
* @return a list of split strings
*/ | This method uses ',' character by default. It is for splitting into key=value tokens | split | {
"repo_name": "tufangorel/hazelcast",
"path": "hazelcast-client/src/main/java/com/hazelcast/client/impl/statistics/Statistics.java",
"license": "apache-2.0",
"size": 16692
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,725,473 |
public Map<String,Object> toMap() {
Map<String,Object> map = new HashMap<String,Object>();
map.put("uuid", this.uuid == null ? "" : this.uuid);
map.put("name_label", this.nameLabel == null ? "" : this.nameLabel);
map.put("name_description", this.nameDescription ==... | Map<String,Object> function() { Map<String,Object> map = new HashMap<String,Object>(); map.put("uuid", this.uuid == null ? STRname_labelSTRSTRname_descriptionSTRSTRmemory_overheadSTRallowed_operationsSTRcurrent_operationsSTRAPI_version_majorSTRAPI_version_minorSTRAPI_version_vendorSTRSTRAPI_version_vendor_implementatio... | /**
* Convert a host.Record to a Map
*/ | Convert a host.Record to a Map | toMap | {
"repo_name": "cinderella/incubator-cloudstack",
"path": "deps/XenServerJava/com/xensource/xenapi/Host.java",
"license": "apache-2.0",
"size": 105838
} | [
"java.util.HashMap",
"java.util.Map",
"java.util.Set"
] | import java.util.HashMap; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 625,166 |
void setStartData(String externalId, String trackerUri, String consoleUrl);
/**
* Set the action execution completion information for an action. The action status is set to {@link
* org.apache.oozie.client.WorkflowAction.Status#DONE} | void setStartData(String externalId, String trackerUri, String consoleUrl); /** * Set the action execution completion information for an action. The action status is set to { * org.apache.oozie.client.WorkflowAction.Status#DONE} | /**
* Set the action tracking information for an successfully started action.
*
* @param externalId the action external ID.
* @param trackerUri the action tracker URI.
* @param consoleUrl the action console URL.
*/ | Set the action tracking information for an successfully started action | setStartData | {
"repo_name": "sunmeng007/oozie",
"path": "core/src/main/java/org/apache/oozie/action/ActionExecutor.java",
"license": "apache-2.0",
"size": 16619
} | [
"org.apache.oozie.client.WorkflowAction"
] | import org.apache.oozie.client.WorkflowAction; | import org.apache.oozie.client.*; | [
"org.apache.oozie"
] | org.apache.oozie; | 991,041 |
private LinkEventType getProtoType(LinkEvent event) {
LinkEventType generatedEventType = null;
LinkEventType[] kafkaEvents = LinkEventType.values();
for (LinkEventType linkEventType : kafkaEvents) {
if (linkEventType.name().equals(event.type().name())) {
generated... | LinkEventType function(LinkEvent event) { LinkEventType generatedEventType = null; LinkEventType[] kafkaEvents = LinkEventType.values(); for (LinkEventType linkEventType : kafkaEvents) { if (linkEventType.name().equals(event.type().name())) { generatedEventType = linkEventType; } } return generatedEventType; } | /**
* Returns the specific Kafka Device Event Type for the corresponding ONOS
* Device Event Type.
*
* @param event ONOS Device Event
* @return Kafka Device Event Type
*/ | Returns the specific Kafka Device Event Type for the corresponding ONOS Device Event Type | getProtoType | {
"repo_name": "y-higuchi/onos",
"path": "apps/kafka-integration/core/src/main/java/org/onosproject/kafkaintegration/converter/LinkEventConverter.java",
"license": "apache-2.0",
"size": 3919
} | [
"org.onosproject.grpc.net.LinkEvent",
"org.onosproject.net.link.LinkEvent"
] | import org.onosproject.grpc.net.LinkEvent; import org.onosproject.net.link.LinkEvent; | import org.onosproject.grpc.net.*; import org.onosproject.net.link.*; | [
"org.onosproject.grpc",
"org.onosproject.net"
] | org.onosproject.grpc; org.onosproject.net; | 818,403 |
public void setMainFrame(JFrame frame);
| void function(JFrame frame); | /**
* Sets the main frame
*/ | Sets the main frame | setMainFrame | {
"repo_name": "concord-consortium/framework",
"path": "src/org/concord/framework/otrunk/view/OTFrameManager.java",
"license": "lgpl-2.1",
"size": 3709
} | [
"javax.swing.JFrame"
] | import javax.swing.JFrame; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 306,898 |
@Override
public void endDataType() {
dataTypes.put(currentDataType, rowCount);
try {
out.write("</div>\n</body>\n</html>\n"); //NON-NLS
} catch (IOException ex) {
logger.log(Level.SEVERE, "Failed to write end of HTML report.", ex); //NON-NLS
} finally {
... | void function() { dataTypes.put(currentDataType, rowCount); try { out.write(STR); } catch (IOException ex) { logger.log(Level.SEVERE, STR, ex); } finally { if (out != null) { try { out.flush(); out.close(); } catch (IOException ex) { logger.log(Level.WARNING, STR, ex); } out = null; } } } | /**
* End the current data type. Write the end of the web page and close the
* output stream.
*/ | End the current data type. Write the end of the web page and close the output stream | endDataType | {
"repo_name": "millmanorama/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/ReportHTML.java",
"license": "apache-2.0",
"size": 62031
} | [
"java.io.IOException",
"java.util.logging.Level"
] | import java.io.IOException; import java.util.logging.Level; | import java.io.*; import java.util.logging.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,063,933 |
public void testBug156340() throws CoreException {
TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor();
IPackageFragment fragment = getPackageFragment("JavaSearchBugs", getSystemJsPathString(), "java.lang");
IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement... | void function() throws CoreException { TypeNameRequestor requestor = new SearchTests.SearchTypeNameRequestor(); IPackageFragment fragment = getPackageFragment(STR, getSystemJsPathString(), STR); IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptElement[] { fragment }); new SearchEngine().... | /**
* Bug 156340: [search] searchAllTypeNames return nothing for empty prefix
* @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=156340"
*/ | Bug 156340: [search] searchAllTypeNames return nothing for empty prefix | testBug156340 | {
"repo_name": "echoes-tech/eclipse.jsdt.core",
"path": "org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java",
"license": "epl-1.0",
"size": 284245
} | [
"org.eclipse.core.runtime.CoreException",
"org.eclipse.wst.jsdt.core.IJavaScriptElement",
"org.eclipse.wst.jsdt.core.IPackageFragment",
"org.eclipse.wst.jsdt.core.compiler.CharOperation",
"org.eclipse.wst.jsdt.core.search.IJavaScriptSearchConstants",
"org.eclipse.wst.jsdt.core.search.IJavaScriptSearchScop... | import org.eclipse.core.runtime.CoreException; import org.eclipse.wst.jsdt.core.IJavaScriptElement; import org.eclipse.wst.jsdt.core.IPackageFragment; import org.eclipse.wst.jsdt.core.compiler.CharOperation; import org.eclipse.wst.jsdt.core.search.IJavaScriptSearchConstants; import org.eclipse.wst.jsdt.core.search.IJav... | import org.eclipse.core.runtime.*; import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.core.compiler.*; import org.eclipse.wst.jsdt.core.search.*; | [
"org.eclipse.core",
"org.eclipse.wst"
] | org.eclipse.core; org.eclipse.wst; | 1,633,434 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<FunctionInner> listByStreamingJob(
String resourceGroupName, String jobName, String select, Context context) {
return new PagedIterable<>(listByStreamingJobAsync(resourceGroupName, jobName, select, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<FunctionInner> function( String resourceGroupName, String jobName, String select, Context context) { return new PagedIterable<>(listByStreamingJobAsync(resourceGroupName, jobName, select, context)); } | /**
* Lists all of the functions under the specified streaming job.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param jobName The name of the streaming job.
* @param select The $select OData query parameter. This is a comma-separated list of str... | Lists all of the functions under the specified streaming job | listByStreamingJob | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/streamanalytics/azure-resourcemanager-streamanalytics/src/main/java/com/azure/resourcemanager/streamanalytics/implementation/FunctionsClientImpl.java",
"license": "mit",
"size": 103184
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.streamanalytics.fluent.models.FunctionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.streamanalytics.fluent.models.FunctionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.streamanalytics.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,017,992 |
public ImmutableSet<String> configurationEnabledFeatures(RuleContext ruleContext) {
return ImmutableSet.of();
}
} | ImmutableSet<String> function(RuleContext ruleContext) { return ImmutableSet.of(); } } | /**
* Return set of features enabled by this configuration.
*/ | Return set of features enabled by this configuration | configurationEnabledFeatures | {
"repo_name": "mrdomino/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java",
"license": "apache-2.0",
"size": 96280
} | [
"com.google.common.collect.ImmutableSet",
"com.google.devtools.build.lib.analysis.RuleContext"
] | import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.analysis.RuleContext; | import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 1,687,004 |
public static boolean containsHtml(@Nullable final String str) {
if (StringUtils.isBlank(str)) {
return false;
}
return str.indexOf('<') != -1 || str.indexOf('&') != -1;
} | static boolean function(@Nullable final String str) { if (StringUtils.isBlank(str)) { return false; } return str.indexOf('<') != -1 str.indexOf('&') != -1; } | /**
* Quick and naive check for possible rich HTML content in a string.
*
* @param str
* A string containing HTML code.
* @return <tt>true</tt> if <tt>str</tt> contains HTML code that needs to go through a HTML renderer before
* being displayed, <tt>false</tt> if it can ... | Quick and naive check for possible rich HTML content in a string | containsHtml | {
"repo_name": "rsudev/c-geo-opensource",
"path": "main/src/cgeo/geocaching/utils/TextUtils.java",
"license": "apache-2.0",
"size": 22213
} | [
"androidx.annotation.Nullable",
"org.apache.commons.lang3.StringUtils"
] | import androidx.annotation.Nullable; import org.apache.commons.lang3.StringUtils; | import androidx.annotation.*; import org.apache.commons.lang3.*; | [
"androidx.annotation",
"org.apache.commons"
] | androidx.annotation; org.apache.commons; | 1,311,562 |
ArrayList<Node> nodes = new ArrayList<Node>();
try {
r.next();
int parsercode = r.getEventType();
// START DOC = 0
// END DOCUMENT = 1
// START TAG = 2
if(parsercode==XmlPullParser.START_DOCUMENT){
r.next();
r.next(); // skip root node
}
while(pa... | ArrayList<Node> nodes = new ArrayList<Node>(); try { r.next(); int parsercode = r.getEventType(); if(parsercode==XmlPullParser.START_DOCUMENT){ r.next(); r.next(); } while(parsercode!=XmlPullParser.END_DOCUMENT) { parsercode = r.getEventType(); if (parsercode==XmlPullParser.START_TAG) { float lat = r.getAttributeFloatV... | /**
* This is a method which retrieves attribute values
* from a file using the included XmlPullParser class
* START_DOC = 0
* END_DOCUMENT = 1
* START_TAG = 2
*/ | This is a method which retrieves attribute values from a file using the included XmlPullParser class START_DOC = 0 END_DOCUMENT = 1 START_TAG = 2 | convertXML | {
"repo_name": "adrianlshaw/Varsity",
"path": "src/uk/ac/bham/cs/bhamnav/LoadXML.java",
"license": "apache-2.0",
"size": 4328
} | [
"com.google.android.maps.GeoPoint",
"java.io.IOException",
"java.util.ArrayList",
"org.xmlpull.v1.XmlPullParser",
"org.xmlpull.v1.XmlPullParserException"
] | import com.google.android.maps.GeoPoint; import java.io.IOException; import java.util.ArrayList; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; | import com.google.android.maps.*; import java.io.*; import java.util.*; import org.xmlpull.v1.*; | [
"com.google.android",
"java.io",
"java.util",
"org.xmlpull.v1"
] | com.google.android; java.io; java.util; org.xmlpull.v1; | 1,992,605 |
public static List<IntRange> partition(IntRange range, int partitionCount) {
if (isTraceEnabled)
log.trace("partition... range=[{}], partitionCount=[{}]", range, partitionCount);
int rangeSize = range.size();
int stepSign = range.getStep();
int step = range.getStep();
... | static List<IntRange> function(IntRange range, int partitionCount) { if (isTraceEnabled) log.trace(STR, range, partitionCount); int rangeSize = range.size(); int stepSign = range.getStep(); int step = range.getStep(); int partitionSize = rangeSize / partitionCount; int remainder = rangeSize % partitionCount; List<IntRa... | /**
* Partition list.
*
* @param range the range
* @param partitionCount the partition count
* @return the list
*/ | Partition list | partition | {
"repo_name": "debop/debop4j",
"path": "debop4j-core/src/main/java/kr/debop4j/core/collection/NumberRange.java",
"license": "apache-2.0",
"size": 11520
} | [
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 200,732 |
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_NON_NEGATIVE_INTEGER,
defaultValue = "1")
@SimpleProperty(userVisible = false,
description = "An integer value which must be incremented each time a new Android "
+ "Application Package File (APK) is created for the Google Play Store.")... | @DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_NON_NEGATIVE_INTEGER, defaultValue = "1") @SimpleProperty(userVisible = false, description = STR + STR) void function(int vCode) { } | /**
* Specifies the Version Code.
*
* @param vCode the version name of the application
*/ | Specifies the Version Code | VersionCode | {
"repo_name": "jcweaver/appinventorTutorial",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Form.java",
"license": "mit",
"size": 55338
} | [
"com.google.appinventor.components.annotations.DesignerProperty",
"com.google.appinventor.components.annotations.SimpleProperty",
"com.google.appinventor.components.common.PropertyTypeConstants"
] | import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.annotations.SimpleProperty; import com.google.appinventor.components.common.PropertyTypeConstants; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,297,934 |
@GwtIncompatible // propagateIfInstanceOf
public static <X1 extends Throwable, X2 extends Throwable> void propagateIfPossible(
@Nullable Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2)
throws X1, X2 {
checkNotNull(declaredType2);
propagateIfInstanceOf(throwable, declaredTy... | @GwtIncompatible static <X1 extends Throwable, X2 extends Throwable> void function( @Nullable Throwable throwable, Class<X1> declaredType1, Class<X2> declaredType2) throws X1, X2 { checkNotNull(declaredType2); propagateIfInstanceOf(throwable, declaredType1); propagateIfPossible(throwable, declaredType2); } /** * Propag... | /**
* Propagates {@code throwable} exactly as-is, if and only if it is an instance of {@link
* RuntimeException}, {@link Error}, {@code declaredType1}, or {@code declaredType2}. In the
* unlikely case that you have three or more declared checked exception types, you can handle them
* all by invoking these m... | Propagates throwable exactly as-is, if and only if it is an instance of <code>RuntimeException</code>, <code>Error</code>, declaredType1, or declaredType2. In the unlikely case that you have three or more declared checked exception types, you can handle them all by invoking these methods repeatedly. See usage example i... | propagateIfPossible | {
"repo_name": "DavesMan/guava",
"path": "guava/src/com/google/common/base/Throwables.java",
"license": "apache-2.0",
"size": 18479
} | [
"com.google.common.annotations.GwtIncompatible",
"com.google.common.base.Preconditions",
"javax.annotation.Nullable"
] | import com.google.common.annotations.GwtIncompatible; import com.google.common.base.Preconditions; import javax.annotation.Nullable; | import com.google.common.annotations.*; import com.google.common.base.*; import javax.annotation.*; | [
"com.google.common",
"javax.annotation"
] | com.google.common; javax.annotation; | 739,339 |
private IgfsEntryInfo invokeLock(IgniteUuid id, boolean del) throws IgniteCheckedException {
return invokeAndGet(id, new IgfsMetaFileLockProcessor(createFileLockId(del)));
} | IgfsEntryInfo function(IgniteUuid id, boolean del) throws IgniteCheckedException { return invokeAndGet(id, new IgfsMetaFileLockProcessor(createFileLockId(del))); } | /**
* Invoke lock processor.
*
* @param id File ID.
* @param del Whether lock is taken for delete.
* @return Resulting file info.
* @throws IgniteCheckedException If failed.
*/ | Invoke lock processor | invokeLock | {
"repo_name": "tkpanther/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsMetaManager.java",
"license": "apache-2.0",
"size": 131189
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.igfs.meta.IgfsMetaFileLockProcessor",
"org.apache.ignite.lang.IgniteUuid"
] | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.igfs.meta.IgfsMetaFileLockProcessor; import org.apache.ignite.lang.IgniteUuid; | import org.apache.ignite.*; import org.apache.ignite.internal.processors.igfs.meta.*; import org.apache.ignite.lang.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 810,267 |
return isValid.test(value) ? Optional.of(new Nat(value))
: Optional.empty();
} | return isValid.test(value) ? Optional.of(new Nat(value)) : Optional.empty(); } | /**
* Instantiate a {@link Nat} from the given value only if it's not negative.
* @param value the value to use.
* @return a {@link Nat} wrapping the given value or empty if the value is
* negative.
*/ | Instantiate a <code>Nat</code> from the given value only if it's not negative | from | {
"repo_name": "c0c0n3/ome-smuggler",
"path": "components/server/src/main/java/ome/smuggler/core/types/Nat.java",
"license": "gpl-3.0",
"size": 1390
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,715,028 |
public static CommandService createLocalCommandService(Cache cache)
throws CommandServiceException {
if (cache == null) {
throw new CacheClosedException("Can not create command service as cache doesn't exist.");
} else if (cache.isClosed()) {
throw ((InternalCache) cache)
.ge... | static CommandService function(Cache cache) throws CommandServiceException { if (cache == null) { throw new CacheClosedException(STR); } else if (cache.isClosed()) { throw ((InternalCache) cache) .getCacheClosedException(STR); } if (localCommandService == null !localCommandService.isUsable()) { String nonExistingDepend... | /**
* Returns a newly created or existing instance of the
* <code>CommandService<code> associated with the
* specified <code>Cache</code>.
*
* @param cache Underlying <code>Cache</code> instance to be used to create a Command Service.
* @throws CommandServiceException If command service could not be i... | Returns a newly created or existing instance of the <code>CommandService<code> associated with the specified <code>Cache</code> | createLocalCommandService | {
"repo_name": "davinash/geode",
"path": "geode-gfsh/src/main/java/org/apache/geode/management/cli/CommandService.java",
"license": "apache-2.0",
"size": 6800
} | [
"org.apache.geode.cache.Cache",
"org.apache.geode.cache.CacheClosedException",
"org.apache.geode.internal.cache.InternalCache",
"org.apache.geode.management.DependenciesNotFoundException",
"org.apache.geode.management.internal.cli.CliUtil"
] | import org.apache.geode.cache.Cache; import org.apache.geode.cache.CacheClosedException; import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.management.DependenciesNotFoundException; import org.apache.geode.management.internal.cli.CliUtil; | import org.apache.geode.cache.*; import org.apache.geode.internal.cache.*; import org.apache.geode.management.*; import org.apache.geode.management.internal.cli.*; | [
"org.apache.geode"
] | org.apache.geode; | 28,987 |
public void testInsertTooManyDefaultColumns() throws SQLException {
createStatement().execute("create table derby4449(x int)");
// This statement has always failed gracefully (no explicit target
// column list)
assertCompileError(
TOO_MANY_RESULT_COLUMNS,
... | void function() throws SQLException { createStatement().execute(STR); assertCompileError( TOO_MANY_RESULT_COLUMNS, STR); assertCompileError( TOO_MANY_RESULT_COLUMNS, STR); } | /**
* Regression test case for DERBY-4449. INSERT statements with an explicit
* target column list used to fail with ArrayIndexOutOfBoundsException if
* the table constructor had more columns than the target column list and
* one of the extra columns was specified as DEFAULT.
*/ | Regression test case for DERBY-4449. INSERT statements with an explicit target column list used to fail with ArrayIndexOutOfBoundsException if the table constructor had more columns than the target column list and one of the extra columns was specified as DEFAULT | testInsertTooManyDefaultColumns | {
"repo_name": "splicemachine/spliceengine",
"path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/lang/InsertTest.java",
"license": "agpl-3.0",
"size": 9308
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,066,422 |
public static void swap(List list, int firstIndex, int secondIndex) {
Object firstObject = list.get(firstIndex);
Object secondObject = list.get(secondIndex);
list.set(firstIndex, secondObject);
list.set(secondIndex, firstObject);
} | static void function(List list, int firstIndex, int secondIndex) { Object firstObject = list.get(firstIndex); Object secondObject = list.get(secondIndex); list.set(firstIndex, secondObject); list.set(secondIndex, firstObject); } | /**
* Swap item in <code>list</code> at position <code>firstIndex</code> with item at position <code>secondIndex</code>
*
* @param list The list in which to swap the items.
* @param firstIndex The position of the first item in the list.
* @param secondIndex The position of the second item in th... | Swap item in <code>list</code> at position <code>firstIndex</code> with item at position <code>secondIndex</code> | swap | {
"repo_name": "ramou1/AppBar",
"path": "app/src/main/java/com/example/appbar/DynamicGridUtils.java",
"license": "apache-2.0",
"size": 1325
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,321,088 |
public DrawerBuilder addStickyDrawerItems(@NonNull IDrawerItem... stickyDrawerItems) {
if (this.mStickyDrawerItems == null) {
this.mStickyDrawerItems = new ArrayList<>();
}
Collections.addAll(this.mStickyDrawerItems, IdDistributor.checkIds(stickyDrawerItems));
return th... | DrawerBuilder function(@NonNull IDrawerItem... stickyDrawerItems) { if (this.mStickyDrawerItems == null) { this.mStickyDrawerItems = new ArrayList<>(); } Collections.addAll(this.mStickyDrawerItems, IdDistributor.checkIds(stickyDrawerItems)); return this; } | /**
* Add a initial DrawerItem or a DrawerItem Array for the StickyDrawerFooter
*
* @param stickyDrawerItems
* @return
*/ | Add a initial DrawerItem or a DrawerItem Array for the StickyDrawerFooter | addStickyDrawerItems | {
"repo_name": "democedes/MaterialDrawer",
"path": "library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java",
"license": "apache-2.0",
"size": 61635
} | [
"android.support.annotation.NonNull",
"com.mikepenz.materialdrawer.model.interfaces.IDrawerItem",
"com.mikepenz.materialdrawer.util.IdDistributor",
"java.util.ArrayList",
"java.util.Collections"
] | import android.support.annotation.NonNull; import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem; import com.mikepenz.materialdrawer.util.IdDistributor; import java.util.ArrayList; import java.util.Collections; | import android.support.annotation.*; import com.mikepenz.materialdrawer.model.interfaces.*; import com.mikepenz.materialdrawer.util.*; import java.util.*; | [
"android.support",
"com.mikepenz.materialdrawer",
"java.util"
] | android.support; com.mikepenz.materialdrawer; java.util; | 875,802 |
public ProcessingRelationshipService getProcessingRelationshipService() {
return processingRelationshipService;
} | ProcessingRelationshipService function() { return processingRelationshipService; } | /**
* <p>
* Getter for the field <code>processingRelationshipService</code>.
* </p>
*
* @return a {@link net.sourceforge.seqware.common.business.ProcessingRelationshipService} object.
*/ | Getter for the field <code>processingRelationshipService</code>. | getProcessingRelationshipService | {
"repo_name": "SeqWare/seqware",
"path": "seqware-common/src/main/java/net/sourceforge/seqware/common/ContextImpl.java",
"license": "gpl-3.0",
"size": 25262
} | [
"net.sourceforge.seqware.common.business.ProcessingRelationshipService"
] | import net.sourceforge.seqware.common.business.ProcessingRelationshipService; | import net.sourceforge.seqware.common.business.*; | [
"net.sourceforge.seqware"
] | net.sourceforge.seqware; | 604,907 |
private void findLargestCells(int widthMeasureSpec) {
boolean firstRow = true;
// find the maximum width for each column
// the total number of columns is dynamically changed if we find
// wider rows as we go through the children
// the array is reused for each layout operat... | void function(int widthMeasureSpec) { boolean firstRow = true; final int count = getChildCount(); for (int i = 0; i < count; i++) { final View child = getChildAt(i); if (child.getVisibility() == GONE) { continue; } if (child instanceof TableRow) { final TableRow row = (TableRow) child; final ViewGroup.LayoutParams layo... | /**
* <p>
* Finds the largest cell in each column. For each column, the width of the
* largest cell is applied to all the other cells.
* </p>
*
* @param widthMeasureSpec
* the measure constraint imposed by our parent
*/ | Finds the largest cell in each column. For each column, the width of the largest cell is applied to all the other cells. | findLargestCells | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/src/android2iphone/android/widget/TableLayout.java",
"license": "gpl-2.0",
"size": 28942
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 1,075,617 |
public com.google.common.util.concurrent.ListenableFuture<com.google.logging.v2.LogExclusion>
getExclusion(com.google.logging.v2.GetExclusionRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetExclusionMethodHelper(), getCallOptions()), request);
} | com.google.common.util.concurrent.ListenableFuture<com.google.logging.v2.LogExclusion> function(com.google.logging.v2.GetExclusionRequest request) { return futureUnaryCall( getChannel().newCall(getGetExclusionMethodHelper(), getCallOptions()), request); } | /**
*
*
* <pre>
* Gets the description of an exclusion.
* </pre>
*/ | <code> Gets the description of an exclusion. </code> | getExclusion | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ConfigServiceV2Grpc.java",
"license": "apache-2.0",
"size": 57256
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 852,888 |
@Nonnull
public OffsetDateTime atDate (@Nonnull final LocalDate date)
{
final LocalDateTime aLDT = date.atTime (m_aTime);
return OffsetDateTime.of (aLDT, getOffsetOrDefault (aLDT));
} | OffsetDateTime function (@Nonnull final LocalDate date) { final LocalDateTime aLDT = date.atTime (m_aTime); return OffsetDateTime.of (aLDT, getOffsetOrDefault (aLDT)); } | /**
* Combines this time with a date to create an {@code OffsetDateTime}.
* <p>
* This returns an {@code OffsetDateTime} formed from this time and the
* specified date. All possible combinations of date and time are valid.
*
* @param date
* the date to combine with, not null
* @return the... | Combines this time with a date to create an OffsetDateTime. This returns an OffsetDateTime formed from this time and the specified date. All possible combinations of date and time are valid | atDate | {
"repo_name": "phax/ph-commons",
"path": "ph-commons/src/main/java/com/helger/commons/datetime/XMLOffsetTime.java",
"license": "apache-2.0",
"size": 58901
} | [
"java.time.LocalDate",
"java.time.LocalDateTime",
"java.time.OffsetDateTime",
"javax.annotation.Nonnull"
] | import java.time.LocalDate; import java.time.LocalDateTime; import java.time.OffsetDateTime; import javax.annotation.Nonnull; | import java.time.*; import javax.annotation.*; | [
"java.time",
"javax.annotation"
] | java.time; javax.annotation; | 542,599 |
public static boolean endsWithNewline(IDocument document, String text) {
String[] newlines = document.getLegalLineDelimiters();
boolean ends = false;
for (int i = 0; i < newlines.length; i++) {
String delimiter = newlines[i];
if (text.indexOf(delimiter) != -1) {
... | static boolean function(IDocument document, String text) { String[] newlines = document.getLegalLineDelimiters(); boolean ends = false; for (int i = 0; i < newlines.length; i++) { String delimiter = newlines[i]; if (text.indexOf(delimiter) != -1) { ends = true; } } return ends; } | /**
* True if text ends with a newline delimiter
*/ | True if text ends with a newline delimiter | endsWithNewline | {
"repo_name": "RandallDW/Aruba_plugin",
"path": "plugins/org.python.pydev.shared_core/src/org/python/pydev/shared_core/string/TextSelectionUtils.java",
"license": "epl-1.0",
"size": 38676
} | [
"org.eclipse.jface.text.IDocument"
] | import org.eclipse.jface.text.IDocument; | import org.eclipse.jface.text.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 96,674 |
protected void changeResultContentPage(HttpServletRequest request, Result result, String newRubricName, String newContentPage) {
if(newRubricName != null){
setRubricName(newRubricName);
request.setAttribute(CoreConstants.RUBRIC_NAME, rubricName);
request.setAttribut... | void function(HttpServletRequest request, Result result, String newRubricName, String newContentPage) { if(newRubricName != null){ setRubricName(newRubricName); request.setAttribute(CoreConstants.RUBRIC_NAME, rubricName); request.setAttribute(CoreConstants.MENU_TYPE, menuName); } if (logger.isDebugEnabled()) { logger.d... | /**
* Prepare the result, we need to put it at the begin of those method
*/ | Prepare the result, we need to put it at the begin of those method | changeResultContentPage | {
"repo_name": "teger/slimy",
"path": "slimy-admin/src/main/java/com/nouveauxterritoires/web/slimy/admin/controllers/AdminController.java",
"license": "gpl-3.0",
"size": 7205
} | [
"com.nouveauxterritoires.web.slimy.core.utils.CoreConstants",
"com.nouveauxterritoires.web.slimy.core.utils.Result",
"javax.servlet.http.HttpServletRequest"
] | import com.nouveauxterritoires.web.slimy.core.utils.CoreConstants; import com.nouveauxterritoires.web.slimy.core.utils.Result; import javax.servlet.http.HttpServletRequest; | import com.nouveauxterritoires.web.slimy.core.utils.*; import javax.servlet.http.*; | [
"com.nouveauxterritoires.web",
"javax.servlet"
] | com.nouveauxterritoires.web; javax.servlet; | 2,893,444 |
LoggerRepository getLoggerRepository(); | LoggerRepository getLoggerRepository(); | /**
* Gets the logger repository for this plugin.
*
* @return the logger repository to which this plugin is attached.
*/ | Gets the logger repository for this plugin | getLoggerRepository | {
"repo_name": "apache/log4j-extras",
"path": "src/main/java/org/apache/log4j/component/plugins/Plugin.java",
"license": "apache-2.0",
"size": 5082
} | [
"org.apache.log4j.spi.LoggerRepository"
] | import org.apache.log4j.spi.LoggerRepository; | import org.apache.log4j.spi.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 2,897,079 |
void taskStatusUpdated(BuildStatusChangedEvent buildStatusChangedEvent) {
// If any of the build tasks have failed or all are complete, then the build set is done
if(buildTasks.stream().anyMatch(bt -> bt.getStatus().hasFailed())) {
buildConfigSetRecord.setStatus(org.jboss.pnc.model.Build... | void taskStatusUpdated(BuildStatusChangedEvent buildStatusChangedEvent) { if(buildTasks.stream().anyMatch(bt -> bt.getStatus().hasFailed())) { buildConfigSetRecord.setStatus(org.jboss.pnc.model.BuildStatus.FAILED); finishBuildSetTask(); } else if (buildTasks.stream().allMatch(bt -> bt.getStatus().isCompleted())) { buil... | /**
* Notify the set that the state of one of it's tasks has changed.
*
* @param buildStatusChangedEvent Event with information about the state change of the task
*/ | Notify the set that the state of one of it's tasks has changed | taskStatusUpdated | {
"repo_name": "rnc/pnc",
"path": "build-coordinator/src/main/java/org/jboss/pnc/core/builder/BuildSetTask.java",
"license": "apache-2.0",
"size": 6070
} | [
"org.jboss.pnc.spi.events.BuildStatusChangedEvent"
] | import org.jboss.pnc.spi.events.BuildStatusChangedEvent; | import org.jboss.pnc.spi.events.*; | [
"org.jboss.pnc"
] | org.jboss.pnc; | 517,142 |
@Override public DimensionChunkAttributes getAttributes() {
return chunkAttributes;
} | @Override DimensionChunkAttributes function() { return chunkAttributes; } | /**
* Below method will be used get the chunk attributes
*
* @return chunk attributes
*/ | Below method will be used get the chunk attributes | getAttributes | {
"repo_name": "ashokblend/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/carbon/datastore/chunk/impl/VariableLengthDimensionDataChunk.java",
"license": "apache-2.0",
"size": 3504
} | [
"org.apache.carbondata.core.carbon.datastore.chunk.DimensionChunkAttributes"
] | import org.apache.carbondata.core.carbon.datastore.chunk.DimensionChunkAttributes; | import org.apache.carbondata.core.carbon.datastore.chunk.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 356,846 |
public void setStrList(List<String> strList) {
this.strList = strList;
}
| void function(List<String> strList) { this.strList = strList; } | /**
* Set string list value.
*
* @param strList The string list to set.
*/ | Set string list value | setStrList | {
"repo_name": "openmrs/openmrs-module-datacomparison",
"path": "api/src/main/java/org/openmrs/module/datacomparison/SimpleObject.java",
"license": "mpl-2.0",
"size": 2697
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 218,232 |
public void testURI() throws IOException {
LOG.info("Testing correct Unix URI: " + URI_UNIX);
URI u = Util.stringAsURI(URI_UNIX);
LOG.info("Uri: " + u);
assertNotNull("Uri should not be null at this point", u);
assertEquals(URI_FILE_SCHEMA, u.getScheme());
assertEquals(URI_PATH_UNIX, u.get... | void function() throws IOException { LOG.info(STR + URI_UNIX); URI u = Util.stringAsURI(URI_UNIX); LOG.info(STR + u); assertNotNull(STR, u); assertEquals(URI_FILE_SCHEMA, u.getScheme()); assertEquals(URI_PATH_UNIX, u.getPath()); LOG.info(STR + URI_WINDOWS); u = Util.stringAsURI(URI_WINDOWS); LOG.info(STR + u); assertNo... | /**
* Test for a URI
* @throws IOException
*/ | Test for a URI | testURI | {
"repo_name": "cumulusyebl/cumulus",
"path": "src/test/hdfs/org/apache/hadoop/hdfs/server/common/TestGetUriFromString.java",
"license": "apache-2.0",
"size": 3399
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 145,180 |
public static AlertLevel forSeverity(int severity) {
switch (severity) {
case Alert.WARNING:
return AlertLevel.WARNING;
case Alert.ERROR:
return AlertLevel.ERROR;
case Alert.SEVERE:
return AlertLevel.SEVERE;
case Alert.OFF:
return AlertLevel.OFF;
default:
throw ne... | static AlertLevel function(int severity) { switch (severity) { case Alert.WARNING: return AlertLevel.WARNING; case Alert.ERROR: return AlertLevel.ERROR; case Alert.SEVERE: return AlertLevel.SEVERE; case Alert.OFF: return AlertLevel.OFF; default: throw new IllegalArgumentException(LocalizedStrings.AlertLevel_UNKNOWN_ALE... | /**
* Returns the <code>AlertLevel</code> for the given severity
*
* @throws IllegalArgumentException
* If there is no alert level with the given
* <code>severity</code>
*/ | Returns the <code>AlertLevel</code> for the given severity | forSeverity | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/AlertLevel.java",
"license": "apache-2.0",
"size": 5257
} | [
"com.gemstone.gemfire.internal.admin.Alert",
"com.gemstone.gemfire.internal.i18n.LocalizedStrings"
] | import com.gemstone.gemfire.internal.admin.Alert; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; | import com.gemstone.gemfire.internal.admin.*; import com.gemstone.gemfire.internal.i18n.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,089,380 |
public Identifier getIdentifier(); | Identifier function(); | /**
* Returns an identifier of this object
*
* @return an identifier
*/ | Returns an identifier of this object | getIdentifier | {
"repo_name": "beysims/reef",
"path": "lang/java/reef-common/src/main/java/org/apache/reef/io/naming/NameAssignment.java",
"license": "apache-2.0",
"size": 1259
} | [
"org.apache.reef.wake.Identifier"
] | import org.apache.reef.wake.Identifier; | import org.apache.reef.wake.*; | [
"org.apache.reef"
] | org.apache.reef; | 884,573 |
@Override
public String toString() {
return "(" + StringUtils.arrayAwareToString(this.f0) + ")";
} | String function() { return "(" + StringUtils.arrayAwareToString(this.f0) + ")"; } | /**
* Creates a string representation of the tuple in the form (f0), where the individual fields
* are the value returned by calling {@link Object#toString} on that field.
*
* @return The string representation of the tuple.
*/ | Creates a string representation of the tuple in the form (f0), where the individual fields are the value returned by calling <code>Object#toString</code> on that field | toString | {
"repo_name": "aljoscha/flink",
"path": "flink-core/src/main/java/org/apache/flink/api/java/tuple/Tuple1.java",
"license": "apache-2.0",
"size": 5471
} | [
"org.apache.flink.util.StringUtils"
] | import org.apache.flink.util.StringUtils; | import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,676,310 |
private void setPackingConfigs(Config config) {
List<TopologyAPI.Config.KeyValue> topologyConfig = topology.getTopologyConfig().getKvsList();
this.defaultInstanceResources = new Resource(
Context.instanceCpu(config),
Context.instanceRam(config),
Context.instanceDisk(config));
thi... | void function(Config config) { List<TopologyAPI.Config.KeyValue> topologyConfig = topology.getTopologyConfig().getKvsList(); this.defaultInstanceResources = new Resource( Context.instanceCpu(config), Context.instanceRam(config), Context.instanceDisk(config)); this.paddingPercentage = TopologyUtils.getConfigWithDefault(... | /**
* Instatiate the packing algorithm parameters related to this topology.
*/ | Instatiate the packing algorithm parameters related to this topology | setPackingConfigs | {
"repo_name": "mycFelix/heron",
"path": "heron/packing/src/java/org/apache/heron/packing/binpacking/FirstFitDecreasingPacking.java",
"license": "apache-2.0",
"size": 14600
} | [
"java.util.List",
"org.apache.heron.api.generated.TopologyAPI",
"org.apache.heron.api.utils.TopologyUtils",
"org.apache.heron.common.basics.ByteAmount",
"org.apache.heron.packing.utils.PackingUtils",
"org.apache.heron.spi.common.Config",
"org.apache.heron.spi.common.Context",
"org.apache.heron.spi.pac... | import java.util.List; import org.apache.heron.api.generated.TopologyAPI; import org.apache.heron.api.utils.TopologyUtils; import org.apache.heron.common.basics.ByteAmount; import org.apache.heron.packing.utils.PackingUtils; import org.apache.heron.spi.common.Config; import org.apache.heron.spi.common.Context; import o... | import java.util.*; import org.apache.heron.api.generated.*; import org.apache.heron.api.utils.*; import org.apache.heron.common.basics.*; import org.apache.heron.packing.utils.*; import org.apache.heron.spi.common.*; import org.apache.heron.spi.packing.*; | [
"java.util",
"org.apache.heron"
] | java.util; org.apache.heron; | 1,188,128 |
Value execute(); | Value execute(); | /**
* Execute the process
*
* @return a result of the execution process
*/ | Execute the process | execute | {
"repo_name": "Panda-Programming-Language/Panda",
"path": "panda-framework/src/main/java/org/panda_lang/panda/framework/design/runtime/ExecutableProcess.java",
"license": "apache-2.0",
"size": 891
} | [
"org.panda_lang.panda.framework.design.architecture.value.Value"
] | import org.panda_lang.panda.framework.design.architecture.value.Value; | import org.panda_lang.panda.framework.design.architecture.value.*; | [
"org.panda_lang.panda"
] | org.panda_lang.panda; | 2,088,908 |
if (!"POST".equals(exchange.getRequestMethod())) {
exchange.getResponseHeaders().set("Allow", "POST");
exchange.sendResponseHeaders(405, -1);
return;
}
ByteArrayOutputStream output = new ByteArrayOutputStream(1024);
try {
invoke(exchange.getRequestBody(), output);
}
catch (Throwable ex) {
ex... | if (!"POST".equals(exchange.getRequestMethod())) { exchange.getResponseHeaders().set("Allow", "POST"); exchange.sendResponseHeaders(405, -1); return; } ByteArrayOutputStream output = new ByteArrayOutputStream(1024); try { invoke(exchange.getRequestBody(), output); } catch (Throwable ex) { exchange.sendResponseHeaders(5... | /**
* Processes the incoming Hessian request and creates a Hessian response.
*/ | Processes the incoming Hessian request and creates a Hessian response | handle | {
"repo_name": "shivpun/spring-framework",
"path": "spring-web/src/main/java/org/springframework/remoting/caucho/SimpleHessianServiceExporter.java",
"license": "apache-2.0",
"size": 2718
} | [
"java.io.ByteArrayOutputStream",
"org.springframework.util.FileCopyUtils"
] | import java.io.ByteArrayOutputStream; import org.springframework.util.FileCopyUtils; | import java.io.*; import org.springframework.util.*; | [
"java.io",
"org.springframework.util"
] | java.io; org.springframework.util; | 1,246,509 |
ImageView.ScaleType getScaleType();
| ImageView.ScaleType getScaleType(); | /**
* Return the current scale type in use by the ImageView.
*/ | Return the current scale type in use by the ImageView | getScaleType | {
"repo_name": "Chyrain/V5ClientSDK-Android",
"path": "V5KFClient_Voice_Map/src/com/v5kf/client/ui/widget/IPhotoView.java",
"license": "gpl-3.0",
"size": 5646
} | [
"android.widget.ImageView"
] | import android.widget.ImageView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 737,021 |
Function<? super V, ? extends T> getReverseFunction(); | Function<? super V, ? extends T> getReverseFunction(); | /**
* Gets a function that converts from type V to type T.
*/ | Gets a function that converts from type V to type T | getReverseFunction | {
"repo_name": "mmm2a/GridApp",
"path": "src/com/morgan/grid/shared/convert/Converter.java",
"license": "apache-2.0",
"size": 646
} | [
"com.google.common.base.Function"
] | import com.google.common.base.Function; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,390,969 |
protected AttributeQuery getAttrQuery4Employees(final Parameter _parameter)
throws EFapsException
{
final QueryBuilder queryBldr = new QueryBuilder(CIHumanResource.Employee);
queryBldr.addWhereAttrEqValue(CIHumanResource.Employee.Status, Status.find(
CIHumanResour... | AttributeQuery function(final Parameter _parameter) throws EFapsException { final QueryBuilder queryBldr = new QueryBuilder(CIHumanResource.Employee); queryBldr.addWhereAttrEqValue(CIHumanResource.Employee.Status, Status.find( CIHumanResource.EmployeeStatus.Worker)); return null; } | /**
* Gets the attribute query 4 employees.
*
* @param _parameter Parameter as passed by the eFaps API
* @return the att query4 employees
* @throws EFapsException on error
*/ | Gets the attribute query 4 employees | getAttrQuery4Employees | {
"repo_name": "eFaps/eFapsApp-Payroll",
"path": "src/main/efaps/ESJP/org/efaps/esjp/payroll/Process_Base.java",
"license": "apache-2.0",
"size": 11089
} | [
"org.efaps.admin.datamodel.Status",
"org.efaps.admin.event.Parameter",
"org.efaps.db.AttributeQuery",
"org.efaps.db.QueryBuilder",
"org.efaps.esjp.ci.CIHumanResource",
"org.efaps.util.EFapsException"
] | import org.efaps.admin.datamodel.Status; import org.efaps.admin.event.Parameter; import org.efaps.db.AttributeQuery; import org.efaps.db.QueryBuilder; import org.efaps.esjp.ci.CIHumanResource; import org.efaps.util.EFapsException; | import org.efaps.admin.datamodel.*; import org.efaps.admin.event.*; import org.efaps.db.*; import org.efaps.esjp.ci.*; import org.efaps.util.*; | [
"org.efaps.admin",
"org.efaps.db",
"org.efaps.esjp",
"org.efaps.util"
] | org.efaps.admin; org.efaps.db; org.efaps.esjp; org.efaps.util; | 1,981,275 |
public static I18nConversionCategory[] formatParameterCategories(String format)
throws IllegalFormatException {
tryFormatSatisfiability(format);
I18nConversion[] cs = MessageFormatParser.parse(format);
int max_index = -1;
Map<Integer, I18nConversionCategory> conv = new H... | static I18nConversionCategory[] function(String format) throws IllegalFormatException { tryFormatSatisfiability(format); I18nConversion[] cs = MessageFormatParser.parse(format); int max_index = -1; Map<Integer, I18nConversionCategory> conv = new HashMap<Integer, I18nConversionCategory>(); for (I18nConversion c : cs) { ... | /**
* Returns a {@link I18nConversionCategory} for every conversion found in
* the format string.
*
* Throws an exception if the format is not syntactically valid.
*/ | Returns a <code>I18nConversionCategory</code> for every conversion found in the format string. Throws an exception if the format is not syntactically valid | formatParameterCategories | {
"repo_name": "Jianchu/checker-framework",
"path": "checker/src/org/checkerframework/checker/i18nformatter/I18nFormatUtil.java",
"license": "gpl-2.0",
"size": 15732
} | [
"java.util.HashMap",
"java.util.IllegalFormatException",
"java.util.Map",
"org.checkerframework.checker.i18nformatter.qual.I18nConversionCategory"
] | import java.util.HashMap; import java.util.IllegalFormatException; import java.util.Map; import org.checkerframework.checker.i18nformatter.qual.I18nConversionCategory; | import java.util.*; import org.checkerframework.checker.i18nformatter.qual.*; | [
"java.util",
"org.checkerframework.checker"
] | java.util; org.checkerframework.checker; | 2,125,125 |
@Select("SELECT * FROM day_type")
public List<DayType> getAllDayTypes(); | @Select(STR) List<DayType> function(); | /**
* Select all the day types from the table day_types in the data source.
*
* @return
*/ | Select all the day types from the table day_types in the data source | getAllDayTypes | {
"repo_name": "esloho/mi-clima",
"path": "src/main/java/com/autentia/prueba/miclima/mapper/DayTypeMapper.java",
"license": "gpl-3.0",
"size": 811
} | [
"com.autentia.prueba.miclima.model.DayType",
"java.util.List",
"org.apache.ibatis.annotations.Select"
] | import com.autentia.prueba.miclima.model.DayType; import java.util.List; import org.apache.ibatis.annotations.Select; | import com.autentia.prueba.miclima.model.*; import java.util.*; import org.apache.ibatis.annotations.*; | [
"com.autentia.prueba",
"java.util",
"org.apache.ibatis"
] | com.autentia.prueba; java.util; org.apache.ibatis; | 1,084,611 |
public Map<String, FrobResource> getClientsToTest(int port, String type) {
if (this.clients == null) {
synchronized (FrobClientRule.class) {
if (this.clients == null) {
this.clients = clientLoader.clientsToTest(port, type);
}
}
... | Map<String, FrobResource> function(int port, String type) { if (this.clients == null) { synchronized (FrobClientRule.class) { if (this.clients == null) { this.clients = clientLoader.clientsToTest(port, type); } } } return this.clients; } | /**
* Get the specific client instance map for the given test.
* @param port the port the jetty server is listening on
* @param type type is used to resolve the correct web.xml to use
* @return the clientName --> client instance map
*/ | Get the specific client instance map for the given test | getClientsToTest | {
"repo_name": "mdgreenfield/rest-client-tools",
"path": "rest-client-test/src/main/java/com/opower/rest/test/resource/FrobClientRule.java",
"license": "apache-2.0",
"size": 2630
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 429,055 |
ProvenanceEventDTO submitReplay(Long eventId); | ProvenanceEventDTO submitReplay(Long eventId); | /**
* Submits a new replay request.
*
* @param eventId id
* @return event
*/ | Submits a new replay request | submitReplay | {
"repo_name": "WilliamNouet/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 53848
} | [
"org.apache.nifi.web.api.dto.provenance.ProvenanceEventDTO"
] | import org.apache.nifi.web.api.dto.provenance.ProvenanceEventDTO; | import org.apache.nifi.web.api.dto.provenance.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 125,498 |
public final Set<String> advertisers(final Query query) {
int index = indexForEntry(query);
return index < 0 ? Collections.EMPTY_SET : advertisers(index);
} | final Set<String> function(final Query query) { int index = indexForEntry(query); return index < 0 ? Collections.EMPTY_SET : advertisers(index); } | /**
* Returns the set of advertisers with data for the given query.
*
* @param query the query
* @return the set of advertisers with data for the given query.
*/ | Returns the set of advertisers with data for the given query | advertisers | {
"repo_name": "Iolaum/MrSmith",
"path": "AdX/src/main/java/edu/umich/eecs/tac/props/QueryReport.java",
"license": "gpl-2.0",
"size": 43290
} | [
"java.util.Collections",
"java.util.Set"
] | import java.util.Collections; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 76,605 |
public static Tuple<DeleteResponse, DeleteResponse> randomDeleteResponse() {
String index = randomAlphaOfLength(5);
String indexUUid = randomAlphaOfLength(5);
int shardId = randomIntBetween(0, 5);
String type = randomAlphaOfLength(5);
String id = randomAlphaOfLength(5);
... | static Tuple<DeleteResponse, DeleteResponse> function() { String index = randomAlphaOfLength(5); String indexUUid = randomAlphaOfLength(5); int shardId = randomIntBetween(0, 5); String type = randomAlphaOfLength(5); String id = randomAlphaOfLength(5); long seqNo = randomFrom(SequenceNumbers.UNASSIGNED_SEQ_NO, randomNon... | /**
* Returns a tuple of {@link DeleteResponse}s.
* <p>
* The left element is the actual {@link DeleteResponse} to serialize while the right element is the
* expected {@link DeleteResponse} after parsing.
*/ | Returns a tuple of <code>DeleteResponse</code>s. The left element is the actual <code>DeleteResponse</code> to serialize while the right element is the expected <code>DeleteResponse</code> after parsing | randomDeleteResponse | {
"repo_name": "gingerwizard/elasticsearch",
"path": "server/src/test/java/org/elasticsearch/action/delete/DeleteResponseTests.java",
"license": "apache-2.0",
"size": 6655
} | [
"org.elasticsearch.action.support.replication.ReplicationResponse",
"org.elasticsearch.common.collect.Tuple",
"org.elasticsearch.index.seqno.SequenceNumbers",
"org.elasticsearch.index.shard.ShardId",
"org.elasticsearch.test.RandomObjects"
] | import org.elasticsearch.action.support.replication.ReplicationResponse; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.index.seqno.SequenceNumbers; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.test.RandomObjects; | import org.elasticsearch.action.support.replication.*; import org.elasticsearch.common.collect.*; import org.elasticsearch.index.seqno.*; import org.elasticsearch.index.shard.*; import org.elasticsearch.test.*; | [
"org.elasticsearch.action",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.test"
] | org.elasticsearch.action; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.test; | 526,986 |
public static Range findStackedRangeBounds(TableXYDataset dataset,
double base) {
ParamChecks.nullNotPermitted(dataset, "dataset");
double minimum = base;
double maximum = base;
for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) {
double positive ... | static Range function(TableXYDataset dataset, double base) { ParamChecks.nullNotPermitted(dataset, STR); double minimum = base; double maximum = base; for (int itemNo = 0; itemNo < dataset.getItemCount(); itemNo++) { double positive = base; double negative = base; int seriesCount = dataset.getSeriesCount(); for (int se... | /**
* Returns the minimum and maximum values for the dataset's range,
* assuming that the series are stacked, using the specified base value.
*
* @param dataset the dataset ({@code null} not permitted).
* @param base the base value.
*
* @return The range ({@code null} if the dataset... | Returns the minimum and maximum values for the dataset's range, assuming that the series are stacked, using the specified base value | findStackedRangeBounds | {
"repo_name": "simon04/jfreechart",
"path": "src/main/java/org/jfree/data/general/DatasetUtilities.java",
"license": "lgpl-2.1",
"size": 94747
} | [
"org.jfree.chart.util.ParamChecks",
"org.jfree.data.Range",
"org.jfree.data.xy.TableXYDataset"
] | import org.jfree.chart.util.ParamChecks; import org.jfree.data.Range; import org.jfree.data.xy.TableXYDataset; | import org.jfree.chart.util.*; import org.jfree.data.*; import org.jfree.data.xy.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 613,258 |
public static <T> ObjectInstantiator<T> getInstantiatorOf(Class<T> clazz) {
return OBJENESIS_STD.getInstantiatorOf(clazz);
}
| static <T> ObjectInstantiator<T> function(Class<T> clazz) { return OBJENESIS_STD.getInstantiatorOf(clazz); } | /**
* Will pick the best instantiator for the provided class. If you need to create a lot of
* instances from the same class, it is way more efficient to create them from the same
* ObjectInstantiator than calling {@link #newInstance(Class)}.
*
* @param <T> Type to instantiate
* @param cla... | Will pick the best instantiator for the provided class. If you need to create a lot of instances from the same class, it is way more efficient to create them from the same ObjectInstantiator than calling <code>#newInstance(Class)</code> | getInstantiatorOf | {
"repo_name": "shivpun/spring-framework",
"path": "spring-objenesis/src/main/java/org/springframework/objenesis/ObjenesisHelper.java",
"license": "apache-2.0",
"size": 3010
} | [
"org.springframework.objenesis.instantiator.ObjectInstantiator"
] | import org.springframework.objenesis.instantiator.ObjectInstantiator; | import org.springframework.objenesis.instantiator.*; | [
"org.springframework.objenesis"
] | org.springframework.objenesis; | 1,125,066 |
public ValueDataset getDataset(int index) {
ValueDataset result = null;
if (this.datasets.size() > index) {
result = (ValueDataset) this.datasets.get(index);
}
return result;
} | ValueDataset function(int index) { ValueDataset result = null; if (this.datasets.size() > index) { result = (ValueDataset) this.datasets.get(index); } return result; } | /**
* Returns the dataset at the given index.
*
* @param index the dataset index.
*
* @return The dataset (possibly <code>null</code>).
*/ | Returns the dataset at the given index | getDataset | {
"repo_name": "djun100/afreechart",
"path": "src/org/afree/chart/plot/dial/DialPlot.java",
"license": "lgpl-3.0",
"size": 26002
} | [
"org.afree.data.general.ValueDataset"
] | import org.afree.data.general.ValueDataset; | import org.afree.data.general.*; | [
"org.afree.data"
] | org.afree.data; | 1,749,748 |
public Map<String, String> generateAuthArgs(String method, String uri) throws IOException {
Map<String, String> rv = new HashMap<String, String>(12);
String realm = args.get("realm");
String nonce = args.get("nonce");
String qop = args.get("qop");
Stri... | Map<String, String> function(String method, String uri) throws IOException { Map<String, String> rv = new HashMap<String, String>(12); String realm = args.get("realm"); String nonce = args.get("nonce"); String qop = args.get("qop"); String opaque = args.get(STR); if (realm == null nonce == null) { if (_log.shouldLog(Lo... | /**
* Generate the digest authentication parameters
* Ref: RFC 2617
*
* @since 0.9.12 modified from I2PTunnelHTTPClientBase.validateDigest()
*/ | Generate the digest authentication parameters Ref: RFC 2617 | generateAuthArgs | {
"repo_name": "NoYouShutup/CryptMeme",
"path": "CryptMeme/core/java/src/net/i2p/util/EepGet.java",
"license": "mit",
"size": 70298
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"net.i2p.data.DataHelper"
] | import java.io.IOException; import java.util.HashMap; import java.util.Map; import net.i2p.data.DataHelper; | import java.io.*; import java.util.*; import net.i2p.data.*; | [
"java.io",
"java.util",
"net.i2p.data"
] | java.io; java.util; net.i2p.data; | 1,079,167 |
@Test
public void testBinder() {
assertBinderContains(new ConstraintViolationExceptionMapper.Binder(),
ExceptionMapper.class);
} | void function() { assertBinderContains(new ConstraintViolationExceptionMapper.Binder(), ExceptionMapper.class); } | /**
* Assert that we can inject values using this binder.
*/ | Assert that we can inject values using this binder | testBinder | {
"repo_name": "kangaroo-server/kangaroo",
"path": "kangaroo-common/src/test/java/net/krotscheck/kangaroo/common/hibernate/mapper/ConstraintViolationExceptionMapperTest.java",
"license": "apache-2.0",
"size": 2518
} | [
"javax.ws.rs.ext.ExceptionMapper",
"net.krotscheck.kangaroo.test.jersey.BinderAssertion"
] | import javax.ws.rs.ext.ExceptionMapper; import net.krotscheck.kangaroo.test.jersey.BinderAssertion; | import javax.ws.rs.ext.*; import net.krotscheck.kangaroo.test.jersey.*; | [
"javax.ws",
"net.krotscheck.kangaroo"
] | javax.ws; net.krotscheck.kangaroo; | 1,337,097 |
private XrefType createExternalRefs(AttributeBag bag) {
Set<String> set = new HashSet<String>();
ExternalReference[] refs = bag.getExternalRefs();
XrefType xref = new XrefType();
if ((refs != null) && (refs.length > 0)) {
// Add Primary Reference
createPrimaryKey(refs[0], xref);
// All others be... | XrefType function(AttributeBag bag) { Set<String> set = new HashSet<String>(); ExternalReference[] refs = bag.getExternalRefs(); XrefType xref = new XrefType(); if ((refs != null) && (refs.length > 0)) { createPrimaryKey(refs[0], xref); if (refs.length > 1) { for (int i = 1; i < refs.length; i++) { String key = this.ge... | /**
* Sets Interactor External References.
* Filters out any redundant external references.
*/ | Sets Interactor External References. Filters out any redundant external references | createExternalRefs | {
"repo_name": "cytoscape/psi-mi",
"path": "impl/src/main/java/org/cytoscape/psi_mi/internal/data_mapper/MapInteractionsToPsiOne.java",
"license": "lgpl-2.1",
"size": 15359
} | [
"java.util.HashSet",
"java.util.Set",
"org.cytoscape.psi_mi.internal.model.AttributeBag",
"org.cytoscape.psi_mi.internal.model.ExternalReference",
"org.cytoscape.psi_mi.internal.schema.mi1.XrefType"
] | import java.util.HashSet; import java.util.Set; import org.cytoscape.psi_mi.internal.model.AttributeBag; import org.cytoscape.psi_mi.internal.model.ExternalReference; import org.cytoscape.psi_mi.internal.schema.mi1.XrefType; | import java.util.*; import org.cytoscape.psi_mi.internal.model.*; import org.cytoscape.psi_mi.internal.schema.mi1.*; | [
"java.util",
"org.cytoscape.psi_mi"
] | java.util; org.cytoscape.psi_mi; | 2,218,861 |
@Test(expected = GeniePreconditionException.class)
public void testRemoveAllConfigsForCommandNoId() throws GenieException {
this.service.removeAllConfigsForCommand(null);
} | @Test(expected = GeniePreconditionException.class) void function() throws GenieException { this.service.removeAllConfigsForCommand(null); } | /**
* Test remove all configurations for command.
*
* @throws GenieException
*/ | Test remove all configurations for command | testRemoveAllConfigsForCommandNoId | {
"repo_name": "gorcz/genie",
"path": "genie-server/src/test/java/com/netflix/genie/server/services/impl/jpa/TestCommandConfigServiceJPAImpl.java",
"license": "apache-2.0",
"size": 44461
} | [
"com.netflix.genie.common.exceptions.GenieException",
"com.netflix.genie.common.exceptions.GeniePreconditionException",
"org.junit.Test"
] | import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GeniePreconditionException; import org.junit.Test; | import com.netflix.genie.common.exceptions.*; import org.junit.*; | [
"com.netflix.genie",
"org.junit"
] | com.netflix.genie; org.junit; | 355,985 |
CriteriaBuilder getCriteriaBuilder(); | CriteriaBuilder getCriteriaBuilder(); | /**
* Get a criteria builder for querying HoldingReproductions.
*
* @return the CriteriaBuilder.
*/ | Get a criteria builder for querying HoldingReproductions | getCriteriaBuilder | {
"repo_name": "IISH/delivery",
"path": "src/main/java/org/socialhistoryservices/delivery/reproduction/dao/HoldingReproductionDAO.java",
"license": "gpl-3.0",
"size": 1705
} | [
"javax.persistence.criteria.CriteriaBuilder"
] | import javax.persistence.criteria.CriteriaBuilder; | import javax.persistence.criteria.*; | [
"javax.persistence"
] | javax.persistence; | 1,273,560 |
@SuppressWarnings("unchecked")
public void testAddCampaignWithCappingFields()
throws XmlRpcException, MalformedURLException {
assertNotNull(advertiserId);
Map<String, Object> myCampaign = new HashMap<String, Object>();
myCampaign.put(ADVERTISER_ID, advertiserId);
myCampaign.put(CAMPAIGN_NAME, "test ca... | @SuppressWarnings(STR) void function() throws XmlRpcException, MalformedURLException { assertNotNull(advertiserId); Map<String, Object> myCampaign = new HashMap<String, Object>(); myCampaign.put(ADVERTISER_ID, advertiserId); myCampaign.put(CAMPAIGN_NAME, STR); myCampaign.put(START_DATE, DateUtils.MIN_DATE_VALUE); myCam... | /**
* Test method with all required fields.
*
* @throws XmlRpcException
* @throws MalformedURLException
*/ | Test method with all required fields | testAddCampaignWithCappingFields | {
"repo_name": "Tate-ad/revive-adserver",
"path": "www/api/v2/xmlrpc/tests/unit/src/test/java/org/openx/campaign/TestAddCampaign.java",
"license": "gpl-2.0",
"size": 16084
} | [
"java.net.MalformedURLException",
"java.util.HashMap",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException",
"org.openx.utils.DateUtils"
] | import java.net.MalformedURLException; import java.util.HashMap; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; import org.openx.utils.DateUtils; | import java.net.*; import java.util.*; import org.apache.xmlrpc.*; import org.openx.utils.*; | [
"java.net",
"java.util",
"org.apache.xmlrpc",
"org.openx.utils"
] | java.net; java.util; org.apache.xmlrpc; org.openx.utils; | 1,740,404 |
private JCudaBuffer toArgs(Object[] extraArgs, String dataType) {
if (dataType.equals("double")) {
if (extraArgs == null || extraArgs.length < 1)
return dummyDouble();
return KernelFunctions.alloc(PointerUtil.toDoubles(extraArgs));
} else if (dataType.equals("... | JCudaBuffer function(Object[] extraArgs, String dataType) { if (dataType.equals(STR)) { if (extraArgs == null extraArgs.length < 1) return dummyDouble(); return KernelFunctions.alloc(PointerUtil.toDoubles(extraArgs)); } else if (dataType.equals("float")) { if (extraArgs == null extraArgs.length < 1) return dummyFloat()... | /**
* Converts the given parameters
* in to extra arguments to
* pass to the kernel
*
* @param extraArgs the extra arguments
* @param dataType the data type
* @return
*/ | Converts the given parameters in to extra arguments to pass to the kernel | toArgs | {
"repo_name": "phvu/nd4j",
"path": "nd4j-jcublas-parent/nd4j-jcublas-common/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/JCudaExecutioner.java",
"license": "apache-2.0",
"size": 19339
} | [
"org.nd4j.linalg.jcublas.buffer.JCudaBuffer",
"org.nd4j.linalg.jcublas.kernel.KernelFunctions",
"org.nd4j.linalg.jcublas.util.PointerUtil"
] | import org.nd4j.linalg.jcublas.buffer.JCudaBuffer; import org.nd4j.linalg.jcublas.kernel.KernelFunctions; import org.nd4j.linalg.jcublas.util.PointerUtil; | import org.nd4j.linalg.jcublas.buffer.*; import org.nd4j.linalg.jcublas.kernel.*; import org.nd4j.linalg.jcublas.util.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 1,901,747 |
public void set_device_name(JSONObject object)
{
try
{
String id = object.getString("id");
String name = object.getString("name");
this.ohc.get_basestation().set_device_name(id, name);
}
catch(Exception ex)
{
this.ohc.logger.log(Level.WARNING, "Received invalid rpc response for set_device_name... | void function(JSONObject object) { try { String id = object.getString("id"); String name = object.getString("name"); this.ohc.get_basestation().set_device_name(id, name); } catch(Exception ex) { this.ohc.logger.log(Level.WARNING, STR + ex.getMessage(), ex); } } | /**
* Sets the name of a device
*
* @param object The RPC data
*/ | Sets the name of a device | set_device_name | {
"repo_name": "OpenHC/OHC-android",
"path": "app/src/main/java/io/openhc/ohc/basestation/rpc/Base_rpc.java",
"license": "mit",
"size": 4770
} | [
"java.util.logging.Level",
"org.json.JSONObject"
] | import java.util.logging.Level; import org.json.JSONObject; | import java.util.logging.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 1,394,457 |
public void setSelected(@Nullable CardType... cardTypes) {
if (cardTypes == null) {
cardTypes = new CardType[]{};
}
SpannableString spannableString = new SpannableString(new String(new char[mSupportedCardTypes.size()]));
PaddedImageSpan span;
for (int i = 0; i < ... | void function(@Nullable CardType... cardTypes) { if (cardTypes == null) { cardTypes = new CardType[]{}; } SpannableString spannableString = new SpannableString(new String(new char[mSupportedCardTypes.size()])); PaddedImageSpan span; for (int i = 0; i < mSupportedCardTypes.size(); i++) { span = new PaddedImageSpan(getCo... | /**
* Selects the intersection between the {@link CardType}s passed into
* {@link #setSupportedCardTypes(CardType...)} and {@link CardType}s passed into
* this method as visually enabled.
*
* The remaining supported card types will become visually disabled.
*
* {@link #setSupportedCar... | Selects the intersection between the <code>CardType</code>s passed into <code>#setSupportedCardTypes(CardType...)</code> and <code>CardType</code>s passed into this method as visually enabled. The remaining supported card types will become visually disabled. <code>#setSupportedCardTypes(CardType...)</code> must be call... | setSelected | {
"repo_name": "braintree/android-card-form",
"path": "CardForm/src/main/java/com/braintreepayments/cardform/view/SupportedCardTypesView.java",
"license": "mit",
"size": 2889
} | [
"android.text.SpannableString",
"androidx.annotation.Nullable",
"com.braintreepayments.cardform.utils.CardType",
"java.util.Arrays"
] | import android.text.SpannableString; import androidx.annotation.Nullable; import com.braintreepayments.cardform.utils.CardType; import java.util.Arrays; | import android.text.*; import androidx.annotation.*; import com.braintreepayments.cardform.utils.*; import java.util.*; | [
"android.text",
"androidx.annotation",
"com.braintreepayments.cardform",
"java.util"
] | android.text; androidx.annotation; com.braintreepayments.cardform; java.util; | 1,603,694 |
private GPMixTableChange readMixTableChange() throws IOException {
GPMixTableChange mtc = new GPMixTableChange();
int changes = readUnsignedByte();
// Tempo
if ((changes & 0x20) != 0) {
mtc.tempo = new GPMixTableElement();
mtc.tempo.setNewValue(readInt());
... | GPMixTableChange function() throws IOException { GPMixTableChange mtc = new GPMixTableChange(); int changes = readUnsignedByte(); if ((changes & 0x20) != 0) { mtc.tempo = new GPMixTableElement(); mtc.tempo.setNewValue(readInt()); mtc.tempo.setChangeDuration(readUnsignedByte()); } if ((changes & 0x10) != 0) { mtc.reverb... | /**
* Reads a mix table change event from the stream.
*
* @return The MixTableChange read.
* @throws IOException
*/ | Reads a mix table change event from the stream | readMixTableChange | {
"repo_name": "mauriciogracia/DGuitarSoftware",
"path": "DGuitar/src/dguitar/codecs/guitarPro/version2/GP2InputStream.java",
"license": "gpl-2.0",
"size": 26487
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 504,626 |
protected ResourceLocation getEntityTexture(EntityAirshipV4Cyan entity)
{
return ENTITY_TEXTURE[entity.getBoatType().ordinal()];
} | ResourceLocation function(EntityAirshipV4Cyan entity) { return ENTITY_TEXTURE[entity.getBoatType().ordinal()]; } | /**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/ | Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture | getEntityTexture | {
"repo_name": "Weisses/Ebonheart-Mods",
"path": "ViesCraft/Archived/zzz - PreCapabilities - src/main/java/com/viesis/viescraft/client/entity/render/airshipcolors/v4/RenderAirshipV4Cyan.java",
"license": "mit",
"size": 4627
} | [
"com.viesis.viescraft.common.entity.airshipcolors.v4.EntityAirshipV4Cyan",
"net.minecraft.util.ResourceLocation"
] | import com.viesis.viescraft.common.entity.airshipcolors.v4.EntityAirshipV4Cyan; import net.minecraft.util.ResourceLocation; | import com.viesis.viescraft.common.entity.airshipcolors.v4.*; import net.minecraft.util.*; | [
"com.viesis.viescraft",
"net.minecraft.util"
] | com.viesis.viescraft; net.minecraft.util; | 2,571,359 |
public void putAt(final int index, final Object newValue) {
final GPathResult result = (GPathResult)getAt(index);
if (newValue instanceof Closure) {
result.replaceNode((Closure)newValue);
} else {
result.replaceBody(newValue);
}
} | void function(final int index, final Object newValue) { final GPathResult result = (GPathResult)getAt(index); if (newValue instanceof Closure) { result.replaceNode((Closure)newValue); } else { result.replaceBody(newValue); } } | /**
* A helper method to allow GPathResults to work with subscript operators
* @param index an index
* @param newValue the value to put at the given index
*/ | A helper method to allow GPathResults to work with subscript operators | putAt | {
"repo_name": "Selventa/model-builder",
"path": "tools/groovy/src/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java",
"license": "apache-2.0",
"size": 21434
} | [
"groovy.lang.Closure"
] | import groovy.lang.Closure; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,753,214 |
public void transformFile(File inFile, String inFileExtension, File transformedFile) throws Exception;
| void function(File inFile, String inFileExtension, File transformedFile) throws Exception; | /**
* Create a transformation of the given file and write it out to the transformed file.
*
* @param inFile - file to make a transform of.
* @param transformedFile - the file to save the transformation to
*
*/ | Create a transformation of the given file and write it out to the transformed file | transformFile | {
"repo_name": "nate-rcl/irplus",
"path": "ir_core/src/edu/ur/ir/file/transformer/FileTransformer.java",
"license": "apache-2.0",
"size": 1968
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,995,171 |
@SuppressWarnings("deprecation")
@Override
public Result preAppend(final ObserverContext<RegionCoprocessorEnvironment> e,
final Append append) throws IOException {
byte[] opBuf = append.getAttribute(OPERATION_ATTRIB);
if (opBuf == null) {
return null;
}
... | @SuppressWarnings(STR) Result function(final ObserverContext<RegionCoprocessorEnvironment> e, final Append append) throws IOException { byte[] opBuf = append.getAttribute(OPERATION_ATTRIB); if (opBuf == null) { return null; } Sequence.MetaOp op = Sequence.MetaOp.values()[opBuf[0]]; Cell keyValue = append.getFamilyCellM... | /**
* Override the preAppend for checkAndPut and checkAndDelete, as we need the ability to
* a) set the TimeRange for the Get being done and
* b) return something back to the client to indicate success/failure
*/ | Override the preAppend for checkAndPut and checkAndDelete, as we need the ability to a) set the TimeRange for the Get being done and b) return something back to the client to indicate success/failure | preAppend | {
"repo_name": "shehzaadn/phoenix",
"path": "phoenix-core/src/main/java/org/apache/phoenix/coprocessor/SequenceRegionObserver.java",
"license": "apache-2.0",
"size": 24076
} | [
"com.google.common.collect.Lists",
"java.io.IOException",
"java.util.Collections",
"java.util.List",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellUtil",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.KeyValue",
"org.apache.hadoop.hbase.client.Append",
"org.apache.ha... | import com.google.common.collect.Lists; import java.io.IOException; import java.util.Collections; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client... | import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.coprocessor.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*; import org.apache.phoenix.exception.*; ... | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop",
"org.apache.phoenix"
] | com.google.common; java.io; java.util; org.apache.hadoop; org.apache.phoenix; | 1,029,096 |
public SubscriptionKeys withKey(Collection<String> keyList); | SubscriptionKeys function(Collection<String> keyList); | /**
* Copy this policy and override the value of the property.
* @param keyList A collection of strings with one or more names of topic fields acting as alternative keys.
* @return a new SubscriptionKeys policy
*/ | Copy this policy and override the value of the property | withKey | {
"repo_name": "PrismTech/opensplice",
"path": "src/api/dcps/java5/common/java/code/org/opensplice/dds/core/policy/SubscriptionKeys.java",
"license": "gpl-3.0",
"size": 4885
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,366,391 |
public void setActiveStartDate(@Nullable Date activeStartDate); | void function(@Nullable Date activeStartDate); | /**
* Sets the active start date. If the current date is before activeStartDate,
* then this category will not be visible on the site.
*
* @param activeStartDate the new active start date
*/ | Sets the active start date. If the current date is before activeStartDate, then this category will not be visible on the site | setActiveStartDate | {
"repo_name": "cloudbearings/BroadleafCommerce",
"path": "core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/catalog/domain/Category.java",
"license": "apache-2.0",
"size": 24718
} | [
"java.util.Date",
"javax.annotation.Nullable"
] | import java.util.Date; import javax.annotation.Nullable; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 927,531 |
public static void printError(Object object) {
if (Log.ERROR > DEBUG_LEVEL) {
String tag = getClassName();
String method = callMethodAndLine();
String content = "";
if (object != null) {
content = object.toString() + " ---- ... | static void function(Object object) { if (Log.ERROR > DEBUG_LEVEL) { String tag = getClassName(); String method = callMethodAndLine(); String content = STR ---- STR ## STR ---- STR STR " + content); } } } | /**
* Send an {@link android.util.Log#ERROR} log message.
*
* @param object The object to print.
*/ | Send an <code>android.util.Log#ERROR</code> log message | printError | {
"repo_name": "FreedomZZQ/YouJoin-Android",
"path": "app/src/main/java/me/zq/youjoin/utils/LogUtils.java",
"license": "mit",
"size": 10134
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 206,139 |
private void startMembershipAttributes(Attributes atts) {
Object[] attrs = new Object[2]; // loss-action, resumption-action
attrs[0] = atts.getValue(LOSS_ACTION) == null ? LossAction.NO_ACCESS.toString()
: atts.getValue(LOSS_ACTION);
attrs[1] = atts.getValue(RESUMPTION_ACTION) == null ? Resumption... | void function(Attributes atts) { Object[] attrs = new Object[2]; attrs[0] = atts.getValue(LOSS_ACTION) == null ? LossAction.NO_ACCESS.toString() : atts.getValue(LOSS_ACTION); attrs[1] = atts.getValue(RESUMPTION_ACTION) == null ? ResumptionAction.REINITIALIZE.toString() : atts.getValue(RESUMPTION_ACTION); stack.push(att... | /**
* When a <code>membership-attributes</code> element is encountered, we push an array of
* attributes for creation of a MembershipAttributes.
*/ | When a <code>membership-attributes</code> element is encountered, we push an array of attributes for creation of a MembershipAttributes | startMembershipAttributes | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java",
"license": "apache-2.0",
"size": 130334
} | [
"org.apache.geode.cache.LossAction",
"org.apache.geode.cache.ResumptionAction",
"org.xml.sax.Attributes"
] | import org.apache.geode.cache.LossAction; import org.apache.geode.cache.ResumptionAction; import org.xml.sax.Attributes; | import org.apache.geode.cache.*; import org.xml.sax.*; | [
"org.apache.geode",
"org.xml.sax"
] | org.apache.geode; org.xml.sax; | 615,971 |
public static void openDatabase(final Window parent, final IDatabase database) {
openDatabaseThreaded(parent, null, database);
} | static void function(final Window parent, final IDatabase database) { openDatabaseThreaded(parent, null, database); } | /**
* Creates a connection to a given database.
*
* @param parent Parent window used for dialogs.
* @param database The database to connect to.
*/ | Creates a connection to a given database | openDatabase | {
"repo_name": "AmesianX/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Gui/MainWindow/Implementations/CDatabaseConnectionFunctions.java",
"license": "apache-2.0",
"size": 3684
} | [
"com.google.security.zynamics.binnavi.Database",
"java.awt.Window"
] | import com.google.security.zynamics.binnavi.Database; import java.awt.Window; | import com.google.security.zynamics.binnavi.*; import java.awt.*; | [
"com.google.security",
"java.awt"
] | com.google.security; java.awt; | 681,439 |
public void setProperties(Properties properties)
{
} | void function(Properties properties) { } | /**
* Set the command Properties
*
* @param properties The properties.
*/ | Set the command Properties | setProperties | {
"repo_name": "iritgo/iritgo-aktario",
"path": "aktario-framework/src/main/java/de/iritgo/aktario/framework/client/command/ChangeLanguage.java",
"license": "apache-2.0",
"size": 2734
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 2,090,743 |
public String getWMLToolsDir( )
{
return getString( installPrefix_ + Preferences.WESNOTH_WMLTOOLS_DIR )
.replace( '\\', '/' )
+ IPath.SEPARATOR;
} | String function( ) { return getString( installPrefix_ + Preferences.WESNOTH_WMLTOOLS_DIR ) .replace( '\\', '/' ) + IPath.SEPARATOR; } | /**
* Returns the directory that contains the wml tools
* ( wmlscope, wmllint, wmlindent, wesnoth_addons_manager, etc)
*
* @return Returns the directory that contains the wml tools
*/ | Returns the directory that contains the wml tools ( wmlscope, wmllint, wmlindent, wesnoth_addons_manager, etc) | getWMLToolsDir | {
"repo_name": "RushilPatel/BattleForWesnoth",
"path": "utils/umc_dev/org.wesnoth/src/org/wesnoth/preferences/Preferences.java",
"license": "gpl-2.0",
"size": 15612
} | [
"org.eclipse.core.runtime.IPath"
] | import org.eclipse.core.runtime.IPath; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,841,791 |
private static void intervalBased() {
// Create the builder
HierarchyBuilderIntervalBased<Long> builder = HierarchyBuilderIntervalBased.create(
DataType.INTEGER,
new Range<Long... | static void function() { HierarchyBuilderIntervalBased<Long> builder = HierarchyBuilderIntervalBased.create( DataType.INTEGER, new Range<Long>(0l,0l,Long.MIN_VALUE / 4), new Range<Long>(100l,100l,Long.MAX_VALUE / 4)); builder.setAggregateFunction(DataType.INTEGER.createAggregate().createIntervalFunction(true, false)); ... | /**
* Exemplifies the use of the interval-based builder.
*/ | Exemplifies the use of the interval-based builder | intervalBased | {
"repo_name": "arx-deidentifier/arx",
"path": "src/example/org/deidentifier/arx/examples/Example18.java",
"license": "apache-2.0",
"size": 12890
} | [
"org.deidentifier.arx.DataType",
"org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased"
] | import org.deidentifier.arx.DataType; import org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased; | import org.deidentifier.arx.*; import org.deidentifier.arx.aggregates.*; | [
"org.deidentifier.arx"
] | org.deidentifier.arx; | 981,682 |
public void recycle() {
remaining = 0;
pos = 0;
lastValid = 0;
endChunk = false;
needCRLFParse = false;
trailingHeaders.recycle();
if (org.apache.coyote.Constants.MAX_TRAILER_SIZE > 0) {
trailingHeaders.setLimit(org.apache.coyote.Constants.... | void function() { remaining = 0; pos = 0; lastValid = 0; endChunk = false; needCRLFParse = false; trailingHeaders.recycle(); if (org.apache.coyote.Constants.MAX_TRAILER_SIZE > 0) { trailingHeaders.setLimit(org.apache.coyote.Constants.MAX_TRAILER_SIZE); } extensionSize = 0; error = false; } | /**
* Make the filter ready to process the next request.
*/ | Make the filter ready to process the next request | recycle | {
"repo_name": "yuyupapa/OpenSource",
"path": "apache-tomcat-6.0.48/java/org/apache/coyote/http11/filters/ChunkedInputFilter.java",
"license": "apache-2.0",
"size": 18214
} | [
"org.apache.coyote.http11.Constants"
] | import org.apache.coyote.http11.Constants; | import org.apache.coyote.http11.*; | [
"org.apache.coyote"
] | org.apache.coyote; | 26,330 |
public void _testVerifyRemoveOnFailedUpdate() throws NativeMemoryException, IOException
{
LOG.info("Test verify remove on failed update:" + Thread.currentThread().getName());
// check that key is in the cache
String vkey = "key"+(N -1);
assertNotNull(sCache.get(vkey));
// Now update with n... | void function() throws NativeMemoryException, IOException { LOG.info(STR + Thread.currentThread().getName()); String vkey = "key"+(N -1); assertNotNull(sCache.get(vkey)); byte[] buffer = new byte[2*SIZE]; org.yamm.util.Utils.memset(buffer, (byte)5); sCache.put(vkey, buffer); assertNull(sCache.get(vkey)); LOG.info(STR);... | /**
* This test works only if memory allocator allows allocation failure
*
* @throws NativeMemoryException
* @throws IOException
*/ | This test works only if memory allocator allows allocation failure | _testVerifyRemoveOnFailedUpdate | {
"repo_name": "VladRodionov/bigbase",
"path": "koda/src/test/java/com/koda/test/MemoryAllocationFailureTest.java",
"license": "agpl-3.0",
"size": 6074
} | [
"com.koda.NativeMemoryException",
"java.io.IOException"
] | import com.koda.NativeMemoryException; import java.io.IOException; | import com.koda.*; import java.io.*; | [
"com.koda",
"java.io"
] | com.koda; java.io; | 498,326 |
public static <TItem> Bson nin(final String fieldName, final Iterable<TItem> values) {
return new SimpleEncodingFilter<Bson>(fieldName, new IterableOperatorFilter<TItem>("$nin", values));
}
/**
* Creates a filter that performs a logical AND of the provided list of filters. Note that this will... | static <TItem> Bson function(final String fieldName, final Iterable<TItem> values) { return new SimpleEncodingFilter<Bson>(fieldName, new IterableOperatorFilter<TItem>("$nin", values)); } /** * Creates a filter that performs a logical AND of the provided list of filters. Note that this will only generate a "$and" * ope... | /**
* Creates a filter that matches all documents where the value of a field does not equal any of the specified values or does not exist.
*
* @param fieldName the field name
* @param values the list of values
* @param <TItem> the value type
* @return the filter
* @mongodb.driver... | Creates a filter that matches all documents where the value of a field does not equal any of the specified values or does not exist | nin | {
"repo_name": "kay-kim/mongo-java-driver",
"path": "driver-core/src/main/com/mongodb/client/model/Filters.java",
"license": "apache-2.0",
"size": 42464
} | [
"org.bson.conversions.Bson"
] | import org.bson.conversions.Bson; | import org.bson.conversions.*; | [
"org.bson.conversions"
] | org.bson.conversions; | 1,849,935 |
public void testToggleStep() {
Channel c = new Channel();
c.setStep(0, true);
c.toggleStep(0);
c.toggleStep(1);
Assert.assertEquals(false, c.isStepActive(0));
Assert.assertEquals(true, c.isStepActive(1));
}
| void function() { Channel c = new Channel(); c.setStep(0, true); c.toggleStep(0); c.toggleStep(1); Assert.assertEquals(false, c.isStepActive(0)); Assert.assertEquals(true, c.isStepActive(1)); } | /**
* Tests toggleStep(int)
*/ | Tests toggleStep(int) | testToggleStep | {
"repo_name": "KVHC/adrumdrum",
"path": "test/ADrumDrumTest/src/kvhc/adrumdrum/test/ChannelTest.java",
"license": "gpl-3.0",
"size": 10021
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 1,839,909 |
void sendRedirect(String URL) throws IOException; | void sendRedirect(String URL) throws IOException; | /**
* Sends a redirect to the client.
*
* @param URL
* full or partial (relative) URL to send to the client
* @see #encodeRedirectURL(String)
*/ | Sends a redirect to the client | sendRedirect | {
"repo_name": "apache/tapestry-5",
"path": "tapestry-http/src/main/java/org/apache/tapestry5/http/services/Response.java",
"license": "apache-2.0",
"size": 6667
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 750,031 |
@SuppressWarnings("UnusedDeclaration")
protected void initProjectStage(@Observes AfterDeploymentValidation afterDeploymentValidation)
{
ProjectStageProducer.getInstance();
}
/**
* Observer which is vetoing beans based on {@link Exclude} | @SuppressWarnings(STR) void function(@Observes AfterDeploymentValidation afterDeploymentValidation) { ProjectStageProducer.getInstance(); } /** * Observer which is vetoing beans based on {@link Exclude} | /**
* triggers initialization in any case
* @param afterDeploymentValidation observed event
*/ | triggers initialization in any case | initProjectStage | {
"repo_name": "struberg/deltaspike",
"path": "deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/exclude/extension/ExcludeExtension.java",
"license": "apache-2.0",
"size": 22319
} | [
"javax.enterprise.event.Observes",
"javax.enterprise.inject.spi.AfterDeploymentValidation",
"org.apache.deltaspike.core.api.exclude.Exclude",
"org.apache.deltaspike.core.util.ProjectStageProducer"
] | import javax.enterprise.event.Observes; import javax.enterprise.inject.spi.AfterDeploymentValidation; import org.apache.deltaspike.core.api.exclude.Exclude; import org.apache.deltaspike.core.util.ProjectStageProducer; | import javax.enterprise.event.*; import javax.enterprise.inject.spi.*; import org.apache.deltaspike.core.api.exclude.*; import org.apache.deltaspike.core.util.*; | [
"javax.enterprise",
"org.apache.deltaspike"
] | javax.enterprise; org.apache.deltaspike; | 1,863,568 |
MatcherAssert.assertThat(
new RtNotifications().iterate(),
Matchers.emptyIterable()
);
} | MatcherAssert.assertThat( new RtNotifications().iterate(), Matchers.emptyIterable() ); } | /**
* RtReleases can fetch empty list of releases.
* @throws Exception if some problem inside
*/ | RtReleases can fetch empty list of releases | fetchEmptyListOfNotifications | {
"repo_name": "cvrebert/typed-github",
"path": "src/test/java/com/jcabi/github/RtNotificationsTest.java",
"license": "bsd-3-clause",
"size": 3224
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 82,472 |
void enterSwitchBlockStatementGroup(@NotNull JavaParser.SwitchBlockStatementGroupContext ctx);
void exitSwitchBlockStatementGroup(@NotNull JavaParser.SwitchBlockStatementGroupContext ctx); | void enterSwitchBlockStatementGroup(@NotNull JavaParser.SwitchBlockStatementGroupContext ctx); void exitSwitchBlockStatementGroup(@NotNull JavaParser.SwitchBlockStatementGroupContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#switchBlockStatementGroup}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#switchBlockStatementGroup</code> | exitSwitchBlockStatementGroup | {
"repo_name": "hgkmail/HelloJava",
"path": "src/cn/hgk/hellojava/JavaListener.java",
"license": "gpl-2.0",
"size": 38976
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,615,825 |
@Override public T visitStatements(@NotNull SQLANNParser.StatementsContext ctx) { return visitChildren(ctx); } | @Override public T visitStatements(@NotNull SQLANNParser.StatementsContext ctx) { return visitChildren(ctx); } | /**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/ | The default implementation returns the result of calling <code>#visitChildren</code> on ctx | visitDataAttribute | {
"repo_name": "wfcreations/ANNMS",
"path": "src/br/com/wfcreations/annms/core/sqlann/SQLANNBaseVisitor.java",
"license": "bsd-3-clause",
"size": 10911
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,330,741 |
public IBlockState withMirror(IBlockState state, Mirror mirrorIn)
{
return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
} | IBlockState function(IBlockState state, Mirror mirrorIn) { return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING))); } | /**
* Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed
* blockstate.
*/ | Returns the blockstate with the given mirror of the passed blockstate. If inapplicable, returns the passed blockstate | withMirror | {
"repo_name": "robertusengel/aoemod",
"path": "blocks/BarrackTorch.java",
"license": "mit",
"size": 14793
} | [
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.Mirror"
] | import net.minecraft.block.state.IBlockState; import net.minecraft.util.EnumFacing; import net.minecraft.util.Mirror; | import net.minecraft.block.state.*; import net.minecraft.util.*; | [
"net.minecraft.block",
"net.minecraft.util"
] | net.minecraft.block; net.minecraft.util; | 2,602,298 |
private Calendar getTimeFromPoint(float x, float y){
int leftDaysWithGaps = (int) -(Math.ceil(mCurrentOrigin.x / (mWidthPerDay + mColumnGap)));
float startPixel = mCurrentOrigin.x + (mWidthPerDay + mColumnGap) * leftDaysWithGaps +
mHeaderColumnWidth;
for (int dayNumber = left... | Calendar function(float x, float y){ int leftDaysWithGaps = (int) -(Math.ceil(mCurrentOrigin.x / (mWidthPerDay + mColumnGap))); float startPixel = mCurrentOrigin.x + (mWidthPerDay + mColumnGap) * leftDaysWithGaps + mHeaderColumnWidth; for (int dayNumber = leftDaysWithGaps + 1; dayNumber <= leftDaysWithGaps + mNumberOfV... | /**
* Get the time and date where the user clicked on.
* @param x The x position of the touch event.
* @param y The y position of the touch event.
* @return The time and date at the clicked position.
*/ | Get the time and date where the user clicked on | getTimeFromPoint | {
"repo_name": "siavash-sajjad/Persian-Week-View",
"path": "library/src/main/java/com/alamkanak/weekview/WeekView.java",
"license": "apache-2.0",
"size": 65086
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,966,305 |
public void deleteUserStore(String domainName) throws IdentityUserStoreMgtException {
deleteUserStoresSet(new String[] {domainName});
} | void function(String domainName) throws IdentityUserStoreMgtException { deleteUserStoresSet(new String[] {domainName}); } | /**
* Deletes the user store specified
*
* @param domainName: domain name of the user stores to be deleted
*/ | Deletes the user store specified | deleteUserStore | {
"repo_name": "pulasthi7/carbon-identity",
"path": "components/user-store/org.wso2.carbon.identity.user.store.configuration/src/main/java/org/wso2/carbon/identity/user/store/configuration/UserStoreConfigAdminService.java",
"license": "apache-2.0",
"size": 46162
} | [
"org.wso2.carbon.identity.user.store.configuration.utils.IdentityUserStoreMgtException"
] | import org.wso2.carbon.identity.user.store.configuration.utils.IdentityUserStoreMgtException; | import org.wso2.carbon.identity.user.store.configuration.utils.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,117,315 |
public Application addCollaborator(Collaborator _collaborator) {
return wrapped.addCollaborator(_collaborator)
.map((i) -> this)
.toBlocking()
.single();
} | Application function(Collaborator _collaborator) { return wrapped.addCollaborator(_collaborator) .map((i) -> this) .toBlocking() .single(); } | /**
* Add a collaborator to this application
*
* @param _collaborator the Collaborator to be added
* @return the updated Application
*/ | Add a collaborator to this application | addCollaborator | {
"repo_name": "TheThingsNetwork/java-app-sdk",
"path": "account/src/main/java/org/thethingsnetwork/account/sync/Application.java",
"license": "mit",
"size": 9498
} | [
"org.thethingsnetwork.account.common.Collaborator"
] | import org.thethingsnetwork.account.common.Collaborator; | import org.thethingsnetwork.account.common.*; | [
"org.thethingsnetwork.account"
] | org.thethingsnetwork.account; | 1,841,494 |
@Override
public Entity getEntityById(String entityId) throws SynapseException {
return getEntityByIdForVersion(entityId, null);
} | Entity function(String entityId) throws SynapseException { return getEntityByIdForVersion(entityId, null); } | /**
* Get an entity using its ID.
*
* @param entityId
* @return the entity
* @throws SynapseException
*/ | Get an entity using its ID | getEntityById | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "client/synapseJavaClient/src/main/java/org/sagebionetworks/client/SynapseClientImpl.java",
"license": "apache-2.0",
"size": 223652
} | [
"org.sagebionetworks.client.exceptions.SynapseException",
"org.sagebionetworks.repo.model.Entity"
] | import org.sagebionetworks.client.exceptions.SynapseException; import org.sagebionetworks.repo.model.Entity; | import org.sagebionetworks.client.exceptions.*; import org.sagebionetworks.repo.model.*; | [
"org.sagebionetworks.client",
"org.sagebionetworks.repo"
] | org.sagebionetworks.client; org.sagebionetworks.repo; | 1,581,432 |
public HttpClientRequestActionBuilder put(String path) {
return request(HttpMethod.PUT, path);
} | HttpClientRequestActionBuilder function(String path) { return request(HttpMethod.PUT, path); } | /**
* Sends Http PUT request as client to server.
*/ | Sends Http PUT request as client to server | put | {
"repo_name": "hmmlopez/citrus",
"path": "modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/HttpClientActionBuilder.java",
"license": "apache-2.0",
"size": 6745
} | [
"org.springframework.http.HttpMethod"
] | import org.springframework.http.HttpMethod; | import org.springframework.http.*; | [
"org.springframework.http"
] | org.springframework.http; | 1,454,455 |
public static void writeEdge(Node src, Node tgt, Edge edge,
PrintWriter writer) {
StringBuilder sb = new StringBuilder();
RelationshipType rel = edge.rel;
String reldispval = rel.getDisplayValue();
sb.append(" <edge label='");
String dispval = format(EDGE_LABEL, ... | static void function(Node src, Node tgt, Edge edge, PrintWriter writer) { StringBuilder sb = new StringBuilder(); RelationshipType rel = edge.rel; String reldispval = rel.getDisplayValue(); sb.append(STR); String dispval = format(EDGE_LABEL, src.label, rel, tgt.label); sb.append(dispval); sb.append(STR); sb.append(edge... | /**
* Write an XGMML <edge> from {@code edge} properties.
*
* @param edge {@link Edge}, the edge to write
* @param writer {@link PrintWriter}, the writer
*/ | Write an XGMML <edge> from edge properties | writeEdge | {
"repo_name": "OpenBEL/openbel-framework",
"path": "org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/xgmml/XGMMLUtility.java",
"license": "apache-2.0",
"size": 12103
} | [
"java.io.PrintWriter",
"java.lang.String",
"org.openbel.framework.common.enums.RelationshipType",
"org.openbel.framework.tools.xgmml.XGMMLObjects"
] | import java.io.PrintWriter; import java.lang.String; import org.openbel.framework.common.enums.RelationshipType; import org.openbel.framework.tools.xgmml.XGMMLObjects; | import java.io.*; import java.lang.*; import org.openbel.framework.common.enums.*; import org.openbel.framework.tools.xgmml.*; | [
"java.io",
"java.lang",
"org.openbel.framework"
] | java.io; java.lang; org.openbel.framework; | 2,015,551 |
public String getRowBackgroundStyle(){
return "background-color:#"+SyslogUtil.getBackgroundColor(Integer.parseInt(entry.getSeverity()))+";";
} | String function(){ return STR+SyslogUtil.getBackgroundColor(Integer.parseInt(entry.getSeverity()))+";"; } | /**
* Gets the row background style.
*
* @return the row background style
*/ | Gets the row background style | getRowBackgroundStyle | {
"repo_name": "freeacs/web",
"path": "src/com/owera/xaps/web/app/page/report/uidata/RecordUIDataSyslogFromReport.java",
"license": "mit",
"size": 2864
} | [
"com.owera.xaps.web.app.page.syslog.SyslogUtil"
] | import com.owera.xaps.web.app.page.syslog.SyslogUtil; | import com.owera.xaps.web.app.page.syslog.*; | [
"com.owera.xaps"
] | com.owera.xaps; | 94,216 |
Properties getClientInfo()
throws SQLException; | Properties getClientInfo() throws SQLException; | /**
* Returns a list containing the name and current value of each client info
* property supported by the driver. The value of a client info property
* may be null if the property has not been set and does not have a
* default value.
* <p>
* @return A <code>P... | Returns a list containing the name and current value of each client info property supported by the driver. The value of a client info property may be null if the property has not been set and does not have a default value. | getClientInfo | {
"repo_name": "openjdk/jdk7u",
"path": "jdk/src/share/classes/java/sql/Connection.java",
"license": "gpl-2.0",
"size": 73216
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 187,121 |
private int countNotSatisfiedConstrains(Point pos, int value) {
int counter = 0;
Set<Arc> constrains = getNeighbors(pos);
for (Arc con : constrains) {
if (!con.isSatisfied(value)) {
counter++;
}
}
return counter;
}
| int function(Point pos, int value) { int counter = 0; Set<Arc> constrains = getNeighbors(pos); for (Arc con : constrains) { if (!con.isSatisfied(value)) { counter++; } } return counter; } | /**
* count the constrains which are not satisfied with the assignment of the
* variable at <code>pos</code> with <code>value</code>.
* @param pos position of the variable
* @param value
* @return
*/ | count the constrains which are not satisfied with the assignment of the variable at <code>pos</code> with <code>value</code> | countNotSatisfiedConstrains | {
"repo_name": "firerain42/ai-lecture",
"path": "Ex-4.2/src/CSP.java",
"license": "mit",
"size": 10820
} | [
"java.awt.Point",
"java.util.Set"
] | import java.awt.Point; import java.util.Set; | import java.awt.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 1,880,315 |
public ServiceCall<DateTime> getLocalNegativeOffsetMinDateTimeAsync(final ServiceCallback<DateTime> serviceCallback) {
return ServiceCall.create(getLocalNegativeOffsetMinDateTimeWithServiceResponseAsync(), serviceCallback);
} | ServiceCall<DateTime> function(final ServiceCallback<DateTime> serviceCallback) { return ServiceCall.create(getLocalNegativeOffsetMinDateTimeWithServiceResponseAsync(), serviceCallback); } | /**
* Get min datetime value 0001-01-01T00:00:00-14:00.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ServiceCall} object
*/ | Get min datetime value 0001-01-01T00:00:00-14:00 | getLocalNegativeOffsetMinDateTimeAsync | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydatetime/implementation/DatetimesImpl.java",
"license": "mit",
"size": 60457
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"org.joda.time.DateTime"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import org.joda.time.DateTime; | import com.microsoft.rest.*; import org.joda.time.*; | [
"com.microsoft.rest",
"org.joda.time"
] | com.microsoft.rest; org.joda.time; | 395,381 |
public static <T> Predicate<T> onePredicate(final Collection<? extends Predicate<T>> predicates) {
final Predicate<? super T>[] preds = FunctorUtils.validate(predicates);
return new OnePredicate<T>(preds);
}
public OnePredicate(final Predicate<? super T>... predicates) {
super(... | static <T> Predicate<T> function(final Collection<? extends Predicate<T>> predicates) { final Predicate<? super T>[] preds = FunctorUtils.validate(predicates); return new OnePredicate<T>(preds); } public OnePredicate(final Predicate<? super T>... predicates) { super(predicates); } | /**
* Factory to create the predicate.
*
* @param <T> the type that the predicate queries
* @param predicates the predicates to check, cloned, not null
* @return the <code>one</code> predicate
* @throws IllegalArgumentException if the predicates array is null
* @throws IllegalArgumen... | Factory to create the predicate | onePredicate | {
"repo_name": "krivachy/compgs03_mutation_testing",
"path": "src/main/java/org/apache/commons/collections4/functors/OnePredicate.java",
"license": "apache-2.0",
"size": 3945
} | [
"java.util.Collection",
"org.apache.commons.collections4.Predicate"
] | import java.util.Collection; import org.apache.commons.collections4.Predicate; | import java.util.*; import org.apache.commons.collections4.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 1,832,397 |
public static void transactionHashToResult(final Intent result, final String txHash)
{
result.putExtra(INTENT_EXTRA_TRANSACTION_HASH, txHash);
} | static void function(final Intent result, final String txHash) { result.putExtra(INTENT_EXTRA_TRANSACTION_HASH, txHash); } | /**
* Put transaction hash into result intent. Meant for usage by Bitcoin wallet applications.
*
* @param result
* result intent
* @param txHash
* transaction hash
*/ | Put transaction hash into result intent. Meant for usage by Bitcoin wallet applications | transactionHashToResult | {
"repo_name": "bitfynd/bitfynd-wallet-android",
"path": "app/src/main/java/de/schildbach/wallet/integration/android/BitcoinIntegration.java",
"license": "gpl-3.0",
"size": 9982
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 675,611 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.