method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setTrustManager(TrustManager trustManager) { this.trustManager = trustManager; }
void function(TrustManager trustManager) { this.trustManager = trustManager; }
/** * To use a existing configured trust manager instead of using {@link TrustManagerFactory} to get the * {@link TrustManager}. */
To use a existing configured trust manager instead of using <code>TrustManagerFactory</code> to get the <code>TrustManager</code>
setTrustManager
{ "repo_name": "pax95/camel", "path": "core/camel-api/src/main/java/org/apache/camel/support/jsse/TrustManagersParameters.java", "license": "apache-2.0", "size": 7311 }
[ "javax.net.ssl.TrustManager" ]
import javax.net.ssl.TrustManager;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
1,504,229
public JNDIContentRepositoryBuilder withInitialContextFactory(final String contextFactory) { contextProperties.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory); return this; }
JNDIContentRepositoryBuilder function(final String contextFactory) { contextProperties.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory); return this; }
/** * Uses the specified contextFactory as initial context factory. The method is a convenience for setting the * INITIAL_CONTEXT_FACTORY property on the environment. * * @param contextFactory * the context factory class name to use to create the context * @return this test rule...
Uses the specified contextFactory as initial context factory. The method is a convenience for setting the INITIAL_CONTEXT_FACTORY property on the environment
withInitialContextFactory
{ "repo_name": "tourniquet-io/tourniquet-junit", "path": "tourniquet-jcr/src/main/java/io/tourniquet/junit/jcr/rules/builder/JNDIContentRepositoryBuilder.java", "license": "apache-2.0", "size": 7019 }
[ "javax.naming.Context" ]
import javax.naming.Context;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
741,013
@SuppressWarnings("SimplifiableIfStatement") boolean inject(Object target, Class<? extends Annotation> annCls, GridResourceInjector injector, @Nullable GridDeployment dep, @Nullable Class<?> depCls) throws IgniteCheckedException { return injectInternal(target, ann...
@SuppressWarnings(STR) boolean inject(Object target, Class<? extends Annotation> annCls, GridResourceInjector injector, @Nullable GridDeployment dep, @Nullable Class<?> depCls) throws IgniteCheckedException { return injectInternal(target, annCls, injector, dep, depCls, null); }
/** * Injects given resource via field or setter with specified annotations on provided target object. * * @param target Target object. * @param annCls Setter annotation. * @param injector Resource to inject. * @param dep Deployment. * @param depCls Deployment class. * @return {@...
Injects given resource via field or setter with specified annotations on provided target object
inject
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/resource/GridResourceIoc.java", "license": "apache-2.0", "size": 21283 }
[ "java.lang.annotation.Annotation", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.managers.deployment.GridDeployment", "org.jetbrains.annotations.Nullable" ]
import java.lang.annotation.Annotation; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.managers.deployment.GridDeployment; import org.jetbrains.annotations.Nullable;
import java.lang.annotation.*; import org.apache.ignite.*; import org.apache.ignite.internal.managers.deployment.*; import org.jetbrains.annotations.*;
[ "java.lang", "org.apache.ignite", "org.jetbrains.annotations" ]
java.lang; org.apache.ignite; org.jetbrains.annotations;
819,122
public MatchType isNumberMatch(PhoneNumber firstNumber, String secondNumber) { // First see if the second number has an implicit country calling code, by attempting to parse // it. try { PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION); return isNumberMatch(firstNumber, se...
MatchType function(PhoneNumber firstNumber, String secondNumber) { try { PhoneNumber secondNumberAsProto = parse(secondNumber, UNKNOWN_REGION); return isNumberMatch(firstNumber, secondNumberAsProto); } catch (NumberParseException e) { if (e.getErrorType() == NumberParseException.ErrorType.INVALID_COUNTRY_CODE) { String...
/** * Takes two phone numbers and compares them for equality. This is a convenience wrapper for * {@link #isNumberMatch(PhoneNumber, PhoneNumber)}. No default region is known. * * @param firstNumber first number to compare in proto buffer format. * @param secondNumber second number to compare. Can cont...
Takes two phone numbers and compares them for equality. This is a convenience wrapper for <code>#isNumberMatch(PhoneNumber, PhoneNumber)</code>. No default region is known
isNumberMatch
{ "repo_name": "leandrocohn/libphonenumber-7-0.5", "path": "tools/java/java-build/target/test-classes/com/google/i18n/phonenumbers/PhoneNumberUtil.java", "license": "apache-2.0", "size": 161599 }
[ "com.google.i18n.phonenumbers.Phonenumber" ]
import com.google.i18n.phonenumbers.Phonenumber;
import com.google.i18n.phonenumbers.*;
[ "com.google.i18n" ]
com.google.i18n;
1,993,966
private List<Node> dereferenceSameDocumentURI(Node node) { List<Node> nodeSet = new ArrayList<Node>(); if (node != null) { nodeSetMinusCommentNodes(node, nodeSet, null); } return nodeSet; }
List<Node> function(Node node) { List<Node> nodeSet = new ArrayList<Node>(); if (node != null) { nodeSetMinusCommentNodes(node, nodeSet, null); } return nodeSet; }
/** * Dereferences a same-document URI fragment. * * @param node the node (document or element) referenced by the * URI fragment. If null, returns an empty set. * @return a set of nodes (minus any comment nodes) */
Dereferences a same-document URI fragment
dereferenceSameDocumentURI
{ "repo_name": "Legostaev/xmlsec-gost", "path": "src/main/java/org/apache/xml/security/signature/reference/ReferenceSubTreeData.java", "license": "apache-2.0", "size": 6332 }
[ "java.util.ArrayList", "java.util.List", "org.w3c.dom.Node" ]
import java.util.ArrayList; import java.util.List; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
1,840,579
private NettyServerStream serverStream(Http2Stream stream) { return stream.getProperty(streamKey); }
NettyServerStream function(Http2Stream stream) { return stream.getProperty(streamKey); }
/** * Returns the server stream associated to the given HTTP/2 stream object. */
Returns the server stream associated to the given HTTP/2 stream object
serverStream
{ "repo_name": "conchlee/grpc-java", "path": "netty/src/main/java/io/grpc/netty/NettyServerHandler.java", "license": "bsd-3-clause", "size": 15371 }
[ "io.netty.handler.codec.http2.Http2Stream" ]
import io.netty.handler.codec.http2.Http2Stream;
import io.netty.handler.codec.http2.*;
[ "io.netty.handler" ]
io.netty.handler;
1,676,679
public SearchQuery setFacetMissing(Boolean v) { this.set(FacetParams.FACET_MISSING, v); return this; } /** get facet sort * @return facet sort or default of {@link FacetParams#FACET_SORT_COUNT}
SearchQuery function(Boolean v) { this.set(FacetParams.FACET_MISSING, v); return this; } /** get facet sort * @return facet sort or default of {@link FacetParams#FACET_SORT_COUNT}
/** * Sets facet missing boolean flag * * @param v flag to indicate the field of {@link FacetParams#FACET_MISSING} . * @return this */
Sets facet missing boolean flag
setFacetMissing
{ "repo_name": "zycgit/configuration", "path": "mysearch.git/mysearch-client/src/main/java/net/hasor/search/query/SearchQuery.java", "license": "apache-2.0", "size": 32871 }
[ "net.hasor.search.query.params.FacetParams" ]
import net.hasor.search.query.params.FacetParams;
import net.hasor.search.query.params.*;
[ "net.hasor.search" ]
net.hasor.search;
590,090
private long getDataLength(CloudBlobWrapper blob, BlobProperties properties) throws AzureException { if (blob instanceof CloudPageBlobWrapper) { try { return PageBlobInputStream.getPageBlobDataSize((CloudPageBlobWrapper) blob, getInstrumentedContext( isConcurrentOOBAp...
long function(CloudBlobWrapper blob, BlobProperties properties) throws AzureException { if (blob instanceof CloudPageBlobWrapper) { try { return PageBlobInputStream.getPageBlobDataSize((CloudPageBlobWrapper) blob, getInstrumentedContext( isConcurrentOOBAppendAllowed())); } catch (Exception e) { throw new AzureException...
/** * Return the actual data length of the blob with the specified properties. * If it is a page blob, you can't rely on the length from the properties * argument and you must get it from the file. Otherwise, you can. */
Return the actual data length of the blob with the specified properties. If it is a page blob, you can't rely on the length from the properties argument and you must get it from the file. Otherwise, you can
getDataLength
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azure/AzureNativeFileSystemStore.java", "license": "apache-2.0", "size": 103496 }
[ "com.microsoft.azure.storage.blob.BlobProperties", "org.apache.hadoop.fs.azure.StorageInterface" ]
import com.microsoft.azure.storage.blob.BlobProperties; import org.apache.hadoop.fs.azure.StorageInterface;
import com.microsoft.azure.storage.blob.*; import org.apache.hadoop.fs.azure.*;
[ "com.microsoft.azure", "org.apache.hadoop" ]
com.microsoft.azure; org.apache.hadoop;
1,920,114
public static final int entryHashCode(final byte[] key, final byte[] vbytes, final OffHeapByteSource bs, final ExtraInfo tableInfo) throws IllegalAccessException { if (key != null) { // This is similar to entryValueHashCode(). // The difference in the byte[] is that there is no vers...
static final int function(final byte[] key, final byte[] vbytes, final OffHeapByteSource bs, final ExtraInfo tableInfo) throws IllegalAccessException { if (key != null) { int hash = 0; boolean needSpacePadding = false, varcharTrimmed = false; if (tableInfo != null) { RowFormatter pkrf = tableInfo.getPrimaryKeyFormatter...
/** * Returns the hash for the given RegionEntry using the key bytes; * * @return an integer as the hash code for the key of given RegionEntry */
Returns the hash for the given RegionEntry using the key bytes
entryHashCode
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/store/RegionEntryUtils.java", "license": "apache-2.0", "size": 137377 }
[ "com.gemstone.gnu.trove.TIntArrayList", "com.pivotal.gemfirexd.internal.engine.sql.catalog.ExtraInfo", "com.pivotal.gemfirexd.internal.engine.store.offheap.OffHeapByteSource", "com.pivotal.gemfirexd.internal.shared.common.ResolverUtils", "com.pivotal.gemfirexd.internal.shared.common.StoredFormatIds" ]
import com.gemstone.gnu.trove.TIntArrayList; import com.pivotal.gemfirexd.internal.engine.sql.catalog.ExtraInfo; import com.pivotal.gemfirexd.internal.engine.store.offheap.OffHeapByteSource; import com.pivotal.gemfirexd.internal.shared.common.ResolverUtils; import com.pivotal.gemfirexd.internal.shared.common.StoredForm...
import com.gemstone.gnu.trove.*; import com.pivotal.gemfirexd.internal.engine.sql.catalog.*; import com.pivotal.gemfirexd.internal.engine.store.offheap.*; import com.pivotal.gemfirexd.internal.shared.common.*;
[ "com.gemstone.gnu", "com.pivotal.gemfirexd" ]
com.gemstone.gnu; com.pivotal.gemfirexd;
412,538
public void addToRequests(SendableRequest req, ObjectContainer container) { if(persistent()) container.activate(requests, 1); requests.addRequest(req, container); if(persistent()) container.deactivate(requests, 1); }
void function(SendableRequest req, ObjectContainer container) { if(persistent()) container.activate(requests, 1); requests.addRequest(req, container); if(persistent()) container.deactivate(requests, 1); }
/** Add a low-level request to the list of requests belonging to this high-level request (request here * includes inserts). */
Add a low-level request to the list of requests belonging to this high-level request (request here
addToRequests
{ "repo_name": "tbaumeist/FreeNet-Source", "path": "src/freenet/client/async/ClientRequester.java", "license": "gpl-2.0", "size": 16167 }
[ "com.db4o.ObjectContainer" ]
import com.db4o.ObjectContainer;
import com.db4o.*;
[ "com.db4o" ]
com.db4o;
2,579,697
public static boolean registerFluidContainer(FluidContainerData data) { if (isFilledContainer(data.filledContainer) || data.filledContainer == null) { return false; } if (data.fluid == null || data.fluid.getFluid() == null) { FMLLog.bigWarning("Inv...
static boolean function(FluidContainerData data) { if (isFilledContainer(data.filledContainer) data.filledContainer == null) { return false; } if (data.fluid == null data.fluid.getFluid() == null) { FMLLog.bigWarning(STR, data.filledContainer.getItem().getUnlocalizedName(data.filledContainer)); return false; } containe...
/** * Register a new fluid containing item. * * @param data * See {@link FluidContainerData}. * @return True if container was successfully registered; false if it already is, or an invalid parameter was passed. */
Register a new fluid containing item
registerFluidContainer
{ "repo_name": "jdpadrnos/MinecraftForge", "path": "src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java", "license": "lgpl-2.1", "size": 15332 }
[ "net.minecraftforge.common.MinecraftForge", "net.minecraftforge.fml.common.FMLLog" ]
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.common.*; import net.minecraftforge.fml.common.*;
[ "net.minecraftforge.common", "net.minecraftforge.fml" ]
net.minecraftforge.common; net.minecraftforge.fml;
2,035,192
private boolean isSafeReplacement(Node node, Node replacement) { // No checks are needed for simple names. if (node.getType() == Token.NAME) { return true; } Preconditions.checkArgument(node.getType() == Token.GETPROP); Node name = node.getFirstChild(); if (name.getType() == Token.NAME ...
boolean function(Node node, Node replacement) { if (node.getType() == Token.NAME) { return true; } Preconditions.checkArgument(node.getType() == Token.GETPROP); Node name = node.getFirstChild(); if (name.getType() == Token.NAME && isNameAssignedTo(name.getString(), replacement)) { return false; } return true; }
/** * Checks name referenced in node to determine if it might have * changed. * @return Whether the replacement can be made. */
Checks name referenced in node to determine if it might have changed
isSafeReplacement
{ "repo_name": "ehsan/js-symbolic-executor", "path": "closure-compiler/src/com/google/javascript/jscomp/CollapseVariableDeclarations.java", "license": "apache-2.0", "size": 12466 }
[ "com.google.common.base.Preconditions", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.common.base.*; import com.google.javascript.rhino.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
2,796,732
public View getView(int position, View convertView, ViewGroup parent) { Video video = videoList.get(position); if (convertView == null) { LayoutInflater mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_...
View function(int position, View convertView, ViewGroup parent) { Video video = videoList.get(position); if (convertView == null) { LayoutInflater mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = mInflater.inflate(R.layout.video_list_item, null); } TextView titleTex...
/** * Method used by the ListView to "get" the "view" for each row of * data in the ListView. * * @param position * The position of the item within the adapter's data * set of the item whose view we want. convertView The * old view to reuse, if possib...
Method used by the ListView to "get" the "view" for each row of data in the ListView
getView
{ "repo_name": "freddyvgg/PosaSpring", "path": "assignments/assignment3/VideoUploadClient/src/vandy/mooc/view/ui/VideoAdapter.java", "license": "apache-2.0", "size": 3828 }
[ "android.content.Context", "android.view.LayoutInflater", "android.view.View", "android.view.ViewGroup", "android.widget.TextView" ]
import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
2,389,475
public void completed(ClientResponse response, RequestScope scope);
void function(ClientResponse response, RequestScope scope);
/** * Called when the client invocation was successfully completed with a response. * * @param response response data. * @param scope request processing scope. */
Called when the client invocation was successfully completed with a response
completed
{ "repo_name": "agentlab/org.glassfish.jersey", "path": "plugins/org.glassfish.jersey.client/src/main/java/org/glassfish/jersey/client/ResponseCallback.java", "license": "epl-1.0", "size": 2705 }
[ "org.glassfish.jersey.process.internal.RequestScope" ]
import org.glassfish.jersey.process.internal.RequestScope;
import org.glassfish.jersey.process.internal.*;
[ "org.glassfish.jersey" ]
org.glassfish.jersey;
2,114,923
private CodePattern buildCodePattern_ONE_VS_ONE(Attribute classLabel) { int numberOfClasses = classLabel.getMapping().size(); int numberOfCombinations = (numberOfClasses * (numberOfClasses - 1)) / 2; String[] classIndexMap = new String[numberOfClasses]; CodePattern codePattern = new CodePattern(numberOfC...
CodePattern function(Attribute classLabel) { int numberOfClasses = classLabel.getMapping().size(); int numberOfCombinations = (numberOfClasses * (numberOfClasses - 1)) / 2; String[] classIndexMap = new String[numberOfClasses]; CodePattern codePattern = new CodePattern(numberOfClasses, numberOfCombinations); modelNames....
/** * Builds a code pattern according to the "1 against 1" classification scheme. */
Builds a code pattern according to the "1 against 1" classification scheme
buildCodePattern_ONE_VS_ONE
{ "repo_name": "transwarpio/rapidminer", "path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/operator/learner/meta/Binary2MultiClassLearner.java", "license": "gpl-3.0", "size": 16285 }
[ "com.rapidminer.example.Attribute" ]
import com.rapidminer.example.Attribute;
import com.rapidminer.example.*;
[ "com.rapidminer.example" ]
com.rapidminer.example;
1,649,733
void addActivityResultListener(@NonNull PluginRegistry.ActivityResultListener listener);
void addActivityResultListener(@NonNull PluginRegistry.ActivityResultListener listener);
/** * Adds a listener that is invoked whenever the associated {@link Activity}'s {@code * onActivityResult(...)} method is invoked. */
Adds a listener that is invoked whenever the associated <code>Activity</code>'s onActivityResult(...) method is invoked
addActivityResultListener
{ "repo_name": "mikejurka/engine", "path": "shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java", "license": "bsd-3-clause", "size": 4610 }
[ "android.support.annotation.NonNull", "io.flutter.plugin.common.PluginRegistry" ]
import android.support.annotation.NonNull; import io.flutter.plugin.common.PluginRegistry;
import android.support.annotation.*; import io.flutter.plugin.common.*;
[ "android.support", "io.flutter.plugin" ]
android.support; io.flutter.plugin;
938,816
private String verifyVector(int sensorIndex, int sensorType) throws Throwable { Sensor sensor = mSensor[sensorIndex]; if (sensor == null) { throw new SensorNotSupportedException(sensorType); } float[] angularChange = mAngularChange[sensorIndex]; doubl...
String function(int sensorIndex, int sensorType) throws Throwable { Sensor sensor = mSensor[sensorIndex]; if (sensor == null) { throw new SensorNotSupportedException(sensorType); } float[] angularChange = mAngularChange[sensorIndex]; double maxDeviationDegrees = MAX_DEVIATION_DEGREES[sensorIndex]; double maxComponentDe...
/** * Verifies that a given 'Rotation Vector' sensor does not drift over time. * The test takes in consideration a reference measurement, and a final measurement. It then * calculates its angular change. */
Verifies that a given 'Rotation Vector' sensor does not drift over time. The test takes in consideration a reference measurement, and a final measurement. It then calculates its angular change
verifyVector
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/RotationVectorTestActivity.java", "license": "gpl-3.0", "size": 9061 }
[ "android.hardware.Sensor", "android.hardware.cts.helpers.SensorNotSupportedException", "junit.framework.Assert" ]
import android.hardware.Sensor; import android.hardware.cts.helpers.SensorNotSupportedException; import junit.framework.Assert;
import android.hardware.*; import android.hardware.cts.helpers.*; import junit.framework.*;
[ "android.hardware", "junit.framework" ]
android.hardware; junit.framework;
931,608
@Deprecated public boolean isValid() { try { validate(); } catch (ValidationException vex) { return false; } return true; }
boolean function() { try { validate(); } catch (ValidationException vex) { return false; } return true; }
/** * Method isValid. * * @return true if this object is valid according to the schema */
Method isValid
isValid
{ "repo_name": "vishwaAbhinav/OpenNMS", "path": "opennms-config/src/main/java/org/opennms/netmgt/config/datacollection/IpList.java", "license": "gpl-2.0", "size": 16823 }
[ "org.exolab.castor.xml.ValidationException" ]
import org.exolab.castor.xml.ValidationException;
import org.exolab.castor.xml.*;
[ "org.exolab.castor" ]
org.exolab.castor;
225,145
public void restartApplication() throws IOException { if (!vfsControl.isUmountSafe() && !checkShutdown()) { return; } else { try { // java binary String java = System.getProperty("java.home") + "/bin/java"; // vm arguments List<String> vmArguments = ManagementFactory.getRuntimeMXB...
void function() throws IOException { if (!vfsControl.isUmountSafe() && !checkShutdown()) { return; } else { try { String java = System.getProperty(STR) + STR; List<String> vmArguments = ManagementFactory.getRuntimeMXBean() .getInputArguments(); StringBuffer vmArgsOneLine = new StringBuffer(); for (String arg : vmArgume...
/** * Restart the current Java application * * @throws IOException */
Restart the current Java application
restartApplication
{ "repo_name": "tidatida/PanBox", "path": "panbox-linux/src/org/panbox/desktop/linux/PanboxClient.java", "license": "gpl-3.0", "size": 19874 }
[ "java.io.File", "java.io.IOException", "java.lang.management.ManagementFactory", "java.util.List" ]
import java.io.File; import java.io.IOException; import java.lang.management.ManagementFactory; import java.util.List;
import java.io.*; import java.lang.management.*; import java.util.*;
[ "java.io", "java.lang", "java.util" ]
java.io; java.lang; java.util;
2,398,654
public List<String> getAllMetadata(String key) { Group group = this.getGroup(key, false); if (group != null) { return new Vector<String>(group.getValues()); } else { return null; } }
List<String> function(String key) { Group group = this.getGroup(key, false); if (group != null) { return new Vector<String>(group.getValues()); } else { return null; } }
/** * Gets all values for give key * * @param key * The key for which all values will be return * @return All values for given key, or null if key does not exist */
Gets all values for give key
getAllMetadata
{ "repo_name": "lewismc/oodt", "path": "metadata/src/main/java/org/apache/oodt/cas/metadata/Metadata.java", "license": "apache-2.0", "size": 16271 }
[ "java.util.List", "java.util.Vector" ]
import java.util.List; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,248,894
@SuppressWarnings("unchecked") @Test public void testCompleteEditModel() { FluidSpecimenController controller = new FluidSpecimenController(); GenericServiceMockup<Container> containerService = new GenericServiceMockup<Container>(); controller.setContainerService(containerService); GenericServiceM...
@SuppressWarnings(STR) void function() { FluidSpecimenController controller = new FluidSpecimenController(); GenericServiceMockup<Container> containerService = new GenericServiceMockup<Container>(); controller.setContainerService(containerService); GenericServiceMockup<ContainerSubcategory> containerSubcategoryService ...
/** * Test the controller completeEditModel method. */
Test the controller completeEditModel method
testCompleteEditModel
{ "repo_name": "NCIP/calims", "path": "calims2-webapp/test/unit/java/gov/nih/nci/calims2/ui/inventory/fluidspecimen/FluidSpecimenControllerTest.java", "license": "bsd-3-clause", "size": 6111 }
[ "gov.nih.nci.calims2.business.common.type.TypeEnumeration", "gov.nih.nci.calims2.domain.administration.Location", "gov.nih.nci.calims2.domain.administration.Organization", "gov.nih.nci.calims2.domain.administration.Person", "gov.nih.nci.calims2.domain.administration.StandardUnit", "gov.nih.nci.calims2.dom...
import gov.nih.nci.calims2.business.common.type.TypeEnumeration; import gov.nih.nci.calims2.domain.administration.Location; import gov.nih.nci.calims2.domain.administration.Organization; import gov.nih.nci.calims2.domain.administration.Person; import gov.nih.nci.calims2.domain.administration.StandardUnit; import gov.ni...
import gov.nih.nci.calims2.business.common.type.*; import gov.nih.nci.calims2.domain.administration.*; import gov.nih.nci.calims2.domain.common.*; import gov.nih.nci.calims2.domain.inventory.*; import gov.nih.nci.calims2.ui.generic.crud.*; import gov.nih.nci.calims2.ui.inventory.quantity.*; import gov.nih.nci.calims2.u...
[ "gov.nih.nci", "java.util", "org.junit", "org.springframework.web" ]
gov.nih.nci; java.util; org.junit; org.springframework.web;
1,801,768
public javax.xml.stream.XMLStreamReader getPullParser( javax.xml.namespace.QName qName) throws org.apache.axis2.databinding.ADBException { ArrayList<Object> elementList = new ArrayList<Object>(); ArrayList attribList = new ArrayList(); if (localExtraElement != null) { elementList ...
javax.xml.stream.XMLStreamReader function( javax.xml.namespace.QName qName) throws org.apache.axis2.databinding.ADBException { ArrayList<Object> elementList = new ArrayList<Object>(); ArrayList attribList = new ArrayList(); if (localExtraElement != null) { elementList .add(org.apache.axis2.databinding.utils.Constants.O...
/** * databinding method to get an XML representation of this object * */
databinding method to get an XML representation of this object
getPullParser
{ "repo_name": "arthurmelo88/palmetalADP", "path": "palmetal_to_lbrk/nfe2/ws/src/br/inf/portalfiscal/www/nfe/wsdl/nfecancelamento2/NfeCancelamento2Stub.java", "license": "gpl-2.0", "size": 84091 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,169,690
public static void renameSourceDirAsCompactionComplete (FileSystem fs, Dataset dataset) { try { for (Path path: dataset.getRenamePaths()) { Path newPath = new Path (path.getParent(), path.getName() + MRCompactor.COMPACTION_RENAME_SOURCE_DIR_SUFFIX); LOG.info("[{}] Renaming {} to {}", dataset...
static void function (FileSystem fs, Dataset dataset) { try { for (Path path: dataset.getRenamePaths()) { Path newPath = new Path (path.getParent(), path.getName() + MRCompactor.COMPACTION_RENAME_SOURCE_DIR_SUFFIX); LOG.info(STR, dataset.getDatasetName(), path, newPath); fs.rename(path, newPath); } } catch (Exception e...
/** * Rename all the source directories for a specific dataset */
Rename all the source directories for a specific dataset
renameSourceDirAsCompactionComplete
{ "repo_name": "aditya1105/gobblin", "path": "gobblin-compaction/src/main/java/org/apache/gobblin/compaction/mapreduce/MRCompactor.java", "license": "apache-2.0", "size": 45911 }
[ "org.apache.gobblin.compaction.dataset.Dataset", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import org.apache.gobblin.compaction.dataset.Dataset; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import org.apache.gobblin.compaction.dataset.*; import org.apache.hadoop.fs.*;
[ "org.apache.gobblin", "org.apache.hadoop" ]
org.apache.gobblin; org.apache.hadoop;
343,677
@Nullable private String getStringFromBundle(@NotNull final ResourceBundle bundle, @NotNull final String key) { try { return bundle.getString(key); } catch (final MissingResourceException ignore) { } catch (final ClassCastException ignore) { System.err.pr...
@Nullable String function(@NotNull final ResourceBundle bundle, @NotNull final String key) { try { return bundle.getString(key); } catch (final MissingResourceException ignore) { } catch (final ClassCastException ignore) { System.err.println(STR + key + STR + bundle + STR); } return null; }
/** Gets a String from a bundle. * @param bundle Bundle to get String from. * @param key Key for which to get the String. * @return String from the bundle or <code>null</code> if not available. */
Gets a String from a bundle
getStringFromBundle
{ "repo_name": "christianhujer/japi", "path": "historic2/src/prj/net/sf/japi/swing/about/AboutDialog.java", "license": "lgpl-3.0", "size": 15676 }
[ "java.util.MissingResourceException", "java.util.ResourceBundle", "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable" ]
import java.util.MissingResourceException; import java.util.ResourceBundle; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
1,393,638
public BlockUCState getBlockUCState() { return blockUCState; }
BlockUCState function() { return blockUCState; }
/** * Return the state of the block under construction. * @see BlockUCState */
Return the state of the block under construction
getBlockUCState
{ "repo_name": "anjuncc/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockUnderConstructionFeature.java", "license": "apache-2.0", "size": 9610 }
[ "org.apache.hadoop.hdfs.server.common.HdfsServerConstants" ]
import org.apache.hadoop.hdfs.server.common.HdfsServerConstants;
import org.apache.hadoop.hdfs.server.common.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
877,181
public static Metadata parseUdta(Atom.LeafAtom udtaAtom, boolean isQuickTime) { if (isQuickTime) { // Meta boxes are regular boxes rather than full boxes in QuickTime. For now, don't try and // decode one. return null; } ParsableByteArray udtaData = udtaAtom.data; udtaData.setPositio...
static Metadata function(Atom.LeafAtom udtaAtom, boolean isQuickTime) { if (isQuickTime) { return null; } ParsableByteArray udtaData = udtaAtom.data; udtaData.setPosition(Atom.HEADER_SIZE); while (udtaData.bytesLeft() >= Atom.HEADER_SIZE) { int atomPosition = udtaData.getPosition(); int atomSize = udtaData.readInt(); i...
/** * Parses a udta atom. * * @param udtaAtom The udta (user data) atom to decode. * @param isQuickTime True for QuickTime media. False otherwise. * @return Parsed metadata, or null. */
Parses a udta atom
parseUdta
{ "repo_name": "muxinc/stats-sdk-exoplayer", "path": "library/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java", "license": "apache-2.0", "size": 52721 }
[ "com.google.android.exoplayer2.metadata.Metadata", "com.google.android.exoplayer2.util.ParsableByteArray" ]
import com.google.android.exoplayer2.metadata.Metadata; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.metadata.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
102,420
public BigDecimal getQtyInvoiced () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInvoiced); if (bd == null) return Env.ZERO; return bd; }
BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyInvoiced); if (bd == null) return Env.ZERO; return bd; }
/** Get Quantity Invoiced. @return Invoiced Quantity */
Get Quantity Invoiced
getQtyInvoiced
{ "repo_name": "armenrz/adempiere", "path": "base/src/org/compiere/model/X_C_InvoiceLine.java", "license": "gpl-2.0", "size": 29039 }
[ "java.math.BigDecimal", "org.compiere.util.Env" ]
import java.math.BigDecimal; import org.compiere.util.Env;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
115,818
static BigInteger sanitize(Number value, int signum) { if (signum == 0 || value == null) { return BigInteger.ZERO; } return (signum < 0)? ((BigInteger)value).negate() : (BigInteger)value; }
static BigInteger sanitize(Number value, int signum) { if (signum == 0 value == null) { return BigInteger.ZERO; } return (signum < 0)? ((BigInteger)value).negate() : (BigInteger)value; }
/** * Compute <code>value*signum</code> where value==null is treated as * value==0. * @return non-null {@link BigInteger}. */
Compute <code>value*signum</code> where value==null is treated as value==0
sanitize
{ "repo_name": "openjdk/jdk8u", "path": "jaxp/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java", "license": "gpl-2.0", "size": 118225 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,211,996
public static Bug385636Package init() { if (isInited) return (Bug385636Package)EPackage.Registry.INSTANCE.getEPackage(Bug385636Package.eNS_URI); // Obtain or create and register package Bug385636PackageImpl theBug385636Package = (Bug385636PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ...
static Bug385636Package function() { if (isInited) return (Bug385636Package)EPackage.Registry.INSTANCE.getEPackage(Bug385636Package.eNS_URI); Bug385636PackageImpl theBug385636Package = (Bug385636PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Bug385636PackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI...
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link Bug385636Package#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that fi...
Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>Bug385636Package#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
init
{ "repo_name": "miklossy/xtext-core", "path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/resource/bug385636/impl/Bug385636PackageImpl.java", "license": "epl-1.0", "size": 24033 }
[ "org.eclipse.emf.ecore.EPackage", "org.eclipse.emf.ecore.EcorePackage", "org.eclipse.xtext.resource.bug385636.Bug385636Package" ]
import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EcorePackage; import org.eclipse.xtext.resource.bug385636.Bug385636Package;
import org.eclipse.emf.ecore.*; import org.eclipse.xtext.resource.bug385636.*;
[ "org.eclipse.emf", "org.eclipse.xtext" ]
org.eclipse.emf; org.eclipse.xtext;
983,148
String version() throws RequiredElementNotPresentException;
String version() throws RequiredElementNotPresentException;
/** * The version is required. * * @return the version as a string * @throws RequiredElementNotPresentException for obvious reasons */
The version is required
version
{ "repo_name": "devilgate/pertwee", "path": "src/main/java/software/tinlion/pertwee/Feed.java", "license": "apache-2.0", "size": 3331 }
[ "software.tinlion.pertwee.exception.RequiredElementNotPresentException" ]
import software.tinlion.pertwee.exception.RequiredElementNotPresentException;
import software.tinlion.pertwee.exception.*;
[ "software.tinlion.pertwee" ]
software.tinlion.pertwee;
2,855,189
public DfuServiceInitiator setZip(final Uri uri, final String path) { return init(uri, path, 0, DfuBaseThread.TYPE_AUTO, DfuBaseThread.MIME_TYPE_ZIP); }
DfuServiceInitiator function(final Uri uri, final String path) { return init(uri, path, 0, DfuBaseThread.TYPE_AUTO, DfuBaseThread.MIME_TYPE_ZIP); }
/** * Sets the URI or path of the ZIP file. If the URI and path are not null the URI will be used. * @param uri the URI of the file * @param path the path of the file * @return the builder */
Sets the URI or path of the ZIP file. If the URI and path are not null the URI will be used
setZip
{ "repo_name": "ftc300/DFU_Demo_With_NordicsemiLib", "path": "dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceInitiator.java", "license": "bsd-3-clause", "size": 28777 }
[ "android.net.Uri" ]
import android.net.Uri;
import android.net.*;
[ "android.net" ]
android.net;
2,116,299
public TNavigatorLayout getTNavigatorLayout(Connection connection) throws TorqueException { if (aTNavigatorLayout == null && (!ObjectUtils.equals(this.navigatorLayout, null))) { aTNavigatorLayout = TNavigatorLayoutPeer.retrieveByPK(SimpleKey.keyFor(this.navigatorLayout), conn...
TNavigatorLayout function(Connection connection) throws TorqueException { if (aTNavigatorLayout == null && (!ObjectUtils.equals(this.navigatorLayout, null))) { aTNavigatorLayout = TNavigatorLayoutPeer.retrieveByPK(SimpleKey.keyFor(this.navigatorLayout), connection); } return aTNavigatorLayout; }
/** * Return the associated TNavigatorLayout object * If it was not retrieved before, the object is retrieved from * the database using the passed connection * * @param connection the connection used to retrieve the associated object * from the database, if it was not retrieved befo...
Return the associated TNavigatorLayout object If it was not retrieved before, the object is retrieved from the database using the passed connection
getTNavigatorLayout
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTViewParam.java", "license": "gpl-3.0", "size": 26640 }
[ "com.aurel.track.persist.TNavigatorLayout", "com.aurel.track.persist.TNavigatorLayoutPeer", "java.sql.Connection", "org.apache.commons.lang.ObjectUtils", "org.apache.torque.TorqueException", "org.apache.torque.om.SimpleKey" ]
import com.aurel.track.persist.TNavigatorLayout; import com.aurel.track.persist.TNavigatorLayoutPeer; import java.sql.Connection; import org.apache.commons.lang.ObjectUtils; import org.apache.torque.TorqueException; import org.apache.torque.om.SimpleKey;
import com.aurel.track.persist.*; import java.sql.*; import org.apache.commons.lang.*; import org.apache.torque.*; import org.apache.torque.om.*;
[ "com.aurel.track", "java.sql", "org.apache.commons", "org.apache.torque" ]
com.aurel.track; java.sql; org.apache.commons; org.apache.torque;
532,474
public static PlaceholderFragment newInstance(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; ...
static PlaceholderFragment function(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public PlaceholderFragment() { }
/** * Returns a new instance of this fragment for the given section * number. */
Returns a new instance of this fragment for the given section number
newInstance
{ "repo_name": "travelbird/hackathon-estimote-demo", "path": "Demos/src/main/java/com/estimote/examples/demos/activities/ReceiverActivity.java", "license": "mit", "size": 10137 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
61,623
private static String getTerminalString() throws CicsConditionException { // Get the current task's principal facility Object pf = Task.getTask().getPrincipalFacility(); // Are we of a suitable type? if ( pf instanceof TerminalPrincipalFacility ) { // Cast t...
static String function() throws CicsConditionException { Object pf = Task.getTask().getPrincipalFacility(); if ( pf instanceof TerminalPrincipalFacility ) { TerminalPrincipalFacility tpf = (TerminalPrincipalFacility) pf; DataHolder holder = new DataHolder(); try { tpf.receive(holder); } catch (EndOfChainIndicatorExcept...
/** * Verifies the current task is associated with a terminal and then * receives the input data. The received data is converted to a Java * string and returned. * * @return a String containing the data input at the terminal. If the * transaction's principal facility is not a terminal, th...
Verifies the current task is associated with a terminal and then receives the input data. The received data is converted to a Java string and returned
getTerminalString
{ "repo_name": "cicsdev/cics-java-jcics-samples", "path": "projects/com.ibm.cicsdev.terminal/src/com/ibm/cicsdev/terminal/TerminalExample1.java", "license": "apache-2.0", "size": 4560 }
[ "com.ibm.cics.server.CicsConditionException", "com.ibm.cics.server.DataHolder", "com.ibm.cics.server.EndOfChainIndicatorException", "com.ibm.cics.server.Task", "com.ibm.cics.server.TerminalPrincipalFacility" ]
import com.ibm.cics.server.CicsConditionException; import com.ibm.cics.server.DataHolder; import com.ibm.cics.server.EndOfChainIndicatorException; import com.ibm.cics.server.Task; import com.ibm.cics.server.TerminalPrincipalFacility;
import com.ibm.cics.server.*;
[ "com.ibm.cics" ]
com.ibm.cics;
1,045,392
public void test_binarySearch$FIIF() { for (int counter = 0; counter < arraySize; counter++) { assertTrue("Binary search on float[] answered incorrect position", Arrays.binarySearch(floatArray, counter, arraySize, (float) counter) == (float) counte...
public void test_binarySearch$FIIF() { for (int counter = 0; counter < arraySize; counter++) { assertTrue(STR, Arrays.binarySearch(floatArray, counter, arraySize, (float) counter) == (float) counter); } assertEquals( STR, -1, Arrays.binarySearch(floatArray, 0, arraySize, (float) -1)); assertTrue(STR, Arrays .binarySear...
/** * java.util.Arrays#binarySearch(float[], float) */
java.util.Arrays#binarySearch(float[], float)
test_binarySearch$FIIF
{ "repo_name": "debian-pkg-android-tools/android-platform-libcore", "path": "harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ArraysTest.java", "license": "gpl-2.0", "size": 207677 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
656,322
public String buildSelect(String parameters, List<String> options, List<String> values, int selected) { return buildSelect(parameters, options, values, selected, true); }
String function(String parameters, List<String> options, List<String> values, int selected) { return buildSelect(parameters, options, values, selected, true); }
/** * Generates a html select box out of the provided values.<p> * * @param parameters a string that will be inserted into the initial select tag, * if null no parameters will be inserted * @param options the options * @param values the option values, if null the select will have no v...
Generates a html select box out of the provided values
buildSelect
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/workplace/CmsWorkplace.java", "license": "lgpl-2.1", "size": 95168 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,752,492
public void remove(int index, Location loc, Mutability mutability) throws EvalException { checkMutable(loc, mutability); contents.remove(index); }
void function(int index, Location loc, Mutability mutability) throws EvalException { checkMutable(loc, mutability); contents.remove(index); }
/** * Removes the element at a given index. The index must already have been validated to be in * range. * * @param index the index of the element to remove * @param loc the location to use for error reporting * @param mutability the {@link Mutability} associated with the operation */
Removes the element at a given index. The index must already have been validated to be in range
remove
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java", "license": "apache-2.0", "size": 28123 }
[ "com.google.devtools.build.lib.events.Location" ]
import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.events.*;
[ "com.google.devtools" ]
com.google.devtools;
1,890,428
private Segment receiveSegment() throws IOException { Segment s; if ((s = receiveSegmentImpl()) != null) { if (DEBUG) { log("recv " + s); } if (s instanceof DATSegment || s instanceof NULSegment || s instanceof RSTSegm...
Segment function() throws IOException { Segment s; if ((s = receiveSegmentImpl()) != null) { if (DEBUG) { log(STR + s); } if (s instanceof DATSegment s instanceof NULSegment s instanceof RSTSegment s instanceof FINSegment s instanceof SYNSegment) { _counters.incCumulativeAckCounter(); } if (_keepAlive) { _keepAliveTime...
/** * Receives a segment and increases the cumulative * acknowledgment counter. * * @return the received segment. * @throws IOException if an I/O error occurs in the * underlying UDP socket. */
Receives a segment and increases the cumulative acknowledgment counter
receiveSegment
{ "repo_name": "mibutec/jnet", "path": "src/main/java/net/rudp/ReliableSocket.java", "license": "apache-2.0", "size": 67078 }
[ "java.io.IOException", "net.rudp.impl.DATSegment", "net.rudp.impl.FINSegment", "net.rudp.impl.NULSegment", "net.rudp.impl.RSTSegment", "net.rudp.impl.SYNSegment", "net.rudp.impl.Segment" ]
import java.io.IOException; import net.rudp.impl.DATSegment; import net.rudp.impl.FINSegment; import net.rudp.impl.NULSegment; import net.rudp.impl.RSTSegment; import net.rudp.impl.SYNSegment; import net.rudp.impl.Segment;
import java.io.*; import net.rudp.impl.*;
[ "java.io", "net.rudp.impl" ]
java.io; net.rudp.impl;
1,924,781
@Override public void writeResultSet(String tableName, ResultSet rs, String[] columnTags) throws Exception { sb.append("\"" + tableName + "\":{"); addSpaces(4); sb.append("\"rows\":["); addSpaces(5); boolean firstRow = true; while (rs.next()) { if (!firstRow) { sb.append(","); addSpaces(5)...
void function(String tableName, ResultSet rs, String[] columnTags) throws Exception { sb.append("\"STR\":{"); addSpaces(4); sb.append("\"rows\":["); addSpaces(5); boolean firstRow = true; while (rs.next()) { if (!firstRow) { sb.append(","); addSpaces(5); } sb.append("{"); int cnt = 0; for (String column : columnTags) {...
/** * This method is used to serialize resultset rows as json. * * @param tableName * the tableName for which rows are serialized * @param rs * the resultset * @param columnTags * the column names */
This method is used to serialize resultset rows as json
writeResultSet
{ "repo_name": "GeoinformationSystems/GeoprocessingAppstore", "path": "src/com/esri/gpt/server/usage/common/JSONWriter.java", "license": "apache-2.0", "size": 3799 }
[ "java.sql.ResultSet" ]
import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,867,818
public ByteBuffer getRandomData(final int nbytes) { final byte[] bytes = new byte[nbytes]; r.nextBytes(bytes); return ByteBuffer.wrap(bytes); }
ByteBuffer function(final int nbytes) { final byte[] bytes = new byte[nbytes]; r.nextBytes(bytes); return ByteBuffer.wrap(bytes); }
/** * Returns random data that will fit in <i>nbytes</i>. * * @return A new {@link ByteBuffer} wrapping a new <code>byte[]</code> * having random contents. */
Returns random data that will fit in nbytes
getRandomData
{ "repo_name": "blazegraph/database", "path": "bigdata-core-test/bigdata/src/test/com/bigdata/io/writecache/TestWriteCacheServiceLifetime.java", "license": "gpl-2.0", "size": 9263 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,848,038
public void doNew(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); state.setAttribute("mode", "new"); // mark the realm as new, so on cancel it can be deleted state.setAttribute("new", "true"); // disable auto-u...
void function(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); state.setAttribute("mode", "new"); state.setAttribute("new", "true"); disableObservers(state); }
/** * Handle a request for a new realm. */
Handle a request for a new realm
doNew
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "authz/authz-tool/tool/src/java/org/sakaiproject/authz/tool/RealmsAction.java", "license": "apache-2.0", "size": 44395 }
[ "org.sakaiproject.cheftool.Context", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.cheftool.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.cheftool", "org.sakaiproject.event" ]
org.sakaiproject.cheftool; org.sakaiproject.event;
1,418,499
private String getHeaderString(HttpServletRequest request) { Enumeration<String> headerNames = request.getHeaderNames(); StringBuilder stringBuilder = new StringBuilder(); while (headerNames.hasMoreElements()) { String headerName = headerNames.nextElement(); stringBu...
String function(HttpServletRequest request) { Enumeration<String> headerNames = request.getHeaderNames(); StringBuilder stringBuilder = new StringBuilder(); while (headerNames.hasMoreElements()) { String headerName = headerNames.nextElement(); stringBuilder.append(STR).append(headerName).append(STR) .append(STR).append...
/** * Print the request headers as a one string with header names and respective values. * @param request HTTP request to retrieve headers. * @return Headers and values as a single string. */
Print the request headers as a one string with header names and respective values
getHeaderString
{ "repo_name": "omindu/carbon-identity-framework", "path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/handler/request/impl/DefaultRequestCoordinator.java", "license": "apache-2.0", ...
[ "java.util.Enumeration", "javax.servlet.http.HttpServletRequest" ]
import java.util.Enumeration; import javax.servlet.http.HttpServletRequest;
import java.util.*; import javax.servlet.http.*;
[ "java.util", "javax.servlet" ]
java.util; javax.servlet;
33,583
public MethodTree getMethod(Tree anyTree) { if (anyTree.getKind().toString().equals("METHOD")) { LOG.finest("getMethod - Success"); return (MethodTree) anyTree; } else { LOG.info("Parent is not a Method but: " + anyTree.getKind()); return null; } }
MethodTree function(Tree anyTree) { if (anyTree.getKind().toString().equals(STR)) { LOG.finest(STR); return (MethodTree) anyTree; } else { LOG.info(STR + anyTree.getKind()); return null; } }
/** * Helper method to safely get a MethodTree casted from the passed object * * @return null (if parent is not a Method) || MethodTree object * @author benste */
Helper method to safely get a MethodTree casted from the passed object
getMethod
{ "repo_name": "bensteUEM/uem.basesDeDatos.hernandezstein", "path": "CodeAnaylzer/src/CodeAnalyzerTreeVisitor.java", "license": "lgpl-3.0", "size": 15341 }
[ "com.sun.source.tree.MethodTree", "com.sun.source.tree.Tree" ]
import com.sun.source.tree.MethodTree; import com.sun.source.tree.Tree;
import com.sun.source.tree.*;
[ "com.sun.source" ]
com.sun.source;
509,305
public CacheConfiguration<K, V> setAffinityMapper(AffinityKeyMapper affMapper) { this.affMapper = affMapper; return this; }
CacheConfiguration<K, V> function(AffinityKeyMapper affMapper) { this.affMapper = affMapper; return this; }
/** * Sets custom affinity mapper. If not provided, then default implementation will be used. The default behavior is * described in {@link AffinityKeyMapper} documentation. * * @param affMapper Affinity mapper. * @return {@code this} for chaining. */
Sets custom affinity mapper. If not provided, then default implementation will be used. The default behavior is described in <code>AffinityKeyMapper</code> documentation
setAffinityMapper
{ "repo_name": "afinka77/ignite", "path": "modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java", "license": "apache-2.0", "size": 98164 }
[ "org.apache.ignite.cache.affinity.AffinityKeyMapper" ]
import org.apache.ignite.cache.affinity.AffinityKeyMapper;
import org.apache.ignite.cache.affinity.*;
[ "org.apache.ignite" ]
org.apache.ignite;
498,927
public static boolean isTerminalLocked(Properties ctx, int terminalId) throws TerminalNotFoundException { MPOSTerminal terminal = getTerminal(ctx, terminalId); return terminal.isLocked(); }
static boolean function(Properties ctx, int terminalId) throws TerminalNotFoundException { MPOSTerminal terminal = getTerminal(ctx, terminalId); return terminal.isLocked(); }
/** * Retrieves the locked status of the terminal provided * @param ctx Context * @param terminalId Terminal * @return Lock status of the terminal * @throws TerminalNotFoundException If the terminal cannot be loaded */
Retrieves the locked status of the terminal provided
isTerminalLocked
{ "repo_name": "armenrz/adempiere", "path": "posterita/posterita/src/main/org/posterita/businesslogic/POSTerminalManager.java", "license": "gpl-2.0", "size": 45349 }
[ "java.util.Properties", "org.compiere.model.MPOSTerminal", "org.posterita.exceptions.TerminalNotFoundException" ]
import java.util.Properties; import org.compiere.model.MPOSTerminal; import org.posterita.exceptions.TerminalNotFoundException;
import java.util.*; import org.compiere.model.*; import org.posterita.exceptions.*;
[ "java.util", "org.compiere.model", "org.posterita.exceptions" ]
java.util; org.compiere.model; org.posterita.exceptions;
76,266
public void deframe(Buffer data, boolean endOfStream) { checkNotClosed(); Preconditions.checkNotNull(data, "data"); Preconditions.checkState(!this.endOfStream, "Past end of stream"); unprocessed.addBuffer(data); // Indicate that all of the data for this stream has been received. this.endOfStr...
void function(Buffer data, boolean endOfStream) { checkNotClosed(); Preconditions.checkNotNull(data, "data"); Preconditions.checkState(!this.endOfStream, STR); unprocessed.addBuffer(data); this.endOfStream = endOfStream; deliver(); }
/** * Adds the given data to this deframer and attempts delivery to the sink. * * @param data the raw data read from the remote endpoint. Must be non-null. * @param endOfStream if {@code true}, indicates that {@code data} is the end of the stream from * the remote endpoint. * @throws IllegalSta...
Adds the given data to this deframer and attempts delivery to the sink
deframe
{ "repo_name": "dongc/grpc-java", "path": "core/src/main/java/io/grpc/transport/MessageDeframer.java", "license": "bsd-3-clause", "size": 10619 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
690,146
public Iterator<Item> iterator() { return new ListIterator<Item>(first); } // an iterator, doesn't implement remove() since it's optional private class ListIterator<Item> implements Iterator<Item> { private Node<Item> current; public ListIterator(Node<Item> first) { ...
Iterator<Item> function() { return new ListIterator<Item>(first); } private class ListIterator<Item> implements Iterator<Item> { private Node<Item> current; public ListIterator(Node<Item> first) { current = first; }
/** * Returns an iterator to this stack that iterates through the items in LIFO order. * * @return an iterator to this stack that iterates through the items in LIFO order */
Returns an iterator to this stack that iterates through the items in LIFO order
iterator
{ "repo_name": "haroldthimbleby/relit", "path": "java/Stack.java", "license": "mit", "size": 5407 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,495,929
//---------------------------------------------------------------------------- private IClonedObject clonePreprocessor(IDestinationPosition position, boolean adoptContent, boolean generateReturnValue, PropertyKeysContainer propertyKeysContainer) throws CloneException{ try { ITextService service = document.ge...
IClonedObject function(IDestinationPosition position, boolean adoptContent, boolean generateReturnValue, PropertyKeysContainer propertyKeysContainer) throws CloneException{ try { ITextService service = document.getTextService(); ITextContentService contentService = service.getTextContentService(); if (contentService !=...
/** * This methods clones the stored information to the submitted position (destination). * * @param position the destination position * @param adoptContent indicated if the content of the object should be adopted * @param generateReturnValue indicates weahter the return value will be generate or be n...
This methods clones the stored information to the submitted position (destination)
clonePreprocessor
{ "repo_name": "LibreOffice/noa-libre", "path": "src/ag/ion/bion/officelayer/internal/text/ParagraphCloneService.java", "license": "lgpl-2.1", "size": 16466 }
[ "ag.ion.bion.officelayer.beans.IPropertyStore", "ag.ion.bion.officelayer.beans.PropertyKeysContainer", "ag.ion.bion.officelayer.clone.CloneException", "ag.ion.bion.officelayer.clone.ClonedObject", "ag.ion.bion.officelayer.clone.IClonedObject", "ag.ion.bion.officelayer.clone.IDestinationPosition", "ag.io...
import ag.ion.bion.officelayer.beans.IPropertyStore; import ag.ion.bion.officelayer.beans.PropertyKeysContainer; import ag.ion.bion.officelayer.clone.CloneException; import ag.ion.bion.officelayer.clone.ClonedObject; import ag.ion.bion.officelayer.clone.IClonedObject; import ag.ion.bion.officelayer.clone.IDestinationPo...
import ag.ion.bion.officelayer.beans.*; import ag.ion.bion.officelayer.clone.*; import ag.ion.bion.officelayer.text.*;
[ "ag.ion.bion" ]
ag.ion.bion;
831,358
public TextBox getColorValueBox() { return m_textboxColorValue; }
TextBox function() { return m_textboxColorValue; }
/** * Returns the color value textbox.<p> * * @return the color value textbox * */
Returns the color value textbox
getColorValueBox
{ "repo_name": "ggiudetti/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/input/CmsColorPicker.java", "license": "lgpl-2.1", "size": 15157 }
[ "com.google.gwt.user.client.ui.TextBox" ]
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
931,198
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<CustomIpPrefixInner>> listByResourceGroupSinglePageAsync( String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalAr...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<CustomIpPrefixInner>> function( String resourceGroupName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException...
/** * Gets all custom IP prefixes in a resource group. * * @param resourceGroupName The name of the resource group. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thro...
Gets all custom IP prefixes in a resource group
listByResourceGroupSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/CustomIpPrefixesClientImpl.java", "license": "mit", "size": 73943 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.CustomIpPrefixInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.CustomIpPrefixInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,103,104
public void remove(final ZonedDateTime expirationDate) { val time = DateTimeUtils.dateOf(expirationDate).getTime(); val queries = List.of(DynamoDbQueryBuilder.builder() .key(ColumnNames.EXPIRATION_DATE.getColumnName()) .operator(ComparisonOperator.LE) .attributeVa...
void function(final ZonedDateTime expirationDate) { val time = DateTimeUtils.dateOf(expirationDate).getTime(); val queries = List.of(DynamoDbQueryBuilder.builder() .key(ColumnNames.EXPIRATION_DATE.getColumnName()) .operator(ComparisonOperator.LE) .attributeValue(List.of(AttributeValue.builder().s(String.valueOf(time))....
/** * Remove expired records. * * @param expirationDate the exp date */
Remove expired records
remove
{ "repo_name": "apereo/cas", "path": "support/cas-server-support-trusted-mfa-dynamodb/src/main/java/org/apereo/cas/trusted/authentication/storage/DynamoDbMultifactorTrustEngineFacilitator.java", "license": "apache-2.0", "size": 11224 }
[ "java.time.ZonedDateTime", "java.util.List", "org.apereo.cas.dynamodb.DynamoDbQueryBuilder", "org.apereo.cas.dynamodb.DynamoDbTableUtils", "org.apereo.cas.util.DateTimeUtils", "software.amazon.awssdk.services.dynamodb.model.AttributeValue", "software.amazon.awssdk.services.dynamodb.model.ComparisonOpera...
import java.time.ZonedDateTime; import java.util.List; import org.apereo.cas.dynamodb.DynamoDbQueryBuilder; import org.apereo.cas.dynamodb.DynamoDbTableUtils; import org.apereo.cas.util.DateTimeUtils; import software.amazon.awssdk.services.dynamodb.model.AttributeValue; import software.amazon.awssdk.services.dynamodb.m...
import java.time.*; import java.util.*; import org.apereo.cas.dynamodb.*; import org.apereo.cas.util.*; import software.amazon.awssdk.services.dynamodb.model.*;
[ "java.time", "java.util", "org.apereo.cas", "software.amazon.awssdk" ]
java.time; java.util; org.apereo.cas; software.amazon.awssdk;
2,902,962
public static int strcmp(StringValue a, StringValue b) { int aLen = a.length(); int bLen = b.length(); for (int i = 0; i < aLen && i < bLen; i++) { char chA = a.charAt(i); char chB = b.charAt(i); if (chA == chB) continue; if (chA == chB) continue; else if...
static int function(StringValue a, StringValue b) { int aLen = a.length(); int bLen = b.length(); for (int i = 0; i < aLen && i < bLen; i++) { char chA = a.charAt(i); char chB = b.charAt(i); if (chA == chB) continue; if (chA == chB) continue; else if (chA < chB) return -1; else return 1; } if (aLen == bLen) return 0; e...
/** * Case-sensitive comparison * * @param a left value * @param b right value * @return -1, 0, or 1 */
Case-sensitive comparison
strcmp
{ "repo_name": "smba/oak", "path": "quercus/src/main/java/com/caucho/quercus/lib/string/StringModule.java", "license": "lgpl-3.0", "size": 155187 }
[ "com.caucho.quercus.env.StringValue" ]
import com.caucho.quercus.env.StringValue;
import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
1,022,252
public List<BookmarkedURL> getBookmarkedURLs() throws NoResponseException, XMPPErrorException, NotConnectedException { retrieveBookmarks(); return Collections.unmodifiableList(bookmarks.getBookmarkedURLS()); }
List<BookmarkedURL> function() throws NoResponseException, XMPPErrorException, NotConnectedException { retrieveBookmarks(); return Collections.unmodifiableList(bookmarks.getBookmarkedURLS()); }
/** * Returns an unmodifiable collection of all bookmarked urls. * * @return returns an unmodifiable collection of all bookmarked urls. * @throws XMPPErrorException thrown when there is a problem retriving bookmarks from the server. * @throws NoResponseException if there was no response from th...
Returns an unmodifiable collection of all bookmarked urls
getBookmarkedURLs
{ "repo_name": "Soo000/SooChat", "path": "src/org/jivesoftware/smackx/bookmarks/BookmarkManager.java", "license": "apache-2.0", "size": 10135 }
[ "java.util.Collections", "java.util.List", "org.jivesoftware.smack.SmackException", "org.jivesoftware.smack.XMPPException" ]
import java.util.Collections; import java.util.List; import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException;
import java.util.*; import org.jivesoftware.smack.*;
[ "java.util", "org.jivesoftware.smack" ]
java.util; org.jivesoftware.smack;
2,877,901
@WebMethod @WebResult(name="status") public CertificadoStatus validarCertificado( @WebParam(name="certificado") String content);
@WebResult(name=STR) CertificadoStatus function( @WebParam(name=STR) String content);
/** * Valida um certificado digital. * @param content Conteudo de um certificado, codificado em Base64. * @return Status do certificado. */
Valida um certificado digital
validarCertificado
{ "repo_name": "robsonsmartins/fiap-mba-java-projects", "path": "source/tcc.fiap.jboss7/SICidCommon/src/sicid/ws/ISICidService.java", "license": "gpl-3.0", "size": 1411 }
[ "javax.jws.WebParam", "javax.jws.WebResult" ]
import javax.jws.WebParam; import javax.jws.WebResult;
import javax.jws.*;
[ "javax.jws" ]
javax.jws;
2,282,534
public SVGDocument getBrokenLinkDocument(Element e, String url, String message) { throw new BridgeException(ctx, e, ErrorConstants.ERR_URI_IMAGE_BROKEN, new Object[] {url, message })...
SVGDocument function(Element e, String url, String message) { throw new BridgeException(ctx, e, ErrorConstants.ERR_URI_IMAGE_BROKEN, new Object[] {url, message }); }
/** * This Implementation simply throws a BridgeException. * * @param e The &lt;image&gt; element that can't be loaded. * @param url The resolved url that can't be loaded. * @param message As best as can be determined the reason it can't be * loaded (not available, corrupt...
This Implementation simply throws a BridgeException
getBrokenLinkDocument
{ "repo_name": "apache/batik", "path": "batik-bridge/src/main/java/org/apache/batik/bridge/UserAgentAdapter.java", "license": "apache-2.0", "size": 13191 }
[ "org.w3c.dom.Element", "org.w3c.dom.svg.SVGDocument" ]
import org.w3c.dom.Element; import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.*; import org.w3c.dom.svg.*;
[ "org.w3c.dom" ]
org.w3c.dom;
86,550
@Autowired(required = false) @Qualifier("structureAttributeIncorporationComponent") public void setStructureAttributeIncorporationComponent( StAXPipelineComponent attributeIncorporationComponent) { this.attributeIncorporationComponent = attributeIncorporationComponent; } pr...
@Autowired(required = false) @Qualifier(STR) void function( StAXPipelineComponent attributeIncorporationComponent) { this.attributeIncorporationComponent = attributeIncorporationComponent; } private IPortalRequestUtils portalRequestUtils;
/** * Auto-wires in the structureAttributeIncorporationComponent when available. Annotated as not * required because portlet detects and treats as a runtime (rather than * component-initialization-time) error failure to find dependencies. * * @param attributeIncorporationComponent */
Auto-wires in the structureAttributeIncorporationComponent when available. Annotated as not required because portlet detects and treats as a runtime (rather than component-initialization-time) error failure to find dependencies
setStructureAttributeIncorporationComponent
{ "repo_name": "stalele/uPortal", "path": "uPortal-portlets/src/main/java/org/apereo/portal/portlets/sitemap/SitemapPortletController.java", "license": "apache-2.0", "size": 7412 }
[ "org.apereo.portal.rendering.StAXPipelineComponent", "org.apereo.portal.url.IPortalRequestUtils", "org.springframework.beans.factory.annotation.Autowired", "org.springframework.beans.factory.annotation.Qualifier" ]
import org.apereo.portal.rendering.StAXPipelineComponent; import org.apereo.portal.url.IPortalRequestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier;
import org.apereo.portal.rendering.*; import org.apereo.portal.url.*; import org.springframework.beans.factory.annotation.*;
[ "org.apereo.portal", "org.springframework.beans" ]
org.apereo.portal; org.springframework.beans;
94,935
protected IndexShard newShard(boolean primary) throws IOException { ShardRouting shardRouting = TestShardRouting.newShardRouting(new ShardId("index", "_na_", 0), randomAlphaOfLength(10), primary, ShardRoutingState.INITIALIZING, primary ? RecoverySource.StoreRecoverySource.EMPTY_STORE...
IndexShard function(boolean primary) throws IOException { ShardRouting shardRouting = TestShardRouting.newShardRouting(new ShardId("index", "_na_", 0), randomAlphaOfLength(10), primary, ShardRoutingState.INITIALIZING, primary ? RecoverySource.StoreRecoverySource.EMPTY_STORE_INSTANCE : RecoverySource.PeerRecoverySource....
/** * creates a new initializing shard. The shard will have its own unique data path. * * @param primary indicates whether to a primary shard (ready to recover from an empty store) or a replica * (ready to recover from another shard) */
creates a new initializing shard. The shard will have its own unique data path
newShard
{ "repo_name": "s1monw/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/index/shard/IndexShardTestCase.java", "license": "apache-2.0", "size": 32163 }
[ "java.io.IOException", "org.elasticsearch.cluster.routing.RecoverySource", "org.elasticsearch.cluster.routing.ShardRouting", "org.elasticsearch.cluster.routing.ShardRoutingState", "org.elasticsearch.cluster.routing.TestShardRouting" ]
import java.io.IOException; import org.elasticsearch.cluster.routing.RecoverySource; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.cluster.routing.ShardRoutingState; import org.elasticsearch.cluster.routing.TestShardRouting;
import java.io.*; import org.elasticsearch.cluster.routing.*;
[ "java.io", "org.elasticsearch.cluster" ]
java.io; org.elasticsearch.cluster;
1,660,402
//----------------------------------------------------------------------- public void testConstructor_Object() throws Throwable { Date date = new Date(TEST_TIME1); Instant test = new Instant(date); assertEquals(ISOChronology.getInstanceUTC(), test.getChronology()); assertEquals(...
void function() throws Throwable { Date date = new Date(TEST_TIME1); Instant test = new Instant(date); assertEquals(ISOChronology.getInstanceUTC(), test.getChronology()); assertEquals(TEST_TIME1, test.getMillis()); }
/** * Test constructor (Object) */
Test constructor (Object)
testConstructor_Object
{ "repo_name": "JodaOrg/joda-time", "path": "src/test/java/org/joda/time/TestInstant_Constructors.java", "license": "apache-2.0", "size": 7977 }
[ "java.util.Date", "org.joda.time.chrono.ISOChronology" ]
import java.util.Date; import org.joda.time.chrono.ISOChronology;
import java.util.*; import org.joda.time.chrono.*;
[ "java.util", "org.joda.time" ]
java.util; org.joda.time;
239,186
protected ModelAndView handleMissingServletRequestPartException(MissingServletRequestPartException ex, HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { response.sendError(HttpServletResponse.SC_BAD_REQUEST, ex.getMessage()); return new ModelAndView(); }
ModelAndView function(MissingServletRequestPartException ex, HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { response.sendError(HttpServletResponse.SC_BAD_REQUEST, ex.getMessage()); return new ModelAndView(); }
/** * Handle the case where an {@linkplain RequestPart @RequestPart}, a {@link MultipartFile}, * or a {@code javax.servlet.http.Part} argument is required but is missing. * An HTTP 400 error is sent back to the client. * @param request current HTTP request * @param response current HTTP response * @param ha...
Handle the case where an RequestPart @RequestPart, a <code>MultipartFile</code>, or a javax.servlet.http.Part argument is required but is missing. An HTTP 400 error is sent back to the client
handleMissingServletRequestPartException
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.webmvc/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java", "license": "mit", "size": 22772 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.web.multipart.support.MissingServletRequestPartException", "org.springframework.web.servlet.ModelAndView" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.multipart.support.MissingServletRequestPartException; import org.springframework.web.servlet.ModelAndView;
import java.io.*; import javax.servlet.http.*; import org.springframework.web.multipart.support.*; import org.springframework.web.servlet.*;
[ "java.io", "javax.servlet", "org.springframework.web" ]
java.io; javax.servlet; org.springframework.web;
1,594,681
public void incrementWater(View view) { if (mToast != null) mToast.cancel(); mToast = Toast.makeText(this, R.string.water_chug_toast, Toast.LENGTH_SHORT); mToast.show(); Intent incrementWaterCountIntent = new Intent(this, WaterReminderIntentService.class); incrementWaterCoun...
void function(View view) { if (mToast != null) mToast.cancel(); mToast = Toast.makeText(this, R.string.water_chug_toast, Toast.LENGTH_SHORT); mToast.show(); Intent incrementWaterCountIntent = new Intent(this, WaterReminderIntentService.class); incrementWaterCountIntent.setAction(ReminderTasks.ACTION_INCREMENT_WATER_COU...
/** * Adds one to the water count and shows a toast */
Adds one to the water count and shows a toast
incrementWater
{ "repo_name": "Madeyedexter/ud851-exercises-student", "path": "Lesson10-Hydration-Reminder/T10.05-Exercise-ChargingBroadcastReceiver/app/src/main/java/com/example/android/background/MainActivity.java", "license": "apache-2.0", "size": 7155 }
[ "android.content.Intent", "android.view.View", "android.widget.Toast", "com.example.android.background.sync.ReminderTasks", "com.example.android.background.sync.WaterReminderIntentService" ]
import android.content.Intent; import android.view.View; import android.widget.Toast; import com.example.android.background.sync.ReminderTasks; import com.example.android.background.sync.WaterReminderIntentService;
import android.content.*; import android.view.*; import android.widget.*; import com.example.android.background.sync.*;
[ "android.content", "android.view", "android.widget", "com.example.android" ]
android.content; android.view; android.widget; com.example.android;
277,830
try { DependencyModelFactory theDependencyModelFactory = (DependencyModelFactory) EPackage.Registry.INSTANCE.getEFactory(DependencyModelPackage.eNS_URI); if (theDependencyModelFactory != null) { return theDependencyModelFactory; } } catch (Exception exception) { ...
try { DependencyModelFactory theDependencyModelFactory = (DependencyModelFactory) EPackage.Registry.INSTANCE.getEFactory(DependencyModelPackage.eNS_URI); if (theDependencyModelFactory != null) { return theDependencyModelFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new Depende...
/** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
Creates the default factory implementation.
init
{ "repo_name": "sourcepit/maven-dependency-model", "path": "gen/main/emf/org/sourcepit/maven/dependency/model/impl/DependencyModelFactoryImpl.java", "license": "apache-2.0", "size": 4110 }
[ "org.eclipse.emf.ecore.EPackage", "org.eclipse.emf.ecore.plugin.EcorePlugin", "org.sourcepit.maven.dependency.model.DependencyModelFactory", "org.sourcepit.maven.dependency.model.DependencyModelPackage" ]
import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.plugin.EcorePlugin; import org.sourcepit.maven.dependency.model.DependencyModelFactory; import org.sourcepit.maven.dependency.model.DependencyModelPackage;
import org.eclipse.emf.ecore.*; import org.eclipse.emf.ecore.plugin.*; import org.sourcepit.maven.dependency.model.*;
[ "org.eclipse.emf", "org.sourcepit.maven" ]
org.eclipse.emf; org.sourcepit.maven;
1,359,122
@Override public Collection<String> getMenuCategories() { return null; }
Collection<String> function() { return null; }
/** * This is the list of menu categories this gui component will be available * under. This implementation returns null, since the TestPlan appears at * the top level of the tree and cannot be added elsewhere. * * @return a Collection of Strings, where each element is one of the * ...
This is the list of menu categories this gui component will be available under. This implementation returns null, since the TestPlan appears at the top level of the tree and cannot be added elsewhere
getMenuCategories
{ "repo_name": "saketh7/Jmeter", "path": "src/reports/org/apache/jmeter/control/gui/ReportGui.java", "license": "apache-2.0", "size": 6948 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,208,261
Long installEgressTablePassThroughDefaultRule(final DatapathId dpid) throws SwitchOperationException;
Long installEgressTablePassThroughDefaultRule(final DatapathId dpid) throws SwitchOperationException;
/** * Install default pass through rule for pre egress table. * * @param dpid datapathId of the switch * @return cookie id * @throws SwitchOperationException Switch not found */
Install default pass through rule for pre egress table
installEgressTablePassThroughDefaultRule
{ "repo_name": "telstra/open-kilda", "path": "src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/switchmanager/ISwitchManager.java", "license": "apache-2.0", "size": 28894 }
[ "org.openkilda.floodlight.error.SwitchOperationException", "org.projectfloodlight.openflow.types.DatapathId" ]
import org.openkilda.floodlight.error.SwitchOperationException; import org.projectfloodlight.openflow.types.DatapathId;
import org.openkilda.floodlight.error.*; import org.projectfloodlight.openflow.types.*;
[ "org.openkilda.floodlight", "org.projectfloodlight.openflow" ]
org.openkilda.floodlight; org.projectfloodlight.openflow;
1,562,308
@Override public void flush() throws IOException { backupStream.flush(); }
void function() throws IOException { backupStream.flush(); }
/** * Flush the local backing stream. * This does not trigger a flush of data to the remote blobstore. * @throws IOException */
Flush the local backing stream. This does not trigger a flush of data to the remote blobstore
flush
{ "repo_name": "songweijia/fffs", "path": "sources/hadoop-2.4.1-src/hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/snative/SwiftNativeOutputStream.java", "license": "apache-2.0", "size": 12536 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,892,832
public RexNode makeFieldAccess( RexNode expr, int i) { final RelDataType type = expr.getType(); final List<RelDataTypeField> fields = type.getFieldList(); if ((i < 0) || (i >= fields.size())) { throw new AssertionError("Field ordinal " + i + " is invalid for " + " type '" + typ...
RexNode function( RexNode expr, int i) { final RelDataType type = expr.getType(); final List<RelDataTypeField> fields = type.getFieldList(); if ((i < 0) (i >= fields.size())) { throw new AssertionError(STR + i + STR + STR + type + "'"); } return makeFieldAccessInternal(expr, fields.get(i)); }
/** * Creates an expression accessing a field with a given ordinal from a * record. * * @param expr Expression yielding a record * @param i Ordinal of field * @return Expression accessing given field */
Creates an expression accessing a field with a given ordinal from a record
makeFieldAccess
{ "repo_name": "arina-ielchiieva/calcite", "path": "core/src/main/java/org/apache/calcite/rex/RexBuilder.java", "license": "apache-2.0", "size": 51398 }
[ "java.util.List", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeField" ]
import java.util.List; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField;
import java.util.*; import org.apache.calcite.rel.type.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
727,715
private static Map<Long, String> getEntityNameMap() throws SQLException { Map<Long, String> entityNameMap = new HashMap<Long, String>(); ResultSet rs = stmt .executeQuery("select IDENTIFIER, NAME from dyextn_abstract_metadata WHERE CREATED_DATE IS NOT NULL"); while (rs.next()) { entityNameMap....
static Map<Long, String> function() throws SQLException { Map<Long, String> entityNameMap = new HashMap<Long, String>(); ResultSet rs = stmt .executeQuery(STR); while (rs.next()) { entityNameMap.put(rs.getLong(1), rs.getString(2)); } rs.close(); return entityNameMap; }
/** * Create map of entity id verses entity Name. * @return The map of entity id verses entity Name. * @throws SQLException */
Create map of entity id verses entity Name
getEntityNameMap
{ "repo_name": "NCIP/cab2b", "path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/util/global/QueryMetadataCleanup.java", "license": "bsd-3-clause", "size": 6682 }
[ "java.sql.ResultSet", "java.sql.SQLException", "java.util.HashMap", "java.util.Map" ]
import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashMap; import java.util.Map;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,890,196
@Nullable List<DiffFragment> getInnerFragments();
List<DiffFragment> getInnerFragments();
/** * High-granularity changes inside line fragment (ex: detected by ByWord) * Offsets of inner changes are relative to the start of LineFragment. * * null - no inner similarities was found */
High-granularity changes inside line fragment (ex: detected by ByWord) Offsets of inner changes are relative to the start of LineFragment. null - no inner similarities was found
getInnerFragments
{ "repo_name": "consulo/consulo", "path": "modules/base/diff-api/src/main/java/com/intellij/diff/fragments/LineFragment.java", "license": "apache-2.0", "size": 1109 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
940,542
if (!Files.exists(path)) { throw new FileNotFoundException(path.toString()); } if (Files.isDirectory(path)) { return new GtfsUnarchivedInput(path); } if (path.getFileSystem().equals(FileSystems.getDefault())) { // Read from a local ZIP file. return new GtfsZipFileInput(new ZipFil...
if (!Files.exists(path)) { throw new FileNotFoundException(path.toString()); } if (Files.isDirectory(path)) { return new GtfsUnarchivedInput(path); } if (path.getFileSystem().equals(FileSystems.getDefault())) { return new GtfsZipFileInput(new ZipFile(path.toFile())); } return new GtfsZipFileInput( new ZipFile(new Seeka...
/** * Creates a specific GtfsInput to read data from the given path. * * @param path the path to the resource * @return the {@code GtfsInput} created after processing the GTFS archive * @throws IOException any IO exception that occurred during loading */
Creates a specific GtfsInput to read data from the given path
createFromPath
{ "repo_name": "MobilityData/gtfs-validator", "path": "core/src/main/java/org/mobilitydata/gtfsvalidator/input/GtfsInput.java", "license": "apache-2.0", "size": 5585 }
[ "java.io.FileNotFoundException", "java.nio.file.FileSystems", "java.nio.file.Files", "org.apache.commons.compress.archivers.zip.ZipFile", "org.apache.commons.compress.utils.SeekableInMemoryByteChannel" ]
import java.io.FileNotFoundException; import java.nio.file.FileSystems; import java.nio.file.Files; import org.apache.commons.compress.archivers.zip.ZipFile; import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;
import java.io.*; import java.nio.file.*; import org.apache.commons.compress.archivers.zip.*; import org.apache.commons.compress.utils.*;
[ "java.io", "java.nio", "org.apache.commons" ]
java.io; java.nio; org.apache.commons;
559,594
public DirectoryManager getDirectoryManager() { return directoryManager; } /** * Gets the {@link ResourceLoaderManager}
DirectoryManager function() { return directoryManager; } /** * Gets the {@link ResourceLoaderManager}
/** * Returns the directory manager */
Returns the directory manager
getDirectoryManager
{ "repo_name": "kuhnmi/jukefox", "path": "JukefoxModel/src/ch/ethz/dcg/jukefox/model/AbstractCollectionModelManager.java", "license": "gpl-3.0", "size": 8930 }
[ "ch.ethz.dcg.jukefox.manager.DirectoryManager", "ch.ethz.dcg.jukefox.manager.ResourceLoaderManager" ]
import ch.ethz.dcg.jukefox.manager.DirectoryManager; import ch.ethz.dcg.jukefox.manager.ResourceLoaderManager;
import ch.ethz.dcg.jukefox.manager.*;
[ "ch.ethz.dcg" ]
ch.ethz.dcg;
1,535,909
public static Date parseHttpDate(CharSequence txt) { return parseHttpDate(txt, 0, txt.length()); } /** * Parse some text into a {@link Date}, according to RFC6265 * @param txt text to parse * @param start the start index inside {@code txt} * @param end the end index inside {@cod...
static Date function(CharSequence txt) { return parseHttpDate(txt, 0, txt.length()); } /** * Parse some text into a {@link Date}, according to RFC6265 * @param txt text to parse * @param start the start index inside {@code txt} * @param end the end index inside {@code txt}
/** * Parse some text into a {@link Date}, according to RFC6265 * @param txt text to parse * @return a {@link Date}, or null if text couldn't be parsed */
Parse some text into a <code>Date</code>, according to RFC6265
parseHttpDate
{ "repo_name": "fenik17/netty", "path": "codec/src/main/java/io/netty/handler/codec/DateFormatter.java", "license": "apache-2.0", "size": 15315 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
393,875
private static GridSqlElement elementOrDefault(GridSqlElement el, GridSqlColumn col) { if (el == null) return GridSqlConst.NULL; if (el != GridSqlKeyword.DEFAULT) return el; Column h2Col = col.column(); Expression dfltExpr = h2Col.getDefaultExpression(); ...
static GridSqlElement function(GridSqlElement el, GridSqlColumn col) { if (el == null) return GridSqlConst.NULL; if (el != GridSqlKeyword.DEFAULT) return el; Column h2Col = col.column(); Expression dfltExpr = h2Col.getDefaultExpression(); Value dfltVal; try { dfltVal = dfltExpr != null ? dfltExpr.getValue(null) : null;...
/** * Do what we can to compute default value for this column (mimics H2 behavior). * @see Table#getDefaultValue * @see Column#validateConvertUpdateSequence * @param el SQL element. * @param col Column. * @return {@link GridSqlConst#NULL}, if {@code el} is null, or {@code el} if * it'...
Do what we can to compute default value for this column (mimics H2 behavior)
elementOrDefault
{ "repo_name": "amirakhmedov/ignite", "path": "modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/dml/DmlAstUtils.java", "license": "apache-2.0", "size": 22175 }
[ "org.apache.ignite.internal.processors.query.IgniteSQLException", "org.apache.ignite.internal.processors.query.h2.sql.GridSqlColumn", "org.apache.ignite.internal.processors.query.h2.sql.GridSqlConst", "org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement", "org.apache.ignite.internal.processors...
import org.apache.ignite.internal.processors.query.IgniteSQLException; import org.apache.ignite.internal.processors.query.h2.sql.GridSqlColumn; import org.apache.ignite.internal.processors.query.h2.sql.GridSqlConst; import org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement; import org.apache.ignite.inter...
import org.apache.ignite.internal.processors.query.*; import org.apache.ignite.internal.processors.query.h2.sql.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.h2.expression.*; import org.h2.table.*; import org.h2.value.*;
[ "org.apache.ignite", "org.h2.expression", "org.h2.table", "org.h2.value" ]
org.apache.ignite; org.h2.expression; org.h2.table; org.h2.value;
731,840
public List<ComponentDto> selectByProjectUuid(String projectUuid, DbSession dbSession) { return mapper(dbSession).selectByProjectUuid(projectUuid); }
List<ComponentDto> function(String projectUuid, DbSession dbSession) { return mapper(dbSession).selectByProjectUuid(projectUuid); }
/** * Retrieves all components with a specific root project Uuid, no other filtering is done by this method. * * Used by Views plugin */
Retrieves all components with a specific root project Uuid, no other filtering is done by this method. Used by Views plugin
selectByProjectUuid
{ "repo_name": "abbeyj/sonarqube", "path": "sonar-db/src/main/java/org/sonar/db/component/ComponentDao.java", "license": "lgpl-3.0", "size": 11726 }
[ "java.util.List", "org.sonar.db.DbSession" ]
import java.util.List; import org.sonar.db.DbSession;
import java.util.*; import org.sonar.db.*;
[ "java.util", "org.sonar.db" ]
java.util; org.sonar.db;
2,048,236
protected void emit_XImportDeclaration_SemicolonKeyword_2_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
/** * Syntax: * ';'? */
Syntax: ';'
emit_XImportDeclaration_SemicolonKeyword_2_q
{ "repo_name": "adrian-herscu/experiments", "path": "language-workbenches/xtext/org.example.domainmodel/src-gen/org/example/domainmodel/serializer/DomainmodelSyntacticSequencer.java", "license": "apache-2.0", "size": 7461 }
[ "java.util.List", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.nodemodel.INode", "org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider" ]
import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
1,414,767
public void setContainerHLAnnotationHLAPI( HLAnnotationHLAPI elem);
void function( HLAnnotationHLAPI elem);
/** * set ContainerHLAnnotation */
set ContainerHLAnnotation
setContainerHLAnnotationHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/terms/hlapi/TermHLAPI.java", "license": "epl-1.0", "size": 4999 }
[ "fr.lip6.move.pnml.symmetricnet.hlcorestructure.hlapi.HLAnnotationHLAPI" ]
import fr.lip6.move.pnml.symmetricnet.hlcorestructure.hlapi.HLAnnotationHLAPI;
import fr.lip6.move.pnml.symmetricnet.hlcorestructure.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,095,644
public final List<RRSet> getRrSets() { return rrSets; }
final List<RRSet> function() { return rrSets; }
/** * Get RR sets. * * @return the rrSets */
Get RR sets
getRrSets
{ "repo_name": "ultradns/java_rest_api_client", "path": "src/main/java/biz/neustar/ultra/rest/dto/ExportedZone.java", "license": "apache-2.0", "size": 3565 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,881,360
private void connect(String playerId) { MpdPlayerConfig config = null; try { config = playerConfigCache.get(playerId); if (config != null && config.instance == null) { MPD mpd = new MPD(config.host, config.port, CONNECTION_TIMEOUT); MPDStandAloneMonitor mpdStan...
void function(String playerId) { MpdPlayerConfig config = null; try { config = playerConfigCache.get(playerId); if (config != null && config.instance == null) { MPD mpd = new MPD(config.host, config.port, CONNECTION_TIMEOUT); MPDStandAloneMonitor mpdStandAloneMonitor = new MPDStandAloneMonitor(mpd, 500); mpdStandAloneM...
/** * Connects the player <code>playerId</code> to the given <code>host</code> * and <code>port</code> and registers this binding as MPD-Event listener. * * @param playerId * @param host * @param port */
Connects the player <code>playerId</code> to the given <code>host</code> and <code>port</code> and registers this binding as MPD-Event listener
connect
{ "repo_name": "ANierbeck/bcanhome-openhab", "path": "bundles/binding/org.openhab.binding.mpd/src/main/java/org/openhab/binding/mpd/internal/MpdBinding.java", "license": "gpl-3.0", "size": 16647 }
[ "java.net.UnknownHostException", "org.bff.javampd.exception.MPDConnectionException", "org.bff.javampd.monitor.MPDStandAloneMonitor" ]
import java.net.UnknownHostException; import org.bff.javampd.exception.MPDConnectionException; import org.bff.javampd.monitor.MPDStandAloneMonitor;
import java.net.*; import org.bff.javampd.exception.*; import org.bff.javampd.monitor.*;
[ "java.net", "org.bff.javampd" ]
java.net; org.bff.javampd;
78,939
EClass getAuto_connect();
EClass getAuto_connect();
/** * Returns the meta object for class '{@link gluemodel.COSEM.InterfaceClasses.Auto_connect <em>Auto connect</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Auto connect</em>'. * @see gluemodel.COSEM.InterfaceClasses.Auto_connect * @generated */
Returns the meta object for class '<code>gluemodel.COSEM.InterfaceClasses.Auto_connect Auto connect</code>'.
getAuto_connect
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/COSEM/InterfaceClasses/InterfaceClassesPackage.java", "license": "mit", "size": 201104 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,804,364
private void load() { FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/layout/player_select.fxml")); fxmlLoader.setResources(GUI_STRINGS); fxmlLoader.setRoot(this); fxmlLoader.setController(this); try { fxmlLoader.load(); ...
void function() { FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(STR)); fxmlLoader.setResources(GUI_STRINGS); fxmlLoader.setRoot(this); fxmlLoader.setController(this); try { fxmlLoader.load(); } catch (IOException exception) { throw new RuntimeException(exception); } }
/** * Loads the layout. */
Loads the layout
load
{ "repo_name": "ttaomae/ConnectN", "path": "local/src/main/java/ttaomae/connectn/local/gui/PlayerSelectControl.java", "license": "bsd-2-clause", "size": 4591 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
370,747
@Test public void httpContentLengthErrorTest() throws TimeoutException, NoSuchFieldException, IllegalAccessException { mSocket.setSocketTimeout(TestCommon.DEFAULT_SOCKET_TIMEOUT); mNoCheckMessage = false; final List<ISpeedTestListener> listenerList = initErrorListener(SpeedTestError.INV...
void function() throws TimeoutException, NoSuchFieldException, IllegalAccessException { mSocket.setSocketTimeout(TestCommon.DEFAULT_SOCKET_TIMEOUT); mNoCheckMessage = false; final List<ISpeedTestListener> listenerList = initErrorListener(SpeedTestError.INVALID_HTTP_RESPONSE); mForceStop = false; final HttpFrame frame =...
/** * Test http content length error. */
Test http content length error
httpContentLengthErrorTest
{ "repo_name": "bertrandmartel/speed-test-lib", "path": "jspeedtest/src/test/java/fr/bmartel/speedtest/test/SpeedTestErrorTest.java", "license": "mit", "size": 15110 }
[ "fr.bmartel.protocol.http.HttpFrame", "fr.bmartel.protocol.http.constants.HttpHeader", "fr.bmartel.speedtest.inter.ISpeedTestListener", "fr.bmartel.speedtest.model.SpeedTestError", "fr.bmartel.speedtest.test.utils.SpeedTestUtils", "fr.bmartel.speedtest.test.utils.TestCommon", "java.util.HashMap", "jav...
import fr.bmartel.protocol.http.HttpFrame; import fr.bmartel.protocol.http.constants.HttpHeader; import fr.bmartel.speedtest.inter.ISpeedTestListener; import fr.bmartel.speedtest.model.SpeedTestError; import fr.bmartel.speedtest.test.utils.SpeedTestUtils; import fr.bmartel.speedtest.test.utils.TestCommon; import java.u...
import fr.bmartel.protocol.http.*; import fr.bmartel.protocol.http.constants.*; import fr.bmartel.speedtest.inter.*; import fr.bmartel.speedtest.model.*; import fr.bmartel.speedtest.test.utils.*; import java.util.*; import java.util.concurrent.*;
[ "fr.bmartel.protocol", "fr.bmartel.speedtest", "java.util" ]
fr.bmartel.protocol; fr.bmartel.speedtest; java.util;
1,685,422
private static InternetAddress[] toInetAddresses(final String val) throws AddressException { if (val == null) { return new InternetAddress[0]; } return InternetAddress.parse(val); }
static InternetAddress[] function(final String val) throws AddressException { if (val == null) { return new InternetAddress[0]; } return InternetAddress.parse(val); }
/** * Creates an array of 0 or more InternetAddresses for the given String * * @param val the String to parse for InternetAddresses * @return an array of 0 or more InetAddresses * @throws AddressException if val contains an invalid address */
Creates an array of 0 or more InternetAddresses for the given String
toInetAddresses
{ "repo_name": "mcgilman/nifi", "path": "nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/notification/email/EmailNotificationService.java", "license": "apache-2.0", "size": 13474 }
[ "javax.mail.internet.AddressException", "javax.mail.internet.InternetAddress" ]
import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress;
import javax.mail.internet.*;
[ "javax.mail" ]
javax.mail;
2,301,021
@Override protected Object autoRange(double minValue, double maxValue, double length, double labelSize) { final Side side = getSide(); final boolean vertical = Side.LEFT.equals(side) || Side.RIGHT.equals(side); // check if we need to force zero into range if (isForceZeroInRange()) { ...
@Override Object function(double minValue, double maxValue, double length, double labelSize) { final Side side = getSide(); final boolean vertical = Side.LEFT.equals(side) Side.RIGHT.equals(side); if (isForceZeroInRange()) { if (maxValue < 0) { maxValue = 0; } else if (minValue > 0) { minValue = 0; } } final double ran...
/** * Called to set the upper and lower bound and anything else that needs to be auto-ranged * * @param minValue The min data value that needs to be plotted on this axis * @param maxValue The max data value that needs to be plotted on this axis * @param length The length of the axis in display ...
Called to set the upper and lower bound and anything else that needs to be auto-ranged
autoRange
{ "repo_name": "FlanFlanagan/cyclist2", "path": "cyclist/src/edu/utah/sci/cyclist/core/ui/components/CyclistNumberAxis.java", "license": "bsd-3-clause", "size": 27331 }
[ "com.sun.javafx.css.converters.SizeConverter" ]
import com.sun.javafx.css.converters.SizeConverter;
import com.sun.javafx.css.converters.*;
[ "com.sun.javafx" ]
com.sun.javafx;
1,232,084
protected void reorderNode( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey parent, Path newPath, ...
void function( String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey parent, Path newPath, Path oldPath, Path reorderedBeforePath ) { }
/** * Handle the reordering of a node. * * @param workspaceName the workspace in which the node information should be available; may not be null * @param key the unique key for the node; may not be null * @param primaryType the primary type of the node; may not be null * @param mixinTypes ...
Handle the reordering of a node
reorderNode
{ "repo_name": "RobSis/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/cache/change/ChangeSetAdapter.java", "license": "apache-2.0", "size": 22156 }
[ "java.util.Set", "org.modeshape.jcr.cache.NodeKey", "org.modeshape.jcr.value.Name", "org.modeshape.jcr.value.Path" ]
import java.util.Set; import org.modeshape.jcr.cache.NodeKey; import org.modeshape.jcr.value.Name; import org.modeshape.jcr.value.Path;
import java.util.*; import org.modeshape.jcr.cache.*; import org.modeshape.jcr.value.*;
[ "java.util", "org.modeshape.jcr" ]
java.util; org.modeshape.jcr;
1,491,593
public void loadTaskListContent(boolean requery) { if (taskAdapter == null) { setUpTaskList(); return; } Cursor taskCursor = taskAdapter.getCursor(); if (requery) { taskCursor.requery(); taskAdapter.flushCaches(); tas...
void function(boolean requery) { if (taskAdapter == null) { setUpTaskList(); return; } Cursor taskCursor = taskAdapter.getCursor(); if (requery) { taskCursor.requery(); taskAdapter.flushCaches(); taskAdapter.notifyDataSetChanged(); } if (getView() != null) { int oldListItemSelected = getListView().getSelectedItemPositi...
/** * Load or re-load action items and update views * * @param requery */
Load or re-load action items and update views
loadTaskListContent
{ "repo_name": "michaltakac/astrid", "path": "astrid/src/com/todoroo/astrid/activity/TaskListFragment.java", "license": "gpl-3.0", "size": 57908 }
[ "android.database.Cursor", "android.widget.ListView" ]
import android.database.Cursor; import android.widget.ListView;
import android.database.*; import android.widget.*;
[ "android.database", "android.widget" ]
android.database; android.widget;
1,373,799
Path getHomedir() { return homedir; }
Path getHomedir() { return homedir; }
/** * Return the directory in which this store stores its * StoreFiles */
Return the directory in which this store stores its StoreFiles
getHomedir
{ "repo_name": "xiaofu/apache-hbase-0.94.10-read", "path": "src/main/java/org/apache/hadoop/hbase/regionserver/Store.java", "license": "apache-2.0", "size": 92873 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
273,699
public final CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { checkIfClosed(); synchronized (getConnectionSynchronization()) { setupContextStack(); try { return factory.newEmbedCallableSt...
final CallableStatement function(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { checkIfClosed(); synchronized (getConnectionSynchronization()) { setupContextStack(); try { return factory.newEmbedCallableStatement(this, sql, setResultSetType(resultSetType), resul...
/** * JDBC 3.0 * * Same as prepareCall() above, but allows the default result set * type, result set concurrency type and result set holdability * to be overridden. * * @param resultSetType a result set type, see ResultSet.TYPE_XXX * @param resultSetConcurrency a concurrency type...
JDBC 3.0 Same as prepareCall() above, but allows the default result set type, result set concurrency type and result set holdability to be overridden
prepareCall
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/impl/jdbc/EmbedConnection.java", "license": "apache-2.0", "size": 142318 }
[ "java.sql.CallableStatement", "java.sql.SQLException" ]
import java.sql.CallableStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,802,379
public long getRemoveAbandonedCount() { try { return createPool().getRemoveAbandonedCount(); } catch (SQLException x) { throw new RuntimeException(x); } }
long function() { try { return createPool().getRemoveAbandonedCount(); } catch (SQLException x) { throw new RuntimeException(x); } }
/** * The total number of connections released by remove abandoned. * @return the PoolCleaner removed abandoned connection count */
The total number of connections released by remove abandoned
getRemoveAbandonedCount
{ "repo_name": "Nickname0806/Test_Q4", "path": "modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java", "license": "apache-2.0", "size": 34115 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,865,227
public boolean authenticate(String digest) { // Perform authentication. Wait for the handshake (with the secret key) String anticipatedDigest = AuthFactory.createDigest(getStreamID().getID(), ConnectionMultiplexerManager.getDefaultSecret()); // Check that the provided handsha...
boolean function(String digest) { String anticipatedDigest = AuthFactory.createDigest(getStreamID().getID(), ConnectionMultiplexerManager.getDefaultSecret()); if (!anticipatedDigest.equalsIgnoreCase(digest)) { Log.debug(STR + getAddress().getDomain()); conn.deliverRawText(new StreamError(StreamError.Condition.not_autho...
/** * Authenticates the connection manager. Shared secret is validated with the one provided * by the connection manager. If everything went fine then the session will have a status * of "authenticated" and the connection manager will receive the client configuration * options. * * @param ...
Authenticates the connection manager. Shared secret is validated with the one provided by the connection manager. If everything went fine then the session will have a status of "authenticated" and the connection manager will receive the client configuration options
authenticate
{ "repo_name": "wudingli/openfire", "path": "src/java/org/jivesoftware/openfire/session/LocalConnectionMultiplexerSession.java", "license": "apache-2.0", "size": 15987 }
[ "org.jivesoftware.openfire.auth.AuthFactory", "org.jivesoftware.openfire.multiplex.ConnectionMultiplexerManager", "org.xmpp.packet.StreamError" ]
import org.jivesoftware.openfire.auth.AuthFactory; import org.jivesoftware.openfire.multiplex.ConnectionMultiplexerManager; import org.xmpp.packet.StreamError;
import org.jivesoftware.openfire.auth.*; import org.jivesoftware.openfire.multiplex.*; import org.xmpp.packet.*;
[ "org.jivesoftware.openfire", "org.xmpp.packet" ]
org.jivesoftware.openfire; org.xmpp.packet;
1,793,677
public com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.v2.MutateRowResponse> mutateRow( com.google.bigtable.v2.MutateRowRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_MUTATE_ROW, getCallOptions()), request); }
com.google.common.util.concurrent.ListenableFuture<com.google.bigtable.v2.MutateRowResponse> function( com.google.bigtable.v2.MutateRowRequest request) { return futureUnaryCall( getChannel().newCall(METHOD_MUTATE_ROW, getCallOptions()), request); }
/** * <pre> * Mutates a row atomically. Cells already present in the row are left * unchanged unless explicitly changed by `mutation`. * </pre> */
<code> Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly changed by `mutation`. </code>
mutateRow
{ "repo_name": "speedycontrol/googleapis", "path": "output/com/google/bigtable/v2/BigtableGrpc.java", "license": "apache-2.0", "size": 24850 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
262,099
public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Obtain other dependent packages EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.ge...
void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); ETypeParameter mtfConfigConsumerEClass_TFC = addETypeParameter(mtfConfigConsumerEClass...
/** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Complete the initialization of the package and its meta-model. This method is guarded to have no affect on any invocation but its first.
initializePackageContents
{ "repo_name": "gregfinley/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/impl/ModelPackageImpl.java", "license": "epl-1.0", "size": 249617 }
[ "com.tinkerforge.BrickDC", "com.tinkerforge.BrickServo", "com.tinkerforge.BrickletAmbientLight", "com.tinkerforge.BrickletBarometer", "com.tinkerforge.BrickletDistanceIR", "com.tinkerforge.BrickletDistanceUS", "com.tinkerforge.BrickletDualRelay", "com.tinkerforge.BrickletHallEffect", "com.tinkerforg...
import com.tinkerforge.BrickDC; import com.tinkerforge.BrickServo; import com.tinkerforge.BrickletAmbientLight; import com.tinkerforge.BrickletBarometer; import com.tinkerforge.BrickletDistanceIR; import com.tinkerforge.BrickletDistanceUS; import com.tinkerforge.BrickletDualRelay; import com.tinkerforge.BrickletHallEff...
import com.tinkerforge.*; import java.math.*; import java.util.concurrent.atomic.*; import org.eclipse.emf.ecore.*; import org.openhab.binding.tinkerforge.internal.config.*; import org.openhab.binding.tinkerforge.internal.model.*; import org.openhab.binding.tinkerforge.internal.types.*; import org.openhab.core.library....
[ "com.tinkerforge", "java.math", "java.util", "org.eclipse.emf", "org.openhab.binding", "org.openhab.core", "org.slf4j" ]
com.tinkerforge; java.math; java.util; org.eclipse.emf; org.openhab.binding; org.openhab.core; org.slf4j;
846,776
Single<Map<V, GeoPosition>> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder);
Single<Map<V, GeoPosition>> radiusWithPosition(V member, double radius, GeoUnit geoUnit, GeoOrder geoOrder);
/** * Returns the geo-position mapped by member. * Members of a sorted set, which are within the * borders of the area specified with the defined member location * and the maximum distance from the defined member location (the radius) * in <code>GeoUnit</code> units with <code>GeoOrder</cod...
Returns the geo-position mapped by member. Members of a sorted set, which are within the borders of the area specified with the defined member location and the maximum distance from the defined member location (the radius) in <code>GeoUnit</code> units with <code>GeoOrder</code> Requires Redis 3.2.10 and higher
radiusWithPosition
{ "repo_name": "mrniko/redisson", "path": "redisson/src/main/java/org/redisson/api/RGeoRx.java", "license": "apache-2.0", "size": 28272 }
[ "io.reactivex.rxjava3.core.Single", "java.util.Map" ]
import io.reactivex.rxjava3.core.Single; import java.util.Map;
import io.reactivex.rxjava3.core.*; import java.util.*;
[ "io.reactivex.rxjava3", "java.util" ]
io.reactivex.rxjava3; java.util;
789,885
@Transactional @Test public void testFindUsers02() { // given truncateDatabase(getEntityManager()); final int offset = 1; final int max = 10; String text = null; String nextToken = Strings.generateOffsetToken(offset, max); User user0 = createDefaultU...
void function() { truncateDatabase(getEntityManager()); final int offset = 1; final int max = 10; String text = null; String nextToken = Strings.generateOffsetToken(offset, max); User user0 = createDefaultUser(); this.userDao.saveUser(user0); User user1 = new User(); user1.setEmail("zz"); user1.setClientid("acme"); use...
/** * testFindUsers02(). * find 2 sets of users */
testFindUsers02(). find 2 sets of users
testFindUsers02
{ "repo_name": "formkiq/formkiq-server", "path": "core/src/test/java/com/formkiq/core/dao/UserDaoImplTest.java", "license": "apache-2.0", "size": 16994 }
[ "com.formkiq.core.domain.User", "com.formkiq.core.domain.type.UserDTO", "com.formkiq.core.domain.type.UserListDTO", "com.formkiq.core.domain.type.UserRole", "com.formkiq.core.domain.type.UserStatus", "com.formkiq.core.util.Strings", "org.junit.Assert" ]
import com.formkiq.core.domain.User; import com.formkiq.core.domain.type.UserDTO; import com.formkiq.core.domain.type.UserListDTO; import com.formkiq.core.domain.type.UserRole; import com.formkiq.core.domain.type.UserStatus; import com.formkiq.core.util.Strings; import org.junit.Assert;
import com.formkiq.core.domain.*; import com.formkiq.core.domain.type.*; import com.formkiq.core.util.*; import org.junit.*;
[ "com.formkiq.core", "org.junit" ]
com.formkiq.core; org.junit;
1,748,850
public Iterator<Map.Entry<Value, Value>> getBaseIterator(Env env) { Set<Map.Entry<Value, Value>> emptySet = Collections.emptySet(); return emptySet.iterator(); }
Iterator<Map.Entry<Value, Value>> function(Env env) { Set<Map.Entry<Value, Value>> emptySet = Collections.emptySet(); return emptySet.iterator(); }
/** * Returns an iterator for the key => value pairs. */
Returns an iterator for the key => value pairs
getBaseIterator
{ "repo_name": "headius/quercus", "path": "src/main/java/com/caucho/quercus/env/Value.java", "license": "gpl-2.0", "size": 57879 }
[ "java.util.Collections", "java.util.Iterator", "java.util.Map", "java.util.Set" ]
import java.util.Collections; import java.util.Iterator; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,209,979
public Intent getHiddenNotificationIntent(int id) { return null; }
Intent function(int id) { return null; }
/** * Return the intent for the hidden notification corresponding to the window * being hidden. * * <p> * The returned intent will be packaged into a {@link PendingIntent} to be * invoked when the user clicks the notification. * * @param id * The id of the hidden window. * @return The i...
Return the intent for the hidden notification corresponding to the window being hidden. The returned intent will be packaged into a <code>PendingIntent</code> to be invoked when the user clicks the notification
getHiddenNotificationIntent
{ "repo_name": "dejavu1988/CopresenceDataCollector", "path": "StandOut/src/wei/mark/standout/StandOutWindow.java", "license": "bsd-3-clause", "size": 60083 }
[ "android.content.Intent" ]
import android.content.Intent;
import android.content.*;
[ "android.content" ]
android.content;
1,016,950
@Test public void testGetJobId_1() throws Exception { SummaryData fixture = new SummaryData(); fixture.setPercentile10(1.0); fixture.setJobId(1); fixture.setVarience(1.0); fixture.setPercentile60(1.0); fixture.setPercentile95(1.0); fixture.setSkewn...
void function() throws Exception { SummaryData fixture = new SummaryData(); fixture.setPercentile10(1.0); fixture.setJobId(1); fixture.setVarience(1.0); fixture.setPercentile60(1.0); fixture.setPercentile95(1.0); fixture.setSkewness(1.0); fixture.setPercentile40(1.0); fixture.setPercentile90(1.0); fixture.setMax(1.0); ...
/** * Run the int getJobId() method test. * * @throws Exception * * @generatedBy CodePro at 12/15/14 1:34 PM */
Run the int getJobId() method test
testGetJobId_1
{ "repo_name": "kevinmcgoldrick/Tank", "path": "data_model/src/test/java/com/intuit/tank/project/SummaryDataTest.java", "license": "epl-1.0", "size": 52832 }
[ "com.intuit.tank.project.SummaryData", "org.junit.Assert" ]
import com.intuit.tank.project.SummaryData; import org.junit.Assert;
import com.intuit.tank.project.*; import org.junit.*;
[ "com.intuit.tank", "org.junit" ]
com.intuit.tank; org.junit;
380,525
public static Test suite() { return new TestSuite(SubsetByExpressionTest.class); }
static Test function() { return new TestSuite(SubsetByExpressionTest.class); }
/** * Returns a test suite. * * @return test suite */
Returns a test suite
suite
{ "repo_name": "runqingz/umple", "path": "Umplificator/UmplifiedProjects/weka-umplified-0/src/test/java/weka/filters/unsupervised/instance/SubsetByExpressionTest.java", "license": "mit", "size": 6549 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
1,312,481
public void seekToPlaying(int milliseconds) { if (this.readyPlayer(this.audioFile)) { this.player.seekTo(milliseconds); Log.d(LOG_TAG, "Send a onStatus update for the new seek"); sendStatusChange(MEDIA_POSITION, null, (milliseconds / 1000.0f)); } else { ...
void function(int milliseconds) { if (this.readyPlayer(this.audioFile)) { this.player.seekTo(milliseconds); Log.d(LOG_TAG, STR); sendStatusChange(MEDIA_POSITION, null, (milliseconds / 1000.0f)); } else { this.seekOnPrepared = milliseconds; } }
/** * Seek or jump to a new time in the track. */
Seek or jump to a new time in the track
seekToPlaying
{ "repo_name": "circular-code/ImageStream", "path": "www/plugins/cordova-plugin-media/src/android/AudioPlayer.java", "license": "mit", "size": 21332 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,693,083
public void removeOIAListener(ScreenOIAListener listener) { if (listeners == null) { return; } listeners.removeElement(listener); }
void function(ScreenOIAListener listener) { if (listeners == null) { return; } listeners.removeElement(listener); }
/** * Remove a iOhioSessionListener from the listener list. * * @param listener The iOhioSessionListener to be removed */
Remove a iOhioSessionListener from the listener list
removeOIAListener
{ "repo_name": "zenovalle/tn5250j", "path": "src/org/tn5250j/framework/tn5250/ScreenOIA.java", "license": "gpl-2.0", "size": 7773 }
[ "org.tn5250j.event.ScreenOIAListener" ]
import org.tn5250j.event.ScreenOIAListener;
import org.tn5250j.event.*;
[ "org.tn5250j.event" ]
org.tn5250j.event;
1,987,445
public String nameOf(Label l) { if (nameMap == null) { nameMap = new HashMap<>(); } String name = nameMap.get(l); if (name == null) { name = createLabelName(l, nameMap.size()); nameMap.put(l, name); } return name; }
String function(Label l) { if (nameMap == null) { nameMap = new HashMap<>(); } String name = nameMap.get(l); if (name == null) { name = createLabelName(l, nameMap.size()); nameMap.put(l, name); } return name; }
/** * Gets a name for a label, creating it if it does not yet exist. By default, the returned name * is only unique with the scope of this assembler. */
Gets a name for a label, creating it if it does not yet exist. By default, the returned name is only unique with the scope of this assembler
nameOf
{ "repo_name": "smarr/GraalCompiler", "path": "graal/com.oracle.graal.asm/src/com/oracle/graal/asm/Assembler.java", "license": "gpl-2.0", "size": 7653 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,299,430
boolean localBarrier(BSPJobID jobId, StaffAttemptID staffId, int superStepCounter, SuperStepReportContainer ssrc);
boolean localBarrier(BSPJobID jobId, StaffAttemptID staffId, int superStepCounter, SuperStepReportContainer ssrc);
/** * All staffs belongs to the same job will use this to complete the local * synchronization and aggregation. * @param jobId BSPJobID * @param staffId StaffAttemptID * @param superStepCounter the counter of superStep * @param ssrc SuperStepReportContainer * @return the result of setting up localB...
All staffs belongs to the same job will use this to complete the local synchronization and aggregation
localBarrier
{ "repo_name": "LiuJianan/Graduate-Graph", "path": "src/java/com/chinamobile/bcbsp/workermanager/WorkerAgentInterface.java", "license": "apache-2.0", "size": 3229 }
[ "com.chinamobile.bcbsp.sync.SuperStepReportContainer", "com.chinamobile.bcbsp.util.BSPJobID", "com.chinamobile.bcbsp.util.StaffAttemptID" ]
import com.chinamobile.bcbsp.sync.SuperStepReportContainer; import com.chinamobile.bcbsp.util.BSPJobID; import com.chinamobile.bcbsp.util.StaffAttemptID;
import com.chinamobile.bcbsp.sync.*; import com.chinamobile.bcbsp.util.*;
[ "com.chinamobile.bcbsp" ]
com.chinamobile.bcbsp;
625,143
public void fillBoxPlot(Graphics g, double x, double r, int y){ g.fillRect(xGraph(x - r), y - 3, xGraph(x + r) - xGraph(x - r), 6); g.drawLine(xGraph(x), y - 6, xGraph(x), y + 6); }
void function(Graphics g, double x, double r, int y){ g.fillRect(xGraph(x - r), y - 3, xGraph(x + r) - xGraph(x - r), 6); g.drawLine(xGraph(x), y - 6, xGraph(x), y + 6); }
/**The following method fills a symmetric, horizontal boxplot, centered at x of radius r (in scale units). The variable y is the vertical position in pixels*/
The following method fills a symmetric, horizontal boxplot, centered at x of radius r
fillBoxPlot
{ "repo_name": "SOCR/HTML5_WebSite", "path": "SOCR2.8/src/edu/ucla/stat/SOCR/util/Graph.java", "license": "lgpl-3.0", "size": 18789 }
[ "java.awt.Graphics" ]
import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,273,306