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 validateBindingProperties(List<Binding> bindings, boolean useSelectors) { assertEquals("Each queue should only be bound once.", 1, bindings.size()); Binding binding = bindings.get(0); if (useSelectors) { assertTrue("Binding does not contain a Selector a...
void function(List<Binding> bindings, boolean useSelectors) { assertEquals(STR, 1, bindings.size()); Binding binding = bindings.get(0); if (useSelectors) { assertTrue(STR, binding.getArguments().containsKey(AMQPFilterTypes.JMS_SELECTOR.getValue())); assertEquals(STR, SELECTOR_VALUE, binding.getArguments().get(AMQPFilte...
/** * Validate that each queue is bound only once following recovery (i.e. that bindings for non durable * queues or to non durable exchanges are not recovered), and if a selector should be present * that it is and contains the correct value * * @param bindings the set of bindings to valida...
Validate that each queue is bound only once following recovery (i.e. that bindings for non durable queues or to non durable exchanges are not recovered), and if a selector should be present that it is and contains the correct value
validateBindingProperties
{ "repo_name": "madhawa-gunasekara/andes", "path": "modules/andes-core/broker/src/test/java/org/wso2/andes/server/store/MessageStoreTest.java", "license": "apache-2.0", "size": 37171 }
[ "java.util.List", "org.wso2.andes.common.AMQPFilterTypes", "org.wso2.andes.server.binding.Binding" ]
import java.util.List; import org.wso2.andes.common.AMQPFilterTypes; import org.wso2.andes.server.binding.Binding;
import java.util.*; import org.wso2.andes.common.*; import org.wso2.andes.server.binding.*;
[ "java.util", "org.wso2.andes" ]
java.util; org.wso2.andes;
2,150,912
public static BigDecimal convertToDecimal(Schema schema, Object value, int scale) { return (BigDecimal) convertTo(Decimal.schema(scale), schema, value); }
static BigDecimal function(Schema schema, Object value, int scale) { return (BigDecimal) convertTo(Decimal.schema(scale), schema, value); }
/** * Convert the specified value to an {@link Decimal decimal} value. * Not supplying a schema may limit the ability to convert to the desired type. * * @param schema the schema for the value; may be null * @param value the value to be converted; may be null * @return the representation ...
Convert the specified value to an <code>Decimal decimal</code> value. Not supplying a schema may limit the ability to convert to the desired type
convertToDecimal
{ "repo_name": "ollie314/kafka", "path": "connect/api/src/main/java/org/apache/kafka/connect/data/Values.java", "license": "apache-2.0", "size": 50847 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
43,163
@Test public void scriptInclusion() throws Exception { FreeStyleProject p = r.createFreeStyleProject(); FreeStyleBuild b = r.buildAndAssertSuccess(p); HtmlPage html = r.createWebClient().getPage(b, "console"); // verify that there's an element inserted by the script assertNo...
@Test void function() throws Exception { FreeStyleProject p = r.createFreeStyleProject(); FreeStyleBuild b = r.buildAndAssertSuccess(p); HtmlPage html = r.createWebClient().getPage(b, STR); assertNotNull(html.getElementById(STR)); assertNotNull(html.getElementById(STR)); for (DomElement e : html.getElementsByTagName(ST...
/** * script.js defined in the annotator needs to be incorporated into the console page. */
script.js defined in the annotator needs to be incorporated into the console page
scriptInclusion
{ "repo_name": "v1v/jenkins", "path": "test/src/test/java/hudson/console/ConsoleAnnotatorTest.java", "license": "mit", "size": 14200 }
[ "com.gargoylesoftware.htmlunit.html.DomElement", "com.gargoylesoftware.htmlunit.html.HtmlPage", "hudson.model.FreeStyleBuild", "hudson.model.FreeStyleProject", "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.junit.Assert", "org.junit.Test" ]
import com.gargoylesoftware.htmlunit.html.DomElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; import hudson.model.FreeStyleBuild; import hudson.model.FreeStyleProject; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.Assert; import org.junit.Test;
import com.gargoylesoftware.htmlunit.html.*; import hudson.model.*; import org.hamcrest.*; import org.junit.*;
[ "com.gargoylesoftware.htmlunit", "hudson.model", "org.hamcrest", "org.junit" ]
com.gargoylesoftware.htmlunit; hudson.model; org.hamcrest; org.junit;
292,210
private ObjectNode encodeLinkTypeConstraint() { checkNotNull(constraint, "Link type constraint cannot be null"); final LinkTypeConstraint linkTypeConstraint = (LinkTypeConstraint) constraint; final ObjectNode result = context.mapper().createObjectNode() .put...
ObjectNode function() { checkNotNull(constraint, STR); final LinkTypeConstraint linkTypeConstraint = (LinkTypeConstraint) constraint; final ObjectNode result = context.mapper().createObjectNode() .put(ConstraintCodec.INCLUSIVE, linkTypeConstraint.isInclusive()); final ArrayNode jsonTypes = result.putArray(ConstraintCod...
/** * Encodes a link type constraint. * * @return JSON ObjectNode representing the constraint */
Encodes a link type constraint
encodeLinkTypeConstraint
{ "repo_name": "oplinkoms/onos", "path": "core/common/src/main/java/org/onosproject/codec/impl/EncodeConstraintCodecHelper.java", "license": "apache-2.0", "size": 7994 }
[ "com.fasterxml.jackson.databind.node.ArrayNode", "com.fasterxml.jackson.databind.node.ObjectNode", "com.google.common.base.Preconditions", "org.onosproject.net.Link", "org.onosproject.net.intent.constraint.LinkTypeConstraint" ]
import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.google.common.base.Preconditions; import org.onosproject.net.Link; import org.onosproject.net.intent.constraint.LinkTypeConstraint;
import com.fasterxml.jackson.databind.node.*; import com.google.common.base.*; import org.onosproject.net.*; import org.onosproject.net.intent.constraint.*;
[ "com.fasterxml.jackson", "com.google.common", "org.onosproject.net" ]
com.fasterxml.jackson; com.google.common; org.onosproject.net;
1,630,583
@Override public void run() { Stopwatch stopwatch = SimonManager.getStopwatch(NAME); try (Split ignored = stopwatch.start();) { sleep(SLEEP); } catch (InterruptedException e) { e.printStackTrace(); } // signal to latch that the thread is finished latch.countDown(); }
void function() { Stopwatch stopwatch = SimonManager.getStopwatch(NAME); try (Split ignored = stopwatch.start();) { sleep(SLEEP); } catch (InterruptedException e) { e.printStackTrace(); } latch.countDown(); }
/** * Run method implementing the code performed by the thread. */
Run method implementing the code performed by the thread
run
{ "repo_name": "mukteshkrmishra/javasimon", "path": "examples/src/main/java/org/javasimon/examples/MultithreadedSleeping.java", "license": "bsd-3-clause", "size": 2272 }
[ "org.javasimon.SimonManager", "org.javasimon.Split", "org.javasimon.Stopwatch" ]
import org.javasimon.SimonManager; import org.javasimon.Split; import org.javasimon.Stopwatch;
import org.javasimon.*;
[ "org.javasimon" ]
org.javasimon;
806,518
public static final void unzipAll(File zipFile, File targetDir) throws IOException { Log.i(TAG, "[METHOD] void unzipAll(zipFile:" + zipFile + ", targetDir:" + targetDir + ")"); ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile)); ZipEntry zentry = null; // if exists remove if (targetDir...
static final void function(File zipFile, File targetDir) throws IOException { Log.i(TAG, STR + zipFile + STR + targetDir + ")"); ZipInputStream zis = new ZipInputStream(new FileInputStream(zipFile)); ZipEntry zentry = null; if (targetDir.exists()) { FileUtils.deleteDirectory(targetDir); targetDir.mkdirs(); } else { tar...
/** * Unzip archive file all * * @param zipFile * @param targetDir * @throws filenotIOException */
Unzip archive file all
unzipAll
{ "repo_name": "gizrak/chaek-android", "path": "src/com/gizrak/ebook/utils/ZipUtil.java", "license": "mit", "size": 4049 }
[ "android.util.Log", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream", "org.apache.commons.io.FileUtils" ]
import android.util.Log; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.apache.commons.io.FileUtils;
import android.util.*; import java.io.*; import java.util.zip.*; import org.apache.commons.io.*;
[ "android.util", "java.io", "java.util", "org.apache.commons" ]
android.util; java.io; java.util; org.apache.commons;
889,611
@Test public void testAddStorage() { // first add NUM_DATA_BLOCKS + NUM_PARITY_BLOCKS storages, i.e., a complete // group of blocks/storages DatanodeStorageInfo[] storageInfos = DFSTestUtil.createDatanodeStorageInfos( TOTAL_NUM_BLOCKS); Block[] blocks = createReportedBlocks(TOTAL_NUM_BLOCKS)...
void function() { DatanodeStorageInfo[] storageInfos = DFSTestUtil.createDatanodeStorageInfos( TOTAL_NUM_BLOCKS); Block[] blocks = createReportedBlocks(TOTAL_NUM_BLOCKS); int i = 0; for (; i < storageInfos.length; i += 2) { info.addStorage(storageInfos[i], blocks[i]); Assert.assertEquals(i/2 + 1, info.numNodes()); } i ...
/** * Test adding storage and reported block */
Test adding storage and reported block
testAddStorage
{ "repo_name": "anjuncc/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockInfoStriped.java", "license": "apache-2.0", "size": 8632 }
[ "org.apache.hadoop.hdfs.DFSTestUtil", "org.apache.hadoop.hdfs.protocol.Block", "org.junit.Assert", "org.mockito.internal.util.reflection.Whitebox" ]
import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.protocol.Block; import org.junit.Assert; import org.mockito.internal.util.reflection.Whitebox;
import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*; import org.mockito.internal.util.reflection.*;
[ "org.apache.hadoop", "org.junit", "org.mockito.internal" ]
org.apache.hadoop; org.junit; org.mockito.internal;
1,263,483
GroupInspectionBuilder inspect(Inspection... inspection);
GroupInspectionBuilder inspect(Inspection... inspection);
/** * Asserts given server state * * @param inspections the objects containing inspections which should be verified on the server in the given order of * execution * @return the executor of the groups */
Asserts given server state
inspect
{ "repo_name": "petrandreev/arquillian-extension-warp", "path": "api/src/main/java/org/jboss/arquillian/warp/client/execution/GroupInspectionSpecifier.java", "license": "apache-2.0", "size": 1239 }
[ "org.jboss.arquillian.warp.Inspection" ]
import org.jboss.arquillian.warp.Inspection;
import org.jboss.arquillian.warp.*;
[ "org.jboss.arquillian" ]
org.jboss.arquillian;
4,542
private String getThread(final LogEvent event, final String format) { final ContextMap map = event.getContextMap(); if (null != map) { final Object object = map.get("thread"); if (null != object) { return object.toString(); } } ret...
String function(final LogEvent event, final String format) { final ContextMap map = event.getContextMap(); if (null != map) { final Object object = map.get(STR); if (null != object) { return object.toString(); } } return Thread.currentThread().getName(); }
/** * Utility thread to format category. * * @param event * @param format ancilliary format parameter - allowed to be null * @return the formatted string */
Utility thread to format category
getThread
{ "repo_name": "yanricheng/connection_manager", "path": "src/java/org/jivesoftware/util/log/format/ExtendedPatternFormatter.java", "license": "gpl-2.0", "size": 3813 }
[ "org.jivesoftware.util.log.ContextMap", "org.jivesoftware.util.log.LogEvent" ]
import org.jivesoftware.util.log.ContextMap; import org.jivesoftware.util.log.LogEvent;
import org.jivesoftware.util.log.*;
[ "org.jivesoftware.util" ]
org.jivesoftware.util;
1,676,133
boolean dfsPruning(PrefixVMSP prefix, Bitmap prefixBitmap, List<Integer> sn, List<Integer> in, int hasToBeGreaterThanForIStep, int m, Integer lastAppendedItem) throws IOException { boolean atLeastOneFrequentExtension = false; // System.out.println(prefix.toString()); // ====== S-STEPS ====== ...
boolean dfsPruning(PrefixVMSP prefix, Bitmap prefixBitmap, List<Integer> sn, List<Integer> in, int hasToBeGreaterThanForIStep, int m, Integer lastAppendedItem) throws IOException { boolean atLeastOneFrequentExtension = false; List<Integer> sTemp = new ArrayList<Integer>(); List<Bitmap> sTempBitmaps = new ArrayList<Bitm...
/** * This is the dfsPruning method as described in the SPAM paper. * * @param prefix the current prefix * @param prefixBitmap the bitmap corresponding to the current prefix * @param sn a list of items to be considered for i-steps * @param in a list of items to be considered for s-steps ...
This is the dfsPruning method as described in the SPAM paper
dfsPruning
{ "repo_name": "Quanhua-Guan/spmf", "path": "ca/pfv/spmf/algorithms/sequentialpatterns/spam/AlgoVMSP.java", "license": "gpl-3.0", "size": 33947 }
[ "ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset", "ca.pfv.spmf.tools.MemoryLogger", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset; import ca.pfv.spmf.tools.MemoryLogger; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map;
import ca.pfv.spmf.patterns.itemset_list_integers_without_support.*; import ca.pfv.spmf.tools.*; import java.io.*; import java.util.*;
[ "ca.pfv.spmf", "java.io", "java.util" ]
ca.pfv.spmf; java.io; java.util;
908,026
private void setUpMockQuery() { List results = new ArrayList(2); results.add(ITERATION_0_1); results.add(ITERATION_1_1); setUpQuery(results); }
void function() { List results = new ArrayList(2); results.add(ITERATION_0_1); results.add(ITERATION_1_1); setUpQuery(results); }
/** Sets the up mock query. */
Sets the up mock query
setUpMockQuery
{ "repo_name": "alarulrajan/CodeFest", "path": "test/com/technoetic/xplanner/tags/TestIterationOptionsTag.java", "license": "gpl-2.0", "size": 3437 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
493,741
public static <T> T newInstance(Constructor<? extends T> constructor, Object... args) { try { constructor.setAccessible(true); return constructor.newInstance(args); } catch (ReflectiveOperationException e) { throw Throwables.propagate(e); ...
static <T> T function(Constructor<? extends T> constructor, Object... args) { try { constructor.setAccessible(true); return constructor.newInstance(args); } catch (ReflectiveOperationException e) { throw Throwables.propagate(e); } }
/** * Call {@code constructor} with {@code args} and return a new instance of * type {@code T}. * * @param constructor the {@link Constructor} to use for creation * @param args the initialization args to pass to the constructor * @return an instance of the class to which the {@code constr...
Call constructor with args and return a new instance of type T
newInstance
{ "repo_name": "hcuffy/concourse", "path": "concourse-driver-java/src/main/java/com/cinchapi/concourse/util/Reflection.java", "license": "apache-2.0", "size": 9311 }
[ "com.google.common.base.Throwables", "java.lang.reflect.Constructor" ]
import com.google.common.base.Throwables; import java.lang.reflect.Constructor;
import com.google.common.base.*; import java.lang.reflect.*;
[ "com.google.common", "java.lang" ]
com.google.common; java.lang;
1,231,409
@Override protected void onAttachedToWindow() { super.onAttachedToWindow(); if (LOG_ATTACH_DETACH) { Log.d(TAG, "onAttachedToWindow reattach =" + detached); } if (detached && (renderer != null)) { int renderMode = RENDERMODE_CONTINUOUSLY; if (g...
void function() { super.onAttachedToWindow(); if (LOG_ATTACH_DETACH) { Log.d(TAG, STR + detached); } if (detached && (renderer != null)) { int renderMode = RENDERMODE_CONTINUOUSLY; if (glThread != null) { renderMode = glThread.getRenderMode(); } glThread = new GLThread(mThisWeakRef); if (renderMode != RENDERMODE_CONTIN...
/** * This method is used as part of the View class and is not normally * called or subclassed by clients of GLTextureView. */
This method is used as part of the View class and is not normally called or subclassed by clients of GLTextureView
onAttachedToWindow
{ "repo_name": "CartoDB/mobile-sdk", "path": "android/java/com/carto/ui/GLTextureView.java", "license": "bsd-3-clause", "size": 62715 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
95,691
public Observable<ServiceResponse<BackendAddressPoolInner>> getWithServiceResponseAsync(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be n...
Observable<ServiceResponse<BackendAddressPoolInner>> function(String resourceGroupName, String loadBalancerName, String backendAddressPoolName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (loadBalancerName == null) { throw new IllegalArgumentException(STR); } if (backendAddressPoolN...
/** * Gets load balancer backend address pool. * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the load balancer. * @param backendAddressPoolName The name of the backend address pool. * @throws IllegalArgumentException thrown if parameters...
Gets load balancer backend address pool
getWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/LoadBalancerBackendAddressPoolsInner.java", "license": "mit", "size": 22540 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,637,724
public void testForceMaxObjectsPerDomain() throws DocumentException { DomainConfiguration defaultConfig = TestInfo.getDefaultConfig(TestInfo.getDefaultDomain()); try { Job.createSnapShotJob(TestInfo.HARVESTID, lowChan, defaultConfig, -42L, -1L, Constants....
void function() throws DocumentException { DomainConfiguration defaultConfig = TestInfo.getDefaultConfig(TestInfo.getDefaultDomain()); try { Job.createSnapShotJob(TestInfo.HARVESTID, lowChan, defaultConfig, -42L, -1L, Constants.DEFAULT_MAX_JOB_RUNNING_TIME, 0); fail(STR); } catch (ArgumentNotValid e) { } try { Job.crea...
/** * Tests that it is possible to set the maximum number of objects to be retrieved per domain * i.e. that the order.xml that is used as base for this Job is edited accordingly. * * @throws DocumentException Thrown if SAXReader() has problems parsing the order.xml file. */
Tests that it is possible to set the maximum number of objects to be retrieved per domain i.e. that the order.xml that is used as base for this Job is edited accordingly
testForceMaxObjectsPerDomain
{ "repo_name": "netarchivesuite/netarchivesuite-svngit-migration", "path": "tests/dk/netarkivet/harvester/datamodel/JobTester.java", "license": "lgpl-2.1", "size": 48444 }
[ "dk.netarkivet.common.exceptions.ArgumentNotValid", "org.dom4j.Document", "org.dom4j.DocumentException", "org.dom4j.Node" ]
import dk.netarkivet.common.exceptions.ArgumentNotValid; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.Node;
import dk.netarkivet.common.exceptions.*; import org.dom4j.*;
[ "dk.netarkivet.common", "org.dom4j" ]
dk.netarkivet.common; org.dom4j;
2,066,487
private void updateSize(int size) { String groupSizeString; if (size == -1) { groupSizeString = null; } else { String groupSizeTemplateString = getResources().getQuantityString( R.plurals.num_contacts_in_group, size); AccountType accoun...
void function(int size) { String groupSizeString; if (size == -1) { groupSizeString = null; } else { String groupSizeTemplateString = getResources().getQuantityString( R.plurals.num_contacts_in_group, size); AccountType accountType = mAccountTypeManager.getAccountType(mAccountTypeString, mDataSet); groupSizeString = St...
/** * Display the count of the number of group members. * @param size of the group (can be -1 if no size could be determined) */
Display the count of the number of group members
updateSize
{ "repo_name": "rex-xxx/mt6572_x201", "path": "packages/apps/Contacts/src/com/android/contacts/group/GroupDetailFragment.java", "license": "gpl-2.0", "size": 54057 }
[ "com.android.contacts.model.account.AccountType" ]
import com.android.contacts.model.account.AccountType;
import com.android.contacts.model.account.*;
[ "com.android.contacts" ]
com.android.contacts;
1,264,382
@ToXML public final String getSSID() { if(Request.hasOption(Options.DB_URLS)) return Request.getOption(Options.DB_URLS); return ""; }
final String function() { if(Request.hasOption(Options.DB_URLS)) return Request.getOption(Options.DB_URLS); return ""; }
/** * Need to provide a search on the objects! * * @return the SSID of the connection as a String or the empty string if it was found */
Need to provide a search on the objects
getSSID
{ "repo_name": "IBM-DBWKL/DBWKL", "path": "com.ibm.dbwkl.request/src/com/ibm/dbwkl/workloadtypes/AWorkload.java", "license": "epl-1.0", "size": 14452 }
[ "com.ibm.dbwkl.request.Request", "com.ibm.dbwkl.request.parser.Options" ]
import com.ibm.dbwkl.request.Request; import com.ibm.dbwkl.request.parser.Options;
import com.ibm.dbwkl.request.*; import com.ibm.dbwkl.request.parser.*;
[ "com.ibm.dbwkl" ]
com.ibm.dbwkl;
2,891,276
private void check(String caption) { click($(CheckBoxElement.class).caption(caption).first()); }
void function(String caption) { click($(CheckBoxElement.class).caption(caption).first()); }
/** * workaround for http://dev.vaadin.com/ticket/13763 */
workaround for HREF
check
{ "repo_name": "Darsstar/framework", "path": "uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java", "license": "apache-2.0", "size": 9404 }
[ "com.vaadin.testbench.elements.CheckBoxElement" ]
import com.vaadin.testbench.elements.CheckBoxElement;
import com.vaadin.testbench.elements.*;
[ "com.vaadin.testbench" ]
com.vaadin.testbench;
894,716
public static Band[] getSourceBands(final Product sourceProduct, String[] sourceBandNames, final boolean includeVirtualBands) throws OperatorException { if (sourceBandNames == null || sourceBandNames.length == 0) { final Band[] bands = sourceProduct.getBands(); final List<String> ba...
static Band[] function(final Product sourceProduct, String[] sourceBandNames, final boolean includeVirtualBands) throws OperatorException { if (sourceBandNames == null sourceBandNames.length == 0) { final Band[] bands = sourceProduct.getBands(); final List<String> bandNameList = new ArrayList<>(sourceProduct.getNumBand...
/** * get the selected bands * * @param sourceProduct the input product * @param sourceBandNames the select band names * @param includeVirtualBands include virtual bands by default * @return band list * @throws OperatorException if source band not found */
get the selected bands
getSourceBands
{ "repo_name": "arraydev/snap-engine", "path": "snap-gpf/src/main/java/org/esa/snap/gpf/operators/standard/FlipOp.java", "license": "gpl-3.0", "size": 6457 }
[ "java.util.ArrayList", "java.util.List", "org.esa.snap.framework.datamodel.Band", "org.esa.snap.framework.datamodel.Product", "org.esa.snap.framework.datamodel.VirtualBand", "org.esa.snap.framework.gpf.OperatorException", "org.esa.snap.framework.gpf.OperatorSpi" ]
import java.util.ArrayList; import java.util.List; import org.esa.snap.framework.datamodel.Band; import org.esa.snap.framework.datamodel.Product; import org.esa.snap.framework.datamodel.VirtualBand; import org.esa.snap.framework.gpf.OperatorException; import org.esa.snap.framework.gpf.OperatorSpi;
import java.util.*; import org.esa.snap.framework.datamodel.*; import org.esa.snap.framework.gpf.*;
[ "java.util", "org.esa.snap" ]
java.util; org.esa.snap;
46,431
protected Drawable createSelectableDrawable() { ShapeDrawable drawableNormal = new ShapeDrawable(new OvalShape()); drawableNormal.getPaint().setColor(mColorNormal); StateListDrawable stateDrawable = new StateListDrawable(); ShapeDrawable drawableHighlight = new ShapeDrawable(new O...
Drawable function() { ShapeDrawable drawableNormal = new ShapeDrawable(new OvalShape()); drawableNormal.getPaint().setColor(mColorNormal); StateListDrawable stateDrawable = new StateListDrawable(); ShapeDrawable drawableHighlight = new ShapeDrawable(new OvalShape()); drawableHighlight.getPaint().setColor(mColorPressed)...
/** * <= api 19 */
<= api 19
createSelectableDrawable
{ "repo_name": "OpenSilk/Orpheus", "path": "common/src/main/java/org/opensilk/common/widget/FloatingActionButton.java", "license": "gpl-3.0", "size": 8693 }
[ "android.graphics.drawable.Drawable", "android.graphics.drawable.LayerDrawable", "android.graphics.drawable.ShapeDrawable", "android.graphics.drawable.StateListDrawable", "android.graphics.drawable.shapes.OvalShape" ]
import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.StateListDrawable; import android.graphics.drawable.shapes.OvalShape;
import android.graphics.drawable.*; import android.graphics.drawable.shapes.*;
[ "android.graphics" ]
android.graphics;
481,538
public void connect() { Log.i(TAG, "mBackgroundHandler.connect()"); Message msg = mBackgroundHandler.obtainMessage(CONNECT); mBackgroundHandler.sendMessage(msg); }
void function() { Log.i(TAG, STR); Message msg = mBackgroundHandler.obtainMessage(CONNECT); mBackgroundHandler.sendMessage(msg); }
/** * Connect the application to the Alljoyn bus attachment. We expect * this method to be called in the context of the main Service thread. * All this method does is to dispatch a corresponding method in the * context of the service worker thread. */
Connect the application to the Alljoyn bus attachment. We expect this method to be called in the context of the main Service thread. All this method does is to dispatch a corresponding method in the context of the service worker thread
connect
{ "repo_name": "FirstBuild/ATTHackathon", "path": "AllJoyn+GreenBean/android/app/src/main/java/org/alljoyn/bus/sample/chat/AllJoynService.java", "license": "mit", "size": 54957 }
[ "android.os.Message", "android.util.Log" ]
import android.os.Message; import android.util.Log;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
2,045,156
public SLStatementNode createContinue(Token continueToken) { final SLContinueNode continueNode = new SLContinueNode(srcFromToken(continueToken)); return continueNode; }
SLStatementNode function(Token continueToken) { final SLContinueNode continueNode = new SLContinueNode(srcFromToken(continueToken)); return continueNode; }
/** * Returns an {@link SLContinueNode} for the given token. * * @param continueToken The token containing the continue node's info. * @return A SLContinueNode built using the given token. */
Returns an <code>SLContinueNode</code> for the given token
createContinue
{ "repo_name": "mlvdv/truffle", "path": "truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SLNodeFactory.java", "license": "gpl-2.0", "size": 20955 }
[ "com.oracle.truffle.sl.nodes.SLStatementNode", "com.oracle.truffle.sl.nodes.controlflow.SLContinueNode" ]
import com.oracle.truffle.sl.nodes.SLStatementNode; import com.oracle.truffle.sl.nodes.controlflow.SLContinueNode;
import com.oracle.truffle.sl.nodes.*; import com.oracle.truffle.sl.nodes.controlflow.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
167,426
public Set<T> getSourceEdges(T key) { Node<T> node = nodes.get(key); if (node != null) { return node.sourceEdges; } else { return null; } }
Set<T> function(T key) { Node<T> node = nodes.get(key); if (node != null) { return node.sourceEdges; } else { return null; } }
/** * Retrieve the source edges for a particular node in the graph. * * @param key name of a graph node * @return either a set of edges or null */
Retrieve the source edges for a particular node in the graph
getSourceEdges
{ "repo_name": "mythguided/hydra", "path": "hydra-data/src/main/java/com/addthis/hydra/util/DirectedGraph.java", "license": "apache-2.0", "size": 14472 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
352,236
public static JsonElement setOption(JsonOption jsonOption, String value) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("property", jsonOption.getProperty()); jsonObject.addProperty("value", value); return jsonObject; }
static JsonElement function(JsonOption jsonOption, String value) { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty(STR, jsonOption.getProperty()); jsonObject.addProperty("value", value); return jsonObject; }
/** * Create a JSON element to be posted to set an option that accepts a single value. * * @param jsonOption The option to set. * @param value The value to be set for this option. * @return A JSON element ready to be sent. */
Create a JSON element to be posted to set an option that accepts a single value
setOption
{ "repo_name": "enternoescape/opendct", "path": "src/main/java/opendct/nanohttpd/pojo/PojoUtil.java", "license": "apache-2.0", "size": 3714 }
[ "com.google.gson.JsonElement", "com.google.gson.JsonObject" ]
import com.google.gson.JsonElement; import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,361,230
public void paintComboBoxBorder(SynthContext context, Graphics g, int x, int y, int w, int h) { paintBorder(context, g, x, y, w, h, null); }
void function(SynthContext context, Graphics g, int x, int y, int w, int h) { paintBorder(context, g, x, y, w, h, null); }
/** * Paints the border of a combo box. * * @param context SynthContext identifying the <code>JComponent</code> and * <code>Region</code> to paint to * @param g <code>Graphics</code> to paint to * @param x X coordinate of the area to paint to * @param y ...
Paints the border of a combo box
paintComboBoxBorder
{ "repo_name": "anhtu1995ok/seaglass", "path": "src/main/java/com/seaglasslookandfeel/SeaGlassSynthPainterImpl.java", "license": "apache-2.0", "size": 119406 }
[ "java.awt.Graphics", "javax.swing.plaf.synth.SynthContext" ]
import java.awt.Graphics; import javax.swing.plaf.synth.SynthContext;
import java.awt.*; import javax.swing.plaf.synth.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
1,401,346
private ClausePosition getClausePosition(final int offset) throws BadLocationException { checkContentBounds(offset); if (clauses.isEmpty()) { return null; } Clause clause = clauses.get(0); int currentPosition = 0; whi...
ClausePosition function(final int offset) throws BadLocationException { checkContentBounds(offset); if (clauses.isEmpty()) { return null; } Clause clause = clauses.get(0); int currentPosition = 0; while (currentPosition + clause.getText().length() < offset) { currentPosition += clause.getText().length(); clause = claus...
/** * Translate a position in the content into a position in a clause. If * the content is empty (contains no clauses), null is returned. * * @param offset the position to find * @return the Clause containing the position * @throws BadLocationException if the content doesn't contain the s...
Translate a position in the content into a position in a clause. If the content is empty (contains no clauses), null is returned
getClausePosition
{ "repo_name": "wohanley/ScrapHeap", "path": "src/com/wohanley/ScrapHeap/main/document/ScrapContent.java", "license": "agpl-3.0", "size": 4993 }
[ "com.wohanley.ScrapHeap", "javax.swing.text.BadLocationException" ]
import com.wohanley.ScrapHeap; import javax.swing.text.BadLocationException;
import com.wohanley.*; import javax.swing.text.*;
[ "com.wohanley", "javax.swing" ]
com.wohanley; javax.swing;
2,849,487
public CArray vector(Vector3D vector) { return vector(vector, Target.UNKNOWN); }
CArray function(Vector3D vector) { return vector(vector, Target.UNKNOWN); }
/** * Gets a vector object, given a Vector. * * @param vector the Vector * @return the vector array */
Gets a vector object, given a Vector
vector
{ "repo_name": "Techcable/CommandHelper", "path": "src/main/java/com/laytonsmith/core/ObjectGenerator.java", "license": "mit", "size": 43820 }
[ "com.laytonsmith.PureUtilities", "com.laytonsmith.core.constructs.CArray", "com.laytonsmith.core.constructs.Target" ]
import com.laytonsmith.PureUtilities; import com.laytonsmith.core.constructs.CArray; import com.laytonsmith.core.constructs.Target;
import com.laytonsmith.*; import com.laytonsmith.core.constructs.*;
[ "com.laytonsmith", "com.laytonsmith.core" ]
com.laytonsmith; com.laytonsmith.core;
1,050,565
public static void fillImagesMapBasedOnTemplate(VmTemplate template, Map<Guid, DiskImage> diskInfoDestinationMap, Map<Guid, StorageDomain> destStorages) { List<StorageDomain> domains = DbFacade.getInstance() .getStorageDomainDao() ...
static void function(VmTemplate template, Map<Guid, DiskImage> diskInfoDestinationMap, Map<Guid, StorageDomain> destStorages) { List<StorageDomain> domains = DbFacade.getInstance() .getStorageDomainDao() .getAllForStoragePool(template.getStoragePoolId()); fillImagesMapBasedOnTemplate(template, domains, diskInfoDestinat...
/** * The following method will find all images and storages where they located for provide template and will fill an * diskInfoDestinationMap by imageId mapping on active storage id where image is located. The second map is * mapping of founded storage ids to storage object */
The following method will find all images and storages where they located for provide template and will fill an diskInfoDestinationMap by imageId mapping on active storage id where image is located. The second map is mapping of founded storage ids to storage object
fillImagesMapBasedOnTemplate
{ "repo_name": "OpenUniversity/ovirt-engine", "path": "backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/ImagesHandler.java", "license": "apache-2.0", "size": 39979 }
[ "java.util.List", "java.util.Map", "org.ovirt.engine.core.common.businessentities.StorageDomain", "org.ovirt.engine.core.common.businessentities.VmTemplate", "org.ovirt.engine.core.common.businessentities.storage.DiskImage", "org.ovirt.engine.core.compat.Guid", "org.ovirt.engine.core.dal.dbbroker.DbFaca...
import java.util.List; import java.util.Map; import org.ovirt.engine.core.common.businessentities.StorageDomain; import org.ovirt.engine.core.common.businessentities.VmTemplate; import org.ovirt.engine.core.common.businessentities.storage.DiskImage; import org.ovirt.engine.core.compat.Guid; import org.ovirt.engine.core...
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.common.businessentities.storage.*; import org.ovirt.engine.core.compat.*; import org.ovirt.engine.core.dal.dbbroker.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
1,473,206
public final void deleteUsers() throws SEITANException { for (User u : this.getUsers()) { if (!JIM.getUser().isAdmin() && !u.equals(JIM.getUser())) { u.delete(); } } }
final void function() throws SEITANException { for (User u : this.getUsers()) { if (!JIM.getUser().isAdmin() && !u.equals(JIM.getUser())) { u.delete(); } } }
/** * Deletes all users * * @throws SEITANException */
Deletes all users
deleteUsers
{ "repo_name": "joergwicker/seitan", "path": "seitan-api-impl/src/main/java/org/kramerlab/seitan/api/impl/mediation/UserManagementInterface.java", "license": "gpl-3.0", "size": 5026 }
[ "org.kramerlab.seitan.api.impl.JIM", "org.kramerlab.seitan.api.impl.exceptions.SEITANException", "org.kramerlab.seitan.api.impl.objects.User" ]
import org.kramerlab.seitan.api.impl.JIM; import org.kramerlab.seitan.api.impl.exceptions.SEITANException; import org.kramerlab.seitan.api.impl.objects.User;
import org.kramerlab.seitan.api.impl.*; import org.kramerlab.seitan.api.impl.exceptions.*; import org.kramerlab.seitan.api.impl.objects.*;
[ "org.kramerlab.seitan" ]
org.kramerlab.seitan;
1,958,290
private void free(RemoteCall call, boolean reuse) throws RemoteException { Connection conn = ((StreamRemoteCall)call).getConnection(); ref.getChannel().free(conn, reuse); }
void function(RemoteCall call, boolean reuse) throws RemoteException { Connection conn = ((StreamRemoteCall)call).getConnection(); ref.getChannel().free(conn, reuse); }
/** * Private method to free a connection. */
Private method to free a connection
free
{ "repo_name": "ojdkbuild/lookaside_java-1.8.0-openjdk", "path": "jdk/src/share/classes/sun/rmi/server/UnicastRef.java", "license": "gpl-2.0", "size": 18435 }
[ "java.rmi.RemoteException", "java.rmi.server.RemoteCall" ]
import java.rmi.RemoteException; import java.rmi.server.RemoteCall;
import java.rmi.*; import java.rmi.server.*;
[ "java.rmi" ]
java.rmi;
2,079,776
public ServiceFuture<DiagnosticDetectorResponseInner> executeSiteDetectorSlotAsync(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, final ServiceCallback<DiagnosticDetectorResponseInner> serviceCallback) { return ServiceFuture.fromResponse(executeSiteDe...
ServiceFuture<DiagnosticDetectorResponseInner> function(String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot, final ServiceCallback<DiagnosticDetectorResponseInner> serviceCallback) { return ServiceFuture.fromResponse(executeSiteDetectorSlotWithServiceResponseAsync(reso...
/** * Execute Detector. * Execute Detector. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param siteName Site Name * @param detectorName Detector Resource Name * @param diagnosticCategory Category Name * @param slot Slot Name * @pa...
Execute Detector. Execute Detector
executeSiteDetectorSlotAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/appservice/mgmt-v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java", "license": "mit", "size": 295384 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,904,792
DocumentRetrievePolicyEngineChecker mockPolicyEngine = mock(DocumentRetrievePolicyEngineChecker.class); InboundDocRetrievePolicyTransformer_g0 policyTransform = new InboundDocRetrievePolicyTransformer_g0(mockPolicyEngine); InboundDocRetrieveOrchestratable message = mock(InboundDocRetrieveOrchestratable....
DocumentRetrievePolicyEngineChecker mockPolicyEngine = mock(DocumentRetrievePolicyEngineChecker.class); InboundDocRetrievePolicyTransformer_g0 policyTransform = new InboundDocRetrievePolicyTransformer_g0(mockPolicyEngine); InboundDocRetrieveOrchestratable message = mock(InboundDocRetrieveOrchestratable.class); policyTr...
/** * Test of tranform method, of class NhinDocRetrievePolicyTransformer_g0. */
Test of tranform method, of class NhinDocRetrievePolicyTransformer_g0
testTranform
{ "repo_name": "beiyuxinke/CONNECT", "path": "Product/Production/Services/DocumentRetrieveCore/src/test/java/gov/hhs/fha/nhinc/docretrieve/nhin/NhinDocRetrievePolicyTransformer_g0Test.java", "license": "bsd-3-clause", "size": 2879 }
[ "gov.hhs.fha.nhinc.common.eventcommon.DocRetrieveEventType", "gov.hhs.fha.nhinc.orchestration.PolicyTransformer", "gov.hhs.fha.nhinc.policyengine.DocumentRetrievePolicyEngineChecker", "org.mockito.Mockito" ]
import gov.hhs.fha.nhinc.common.eventcommon.DocRetrieveEventType; import gov.hhs.fha.nhinc.orchestration.PolicyTransformer; import gov.hhs.fha.nhinc.policyengine.DocumentRetrievePolicyEngineChecker; import org.mockito.Mockito;
import gov.hhs.fha.nhinc.common.eventcommon.*; import gov.hhs.fha.nhinc.orchestration.*; import gov.hhs.fha.nhinc.policyengine.*; import org.mockito.*;
[ "gov.hhs.fha", "org.mockito" ]
gov.hhs.fha; org.mockito;
2,114,237
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException { if (GraphicsEnvironment.isHeadless()) throw new HeadlessException(); s.defaultReadObject(); } protected class AccessibleApplet extends AccessibleAWTPanel { private static final long serialV...
void function(ObjectInputStream s) throws ClassNotFoundException, IOException { if (GraphicsEnvironment.isHeadless()) throw new HeadlessException(); s.defaultReadObject(); } protected class AccessibleApplet extends AccessibleAWTPanel { private static final long serialVersionUID = 8127374778187708896L; protected Accessi...
/** * Read an applet from an object stream. This checks for a headless * environment, then does the normal read. * * @param s the stream to read from * @throws ClassNotFoundException if a class is not found * @throws IOException if deserialization fails * @throws HeadlessException if this is a head...
Read an applet from an object stream. This checks for a headless environment, then does the normal read
readObject
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/java/applet/Applet.java", "license": "bsd-3-clause", "size": 16190 }
[ "java.awt.GraphicsEnvironment", "java.awt.HeadlessException", "java.io.IOException", "java.io.ObjectInputStream" ]
import java.awt.GraphicsEnvironment; import java.awt.HeadlessException; import java.io.IOException; import java.io.ObjectInputStream;
import java.awt.*; import java.io.*;
[ "java.awt", "java.io" ]
java.awt; java.io;
220,020
public Dimension getMinimumSize(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); // first UI delegate provides the return value if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); } // r...
Dimension function(JComponent c) { Dimension result = null; Iterator iterator = uis.iterator(); if (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); result = ui.getMinimumSize(c); } while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); ui.getMinimumSize(c); } return result; }
/** * Calls the {@link ComponentUI#getMinimumSize(JComponent)} method for all * the UI delegates managed by this <code>MultiViewportUI</code>, * returning the minimum size for the UI delegate from the primary look and * feel. * * @param c the component. * * @return The minimum size returne...
Calls the <code>ComponentUI#getMinimumSize(JComponent)</code> method for all the UI delegates managed by this <code>MultiViewportUI</code>, returning the minimum size for the UI delegate from the primary look and feel
getMinimumSize
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java", "license": "bsd-3-clause", "size": 11212 }
[ "java.awt.Dimension", "java.util.Iterator", "javax.swing.JComponent", "javax.swing.plaf.ComponentUI" ]
import java.awt.Dimension; import java.util.Iterator; import javax.swing.JComponent; import javax.swing.plaf.ComponentUI;
import java.awt.*; import java.util.*; import javax.swing.*; import javax.swing.plaf.*;
[ "java.awt", "java.util", "javax.swing" ]
java.awt; java.util; javax.swing;
1,294,247
protected final BigDecimal stepPrevInScale(BigDecimal decimal) { BigDecimal step = BigDecimal.ONE.scaleByPowerOfTen(-getRoundingScale()); return decimal.subtract(step); }
final BigDecimal function(BigDecimal decimal) { BigDecimal step = BigDecimal.ONE.scaleByPowerOfTen(-getRoundingScale()); return decimal.subtract(step); }
/** * Produces a value one "step" back in this expression's rounding scale. * For example with a scale of 2, "2.5" would be stepped back to "2.49". */
Produces a value one "step" back in this expression's rounding scale. For example with a scale of 2, "2.5" would be stepped back to "2.49"
stepPrevInScale
{ "repo_name": "ohadshacham/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/expression/function/RoundDecimalExpression.java", "license": "apache-2.0", "size": 17213 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
47,779
public StatusOptions status() { return this.innerProperties() == null ? null : this.innerProperties().status(); }
StatusOptions function() { return this.innerProperties() == null ? null : this.innerProperties().status(); }
/** * Get the status property: App Service plan status. * * @return the status value. */
Get the status property: App Service plan status
status
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/AppServicePlanInner.java", "license": "mit", "size": 16232 }
[ "com.azure.resourcemanager.appservice.models.StatusOptions" ]
import com.azure.resourcemanager.appservice.models.StatusOptions;
import com.azure.resourcemanager.appservice.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,833,485
@Override public Response execute( final Request request ) throws IOException { HttpUriRequest apacheRequest = AbstractHttpClient.createRequest( request ); if ( ( useBasicAuth ) && ( credentials != null ) ) { String string = "Basic " + Base64.encodeBase64String( ( credentials.getUserName() + ":" + creden...
Response function( final Request request ) throws IOException { HttpUriRequest apacheRequest = AbstractHttpClient.createRequest( request ); if ( ( useBasicAuth ) && ( credentials != null ) ) { String string = STR + Base64.encodeBase64String( ( credentials.getUserName() + ":" + credentials.getPassword() ).getBytes() ); ...
/** * execute * (non-Javadoc). * * @param request the request * @return the response * @throws IOException Signals that an I/O exception has occurred. * @see retrofit.client.Client#execute(retrofit.client.Request) */
execute (non-Javadoc)
execute
{ "repo_name": "RampantLions/CodeTools", "path": "CodeToolsModules/CodeToolsSwagger/CodeToolsSwaggerGenerators/src/main/java/io/github/rampantlions/codetools/http/AbstractHttpClient.java", "license": "apache-2.0", "size": 19276 }
[ "java.io.IOException", "org.apache.commons.codec.binary.Base64", "org.apache.http.HttpResponse", "org.apache.http.client.methods.HttpUriRequest" ]
import java.io.IOException; import org.apache.commons.codec.binary.Base64; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpUriRequest;
import java.io.*; import org.apache.commons.codec.binary.*; import org.apache.http.*; import org.apache.http.client.methods.*;
[ "java.io", "org.apache.commons", "org.apache.http" ]
java.io; org.apache.commons; org.apache.http;
1,825,319
public boolean willExist(IResource resource) { if (fDeltaDescriptions == null) return false; IPath fullPath = resource.getFullPath(); for (Iterator iter = fDeltaDescriptions.iterator(); iter.hasNext(); ) { DeltaDescription delta = (DeltaDescription) iter.next(); if (fullPath.equals(delta.getDe...
boolean function(IResource resource) { if (fDeltaDescriptions == null) return false; IPath fullPath = resource.getFullPath(); for (Iterator iter = fDeltaDescriptions.iterator(); iter.hasNext(); ) { DeltaDescription delta = (DeltaDescription) iter.next(); if (fullPath.equals(delta.getDestinationPath())) return true; } r...
/** * Checks if the resource will exist in the future based on the recorded resource modifications. * * @param resource the resource to check * @return whether the resource will exist or not */
Checks if the resource will exist in the future based on the recorded resource modifications
willExist
{ "repo_name": "sleshchenko/che", "path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-ltk-core-refactoring/src/main/java/org/eclipse/ltk/internal/core/refactoring/resource/ResourceModifications.java", "license": "epl-1.0", "size": 12129 }
[ "java.util.Iterator", "org.eclipse.core.resources.IResource", "org.eclipse.core.runtime.IPath" ]
import java.util.Iterator; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IPath;
import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*;
[ "java.util", "org.eclipse.core" ]
java.util; org.eclipse.core;
1,848,197
private void checkAndGetAck(Segment segment) { int ackn = segment.getAck(); if (ackn < 0) { return; } _counters.getAndResetOutstandingSegsCounter(); if (_state == SYN_RCVD) { _state = ESTABLISHED; connectionOpened(); } ...
void function(Segment segment) { int ackn = segment.getAck(); if (ackn < 0) { return; } _counters.getAndResetOutstandingSegsCounter(); if (_state == SYN_RCVD) { _state = ESTABLISHED; connectionOpened(); } synchronized (_unackedSentQueue) { Iterator<Segment> it = _unackedSentQueue.iterator(); while (it.hasNext()) { Segm...
/** * Checks the ACK flag and number of a segment. * * @param segment the segment. */
Checks the ACK flag and number of a segment
checkAndGetAck
{ "repo_name": "CiNC0/Cartier", "path": "cartier-rudp/src/main/java/xyz/vopen/cartier/net/rudp/ReliableSocket.java", "license": "apache-2.0", "size": 67440 }
[ "java.util.Iterator", "xyz.vopen.cartier.net.rudp.impl.Segment" ]
import java.util.Iterator; import xyz.vopen.cartier.net.rudp.impl.Segment;
import java.util.*; import xyz.vopen.cartier.net.rudp.impl.*;
[ "java.util", "xyz.vopen.cartier" ]
java.util; xyz.vopen.cartier;
2,113,148
public boolean isAABBInMaterial(AxisAlignedBB bb, Material materialIn) { int i = MathHelper.floor_double(bb.minX); int j = MathHelper.ceiling_double_int(bb.maxX); int k = MathHelper.floor_double(bb.minY); int l = MathHelper.ceiling_double_int(bb.maxY); int i1 = MathHelper...
boolean function(AxisAlignedBB bb, Material materialIn) { int i = MathHelper.floor_double(bb.minX); int j = MathHelper.ceiling_double_int(bb.maxX); int k = MathHelper.floor_double(bb.minY); int l = MathHelper.ceiling_double_int(bb.maxY); int i1 = MathHelper.floor_double(bb.minZ); int j1 = MathHelper.ceiling_double_int(...
/** * checks if the given AABB is in the material given. Used while swimming. */
checks if the given AABB is in the material given. Used while swimming
isAABBInMaterial
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/world/World.java", "license": "gpl-3.0", "size": 141454 }
[ "net.minecraft.block.BlockLiquid", "net.minecraft.block.material.Material", "net.minecraft.block.state.IBlockState", "net.minecraft.util.math.AxisAlignedBB", "net.minecraft.util.math.BlockPos", "net.minecraft.util.math.MathHelper" ]
import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper;
import net.minecraft.block.*; import net.minecraft.block.material.*; import net.minecraft.block.state.*; import net.minecraft.util.math.*;
[ "net.minecraft.block", "net.minecraft.util" ]
net.minecraft.block; net.minecraft.util;
1,463,006
public static void writeByteArrayToFile(File file, byte[] data) throws IOException { OutputStream out = null; try { out = openOutputStream(file); out.write(data); } finally { IOUtils.closeQuietly(out); } }
static void function(File file, byte[] data) throws IOException { OutputStream out = null; try { out = openOutputStream(file); out.write(data); } finally { IOUtils.closeQuietly(out); } }
/** * Writes a byte array to a file creating the file if it does not exist. * <p> * NOTE: As from v1.3, the parent directories of the file will be created * if they do not exist. * * @param file the file to write to * @param data the content to write to the file * @throws IOExc...
Writes a byte array to a file creating the file if it does not exist. if they do not exist
writeByteArrayToFile
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/apps/UnifiedEmail/src/org/apache/commons/io/FileUtils.java", "license": "gpl-3.0", "size": 77172 }
[ "java.io.File", "java.io.IOException", "java.io.OutputStream" ]
import java.io.File; import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,830,244
private void drawText(String text, RectF rect, Canvas canvas, float originalTop, float originalLeft) { if (rect.right - rect.left - mEventPadding * 2 < 0) return; // Get text dimensions StaticLayout textLayout = new StaticLayout(text, mEventTextPaint, (int) (rect.right - originalLeft - mEve...
void function(String text, RectF rect, Canvas canvas, float originalTop, float originalLeft) { if (rect.right - rect.left - mEventPadding * 2 < 0) return; StaticLayout textLayout = new StaticLayout(text, mEventTextPaint, (int) (rect.right - originalLeft - mEventPadding * 2), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, f...
/** * Draw the name of the event on top of the event rectangle. * @param text The text to draw. * @param rect The rectangle on which the text is to be drawn. * @param canvas The canvas to draw upon. * @param originalTop The original top position of the rectangle. The rectangle may have some of ...
Draw the name of the event on top of the event rectangle
drawText
{ "repo_name": "cymcsg/UltimateAndroid", "path": "deprecated/UltimateAndroidNormal/UltimateAndroidUi/src/com/marshalchen/common/uimodule/weekview/WeekView.java", "license": "apache-2.0", "size": 50207 }
[ "android.graphics.Canvas", "android.graphics.RectF", "android.text.Layout", "android.text.StaticLayout", "android.text.TextUtils" ]
import android.graphics.Canvas; import android.graphics.RectF; import android.text.Layout; import android.text.StaticLayout; import android.text.TextUtils;
import android.graphics.*; import android.text.*;
[ "android.graphics", "android.text" ]
android.graphics; android.text;
2,173,097
private void handleRemovedFavorite(Agent fav, List<Agent> allFavs) { // LOVESET UPDATE Make the updates to the loveSet that need to be & sync the clients List<Airing> airsThatMayDie = new ArrayList<Airing>(); DBObject[] airs; boolean keywordTest = (fav.agentMask & (Agent.KEYWORD_MASK)) == (Agent.KEY...
void function(Agent fav, List<Agent> allFavs) { List<Airing> airsThatMayDie = new ArrayList<Airing>(); DBObject[] airs; boolean keywordTest = (fav.agentMask & (Agent.KEYWORD_MASK)) == (Agent.KEYWORD_MASK) && !Sage.getBoolean(STR, true); if(keywordTest) { ArrayList<Airing> airingsHaystack = new ArrayList<Airing>(); Show...
/** * Update the internal Carny state after a favorite has been removed (or disabled) * @param fav The Favorite that was removed * @param allFavs The collection of all Favorites */
Update the internal Carny state after a favorite has been removed (or disabled)
handleRemovedFavorite
{ "repo_name": "OpenSageTV/sagetv", "path": "java/sage/Carny.java", "license": "apache-2.0", "size": 62818 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.Collections", "java.util.HashSet", "java.util.List", "java.util.Set" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,145,961
public void listenerPaint(java.awt.Graphics g) { if (distanceList != null) { distanceList.render(g); } }
void function(java.awt.Graphics g) { if (distanceList != null) { distanceList.render(g); } }
/** * PaintListener interface, notifying the MouseMode that the MapBean has * repainted itself. Useful if the MouseMode is drawing stuff. */
PaintListener interface, notifying the MouseMode that the MapBean has repainted itself. Useful if the MouseMode is drawing stuff
listenerPaint
{ "repo_name": "d2fn/passage", "path": "src/main/java/com/bbn/openmap/gui/DistQuickTool.java", "license": "mit", "size": 22328 }
[ "java.awt.Graphics" ]
import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,409,031
public SensorRequestFactory getAllSensors(final int companyId, final int projectId, final int deviceId) throws CreateRequestException { this.verifyIdsForRequest(companyId, projectId, 1, 1, deviceId, 1, 1, 1, 1); this.request = Unirest.get(URL_BASE) .headers(DEFAULT_HEADERS) .routeParam(UrlBuilder...
SensorRequestFactory function(final int companyId, final int projectId, final int deviceId) throws CreateRequestException { this.verifyIdsForRequest(companyId, projectId, 1, 1, deviceId, 1, 1, 1, 1); this.request = Unirest.get(URL_BASE) .headers(DEFAULT_HEADERS) .routeParam(UrlBuilder.ID_COMPANY, Integer.toString(compa...
/** * Create a {@code GET} request to get all sensors of a specific {@link Device} from the API. * * @param companyId * The {@link Company}'s valid id that owns the {@link Project}. * @param projectId * The {@link Project}'s valid id that owns the {@link Device}. * @param devi...
Create a GET request to get all sensors of a specific <code>Device</code> from the API
getAllSensors
{ "repo_name": "VisianTeam/VIPJavaSDK", "path": "src/fr/visian/vip/client/sdk/request/factory/SensorRequestFactory.java", "license": "apache-2.0", "size": 15350 }
[ "com.mashape.unirest.http.Unirest", "fr.visian.vip.client.sdk.exception.CreateRequestException" ]
import com.mashape.unirest.http.Unirest; import fr.visian.vip.client.sdk.exception.CreateRequestException;
import com.mashape.unirest.http.*; import fr.visian.vip.client.sdk.exception.*;
[ "com.mashape.unirest", "fr.visian.vip" ]
com.mashape.unirest; fr.visian.vip;
2,793,761
protected FedoraResource getFedoraResource(final Transaction transaction, final FedoraId fedoraId) { try { if (transaction.isCommitted()) { return getFedoraResource(fedoraId); } else { return resourceFactory.getResource(transaction, fedoraId); ...
FedoraResource function(final Transaction transaction, final FedoraId fedoraId) { try { if (transaction.isCommitted()) { return getFedoraResource(fedoraId); } else { return resourceFactory.getResource(transaction, fedoraId); } } catch (final PathNotFoundException e) { throw new PathNotFoundRuntimeException(e); } }
/** * Gets a fedora resource by id. Uses the provided transaction if it is uncommitted, * or uses a new transaction. * * @param transaction the fedora transaction * @param fedoraId identifier of the resource * @return the requested FedoraResource */
Gets a fedora resource by id. Uses the provided transaction if it is uncommitted, or uses a new transaction
getFedoraResource
{ "repo_name": "escowles/fcrepo4", "path": "fcrepo-http-api/src/main/java/org/fcrepo/http/api/FedoraBaseResource.java", "license": "apache-2.0", "size": 4207 }
[ "org.fcrepo.kernel.api.Transaction", "org.fcrepo.kernel.api.exception.PathNotFoundException", "org.fcrepo.kernel.api.exception.PathNotFoundRuntimeException", "org.fcrepo.kernel.api.identifiers.FedoraId", "org.fcrepo.kernel.api.models.FedoraResource" ]
import org.fcrepo.kernel.api.Transaction; import org.fcrepo.kernel.api.exception.PathNotFoundException; import org.fcrepo.kernel.api.exception.PathNotFoundRuntimeException; import org.fcrepo.kernel.api.identifiers.FedoraId; import org.fcrepo.kernel.api.models.FedoraResource;
import org.fcrepo.kernel.api.*; import org.fcrepo.kernel.api.exception.*; import org.fcrepo.kernel.api.identifiers.*; import org.fcrepo.kernel.api.models.*;
[ "org.fcrepo.kernel" ]
org.fcrepo.kernel;
2,295,748
protected boolean getExceed(float currentWidth, DefaultRenderer renderer, int right, int width) { boolean exceed = currentWidth > right; if (isVertical(renderer)) { exceed = currentWidth > width; } return exceed; }
boolean function(float currentWidth, DefaultRenderer renderer, int right, int width) { boolean exceed = currentWidth > right; if (isVertical(renderer)) { exceed = currentWidth > width; } return exceed; }
/** * Calculates if the current width exceeds the total width. * * @param currentWidth the current width * @param renderer the renderer * @param right the right side pixel value * @param width the total width * @return if the current width exceeds the total width */
Calculates if the current width exceeds the total width
getExceed
{ "repo_name": "kaytdek/achartengine", "path": "achartengine/src/org/achartengine/chart/AbstractChart.java", "license": "apache-2.0", "size": 18865 }
[ "org.achartengine.renderer.DefaultRenderer" ]
import org.achartengine.renderer.DefaultRenderer;
import org.achartengine.renderer.*;
[ "org.achartengine.renderer" ]
org.achartengine.renderer;
235,762
@Auditable(parameters = {"nodeRef", "includeInhertiedRuleType", "ruleTypeName"}) public List<Rule> getRules(NodeRef nodeRef, boolean includeInhertiedRuleType, String ruleTypeName);
@Auditable(parameters = {STR, STR, STR}) List<Rule> function(NodeRef nodeRef, boolean includeInhertiedRuleType, String ruleTypeName);
/** * Get the rules associated with an actionable node that are of a specific rule type. * * @param nodeRef the node reference * @param includeInhertiedRuleType indicates whether the inherited rules should be included in * the result list or not * @param ruleTypeName ...
Get the rules associated with an actionable node that are of a specific rule type
getRules
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/service/cmr/rule/RuleService.java", "license": "lgpl-3.0", "size": 10793 }
[ "java.util.List", "org.alfresco.service.Auditable", "org.alfresco.service.cmr.repository.NodeRef" ]
import java.util.List; import org.alfresco.service.Auditable; import org.alfresco.service.cmr.repository.NodeRef;
import java.util.*; import org.alfresco.service.*; import org.alfresco.service.cmr.repository.*;
[ "java.util", "org.alfresco.service" ]
java.util; org.alfresco.service;
15,487
public ConsolidatedTrackedTypeList<AEntity> getEntityTrackedList(ASGameMode gameMode) { if (gameMode == null) throw new IllegalArgumentException("arguments cannot be null"); List<TrackedTypeList<AEntity>> lists = new ArrayList<>(); for (Group group : groups) lists.add(group.getEntityTracked...
ConsolidatedTrackedTypeList<AEntity> function(ASGameMode gameMode) { if (gameMode == null) throw new IllegalArgumentException(STR); List<TrackedTypeList<AEntity>> lists = new ArrayList<>(); for (Group group : groups) lists.add(group.getEntityTrackedList(gameMode)); return new ConsolidatedTrackedTypeList<>(lists); }
/** * Gets the consolidated entity tracking list for a specified game mode * * @param gameMode the gamemode to lookup, cannot be null * * @return the consolidated entity tracking list */
Gets the consolidated entity tracking list for a specified game mode
getEntityTrackedList
{ "repo_name": "turt2live-bukkit/AntiShare", "path": "API/src/main/java/com/turt2live/antishare/configuration/groups/ConsolidatedGroup.java", "license": "gpl-3.0", "size": 5523 }
[ "com.turt2live.antishare.ASGameMode", "com.turt2live.antishare.engine.list.TrackedTypeList", "com.turt2live.antishare.object.AEntity", "java.util.ArrayList", "java.util.List" ]
import com.turt2live.antishare.ASGameMode; import com.turt2live.antishare.engine.list.TrackedTypeList; import com.turt2live.antishare.object.AEntity; import java.util.ArrayList; import java.util.List;
import com.turt2live.antishare.*; import com.turt2live.antishare.engine.list.*; import com.turt2live.antishare.object.*; import java.util.*;
[ "com.turt2live.antishare", "java.util" ]
com.turt2live.antishare; java.util;
1,998,738
public void testConstructor() throws Exception { String home = System.getProperty("user.home"); assertEquals(new File(home), converter.convert(File.class, home)); // assertEquals(new Version(1, 0, 0), converter.convert(Version.class, // "1.0.0")); }
void function() throws Exception { String home = System.getProperty(STR); assertEquals(new File(home), converter.convert(File.class, home)); }
/** * Test constructor * * @param source * @throws Exception */
Test constructor
testConstructor
{ "repo_name": "joansmith/bnd", "path": "aQute.libg/test/aQute/lib/converter/ConverterTest.java", "license": "apache-2.0", "size": 15266 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,777,575
@Override protected void purgeInternal() throws CacheLoaderException { if (trace) log.trace("purgeInternal"); Cassandra.Client cassandraClient = null; try { cassandraClient = dataSource.getConnection(); // We need to get all supercolumns from the beginning of time unti...
void function() throws CacheLoaderException { if (trace) log.trace(STR); Cassandra.Client cassandraClient = null; try { cassandraClient = dataSource.getConnection(); SlicePredicate predicate = new SlicePredicate(); predicate.setSlice_range(new SliceRange(ByteBufferUtil.EMPTY_BYTE_BUFFER, ByteBufferUtil .bytes(timeServi...
/** * Purge expired entries. Expiration entries are stored in a single key (expirationKey) within a * specific ColumnFamily (set by configuration). The entries are grouped by expiration timestamp * in SuperColumns within which each entry's key is mapped to a column */
Purge expired entries. Expiration entries are stored in a single key (expirationKey) within a specific ColumnFamily (set by configuration). The entries are grouped by expiration timestamp in SuperColumns within which each entry's key is mapped to a column
purgeInternal
{ "repo_name": "oscerd/infinispan-cachestore-cassandra", "path": "src/main/java/org/infinispan/loaders/cassandra/CassandraCacheStore.java", "license": "apache-2.0", "size": 24410 }
[ "java.nio.ByteBuffer", "java.util.HashMap", "java.util.Iterator", "java.util.List", "java.util.Map", "org.apache.cassandra.thrift.Cassandra", "org.apache.cassandra.thrift.Column", "org.apache.cassandra.thrift.ColumnOrSuperColumn", "org.apache.cassandra.thrift.Mutation", "org.apache.cassandra.thrif...
import java.nio.ByteBuffer; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import org.apache.cassandra.thrift.Cassandra; import org.apache.cassandra.thrift.Column; import org.apache.cassandra.thrift.ColumnOrSuperColumn; import org.apache.cassandra.thrift.Mutation; impo...
import java.nio.*; import java.util.*; import org.apache.cassandra.thrift.*; import org.infinispan.loaders.*;
[ "java.nio", "java.util", "org.apache.cassandra", "org.infinispan.loaders" ]
java.nio; java.util; org.apache.cassandra; org.infinispan.loaders;
641,416
public void updateSubscription(SubscribedAPI subscribedAPI) throws APIManagementException { apiMgtDAO.updateSubscription(subscribedAPI); subscribedAPI = apiMgtDAO.getSubscriptionByUUID(subscribedAPI.getUUID()); Identifier identifier = subscribedAPI.getApiId() != null ? subscr...
void function(SubscribedAPI subscribedAPI) throws APIManagementException { apiMgtDAO.updateSubscription(subscribedAPI); subscribedAPI = apiMgtDAO.getSubscriptionByUUID(subscribedAPI.getUUID()); Identifier identifier = subscribedAPI.getApiId() != null ? subscribedAPI.getApiId() : subscribedAPI.getProductId(); int apiId ...
/** * This method is used to update the subscription * * @param subscribedAPI subscribedAPI object that represents the new subscription detals * @throws APIManagementException if failed to update subscription */
This method is used to update the subscription
updateSubscription
{ "repo_name": "Rajith90/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIProviderImpl.java", "license": "apache-2.0", "size": 520854 }
[ "java.util.UUID", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.Identifier", "org.wso2.carbon.apimgt.api.model.SubscribedAPI", "org.wso2.carbon.apimgt.impl.notifier.events.SubscriptionEvent", "org.wso2.carbon.apimgt.impl.utils.APIUtil", "org.wso2.carbon.utils.mul...
import java.util.UUID; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Identifier; import org.wso2.carbon.apimgt.api.model.SubscribedAPI; import org.wso2.carbon.apimgt.impl.notifier.events.SubscriptionEvent; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.w...
import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.notifier.events.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.utils.multitenancy.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
707,890
public boolean removeListener(String aItemName) { boolean listenerRemoved = false; synchronized (m_listeners) { for (Iterator<DeviceFeatureListener> it = m_listeners.iterator(); it.hasNext();) { DeviceFeatureListener fl = it.next(); if (fl.getItemName().eq...
boolean function(String aItemName) { boolean listenerRemoved = false; synchronized (m_listeners) { for (Iterator<DeviceFeatureListener> it = m_listeners.iterator(); it.hasNext();) { DeviceFeatureListener fl = it.next(); if (fl.getItemName().equals(aItemName)) { it.remove(); listenerRemoved = true; } } } return listener...
/** * removes a DeviceFeatureListener from this feature * * @param aItemName name of the item to remove as listener * @return true if a listener was removed */
removes a DeviceFeatureListener from this feature
removeListener
{ "repo_name": "openhab/openhab", "path": "bundles/binding/org.openhab.binding.insteonplm/src/main/java/org/openhab/binding/insteonplm/internal/device/DeviceFeature.java", "license": "epl-1.0", "size": 14201 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,469,415
private static String getPathString(TreePath path, JTree treeUI) { TreeNode[] pathNodes=new TreeNode[path.getPathCount()]; for(int n=0;n<pathNodes.length;n++) { pathNodes[n]=(TreeNode) path.getPathComponent(n); } return getPathString(pathNodes,treeUI); }
static String function(TreePath path, JTree treeUI) { TreeNode[] pathNodes=new TreeNode[path.getPathCount()]; for(int n=0;n<pathNodes.length;n++) { pathNodes[n]=(TreeNode) path.getPathComponent(n); } return getPathString(pathNodes,treeUI); }
/** * Converts a given TreePath of a JTree to a String. This String identifies the * path and is used as the key to store and reset layout information * * @param path The TreePath * @param treeUI The JTree * @return String identifying the path */
Converts a given TreePath of a JTree to a String. This String identifies the path and is used as the key to store and reset layout information
getPathString
{ "repo_name": "vitruv-tools/Vitruv", "path": "bundles/extensions/changevisualization/tools.vitruv.extensions.changevisualization/src/tools/vitruv/extensions/changevisualization/tree/TreeChangeDataSet.java", "license": "epl-1.0", "size": 7218 }
[ "javax.swing.JTree", "javax.swing.tree.TreeNode", "javax.swing.tree.TreePath" ]
import javax.swing.JTree; import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath;
import javax.swing.*; import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
679,803
public final Time getTime(String parameterName, Calendar cal) throws SQLException { throw Util.notImplemented(); }
final Time function(String parameterName, Calendar cal) throws SQLException { throw Util.notImplemented(); }
/** * JDBC 3.0 * * Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, * using the given Calendar object to construct the time object. * * @param parameterName - the name of the parameter * @param cal - the Calendar object the driver will use to construct the ...
JDBC 3.0 Retrieves the value of a JDBC TIME parameter as a java.sql.Time object, using the given Calendar object to construct the time object
getTime
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java", "license": "apache-2.0", "size": 62201 }
[ "java.sql.SQLException", "java.sql.Time", "java.util.Calendar" ]
import java.sql.SQLException; import java.sql.Time; import java.util.Calendar;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,352,746
public ReplayCache getNonceReplayCache() throws WSSecurityException { return nonceReplayCache; }
ReplayCache function() throws WSSecurityException { return nonceReplayCache; }
/** * Get the replay cache for Nonces * @throws WSSecurityException */
Get the replay cache for Nonces
getNonceReplayCache
{ "repo_name": "apache/wss4j", "path": "ws-security-dom/src/main/java/org/apache/wss4j/dom/handler/RequestData.java", "license": "apache-2.0", "size": 23612 }
[ "org.apache.wss4j.common.cache.ReplayCache", "org.apache.wss4j.common.ext.WSSecurityException" ]
import org.apache.wss4j.common.cache.ReplayCache; import org.apache.wss4j.common.ext.WSSecurityException;
import org.apache.wss4j.common.cache.*; import org.apache.wss4j.common.ext.*;
[ "org.apache.wss4j" ]
org.apache.wss4j;
1,203,006
void onFailure(Throwable t); } class ElectionContext { private ElectionCallback callback = null; private int requiredMasterJoins = -1; private final Map<DiscoveryNode, List<MembershipAction.JoinCallback>> joinRequestAccumulator = new HashMap<>(); final AtomicBoolean clo...
void onFailure(Throwable t); } class ElectionContext { private ElectionCallback callback = null; private int requiredMasterJoins = -1; private final Map<DiscoveryNode, List<MembershipAction.JoinCallback>> joinRequestAccumulator = new HashMap<>(); final AtomicBoolean closed = new AtomicBoolean();
/** * called when the local node failed to be elected as master * Guaranteed to be called on the cluster state update thread **/
called when the local node failed to be elected as master Guaranteed to be called on the cluster state update thread
onFailure
{ "repo_name": "dongjoon-hyun/elasticsearch", "path": "core/src/main/java/org/elasticsearch/discovery/zen/NodeJoinController.java", "license": "apache-2.0", "size": 22820 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.concurrent.atomic.AtomicBoolean", "org.elasticsearch.cluster.node.DiscoveryNode", "org.elasticsearch.discovery.zen.membership.MembershipAction" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.discovery.zen.membership.MembershipAction;
import java.util.*; import java.util.concurrent.atomic.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.discovery.zen.membership.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.discovery" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.discovery;
1,657,835
public int update(Role role) { int[] result; try { PreparedStatement preparedStatement = connection.prepareStatement("update role set name=? where id=?"); preparedStatement.setString(1, role.getName()); preparedStatement.setInt(2, role.getId()); preparedStatement.setString(3, role.getDescriptio...
int function(Role role) { int[] result; try { PreparedStatement preparedStatement = connection.prepareStatement(STR); preparedStatement.setString(1, role.getName()); preparedStatement.setInt(2, role.getId()); preparedStatement.setString(3, role.getDescription()); preparedStatement.addBatch(); result = preparedStatement...
/** * updates a Customer * @param customer * @return */
updates a Customer
update
{ "repo_name": "pxai/consolerp", "path": "src/main/java/org/cuatrovientos/consolerp/dao/RoleDAO.java", "license": "gpl-2.0", "size": 3436 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "org.cuatrovientos.consolerp.model.Role" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import org.cuatrovientos.consolerp.model.Role;
import java.sql.*; import org.cuatrovientos.consolerp.model.*;
[ "java.sql", "org.cuatrovientos.consolerp" ]
java.sql; org.cuatrovientos.consolerp;
297,049
public ItemTransformComponent thirdPerson(Matrix4f left, Matrix4f right) { this.thirdPersonLeftHand = left; this.thirdPersonRightHand = right; return this; }
ItemTransformComponent function(Matrix4f left, Matrix4f right) { this.thirdPersonLeftHand = left; this.thirdPersonRightHand = right; return this; }
/** * Sets the transforms to use for the {@link Item} third person. * * @param left the left * @param right the right * @return the item transform component */
Sets the transforms to use for the <code>Item</code> third person
thirdPerson
{ "repo_name": "Ordinastie/MalisisCore", "path": "src/main/java/net/malisis/core/block/component/ItemTransformComponent.java", "license": "mit", "size": 4457 }
[ "javax.vecmath.Matrix4f" ]
import javax.vecmath.Matrix4f;
import javax.vecmath.*;
[ "javax.vecmath" ]
javax.vecmath;
780,683
Map<Object, Object> getMapIntraExpsColors();
Map<Object, Object> getMapIntraExpsColors();
/** * Get intraExperiments with their colors. * * @return */
Get intraExperiments with their colors
getMapIntraExpsColors
{ "repo_name": "sing-group/BEW", "path": "plugins_src/bew/es/uvigo/ei/sing/bew/model/IExperiment.java", "license": "gpl-3.0", "size": 1174 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
3,499
public void loadProperties(PropertySource source) { if (source == null) { throw new IllegalArgumentException("invalid (null) source"); } Properties newProperties = source.loadProperties(); for (Iterator i = newProperties.keySet().iterator(); i.ha...
void function(PropertySource source) { if (source == null) { throw new IllegalArgumentException(STR); } Properties newProperties = source.loadProperties(); for (Iterator i = newProperties.keySet().iterator(); i.hasNext(); ) { String key = (String) i.next(); setProperty(source, key, newProperties.getProperty(key)); } }
/** * Copies all name,value pairs from the given PropertySource instance into this container. * * @param source * @throws IllegalStateException if the source is invalid (improperly initialized) * as an existing property */
Copies all name,value pairs from the given PropertySource instance into this container
loadProperties
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/core/impl/src/main/java/org/kuali/rice/core/impl/services/ConfigurationServiceImpl.java", "license": "apache-2.0", "size": 12530 }
[ "java.util.Iterator", "java.util.Properties" ]
import java.util.Iterator; import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
775,561
protected void igfs(VisorNodeDataCollectorJobResult res) { try { IgfsProcessorAdapter igfsProc = ignite.context().igfs(); for (IgniteFileSystem igfs : igfsProc.igfss()) { long start0 = U.currentTimeMillis(); FileSystemConfiguration igfsCfg = igfs.con...
void function(VisorNodeDataCollectorJobResult res) { try { IgfsProcessorAdapter igfsProc = ignite.context().igfs(); for (IgniteFileSystem igfs : igfsProc.igfss()) { long start0 = U.currentTimeMillis(); FileSystemConfiguration igfsCfg = igfs.configuration(); if (proxyCache(igfsCfg.getDataCacheConfiguration().getName()) ...
/** * Collect IGFSs. * * @param res Job result. */
Collect IGFSs
igfs
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java", "license": "apache-2.0", "size": 9853 }
[ "java.util.Collection", "org.apache.ignite.IgniteFileSystem", "org.apache.ignite.configuration.FileSystemConfiguration", "org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter", "org.apache.ignite.internal.util.ipc.IpcServerEndpoint", "org.apache.ignite.internal.util.typedef.internal.U", "org....
import java.util.Collection; import org.apache.ignite.IgniteFileSystem; import org.apache.ignite.configuration.FileSystemConfiguration; import org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter; import org.apache.ignite.internal.util.ipc.IpcServerEndpoint; import org.apache.ignite.internal.util.typedef.int...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.configuration.*; import org.apache.ignite.internal.processors.igfs.*; import org.apache.ignite.internal.util.ipc.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.internal.visor.igfs.*; import org.apache.ignite...
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
967,765
protected void insert( final Serializable id, final Object[] fields, final boolean[] notNull, final int j, final String sql, final Object object, final SessionImplementor session) throws HibernateException { if ( isInverseTable( j ) ) { return; } //...
void function( final Serializable id, final Object[] fields, final boolean[] notNull, final int j, final String sql, final Object object, final SessionImplementor session) throws HibernateException { if ( isInverseTable( j ) ) { return; } if ( isNullableTable( j ) && isAllNull( fields, j ) ) { return; } if ( log.isTrac...
/** * Perform an SQL INSERT. * <p/> * This for is used for all non-root tables as well as the root table * in cases where the identifier value is known before the insert occurs. */
Perform an SQL INSERT. This for is used for all non-root tables as well as the root table in cases where the identifier value is known before the insert occurs
insert
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java", "license": "unlicense", "size": 141180 }
[ "java.io.Serializable", "java.sql.PreparedStatement", "java.sql.SQLException", "org.hibernate.HibernateException", "org.hibernate.engine.SessionImplementor", "org.hibernate.engine.Versioning", "org.hibernate.exception.JDBCExceptionHelper", "org.hibernate.jdbc.Expectation", "org.hibernate.jdbc.Expect...
import java.io.Serializable; import java.sql.PreparedStatement; import java.sql.SQLException; import org.hibernate.HibernateException; import org.hibernate.engine.SessionImplementor; import org.hibernate.engine.Versioning; import org.hibernate.exception.JDBCExceptionHelper; import org.hibernate.jdbc.Expectation; import...
import java.io.*; import java.sql.*; import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.exception.*; import org.hibernate.jdbc.*; import org.hibernate.pretty.*;
[ "java.io", "java.sql", "org.hibernate", "org.hibernate.engine", "org.hibernate.exception", "org.hibernate.jdbc", "org.hibernate.pretty" ]
java.io; java.sql; org.hibernate; org.hibernate.engine; org.hibernate.exception; org.hibernate.jdbc; org.hibernate.pretty;
1,454,268
protected void unmanageObject(Object me) throws Exception { if (me instanceof TimerListener) { TimerListener timer = (TimerListener) me; loadTimer.removeTimerListener(timer); } getManagementStrategy().unmanageObject(me); }
void function(Object me) throws Exception { if (me instanceof TimerListener) { TimerListener timer = (TimerListener) me; loadTimer.removeTimerListener(timer); } getManagementStrategy().unmanageObject(me); }
/** * Un-manages the object. * * @param me the managed object * @throws Exception is thrown if error unregistering the managed object */
Un-manages the object
unmanageObject
{ "repo_name": "zregvart/camel", "path": "core/camel-management/src/main/java/org/apache/camel/management/JmxManagementLifecycleStrategy.java", "license": "apache-2.0", "size": 45492 }
[ "org.apache.camel.TimerListener" ]
import org.apache.camel.TimerListener;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
782,126
protected boolean requiresToSetDirectory(Job job) { // the cleanup, registration and chmod (PM-1701) jobs should never have directory set // as full path is specified in their arguments int type = job.getJobType(); return (type != Job.CLEANUP_JOB && type != Job.REPLICA_REG_JOB && typ...
boolean function(Job job) { int type = job.getJobType(); return (type != Job.CLEANUP_JOB && type != Job.REPLICA_REG_JOB && type != Job.CHMOD_JOB); }
/** * Returns a boolean indicating whether we need to set the directory for the job or not. * * @param job the job for which to set directory. * @return */
Returns a boolean indicating whether we need to set the directory for the job or not
requiresToSetDirectory
{ "repo_name": "pegasus-isi/pegasus", "path": "src/edu/isi/pegasus/planner/code/gridstart/NoGridStart.java", "license": "apache-2.0", "size": 27559 }
[ "edu.isi.pegasus.planner.classes.Job" ]
import edu.isi.pegasus.planner.classes.Job;
import edu.isi.pegasus.planner.classes.*;
[ "edu.isi.pegasus" ]
edu.isi.pegasus;
1,999,349
public ClusterHealthStatus ensureYellowAndNoInitializingShards(String... indices) { return ensureColor(ClusterHealthStatus.YELLOW, TimeValue.timeValueSeconds(30), true, indices); }
ClusterHealthStatus function(String... indices) { return ensureColor(ClusterHealthStatus.YELLOW, TimeValue.timeValueSeconds(30), true, indices); }
/** * Ensures the cluster has a yellow state via the cluster health API and ensures the that cluster has no initializing shards * for the given indices */
Ensures the cluster has a yellow state via the cluster health API and ensures the that cluster has no initializing shards for the given indices
ensureYellowAndNoInitializingShards
{ "repo_name": "vroyer/elassandra", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 110257 }
[ "org.elasticsearch.cluster.health.ClusterHealthStatus", "org.elasticsearch.common.unit.TimeValue" ]
import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.cluster.health.*; import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.common" ]
org.elasticsearch.cluster; org.elasticsearch.common;
342,038
protected void afterDataSetLookup(DataSet dataSet) { }
void function(DataSet dataSet) { }
/** * Call back method invoked just after the data set lookup is executed. */
Call back method invoked just after the data set lookup is executed
afterDataSetLookup
{ "repo_name": "psiroky/dashbuilder", "path": "dashbuilder-client/dashbuilder-renderers/dashbuilder-renderer-chartjs/src/main/java/org/dashbuilder/renderer/chartjs/ChartJsDisplayer.java", "license": "apache-2.0", "size": 14158 }
[ "org.dashbuilder.dataset.DataSet" ]
import org.dashbuilder.dataset.DataSet;
import org.dashbuilder.dataset.*;
[ "org.dashbuilder.dataset" ]
org.dashbuilder.dataset;
2,361,577
public InetAddress getLocalAddress() { return mLocalAddress; }
InetAddress function() { return mLocalAddress; }
/** * Returns the network address of the local host. */
Returns the network address of the local host
getLocalAddress
{ "repo_name": "haikuowuya/android_system_code", "path": "src/android/net/rtp/RtpStream.java", "license": "apache-2.0", "size": 5704 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
853,956
private boolean isSurrounded(DetailAST aAST) { final DetailAST prev = aAST.getPreviousSibling(); final DetailAST next = aAST.getNextSibling(); return (prev != null) && (prev.getType() == TokenTypes.LPAREN) && (next != null) && (next.getType() == TokenTypes.RPAREN); }
boolean function(DetailAST aAST) { final DetailAST prev = aAST.getPreviousSibling(); final DetailAST next = aAST.getNextSibling(); return (prev != null) && (prev.getType() == TokenTypes.LPAREN) && (next != null) && (next.getType() == TokenTypes.RPAREN); }
/** * Tests if the given <code>DetailAST</code> is surrounded by parentheses. * In short, does <code>aAST</code> have a previous sibling whose type is * <code>TokenTypes.LPAREN</code> and a next sibling whose type is <code> * TokenTypes.RPAREN</code>. * @param aAST the <code>DetailAST</code> to...
Tests if the given <code>DetailAST</code> is surrounded by parentheses. In short, does <code>aAST</code> have a previous sibling whose type is <code>TokenTypes.LPAREN</code> and a next sibling whose type is <code> TokenTypes.RPAREN</code>
isSurrounded
{ "repo_name": "lhanson/checkstyle", "path": "src/checkstyle/com/puppycrawl/tools/checkstyle/checks/coding/UnnecessaryParenthesesCheck.java", "license": "lgpl-2.1", "size": 10489 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
642,396
public static int loadIntegerValueWithFallback(IPreferenceScope preferences, String key, IPreferenceScope fallback, String fallbackKey) { int iVal = preferences.getInteger(key); if (iVal >= 0) return iVal; return Math.max(0, fallback.getInteger(fallbackKey)); }
static int function(IPreferenceScope preferences, String key, IPreferenceScope fallback, String fallbackKey) { int iVal = preferences.getInteger(key); if (iVal >= 0) return iVal; return Math.max(0, fallback.getInteger(fallbackKey)); }
/** * Helper method to load a specific value from preferences by bypassing an * implementation detail (see Bug 1291: Simplify filter and group settings * treatment). * * @param preferences the actual scope to load from. * @param key the key of the setting to load. * @param fallback the fallb...
Helper method to load a specific value from preferences by bypassing an implementation detail (see Bug 1291: Simplify filter and group settings treatment)
loadIntegerValueWithFallback
{ "repo_name": "rssowl/RSSOwl", "path": "org.rssowl.ui/src/org/rssowl/ui/internal/util/ModelUtils.java", "license": "epl-1.0", "size": 17966 }
[ "org.rssowl.core.persist.pref.IPreferenceScope" ]
import org.rssowl.core.persist.pref.IPreferenceScope;
import org.rssowl.core.persist.pref.*;
[ "org.rssowl.core" ]
org.rssowl.core;
700,960
private boolean areChildrenComputableAsPyExprs(ParentSoyNode<?> node) { for (SoyNode child : node.getChildren()) { // Note: Save time by not visiting RawTextNode and PrintNode children. if (!(child instanceof RawTextNode) && !(child instanceof PrintNode)) { if (!visit(child)) { retu...
boolean function(ParentSoyNode<?> node) { for (SoyNode child : node.getChildren()) { if (!(child instanceof RawTextNode) && !(child instanceof PrintNode)) { if (!visit(child)) { return false; } } } return true; }
/** * Private helper to check whether all SoyNode children of a given parent node satisfy * IsComputableAsPyExprVisitor. ExprNode children are assumed to be computable as PyExprs. * * @param node The parent node whose children to check. * @return True if all children satisfy IsComputableAsPyExprVisitor. ...
Private helper to check whether all SoyNode children of a given parent node satisfy IsComputableAsPyExprVisitor. ExprNode children are assumed to be computable as PyExprs
areChildrenComputableAsPyExprs
{ "repo_name": "rpatil26/closure-templates", "path": "java/src/com/google/template/soy/pysrc/internal/IsComputableAsPyExprVisitor.java", "license": "apache-2.0", "size": 6565 }
[ "com.google.template.soy.soytree.PrintNode", "com.google.template.soy.soytree.RawTextNode", "com.google.template.soy.soytree.SoyNode" ]
import com.google.template.soy.soytree.PrintNode; import com.google.template.soy.soytree.RawTextNode; import com.google.template.soy.soytree.SoyNode;
import com.google.template.soy.soytree.*;
[ "com.google.template" ]
com.google.template;
2,319,225
public ClassMap<?, ?> getMapperGeneration(MapperKey mapperKey) { ClassMap<?, ?> result = null; Map<MapperKey, ClassMap<?, ?>> map = (mappersSeen == null || mappersSeen.isEmpty()) ? null : this.mappersSeen.get(depth - 1); if (map != null) { result = map.get(mapperKey); } ...
ClassMap<?, ?> function(MapperKey mapperKey) { ClassMap<?, ?> result = null; Map<MapperKey, ClassMap<?, ?>> map = (mappersSeen == null mappersSeen.isEmpty()) ? null : this.mappersSeen.get(depth - 1); if (map != null) { result = map.get(mapperKey); } return result; }
/** * Looks up a ClassMap among the mappers generated with this mapping context * * @param mapperKey * @return the ClassMap for which a Mapper was generated in this context, if * any */
Looks up a ClassMap among the mappers generated with this mapping context
getMapperGeneration
{ "repo_name": "andreabertagnolli/orika", "path": "core/src/main/java/ma/glasnost/orika/MappingContext.java", "license": "apache-2.0", "size": 18820 }
[ "java.util.Map", "ma.glasnost.orika.metadata.ClassMap", "ma.glasnost.orika.metadata.MapperKey" ]
import java.util.Map; import ma.glasnost.orika.metadata.ClassMap; import ma.glasnost.orika.metadata.MapperKey;
import java.util.*; import ma.glasnost.orika.metadata.*;
[ "java.util", "ma.glasnost.orika" ]
java.util; ma.glasnost.orika;
1,829,886
return pattern(Pattern.compile(regex)); } /** * Creates a matcher that matches if the examined {@link CharSequence} matches the specified {@link Pattern}. * <p> * For example: * <pre>assertThat("myStringOfNote", Pattern.compile("[0-9]+"))</pre> * * @param pattern * th...
return pattern(Pattern.compile(regex)); } /** * Creates a matcher that matches if the examined {@link CharSequence} matches the specified {@link Pattern}. * <p> * For example: * <pre>assertThat(STR, Pattern.compile(STR))</pre> * * @param pattern * the pattern that the returned matcher will use to match any examined {@l...
/** * Creates a matcher that matches if the examined {@link CharSequence} matches the specified regular expression. * <p> * For example: * <pre>assertThat("myStringOfNote", pattern("[0-9]+"))</pre> * * @param regex * the regular expression that the returned matcher will use to...
Creates a matcher that matches if the examined <code>CharSequence</code> matches the specified regular expression. For example: <code>assertThat("myStringOfNote", pattern("[0-9]+"))</code>
pattern
{ "repo_name": "login-box/login-box", "path": "acceptance-tests/src/main/java/com/loginbox/app/acceptance/framework/matchers/PatternMatcher.java", "license": "mit", "size": 2026 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
2,011,071
private ThreadContextDescriptor captureThreadContext(Executor executor) { WSManagedExecutorService managedExecutor = defaultExecutor instanceof WSManagedExecutorService // ? (WSManagedExecutorService) defaultExecutor // : executor != defaultExecutor && executo...
ThreadContextDescriptor function(Executor executor) { WSManagedExecutorService managedExecutor = defaultExecutor instanceof WSManagedExecutorService : executor != defaultExecutor && executor instanceof WSManagedExecutorService : null; if (managedExecutor == null) return null; return managedExecutor.captureThreadContext...
/** * Captures thread context, if possible, first based on the default asynchronous execution facility, * otherwise based on the specified executor. If neither of these executors are a managed executor, * then thread context is not captured. * * @param executor executor argument that is supplie...
Captures thread context, if possible, first based on the default asynchronous execution facility, otherwise based on the specified executor. If neither of these executors are a managed executor, then thread context is not captured
captureThreadContext
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.concurrent/src/com/ibm/ws/concurrent/internal/ManagedCompletableFuture.java", "license": "epl-1.0", "size": 82857 }
[ "com.ibm.ws.concurrent.WSManagedExecutorService", "com.ibm.wsspi.threadcontext.ThreadContextDescriptor", "java.util.concurrent.Executor" ]
import com.ibm.ws.concurrent.WSManagedExecutorService; import com.ibm.wsspi.threadcontext.ThreadContextDescriptor; import java.util.concurrent.Executor;
import com.ibm.ws.concurrent.*; import com.ibm.wsspi.threadcontext.*; import java.util.concurrent.*;
[ "com.ibm.ws", "com.ibm.wsspi", "java.util" ]
com.ibm.ws; com.ibm.wsspi; java.util;
1,171,963
@DoesServiceRequest public final void uploadMetadata(final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException, URISyntaxException { if (opContext == null) { opContext = new OperationContext(); } this....
final void function(final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException, URISyntaxException { if (opContext == null) { opContext = new OperationContext(); } this.getShare().assertNoSnapshot(); opContext.initialize(); options = FileRequestOptions.populat...
/** * Uploads the file's metadata to the storage service using the access condition, request options, and operation * context. * <p> * Use {@link CloudFile#downloadAttributes} to retrieve the latest values for the file's properties and metadata * from the Microsoft Azure storage service. *...
Uploads the file's metadata to the storage service using the access condition, request options, and operation context. Use <code>CloudFile#downloadAttributes</code> to retrieve the latest values for the file's properties and metadata from the Microsoft Azure storage service
uploadMetadata
{ "repo_name": "Azure/azure-storage-android", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java", "license": "apache-2.0", "size": 138711 }
[ "com.microsoft.azure.storage.AccessCondition", "com.microsoft.azure.storage.OperationContext", "com.microsoft.azure.storage.StorageException", "com.microsoft.azure.storage.core.ExecutionEngine", "java.net.URISyntaxException" ]
import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.ExecutionEngine; import java.net.URISyntaxException;
import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; import java.net.*;
[ "com.microsoft.azure", "java.net" ]
com.microsoft.azure; java.net;
1,610,114
public static String getTimeStampFromFileName(String carbonDataFileName) { // Get the timestamp portion of the file. String fileName = getFileName(carbonDataFileName); int startIndex; if (carbonDataFileName.endsWith(CarbonTablePath.MERGE_INDEX_FILE_EXT)) { startIndex = fileName.lastI...
static String function(String carbonDataFileName) { String fileName = getFileName(carbonDataFileName); int startIndex; if (carbonDataFileName.endsWith(CarbonTablePath.MERGE_INDEX_FILE_EXT)) { startIndex = fileName.lastIndexOf(CarbonCommonConstants.UNDERSCORE) + 1; } else { startIndex = fileName.lastIndexOf(CarbonCommon...
/** * gets updated timestamp information from given carbon data file name */
gets updated timestamp information from given carbon data file name
getTimeStampFromFileName
{ "repo_name": "zzcclp/carbondata", "path": "core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java", "license": "apache-2.0", "size": 28254 }
[ "org.apache.carbondata.core.constants.CarbonCommonConstants" ]
import org.apache.carbondata.core.constants.CarbonCommonConstants;
import org.apache.carbondata.core.constants.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
816,669
public Object[] listSubscribedSystems(User loggedInUser, String label) throws FaultException { // Make sure user has access to the orgs channels if (!loggedInUser.hasRole(RoleFactory.CHANNEL_ADMIN)) { throw new PermissionCheckFailureException(); } // Get the cha...
Object[] function(User loggedInUser, String label) throws FaultException { if (!loggedInUser.hasRole(RoleFactory.CHANNEL_ADMIN)) { throw new PermissionCheckFailureException(); } Channel channel = lookupChannelByLabel(loggedInUser, label); DataResult<Map<String, Object>> dr = SystemManager.systemsSubscribedToChannel(cha...
/** * Returns list of subscribed systems for the given channel label. * @param loggedInUser The current user * @param label Label of the channel in question. * @return Returns an array of maps representing a system. Contains system id and * system name for each system subscribed to this channel...
Returns list of subscribed systems for the given channel label
listSubscribedSystems
{ "repo_name": "PaulWay/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java", "license": "gpl-2.0", "size": 127025 }
[ "com.redhat.rhn.FaultException", "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.domain.channel.Channel", "com.redhat.rhn.domain.role.RoleFactory", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException", "com.redhat.rhn.manager.system.System...
import com.redhat.rhn.FaultException; import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.domain.channel.Channel; import com.redhat.rhn.domain.role.RoleFactory; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.xmlrpc.PermissionCheckFailureException; import com.redhat.rhn.m...
import com.redhat.rhn.*; import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.channel.*; import com.redhat.rhn.domain.role.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.xmlrpc.*; import com.redhat.rhn.manager.system.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,650,346
public static GetSnapshotListBridgeResult deserialize(String bridgeResult) { JaxbJsonSerializer<GetSnapshotListBridgeResult> serializer = new JaxbJsonSerializer<>(GetSnapshotListBridgeResult.class); try { return serializer.deserialize(bridgeResult); } catch (IOExcepti...
static GetSnapshotListBridgeResult function(String bridgeResult) { JaxbJsonSerializer<GetSnapshotListBridgeResult> serializer = new JaxbJsonSerializer<>(GetSnapshotListBridgeResult.class); try { return serializer.deserialize(bridgeResult); } catch (IOException e) { throw new SnapshotDataException( STR + e.getMessage())...
/** * Parses properties from bridge result string * * @param bridgeResult - JSON formatted set of properties */
Parses properties from bridge result string
deserialize
{ "repo_name": "duracloud/duracloud", "path": "snapshotdata/src/main/java/org/duracloud/snapshot/dto/bridge/GetSnapshotListBridgeResult.java", "license": "apache-2.0", "size": 2308 }
[ "java.io.IOException", "org.duracloud.common.json.JaxbJsonSerializer", "org.duracloud.snapshot.error.SnapshotDataException" ]
import java.io.IOException; import org.duracloud.common.json.JaxbJsonSerializer; import org.duracloud.snapshot.error.SnapshotDataException;
import java.io.*; import org.duracloud.common.json.*; import org.duracloud.snapshot.error.*;
[ "java.io", "org.duracloud.common", "org.duracloud.snapshot" ]
java.io; org.duracloud.common; org.duracloud.snapshot;
1,391,370
private boolean delete(int i) { //checkInvariants(); final Object[] elements = this.elements; final int mask = elements.length - 1; final int h = head; final int t = tail; final int front = (i - h) & mask; final int back = (t - i) & mask; // Invarian...
boolean function(int i) { final Object[] elements = this.elements; final int mask = elements.length - 1; final int h = head; final int t = tail; final int front = (i - h) & mask; final int back = (t - i) & mask; if (front >= ((t - h) & mask)) throw new ConcurrentModificationException(); if (front < back) { if (h <= i) ...
/** * Removes the element at the specified position in the elements array, * adjusting head and tail as necessary. This can result in motion of * elements backwards or forwards in the array. * * <p>This method is called delete rather than remove to emphasize * that its semantics differ fr...
Removes the element at the specified position in the elements array, adjusting head and tail as necessary. This can result in motion of elements backwards or forwards in the array. This method is called delete rather than remove to emphasize that its semantics differ from those of <code>List#remove(int)</code>
delete
{ "repo_name": "LexlooWorks/aimer", "path": "src/com/nvapp/mupdf/ArrayDeque.java", "license": "apache-2.0", "size": 29192 }
[ "java.util.ConcurrentModificationException" ]
import java.util.ConcurrentModificationException;
import java.util.*;
[ "java.util" ]
java.util;
2,611,191
Observable<ServiceResponse<Void>> stringNullWithServiceResponseAsync(String stringPath);
Observable<ServiceResponse<Void>> stringNullWithServiceResponseAsync(String stringPath);
/** * Get null (should throw). * * @param stringPath null string value * @return the {@link ServiceResponse} object if successful. */
Get null (should throw)
stringNullWithServiceResponseAsync
{ "repo_name": "yugangw-msft/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/Paths.java", "license": "mit", "size": 26061 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
925,016
public void testCommentUri() { CommitMatch commit = CommitUriMatcher .getCommit(Uri .parse("https://github.com/defunkt/resque/commit/a1b2#commitcomment-1605701")); assertNotNull(commit); assertEquals("a1b2", commit.getCommit()); assertNotNull(c...
void function() { CommitMatch commit = CommitUriMatcher .getCommit(Uri .parse(STRa1b2STRresqueSTRdefunkt", commit.getRepository().owner().login()); }
/** * Verify uri with comment fragment */
Verify uri with comment fragment
testCommentUri
{ "repo_name": "songful/PocketHub", "path": "app/src/androidTest/java/com/github/pockethub/android/tests/commit/CommitUriMatcherTest.java", "license": "apache-2.0", "size": 2974 }
[ "android.net.Uri", "com.github.pockethub.android.core.commit.CommitMatch", "com.github.pockethub.android.core.commit.CommitUriMatcher" ]
import android.net.Uri; import com.github.pockethub.android.core.commit.CommitMatch; import com.github.pockethub.android.core.commit.CommitUriMatcher;
import android.net.*; import com.github.pockethub.android.core.commit.*;
[ "android.net", "com.github.pockethub" ]
android.net; com.github.pockethub;
2,748,275
public void setSessionAttributeValueClassNameFilter(String sessionAttributeValueClassNameFilter) throws PatternSyntaxException { if (sessionAttributeValueClassNameFilter == null || sessionAttributeValueClassNameFilter.length() == 0) { sessionAttributeValueClassNam...
void function(String sessionAttributeValueClassNameFilter) throws PatternSyntaxException { if (sessionAttributeValueClassNameFilter == null sessionAttributeValueClassNameFilter.length() == 0) { sessionAttributeValueClassNamePattern = null; } else { sessionAttributeValueClassNamePattern = Pattern.compile(sessionAttribut...
/** * Set the regular expression to use to filter classes used for session * attributes. The regular expression is anchored and must match the fully * qualified class name. * * @param sessionAttributeValueClassNameFilter The regular expression to use * to filter session at...
Set the regular expression to use to filter classes used for session attributes. The regular expression is anchored and must match the fully qualified class name
setSessionAttributeValueClassNameFilter
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-tomcat-6.0.48/java/org/apache/catalina/session/ManagerBase.java", "license": "apache-2.0", "size": 52322 }
[ "java.util.regex.Pattern", "java.util.regex.PatternSyntaxException" ]
import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException;
import java.util.regex.*;
[ "java.util" ]
java.util;
698,753
public ITree removeMatched(ITree tree, boolean isSrc) { for (ITree t: tree.getTrees()) { if ((isSrc && isSrcMatched(t)) || ((!isSrc) && isDstMatched(t))) { if (t.getParent() != null) t.getParent().getChildren().remove(t); t.setParent(null); } }...
ITree function(ITree tree, boolean isSrc) { for (ITree t: tree.getTrees()) { if ((isSrc && isSrcMatched(t)) ((!isSrc) && isDstMatched(t))) { if (t.getParent() != null) t.getParent().getChildren().remove(t); t.setParent(null); } } tree.refresh(); return tree; }
/** * Remove mapped nodes from the tree. Be careful this method will invalidate * all the metrics of this tree and its descendants. If you need them, you need * to recompute them. */
Remove mapped nodes from the tree. Be careful this method will invalidate all the metrics of this tree and its descendants. If you need them, you need to recompute them
removeMatched
{ "repo_name": "caiusb/gumtree", "path": "core/src/main/java/com/github/gumtreediff/matchers/heuristic/gt/AbstractBottomUpMatcher.java", "license": "lgpl-3.0", "size": 5822 }
[ "com.github.gumtreediff.tree.ITree" ]
import com.github.gumtreediff.tree.ITree;
import com.github.gumtreediff.tree.*;
[ "com.github.gumtreediff" ]
com.github.gumtreediff;
1,013,921
public void checkFileExists(File file)throws FileNotFoundException { logger.config("Reading file:" + "path" + file.getPath() + ":abs:" + file.getAbsolutePath()); if (!file.exists()) { logger.severe("Unable to find:" + file.getPath()); throw new FileNotFoundExcepti...
void function(File file)throws FileNotFoundException { logger.config(STR + "path" + file.getPath() + ":abs:" + file.getAbsolutePath()); if (!file.exists()) { logger.severe(STR + file.getPath()); throw new FileNotFoundException(ErrorMessage.UNABLE_TO_FIND_FILE.getMsg(file.getPath())); } }
/** * Check does file exist * * @param file * @throws FileNotFoundException */
Check does file exist
checkFileExists
{ "repo_name": "ConatyConsulting/jaudiotagger", "path": "src/org/jaudiotagger/audio/AudioFile.java", "license": "lgpl-2.1", "size": 10859 }
[ "java.io.File", "java.io.FileNotFoundException", "org.jaudiotagger.logging.ErrorMessage" ]
import java.io.File; import java.io.FileNotFoundException; import org.jaudiotagger.logging.ErrorMessage;
import java.io.*; import org.jaudiotagger.logging.*;
[ "java.io", "org.jaudiotagger.logging" ]
java.io; org.jaudiotagger.logging;
276,500
double getAccumulatedKbPerSecondWriteIO(long since, ProcessIO io);
double getAccumulatedKbPerSecondWriteIO(long since, ProcessIO io);
/** * Returns the average amount of io that has been processed since the given * timestamp, in KB per second. This is specifically for the amount of Write IO * that a process has produced * * @param since The time since IO usage was being recorded * @param io The io that has been recorded...
Returns the average amount of io that has been processed since the given timestamp, in KB per second. This is specifically for the amount of Write IO that a process has produced
getAccumulatedKbPerSecondWriteIO
{ "repo_name": "tootedom/linux-jvm-processio", "path": "src/main/java/org/greencheek/processio/service/usage/ProcessIOUsage.java", "license": "apache-2.0", "size": 4814 }
[ "org.greencheek.processio.domain.ProcessIO" ]
import org.greencheek.processio.domain.ProcessIO;
import org.greencheek.processio.domain.*;
[ "org.greencheek.processio" ]
org.greencheek.processio;
1,392,948
//------------------------- AUTOGENERATED START ------------------------- public static FxRateShifts.Meta meta() { return FxRateShifts.Meta.INSTANCE; } static { MetaBean.register(FxRateShifts.Meta.INSTANCE); } private static final long serialVersionUID = 1L; FxRateShifts( ShiftType...
static FxRateShifts.Meta function() { return FxRateShifts.Meta.INSTANCE; } static { MetaBean.register(FxRateShifts.Meta.INSTANCE); } private static final long serialVersionUID = 1L; FxRateShifts( ShiftType shiftType, DoubleArray shiftAmount, CurrencyPair currencyPair) { JodaBeanUtils.notNull(shiftType, STR); JodaBeanUt...
/** * The meta-bean for {@code FxRateShifts}. * @return the meta-bean, not null */
The meta-bean for FxRateShifts
meta
{ "repo_name": "OpenGamma/Strata", "path": "modules/market/src/main/java/com/opengamma/strata/market/FxRateShifts.java", "license": "apache-2.0", "size": 12672 }
[ "com.opengamma.strata.basics.currency.CurrencyPair", "com.opengamma.strata.collect.array.DoubleArray", "org.joda.beans.JodaBeanUtils", "org.joda.beans.MetaBean" ]
import com.opengamma.strata.basics.currency.CurrencyPair; import com.opengamma.strata.collect.array.DoubleArray; import org.joda.beans.JodaBeanUtils; import org.joda.beans.MetaBean;
import com.opengamma.strata.basics.currency.*; import com.opengamma.strata.collect.array.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
2,143,545
@FXML private void addSelectedStatisticDefinition() { // get the selected field and statistic from the combo boxes String selectedFieldName = fieldNameComboBox.getSelectionModel().getSelectedItem(); String selectedStatisticType = statisticTypeComboBox.getSelectionModel().getSelectedItem(); // check ...
void function() { String selectedFieldName = fieldNameComboBox.getSelectionModel().getSelectedItem(); String selectedStatisticType = statisticTypeComboBox.getSelectionModel().getSelectedItem(); if (statisticDefinitionsTableView.getItems().stream().filter(row -> row.getFieldName().equals(selectedFieldName) && row .getSt...
/** * Called when the "Add" button is clicked. Adds a statistic definition to the table. */
Called when the "Add" button is clicked. Adds a statistic definition to the table
addSelectedStatisticDefinition
{ "repo_name": "Esri/arcgis-runtime-samples-java", "path": "feature_layers/statistical-query-group-and-sort/src/main/java/com/esri/samples/statistical_query_group_and_sort/StatisticalQueryGroupAndSortController.java", "license": "apache-2.0", "size": 13943 }
[ "com.esri.arcgisruntime.data.StatisticDefinition", "com.esri.arcgisruntime.data.StatisticType", "java.util.stream.Collectors" ]
import com.esri.arcgisruntime.data.StatisticDefinition; import com.esri.arcgisruntime.data.StatisticType; import java.util.stream.Collectors;
import com.esri.arcgisruntime.data.*; import java.util.stream.*;
[ "com.esri.arcgisruntime", "java.util" ]
com.esri.arcgisruntime; java.util;
1,911,066
public static Selector open() throws IOException { return SelectorProvider.provider().openSelector(); }
static Selector function() throws IOException { return SelectorProvider.provider().openSelector(); }
/** * Opens a selector. * * <p> The new selector is created by invoking the {@link * java.nio.channels.spi.SelectorProvider#openSelector openSelector} method * of the system-wide default {@link * java.nio.channels.spi.SelectorProvider} object. </p> * * @return A new selector ...
Opens a selector. The new selector is created by invoking the <code>java.nio.channels.spi.SelectorProvider#openSelector openSelector</code> method of the system-wide default <code>java.nio.channels.spi.SelectorProvider</code> object.
open
{ "repo_name": "jgaltidor/VarJ", "path": "analyzed_libs/jdk1.6.0_06_src/java/nio/channels/Selector.java", "license": "mit", "size": 15070 }
[ "java.io.IOException", "java.nio.channels.spi.SelectorProvider" ]
import java.io.IOException; import java.nio.channels.spi.SelectorProvider;
import java.io.*; import java.nio.channels.spi.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,109,969
private void addTrace(String statement, final boolean isSuccess, final long duration) { TracedCall aRunningTrace = RunningTraceContainer.getCurrentlyTracedCall(); CurrentlyTracedCall currentTrace = aRunningTrace.callTraced() ? (CurrentlyTracedCall) aRunningTrace : null; if (currentTrace != null) { TraceStep...
void function(String statement, final boolean isSuccess, final long duration) { TracedCall aRunningTrace = RunningTraceContainer.getCurrentlyTracedCall(); CurrentlyTracedCall currentTrace = aRunningTrace.callTraced() ? (CurrentlyTracedCall) aRunningTrace : null; if (currentTrace != null) { TraceStep currentStep = curre...
/** * Perform additional profiling - for Journey stuff. * * @param statement prepared statement * @param isSuccess is success */
Perform additional profiling - for Journey stuff
addTrace
{ "repo_name": "anotheria/moskito-javaagent", "path": "src/main/java/org/moskito/javaagent/SqlCallsMonitoringAspect.java", "license": "mit", "size": 6247 }
[ "net.anotheria.moskito.core.calltrace.CurrentlyTracedCall", "net.anotheria.moskito.core.calltrace.RunningTraceContainer", "net.anotheria.moskito.core.calltrace.TraceStep", "net.anotheria.moskito.core.calltrace.TracedCall" ]
import net.anotheria.moskito.core.calltrace.CurrentlyTracedCall; import net.anotheria.moskito.core.calltrace.RunningTraceContainer; import net.anotheria.moskito.core.calltrace.TraceStep; import net.anotheria.moskito.core.calltrace.TracedCall;
import net.anotheria.moskito.core.calltrace.*;
[ "net.anotheria.moskito" ]
net.anotheria.moskito;
1,095,451
public void setRegistry(Registry registry) { this.registry = registry; }
void function(Registry registry) { this.registry = registry; }
/** * Sets the registry. * * @param registry the registry */
Sets the registry
setRegistry
{ "repo_name": "Esleelkartea/aon-employee", "path": "aonemployee_v2.3.0_src/paquetes descomprimidos/aon.registry-2.1.4-sources/com/code/aon/person/Person.java", "license": "gpl-2.0", "size": 3044 }
[ "com.code.aon.registry.Registry" ]
import com.code.aon.registry.Registry;
import com.code.aon.registry.*;
[ "com.code.aon" ]
com.code.aon;
646,755
URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoInput(true); conn.connect(); InputStream inputStream = conn.getInputStream(); return inputStream; }
URL url = new URL(urlStr); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoInput(true); conn.connect(); InputStream inputStream = conn.getInputStream(); return inputStream; }
/** * url to inputStream * * @param urlStr * @return * @throws IOException */
url to inputStream
getInputStream
{ "repo_name": "PrinceChou/IotSdk", "path": "src/com/iotsdk/net/image/ImageUtil.java", "license": "apache-2.0", "size": 10784 }
[ "java.io.InputStream", "java.net.HttpURLConnection" ]
import java.io.InputStream; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,636,880
@Test(expected = EntityNotFoundException.class) public void test_savePaymentNote_paymentNotExist() throws Exception { instance.savePaymentNote(Long.MAX_VALUE, "note"); }
@Test(expected = EntityNotFoundException.class) void function() throws Exception { instance.savePaymentNote(Long.MAX_VALUE, "note"); }
/** * <p> * Failure test for the method <code>savePaymentNote(long paymentId, String note)</code> with payment doesn't exist. * <br> * <code>EntityNotFoundException</code> is expected. * </p> * * @throws Exception * to JUnit. */
Failure test for the method <code>savePaymentNote(long paymentId, String note)</code> with payment doesn't exist. <code>EntityNotFoundException</code> is expected.
test_savePaymentNote_paymentNotExist
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/services/impl/PaymentServiceImplUnitTests.java", "license": "apache-2.0", "size": 28086 }
[ "gov.opm.scrd.services.EntityNotFoundException", "org.junit.Test" ]
import gov.opm.scrd.services.EntityNotFoundException; import org.junit.Test;
import gov.opm.scrd.services.*; import org.junit.*;
[ "gov.opm.scrd", "org.junit" ]
gov.opm.scrd; org.junit;
2,866,302
// Fetch the inbox, creating it if it doesn't exist yet List<Message> inbox = messageInboxes.get(agentID); if (inbox == null) { inbox = new ArrayList<>(); messageInboxes.put(agentID, inbox); } inbox.add(message); }
List<Message> inbox = messageInboxes.get(agentID); if (inbox == null) { inbox = new ArrayList<>(); messageInboxes.put(agentID, inbox); } inbox.add(message); }
/** * This method memorizes a message in the messageInbox of the recipient. * * @param agentID: the id of the recipient * @param message: the message */
This method memorizes a message in the messageInbox of the recipient
send
{ "repo_name": "phdabel/MASBench", "path": "src/br/ufrgs/MASBench/Comm/CommunicationLayer.java", "license": "bsd-2-clause", "size": 2648 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
209,461
public Map<String, Class<? extends ComputeTask<?, ?>>> localTasks();
Map<String, Class<? extends ComputeTask<?, ?>>> function();
/** * Gets map of all locally deployed tasks keyed by their task name . * * @return Map of locally deployed tasks keyed by their task name. */
Gets map of all locally deployed tasks keyed by their task name
localTasks
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/IgniteCompute.java", "license": "apache-2.0", "size": 36886 }
[ "java.util.Map", "org.apache.ignite.compute.ComputeTask" ]
import java.util.Map; import org.apache.ignite.compute.ComputeTask;
import java.util.*; import org.apache.ignite.compute.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,384,728
public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { // throw new WrongNumberArgsException(XSLMessages.createXPATHMessage("zero", null)); reportWrongNumberArgs(); }
void function(Expression arg, int argNum) throws WrongNumberArgsException { reportWrongNumberArgs(); }
/** * Set an argument expression for a function. This method is called by the * XPath compiler. * * @param arg non-null expression that represents the argument. * @param argNum The argument number index. * * @throws WrongNumberArgsException If the argNum parameter is beyond what * is specifie...
Set an argument expression for a function. This method is called by the XPath compiler
setArg
{ "repo_name": "bandcampdotcom/j2objc", "path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/Function.java", "license": "apache-2.0", "size": 4624 }
[ "org.apache.xpath.Expression" ]
import org.apache.xpath.Expression;
import org.apache.xpath.*;
[ "org.apache.xpath" ]
org.apache.xpath;
806,545
public CJProduct findByManufacturer_First(java.lang.String manufacturer, com.liferay.portal.kernel.util.OrderByComparator<CJProduct> orderByComparator) throws NoSuchCJProductException;
CJProduct function(java.lang.String manufacturer, com.liferay.portal.kernel.util.OrderByComparator<CJProduct> orderByComparator) throws NoSuchCJProductException;
/** * Returns the first c j product in the ordered set where manufacturer = &#63;. * * @param manufacturer the manufacturer * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching c j product * @throws NoSuchCJProductException if a matching c j pro...
Returns the first c j product in the ordered set where manufacturer = &#63;
findByManufacturer_First
{ "repo_name": "FuadEfendi/liferay-osgi", "path": "modules/ca.efendi.datafeeds.api/src/main/java/ca/efendi/datafeeds/service/persistence/CJProductPersistence.java", "license": "apache-2.0", "size": 53359 }
[ "ca.efendi.datafeeds.exception.NoSuchCJProductException", "ca.efendi.datafeeds.model.CJProduct" ]
import ca.efendi.datafeeds.exception.NoSuchCJProductException; import ca.efendi.datafeeds.model.CJProduct;
import ca.efendi.datafeeds.exception.*; import ca.efendi.datafeeds.model.*;
[ "ca.efendi.datafeeds" ]
ca.efendi.datafeeds;
1,675,409
@Override public void enterWith_stmt(@NotNull Python3Parser.With_stmtContext ctx) { }
@Override public void enterWith_stmt(@NotNull Python3Parser.With_stmtContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitIf_stmt
{ "repo_name": "IsThisThePayneResidence/intellidots", "path": "src/main/java/ua/edu/hneu/ast/parsers/Python3BaseListener.java", "license": "gpl-3.0", "size": 30027 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
985,889
public void removeFromItems(final ItemFactura _item) { items.remove(_item); } @SuppressWarnings("unused") @Inject private DomainObjectContainer contenedor;
void function(final ItemFactura _item) { items.remove(_item); } @SuppressWarnings(STR) private DomainObjectContainer contenedor;
/** * remueve un item de la lista de items de la factura * * @param _item * List<Itemfactura> */
remueve un item de la lista de items de la factura
removeFromItems
{ "repo_name": "CentroMedico/Adamantium", "path": "dom/src/main/java/dom/factura/Factura.java", "license": "apache-2.0", "size": 5922 }
[ "org.apache.isis.applib.DomainObjectContainer" ]
import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.applib.*;
[ "org.apache.isis" ]
org.apache.isis;
1,461,216
public static String unescapeFileName(String fileName) { int length = fileName.length(); int percentCharacterCount = 0; for (int i = 0; i < length; i++) { if (fileName.charAt(i) == '%') { percentCharacterCount++; } } if (percentCharacterCount == 0) { return fileName; ...
static String function(String fileName) { int length = fileName.length(); int percentCharacterCount = 0; for (int i = 0; i < length; i++) { if (fileName.charAt(i) == '%') { percentCharacterCount++; } } if (percentCharacterCount == 0) { return fileName; } int expectedLength = length - percentCharacterCount * 2; StringBu...
/** * Unescapes an escaped file or directory name back to its original value. * * <p>See {@link #escapeFileName(String)} for more information. * * @param fileName File name to be unescaped. * @return The original value of the file name before it was escaped, or null if the escaped * fileName se...
Unescapes an escaped file or directory name back to its original value. See <code>#escapeFileName(String)</code> for more information
unescapeFileName
{ "repo_name": "muxinc/stats-sdk-exoplayer", "path": "library/src/main/java/com/google/android/exoplayer2/util/Util.java", "license": "apache-2.0", "size": 41520 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,049,379
public final void setSelectedComponent(MockComponent newSelectedComponent, NativeEvent event) { if (newSelectedComponent == null) { throw new IllegalArgumentException("at least one component must always be selected"); } boolean shouldSelectMultipleComponents = shouldSelectMultipleComponents(event); ...
final void function(MockComponent newSelectedComponent, NativeEvent event) { if (newSelectedComponent == null) { throw new IllegalArgumentException(STR); } boolean shouldSelectMultipleComponents = shouldSelectMultipleComponents(event); if (selectedComponents.size() == 1 && selectedComponents.contains(newSelectedCompone...
/** * Changes the component that is currently selected in the form. * <p> * There will always be exactly one component selected in a form * at any given time. */
Changes the component that is currently selected in the form. There will always be exactly one component selected in a form at any given time
setSelectedComponent
{ "repo_name": "jisqyv/appinventor-sources", "path": "appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java", "license": "apache-2.0", "size": 60467 }
[ "com.google.gwt.dom.client.NativeEvent" ]
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,542,036