method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void methodAction(final HttpServletRequest req,
final HttpServletResponse resp,
final HTTP method) throws ServletException, IOException {
try {
String userApprovedParamS =
req.getParameter(ProxyUriUtils.PROXY_APPROVAL_PARAM);
boolean userWasWarned = false;
boolean us... | void function(final HttpServletRequest req, final HttpServletResponse resp, final HTTP method) throws ServletException, IOException { try { String userApprovedParamS = req.getParameter(ProxyUriUtils.PROXY_APPROVAL_PARAM); boolean userWasWarned = false; boolean userApproved = Boolean.parseBoolean(userApprovedParamS); bo... | /**
* The action against the HTTP method.
* @param req the HttpServletRequest
* @param resp the HttpServletResponse
* @param method the HTTP method
* @throws ServletException
* @throws IOException
*/ | The action against the HTTP method | methodAction | {
"repo_name": "bitmybytes/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java",
"license": "apache-2.0",
"size": 22665
} | [
"java.io.IOException",
"java.net.URISyntaxException",
"javax.servlet.ServletException",
"javax.servlet.http.Cookie",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.hadoop.yarn.exceptions.YarnException"
] | import java.io.IOException; import java.net.URISyntaxException; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.hadoop.yarn.exceptions.YarnException; | import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.hadoop.yarn.exceptions.*; | [
"java.io",
"java.net",
"javax.servlet",
"org.apache.hadoop"
] | java.io; java.net; javax.servlet; org.apache.hadoop; | 161,140 |
public void setElement(Element element, String BaseURI)
throws XMLSecurityException {
if (element == null) {
throw new XMLSecurityException("ElementProxy.nullElement");
}
if (true) {
}
if (true) {
if (log.isLoggable(java.util.logging.Level.FINE)) ... | void function(Element element, String BaseURI) throws XMLSecurityException { if (element == null) { throw new XMLSecurityException(STR); } if (true) { } if (true) { if (log.isLoggable(java.util.logging.Level.FINE)) log.log(java.util.logging.Level.FINE, STR + element.getTagName() + STRSTR\""); } this._doc = element.getO... | /**
* Method setElement
*
* @param element
* @param BaseURI
* @throws XMLSecurityException
*/ | Method setElement | setElement | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java",
"license": "apache-2.0",
"size": 15537
} | [
"com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException",
"org.w3c.dom.Element"
] | import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException; import org.w3c.dom.Element; | import com.sun.org.apache.xml.internal.security.exceptions.*; import org.w3c.dom.*; | [
"com.sun.org",
"org.w3c.dom"
] | com.sun.org; org.w3c.dom; | 1,169,053 |
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mActivity = getSherlockActivity();
mStatusTitle = (TextView) mActivity.findViewById(R.id.status_title);
mStatusText = (TextView) mActivity.findViewById(R.id.status_text);
... | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mActivity = getSherlockActivity(); mStatusTitle = (TextView) mActivity.findViewById(R.id.status_title); mStatusText = (TextView) mActivity.findViewById(R.id.status_text); mStatusProgress = (ProgressBar) mActivity.findViewById(R.id.status_pro... | /**
* Called when the activity is first created.
*/ | Called when the activity is first created | onActivityCreated | {
"repo_name": "LorDClockaN/AdAway",
"path": "AdAway/src/main/java/org/adaway/ui/BaseFragment.java",
"license": "gpl-3.0",
"size": 9140
} | [
"android.os.Bundle",
"android.util.Log",
"android.widget.Button",
"android.widget.ImageView",
"android.widget.ProgressBar",
"android.widget.TextView",
"org.adaway.util.Constants"
] | import android.os.Bundle; import android.util.Log; import android.widget.Button; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; import org.adaway.util.Constants; | import android.os.*; import android.util.*; import android.widget.*; import org.adaway.util.*; | [
"android.os",
"android.util",
"android.widget",
"org.adaway.util"
] | android.os; android.util; android.widget; org.adaway.util; | 2,779,917 |
public void queueInput(ShortBuffer buffer) {
int samplesToWrite = buffer.remaining() / numChannels;
int bytesToWrite = samplesToWrite * numChannels * 2;
enlargeInputBufferIfNeeded(samplesToWrite);
buffer.get(inputBuffer, numInputSamples * numChannels, bytesToWrite / 2);
numInputSamples += samplesT... | void function(ShortBuffer buffer) { int samplesToWrite = buffer.remaining() / numChannels; int bytesToWrite = samplesToWrite * numChannels * 2; enlargeInputBufferIfNeeded(samplesToWrite); buffer.get(inputBuffer, numInputSamples * numChannels, bytesToWrite / 2); numInputSamples += samplesToWrite; processStreamInput(); } | /**
* Queues remaining data from {@code buffer}, and advances its position by the number of bytes
* consumed.
*
* @param buffer A {@link ShortBuffer} containing input data between its position and limit.
*/ | Queues remaining data from buffer, and advances its position by the number of bytes consumed | queueInput | {
"repo_name": "YouKim/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/audio/Sonic.java",
"license": "apache-2.0",
"size": 19017
} | [
"java.nio.ShortBuffer"
] | import java.nio.ShortBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,634,668 |
double amu = 100;
double rj = 40;
double rk = 50;
double rl = 7;
Vector assigns = new Vector();
IArray1D x = spectrum.getXData();
IArray1D y = spectrum.getYData();
int n = y.getLength();
Integer[] peaks = new Integer[n];
for (int i = 0; i < n; i++) {
peaks[i] = new Integer(i);
... | double amu = 100; double rj = 40; double rk = 50; double rl = 7; Vector assigns = new Vector(); IArray1D x = spectrum.getXData(); IArray1D y = spectrum.getYData(); int n = y.getLength(); Integer[] peaks = new Integer[n]; for (int i = 0; i < n; i++) { peaks[i] = new Integer(i); } int[] sigPeaks = new int[MS_SIGNIFICANT_... | /**
* calculate method comment.
*/ | calculate method comment | calculate | {
"repo_name": "kerner1000/jcamp-dx",
"path": "src/main/java/org/jcamp/spectrum/MSPeakPicking.java",
"license": "lgpl-2.1",
"size": 5633
} | [
"java.util.Vector",
"org.jcamp.math.IArray1D"
] | import java.util.Vector; import org.jcamp.math.IArray1D; | import java.util.*; import org.jcamp.math.*; | [
"java.util",
"org.jcamp.math"
] | java.util; org.jcamp.math; | 398,241 |
public static DynamicMessage parseFrom (Descriptor type, byte[] data)
throws InvalidProtocolBufferException {
return newBuilder (type).mergeFrom (data).buildParsed ();
} | static DynamicMessage function (Descriptor type, byte[] data) throws InvalidProtocolBufferException { return newBuilder (type).mergeFrom (data).buildParsed (); } | /**
* Parse {@code data} as a message of the given type and return it.
*/ | Parse data as a message of the given type and return it | parseFrom | {
"repo_name": "CodeBrig/Beam",
"path": "src/com/google/protobuf/DynamicMessage.java",
"license": "mit",
"size": 23234
} | [
"com.google.protobuf.Descriptors"
] | import com.google.protobuf.Descriptors; | import com.google.protobuf.*; | [
"com.google.protobuf"
] | com.google.protobuf; | 197,068 |
private void loadDocument(String documentPath) {
xmlDocument = XmlUtil.loadDocument(documentPath);
} | void function(String documentPath) { xmlDocument = XmlUtil.loadDocument(documentPath); } | /**
* loading the xml document using given path
*
* @param documentPath
*/ | loading the xml document using given path | loadDocument | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/basic/ui/com.odcgroup.basic.ui/src/main/java/com/temenos/t24/tools/eclipse/basic/views/inlineDocs/listener/InLineDocsHelpCache.java",
"license": "epl-1.0",
"size": 2894
} | [
"com.temenos.t24.tools.eclipse.basic.document.xml.XmlUtil"
] | import com.temenos.t24.tools.eclipse.basic.document.xml.XmlUtil; | import com.temenos.t24.tools.eclipse.basic.document.xml.*; | [
"com.temenos.t24"
] | com.temenos.t24; | 1,910,228 |
private void focusPrevious() {
final Element current = Elements.getDocument().getActiveElement();
if (current.getParentElement().isEqualNode(listElement)) {
final Element prev = current.getPreviousElementSibling();
if (prev != null) {
select(prev);
prev.focus();
} else {
... | void function() { final Element current = Elements.getDocument().getActiveElement(); if (current.getParentElement().isEqualNode(listElement)) { final Element prev = current.getPreviousElementSibling(); if (prev != null) { select(prev); prev.focus(); } else { focusLast(); } } else { focusFirst(); } } | /**
* Focus the previous item in the list, or the last item if we are already at the first. In the
* case the list doesn't currently have focus, focus the first element.
*/ | Focus the previous item in the list, or the last item if we are already at the first. In the case the list doesn't currently have focus, focus the first element | focusPrevious | {
"repo_name": "akervern/che",
"path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/popup/PopupKeyDownListener.java",
"license": "epl-1.0",
"size": 5100
} | [
"org.eclipse.che.ide.util.dom.Elements"
] | import org.eclipse.che.ide.util.dom.Elements; | import org.eclipse.che.ide.util.dom.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,153,115 |
public AmqpReceiverEndpoint publishHandler(Handler<AmqpPublishData> handler) {
this.publishHandler = handler;
return this;
} | AmqpReceiverEndpoint function(Handler<AmqpPublishData> handler) { this.publishHandler = handler; return this; } | /**
* Set the session handler called when AMQP_PUBLISH is received
*
* @param handler the handler
* @return the current AmqpReceiverEndpoint instance
*/ | Set the session handler called when AMQP_PUBLISH is received | publishHandler | {
"repo_name": "jenmalloy/enmasse",
"path": "mqtt-gateway/src/main/java/enmasse/mqtt/endpoints/AmqpReceiverEndpoint.java",
"license": "apache-2.0",
"size": 7242
} | [
"io.vertx.core.Handler"
] | import io.vertx.core.Handler; | import io.vertx.core.*; | [
"io.vertx.core"
] | io.vertx.core; | 2,171,854 |
public static List<InetAddress> getAllBroadcastAddresses() {
List<InetAddress> listOfBroadcasts = new ArrayList<InetAddress>();
Enumeration<NetworkInterface> list;
try {
list = NetworkInterface.getNetworkInterfaces();
while (list.hasMoreElements()) {
... | static List<InetAddress> function() { List<InetAddress> listOfBroadcasts = new ArrayList<InetAddress>(); Enumeration<NetworkInterface> list; try { list = NetworkInterface.getNetworkInterfaces(); while (list.hasMoreElements()) { NetworkInterface iface = list.nextElement(); if (iface == null) { continue; } if (!iface.isL... | /**
* Gets all the broadcast address's from the machine.
*
* @return list with all the broadcast address's
*/ | Gets all the broadcast address's from the machine | getAllBroadcastAddresses | {
"repo_name": "kwave/openhab2-addons",
"path": "addons/binding/org.openhab.binding.silvercrestwifisocket/src/main/java/org/openhab/binding/silvercrestwifisocket/internal/utils/NetworkUtils.java",
"license": "epl-1.0",
"size": 2202
} | [
"java.net.InetAddress",
"java.net.InterfaceAddress",
"java.net.NetworkInterface",
"java.net.SocketException",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.Iterator",
"java.util.List"
] | import java.net.InetAddress; import java.net.InterfaceAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.ArrayList; import java.util.Enumeration; import java.util.Iterator; import java.util.List; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 2,013,444 |
@Test
public void testEpcSvcLvlCd01() throws Throwable {
List<IInterpretationResult> results;
results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY
+ "/epcSvcLvlCd", MODELINSTANCE_NAME_01, Arrays
.asList(new String[] { "ServiceLevel3Choice" }));
assertNotNull(results);
asse... | void function() throws Throwable { List<IInterpretationResult> results; results = super.interpretConstraintsForInstance(CONSTRAINT_DIRECTORY + STR, MODELINSTANCE_NAME_01, Arrays .asList(new String[] { STR })); assertNotNull(results); assertEquals(2, results.size()); this.assertIsFalse(results.get(0)); this.assertIsFals... | /**
* <p>
* Tests the invariant <code>epcSvcLvlCd</code>.
* </p>
*
* @throws Throwable
*/ | Tests the invariant <code>epcSvcLvlCd</code>. | testEpcSvcLvlCd01 | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "tests/org.dresdenocl.examples.pain.tests/src/org/dresdenocl/examples/pain/test/TestServiceLevel3Choice.java",
"license": "lgpl-3.0",
"size": 3771
} | [
"java.util.Arrays",
"java.util.List",
"org.dresdenocl.interpreter.IInterpretationResult",
"org.junit.Assert"
] | import java.util.Arrays; import java.util.List; import org.dresdenocl.interpreter.IInterpretationResult; import org.junit.Assert; | import java.util.*; import org.dresdenocl.interpreter.*; import org.junit.*; | [
"java.util",
"org.dresdenocl.interpreter",
"org.junit"
] | java.util; org.dresdenocl.interpreter; org.junit; | 2,680,537 |
public KieServerHttpRequest accept(final String accept ) {
RequestInfo requestInfo = getRequestInfo();
if( requestInfo.getHeader(ACCEPT).isEmpty() ) {
requestInfo.setHeader(ACCEPT, new ArrayList<String>());
}
requestInfo.headers.get(ACCEPT).set(0, accept);
return t... | KieServerHttpRequest function(final String accept ) { RequestInfo requestInfo = getRequestInfo(); if( requestInfo.getHeader(ACCEPT).isEmpty() ) { requestInfo.setHeader(ACCEPT, new ArrayList<String>()); } requestInfo.headers.get(ACCEPT).set(0, accept); return this; } | /**
* Set the 'Accept' header to given value
*
* @param accept
* @return this request
*/ | Set the 'Accept' header to given value | accept | {
"repo_name": "reynoldsm88/droolsjbpm-integration",
"path": "kie-server-parent/kie-server-common/src/main/java/org/kie/server/common/rest/KieServerHttpRequest.java",
"license": "apache-2.0",
"size": 63250
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 82,557 |
public static <T1, T2> HashMap<T1, T2> map() {
return new HashMap<>();
} | static <T1, T2> HashMap<T1, T2> function() { return new HashMap<>(); } | /**
* Creates a new empty {@link HashMap} with the inferred type.
*/ | Creates a new empty <code>HashMap</code> with the inferred type | map | {
"repo_name": "Xenoage/Zong",
"path": "utils/utils-base/src/com/xenoage/utils/collections/CollectionUtils.java",
"license": "agpl-3.0",
"size": 8145
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,713,304 |
protected ClusterState reroute(final ClusterState clusterState, String reason, boolean debug) {
RoutingNodes routingNodes = getMutableRoutingNodes(clusterState);
// shuffle the unassigned nodes, just so we won't have things like poison failed shards
routingNodes.unassigned().shuffle();
... | ClusterState function(final ClusterState clusterState, String reason, boolean debug) { RoutingNodes routingNodes = getMutableRoutingNodes(clusterState); routingNodes.unassigned().shuffle(); RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, routingNodes, clusterState, clusterInfoService.getCluster... | /**
* Reroutes the routing table based on the live nodes.
* <p>
* If the same instance of ClusterState is returned, then no change has been made.
*/ | Reroutes the routing table based on the live nodes. If the same instance of ClusterState is returned, then no change has been made | reroute | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/cluster/routing/allocation/AllocationService.java",
"license": "apache-2.0",
"size": 21603
} | [
"org.elasticsearch.cluster.ClusterState",
"org.elasticsearch.cluster.routing.RoutingNodes"
] | import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.routing.RoutingNodes; | import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.routing.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 1,035,842 |
final Repo repo = GithubProfileTest.repo(
Joiner.on('\n').join(
"assets:",
" test.xml: jeff/test1#test.xml",
" beta: jeff/test1#test.xml",
"architect:",
" - jeff",
" - donald",
"merge:",
... | final Repo repo = GithubProfileTest.repo( Joiner.on('\n').join( STR, STR, STR, STR, STR, STR, STR, STR ) ); final String yaml = STR; repo.github() .repos() .get(new Coordinates.Simple(STR)) .contents().create( Json.createObjectBuilder() .add("path", STR) .add(STR, STR) .add(STR, Base64.encodeBase64String(yaml.getBytes(... | /**
* GithubProfile can fetch a YAML config.
* @throws Exception In case of error.
*/ | GithubProfile can fetch a YAML config | fetchesYamlConfig | {
"repo_name": "dalifreire/rultor",
"path": "src/test/java/com/rultor/profiles/GithubProfileTest.java",
"license": "bsd-3-clause",
"size": 10266
} | [
"com.google.common.base.Joiner",
"com.jcabi.github.Coordinates",
"com.jcabi.github.Repo",
"com.jcabi.matchers.XhtmlMatchers",
"com.rultor.spi.Profile",
"javax.json.Json",
"org.apache.commons.codec.binary.Base64",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import com.google.common.base.Joiner; import com.jcabi.github.Coordinates; import com.jcabi.github.Repo; import com.jcabi.matchers.XhtmlMatchers; import com.rultor.spi.Profile; import javax.json.Json; import org.apache.commons.codec.binary.Base64; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import com.google.common.base.*; import com.jcabi.github.*; import com.jcabi.matchers.*; import com.rultor.spi.*; import javax.json.*; import org.apache.commons.codec.binary.*; import org.hamcrest.*; | [
"com.google.common",
"com.jcabi.github",
"com.jcabi.matchers",
"com.rultor.spi",
"javax.json",
"org.apache.commons",
"org.hamcrest"
] | com.google.common; com.jcabi.github; com.jcabi.matchers; com.rultor.spi; javax.json; org.apache.commons; org.hamcrest; | 134,232 |
public static void addDependencyJars(Job job) throws IOException {
addHBaseDependencyJars(job.getConfiguration());
try {
addDependencyJars(job.getConfiguration(),
// when making changes here, consider also mapred.TableMapReduceUtil
// pull job classes
job.getMapOutputKeyCla... | static void function(Job job) throws IOException { addHBaseDependencyJars(job.getConfiguration()); try { addDependencyJars(job.getConfiguration(), job.getMapOutputKeyClass(), job.getMapOutputValueClass(), job.getInputFormatClass(), job.getOutputKeyClass(), job.getOutputValueClass(), job.getOutputFormatClass(), job.getP... | /**
* Add the HBase dependency jars as well as jars for any of the configured
* job classes to the job configuration, so that JobClient will ship them
* to the cluster and add them to the DistributedCache.
*/ | Add the HBase dependency jars as well as jars for any of the configured job classes to the job configuration, so that JobClient will ship them to the cluster and add them to the DistributedCache | addDependencyJars | {
"repo_name": "mapr/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 39750
} | [
"java.io.IOException",
"org.apache.hadoop.mapreduce.Job"
] | import java.io.IOException; import org.apache.hadoop.mapreduce.Job; | import java.io.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,023,268 |
private boolean isClassDefiningCall(Node callNode) {
SubclassRelationship classes =
compiler.getCodingConvention().getClassesDefinedByCall(callNode);
return classes != null;
} | boolean function(Node callNode) { SubclassRelationship classes = compiler.getCodingConvention().getClassesDefinedByCall(callNode); return classes != null; } | /**
* Determines if a call defines a class inheritance or mixing
* relation, according to the current coding convention.
*/ | Determines if a call defines a class inheritance or mixing relation, according to the current coding convention | isClassDefiningCall | {
"repo_name": "zombiezen/cardcpx",
"path": "third_party/closure-compiler/src/com/google/javascript/jscomp/GatherSideEffectSubexpressionsCallback.java",
"license": "apache-2.0",
"size": 11786
} | [
"com.google.javascript.jscomp.CodingConvention",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.jscomp.CodingConvention; import com.google.javascript.rhino.Node; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 350,732 |
@VisibleForTesting
@Override
public void initialize() {
UiThreadUtil.assertOnUiThread();
Assertions.assertCondition(
!mInitialized,
"This catalyst instance has already been initialized");
// We assume that the instance manager blocks on running the JS bundle. If
// that changes, th... | void function() { UiThreadUtil.assertOnUiThread(); Assertions.assertCondition( !mInitialized, STR); Assertions.assertCondition( mAcceptCalls, STR); mInitialized = true; mJavaRegistry.notifyCatalystInstanceInitialized(); } | /**
* Initialize all the native modules
*/ | Initialize all the native modules | initialize | {
"repo_name": "prayuditb/tryout-01",
"path": "websocket/client/Client/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/cxxbridge/CatalystInstanceImpl.java",
"license": "mit",
"size": 19688
} | [
"com.facebook.infer.annotation.Assertions"
] | import com.facebook.infer.annotation.Assertions; | import com.facebook.infer.annotation.*; | [
"com.facebook.infer"
] | com.facebook.infer; | 1,215,386 |
public CallingResponse makeCallingRequest(long requestId, String url, String httpMethod, List<Pair<String, String>> headers, byte[] body) {
return socket.makeCallingRequest(requestId, url, httpMethod, headers, body);
} | CallingResponse function(long requestId, String url, String httpMethod, List<Pair<String, String>> headers, byte[] body) { return socket.makeCallingRequest(requestId, url, httpMethod, headers, body); } | /**
* Send an http request on behalf of the calling infrastructure.
*
* @param requestId Request identifier
* @param url Fully qualified URL to request
* @param httpMethod Http method to use (e.g., "GET", "POST")
* @param headers Optional list of headers to send with request
* @param body Optional ... | Send an http request on behalf of the calling infrastructure | makeCallingRequest | {
"repo_name": "WhisperSystems/TextSecure",
"path": "libsignal/service/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageSender.java",
"license": "gpl-3.0",
"size": 78085
} | [
"java.util.List",
"org.whispersystems.libsignal.util.Pair",
"org.whispersystems.signalservice.api.messages.calls.CallingResponse"
] | import java.util.List; import org.whispersystems.libsignal.util.Pair; import org.whispersystems.signalservice.api.messages.calls.CallingResponse; | import java.util.*; import org.whispersystems.libsignal.util.*; import org.whispersystems.signalservice.api.messages.calls.*; | [
"java.util",
"org.whispersystems.libsignal",
"org.whispersystems.signalservice"
] | java.util; org.whispersystems.libsignal; org.whispersystems.signalservice; | 2,162,897 |
@ServiceMethod(returns = ReturnType.SINGLE)
VirtualNetworkLinkInner update(
String resourceGroupName,
String privateZoneName,
String virtualNetworkLinkName,
VirtualNetworkLinkInner parameters,
String ifMatch); | @ServiceMethod(returns = ReturnType.SINGLE) VirtualNetworkLinkInner update( String resourceGroupName, String privateZoneName, String virtualNetworkLinkName, VirtualNetworkLinkInner parameters, String ifMatch); | /**
* Updates a virtual network link to the specified Private DNS zone.
*
* @param resourceGroupName The name of the resource group.
* @param privateZoneName The name of the Private DNS zone (without a terminating dot).
* @param virtualNetworkLinkName The name of the virtual network link.
... | Updates a virtual network link to the specified Private DNS zone | update | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/fluent/VirtualNetworkLinksClient.java",
"license": "mit",
"size": 44224
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.privatedns.fluent.models.VirtualNetworkLinkInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.privatedns.fluent.models.VirtualNetworkLinkInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.privatedns.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 308,781 |
private Map<String, Object> getOperationParameters(Map<String, String> requestInfoProperties) {
Map<String, Object> operationParameters = new HashMap<>();
for (Map.Entry<String, String> entry : requestInfoProperties.entrySet()) {
String propertyCategory = PropertyHelper.getPropertyCategory(entry.getKey... | Map<String, Object> function(Map<String, String> requestInfoProperties) { Map<String, Object> operationParameters = new HashMap<>(); for (Map.Entry<String, String> entry : requestInfoProperties.entrySet()) { String propertyCategory = PropertyHelper.getPropertyCategory(entry.getKey()); if ((propertyCategory != null) && ... | /**
* Creates a map of the operation parameters from the data in the request info map.
* <p>
* Operation parmaters are set under the "parameters" category.
*
* @param requestInfoProperties a map of request info properties
* @return a map of operation request parameters
*/ | Creates a map of the operation parameters from the data in the request info map. Operation parmaters are set under the "parameters" category | getOperationParameters | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentConfigurationResourceProvider.java",
"license": "apache-2.0",
"size": 22170
} | [
"java.util.HashMap",
"java.util.Map",
"org.apache.ambari.server.controller.utilities.PropertyHelper"
] | import java.util.HashMap; import java.util.Map; import org.apache.ambari.server.controller.utilities.PropertyHelper; | import java.util.*; import org.apache.ambari.server.controller.utilities.*; | [
"java.util",
"org.apache.ambari"
] | java.util; org.apache.ambari; | 2,199,764 |
public void readLogicalDependency(final InternalFactHandle handle,
final Object object,
final Object value,
final Activation activation,
final PropagationContext co... | void function(final InternalFactHandle handle, final Object object, final Object value, final Activation activation, final PropagationContext context, final RuleImpl rule, final ObjectTypeConf typeConf) { addLogicalDependency( handle, object, value, activation, context, rule, typeConf, true ); } | /**
* Adds a justification for the FactHandle to the justifiedMap.
*
* @param handle
* @param activation
* @param context
* @param rule
* @param typeConf
*/ | Adds a justification for the FactHandle to the justifiedMap | readLogicalDependency | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/drools-master/drools-core/src/main/java/org/drools/core/common/TruthMaintenanceSystem.java",
"license": "mit",
"size": 11373
} | [
"org.drools.core.definitions.rule.impl.RuleImpl",
"org.drools.core.reteoo.ObjectTypeConf",
"org.drools.core.spi.Activation",
"org.drools.core.spi.PropagationContext"
] | import org.drools.core.definitions.rule.impl.RuleImpl; import org.drools.core.reteoo.ObjectTypeConf; import org.drools.core.spi.Activation; import org.drools.core.spi.PropagationContext; | import org.drools.core.definitions.rule.impl.*; import org.drools.core.reteoo.*; import org.drools.core.spi.*; | [
"org.drools.core"
] | org.drools.core; | 1,793,520 |
public synchronized Drug addDrug(final String name) throws ServiceException {
this.checkDrugName(name);
final Drug drug = this.drugFactory.create(name);
this.clinic.getDrugList().add(drug);
return drug;
} | synchronized Drug function(final String name) throws ServiceException { this.checkDrugName(name); final Drug drug = this.drugFactory.create(name); this.clinic.getDrugList().add(drug); return drug; } | /**
* Add new drug to clinic.
*
* @param name drug's name
* @return added drug object.
* @throws ServiceException thrown when drug's name is unknown.
*/ | Add new drug to clinic | addDrug | {
"repo_name": "lightstar/job4j-clinic",
"path": "src/main/java/ru/lightstar/clinic/DrugService.java",
"license": "gpl-3.0",
"size": 4550
} | [
"ru.lightstar.clinic.drug.Drug",
"ru.lightstar.clinic.exception.ServiceException"
] | import ru.lightstar.clinic.drug.Drug; import ru.lightstar.clinic.exception.ServiceException; | import ru.lightstar.clinic.drug.*; import ru.lightstar.clinic.exception.*; | [
"ru.lightstar.clinic"
] | ru.lightstar.clinic; | 1,771,735 |
@Override
public void mouseReleased(final MouseEvent e) {
this.resizing = false;
final Component source = e.getComponent();
source.setCursor(this.sourceCursor);
if (source instanceof JComponent)
((JComponent) source).setAutoscrolls(this.autoscrolls);
}
| void function(final MouseEvent e) { this.resizing = false; final Component source = e.getComponent(); source.setCursor(this.sourceCursor); if (source instanceof JComponent) ((JComponent) source).setAutoscrolls(this.autoscrolls); } | /**
* Restore the original state of the Component
*/ | Restore the original state of the Component | mouseReleased | {
"repo_name": "Team-Fruit/SignPicture",
"path": "src/main/java/com/kamesuta/mc/signpic/lib/ComponentResizer.java",
"license": "lgpl-3.0",
"size": 14366
} | [
"java.awt.Component",
"java.awt.event.MouseEvent",
"javax.swing.JComponent"
] | import java.awt.Component; import java.awt.event.MouseEvent; import javax.swing.JComponent; | import java.awt.*; import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,796,659 |
public Reasoner getReasoner() {
return reasoner;
} | Reasoner function() { return reasoner; } | /**
* Gets the reasoner.
*
* @return the reasoner
*/ | Gets the reasoner | getReasoner | {
"repo_name": "pipseq/semantic",
"path": "src/main/org/pipseq/rdf/jena/cfg/InferModelWrapper.java",
"license": "mit",
"size": 2199
} | [
"com.hp.hpl.jena.reasoner.Reasoner"
] | import com.hp.hpl.jena.reasoner.Reasoner; | import com.hp.hpl.jena.reasoner.*; | [
"com.hp.hpl"
] | com.hp.hpl; | 2,803,030 |
@ApiModelProperty(example = "null", value = "reference id to TaxLegalReason")
public String getStateGovernmentLegalReason() {
return stateGovernmentLegalReason;
} | @ApiModelProperty(example = "null", value = STR) String function() { return stateGovernmentLegalReason; } | /**
* reference id to TaxLegalReason
* @return stateGovernmentLegalReason
**/ | reference id to TaxLegalReason | getStateGovernmentLegalReason | {
"repo_name": "Avalara/avataxbr-clients",
"path": "java-client/src/main/java/io/swagger/client/model/AgastWithholdingCOFINS.java",
"license": "gpl-3.0",
"size": 9109
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 750,869 |
public synchronized void addSon(Radiogram dg, String sonAddr){
sons.addElement(sonAddr);
sensorManager.temperatures.put(sonAddr, new Temperature());
System.out.println("Son added to sons list : " + sonAddr);
info.sonNumber++;
if(info.sonNumber == 1){
if(ping... | synchronized void function(Radiogram dg, String sonAddr){ sons.addElement(sonAddr); sensorManager.temperatures.put(sonAddr, new Temperature()); System.out.println(STR + sonAddr); info.sonNumber++; if(info.sonNumber == 1){ if(ping != null && !ping.isActive()){ startSonMonitor(); } } } | /**
* Add a host to sons list. Increment the number of son in SPOTInfo instance.
* Calls {@link TopologyManager#startPingMonitor()} when the first son is added in the list.
*
* @param dg The Radiogram with the SPOTInfo fields to extract
* @param sonAddr The IEEE address of the host we want... | Add a host to sons list. Increment the number of son in SPOTInfo instance. Calls <code>TopologyManager#startPingMonitor()</code> when the first son is added in the list | addSon | {
"repo_name": "abronan/SunSpotAggregator",
"path": "src/org/sunspotworld/heatsensorsalt/TopologyManager.java",
"license": "mit",
"size": 17104
} | [
"com.sun.spot.io.j2me.radiogram.Radiogram"
] | import com.sun.spot.io.j2me.radiogram.Radiogram; | import com.sun.spot.io.j2me.radiogram.*; | [
"com.sun.spot"
] | com.sun.spot; | 1,296,963 |
protected static WebElement waitForElementToBeClickable(final By locator,
int timeOut) {
WebDriverWait wait = new WebDriverWait(getWebDriver(), timeOut);
WebElement element = wait.until(ExpectedConditions
.elementToBeClickable(locator));
return element;
} | static WebElement function(final By locator, int timeOut) { WebDriverWait wait = new WebDriverWait(getWebDriver(), timeOut); WebElement element = wait.until(ExpectedConditions .elementToBeClickable(locator)); return element; } | /**
* Wait for element to be clickable.
*
* @param locator
* the locator
* @param timeOut
* the time out
* @return the web element
*/ | Wait for element to be clickable | waitForElementToBeClickable | {
"repo_name": "openMF/mifosx-e2e-testing",
"path": "MifosTestAutomation/src/test/java/com/mifos/pages/MifosWebPage.java",
"license": "mpl-2.0",
"size": 59471
} | [
"org.openqa.selenium.By",
"org.openqa.selenium.WebElement",
"org.openqa.selenium.support.ui.ExpectedConditions",
"org.openqa.selenium.support.ui.WebDriverWait"
] | import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; | import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 1,136,928 |
public T caseConstraintProperty(ConstraintProperty object) {
return null;
} | T function(ConstraintProperty object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Constraint Property</em>'.
* <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate
* the switch. <!-- end-user-doc -->
*
* @param object
* the target of the switch.
* @r... | Returns the result of interpreting the object as an instance of 'Constraint Property'. This implementation returns null; returning a non-null result will terminate the switch. | caseConstraintProperty | {
"repo_name": "bmaggi/Papyrus-SysML11",
"path": "plugins/org.eclipse.papyrus.sysml/src/org/eclipse/papyrus/sysml/constraints/util/ConstraintsSwitch.java",
"license": "epl-1.0",
"size": 5571
} | [
"org.eclipse.papyrus.sysml.constraints.ConstraintProperty"
] | import org.eclipse.papyrus.sysml.constraints.ConstraintProperty; | import org.eclipse.papyrus.sysml.constraints.*; | [
"org.eclipse.papyrus"
] | org.eclipse.papyrus; | 971,233 |
@SuppressWarnings({ "PMD.CyclomaticComplexity", "PMD.AvoidDuplicateLiterals" })
public static boolean delete(final File aDir) {
if (aDir.exists() && aDir.listFiles() != null) {
for (final File file : aDir.listFiles()) {
if (file.isDirectory()) {
if (!delet... | @SuppressWarnings({ STR, STR }) static boolean function(final File aDir) { if (aDir.exists() && aDir.listFiles() != null) { for (final File file : aDir.listFiles()) { if (file.isDirectory()) { if (!delete(file)) { LOGGER.error(MessageCodes.UTIL_012, file); } } else { if (file.exists() && !file.delete()) { LOGGER.error(... | /**
* Deletes a directory and all its children.
*
* @param aDir A directory to delete
* @return True if file was successfully deleted; else, false
*/ | Deletes a directory and all its children | delete | {
"repo_name": "ksclarke/freelib-utils",
"path": "src/main/java/info/freelibrary/util/FileUtils.java",
"license": "lgpl-3.0",
"size": 22000
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 574,150 |
void makeLeader(Map<Resource, Map<Long, Double>> resourceToLeadershipLoadBySnapshotTime) throws ModelInputException {
// Add leadership to the replica.
setLeadership(true);
_load.setLoadFor(Resource.NW_OUT, resourceToLeadershipLoadBySnapshotTime.get(Resource.NW_OUT));
_load.addLoadFor(Resource.CPU, re... | void makeLeader(Map<Resource, Map<Long, Double>> resourceToLeadershipLoadBySnapshotTime) throws ModelInputException { setLeadership(true); _load.setLoadFor(Resource.NW_OUT, resourceToLeadershipLoadBySnapshotTime.get(Resource.NW_OUT)); _load.addLoadFor(Resource.CPU, resourceToLeadershipLoadBySnapshotTime.get(Resource.CP... | /**
* (1) Add leadership to the replica.
* (2) Set the outbound network load associated with leadership.
* (3) Add the CPU load associated with leadership.
*
* @param resourceToLeadershipLoadBySnapshotTime Resource to leadership load to be added by snapshot time.
*/ | (1) Add leadership to the replica. (2) Set the outbound network load associated with leadership. (3) Add the CPU load associated with leadership | makeLeader | {
"repo_name": "GergoHong/cruise-control",
"path": "cruise-control/src/main/java/com/linkedin/kafka/cruisecontrol/model/Replica.java",
"license": "bsd-2-clause",
"size": 8009
} | [
"com.linkedin.kafka.cruisecontrol.common.Resource",
"com.linkedin.kafka.cruisecontrol.exception.ModelInputException",
"java.util.Map"
] | import com.linkedin.kafka.cruisecontrol.common.Resource; import com.linkedin.kafka.cruisecontrol.exception.ModelInputException; import java.util.Map; | import com.linkedin.kafka.cruisecontrol.common.*; import com.linkedin.kafka.cruisecontrol.exception.*; import java.util.*; | [
"com.linkedin.kafka",
"java.util"
] | com.linkedin.kafka; java.util; | 794,532 |
public Pattern<T, T> followedBy(final String name) {
return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy);
} | Pattern<T, T> function(final String name) { return new Pattern<>(name, this, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); } | /**
* Appends a new pattern to the existing one. The new pattern enforces non-strict
* temporal contiguity. This means that a matching event of this pattern and the
* preceding matching event might be interleaved with other events which are ignored.
*
* @param name Name of the new pattern
* @return A new pa... | Appends a new pattern to the existing one. The new pattern enforces non-strict temporal contiguity. This means that a matching event of this pattern and the preceding matching event might be interleaved with other events which are ignored | followedBy | {
"repo_name": "zohar-mizrahi/flink",
"path": "flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java",
"license": "apache-2.0",
"size": 20866
} | [
"org.apache.flink.cep.pattern.Quantifier"
] | import org.apache.flink.cep.pattern.Quantifier; | import org.apache.flink.cep.pattern.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,399,324 |
private void showGlobalContextActionBar() {
ActionBar actionBar = getActionBar();
actionBar.setDisplayShowTitleEnabled(true);
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
actionBar.setTitle(R.string.app_name);
} | void function() { ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setTitle(R.string.app_name); } | /**
* Per the navigation drawer design guidelines, updates the action bar to show the global app
* 'context', rather than just what's in the current screen.
*/ | Per the navigation drawer design guidelines, updates the action bar to show the global app 'context', rather than just what's in the current screen | showGlobalContextActionBar | {
"repo_name": "damith-w/pdaproject",
"path": "app/src/main/java/com/education/krv/pda/NavigationDrawerFragment.java",
"license": "mit",
"size": 10601
} | [
"android.app.ActionBar"
] | import android.app.ActionBar; | import android.app.*; | [
"android.app"
] | android.app; | 1,909,960 |
public static IEditorPart isOpenInEditor(Object inputElement) {
IEditorInput input= null;
try {
input= getEditorInput(inputElement);
} catch (JavaScriptModelException x) {
JavaScriptPlugin.log(x.getStatus());
}
if (input != null) {
IWorkbenchPage p= JavaScriptPlugin.getActivePage();
if (p != ... | static IEditorPart function(Object inputElement) { IEditorInput input= null; try { input= getEditorInput(inputElement); } catch (JavaScriptModelException x) { JavaScriptPlugin.log(x.getStatus()); } if (input != null) { IWorkbenchPage p= JavaScriptPlugin.getActivePage(); if (p != null) { return p.findEditor(input); } } ... | /**
* Tests if a CU is currently shown in an editor
*
* @return the IEditorPart if shown, null if element is not open in an editor
*/ | Tests if a CU is currently shown in an editor | isOpenInEditor | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.ui/src/org/eclipse/wst/jsdt/internal/ui/javaeditor/EditorUtility.java",
"license": "epl-1.0",
"size": 22130
} | [
"org.eclipse.ui.IEditorInput",
"org.eclipse.ui.IEditorPart",
"org.eclipse.ui.IWorkbenchPage",
"org.eclipse.wst.jsdt.core.JavaScriptModelException",
"org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin"
] | import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.wst.jsdt.core.JavaScriptModelException; import org.eclipse.wst.jsdt.internal.ui.JavaScriptPlugin; | import org.eclipse.ui.*; import org.eclipse.wst.jsdt.core.*; import org.eclipse.wst.jsdt.internal.ui.*; | [
"org.eclipse.ui",
"org.eclipse.wst"
] | org.eclipse.ui; org.eclipse.wst; | 1,747,539 |
super.construct(sysConfig);
List<LocatorGroupsPair> lookupsToStart = getAllLookupsToStart();
int len1 = lookupsToStart.size();
int len2 = 2*len1;
for(int i=0;i<len1;i++) {
LocatorGroupsPair pair = lookupsToStart.get(i);
newLookups.add(i,pair);
}//end loop
for(int i=len1;i<len2;i++) {
Loca... | super.construct(sysConfig); List<LocatorGroupsPair> lookupsToStart = getAllLookupsToStart(); int len1 = lookupsToStart.size(); int len2 = 2*len1; for(int i=0;i<len1;i++) { LocatorGroupsPair pair = lookupsToStart.get(i); newLookups.add(i,pair); } for(int i=len1;i<len2;i++) { LocatorGroupsPair pair = lookupsToStart.get(i... | /** Performs actions necessary to prepare for execution of the
* current test (refer to the description of this method in the
* parent class).
*/ | Performs actions necessary to prepare for execution of the current test (refer to the description of this method in the parent class) | construct | {
"repo_name": "pfirmstone/JGDMS",
"path": "qa/src/org/apache/river/test/spec/lookupdiscovery/ConstructorDups.java",
"license": "apache-2.0",
"size": 4811
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,814,562 |
private void sendNSFailed(IConnection conn, String errorCode, String description, String name, Number streamId) {
StreamService.sendNetStreamStatus(conn, errorCode, description, name, Status.ERROR, streamId);
} | void function(IConnection conn, String errorCode, String description, String name, Number streamId) { StreamService.sendNetStreamStatus(conn, errorCode, description, name, Status.ERROR, streamId); } | /**
* Send NetStream.Play.Failed to the client.
*
* @param conn
* @param errorCode
* @param description
* @param name
* @param streamId
*/ | Send NetStream.Play.Failed to the client | sendNSFailed | {
"repo_name": "ant-media/Ant-Media-Server",
"path": "src/main/java/org/red5/server/stream/StreamService.java",
"license": "apache-2.0",
"size": 39377
} | [
"org.red5.server.api.IConnection",
"org.red5.server.net.rtmp.status.Status"
] | import org.red5.server.api.IConnection; import org.red5.server.net.rtmp.status.Status; | import org.red5.server.api.*; import org.red5.server.net.rtmp.status.*; | [
"org.red5.server"
] | org.red5.server; | 1,005,133 |
public final boolean changeDate(final Date newDate) {
return (mRightEye == null || mRightEye.changeDate(newDate))
&& (mLeftEye == null || mLeftEye.changeDate(newDate));
} | final boolean function(final Date newDate) { return (mRightEye == null mRightEye.changeDate(newDate)) && (mLeftEye == null mLeftEye.changeDate(newDate)); } | /**
* Change the date of the eye photo pair.
*
* @param newDate
* the new date.
* @return true if the change operation was successful on both eyes.
*/ | Change the date of the eye photo pair | changeDate | {
"repo_name": "jeisfeld/Augendiagnose",
"path": "AugendiagnoseFX/src/de/eisfeldj/augendiagnosefx/util/imagefile/EyePhotoPair.java",
"license": "gpl-2.0",
"size": 3282
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,202,113 |
public OMElement load(String bpelStr); | OMElement function(String bpelStr); | /**
* Converts the bpel process definition to an omElement which is how the AXIS2 Object Model (AXIOM) represents an
* XML
* element
*
* @param bpelStr bpel process definition needed to create the SVG
* @return omElement
*/ | Converts the bpel process definition to an omElement which is how the AXIS2 Object Model (AXIOM) represents an XML element | load | {
"repo_name": "himasha/carbon-business-process",
"path": "components/bpel/org.wso2.carbon.bpel.ui/src/main/java/org/wso2/carbon/bpel/ui/bpel2svg/BPELInterface.java",
"license": "apache-2.0",
"size": 2942
} | [
"org.apache.axiom.om.OMElement"
] | import org.apache.axiom.om.OMElement; | import org.apache.axiom.om.*; | [
"org.apache.axiom"
] | org.apache.axiom; | 2,639,867 |
private File getUserDataFile(String projectPath) throws FileNotFoundException{
String userDataFilePath = projectPath + "\\res\\data\\users";
File userDataFile = new File(userDataFilePath);
if(userDataFile.exists()){
return userDataFile;
}
throw new FileNotFoundException();
} | File function(String projectPath) throws FileNotFoundException{ String userDataFilePath = projectPath + STR; File userDataFile = new File(userDataFilePath); if(userDataFile.exists()){ return userDataFile; } throw new FileNotFoundException(); } | /**
* Get the file which save the user data.
* @author Crow
* @date 2015年6月13日
* @return
* @throws FileNotFoundException
*/ | Get the file which save the user data | getUserDataFile | {
"repo_name": "RisingWonderland/J2EE_Servlet_Demo",
"path": "src/org/crow/demo/servlet/UserLoginServlet.java",
"license": "mit",
"size": 5136
} | [
"java.io.File",
"java.io.FileNotFoundException"
] | import java.io.File; import java.io.FileNotFoundException; | import java.io.*; | [
"java.io"
] | java.io; | 2,366,094 |
public Direction update() throws StopRequestException
{ ai.checkInterruption();
// on met a jour la matrice de cout
updateCostCalculator();
Direction result = Direction.NONE;
if(!hasArrived())
{ // on verifie si on est arrivé
checkIsOnPath();
// si le chemin n'est pas vide si il est valide o... | Direction function() throws StopRequestException { ai.checkInterruption(); updateCostCalculator(); Direction result = Direction.NONE; if(!hasArrived()) { checkIsOnPath(); if(path.isEmpty() !checkPathValidity()) updatePath(); AiTile tile = null; if(path.getLength()>1) tile = path.getTile(1); else if(path.getLength()>0) ... | /** le process de decision
*
* @return
* Description manquante !
* @throws StopRequestException
* Description manquante !
*/ | le process de decision | update | {
"repo_name": "vlabatut/totalboumboum",
"path": "resources/ai/org/totalboumboum/ai/v200910/ais/findiksirin/v5c/EscapeManager.java",
"license": "gpl-2.0",
"size": 6389
} | [
"org.totalboumboum.ai.v200910.adapter.communication.StopRequestException",
"org.totalboumboum.ai.v200910.adapter.data.AiTile",
"org.totalboumboum.engine.content.feature.Direction"
] | import org.totalboumboum.ai.v200910.adapter.communication.StopRequestException; import org.totalboumboum.ai.v200910.adapter.data.AiTile; import org.totalboumboum.engine.content.feature.Direction; | import org.totalboumboum.ai.v200910.adapter.communication.*; import org.totalboumboum.ai.v200910.adapter.data.*; import org.totalboumboum.engine.content.feature.*; | [
"org.totalboumboum.ai",
"org.totalboumboum.engine"
] | org.totalboumboum.ai; org.totalboumboum.engine; | 2,009,784 |
protected synchronized void init(final Object task) {
threadInitializer = ServiceLocator.findApplicationService(ThreadInitializerFactory.class).create();
request = LifeCycleManager.getCurrentRequest();
if (request == null) {
request = new RequestImpl("DominoTasklet: " + task.getClass().getName());
} else ... | synchronized void function(final Object task) { threadInitializer = ServiceLocator.findApplicationService(ThreadInitializerFactory.class).create(); request = LifeCycleManager.getCurrentRequest(); if (request == null) { request = new RequestImpl(STR + task.getClass().getName()); } else { request = request.clone(STR + ta... | /**
* Determines the sessionType under which the current runnable should run. The first non-null value of the following list is returned
* <ul>
* <li>If the runnable implements <code>IDominoRunnable</code>: result of <code>getSessionType</code></li>
* <li>the value of {@link SessionType} Annotation</li>
* <li... | Determines the sessionType under which the current runnable should run. The first non-null value of the following list is returned If the runnable implements <code>IDominoRunnable</code>: result of <code>getSessionType</code> the value of <code>SessionType</code> Annotation DominoSessionType.DEFAULT | init | {
"repo_name": "rPraml/org.openntf.domino",
"path": "domino/core/src/main/java/org/openntf/domino/xots/DominoTaskletWrapper.java",
"license": "apache-2.0",
"size": 4426
} | [
"org.openntf.domino.commons.LifeCycleManager",
"org.openntf.domino.commons.ServiceLocator",
"org.openntf.domino.commons.impl.RequestImpl",
"org.openntf.domino.utils.Factory"
] | import org.openntf.domino.commons.LifeCycleManager; import org.openntf.domino.commons.ServiceLocator; import org.openntf.domino.commons.impl.RequestImpl; import org.openntf.domino.utils.Factory; | import org.openntf.domino.commons.*; import org.openntf.domino.commons.impl.*; import org.openntf.domino.utils.*; | [
"org.openntf.domino"
] | org.openntf.domino; | 286,685 |
public List<StorageData> getOpenedStorages() {
List<StorageData> list = new ArrayList<>();
list.addAll(openedStoragesMap.keySet());
return list;
} | List<StorageData> function() { List<StorageData> list = new ArrayList<>(); list.addAll(openedStoragesMap.keySet()); return list; } | /**
* Returns list of opened storages.
*
* @return Returns list of opened storages.
*/ | Returns list of opened storages | getOpenedStorages | {
"repo_name": "inspectIT/inspectIT",
"path": "inspectit.server/src/main/java/rocks/inspectit/server/storage/CmrStorageManager.java",
"license": "agpl-3.0",
"size": 42931
} | [
"java.util.ArrayList",
"java.util.List",
"rocks.inspectit.shared.cs.storage.StorageData"
] | import java.util.ArrayList; import java.util.List; import rocks.inspectit.shared.cs.storage.StorageData; | import java.util.*; import rocks.inspectit.shared.cs.storage.*; | [
"java.util",
"rocks.inspectit.shared"
] | java.util; rocks.inspectit.shared; | 2,488,554 |
public String getDisplayInch() {
return String.format(Locale.ENGLISH, "%.2f\"", this.displayInch);
}
| String function() { return String.format(Locale.ENGLISH, "%.2f\"", this.displayInch); } | /**
* Returns display diagonal display inch.
*
* @return diagional inch
*/ | Returns display diagonal display inch | getDisplayInch | {
"repo_name": "Morzeux/BiosecLogger",
"path": "src/com/morzeux/bioseclogger/logic/HardwareInfo.java",
"license": "apache-2.0",
"size": 8359
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,094,189 |
public String getMapReduceKeyValidator(String strClassName) {
Validation validation = Validation.getValidation(getUserValidations(),
strClassName);
if (validation != null) {
return validation.getKey();
}
return null;
} | String function(String strClassName) { Validation validation = Validation.getValidation(getUserValidations(), strClassName); if (validation != null) { return validation.getKey(); } return null; } | /**
* <p>
* This method provides validation for map/reduce key for the given class
* </p>
* .
*
* @param strClassName
* class name
* @return String validation class
*/ | This method provides validation for map/reduce key for the given class | getMapReduceKeyValidator | {
"repo_name": "impetus-opensource/jumbune",
"path": "common/src/main/java/org/jumbune/common/job/JobConfig.java",
"license": "lgpl-3.0",
"size": 33685
} | [
"org.jumbune.common.beans.Validation"
] | import org.jumbune.common.beans.Validation; | import org.jumbune.common.beans.*; | [
"org.jumbune.common"
] | org.jumbune.common; | 2,334,363 |
public void play(K key) {
if (!this.stopped) {
MediaPlayer r = this.players.get(key);
if (r != null) {
r.seek(Duration.ZERO);
r.play();
} else {
throw new NoSuchElementException();
}
}
} | void function(K key) { if (!this.stopped) { MediaPlayer r = this.players.get(key); if (r != null) { r.seek(Duration.ZERO); r.play(); } else { throw new NoSuchElementException(); } } } | /**
* Starts the player associated to the specified key
*
* @param key key with which the player is associated
*/ | Starts the player associated to the specified key | play | {
"repo_name": "TiWinDeTea/Raoul-the-Game",
"path": "src/main/java/com/github/tiwindetea/soundplayer/UnifiedPlayers.java",
"license": "mpl-2.0",
"size": 15608
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 2,307,489 |
public void validate() {
if (purchasePlan() != null) {
purchasePlan().validate();
}
if (supportedCapabilities() != null) {
supportedCapabilities().validate();
}
if (creationData() == null) {
throw LOGGER
.logExceptionAsError... | void function() { if (purchasePlan() != null) { purchasePlan().validate(); } if (supportedCapabilities() != null) { supportedCapabilities().validate(); } if (creationData() == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException(STR)); } else { creationData().validate(); } if (encryptionSettingsColle... | /**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/ | Validates the instance | validate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/models/SnapshotProperties.java",
"license": "mit",
"size": 19759
} | [
"com.azure.core.util.logging.ClientLogger"
] | import com.azure.core.util.logging.ClientLogger; | import com.azure.core.util.logging.*; | [
"com.azure.core"
] | com.azure.core; | 404,923 |
static synchronized void dataSourceSync() throws SQLException {
java.sql.Connection c = null;
Statement s = null;
try {
// Get database connection
c = DataSourceFactory.getInstance().getConnection();
// Run with it
//
// c.setReadO... | static synchronized void dataSourceSync() throws SQLException { java.sql.Connection c = null; Statement s = null; try { c = DataSourceFactory.getInstance().getConnection(); s = c.createStatement(); final ResultSet rs = s.executeQuery(IP_LOAD_SQL); if (rs != null) { m_knownips.clear(); while (rs.next()) { m_knownips.put... | /**
* Clears and synchronizes the internal known IP address cache with the
* current information contained in the database. To synchronize the cache
* the method opens a new connection to the database, loads the address,
* and then closes it's connection.
*
* @throws java.sql.SQLException
... | Clears and synchronizes the internal known IP address cache with the current information contained in the database. To synchronize the cache the method opens a new connection to the database, loads the address, and then closes it's connection | dataSourceSync | {
"repo_name": "bugcy013/opennms-tmp-tools",
"path": "opennms-services/src/main/java/org/opennms/netmgt/syslogd/SyslogdIPMgr.java",
"license": "gpl-2.0",
"size": 4889
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"org.opennms.core.db.DataSourceFactory"
] | import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import org.opennms.core.db.DataSourceFactory; | import java.sql.*; import org.opennms.core.db.*; | [
"java.sql",
"org.opennms.core"
] | java.sql; org.opennms.core; | 2,284,748 |
Rule Comment() {
return Sequence(String("%"),
Optional(Sequence(NonCommentChar(),
ZeroOrMore(FirstOf(VCHAR(), WSP()))))
.label(CommentText).suppressSubnodes(),
FirstOfS(Eol(), EOI))
.label(Comment);
}
| Rule Comment() { return Sequence(String("%"), Optional(Sequence(NonCommentChar(), ZeroOrMore(FirstOf(VCHAR(), WSP())))) .label(CommentText).suppressSubnodes(), FirstOfS(Eol(), EOI)) .label(Comment); } | /**
* comment ::= "%" ([non-comment-char *(VCHAR / WSP)]) eol
*/ | comment ::= "%" ([non-comment-char *(VCHAR / WSP)]) eol | Comment | {
"repo_name": "Sciss/abc4j",
"path": "abc/src/main/java/abc/parser/AbcGrammar.java",
"license": "lgpl-3.0",
"size": 72845
} | [
"org.parboiled.Rule"
] | import org.parboiled.Rule; | import org.parboiled.*; | [
"org.parboiled"
] | org.parboiled; | 736,027 |
protected void makeSpace(int length) throws IOException {
if (m_fillOffset + length > m_buffer.length) {
m_byteBuffer.setOffset(m_fillOffset);
m_byteBuffer.free(m_fillOffset, length);
m_buffer = m_byteBuffer.getBuffer();
m_fillOffset = m_byteBuffer.getOffset()... | void function(int length) throws IOException { if (m_fillOffset + length > m_buffer.length) { m_byteBuffer.setOffset(m_fillOffset); m_byteBuffer.free(m_fillOffset, length); m_buffer = m_byteBuffer.getBuffer(); m_fillOffset = m_byteBuffer.getOffset(); } } | /**
* Make at least the requested number of bytes available in the output
* buffer. If necessary, the output buffer will be replaced by a larger
* buffer.
*
* @param length number of bytes space to be made available
* @throws IOException if error writing to document
*/ | Make at least the requested number of bytes available in the output buffer. If necessary, the output buffer will be replaced by a larger buffer | makeSpace | {
"repo_name": "vkorbut/jibx",
"path": "jibx/build/src/org/jibx/runtime/impl/StreamWriterBase.java",
"license": "bsd-3-clause",
"size": 16084
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 285,247 |
public double covariance(final double[] xArray, final double[] yArray, boolean biasCorrected)
throws IllegalArgumentException {
Mean mean = new Mean();
double result = 0d;
int length = xArray.length;
if (length != yArray.length) {
throw MathRuntimeException.create... | double function(final double[] xArray, final double[] yArray, boolean biasCorrected) throws IllegalArgumentException { Mean mean = new Mean(); double result = 0d; int length = xArray.length; if (length != yArray.length) { throw MathRuntimeException.createIllegalArgumentException( LocalizedFormats.DIMENSIONS_MISMATCH_SI... | /**
* Computes the covariance between the two arrays.
*
* <p>Array lengths must match and the common length must be at least 2.</p>
*
* @param xArray first data array
* @param yArray second data array
* @param biasCorrected if true, returned value will be bias-corrected
* @return... | Computes the covariance between the two arrays. Array lengths must match and the common length must be at least 2 | covariance | {
"repo_name": "martingwhite/astor",
"path": "examples/math_63/src/main/java/org/apache/commons/math/stat/correlation/Covariance.java",
"license": "gpl-2.0",
"size": 10414
} | [
"org.apache.commons.math.MathRuntimeException",
"org.apache.commons.math.exception.util.LocalizedFormats",
"org.apache.commons.math.stat.descriptive.moment.Mean"
] | import org.apache.commons.math.MathRuntimeException; import org.apache.commons.math.exception.util.LocalizedFormats; import org.apache.commons.math.stat.descriptive.moment.Mean; | import org.apache.commons.math.*; import org.apache.commons.math.exception.util.*; import org.apache.commons.math.stat.descriptive.moment.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,136,014 |
private boolean check(File cached, boolean allowTooOld, boolean stable) {
if (cached.exists() && cached.isFile()) {
if (!allowTooOld && isOld(cached, stable)) {
if (!cached.delete()) {
tracer.error("Cannot delete temporary file: "
+ cached.getAbsolutePath());
}
} else {
return true;
... | boolean function(File cached, boolean allowTooOld, boolean stable) { if (cached.exists() && cached.isFile()) { if (!allowTooOld && isOld(cached, stable)) { if (!cached.delete()) { tracer.error(STR + cached.getAbsolutePath()); } } else { return true; } } return false; } | /**
* Check the resource to see if it is in the cache.
*
* @param cached
* the resource to check
* @param allowTooOld
* allow files even if they are considered too old
* @param stable
* a stable file (that dones't change too often) -- parameter
* used to ch... | Check the resource to see if it is in the cache | check | {
"repo_name": "nikiroo/fanfix",
"path": "src/be/nikiroo/utils/Cache.java",
"license": "gpl-3.0",
"size": 11776
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,563,617 |
public static void print(String name, LongSupplier valueSupplier) {
if (!isEnabled()) return;
printSub(null, name, valueSupplier.getAsLong(), true);
} | static void function(String name, LongSupplier valueSupplier) { if (!isEnabled()) return; printSub(null, name, valueSupplier.getAsLong(), true); } | /**
* Outputs a long value to the log.
*
* @param name the name of the value
* @param valueSupplier the supplier of long value to output
*/ | Outputs a long value to the log | print | {
"repo_name": "MasatoKokubo/DebugTrace",
"path": "src/main/java/org/debugtrace/DebugTrace.java",
"license": "mit",
"size": 66018
} | [
"java.util.function.LongSupplier"
] | import java.util.function.LongSupplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,829,167 |
private static void deleteRemoveVariableInstructions(ProgramBlock pb) {
if (pb instanceof WhileProgramBlock) {
WhileProgramBlock wpb = (WhileProgramBlock) pb;
for (ProgramBlock pbc : wpb.getChildBlocks())
deleteRemoveVariableInstructions(pbc);
} else if (pb instanceof IfProgramBlock) {
IfProgramBloc... | static void function(ProgramBlock pb) { if (pb instanceof WhileProgramBlock) { WhileProgramBlock wpb = (WhileProgramBlock) pb; for (ProgramBlock pbc : wpb.getChildBlocks()) deleteRemoveVariableInstructions(pbc); } else if (pb instanceof IfProgramBlock) { IfProgramBlock ipb = (IfProgramBlock) pb; for (ProgramBlock pbc :... | /**
* Recursively traverse program block to delete 'remove variable'
* instructions.
*
* @param pb
* Program block
*/ | Recursively traverse program block to delete 'remove variable' instructions | deleteRemoveVariableInstructions | {
"repo_name": "asurve/arvind-sysml2",
"path": "src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java",
"license": "apache-2.0",
"size": 41918
} | [
"java.util.ArrayList",
"org.apache.sysml.runtime.controlprogram.ForProgramBlock",
"org.apache.sysml.runtime.controlprogram.IfProgramBlock",
"org.apache.sysml.runtime.controlprogram.ProgramBlock",
"org.apache.sysml.runtime.controlprogram.WhileProgramBlock",
"org.apache.sysml.runtime.instructions.Instructio... | import java.util.ArrayList; import org.apache.sysml.runtime.controlprogram.ForProgramBlock; import org.apache.sysml.runtime.controlprogram.IfProgramBlock; import org.apache.sysml.runtime.controlprogram.ProgramBlock; import org.apache.sysml.runtime.controlprogram.WhileProgramBlock; import org.apache.sysml.runtime.instru... | import java.util.*; import org.apache.sysml.runtime.controlprogram.*; import org.apache.sysml.runtime.instructions.*; | [
"java.util",
"org.apache.sysml"
] | java.util; org.apache.sysml; | 2,803,766 |
private HashSet<String> getSanctionedReferencersOfInetAddress() {
return new HashSet<>(Arrays.asList(
// old admin API
"org/apache/geode/admin/GemFireMemberStatus",
"org/apache/geode/admin/internal/DistributionLocatorImpl",
"org/apache/geode/admin/internal/GemFireHealthImpl",
... | HashSet<String> function() { return new HashSet<>(Arrays.asList( STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR, STR)); } | /**
* These classes are known to use restricted methods and references to those methods
* will not cause the test to fail.
*/ | These classes are known to use restricted methods and references to those methods will not cause the test to fail | getSanctionedReferencersOfInetAddress | {
"repo_name": "davinash/geode",
"path": "geode-core/src/integrationTest/java/org/apache/geode/codeAnalysis/RestrictUseOfInetAddressJUnitTest.java",
"license": "apache-2.0",
"size": 10702
} | [
"java.util.Arrays",
"java.util.HashSet"
] | import java.util.Arrays; import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,879,197 |
public UserInterface saveServiceInstances(String entityGroupName,
Collection<ServiceURLInterface> serviceMetadataObjects,
UserInterface currentUser) throws RemoteException {
currentUser = new ServiceURLOperations(... | UserInterface function(String entityGroupName, Collection<ServiceURLInterface> serviceMetadataObjects, UserInterface currentUser) throws RemoteException { currentUser = new ServiceURLOperations().saveServiceInstances(entityGroupName, serviceMetadataObjects, currentUser); return saveUser(currentUser); } | /**
* This method saves the admin selected services to the repository.
* @param entityGroupName
* @param serviceMetadataObjects
* @param currentUser
* @return
* @throws RemoteException
*/ | This method saves the admin selected services to the repository | saveServiceInstances | {
"repo_name": "NCIP/cab2b",
"path": "software/cab2bAdmin/src/java/edu/wustl/cab2b/admin/bizlogic/ServiceInstanceBizLogic.java",
"license": "bsd-3-clause",
"size": 3114
} | [
"edu.wustl.cab2b.common.user.ServiceURLInterface",
"edu.wustl.cab2b.common.user.UserInterface",
"edu.wustl.cab2b.server.serviceurl.ServiceURLOperations",
"java.rmi.RemoteException",
"java.util.Collection"
] | import edu.wustl.cab2b.common.user.ServiceURLInterface; import edu.wustl.cab2b.common.user.UserInterface; import edu.wustl.cab2b.server.serviceurl.ServiceURLOperations; import java.rmi.RemoteException; import java.util.Collection; | import edu.wustl.cab2b.common.user.*; import edu.wustl.cab2b.server.serviceurl.*; import java.rmi.*; import java.util.*; | [
"edu.wustl.cab2b",
"java.rmi",
"java.util"
] | edu.wustl.cab2b; java.rmi; java.util; | 1,274,428 |
public static Duration getInstance(String dur, NumberFormat format, Locale locale) throws MPXJException
{
try
{
int lastIndex = dur.length() - 1;
int index = lastIndex;
double duration;
TimeUnit units;
while ((index > 0) && (Character.isDigit(dur.charAt(in... | static Duration function(String dur, NumberFormat format, Locale locale) throws MPXJException { try { int lastIndex = dur.length() - 1; int index = lastIndex; double duration; TimeUnit units; while ((index > 0) && (Character.isDigit(dur.charAt(index)) == false)) { --index; } { duration = format.parse(dur).doubleValue()... | /**
* Retrieve an Duration instance. Use shared objects to
* represent common values for memory efficiency.
*
* @param dur duration formatted as a string
* @param format number format
* @param locale target locale
* @return Duration instance
* @throws MPXJException
*/ | Retrieve an Duration instance. Use shared objects to represent common values for memory efficiency | getInstance | {
"repo_name": "tmyroadctfig/mpxj",
"path": "net/sf/mpxj/mpx/DurationUtility.java",
"license": "lgpl-2.1",
"size": 2811
} | [
"java.text.NumberFormat",
"java.text.ParseException",
"java.util.Locale",
"net.sf.mpxj.Duration",
"net.sf.mpxj.MPXJException",
"net.sf.mpxj.TimeUnit"
] | import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; import net.sf.mpxj.Duration; import net.sf.mpxj.MPXJException; import net.sf.mpxj.TimeUnit; | import java.text.*; import java.util.*; import net.sf.mpxj.*; | [
"java.text",
"java.util",
"net.sf.mpxj"
] | java.text; java.util; net.sf.mpxj; | 1,694,112 |
public static Iterator select(String query, Node node)
throws XPathException
{
Pattern pattern = parseSelect(query);
return pattern.select(node);
} | static Iterator function(String query, Node node) throws XPathException { Pattern pattern = parseSelect(query); return pattern.select(node); } | /**
* Selects all node matching an XPath pattern
*
* @param query XPath select pattern.
* @param node XML node to start searching from.
* @return An iterator of nodes matching the pattern.
*/ | Selects all node matching an XPath pattern | select | {
"repo_name": "dlitz/resin",
"path": "modules/kernel/src/com/caucho/xpath/XPath.java",
"license": "gpl-2.0",
"size": 10727
} | [
"java.util.Iterator",
"org.w3c.dom.Node"
] | import java.util.Iterator; import org.w3c.dom.Node; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 137,936 |
public static List<Double> getTimesBeforeVmMigration(List<Vm> vms) {
List<Double> timeBeforeVmMigration = new LinkedList<Double>();
for (Vm vm : vms) {
boolean previousIsInMigration = false;
double lastTimeMigrationFinished = 0;
for (VmStateHistoryEntry entry : vm.getStateHistory()) {
if (prev... | static List<Double> function(List<Vm> vms) { List<Double> timeBeforeVmMigration = new LinkedList<Double>(); for (Vm vm : vms) { boolean previousIsInMigration = false; double lastTimeMigrationFinished = 0; for (VmStateHistoryEntry entry : vm.getStateHistory()) { if (previousIsInMigration == true && entry.isInMigration()... | /**
* Gets the times before vm migration.
*
* @param vms the vms
* @return the times before vm migration
*/ | Gets the times before vm migration | getTimesBeforeVmMigration | {
"repo_name": "Sukoon-Sharma/OpenSim",
"path": "src/org/opensim/storage/Helper.java",
"license": "lgpl-3.0",
"size": 27559
} | [
"java.util.LinkedList",
"java.util.List",
"org.cloudbus.cloudsim.Vm",
"org.cloudbus.cloudsim.VmStateHistoryEntry"
] | import java.util.LinkedList; import java.util.List; import org.cloudbus.cloudsim.Vm; import org.cloudbus.cloudsim.VmStateHistoryEntry; | import java.util.*; import org.cloudbus.cloudsim.*; | [
"java.util",
"org.cloudbus.cloudsim"
] | java.util; org.cloudbus.cloudsim; | 934,642 |
public SkylarkFileDependency getDependency() {
return dependency;
}
@Immutable
public static final class SkylarkImportLookupKey implements Serializable {
public final Label importLabel;
public final boolean inWorkspace;
public SkylarkImportLookupKey(Label importLabel, boolean inWorkspace) {... | SkylarkFileDependency function() { return dependency; } public static final class SkylarkImportLookupKey implements Serializable { public final Label importLabel; public final boolean inWorkspace; public SkylarkImportLookupKey(Label importLabel, boolean inWorkspace) { Preconditions.checkNotNull(importLabel); Preconditi... | /**
* Returns the immediate Skylark file dependency corresponding to this import lookup value.
*/ | Returns the immediate Skylark file dependency corresponding to this import lookup value | getDependency | {
"repo_name": "spxtr/bazel",
"path": "src/main/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupValue.java",
"license": "apache-2.0",
"size": 4241
} | [
"com.google.common.base.Preconditions",
"com.google.devtools.build.lib.cmdline.Label",
"java.io.Serializable"
] | import com.google.common.base.Preconditions; import com.google.devtools.build.lib.cmdline.Label; import java.io.Serializable; | import com.google.common.base.*; import com.google.devtools.build.lib.cmdline.*; import java.io.*; | [
"com.google.common",
"com.google.devtools",
"java.io"
] | com.google.common; com.google.devtools; java.io; | 2,754,995 |
public JSONObject getProject() {
HttpResponse<JsonNode> response;
try {
response = Unirest.get(apiUrl + "/project/{id}")
.queryString("api_key", apiKey)
.routeParam("id", String.valueOf(projectId))
.asJson();
} catch (Un... | JSONObject function() { HttpResponse<JsonNode> response; try { response = Unirest.get(apiUrl + STR) .queryString(STR, apiKey) .routeParam("id", String.valueOf(projectId)) .asJson(); } catch (UnirestException e) { throw new PyBossaRequestException(e); } if (response.getStatus() != 200) { throw new PyBossaRequestExceptio... | /**
* Get the current project.
*
* @return the project
* @throws PyBossaRequestException if the project cannot be fetched
*/ | Get the current project | getProject | {
"repo_name": "coolcrowd/ObjectService",
"path": "src/main/java/edu/kit/ipd/crowdcontrol/objectservice/crowdworking/pybossa/PyBossaRequests.java",
"license": "apache-2.0",
"size": 9022
} | [
"com.mashape.unirest.http.HttpResponse",
"com.mashape.unirest.http.JsonNode",
"com.mashape.unirest.http.Unirest",
"com.mashape.unirest.http.exceptions.UnirestException",
"org.json.JSONObject"
] | import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.JsonNode; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.http.exceptions.UnirestException; import org.json.JSONObject; | import com.mashape.unirest.http.*; import com.mashape.unirest.http.exceptions.*; import org.json.*; | [
"com.mashape.unirest",
"org.json"
] | com.mashape.unirest; org.json; | 467,722 |
@Override
public Adapter createMSwPackageProvidedInterfacePVASwitchCaseAdapter() {
if (mSwPackageProvidedInterfacePVASwitchCaseItemProvider == null) {
mSwPackageProvidedInterfacePVASwitchCaseItemProvider = new MSwPackageProvidedInterfacePVASwitchCaseItemProvider(this);
}
return mSwPackageProvidedInterface... | Adapter function() { if (mSwPackageProvidedInterfacePVASwitchCaseItemProvider == null) { mSwPackageProvidedInterfacePVASwitchCaseItemProvider = new MSwPackageProvidedInterfacePVASwitchCaseItemProvider(this); } return mSwPackageProvidedInterfacePVASwitchCaseItemProvider; } protected MSwPackageProvidedInterfacePVAExpress... | /**
* This creates an adapter for a {@link es.uah.aut.srg.micobs.mesp.mespswp.MSwPackageProvidedInterfacePVASwitchCase}.
* @generated
*/ | This creates an adapter for a <code>es.uah.aut.srg.micobs.mesp.mespswp.MSwPackageProvidedInterfacePVASwitchCase</code> | createMSwPackageProvidedInterfacePVASwitchCaseAdapter | {
"repo_name": "parraman/micobs",
"path": "mesp/es.uah.aut.srg.micobs.mesp/src/es/uah/aut/srg/micobs/mesp/mespswp/provider/mespswpItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 23254
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,824,311 |
private void init(Window window, CmsResourceTypeApp app) {
CmsObject rootCms = null;
try {
m_cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject());
rootCms = OpenCms.initCmsObject(m_cms);
rootCms.getRequestContext().setSiteRoot("");
} catch (CmsException e1... | void function(Window window, CmsResourceTypeApp app) { CmsObject rootCms = null; try { m_cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject()); rootCms = OpenCms.initCmsObject(m_cms); rootCms.getRequestContext().setSiteRoot(""); } catch (CmsException e1) { m_cms = A_CmsUI.getCmsObject(); rootCms = m_cms; } CmsVaadinUtils... | /**
* Initializes the form.<p>
*
* @param window Window
* @param app app
*/ | Initializes the form | init | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java",
"license": "lgpl-2.1",
"size": 38451
} | [
"com.vaadin.ui.Window",
"org.opencms.file.CmsObject",
"org.opencms.main.CmsException",
"org.opencms.main.OpenCms",
"org.opencms.ui.CmsVaadinUtils",
"org.opencms.ui.apps.Messages"
] | import com.vaadin.ui.Window; import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.ui.CmsVaadinUtils; import org.opencms.ui.apps.Messages; | import com.vaadin.ui.*; import org.opencms.file.*; import org.opencms.main.*; import org.opencms.ui.*; import org.opencms.ui.apps.*; | [
"com.vaadin.ui",
"org.opencms.file",
"org.opencms.main",
"org.opencms.ui"
] | com.vaadin.ui; org.opencms.file; org.opencms.main; org.opencms.ui; | 2,459,931 |
public final void testEncryptedPrivateKeyInfoStringbyteArray2() {
try {
new EncryptedPrivateKeyInfo("bla-bla",
EncryptedPrivateKeyInfoData.encryptedData);
fail(getName() + ": NoSuchAlgorithmException has not been thrown");
} catch (NoSuchAlgorithmExce... | final void function() { try { new EncryptedPrivateKeyInfo(STR, EncryptedPrivateKeyInfoData.encryptedData); fail(getName() + STR); } catch (NoSuchAlgorithmException ok) { } try { new EncryptedPrivateKeyInfo("", EncryptedPrivateKeyInfoData.encryptedData); fail(getName() + STR); } catch (NoSuchAlgorithmException ok) { } } | /**
* Test #2 for <code>EncryptedPrivateKeyInfo(String, byte[])</code>
* constructor <br>
* Assertion: <code>NoSuchAlgorithmException</code>- if the specified
* algorithm is not supported <br>
* Test preconditions: pass nonexistent algorithm name <br>
* Expected: <code>NoSuchAlgorith... | Test #2 for <code>EncryptedPrivateKeyInfo(String, byte[])</code> constructor Assertion: <code>NoSuchAlgorithmException</code>- if the specified algorithm is not supported Test preconditions: pass nonexistent algorithm name Expected: <code>NoSuchAlgorithmException</code> | testEncryptedPrivateKeyInfoStringbyteArray2 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/EncryptedPrivateKeyInfoTest.java",
"license": "gpl-2.0",
"size": 87618
} | [
"java.security.NoSuchAlgorithmException",
"javax.crypto.EncryptedPrivateKeyInfo",
"org.apache.harmony.crypto.tests.support.EncryptedPrivateKeyInfoData"
] | import java.security.NoSuchAlgorithmException; import javax.crypto.EncryptedPrivateKeyInfo; import org.apache.harmony.crypto.tests.support.EncryptedPrivateKeyInfoData; | import java.security.*; import javax.crypto.*; import org.apache.harmony.crypto.tests.support.*; | [
"java.security",
"javax.crypto",
"org.apache.harmony"
] | java.security; javax.crypto; org.apache.harmony; | 1,913,369 |
public String group() {
String answer = getGroup();
if (Strings.isNullOrBlank(answer)) {
answer = "default";
}
return answer;
} | String function() { String answer = getGroup(); if (Strings.isNullOrBlank(answer)) { answer = STR; } return answer; } | /**
* Returns the group if there is one configured or 'default' for the default group
*/ | Returns the group if there is one configured or 'default' for the default group | group | {
"repo_name": "janstey/fuse",
"path": "fabric/fabric-core/src/main/java/org/fusesource/fabric/api/jmx/MQBrokerConfigDTO.java",
"license": "apache-2.0",
"size": 7916
} | [
"org.fusesource.fabric.utils.Strings"
] | import org.fusesource.fabric.utils.Strings; | import org.fusesource.fabric.utils.*; | [
"org.fusesource.fabric"
] | org.fusesource.fabric; | 1,131,483 |
private boolean checkMRPDemand(final IMaterialPlanningContext mrpContext, final IMRPDemand mrpDemand)
{
//
// Qty Gross Requirement (i.e. how much we need to allocate, how much is the demand)
final BigDecimal qtyGrossReqsWithoutYield = mrpDemand.getMRPDemandsQty();
// Case: Gross requirements are ZERO => no... | boolean function(final IMaterialPlanningContext mrpContext, final IMRPDemand mrpDemand) { final BigDecimal qtyGrossReqsWithoutYield = mrpDemand.getMRPDemandsQty(); if (qtyGrossReqsWithoutYield.signum() == 0) { return false; } else if (qtyGrossReqsWithoutYield.signum() < 0) { getMRPNotesCollector().newMRPNoteBuilder(mrp... | /**
* Checks if given MRP demand is valid and we shall start plan the MRP supplies for it.
*
* @param mrpContext
* @param mrpDemand
* @return true if given MRP demand is valid and we can go on and try to allocate to supplies
*/ | Checks if given MRP demand is valid and we shall start plan the MRP supplies for it | checkMRPDemand | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.libero.libero/src/main/java/org/eevolution/mrp/api/impl/MRPSupplyReservator.java",
"license": "gpl-2.0",
"size": 10480
} | [
"de.metas.material.planning.IMaterialPlanningContext",
"java.math.BigDecimal",
"org.eevolution.mrp.api.IMRPDemand"
] | import de.metas.material.planning.IMaterialPlanningContext; import java.math.BigDecimal; import org.eevolution.mrp.api.IMRPDemand; | import de.metas.material.planning.*; import java.math.*; import org.eevolution.mrp.api.*; | [
"de.metas.material",
"java.math",
"org.eevolution.mrp"
] | de.metas.material; java.math; org.eevolution.mrp; | 78,749 |
public Logger getLogger() {
return log;
}
| Logger function() { return log; } | /**
* get the logger attached to this class.
* @return logger
*/ | get the logger attached to this class | getLogger | {
"repo_name": "mqsysadmin/dpdirect",
"path": "src/main/java/org/dpdirect/dpmgmt/DPDirectBase.java",
"license": "apache-2.0",
"size": 68776
} | [
"org.apache.log4j.Logger"
] | import org.apache.log4j.Logger; | import org.apache.log4j.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 1,954,718 |
@Override
protected DisbursementPayee getPayeeFromPerson(Person personDetail, Map<String, String> fieldValues) {
DisbursementPayee payee = super.getPayeeFromPerson(personDetail, fieldValues);
String payeeTypeCode = fieldValues.get(KFSPropertyConstants.PAYEE_TYPE_CODE);
ACHPayee a... | DisbursementPayee function(Person personDetail, Map<String, String> fieldValues) { DisbursementPayee payee = super.getPayeeFromPerson(personDetail, fieldValues); String payeeTypeCode = fieldValues.get(KFSPropertyConstants.PAYEE_TYPE_CODE); ACHPayee achPayee = new ACHPayee(); if (PdpConstants.PayeeIdTypeCodes.ENTITY.equ... | /**
* Override to set entity id as the payee id and set the pdp payee type
*
* @see org.kuali.kfs.fp.businessobject.lookup.DisbursementPayeeLookupableHelperServiceImpl#getPayeeFromPerson(org.kuali.rice.kim.api.identity.Person,
* java.util.Map)
*/ | Override to set entity id as the payee id and set the pdp payee type | getPayeeFromPerson | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/pdp/businessobject/lookup/ACHPayeeLookupableHelperServiceImpl.java",
"license": "agpl-3.0",
"size": 10674
} | [
"java.util.Map",
"org.kuali.kfs.fp.businessobject.DisbursementPayee",
"org.kuali.kfs.pdp.PdpConstants",
"org.kuali.kfs.pdp.businessobject.ACHPayee",
"org.kuali.kfs.sys.KFSPropertyConstants",
"org.kuali.rice.kim.api.identity.Person"
] | import java.util.Map; import org.kuali.kfs.fp.businessobject.DisbursementPayee; import org.kuali.kfs.pdp.PdpConstants; import org.kuali.kfs.pdp.businessobject.ACHPayee; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.rice.kim.api.identity.Person; | import java.util.*; import org.kuali.kfs.fp.businessobject.*; import org.kuali.kfs.pdp.*; import org.kuali.kfs.pdp.businessobject.*; import org.kuali.kfs.sys.*; import org.kuali.rice.kim.api.identity.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 2,563,022 |
@Override
public Filter getFilter() {
Filter filter = new Filter() { | Filter function() { Filter filter = new Filter() { | /**
* The filter for the list of applications. Removes applications that do not
* contain the constraint, case insensitive
*/ | The filter for the list of applications. Removes applications that do not contain the constraint, case insensitive | getFilter | {
"repo_name": "madelinecameron/CS397",
"path": "src/com/Lumension/android/permission_scanner/ApplicationViewAdapter.java",
"license": "mit",
"size": 5633
} | [
"android.widget.Filter"
] | import android.widget.Filter; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,846,281 |
System.out.println(">>> Cross validation score calculator example started.");
// Start ignite grid.
try (Ignite ignite = Ignition.start("examples/config/example-ignite.xml")) {
System.out.println(">>> Ignite grid started.");
// Create cache with training data.
Cache... | System.out.println(STR); try (Ignite ignite = Ignition.start(STR)) { System.out.println(STR); CacheConfiguration<Integer, LabeledVector<Double>> trainingSetCfg = new CacheConfiguration<>(); trainingSetCfg.setName(STR); trainingSetCfg.setAffinity(new RendezvousAffinityFunction(false, 10)); IgniteCache<Integer, LabeledVe... | /**
* Executes example.
*
* @param args Command line arguments, none required.
*/ | Executes example | main | {
"repo_name": "NSAmelchev/ignite",
"path": "examples/src/main/java/org/apache/ignite/examples/ml/selection/cv/CrossValidationExample.java",
"license": "apache-2.0",
"size": 5162
} | [
"java.util.Arrays",
"java.util.Random",
"org.apache.ignite.Ignite",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.Ignition",
"org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction",
"org.apache.ignite.configuration.CacheConfiguration",
"org.apache.ignite.ml.dataset.feature.extra... | import java.util.Arrays; import java.util.Random; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.Ignition; import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.m... | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cache.affinity.rendezvous.*; import org.apache.ignite.configuration.*; import org.apache.ignite.ml.dataset.feature.extractor.impl.*; import org.apache.ignite.ml.selection.cv.*; import org.apache.ignite.ml.selection.scoring.metric.*; import org.apa... | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 491,174 |
private void suppressBehavior(Node behaviorValue) {
if (behaviorValue == null) {
compiler.report(JSError.make(behaviorValue, POLYMER_UNQUALIFIED_BEHAVIOR));
return;
}
if (behaviorValue.isArrayLit()) {
for (Node child : behaviorValue.children()) {
suppressBehavior... | void function(Node behaviorValue) { if (behaviorValue == null) { compiler.report(JSError.make(behaviorValue, POLYMER_UNQUALIFIED_BEHAVIOR)); return; } if (behaviorValue.isArrayLit()) { for (Node child : behaviorValue.children()) { suppressBehavior(child); } } else if (behaviorValue.isObjectLit()) { stripPropertyTypes(b... | /**
* Strip property type annotations and add suppress checkTypes and globalThis on functions.
*/ | Strip property type annotations and add suppress checkTypes and globalThis on functions | suppressBehavior | {
"repo_name": "grpbwl/closure-compiler",
"path": "src/com/google/javascript/jscomp/PolymerPass.java",
"license": "apache-2.0",
"size": 31582
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 431,599 |
boolean isMember(TransportConfiguration configuration); | boolean isMember(TransportConfiguration configuration); | /**
* Returns true if this configuration is the target of this remoting connection
*
* @param configuration
* @return
*/ | Returns true if this configuration is the target of this remoting connection | isMember | {
"repo_name": "lburgazzoli/apache-activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java",
"license": "apache-2.0",
"size": 3061
} | [
"org.apache.activemq.artemis.api.core.TransportConfiguration"
] | import org.apache.activemq.artemis.api.core.TransportConfiguration; | import org.apache.activemq.artemis.api.core.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 2,357,736 |
public void onSuccess(Rows rows) {
while(_table.getRowCount() > 0) _table.removeRow(0);
_cache.merge(rows);
fireLoadedEvent(true);
fireRenderEvent();
renderHeader();
if(rows.size() == 0) {
renderEmpty(_messages.none(), STYLE_NO_DATA);
} else {
render(rows.getBegin());
}
... | void function(Rows rows) { while(_table.getRowCount() > 0) _table.removeRow(0); _cache.merge(rows); fireLoadedEvent(true); fireRenderEvent(); renderHeader(); if(rows.size() == 0) { renderEmpty(_messages.none(), STYLE_NO_DATA); } else { render(rows.getBegin()); } _begin = rows.getBegin(); fireRenderedEvent(); initOptima... | /**
* Should be called by the handler of <code>ContentProvider</code> requests to
* pass the loaded rows to the table. Usually this will be called by an asynchronous
* callback <code>AsyncCallback.onSuccess</code> implementation.
* @param rows
*/ | Should be called by the handler of <code>ContentProvider</code> requests to pass the loaded rows to the table. Usually this will be called by an asynchronous callback <code>AsyncCallback.onSuccess</code> implementation | onSuccess | {
"repo_name": "sanderberents/gwtlib",
"path": "src/org/gwtlib/client/table/ui/Table.java",
"license": "apache-2.0",
"size": 20076
} | [
"org.gwtlib.client.table.Rows"
] | import org.gwtlib.client.table.Rows; | import org.gwtlib.client.table.*; | [
"org.gwtlib.client"
] | org.gwtlib.client; | 1,375,244 |
public static ColorExt createFromFoRgbIcc(float redReplacement,
float greenReplacement, float blueReplacement, String profileName,
String profileSrc, ColorSpace colorSpace, float[] iccValues) {
ColorExt ce = new ColorExt(colorSpace, iccValues, 1.0f);
ce.rgbReplacementRed = re... | static ColorExt function(float redReplacement, float greenReplacement, float blueReplacement, String profileName, String profileSrc, ColorSpace colorSpace, float[] iccValues) { ColorExt ce = new ColorExt(colorSpace, iccValues, 1.0f); ce.rgbReplacementRed = redReplacement; ce.rgbReplacementGreen = greenReplacement; ce.r... | /**
* Create ColorExt object backup up FO's rgb-icc color function
*
* @param redReplacement
* Red part of RGB replacement color that will be used when ICC
* profile can not be loaded
* @param greenReplacement
* Green part of RGB replacement color that... | Create ColorExt object backup up FO's rgb-icc color function | createFromFoRgbIcc | {
"repo_name": "Distrotech/fop",
"path": "src/java/org/apache/fop/util/ColorExt.java",
"license": "apache-2.0",
"size": 8581
} | [
"java.awt.color.ColorSpace"
] | import java.awt.color.ColorSpace; | import java.awt.color.*; | [
"java.awt"
] | java.awt; | 1,361,550 |
public void _createTextCursorByRange() {
requiredMethod("createTextCursor()");
oCursor.gotoStart(false);
log.println( "Testing createTextCursorByRange()" );
XTextCursor oTCursor = oObj.createTextCursorByRange(oCursor);
tRes.tested("createTextCursorByRange()", oTCursor != nul... | void function() { requiredMethod(STR); oCursor.gotoStart(false); log.println( STR ); XTextCursor oTCursor = oObj.createTextCursorByRange(oCursor); tRes.tested(STR, oTCursor != null) ; } | /**
* Creates another text cursor using existing cursor's range. <p>
* Has <b> OK </b> status if not null value returned. <p>
* The following method tests are to be completed successfully before :
* <ul>
* <li> <code> createTextCursor </code> : to have a cursor object. </li>
* </ul>
*/ | Creates another text cursor using existing cursor's range. Has OK status if not null value returned. The following method tests are to be completed successfully before : <code> createTextCursor </code> : to have a cursor object. | _createTextCursorByRange | {
"repo_name": "jvanz/core",
"path": "qadevOOo/tests/java/ifc/text/_XSimpleText.java",
"license": "gpl-3.0",
"size": 4482
} | [
"com.sun.star.text.XTextCursor"
] | import com.sun.star.text.XTextCursor; | import com.sun.star.text.*; | [
"com.sun.star"
] | com.sun.star; | 2,346,778 |
public static Insets getScreenInsets(){
Point p = new Point();
GraphicsConfiguration graphicsConfiguration = null;
for (GraphicsDevice gd : GraphicsEnvironment
.getLocalGraphicsEnvironment().getScreenDevices()) {
if (gd.getDefaultConfiguration().getBounds().contains(p)) {
graphicsConfiguration = gd.... | static Insets function(){ Point p = new Point(); GraphicsConfiguration graphicsConfiguration = null; for (GraphicsDevice gd : GraphicsEnvironment .getLocalGraphicsEnvironment().getScreenDevices()) { if (gd.getDefaultConfiguration().getBounds().contains(p)) { graphicsConfiguration = gd.getDefaultConfiguration(); break; ... | /**
* Method to verify the existence of the task bar
* @return screenInsets
*/ | Method to verify the existence of the task bar | getScreenInsets | {
"repo_name": "amechtake/jnotify",
"path": "src/com/sbix/jnotify/NotifyType.java",
"license": "gpl-2.0",
"size": 2015
} | [
"java.awt.GraphicsConfiguration",
"java.awt.GraphicsDevice",
"java.awt.GraphicsEnvironment",
"java.awt.Insets",
"java.awt.Point",
"java.awt.Toolkit"
] | import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Insets; import java.awt.Point; import java.awt.Toolkit; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,900,119 |
@ActionReference(path = "Office/Spreadsheet/Format", position = 810),
@ActionReference(path = "Menu/Edit/Gimme More/Spreadsheet", position = 810)})
@NbBundle.Messages("CTL_moneyFormat=Money Format")
public static Action moneyFormat() {
return new FormatAction("#,##0.## ¤");
} | @ActionReference(path = STR, position = 810), @ActionReference(path = STR, position = 810)}) @NbBundle.Messages(STR) static Action function() { return new FormatAction(STR); } | /**
* Return an Action which format cell with currency.
*
* @return
*/ | Return an Action which format cell with currency | moneyFormat | {
"repo_name": "foxerfly/Joeffice",
"path": "Spreadsheet/src/org/joeffice/spreadsheet/actions/FormatActionFactory.java",
"license": "apache-2.0",
"size": 4933
} | [
"javax.swing.Action",
"org.openide.awt.ActionReference",
"org.openide.util.NbBundle"
] | import javax.swing.Action; import org.openide.awt.ActionReference; import org.openide.util.NbBundle; | import javax.swing.*; import org.openide.awt.*; import org.openide.util.*; | [
"javax.swing",
"org.openide.awt",
"org.openide.util"
] | javax.swing; org.openide.awt; org.openide.util; | 1,010,431 |
public void setDatabase(Session session, XWikiContext inputxcontext) throws XWikiException
{
this.store.setWiki(session);
} | void function(Session session, XWikiContext inputxcontext) throws XWikiException { this.store.setWiki(session); } | /**
* Virtual Wikis Allows to switch database connection
*
* @param session
* @param inputxcontext
* @throws XWikiException
*/ | Virtual Wikis Allows to switch database connection | setDatabase | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateBaseStore.java",
"license": "lgpl-2.1",
"size": 33783
} | [
"com.xpn.xwiki.XWikiContext",
"com.xpn.xwiki.XWikiException",
"org.hibernate.Session"
] | import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.XWikiException; import org.hibernate.Session; | import com.xpn.xwiki.*; import org.hibernate.*; | [
"com.xpn.xwiki",
"org.hibernate"
] | com.xpn.xwiki; org.hibernate; | 1,035,073 |
private boolean isReadObject(DetailAST aAST)
{
// name is readObject...
final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT);
if (!"readObject".equals(ident.getText())) {
return false;
}
// returns void...
final DetailAST typeAST =
... | boolean function(DetailAST aAST) { final DetailAST ident = aAST.findFirstToken(TokenTypes.IDENT); if (!STR.equals(ident.getText())) { return false; } final DetailAST typeAST = (DetailAST) aAST.findFirstToken(TokenTypes.TYPE).getFirstChild(); if (typeAST.getType() != TokenTypes.LITERAL_VOID) { return false; } final Deta... | /**
* Checks if a given method is readObject().
* @param aAST method def to check
* @return true if this is a readObject() definition
*/ | Checks if a given method is readObject() | isReadObject | {
"repo_name": "debrief/debrief",
"path": "org.mwc.debrief.build/checkstyle/contrib/usage/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/UnusedPrivateMethodCheck.java",
"license": "epl-1.0",
"size": 9556
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.FullIdent",
"com.puppycrawl.tools.checkstyle.api.TokenTypes"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.FullIdent; import com.puppycrawl.tools.checkstyle.api.TokenTypes; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 407,484 |
private List<IPath> getPathList(List<DAGNode> linkedNodeList)
{
DAGNode sourceNode = linkedNodeList.get(0);
DAGNode destinationNode = linkedNodeList.get(1);
return dagPanel.getPaths(sourceNode, destinationNode);
}
| List<IPath> function(List<DAGNode> linkedNodeList) { DAGNode sourceNode = linkedNodeList.get(0); DAGNode destinationNode = linkedNodeList.get(1); return dagPanel.getPaths(sourceNode, destinationNode); } | /**
* Gets path List between nodes
* @param linkedNodeList
* @return
*/ | Gets path List between nodes | getPathList | {
"repo_name": "NCIP/catissue-tools",
"path": "WEB-INF/src/edu/wustl/clinportal/flex/FlexInterface.java",
"license": "bsd-3-clause",
"size": 17599
} | [
"edu.wustl.clinportal.flex.dag.DAGNode",
"edu.wustl.common.querysuite.metadata.path.IPath",
"java.util.List"
] | import edu.wustl.clinportal.flex.dag.DAGNode; import edu.wustl.common.querysuite.metadata.path.IPath; import java.util.List; | import edu.wustl.clinportal.flex.dag.*; import edu.wustl.common.querysuite.metadata.path.*; import java.util.*; | [
"edu.wustl.clinportal",
"edu.wustl.common",
"java.util"
] | edu.wustl.clinportal; edu.wustl.common; java.util; | 1,278,706 |
public static DNSResolver getDNSResolver() {
return dnsResolver;
} | static DNSResolver function() { return dnsResolver; } | /**
* Returns the current DNS resolved used to perform DNS lookups.
*
* @return the active DNSResolver
*/ | Returns the current DNS resolved used to perform DNS lookups | getDNSResolver | {
"repo_name": "ayne/Smack",
"path": "smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java",
"license": "apache-2.0",
"size": 10988
} | [
"org.jivesoftware.smack.util.dns.DNSResolver"
] | import org.jivesoftware.smack.util.dns.DNSResolver; | import org.jivesoftware.smack.util.dns.*; | [
"org.jivesoftware.smack"
] | org.jivesoftware.smack; | 115,616 |
public static void listAllFirewallRulesInAServer(
com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) {
manager.firewallRules().listByServer("TestGroup", "testserver", Context.NONE);
} | static void function( com.azure.resourcemanager.mysqlflexibleserver.MySqlManager manager) { manager.firewallRules().listByServer(STR, STR, Context.NONE); } | /**
* Sample code: List all firewall rules in a server.
*
* @param manager Entry point to MySqlManager.
*/ | Sample code: List all firewall rules in a server | listAllFirewallRulesInAServer | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysqlflexibleserver/azure-resourcemanager-mysqlflexibleserver/src/samples/java/com/azure/resourcemanager/mysqlflexibleserver/generated/FirewallRulesListByServerSamples.java",
"license": "mit",
"size": 877
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,520,319 |
@GET
@Path("{organizationId}/apis/{apiId}/versions/{version}/activity")
@Produces(MediaType.APPLICATION_JSON)
public SearchResultsBean<AuditEntryBean> getApiVersionActivity(
@PathParam("organizationId") String organizationId, @PathParam("apiId") String apiId,
@PathParam("ver... | @Path(STR) @Produces(MediaType.APPLICATION_JSON) SearchResultsBean<AuditEntryBean> function( @PathParam(STR) String organizationId, @PathParam("apiId") String apiId, @PathParam(STR) String version, @QueryParam("page") int page, @QueryParam("count") int pageSize) throws ApiVersionNotFoundException, NotAuthorizedExceptio... | /**
* Use this endpoint to get audit activity information for a single version of the
* API.
* @summary Get API Version Activity
* @param organizationId The Organization ID.
* @param apiId The API ID.
* @param version The API version.
* @param page Which page of activity data t... | Use this endpoint to get audit activity information for a single version of the API | getApiVersionActivity | {
"repo_name": "jasonchaffee/apiman",
"path": "manager/api/rest/src/main/java/io/apiman/manager/api/rest/contract/IOrganizationResource.java",
"license": "apache-2.0",
"size": 109599
} | [
"io.apiman.manager.api.beans.audit.AuditEntryBean",
"io.apiman.manager.api.beans.search.SearchResultsBean",
"io.apiman.manager.api.rest.contract.exceptions.ApiVersionNotFoundException",
"io.apiman.manager.api.rest.contract.exceptions.NotAuthorizedException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
... | import io.apiman.manager.api.beans.audit.AuditEntryBean; import io.apiman.manager.api.beans.search.SearchResultsBean; import io.apiman.manager.api.rest.contract.exceptions.ApiVersionNotFoundException; import io.apiman.manager.api.rest.contract.exceptions.NotAuthorizedException; import javax.ws.rs.Path; import javax.ws.... | import io.apiman.manager.api.beans.audit.*; import io.apiman.manager.api.beans.search.*; import io.apiman.manager.api.rest.contract.exceptions.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"io.apiman.manager",
"javax.ws"
] | io.apiman.manager; javax.ws; | 483,393 |
public void addManyToSandbox(int number) {
List<Sector> sectors = sectorFactory.getAllSectors();
for (Sector sector : sectors) {
for (int i = 0; i < number; i++) {
starSystemGenerator.createSimpleSystem(sector, null, 0, 0);
}
}
} | void function(int number) { List<Sector> sectors = sectorFactory.getAllSectors(); for (Sector sector : sectors) { for (int i = 0; i < number; i++) { starSystemGenerator.createSimpleSystem(sector, null, 0, 0); } } } | /**
* Add the specified number of star systems to each of the available
* sectors. Each star system is placed completely randomly in the sector.
*
* @param number
* Number of star systems to add to each sector.
*/ | Add the specified number of star systems to each of the available sectors. Each star system is placed completely randomly in the sector | addManyToSandbox | {
"repo_name": "samuelpenn/mapcraft",
"path": "worldgen/src/main/java/uk/org/glendale/worldgen/test/Sandbox.java",
"license": "gpl-2.0",
"size": 6617
} | [
"java.util.List",
"uk.org.glendale.worldgen.astro.sector.Sector"
] | import java.util.List; import uk.org.glendale.worldgen.astro.sector.Sector; | import java.util.*; import uk.org.glendale.worldgen.astro.sector.*; | [
"java.util",
"uk.org.glendale"
] | java.util; uk.org.glendale; | 2,098,986 |
public MetadataIndexMetadata getIndexMetadata(); | MetadataIndexMetadata function(); | /**
* The metadata for the metadata index itself. Note that the
* {@link MetadataIndexMetadata#getManagedIndexMetadata()} returns the
* template {@link IndexMetadata} for the scale-out index partitions.
*
* @see #getScaleOutIndexMetadata()
*/ | The metadata for the metadata index itself. Note that the <code>MetadataIndexMetadata#getManagedIndexMetadata()</code> returns the template <code>IndexMetadata</code> for the scale-out index partitions | getIndexMetadata | {
"repo_name": "wikimedia/wikidata-query-blazegraph",
"path": "bigdata-core/bigdata/src/java/com/bigdata/mdi/IMetadataIndex.java",
"license": "gpl-2.0",
"size": 3164
} | [
"com.bigdata.mdi.MetadataIndex"
] | import com.bigdata.mdi.MetadataIndex; | import com.bigdata.mdi.*; | [
"com.bigdata.mdi"
] | com.bigdata.mdi; | 2,507,439 |
protected void processExchange(final Exchange exchange) {
GenericFile<T> file = getExchangeFileProperty(exchange);
log.trace("Processing file: {}", file);
// must extract the absolute name before the begin strategy as the file could potentially be pre moved
// and then the file name... | void function(final Exchange exchange) { GenericFile<T> file = getExchangeFileProperty(exchange); log.trace(STR, file); String absoluteFileName = file.getAbsoluteFilePath(); try { final GenericFileProcessStrategy<T> processStrategy = endpoint.getGenericFileProcessStrategy(); boolean begin = processStrategy.begin(operat... | /**
* Processes the exchange
*
* @param exchange the exchange
*/ | Processes the exchange | processExchange | {
"repo_name": "cexbrayat/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java",
"license": "apache-2.0",
"size": 20567
} | [
"org.apache.camel.Exchange"
] | import org.apache.camel.Exchange; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 854,817 |
public StringDataValue lower(StringDataValue result)
throws StandardException; | StringDataValue function(StringDataValue result) throws StandardException; | /**
* Convert the string to lower case.
*
* @param result The result (reusable - allocate if null).
*
* @return The string converted to lower case.
*
* @exception StandardException Thrown on error
*/ | Convert the string to lower case | lower | {
"repo_name": "papicella/snappy-store",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/StringDataValue.java",
"license": "apache-2.0",
"size": 7806
} | [
"com.pivotal.gemfirexd.internal.iapi.error.StandardException"
] | import com.pivotal.gemfirexd.internal.iapi.error.StandardException; | import com.pivotal.gemfirexd.internal.iapi.error.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 966,009 |
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>POST</code> method | doPost | {
"repo_name": "mladevbb/skidentity_oidc_op",
"path": "webapp/src/main/java/rub/nds/oidc/webapp/AuthenticationSerlvet.java",
"license": "lgpl-3.0",
"size": 3101
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,657,580 |
public void setAttributeId(Identifier identifier) {
this.attributeId = identifier;
} | void function(Identifier identifier) { this.attributeId = identifier; } | /**
* Sets the {@link org.apache.openaz.xacml.api.Identifier} representing the XACML AttributeId to be
* assigned in this <code>StdMutableAttributeAssignment</code>.
*
* @param identifier the <code>Identifier</code> representing the XACML AttributeId to be assigned in this
* <code>St... | Sets the <code>org.apache.openaz.xacml.api.Identifier</code> representing the XACML AttributeId to be assigned in this <code>StdMutableAttributeAssignment</code> | setAttributeId | {
"repo_name": "phrinx/incubator-openaz",
"path": "openaz-xacml/src/main/java/org/apache/openaz/xacml/std/StdMutableAttributeAssignment.java",
"license": "apache-2.0",
"size": 8225
} | [
"org.apache.openaz.xacml.api.Identifier"
] | import org.apache.openaz.xacml.api.Identifier; | import org.apache.openaz.xacml.api.*; | [
"org.apache.openaz"
] | org.apache.openaz; | 788,503 |
@Override
public HostConnectionPool<CL> getPoolForOperation(BaseOperation<CL, ?> op, String hashtag) throws NoAvailableHostsException {
String key = op.getStringKey();
HostConnectionPool<CL> hostPool;
HostToken hToken;
if (key != null) {
// If a hashtag is provided b... | HostConnectionPool<CL> function(BaseOperation<CL, ?> op, String hashtag) throws NoAvailableHostsException { String key = op.getStringKey(); HostConnectionPool<CL> hostPool; HostToken hToken; if (key != null) { if (hashtag == null hashtag.isEmpty()) { hToken = this.getTokenForKey(key); } else { String hashValue = String... | /**
* Identifying the proper pool for the operation. A couple of things that may affect the decision
* (a) hashtags: In this case we will construct the key by decomposing from the hashtag
* (b) type of key: string keys vs binary keys.
* In binary keys hashtags do not really matter.
*/ | Identifying the proper pool for the operation. A couple of things that may affect the decision (a) hashtags: In this case we will construct the key by decomposing from the hashtag (b) type of key: string keys vs binary keys. In binary keys hashtags do not really matter | getPoolForOperation | {
"repo_name": "balajivenki/dyno",
"path": "dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/lb/TokenAwareSelection.java",
"license": "apache-2.0",
"size": 7274
} | [
"com.netflix.dyno.connectionpool.BaseOperation",
"com.netflix.dyno.connectionpool.HostConnectionPool",
"com.netflix.dyno.connectionpool.exception.NoAvailableHostsException",
"org.apache.commons.lang3.StringUtils"
] | import com.netflix.dyno.connectionpool.BaseOperation; import com.netflix.dyno.connectionpool.HostConnectionPool; import com.netflix.dyno.connectionpool.exception.NoAvailableHostsException; import org.apache.commons.lang3.StringUtils; | import com.netflix.dyno.connectionpool.*; import com.netflix.dyno.connectionpool.exception.*; import org.apache.commons.lang3.*; | [
"com.netflix.dyno",
"org.apache.commons"
] | com.netflix.dyno; org.apache.commons; | 2,776,416 |
private void reportAGpsStatus(int type, int status, int ipaddr) {
switch (status) {
case GPS_REQUEST_AGPS_DATA_CONN:
if (DEBUG) Log.d(TAG, "GPS_REQUEST_AGPS_DATA_CONN");
// Set mAGpsDataConnectionState before calling startUsingNetworkFeature
// to... | void function(int type, int status, int ipaddr) { switch (status) { case GPS_REQUEST_AGPS_DATA_CONN: if (DEBUG) Log.d(TAG, STR); mAGpsDataConnectionState = AGPS_DATA_CONNECTION_OPENING; int result = mConnMgr.startUsingNetworkFeature( ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_SUPL); mAGpsDataConnectionIpAddr... | /**
* called from native code to update AGPS status
*/ | called from native code to update AGPS status | reportAGpsStatus | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/services/java/com/android/server/location/GpsLocationProvider.java",
"license": "gpl-3.0",
"size": 64310
} | [
"android.net.ConnectivityManager",
"android.util.Log",
"com.android.internal.telephony.Phone"
] | import android.net.ConnectivityManager; import android.util.Log; import com.android.internal.telephony.Phone; | import android.net.*; import android.util.*; import com.android.internal.telephony.*; | [
"android.net",
"android.util",
"com.android.internal"
] | android.net; android.util; com.android.internal; | 2,640,662 |
User selectByPrimaryKey(String username); | User selectByPrimaryKey(String username); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table s_user
*
* @mbggenerated Tue Sep 08 09:15:19 ICT 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table s_user | selectByPrimaryKey | {
"repo_name": "onlylin/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/user/dao/UserMapper.java",
"license": "agpl-3.0",
"size": 3777
} | [
"com.esofthead.mycollab.module.user.domain.User"
] | import com.esofthead.mycollab.module.user.domain.User; | import com.esofthead.mycollab.module.user.domain.*; | [
"com.esofthead.mycollab"
] | com.esofthead.mycollab; | 583,105 |
private void checkIOPrecondition(boolean precondition, String errorMessage) throws IOException {
if (!precondition) {
throw new IOException(errorMessage);
}
} | void function(boolean precondition, String errorMessage) throws IOException { if (!precondition) { throw new IOException(errorMessage); } } | /**
* Throws an IOException if precondition is false.
*
* <p>This method should be used in place of Preconditions.checkState in cases where the
* precondition is derived from the status of the IO operation. That makes it possible to retry
* the operation by catching IOException.
*/ | Throws an IOException if precondition is false. This method should be used in place of Preconditions.checkState in cases where the precondition is derived from the status of the IO operation. That makes it possible to retry the operation by catching IOException | checkIOPrecondition | {
"repo_name": "GoogleCloudDataproc/hadoop-connectors",
"path": "gcsio/src/main/java/com/google/cloud/hadoop/gcsio/GoogleCloudStorageReadChannel.java",
"license": "apache-2.0",
"size": 45905
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,400,790 |
public static String tranDate2DateTimeStr(Date date, TimeZone timeZone) {
try {
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
formatter2.setTimeZone(timeZone);
return formatter2.format(date);
} catch (Throwable e) ... | static String function(Date date, TimeZone timeZone) { try { SimpleDateFormat formatter2 = new SimpleDateFormat(STR, Locale.getDefault()); formatter2.setTimeZone(timeZone); return formatter2.format(date); } catch (Throwable e) { Log.e(TAG, e.toString()); return STR; } } | /**
* 2014-01-16 18:59:00 => "2014-01-16 18:59:00"
*
* @param date
* @return
*/ | 2014-01-16 18:59:00 => "2014-01-16 18:59:00" | tranDate2DateTimeStr | {
"repo_name": "captain-miao/bleYan",
"path": "supportsdk/src/main/java/com/github/captain_miao/android/supportsdk/utils/DateUtils.java",
"license": "gpl-2.0",
"size": 16273
} | [
"android.util.Log",
"java.text.SimpleDateFormat",
"java.util.Date",
"java.util.Locale",
"java.util.TimeZone"
] | import android.util.Log; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; | import android.util.*; import java.text.*; import java.util.*; | [
"android.util",
"java.text",
"java.util"
] | android.util; java.text; java.util; | 1,261,818 |
public Element createElementNS(String namespaceURI, String qualifiedName)
throws DOMException {
return new ElementNSImpl(this, namespaceURI, qualifiedName);
} | Element function(String namespaceURI, String qualifiedName) throws DOMException { return new ElementNSImpl(this, namespaceURI, qualifiedName); } | /**
* Introduced in DOM Level 2. <p>
* Creates an element of the given qualified name and namespace URI.
* If the given namespaceURI is null or an empty string and the
* qualifiedName has a prefix that is "xml", the created element
* is bound to the predefined namespace
* "http://www.w3.or... | Introduced in DOM Level 2. Creates an element of the given qualified name and namespace URI. If the given namespaceURI is null or an empty string and the qualifiedName has a prefix that is "xml", the created element is bound to the predefined namespace "HREF" [Namespaces] | createElementNS | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java",
"license": "gpl-2.0",
"size": 98511
} | [
"org.w3c.dom.DOMException",
"org.w3c.dom.Element"
] | import org.w3c.dom.DOMException; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 251,570 |
@Pure
public List<String> getModifiers() {
if (this.modifiers == null) {
return Collections.emptyList();
}
return this.modifiers;
} | List<String> function() { if (this.modifiers == null) { return Collections.emptyList(); } return this.modifiers; } | /** Replies the modifiers.
*
* @return the modifiers.
*/ | Replies the modifiers | getModifiers | {
"repo_name": "gallandarakhneorg/sarl",
"path": "eclipse-sarl/plugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/codebuilder/fragments/AbstractMemberBuilderFragment.java",
"license": "apache-2.0",
"size": 37490
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,526,096 |
private static <E> void nullElementFilter(final List<E> list) {
for (Iterator<E> i = list.iterator(); i.hasNext(); ) {
E element = i.next();
if (element == null || Objects.equals(element, "null")) {
i.remove();
}
}
} | static <E> void function(final List<E> list) { for (Iterator<E> i = list.iterator(); i.hasNext(); ) { E element = i.next(); if (element == null Objects.equals(element, "null")) { i.remove(); } } } | /**
* Filters a list for {@code null} (and "null" string) elements, removes them.
*/ | Filters a list for null (and "null" string) elements, removes them | nullElementFilter | {
"repo_name": "sonatype/nexus-public",
"path": "plugins/nexus-repository-maven/src/main/java/org/sonatype/nexus/repository/maven/internal/group/RepositoryMetadataMerger.java",
"license": "epl-1.0",
"size": 16672
} | [
"java.util.Iterator",
"java.util.List",
"java.util.Objects"
] | import java.util.Iterator; import java.util.List; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,742,755 |
public static void getTypeParameterLabel(ITypeParameter typeParameter, long flags, StyledString result) {
new JavaElementLabelComposer(result).appendTypeParameterLabel(typeParameter, flags);
} | static void function(ITypeParameter typeParameter, long flags, StyledString result) { new JavaElementLabelComposer(result).appendTypeParameterLabel(typeParameter, flags); } | /**
* Appends the label for a type parameter to a {@link StyledString}. Considers the TP_* flags.
*
* @param typeParameter the element to render
* @param flags the rendering flags. Flags with names starting with 'TP_' are considered.
* @param result the buffer to append the resulting label to
*
* @since 3... | Appends the label for a type parameter to a <code>StyledString</code>. Considers the TP_* flags | getTypeParameterLabel | {
"repo_name": "evidolob/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/ui/JavaElementLabels.java",
"license": "epl-1.0",
"size": 30641
} | [
"org.eclipse.jdt.core.ITypeParameter",
"org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer",
"org.eclipse.jface.viewers.StyledString"
] | import org.eclipse.jdt.core.ITypeParameter; import org.eclipse.jdt.internal.ui.viewsupport.JavaElementLabelComposer; import org.eclipse.jface.viewers.StyledString; | import org.eclipse.jdt.core.*; import org.eclipse.jdt.internal.ui.viewsupport.*; import org.eclipse.jface.viewers.*; | [
"org.eclipse.jdt",
"org.eclipse.jface"
] | org.eclipse.jdt; org.eclipse.jface; | 2,102,964 |
public static IdentityResponse send(Set recipients, InternalDistributedSystem is) {
Assert.assertTrue(recipients != null, "IdentityMessage NULL recipients set");
int i = 0;
for (Iterator ri = recipients.iterator(); ri.hasNext(); i++) {
Assert.assertTrue(null != ri.next(), "IdenityMessage recipient "... | static IdentityResponse function(Set recipients, InternalDistributedSystem is) { Assert.assertTrue(recipients != null, STR); int i = 0; for (Iterator ri = recipients.iterator(); ri.hasNext(); i++) { Assert.assertTrue(null != ri.next(), STR + i + STR); } IdentityResponse p = new IdentityResponse(is, recipients); Identit... | /**
* Sends a <code>IdentityRequest</code> to each <code>PartitionedRegion</code>
* {@link org.apache.geode.internal.cache.Node}. The <code>IdentityResponse</code> is used to
* fetch the highest current identity value.
*
* @param recipients
* @return the response object to wait upon
*/ | Sends a <code>IdentityRequest</code> to each <code>PartitionedRegion</code> <code>org.apache.geode.internal.cache.Node</code>. The <code>IdentityResponse</code> is used to fetch the highest current identity value | send | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/IdentityRequestMessage.java",
"license": "apache-2.0",
"size": 10548
} | [
"java.util.Iterator",
"java.util.Set",
"org.apache.geode.distributed.internal.InternalDistributedSystem",
"org.apache.geode.internal.Assert"
] | import java.util.Iterator; import java.util.Set; import org.apache.geode.distributed.internal.InternalDistributedSystem; import org.apache.geode.internal.Assert; | import java.util.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.internal.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,687,197 |
public void testAccessToCmsObject() throws Exception {
System.out.println("Trying to run an OpenCms job with access to the CmsObject the OpenCms system scheduler.");
// generate job description
CmsScheduledJobInfo jobInfo = new CmsScheduledJobInfo();
CmsContextInfo contextInfo = ne... | void function() throws Exception { System.out.println(STR); CmsScheduledJobInfo jobInfo = new CmsScheduledJobInfo(); CmsContextInfo contextInfo = new CmsContextInfo(OpenCms.getDefaultUsers().getUserAdmin()); jobInfo.setContextInfo(contextInfo); jobInfo.setJobName(STR); jobInfo.setClassName(TestScheduledJobWithCmsAccess... | /**
* Test case for accessing the {@link org.opencms.file.CmsObject} in a scheduled job.<p>
*
* @throws Exception if the test fails
*/ | Test case for accessing the <code>org.opencms.file.CmsObject</code> in a scheduled job | testAccessToCmsObject | {
"repo_name": "victos/opencms-core",
"path": "test/org/opencms/scheduler/TestCmsSchedulerInSystem.java",
"license": "lgpl-2.1",
"size": 5874
} | [
"org.opencms.main.CmsContextInfo",
"org.opencms.main.OpenCms"
] | import org.opencms.main.CmsContextInfo; import org.opencms.main.OpenCms; | import org.opencms.main.*; | [
"org.opencms.main"
] | org.opencms.main; | 2,595,075 |
public IgfsFile info(IgfsPath path) throws IgniteException; | IgfsFile function(IgfsPath path) throws IgniteException; | /**
* Gets file information for the specified path.
*
* @param path Path to get information for.
* @return File information for specified path or {@code null} if such path does not exist.
* @throws IgniteException In case of error.
*/ | Gets file information for the specified path | info | {
"repo_name": "leveyj/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/igfs/secondary/IgfsSecondaryFileSystem.java",
"license": "apache-2.0",
"size": 8141
} | [
"org.apache.ignite.IgniteException",
"org.apache.ignite.igfs.IgfsFile",
"org.apache.ignite.igfs.IgfsPath"
] | import org.apache.ignite.IgniteException; import org.apache.ignite.igfs.IgfsFile; import org.apache.ignite.igfs.IgfsPath; | import org.apache.ignite.*; import org.apache.ignite.igfs.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,880,039 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.