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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
private void updateStopForecast(StopForecast stopForecast) {
final String GAEILGE = "ga";
final String DUE = "DUE";
EnglishGaeilgeMap mapEnglishGaeilge = new EnglishGaeilgeMap();
String min = " " + getString(R.string.min)... | @SuppressWarnings(STR) void function(StopForecast stopForecast) { final String GAEILGE = "ga"; final String DUE = "DUE"; EnglishGaeilgeMap mapEnglishGaeilge = new EnglishGaeilgeMap(); String min = " " + getString(R.string.min); String mins = " " + getString(R.string.mins); String minOrMins; if (stopForecast != null) { ... | /**
* Draw stop forecast to screen.
* @param stopForecast StopForecast object containing data for requested stop.
*/ | Draw stop forecast to screen | updateStopForecast | {
"repo_name": "thecosmicfrog/LuasataGlance",
"path": "mobile/src/main/java/org/thecosmicfrog/luasataglance/activity/LineFragment.java",
"license": "gpl-3.0",
"size": 45307
} | [
"androidx.core.content.ContextCompat",
"org.thecosmicfrog.luasataglance.object.EnglishGaeilgeMap",
"org.thecosmicfrog.luasataglance.object.StopForecast"
] | import androidx.core.content.ContextCompat; import org.thecosmicfrog.luasataglance.object.EnglishGaeilgeMap; import org.thecosmicfrog.luasataglance.object.StopForecast; | import androidx.core.content.*; import org.thecosmicfrog.luasataglance.object.*; | [
"androidx.core",
"org.thecosmicfrog.luasataglance"
] | androidx.core; org.thecosmicfrog.luasataglance; | 1,434,146 |
@Override
public int read(byte[] bytes, int off, int len) throws IOException {
int numOfBytesRead = in.read(bytes, off, len);
if (numOfBytesRead != -1) {
hasher.putBytes(bytes, off, numOfBytesRead);
}
return numOfBytesRead;
} | int function(byte[] bytes, int off, int len) throws IOException { int numOfBytesRead = in.read(bytes, off, len); if (numOfBytesRead != -1) { hasher.putBytes(bytes, off, numOfBytesRead); } return numOfBytesRead; } | /**
* Reads the specified bytes of data from the underlying input stream and updates the hasher with
* the bytes read.
*/ | Reads the specified bytes of data from the underlying input stream and updates the hasher with the bytes read | read | {
"repo_name": "Allive1/pinpoint",
"path": "thirdparty/google-guava/src/main/java/com/google/common/hash/HashingInputStream.java",
"license": "apache-2.0",
"size": 2985
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,508,118 |
public void setLazyDataset(ILazyDataset lazy); | void function(ILazyDataset lazy); | /**
* Instead of specifying a dataset name(s) to loop over
* one can specify an ILazyDataset to use instead. In this
* case the datasetName(s) will be ignored.
*
*/ | Instead of specifying a dataset name(s) to loop over one can specify an ILazyDataset to use instead. In this case the datasetName(s) will be ignored | setLazyDataset | {
"repo_name": "colinpalmer/dawnsci",
"path": "org.eclipse.dawnsci.analysis.api/src/org/eclipse/dawnsci/analysis/api/conversion/IConversionContext.java",
"license": "epl-1.0",
"size": 11548
} | [
"org.eclipse.dawnsci.analysis.api.dataset.ILazyDataset"
] | import org.eclipse.dawnsci.analysis.api.dataset.ILazyDataset; | import org.eclipse.dawnsci.analysis.api.dataset.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 739,624 |
public Observable<ServiceResponse<RemediationInner>> getByResourceGroupWithServiceResponseAsync(String subscriptionId, String resourceGroupName, String remediationName) {
if (subscriptionId == null) {
throw new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.");... | Observable<ServiceResponse<RemediationInner>> function(String subscriptionId, String resourceGroupName, String remediationName) { if (subscriptionId == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (remediationName == null) { throw new ... | /**
* Gets an existing remediation at resource group scope.
*
* @param subscriptionId Microsoft Azure subscription ID.
* @param resourceGroupName Resource group name.
* @param remediationName The name of the remediation.
* @throws IllegalArgumentException thrown if parameters fail the vali... | Gets an existing remediation at resource group scope | getByResourceGroupWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/policyinsights/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/policyinsights/v2018_07_01_preview/implementation/RemediationsInner.java",
"license": "mit",
"size": 261004
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,336,717 |
File createReportInstanceDirectory() {
// if report directory is null, then used the default directory
if (reportDirectory == null) {
setReportDirectory(getDefaultReportDirectory());
}
// create report directory name
StringBuilder reportDirName = new StringBuilder();
reportDirName.append("r... | File createReportInstanceDirectory() { if (reportDirectory == null) { setReportDirectory(getDefaultReportDirectory()); } StringBuilder reportDirName = new StringBuilder(); reportDirName.append(STR); reportDirName.append(timestampFormat.format(new Date())); File newReportDir = new File(reportDirectory, reportDirName.toS... | /**
* Create time stamped report directory for this report.
*
* @return time stamped report directory for this report.
*/ | Create time stamped report directory for this report | createReportInstanceDirectory | {
"repo_name": "athrane/pineapple",
"path": "reporting/pineapple-basic-html-report-generator/src/main/java/com/alpha/pineapple/report/basichtml/BasicHtmlReportGeneratorImpl.java",
"license": "gpl-3.0",
"size": 15201
} | [
"java.io.File",
"java.util.Date"
] | import java.io.File; import java.util.Date; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,099,049 |
@Override
public boolean onStartNestedScroll(View child, View target, int axes)
{
// Only return true if the NestedScrollingChild view wants to scroll this view vertically.
// Note: This is because the Android ListView class only supports vertical scrolling.
return ((axes & ViewCompat.SCROLL_AX... | boolean function(View child, View target, int axes) { return ((axes & ViewCompat.SCROLL_AXIS_VERTICAL) != 0); } | /**
* Called by a NestedScrollingChild when its startNestedScroll() method has been called.
* This asks this view if it supports nested scrolling with along the given axes.
* @param child
* Reference to either the NestedScrollingChild or the ViewGroup owned by this parent view
* that contains the Ne... | Called by a NestedScrollingChild when its startNestedScroll() method has been called. This asks this view if it supports nested scrolling with along the given axes | onStartNestedScroll | {
"repo_name": "mano-mykingdom/titanium_mobile",
"path": "android/modules/ui/src/java/ti/modules/titanium/ui/widget/listview/TiNestedListView.java",
"license": "apache-2.0",
"size": 17486
} | [
"android.support.v4.view.ViewCompat",
"android.view.View"
] | import android.support.v4.view.ViewCompat; import android.view.View; | import android.support.v4.view.*; import android.view.*; | [
"android.support",
"android.view"
] | android.support; android.view; | 607,689 |
public static String getArgsLine (final Object ... args)
{
final int numArgs=(null == args) ? 0 : args.length;
if (numArgs <= 0)
return null;
else
return asStringList(Arrays.asList(args), ' ');
} | static String function (final Object ... args) { final int numArgs=(null == args) ? 0 : args.length; if (numArgs <= 0) return null; else return asStringList(Arrays.asList(args), ' '); } | /**
* Builds a <I>main</I> invocation command line from given argument
* @param args arguments list - may be null/empty and contain null/empty
* elements (which are ignored)
* @return updated command line - may be null/empty if no arguments found
*/ | Builds a main invocation command line from given argument | getArgsLine | {
"repo_name": "lgoldstein/communitychest",
"path": "chest/base-utils/jdk/src/main/java/net/community/chest/lang/StringUtil.java",
"license": "apache-2.0",
"size": 52084
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,507,504 |
private boolean isAfterParent(final BSPTree<Sphere1D> node) {
final BSPTree<Sphere1D> parent = node.getParent();
if (parent == null) {
return false;
} else {
return node == childAfter(parent);
}
} | boolean function(final BSPTree<Sphere1D> node) { final BSPTree<Sphere1D> parent = node.getParent(); if (parent == null) { return false; } else { return node == childAfter(parent); } } | /** Check if a node is the child after its parent in trigonometric order.
* @param node child node considered
* @return true is the node has a parent end is after it in trigonometric order
*/ | Check if a node is the child after its parent in trigonometric order | isAfterParent | {
"repo_name": "sdinot/hipparchus",
"path": "hipparchus-geometry/src/main/java/org/hipparchus/geometry/spherical/oned/ArcsSet.java",
"license": "apache-2.0",
"size": 37319
} | [
"org.hipparchus.geometry.partitioning.BSPTree"
] | import org.hipparchus.geometry.partitioning.BSPTree; | import org.hipparchus.geometry.partitioning.*; | [
"org.hipparchus.geometry"
] | org.hipparchus.geometry; | 2,219,200 |
default AdvancedTwilioEndpointConsumerBuilder exchangePattern(
ExchangePattern exchangePattern) {
doSetProperty("exchangePattern", exchangePattern);
return this;
} | default AdvancedTwilioEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; } | /**
* Sets the exchange pattern when the consumer creates an exchange.
*
* The option is a:
* <code>org.apache.camel.ExchangePattern</code> type.
*
* Group: consumer (advanced)
*
* @param exchangePattern the value to set
* @... | Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced) | exchangePattern | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/TwilioEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 37918
} | [
"org.apache.camel.ExchangePattern"
] | import org.apache.camel.ExchangePattern; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,346,751 |
public OneResponse snapshotDelete(int snapId)
{
return snapshotDelete(client, id, snapId);
} | OneResponse function(int snapId) { return snapshotDelete(client, id, snapId); } | /**
* Deletes a VM snapshot
*
* @param snapId Id of the snapshot
* @return If an error occurs the error message contains the reason.
*/ | Deletes a VM snapshot | snapshotDelete | {
"repo_name": "tuxmea/one",
"path": "src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java",
"license": "apache-2.0",
"size": 42818
} | [
"org.opennebula.client.OneResponse"
] | import org.opennebula.client.OneResponse; | import org.opennebula.client.*; | [
"org.opennebula.client"
] | org.opennebula.client; | 586,654 |
private static JAXBContext JAXBContext_newInstance(final String context,
final ClassLoader classloader)
throws Exception {
// NOTE: This method must remain private because it uses AccessController
JAXBContext jaxbContext = null;
... | static JAXBContext function(final String context, final ClassLoader classloader) throws Exception { JAXBContext jaxbContext = null; try { if (log.isDebugEnabled()) { if (context == null context.length() == 0) { log.debug(STR); } else { log.debug(STR + context); } } | /**
* Create JAXBContext from context String and ClassLoader
*
* @param context
* @param classloader
* @return
* @throws Exception
*/ | Create JAXBContext from context String and ClassLoader | JAXBContext_newInstance | {
"repo_name": "intalio/axis2",
"path": "modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java",
"license": "apache-2.0",
"size": 50242
} | [
"javax.xml.bind.JAXBContext"
] | import javax.xml.bind.JAXBContext; | import javax.xml.bind.*; | [
"javax.xml"
] | javax.xml; | 1,203,589 |
protected BeanPropertyDescriptor createPropertyDescriptor(IPropertyDeclaration property, Annotation annotation) {
ArcteryxBeanProperty propertyAnnotation = (ArcteryxBeanProperty) annotation;
BeanPropertyDescriptor descriptor = new BeanPropertyDescriptor();
descriptor.setName(property.getPropertyName());
... | BeanPropertyDescriptor function(IPropertyDeclaration property, Annotation annotation) { ArcteryxBeanProperty propertyAnnotation = (ArcteryxBeanProperty) annotation; BeanPropertyDescriptor descriptor = new BeanPropertyDescriptor(); descriptor.setName(property.getPropertyName()); descriptor.setDescription(propertyAnnotat... | /**
* create property descriptor
*
* @param property
* @param annotation
* @return
*/ | create property descriptor | createPropertyDescriptor | {
"repo_name": "bradwoo8621/nest-old",
"path": "arcteryx-meta-beans/src/main/java/com/github/nest/arcteryx/meta/beans/annotation/scan/BeanPropertyDescriptorGenerator.java",
"license": "apache-2.0",
"size": 6005
} | [
"com.github.nest.arcteryx.meta.beans.annotation.ArcteryxBeanProperty",
"com.github.nest.arcteryx.meta.beans.internal.BeanPropertyDescriptor",
"java.lang.annotation.Annotation"
] | import com.github.nest.arcteryx.meta.beans.annotation.ArcteryxBeanProperty; import com.github.nest.arcteryx.meta.beans.internal.BeanPropertyDescriptor; import java.lang.annotation.Annotation; | import com.github.nest.arcteryx.meta.beans.annotation.*; import com.github.nest.arcteryx.meta.beans.internal.*; import java.lang.annotation.*; | [
"com.github.nest",
"java.lang"
] | com.github.nest; java.lang; | 2,758,498 |
public void setImageBitmap(Bitmap bitmap) {
mBitmap = bitmap;
mImageView.setImageBitmap(mBitmap);
if (mCropOverlayView != null) {
mCropOverlayView.resetCropOverlayView();
}
} | void function(Bitmap bitmap) { mBitmap = bitmap; mImageView.setImageBitmap(mBitmap); if (mCropOverlayView != null) { mCropOverlayView.resetCropOverlayView(); } } | /**
* Sets a Bitmap as the content of the CropImageView.
*
* @param bitmap the Bitmap to set
*/ | Sets a Bitmap as the content of the CropImageView | setImageBitmap | {
"repo_name": "cymcsg/UltimateAndroid",
"path": "deprecated/UltimateAndroidGradle/ultimateandroiduicomponent/src/main/java/com/marshalchen/common/uimodule/cropperimage/CropImageView.java",
"license": "apache-2.0",
"size": 19614
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,063,456 |
public void glNormalPointer(int stride, FloatBuffer pointer); | void function(int stride, FloatBuffer pointer); | /**
* Define an array of normals.
*
* @param stride
* Specifies the byte offset between consecutive normals. If
* stride is 0, the normals are understood to be tightly packed
* in the array. The initial value is 0.
* @param pointer
* Sp... | Define an array of normals | glNormalPointer | {
"repo_name": "kayahr/threedee",
"path": "threedee-core/src/main/java/de/ailis/threedee/rendering/GL.java",
"license": "mit",
"size": 38281
} | [
"java.nio.FloatBuffer"
] | import java.nio.FloatBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,427,473 |
@VisibleForTesting
Response listDnsRecords(String projectId, String zoneName, String query) {
Map<String, Object> options = OptionParsers.parseListDnsRecordsOptions(query);
Response response = checkListOptions(options);
if (response != null) {
return response;
}
ZoneContainer zoneContainer... | Response listDnsRecords(String projectId, String zoneName, String query) { Map<String, Object> options = OptionParsers.parseListDnsRecordsOptions(query); Response response = checkListOptions(options); if (response != null) { return response; } ZoneContainer zoneContainer = findZone(projectId, zoneName); if (zoneContain... | /**
* Lists record sets for a zone. Next page token is the ID of the last record listed.
*/ | Lists record sets for a zone. Next page token is the ID of the last record listed | listDnsRecords | {
"repo_name": "aozarov/gcloud-java",
"path": "gcloud-java-dns/src/main/java/com/google/cloud/dns/testing/LocalDnsHelper.java",
"license": "apache-2.0",
"size": 50076
} | [
"com.google.api.services.dns.model.ResourceRecordSet",
"com.google.common.collect.ImmutableSortedMap",
"java.io.IOException",
"java.util.Arrays",
"java.util.LinkedList",
"java.util.Map"
] | import com.google.api.services.dns.model.ResourceRecordSet; import com.google.common.collect.ImmutableSortedMap; import java.io.IOException; import java.util.Arrays; import java.util.LinkedList; import java.util.Map; | import com.google.api.services.dns.model.*; import com.google.common.collect.*; import java.io.*; import java.util.*; | [
"com.google.api",
"com.google.common",
"java.io",
"java.util"
] | com.google.api; com.google.common; java.io; java.util; | 1,792,772 |
private void recordSubclassPrototypePropUse(
FunctionType classType, String prop, Reference ref) {
if (classType.getPrototype().hasOwnProperty(prop)) {
graph.connect(getNamedContainingFunction(), ref,
graph.defineNameIfNotExists(
classType.getReferenceName() + ".proto... | void function( FunctionType classType, String prop, Reference ref) { if (classType.getPrototype().hasOwnProperty(prop)) { graph.connect(getNamedContainingFunction(), ref, graph.defineNameIfNotExists( classType.getReferenceName() + STR + prop, false)); } if (classType.getSubTypes() != null) { for (FunctionType subclass ... | /**
* Conservatively assumes that all subclass implementation of this property
* might be called.
*/ | Conservatively assumes that all subclass implementation of this property might be called | recordSubclassPrototypePropUse | {
"repo_name": "selkhateeb/closure-compiler",
"path": "src/com/google/javascript/jscomp/NameReferenceGraphConstruction.java",
"license": "apache-2.0",
"size": 20320
} | [
"com.google.javascript.jscomp.NameReferenceGraph",
"com.google.javascript.rhino.jstype.FunctionType"
] | import com.google.javascript.jscomp.NameReferenceGraph; import com.google.javascript.rhino.jstype.FunctionType; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,526,137 |
@Test
public void testGetCommandKey() {
// Build up an access profile
RowFilters filters = new RowFilters();
Set<FieldName> selects = new HashSet<FieldName>();
AccessProfile accessProfile = new AccessProfile(filters, selects);
// Build up some column metadata with a pri... | void function() { RowFilters filters = new RowFilters(); Set<FieldName> selects = new HashSet<FieldName>(); AccessProfile accessProfile = new AccessProfile(filters, selects); Map<String, Integer> map = new HashMap<String, Integer>(); map.put("col1", java.sql.Types.VARCHAR); map.put("col2", java.sql.Types.INTEGER); Colu... | /**
* Test a command with a key.
*/ | Test a command with a key | testGetCommandKey | {
"repo_name": "schwadorf/IRIS",
"path": "interaction-jdbc-producer/src/test/java/com/temenos/interaction/jdbc/producer/sql/builder/TestOracleBuilder.java",
"license": "agpl-3.0",
"size": 26620
} | [
"com.temenos.interaction.jdbc.producer.sql.ColumnTypesMap",
"com.temenos.interaction.jdbc.producer.sql.SqlBuilder",
"com.temenos.interaction.jdbc.producer.sql.SqlBuilderFactory",
"com.temenos.interaction.odataext.odataparser.data.AccessProfile",
"com.temenos.interaction.odataext.odataparser.data.FieldName",... | import com.temenos.interaction.jdbc.producer.sql.ColumnTypesMap; import com.temenos.interaction.jdbc.producer.sql.SqlBuilder; import com.temenos.interaction.jdbc.producer.sql.SqlBuilderFactory; import com.temenos.interaction.odataext.odataparser.data.AccessProfile; import com.temenos.interaction.odataext.odataparser.da... | import com.temenos.interaction.jdbc.producer.sql.*; import com.temenos.interaction.odataext.odataparser.data.*; import java.util.*; import org.junit.*; | [
"com.temenos.interaction",
"java.util",
"org.junit"
] | com.temenos.interaction; java.util; org.junit; | 616,319 |
public static Area getScreenResolution() {
Cookie res = Functions.getCookie(Stapler.getCurrentRequest(),"screenResolution");
if(res!=null)
return Area.parse(res.getValue());
return null;
}
public static final class RunUrl {
private final String head, base, r... | static Area function() { Cookie res = Functions.getCookie(Stapler.getCurrentRequest(),STR); if(res!=null) return Area.parse(res.getValue()); return null; } public static final class RunUrl { private final String head, base, rest; private final Run run; public RunUrl(Run run, String head, String base, String rest) { thi... | /**
* If we know the user's screen resolution, return it. Otherwise null.
* @since 1.213
*/ | If we know the user's screen resolution, return it. Otherwise null | getScreenResolution | {
"repo_name": "iterate/coding-dojo",
"path": "2011-04-26-refactoring_hudson/core/src/main/java/hudson/Functions.java",
"license": "apache-2.0",
"size": 48096
} | [
"hudson.model.Run",
"hudson.util.Area",
"javax.servlet.http.Cookie",
"org.kohsuke.stapler.Stapler"
] | import hudson.model.Run; import hudson.util.Area; import javax.servlet.http.Cookie; import org.kohsuke.stapler.Stapler; | import hudson.model.*; import hudson.util.*; import javax.servlet.http.*; import org.kohsuke.stapler.*; | [
"hudson.model",
"hudson.util",
"javax.servlet",
"org.kohsuke.stapler"
] | hudson.model; hudson.util; javax.servlet; org.kohsuke.stapler; | 1,320,721 |
int even = 0;
int sum = 0;
final int[][] sums = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 } };
CharacterIterator iter = new StringCharacterIterator(number);
for (char c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) {
if (!Characte... | int even = 0; int sum = 0; final int[][] sums = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }, { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 } }; CharacterIterator iter = new StringCharacterIterator(number); for (char c = iter.last(); c != CharacterIterator.DONE; c = iter.previous()) { if (!Character.isDigit(c)) { return false; } int cInt = c -... | /**
* Checks if the given string represents a number that passes the Luhn Checksum which all valid
* CCs will pass.
*
* @param number
* @return true if the number does pass the checksum, else false
*/ | Checks if the given string represents a number that passes the Luhn Checksum which all valid CCs will pass | passesLuhnChecksum | {
"repo_name": "carlospontual/card.io-Android-source",
"path": "card.io/src/main/java/io/card/payment/CreditCardNumber.java",
"license": "mit",
"size": 5887
} | [
"java.text.CharacterIterator",
"java.text.StringCharacterIterator"
] | import java.text.CharacterIterator; import java.text.StringCharacterIterator; | import java.text.*; | [
"java.text"
] | java.text; | 1,227,807 |
public void addNoSubclassDependency(RVMClass source, int dependent_cmid) {
MethodSet s = findOrCreateMethodSet(noSubclassHash, source);
s.add(dependent_cmid);
} | void function(RVMClass source, int dependent_cmid) { MethodSet s = findOrCreateMethodSet(noSubclassHash, source); s.add(dependent_cmid); } | /**
* Record that if a particular RVMClass ever has a subclass, then
* the CompiledMethod encoded by the cmid must be invalidated.
*/ | Record that if a particular RVMClass ever has a subclass, then the CompiledMethod encoded by the cmid must be invalidated | addNoSubclassDependency | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/inlining/InvalidationDatabase.java",
"license": "epl-1.0",
"size": 6013
} | [
"org.jikesrvm.classloader.RVMClass"
] | import org.jikesrvm.classloader.RVMClass; | import org.jikesrvm.classloader.*; | [
"org.jikesrvm.classloader"
] | org.jikesrvm.classloader; | 2,205,119 |
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
formatLabel = new javax.swing.JLabel();
formatChoice = new javax.swing.JComboBox();
colorsLabel = new javax.swing.JLabel();
... | @SuppressWarnings(STR) void function() { formatLabel = new javax.swing.JLabel(); formatChoice = new javax.swing.JComboBox(); colorsLabel = new javax.swing.JLabel(); colorsChoice = new javax.swing.JComboBox(); infoLabel = new javax.swing.JLabel(); startStopButton = new javax.swing.JButton(); mouseLabel = new javax.swing... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "sebkur/montemedia",
"path": "src/main/org/monte/screenrecorder/ScreenRecorderMain.java",
"license": "lgpl-3.0",
"size": 46142
} | [
"java.awt.Component",
"java.awt.event.ActionListener",
"javax.swing.DefaultComboBoxModel",
"javax.swing.SwingConstants"
] | import java.awt.Component; import java.awt.event.ActionListener; import javax.swing.DefaultComboBoxModel; import javax.swing.SwingConstants; | import java.awt.*; import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 585,560 |
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
MdfPackage theMdfPackage = (MdfPackage)EPackage.Registry.INSTANCE.getEPackage(MdfPackage.eN... | void function() { if (isInitialized) return; isInitialized = true; setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); MdfPackage theMdfPackage = (MdfPackage)EPackage.Registry.INSTANCE.getEPackage(MdfPackage.eNS_URI); EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePacka... | /**
* 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": "debabratahazra/DS",
"path": "designstudio/components/t24/core/com.odcgroup.t24.application.localref/src/main/generated/com/odcgroup/t24/localReferenceApplication/impl/LocalReferenceApplicationPackageImpl.java",
"license": "epl-1.0",
"size": 10434
} | [
"com.odcgroup.mdf.ecore.MdfPackage",
"com.odcgroup.t24.localReferenceApplication.LocalField",
"com.odcgroup.t24.localReferenceApplication.LocalReferenceApplication",
"com.odcgroup.translation.translationDsl.TranslationDslPackage",
"org.eclipse.emf.ecore.EPackage",
"org.eclipse.emf.ecore.EcorePackage"
] | import com.odcgroup.mdf.ecore.MdfPackage; import com.odcgroup.t24.localReferenceApplication.LocalField; import com.odcgroup.t24.localReferenceApplication.LocalReferenceApplication; import com.odcgroup.translation.translationDsl.TranslationDslPackage; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.E... | import com.odcgroup.mdf.ecore.*; import com.odcgroup.t24.*; import com.odcgroup.translation.*; import org.eclipse.emf.ecore.*; | [
"com.odcgroup.mdf",
"com.odcgroup.t24",
"com.odcgroup.translation",
"org.eclipse.emf"
] | com.odcgroup.mdf; com.odcgroup.t24; com.odcgroup.translation; org.eclipse.emf; | 254,588 |
Patch applySmartPatch(SmartPatch smartPatch, boolean force) throws IOException; | Patch applySmartPatch(SmartPatch smartPatch, boolean force) throws IOException; | /**
* Apply a smart patch and return the result
* @param smartPatch The patch to apply
* @param force Whether to force application of the patch
* @return The patched that was applied
* @throws java.io.IOException If an IO exception occurred
*/ | Apply a smart patch and return the result | applySmartPatch | {
"repo_name": "ASzc/fuse-patch-jdk6",
"path": "core/src/main/java/org/wildfly/extras/patch/Server.java",
"license": "apache-2.0",
"size": 2375
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 962,827 |
public void update(Observable o, Object arg) {
int index = DownloadManager.getInstance().getDownloadList().indexOf(o);
// Fire table row update notification to table.
fireTableRowsUpdated(index, index);
}
| void function(Observable o, Object arg) { int index = DownloadManager.getInstance().getDownloadList().indexOf(o); fireTableRowsUpdated(index, index); } | /**
* Update is called when a Download notifies its observers of any changes
*/ | Update is called when a Download notifies its observers of any changes | update | {
"repo_name": "prashant31191/Java-Download-Manager",
"path": "src/com/luugiathuy/apps/downloadmanager/DownloadTableModel.java",
"license": "mit",
"size": 4217
} | [
"java.util.Observable"
] | import java.util.Observable; | import java.util.*; | [
"java.util"
] | java.util; | 239,767 |
public synchronized String addTest(
Connection conn,
String suiteId,
CMnDbAcceptanceTestData test)
throws SQLException
{
String testId = null;
StringBuffer sql = new StringBuffer();
sql.append("INSERT INTO " + TEST_TABLE + " ");
sql.ap... | synchronized String function( Connection conn, String suiteId, CMnDbAcceptanceTestData test) throws SQLException { String testId = null; StringBuffer sql = new StringBuffer(); sql.append(STR + TEST_TABLE + " "); sql.append("(" + SUITE_ID); if (test.getStartTime() != null) sql.append(STR + TEST_START_DATE); if (test.get... | /**
* Store an ACT test result in the database.
*
* @param conn Database connection
* @param suiteId Foreign key that links the test to the suite
* @param test Test data
*
* @return Auto-generated key that identifies the test
*/ | Store an ACT test result in the database | addTest | {
"repo_name": "ModelN/build-management",
"path": "mn-build-core/src/main/java/com/modeln/testfw/reporting/CMnAcceptanceTestTable.java",
"license": "mit",
"size": 36442
} | [
"java.sql.Connection",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.Enumeration"
] | import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Enumeration; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 662,967 |
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9)
{
int j1 = par9;
if (par5 == 1 && this.canPlaceTorchOn(par1World, par2, par3 - 1, par4))
{
j1 = 5;
}
if (par5 == 2 && par1World.is... | int function(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { int j1 = par9; if (par5 == 1 && this.canPlaceTorchOn(par1World, par2, par3 - 1, par4)) { j1 = 5; } if (par5 == 2 && par1World.isSideSolid(par2, par3, par4 + 1, ForgeDirection.NORTH, true)) { j1 = 4; } i... | /**
* Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata
*/ | Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata | onBlockPlaced | {
"repo_name": "OwnAgePau/Soul-Forest",
"path": "src/main/java/com/Mod_Ores/Blocks/Special/SoulTorch.java",
"license": "lgpl-2.1",
"size": 11315
} | [
"net.minecraft.world.World",
"net.minecraftforge.common.util.ForgeDirection"
] | import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; | import net.minecraft.world.*; import net.minecraftforge.common.util.*; | [
"net.minecraft.world",
"net.minecraftforge.common"
] | net.minecraft.world; net.minecraftforge.common; | 1,330,302 |
public void disable() throws IOException {
// This has to be synchronized or it can collide with the check in the task.
synchronized (optOutLock) {
// Check if the server owner has already set opt-out, if not, set it.
if (!isOptOut()) {
configuration.set("opt-... | void function() throws IOException { synchronized (optOutLock) { if (!isOptOut()) { configuration.set(STR, true); configuration.save(configurationFile); } if (task != null) { task.cancel(); task = null; } } } | /**
* Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task.
*
* @throws java.io.IOException
*/ | Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task | disable | {
"repo_name": "AydinE/GPTownship",
"path": "GPTownship/src/com/OmniTekMC/GPTownship/Metrics.java",
"license": "gpl-3.0",
"size": 24832
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,926,911 |
public RouteNextHopType nextHopType() {
return this.nextHopType;
} | RouteNextHopType function() { return this.nextHopType; } | /**
* Get the type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None'.
*
* @return the nextHopType value
... | Get the type of Azure hop the packet should be sent to. Possible values are: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible values include: 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', 'None' | nextHopType | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/RouteInner.java",
"license": "mit",
"size": 5938
} | [
"com.microsoft.azure.management.network.v2017_10_01.RouteNextHopType"
] | import com.microsoft.azure.management.network.v2017_10_01.RouteNextHopType; | import com.microsoft.azure.management.network.v2017_10_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,482,720 |
public static boolean filter(String name, Pattern[] included, Pattern[] excluded)
{
if (null == name)
{
return false;
}
boolean accepted = false;
// retain only the includes
if (null == included)
{
accepted = true;
}
else
{
Pattern pattern;
for (int i = 0; i < included.length; i++)... | static boolean function(String name, Pattern[] included, Pattern[] excluded) { if (null == name) { return false; } boolean accepted = false; if (null == included) { accepted = true; } else { Pattern pattern; for (int i = 0; i < included.length; i++) { pattern = included[i]; if (pattern != null && pattern.matcher(name).... | /**
* Checks if the name filters through a series of including and excluding
* regular expressions.
*
* @param name The <code>String</code> that will be filtered.
* @param included An array of regular expressions that need to succeed
* @param excluded An array of regular expressions that need to fail
*
... | Checks if the name filters through a series of including and excluding regular expressions | filter | {
"repo_name": "codesearch-github/codesearch",
"path": "src/custom-libs/Codesearch-JHighlight/src/main/java/com/uwyn/jhighlight/tools/StringUtils.java",
"license": "gpl-3.0",
"size": 22699
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 301,894 |
@FIXVersion(introduced = "5.0SP1")
@TagNumRef(tagNum = TagNum.DerivativeInstrAttribType)
public void setDerivativeInstrAttribType(InstrAttribType derivativeInstrAttribType) {
this.derivativeInstrAttribType = derivativeInstrAttribType;
} | @FIXVersion(introduced = STR) @TagNumRef(tagNum = TagNum.DerivativeInstrAttribType) void function(InstrAttribType derivativeInstrAttribType) { this.derivativeInstrAttribType = derivativeInstrAttribType; } | /**
* Message field setter.
* @param derivativeInstrAttribType field value
*/ | Message field setter | setDerivativeInstrAttribType | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/group/DerivativeInstrAttribGroup.java",
"license": "gpl-3.0",
"size": 8027
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.InstrAttribType",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.InstrAttribType; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 932,581 |
public void setReportOnlyScrubberProcess(ScrubberProcess reportOnlyScrubberProcess) {
this.reportOnlyScrubberProcess = reportOnlyScrubberProcess;
} | void function(ScrubberProcess reportOnlyScrubberProcess) { this.reportOnlyScrubberProcess = reportOnlyScrubberProcess; } | /**
* Sets the reportOnlyScrubberProcess attribute value.
* @param reportOnlyScrubberProcess The reportOnlyScrubberProcess to set.
*/ | Sets the reportOnlyScrubberProcess attribute value | setReportOnlyScrubberProcess | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/gl/service/impl/ScrubberServiceImpl.java",
"license": "apache-2.0",
"size": 5064
} | [
"org.kuali.kfs.gl.batch.service.ScrubberProcess"
] | import org.kuali.kfs.gl.batch.service.ScrubberProcess; | import org.kuali.kfs.gl.batch.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,072,698 |
public TermVectorsRequest doc(BytesReference doc, boolean generateRandomId) {
// assign a random id to this artificial document, for routing
if (generateRandomId) {
this.id(String.valueOf(randomInt.getAndAdd(1)));
}
this.doc = doc;
return this;
} | TermVectorsRequest function(BytesReference doc, boolean generateRandomId) { if (generateRandomId) { this.id(String.valueOf(randomInt.getAndAdd(1))); } this.doc = doc; return this; } | /**
* Sets an artificial document from which term vectors are requested for.
*/ | Sets an artificial document from which term vectors are requested for | doc | {
"repo_name": "wuranbo/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java",
"license": "apache-2.0",
"size": 24229
} | [
"org.elasticsearch.common.bytes.BytesReference"
] | import org.elasticsearch.common.bytes.BytesReference; | import org.elasticsearch.common.bytes.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,681,556 |
public T caseComponent(Component object) {
return null;
} | T function(Component object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Component</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of inter... | Returns the result of interpreting the object as an instance of 'Component'. This implementation returns null; returning a non-null result will terminate the switch. | caseComponent | {
"repo_name": "Nasdanika/amur-it-js",
"path": "org.nasdanika.amur.it.js/src/org/nasdanika/amur/it/js/util/JsSwitch.java",
"license": "epl-1.0",
"size": 16789
} | [
"org.nasdanika.amur.it.js.Component"
] | import org.nasdanika.amur.it.js.Component; | import org.nasdanika.amur.it.js.*; | [
"org.nasdanika.amur"
] | org.nasdanika.amur; | 1,444,908 |
@Override
public Description getDescription() {
return suiteDescription;
} | Description function() { return suiteDescription; } | /**
* Return the current tree of test descriptions (filtered).
*/ | Return the current tree of test descriptions (filtered) | getDescription | {
"repo_name": "roaporl/randomizedtesting",
"path": "randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/RandomizedRunner.java",
"license": "apache-2.0",
"size": 64962
} | [
"org.junit.runner.Description"
] | import org.junit.runner.Description; | import org.junit.runner.*; | [
"org.junit.runner"
] | org.junit.runner; | 1,506,202 |
private void setSubtreeSpecification( Subentry subentry, Entry entry ) throws LdapException
{
String subtree = entry.get( SUBTREE_SPECIFICATION_AT ).getString();
SubtreeSpecification ss;
try
{
ss = ssParser.parse( subtree );
}
catch ( Exception e )
... | void function( Subentry subentry, Entry entry ) throws LdapException { String subtree = entry.get( SUBTREE_SPECIFICATION_AT ).getString(); SubtreeSpecification ss; try { ss = ssParser.parse( subtree ); } catch ( Exception e ) { String msg = I18n.err( I18n.ERR_307, entry.getDn() ); LOG.warn( msg ); throw new LdapInvalid... | /**
* Get the SubtreeSpecification, parse it and stores it into the subentry
*/ | Get the SubtreeSpecification, parse it and stores it into the subentry | setSubtreeSpecification | {
"repo_name": "drankye/directory-server",
"path": "interceptors/subtree/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java",
"license": "apache-2.0",
"size": 62937
} | [
"org.apache.directory.api.ldap.model.entry.Entry",
"org.apache.directory.api.ldap.model.exception.LdapException",
"org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException",
"org.apache.directory.api.ldap.model.message.ResultCodeEnum",
"org.apache.directory.api.ldap.model.subtree.Sub... | import org.apache.directory.api.ldap.model.entry.Entry; import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException; import org.apache.directory.api.ldap.model.message.ResultCodeEnum; import org.apache.directory.api.ldap.mod... | import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.message.*; import org.apache.directory.api.ldap.model.subtree.*; import org.apache.directory.server.i18n.*; | [
"org.apache.directory"
] | org.apache.directory; | 2,760,039 |
public static java.util.List extractPatientList(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientForVTERiskAssessmentVoCollection voCollection)
{
return extractPatientList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.PatientForVTERiskAssessmentVoCollection voCollection) { return extractPatientList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.core.patient.domain.objects.Patient list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.core.patient.domain.objects.Patient list from the value object collection | extractPatientList | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/PatientForVTERiskAssessmentVoAssembler.java",
"license": "agpl-3.0",
"size": 19313
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 493,395 |
public void parseAndExitUponError(OptionPriority priority, String source, String[] args) {
for (String arg : args) {
if (arg.equals("--help")) {
System.out.println(describeOptions(Collections.<String, String>emptyMap(),
HelpVerbosity.LONG));
System.... | void function(OptionPriority priority, String source, String[] args) { for (String arg : args) { if (arg.equals(STR)) { System.out.println(describeOptions(Collections.<String, String>emptyMap(), HelpVerbosity.LONG)); System.exit(0); } } try { parse(priority, source, Arrays.asList(args)); } catch (OptionsParsingExceptio... | /**
* A convenience function for use in main methods. Parses the command line
* parameters, and exits upon error. Also, prints out the usage message
* if "--help" appears anywhere within {@code args}.
*/ | A convenience function for use in main methods. Parses the command line parameters, and exits upon error. Also, prints out the usage message if "--help" appears anywhere within args | parseAndExitUponError | {
"repo_name": "anupcshan/bazel",
"path": "src/main/java/com/google/devtools/common/options/OptionsParser.java",
"license": "apache-2.0",
"size": 21059
} | [
"java.util.Arrays",
"java.util.Collections"
] | import java.util.Arrays; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 732,537 |
public void assertDoesNotHaveDuplicates(AssertionInfo info, long[] actual) {
arrays.assertDoesNotHaveDuplicates(info, failures, actual);
} | void function(AssertionInfo info, long[] actual) { arrays.assertDoesNotHaveDuplicates(info, failures, actual); } | /**
* Asserts that the given array does not have duplicate values.
* @param info contains information about the assertion.
* @param actual the given array.
* @throws NullPointerException if the array of values is {@code null}.
* @throws IllegalArgumentException if the array of values is empty.
* @thro... | Asserts that the given array does not have duplicate values | assertDoesNotHaveDuplicates | {
"repo_name": "nicstrong/fest-assertions-android",
"path": "fest-assert-android/src/main/java/org/fest/assertions/internal/LongArrays.java",
"license": "apache-2.0",
"size": 10095
} | [
"org.fest.assertions.core.AssertionInfo"
] | import org.fest.assertions.core.AssertionInfo; | import org.fest.assertions.core.*; | [
"org.fest.assertions"
] | org.fest.assertions; | 564,294 |
public void setUpddat(Date upddat) {
this.upddat = upddat;
} | void function(Date upddat) { this.upddat = upddat; } | /**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column ACTTBC.UPDDAT
*
* @param upddat the value for ACTTBC.UPDDAT
*
* @mbggenerated Sun Nov 21 21:36:06 CST 2010
*/ | This method was generated by MyBatis Generator. This method sets the value of the database column ACTTBC.UPDDAT | setUpddat | {
"repo_name": "rongshang/fbi-cbs2",
"path": "common/main/java/cbs/repository/code/model/Acttbc.java",
"license": "unlicense",
"size": 3556
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,645,955 |
private ImmutableSet<String> getWantedPrimaryDexEntries(
ProguardTranslatorFactory translatorFactory,
Supplier<ImmutableList<ClassNode>> classesSupplier)
throws IOException {
ImmutableSet.Builder<String> builder = ImmutableSet.builder();
// If there is a scenario file and overflow is allowe... | ImmutableSet<String> function( ProguardTranslatorFactory translatorFactory, Supplier<ImmutableList<ClassNode>> classesSupplier) throws IOException { ImmutableSet.Builder<String> builder = ImmutableSet.builder(); if (dexSplitMode.isPrimaryDexScenarioOverflowAllowed() && primaryDexScenarioFile.isPresent()) { addScenarioC... | /**
* Construct a {@link Set} of zip file entry names that should go into the primary dex to improve
* performance.
*
* <p>
*
* @return ImmutableList of zip file entry names.
*/ | Construct a <code>Set</code> of zip file entry names that should go into the primary dex to improve performance. | getWantedPrimaryDexEntries | {
"repo_name": "brettwooldridge/buck",
"path": "src/com/facebook/buck/android/SplitZipStep.java",
"license": "apache-2.0",
"size": 20539
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.ImmutableSet",
"java.io.IOException",
"java.util.function.Supplier",
"org.objectweb.asm.tree.ClassNode"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import java.io.IOException; import java.util.function.Supplier; import org.objectweb.asm.tree.ClassNode; | import com.google.common.collect.*; import java.io.*; import java.util.function.*; import org.objectweb.asm.tree.*; | [
"com.google.common",
"java.io",
"java.util",
"org.objectweb.asm"
] | com.google.common; java.io; java.util; org.objectweb.asm; | 1,293,310 |
public void setPreferences(SharedPreferences prefs) {
mSettings = prefs;
} | void function(SharedPreferences prefs) { mSettings = prefs; } | /**
* Some data (the actual sampling rate used by the phone and the AAC profile) needs to be stored once {@link #getSessionDescription()} is called.
* @param prefs The SharedPreferences that will be used to store the sampling rate
*/ | Some data (the actual sampling rate used by the phone and the AAC profile) needs to be stored once <code>#getSessionDescription()</code> is called | setPreferences | {
"repo_name": "MichaelChansn/RemoteEye",
"path": "RemoteEye/src/freescale/ks/remoteeye/streaming/audio/AACStream.java",
"license": "gpl-3.0",
"size": 12629
} | [
"android.content.SharedPreferences"
] | import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 607,017 |
public static Collection<String> newRandomStringList(int size, String... strings) {
if (size < 0) {
throw new IllegalArgumentException("Size cannot be less than 0. ");
}
if (strings == null || strings.length == 0) {
throw new IllegalArgumentException("strings must co... | static Collection<String> function(int size, String... strings) { if (size < 0) { throw new IllegalArgumentException(STR); } if (strings == null strings.length == 0) { throw new IllegalArgumentException(STR); } List<String> list = new ArrayList<String>(size); for (String string : strings) { for (int i = 0; i < size / 3... | /**
* Create a Collection containing the given size of the given strings. The order of strings in the collection is
* random.
*
* @param size The size of the collection to create.
* @param strings The strings to use to fill the collection.
*
* @return A Collection containing the gi... | Create a Collection containing the given size of the given strings. The order of strings in the collection is random | newRandomStringList | {
"repo_name": "wichtounet/benchmark-utils",
"path": "src/com/wicht/benchmark/utils/BenchUtils.java",
"license": "apache-2.0",
"size": 3075
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 119,100 |
public static void generateExplorerTypesXml(
Element startNode,
List<CmsExplorerTypeSettings> explorerTypes,
boolean module) {
// we need the default access node later to check if the explorer type is an individual setting
CmsExplorerTypeAccess defaultAccess = null;
... | static void function( Element startNode, List<CmsExplorerTypeSettings> explorerTypes, boolean module) { CmsExplorerTypeAccess defaultAccess = null; if (OpenCms.getWorkplaceManager() != null) { defaultAccess = OpenCms.getWorkplaceManager().getDefaultAccess(); } CmsMenuRuleTranslator menuRuleTranslator = new CmsMenuRuleT... | /**
* Creates the xml output for explorer type nodes.<p>
*
* @param startNode the startnode to add all rescource types to
* @param explorerTypes the list of explorer types
* @param module true if the XML tree for the module config should be generated, false otherwise
*/ | Creates the xml output for explorer type nodes | generateExplorerTypesXml | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/configuration/CmsWorkplaceConfiguration.java",
"license": "lgpl-2.1",
"size": 83465
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.Iterator",
"java.util.List",
"java.util.Map",
"org.dom4j.Element",
"org.opencms.i18n.CmsEncoder",
"org.opencms.main.OpenCms",
"org.opencms.util.CmsStringUtil",
"org.opencms.workplace.explorer.CmsExplorerContextMenuItem",
"org.opencms.wor... | import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import org.dom4j.Element; import org.opencms.i18n.CmsEncoder; import org.opencms.main.OpenCms; import org.opencms.util.CmsStringUtil; import org.opencms.workplace.explorer.CmsExplorerContext... | import java.util.*; import org.dom4j.*; import org.opencms.i18n.*; import org.opencms.main.*; import org.opencms.util.*; import org.opencms.workplace.explorer.*; import org.opencms.workplace.explorer.menu.*; | [
"java.util",
"org.dom4j",
"org.opencms.i18n",
"org.opencms.main",
"org.opencms.util",
"org.opencms.workplace"
] | java.util; org.dom4j; org.opencms.i18n; org.opencms.main; org.opencms.util; org.opencms.workplace; | 2,168,393 |
public static String toString(Node node) {
Buffer buf = new Buffer(4);
node.modelRepr(buf);
return buf.toString();
} | static String function(Node node) { Buffer buf = new Buffer(4); node.modelRepr(buf); return buf.toString(); } | /**
* Return a string representation of a node.
*/ | Return a string representation of a node | toString | {
"repo_name": "Squarespace/less-compiler",
"path": "src/main/java/com/squarespace/less/model/ModelUtils.java",
"license": "apache-2.0",
"size": 1408
} | [
"com.squarespace.less.core.Buffer"
] | import com.squarespace.less.core.Buffer; | import com.squarespace.less.core.*; | [
"com.squarespace.less"
] | com.squarespace.less; | 1,625,384 |
public Parameter createEntryPoint() {
Parameter param = new Parameter();
entryPointParams.add(param);
return param;
}
/**
* Converts {@code <define/>} nested elements into Compiler {@code @define} | Parameter function() { Parameter param = new Parameter(); entryPointParams.add(param); return param; } /** * Converts {@code <define/>} nested elements into Compiler {@code @define} | /**
* Creates a new {@code <entrypoint/>} nested element. Supports name
* attribute.
*/ | Creates a new nested element. Supports name attribute | createEntryPoint | {
"repo_name": "robbert/closure-compiler",
"path": "src/com/google/javascript/jscomp/ant/CompileTask.java",
"license": "apache-2.0",
"size": 22384
} | [
"com.google.javascript.jscomp.Compiler",
"org.apache.tools.ant.types.Parameter"
] | import com.google.javascript.jscomp.Compiler; import org.apache.tools.ant.types.Parameter; | import com.google.javascript.jscomp.*; import org.apache.tools.ant.types.*; | [
"com.google.javascript",
"org.apache.tools"
] | com.google.javascript; org.apache.tools; | 2,492,125 |
public void setArray(E[] array){
Validate.notNull(array, "The array must not be null.");
_array = array;
}
| void function(E[] array){ Validate.notNull(array, STR); _array = array; } | /**
* Set this wrapper to wrap a new array instance.
* @param array The new wrapped array.
*/ | Set this wrapper to wrap a new array instance | setArray | {
"repo_name": "JohnnPM/PartyLobby",
"path": "src/net/amoebaman/util/ArrayWrapper.java",
"license": "gpl-2.0",
"size": 2841
} | [
"org.apache.commons.lang.Validate"
] | import org.apache.commons.lang.Validate; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 568,370 |
EAttribute getReadingType_DefaultValueDataType(); | EAttribute getReadingType_DefaultValueDataType(); | /**
* Returns the meta object for the attribute '{@link CIM.IEC61968.Metering.ReadingType#getDefaultValueDataType <em>Default Value Data Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Default Value Data Type</em>'.
* @see CIM.IEC61968.Metering.R... | Returns the meta object for the attribute '<code>CIM.IEC61968.Metering.ReadingType#getDefaultValueDataType Default Value Data Type</code>'. | getReadingType_DefaultValueDataType | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61968/Metering/MeteringPackage.java",
"license": "mit",
"size": 264485
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 660,791 |
public void setModifiedDate(Date modifiedDate); | void function(Date modifiedDate); | /**
* Sets the modified date of this template file.
*
* @param modifiedDate the modified date of this template file
*/ | Sets the modified date of this template file | setModifiedDate | {
"repo_name": "hltn/opencps",
"path": "portlets/opencps-portlet/docroot/WEB-INF/service/org/opencps/servicemgt/model/TemplateFileModel.java",
"license": "agpl-3.0",
"size": 6637
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 682,544 |
@Nonnull
public TeamworkRequest select(@Nonnull final String value) {
addSelectOption(value);
return this;
} | TeamworkRequest function(@Nonnull final String value) { addSelectOption(value); return this; } | /**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/ | Sets the select clause for the request | select | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/TeamworkRequest.java",
"license": "mit",
"size": 5705
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,350,717 |
public ParameterList getQueryStringParams() {
try {
final ParameterList result = new ParameterList();
final String queryString = new URL(url).getQuery();
result.addQuerystring(queryString);
result.addAll(querystringParams);
return result;
}... | ParameterList function() { try { final ParameterList result = new ParameterList(); final String queryString = new URL(url).getQuery(); result.addQuerystring(queryString); result.addAll(querystringParams); return result; } catch (MalformedURLException mue) { throw new OAuthException(STR, mue); } } | /**
* Get a {@link ParameterList} with the query string parameters.
*
* @return a {@link ParameterList} containing the query string parameters.
* @throws OAuthException if the request URL is not valid.
*/ | Get a <code>ParameterList</code> with the query string parameters | getQueryStringParams | {
"repo_name": "chooco13/scribejava",
"path": "scribejava-core/src/main/java/com/github/scribejava/core/model/AbstractRequest.java",
"license": "mit",
"size": 8838
} | [
"com.github.scribejava.core.exceptions.OAuthException",
"java.net.MalformedURLException"
] | import com.github.scribejava.core.exceptions.OAuthException; import java.net.MalformedURLException; | import com.github.scribejava.core.exceptions.*; import java.net.*; | [
"com.github.scribejava",
"java.net"
] | com.github.scribejava; java.net; | 737,817 |
public void setDoubleClickSpeed(int speed) {
setValue(Property.DOUBLE_CLICK_SPEED, Checker.positiveOrZero(speed));
}
| void function(int speed) { setValue(Property.DOUBLE_CLICK_SPEED, Checker.positiveOrZero(speed)); } | /**
* Sets the double-click speed in milliseconds used to distinguish single-clicks from double-clicks whenever you need to capture both.
*
* @param speed the double-click speed in milliseconds
*/ | Sets the double-click speed in milliseconds used to distinguish single-clicks from double-clicks whenever you need to capture both | setDoubleClickSpeed | {
"repo_name": "pepstock-org/Charba",
"path": "src/org/pepstock/charba/client/annotation/AnnotationOptions.java",
"license": "apache-2.0",
"size": 9591
} | [
"org.pepstock.charba.client.commons.Checker"
] | import org.pepstock.charba.client.commons.Checker; | import org.pepstock.charba.client.commons.*; | [
"org.pepstock.charba"
] | org.pepstock.charba; | 1,971,473 |
public void registerInput(String varName, MLMatrix df) throws DMLRuntimeException {
registerInput(varName, MLMatrix.getRDDLazily(df), df.mc);
}
| void function(String varName, MLMatrix df) throws DMLRuntimeException { registerInput(varName, MLMatrix.getRDDLazily(df), df.mc); } | /**
* Experimental API. Not supported in Python MLContext API.
* @param varName
* @param df
* @throws DMLRuntimeException
*/ | Experimental API. Not supported in Python MLContext API | registerInput | {
"repo_name": "Wenpei/incubator-systemml",
"path": "src/main/java/org/apache/sysml/api/MLContext.java",
"license": "apache-2.0",
"size": 58727
} | [
"org.apache.sysml.runtime.DMLRuntimeException"
] | import org.apache.sysml.runtime.DMLRuntimeException; | import org.apache.sysml.runtime.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 1,290,795 |
public void setIcon(Drawable icon) {
this.icon = icon;
}
| void function(Drawable icon) { this.icon = icon; } | /**
* Set action icon
*
* @param icon {@link Drawable} action icon
*/ | Set action icon | setIcon | {
"repo_name": "djcoin/svn2git_gvsig_mini",
"path": "src/es/prodevelop/gvsig/mini/util/ActionItem.java",
"license": "gpl-2.0",
"size": 1490
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,129,553 |
@Nonnull
public static <E> ObservableSet<E> uiThreadAwareObservableSet(@Nonnull ObservableSet<E> source) {
requireNonNull(source, ERROR_SOURCE_NULL);
return source instanceof UIThreadAware ? source : new UIThreadAwareObservableSet<>(source);
}
private static class UIThreadAwareObservabl... | static <E> ObservableSet<E> function(@Nonnull ObservableSet<E> source) { requireNonNull(source, ERROR_SOURCE_NULL); return source instanceof UIThreadAware ? source : new UIThreadAwareObservableSet<>(source); } private static class UIThreadAwareObservableSet<E> extends DelegatingObservableSet<E> implements UIThreadAware... | /**
* Wraps an <tt>ObservableSet</tt>, publishing updates inside the UI thread.
*
* @param source the <tt>ObservableSet</tt> to be wrapped
* @param <E> the set's parameter type.
*
* @return a new <tt>ObservableSet</tt>
*/ | Wraps an ObservableSet, publishing updates inside the UI thread | uiThreadAwareObservableSet | {
"repo_name": "griffon/griffon",
"path": "subprojects/griffon-javafx/src/main/java/griffon/javafx/collections/GriffonFXCollections.java",
"license": "apache-2.0",
"size": 5206
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,059,870 |
Log.d("mylog","JavascriptHandler.handlerToast is called : " + val);
this.parentActivity.activityToast(val);
} | Log.d("mylog",STR + val); this.parentActivity.activityToast(val); } | /** Method called by android.js, which simply passes the string to the {@link MainActivity#activityToast(String) activityToast} method to be toasted.
*
* @param val A string to be passed onto the {@link MainActivity MainActivity} to be toasted.
*/ | Method called by android.js, which simply passes the string to the <code>MainActivity#activityToast(String) activityToast</code> method to be toasted | handlerToast | {
"repo_name": "GrayGwizdz/droidstrap",
"path": "src/com/gray/gwizdz/example/droidstrap/JavascriptHandler.java",
"license": "apache-2.0",
"size": 1535
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 996,461 |
@ApiModelProperty(example = "null", required = true, value = "Was the war declared mutual by both parties")
public Boolean getMutual() {
return mutual;
} | @ApiModelProperty(example = "null", required = true, value = STR) Boolean function() { return mutual; } | /**
* Was the war declared mutual by both parties
* @return mutual
**/ | Was the war declared mutual by both parties | getMutual | {
"repo_name": "Tmin10/EVE-Security-Service",
"path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/GetWarsWarIdOk.java",
"license": "gpl-3.0",
"size": 8579
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,588,921 |
public Builder compoundingMethod(CompoundingMethod compoundingMethod) {
this.compoundingMethod = compoundingMethod;
return this;
} | Builder function(CompoundingMethod compoundingMethod) { this.compoundingMethod = compoundingMethod; return this; } | /**
* Sets the compounding method to use when there is more than one accrual period
* in each payment period, optional with defaulting getter.
* <p>
* Compounding is used when combining accrual periods.
* <p>
* This will default to 'None' if not specified.
* @param compoundingMethod ... | Sets the compounding method to use when there is more than one accrual period in each payment period, optional with defaulting getter. Compounding is used when combining accrual periods. This will default to 'None' if not specified | compoundingMethod | {
"repo_name": "nssales/Strata",
"path": "modules/finance/src/main/java/com/opengamma/strata/finance/rate/swap/type/IborRateSwapLegConvention.java",
"license": "apache-2.0",
"size": 58626
} | [
"com.opengamma.strata.finance.rate.swap.CompoundingMethod"
] | import com.opengamma.strata.finance.rate.swap.CompoundingMethod; | import com.opengamma.strata.finance.rate.swap.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 1,749,230 |
@CheckReturnValue
Stream<RelationType> relationTypes(); | Stream<RelationType> relationTypes(); | /**
* Returns the RelationTypes that this Role takes part in.
* @see RelationType
*
* @return The RelationTypes which this role takes part in.
*/ | Returns the RelationTypes that this Role takes part in | relationTypes | {
"repo_name": "sheldonkhall/grakn",
"path": "grakn-core/src/main/java/ai/grakn/concept/Role.java",
"license": "gpl-3.0",
"size": 3013
} | [
"java.util.stream.Stream"
] | import java.util.stream.Stream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 1,134,719 |
@Test
public void testEmpty1() {
setMethod(M_EMPTY);
assertTrue(getPosition(), empty(null));
} | void function() { setMethod(M_EMPTY); assertTrue(getPosition(), empty(null)); } | /**
* Validator.empty: true
*/ | Validator.empty: true | testEmpty1 | {
"repo_name": "silentbalanceyh/lyra",
"path": "lyra-bus/util-comet/src/test/java/com/test/lyra/util/internal/Validator1TestCase.java",
"license": "gpl-3.0",
"size": 2067
} | [
"com.lyra.util.internal.Validator",
"org.junit.Assert"
] | import com.lyra.util.internal.Validator; import org.junit.Assert; | import com.lyra.util.internal.*; import org.junit.*; | [
"com.lyra.util",
"org.junit"
] | com.lyra.util; org.junit; | 1,810,211 |
public Map<String,Float> getParameters() {
return parameters;
}
| Map<String,Float> function() { return parameters; } | /**
* Returns an unmodifiable view of the parameters.
*
* @return the parameters
*/ | Returns an unmodifiable view of the parameters | getParameters | {
"repo_name": "jnhankins/JavaFlameFractals",
"path": "JFF/src/com/jnhankins/jff/flame/VariationDefinition.java",
"license": "mit",
"size": 55446
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,614,352 |
public void setCookies(Cookie[] cookies) {
this.cookies = cookies;
} | void function(Cookie[] cookies) { this.cookies = cookies; } | /** Sets the cookies.
*
* @param cookies
* the new cookies
*/ | Sets the cookies | setCookies | {
"repo_name": "alarulrajan/CodeFest",
"path": "test/com/technoetic/xplanner/XPlannerTestSupport.java",
"license": "gpl-2.0",
"size": 25627
} | [
"javax.servlet.http.Cookie"
] | import javax.servlet.http.Cookie; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 9,622 |
@Test
void propertyNameIsTranslationKey() throws Exception
{
this.config.getQuery().getProperties().add("releaseDate");
this.defaultConfig.getQuery().getSource().setParameter("translationPrefix", "release.livetable.");
LiveDataPropertyDescriptor propertyDescriptorReleaseDate = new L... | void propertyNameIsTranslationKey() throws Exception { this.config.getQuery().getProperties().add(STR); this.defaultConfig.getQuery().getSource().setParameter(STR, STR); LiveDataPropertyDescriptor propertyDescriptorReleaseDate = new LiveDataPropertyDescriptor(); propertyDescriptorReleaseDate.setId(STR); propertyDescrip... | /**
* This test asserts that the translation is used for the name of a property, even if the property has a defined
* pretty name.
*/ | This test asserts that the translation is used for the name of a property, even if the property has a defined pretty name | propertyNameIsTranslationKey | {
"repo_name": "xwiki/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-livetable/src/test/java/org/xwiki/livedata/internal/livetable/DefaultLiveDataConfigurationResolverTest.java",
"license": "lgpl-2.1",
"size": 12742
} | [
"org.junit.jupiter.api.Assertions",
"org.mockito.Mockito",
"org.xwiki.livedata.LiveDataConfiguration",
"org.xwiki.livedata.LiveDataPropertyDescriptor",
"org.xwiki.livedata.LiveDataPropertyDescriptorStore"
] | import org.junit.jupiter.api.Assertions; import org.mockito.Mockito; import org.xwiki.livedata.LiveDataConfiguration; import org.xwiki.livedata.LiveDataPropertyDescriptor; import org.xwiki.livedata.LiveDataPropertyDescriptorStore; | import org.junit.jupiter.api.*; import org.mockito.*; import org.xwiki.livedata.*; | [
"org.junit.jupiter",
"org.mockito",
"org.xwiki.livedata"
] | org.junit.jupiter; org.mockito; org.xwiki.livedata; | 592,385 |
public void setExcludedTaskNames(Iterable<String> excludedTaskNames) {
this.excludedTaskNames = Sets.newLinkedHashSet(excludedTaskNames);
} | void function(Iterable<String> excludedTaskNames) { this.excludedTaskNames = Sets.newLinkedHashSet(excludedTaskNames); } | /**
* Sets the tasks to exclude from this build.
*
* @param excludedTaskNames The task names.
*/ | Sets the tasks to exclude from this build | setExcludedTaskNames | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/core-api/src/main/java/org/gradle/StartParameter.java",
"license": "apache-2.0",
"size": 27616
} | [
"com.google.common.collect.Sets"
] | import com.google.common.collect.Sets; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,012,864 |
ServiceCall<Void> post307Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | ServiceCall<Void> post307Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException; | /**
* Post redirected with 307, resulting in a 200 after redirect.
*
* @param booleanValue Simple boolean value true
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if callback is null
* @return the {@l... | Post redirected with 307, resulting in a 200 after redirect | post307Async | {
"repo_name": "yaqiyang/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpRedirects.java",
"license": "mit",
"size": 22215
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 110,816 |
public static void setTranslationX(View view, float value) {
IMPL.setTranslationX(view, value);
} | static void function(View view, float value) { IMPL.setTranslationX(view, value); } | /**
* Sets the horizontal location of this view relative to its left position.
* This effectively positions the object post-layout, in addition to wherever the object's
* layout placed it.
*
* <p>Prior to API 11 this will have no effect.</p>
*
* @param value The horizontal position of... | Sets the horizontal location of this view relative to its left position. This effectively positions the object post-layout, in addition to wherever the object's layout placed it. Prior to API 11 this will have no effect | setTranslationX | {
"repo_name": "madhavanks26/com.vliesaputra.deviceinformation",
"path": "src/com/vliesaputra/cordova/plugins/android/support/v4/src/java/android/support/v4/view/ViewCompat.java",
"license": "mit",
"size": 127830
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 757,727 |
public boolean setStringValue( Object item, Object element, String key,
String newValue ) throws SemanticException
{
if ( key.equals( SortKey.KEY_MEMBER ) )
{
String value = DEUtil.getExpression( getResultSetColumn( newValue ) );
if ( value != null )
newValue = value;
}
String saveValue = newV... | boolean function( Object item, Object element, String key, String newValue ) throws SemanticException { if ( key.equals( SortKey.KEY_MEMBER ) ) { String value = DEUtil.getExpression( getResultSetColumn( newValue ) ); if ( value != null ) newValue = value; } String saveValue = newValue; StructureHandle handle = (Structu... | /**
* Saves new property value to sort
*
* @param element
* DesignElementHandle object.
* @param element
* Sort object
* @param key
* Property key
* @param newValue
* new value
* @return
* @throws SemanticException
* @throws NameException
*/ | Saves new property value to sort | setStringValue | {
"repo_name": "Charling-Huang/birt",
"path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/views/attributes/providers/SortingModelProvider.java",
"license": "epl-1.0",
"size": 10597
} | [
"org.eclipse.birt.report.designer.util.DEUtil",
"org.eclipse.birt.report.model.api.StructureHandle",
"org.eclipse.birt.report.model.api.activity.SemanticException",
"org.eclipse.birt.report.model.api.elements.structures.SortKey",
"org.eclipse.birt.report.model.api.metadata.IChoice"
] | import org.eclipse.birt.report.designer.util.DEUtil; import org.eclipse.birt.report.model.api.StructureHandle; import org.eclipse.birt.report.model.api.activity.SemanticException; import org.eclipse.birt.report.model.api.elements.structures.SortKey; import org.eclipse.birt.report.model.api.metadata.IChoice; | import org.eclipse.birt.report.designer.util.*; import org.eclipse.birt.report.model.api.*; import org.eclipse.birt.report.model.api.activity.*; import org.eclipse.birt.report.model.api.elements.structures.*; import org.eclipse.birt.report.model.api.metadata.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 931,447 |
public ConnectionFactoryBuilder setTranscoder(Transcoder<Object> t) {
transcoder = t;
return this;
} | ConnectionFactoryBuilder function(Transcoder<Object> t) { transcoder = t; return this; } | /**
* Set the default transcoder.
*/ | Set the default transcoder | setTranscoder | {
"repo_name": "couchbase/spymemcached",
"path": "src/main/java/net/spy/memcached/ConnectionFactoryBuilder.java",
"license": "mit",
"size": 13625
} | [
"net.spy.memcached.transcoders.Transcoder"
] | import net.spy.memcached.transcoders.Transcoder; | import net.spy.memcached.transcoders.*; | [
"net.spy.memcached"
] | net.spy.memcached; | 2,435,639 |
public void setRestrictedUserAgents(Pattern[] restrictedUserAgents) {
this.restrictedUserAgents = restrictedUserAgents;
} | void function(Pattern[] restrictedUserAgents) { this.restrictedUserAgents = restrictedUserAgents; } | /**
* Set restricted user agent list (this method is best when used with
* a large number of connectors, where it would be better to have all of
* them referenced a single array).
*/ | Set restricted user agent list (this method is best when used with a large number of connectors, where it would be better to have all of them referenced a single array) | setRestrictedUserAgents | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/Http11NioProcessor.java",
"license": "mit",
"size": 54880
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 2,368,240 |
public long updateAuxiliary(RelationshipAttribute relationshipAttribute); | long function(RelationshipAttribute relationshipAttribute); | /**
* Este metodo es encargado de actualizar el valor seleccionado de un helper table
* @param relationshipAttribute la relacion
*/ | Este metodo es encargado de actualizar el valor seleccionado de un helper table | updateAuxiliary | {
"repo_name": "MedicalTrends/semantikos",
"path": "SemantikosKernelEJB/src/cl/minsal/semantikos/kernel/daos/HelperTableDAO.java",
"license": "gpl-3.0",
"size": 4660
} | [
"cl.minsal.semantikos.model.relationships.RelationshipAttribute"
] | import cl.minsal.semantikos.model.relationships.RelationshipAttribute; | import cl.minsal.semantikos.model.relationships.*; | [
"cl.minsal.semantikos"
] | cl.minsal.semantikos; | 2,249,647 |
public int writeBulk(int out_ep_address, byte[] data, int size,
int timeout, boolean reopenOnTimeout) throws USBException {
if (usbDevHandle == 0) {
throw new USBException("invalid device handle");
}
if (data == null) {
throw new USBException("data must not be null");
}
if (size <= 0 || size > dat... | int function(int out_ep_address, byte[] data, int size, int timeout, boolean reopenOnTimeout) throws USBException { if (usbDevHandle == 0) { throw new USBException(STR); } if (data == null) { throw new USBException(STR); } if (size <= 0 size > data.length) { throw new ArrayIndexOutOfBoundsException(STR + size); } int l... | /**
* Write data to the device using a bulk transfer.<br>
*
* @param out_ep_address
* endpoint address to write to
* @param data
* data to write to this endpoint
* @param size
* size of the data
* @param timeout
* amount of time in ms the device will try ... | Write data to the device using a bulk transfer | writeBulk | {
"repo_name": "vpereira/golden_unicorn",
"path": "ztex/libusbJava-src/ch/ntb/usb/Device.java",
"license": "gpl-3.0",
"size": 24062
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 761,782 |
BucketedSort newBucketedSort(BigArrays bigArrays, @Nullable Object missingValue, MultiValueMode sortMode,
Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra); | BucketedSort newBucketedSort(BigArrays bigArrays, @Nullable Object missingValue, MultiValueMode sortMode, Nested nested, SortOrder sortOrder, DocValueFormat format, int bucketSize, BucketedSort.ExtraData extra); | /**
* Build a sort implementation specialized for aggregations.
*/ | Build a sort implementation specialized for aggregations | newBucketedSort | {
"repo_name": "HonzaKral/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/index/fielddata/IndexFieldData.java",
"license": "apache-2.0",
"size": 10867
} | [
"org.elasticsearch.common.Nullable",
"org.elasticsearch.common.util.BigArrays",
"org.elasticsearch.index.fielddata.IndexFieldData",
"org.elasticsearch.search.DocValueFormat",
"org.elasticsearch.search.MultiValueMode",
"org.elasticsearch.search.sort.BucketedSort",
"org.elasticsearch.search.sort.SortOrder... | import org.elasticsearch.common.Nullable; import org.elasticsearch.common.util.BigArrays; import org.elasticsearch.index.fielddata.IndexFieldData; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.MultiValueMode; import org.elasticsearch.search.sort.BucketedSort; import org.elasticsearch.s... | import org.elasticsearch.common.*; import org.elasticsearch.common.util.*; import org.elasticsearch.index.fielddata.*; import org.elasticsearch.search.*; import org.elasticsearch.search.sort.*; | [
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.search"
] | org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.search; | 468,036 |
@PUT
@Path("/{ruleId}")
@Consumes("application/json")
public Response editExistingRule(RuleDTO ruleUpdate, @PathParam("apiKey") String apiKey, @PathParam("ruleId") long ruleId)
{
// We first have to retrieve the application. We send an error if it is not found.
App app = appDAO.get(a... | @Path(STR) @Consumes(STR) Response function(RuleDTO ruleUpdate, @PathParam(STR) String apiKey, @PathParam(STR) long ruleId) { App app = appDAO.get(apiKey); if (app == null) {return Response.status(400).entity(STR).build();} Rule rule = appDAO.getRule(app, ruleId); if (rule == null) {return Response.status(400).entity(S... | /**
* Edition of rules
*
* @param ruleId : the id of the rule to be edited
* @param rule : the new data of the rule
* @param apiKey : the apiKey of the application that owns the rule
* @return will update the specified rule with the provided data
*/ | Edition of rules | editExistingRule | {
"repo_name": "jurporan/Teaching-HEIGVD-AMT-2015-Project",
"path": "src/Gary/src/main/java/ch/heigvd/amt/gary/rest/ressources/Rules.java",
"license": "mit",
"size": 5227
} | [
"ch.heigvd.amt.gary.models.entities.App",
"ch.heigvd.amt.gary.models.entities.Rule",
"ch.heigvd.amt.gary.rest.dto.RuleDTO",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.core.Response"
] | import ch.heigvd.amt.gary.models.entities.App; import ch.heigvd.amt.gary.models.entities.Rule; import ch.heigvd.amt.gary.rest.dto.RuleDTO; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; | import ch.heigvd.amt.gary.models.entities.*; import ch.heigvd.amt.gary.rest.dto.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"ch.heigvd.amt",
"javax.ws"
] | ch.heigvd.amt; javax.ws; | 2,195,851 |
public TypedFieldId getFieldIdIfMatches(int id, SchemaPath expectedPath); | TypedFieldId function(int id, SchemaPath expectedPath); | /**
* Traverse the object graph and determine whether the provided SchemaPath matches data within the Wrapper. If so, return a TypedFieldId associated with this path.
* @return TypedFieldId
*/ | Traverse the object graph and determine whether the provided SchemaPath matches data within the Wrapper. If so, return a TypedFieldId associated with this path | getFieldIdIfMatches | {
"repo_name": "pwong-mapr/incubator-drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/record/VectorWrapper.java",
"license": "apache-2.0",
"size": 1708
} | [
"org.apache.drill.common.expression.SchemaPath"
] | import org.apache.drill.common.expression.SchemaPath; | import org.apache.drill.common.expression.*; | [
"org.apache.drill"
] | org.apache.drill; | 488,985 |
@JsonProperty("from")
public Email getFrom() {
return this.from;
} | @JsonProperty("from") Email function() { return this.from; } | /**
* Get the email's from address.
* @return the email's from address.
*/ | Get the email's from address | getFrom | {
"repo_name": "pushkyn/sendgrid-java",
"path": "src/main/java/com/sendgrid/helpers/mail/Mail.java",
"license": "mit",
"size": 15678
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 169,914 |
Collection<? extends TimePeriod> getCoversTimePeriod(); | Collection<? extends TimePeriod> getCoversTimePeriod(); | /**
* Gets all property values for the coversTimePeriod property.<p>
*
* @returns a collection of values for the coversTimePeriod property.
*/ | Gets all property values for the coversTimePeriod property | getCoversTimePeriod | {
"repo_name": "cybershare/elseweb-v2",
"path": "harvester/src/main/java/edu/utep/cybershare/elseweb/ontology/PublishedMODISDataset.java",
"license": "gpl-2.0",
"size": 7822
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 484,697 |
static protected void assemblyException( AssemblyException exception )
throws AssemblyException
{
throw exception;
} | static void function( AssemblyException exception ) throws AssemblyException { throw exception; } | /**
* This method is called when there was an AssemblyException in the creation of the Qi4j application model.
* <p>
* Override this method to catch valid failures to place into satisfiedBy suites.
* </p>
*
* @param exception the exception thrown.
*
* @throws org.qi4j.bootstrap.A... | This method is called when there was an AssemblyException in the creation of the Qi4j application model. Override this method to catch valid failures to place into satisfiedBy suites. | assemblyException | {
"repo_name": "joobn72/qi4j-sdk",
"path": "core/testsupport/src/main/java/org/qi4j/test/AbstractQi4jScenarioTest.java",
"license": "apache-2.0",
"size": 4819
} | [
"org.qi4j.bootstrap.AssemblyException"
] | import org.qi4j.bootstrap.AssemblyException; | import org.qi4j.bootstrap.*; | [
"org.qi4j.bootstrap"
] | org.qi4j.bootstrap; | 2,141,251 |
private static void matlabToSvdlibcSparseBinary(File input, File output,
boolean transpose)
throws IOException {
MATRIX_IO_LOGGER.info("Converting from Matlab double values to " +
"SVDLIBC float values; possible ... | static void function(File input, File output, boolean transpose) throws IOException { MATRIX_IO_LOGGER.info(STR + STR + STR); BufferedReader br = new BufferedReader(new FileReader(input)); Map<Integer,Integer> colToNonZero = new HashMap<Integer,Integer>(); int rows = 0, cols = 0, nonZero = 0; for (String line = null; (... | /**
* Reads in a matrix in the {@link Format#MATLAB_SPARSE} format and writes
* it to the output file in {@link Format#SVDLIBC_SPARSE_BINARY} format.
*/ | Reads in a matrix in the <code>Format#MATLAB_SPARSE</code> format and writes it to the output file in <code>Format#SVDLIBC_SPARSE_BINARY</code> format | matlabToSvdlibcSparseBinary | {
"repo_name": "fozziethebeat/S-Space",
"path": "src/main/java/edu/ucla/sspace/matrix/MatrixIO.java",
"license": "gpl-2.0",
"size": 58264
} | [
"java.io.BufferedOutputStream",
"java.io.BufferedReader",
"java.io.DataOutputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.FileReader",
"java.io.IOException",
"java.util.HashMap",
"java.util.Map",
"java.util.SortedMap",
"java.util.TreeMap"
] | import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,447,020 |
// Cache the shell and display.
this.shell = view.tabFolder.getShell();
this.display = this.shell.getDisplay();
// Remove old table if present
boolean initResources = this.table == null;
if (this.table != null) {
disposeTable();
}
// Create the "children" table
int style = SWT.MULTI | SWT.BORDER | SWT.H_SC... | this.shell = view.tabFolder.getShell(); this.display = this.shell.getDisplay(); boolean initResources = this.table == null; if (this.table != null) { disposeTable(); } int style = SWT.MULTI SWT.BORDER SWT.H_SCROLL SWT.V_SCROLL SWT.FULL_SELECTION; this.table = new Table(view.tabFolder, style); this.table.setLinesVisible... | /**
* Creates the tab folder page.
*
* @param view The view on which to create the tab folder page
* @return the new page for the tab folder
*/ | Creates the tab folder page | createTabFolderPage | {
"repo_name": "HossainKhademian/Studio3",
"path": "tests/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/ui/BuildsComparisonTab.java",
"license": "gpl-3.0",
"size": 18193
} | [
"java.util.HashMap",
"org.eclipse.swt.layout.GridData",
"org.eclipse.swt.widgets.Table",
"org.eclipse.swt.widgets.TableColumn",
"org.eclipse.test.internal.performance.results.model.PerformanceResultsElement",
"org.eclipse.test.internal.performance.results.utils.IPerformancesConstants"
] | import java.util.HashMap; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.TableColumn; import org.eclipse.test.internal.performance.results.model.PerformanceResultsElement; import org.eclipse.test.internal.performance.results.utils.IPerformancesConstants; | import java.util.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; import org.eclipse.test.internal.performance.results.model.*; import org.eclipse.test.internal.performance.results.utils.*; | [
"java.util",
"org.eclipse.swt",
"org.eclipse.test"
] | java.util; org.eclipse.swt; org.eclipse.test; | 2,474,770 |
public static <T> PulsarSourceBuilder<T> builder(DeserializationSchema<T> deserializationSchema) {
Preconditions.checkNotNull(deserializationSchema, "deserializationSchema cannot be null");
return new PulsarSourceBuilder<>(deserializationSchema);
} | static <T> PulsarSourceBuilder<T> function(DeserializationSchema<T> deserializationSchema) { Preconditions.checkNotNull(deserializationSchema, STR); return new PulsarSourceBuilder<>(deserializationSchema); } | /**
* Creates a PulsarSourceBuilder.
*
* @param deserializationSchema the deserializer used to convert between Pulsar's byte messages and Flink's objects.
* @return a builder
*/ | Creates a PulsarSourceBuilder | builder | {
"repo_name": "merlimat/pulsar",
"path": "pulsar-flink/src/main/java/org/apache/flink/streaming/connectors/pulsar/PulsarSourceBuilder.java",
"license": "apache-2.0",
"size": 13936
} | [
"org.apache.flink.api.common.serialization.DeserializationSchema",
"org.apache.flink.util.Preconditions"
] | import org.apache.flink.api.common.serialization.DeserializationSchema; import org.apache.flink.util.Preconditions; | import org.apache.flink.api.common.serialization.*; import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 375,620 |
public void release()
{
for(String name : allMetrics)
{
Metrics.remove(factory.createMetricName(name));
}
// latency metrics contain multiple metrics internally and need to be released manually
readLatency.release();
writeLatency.release();
ra... | void function() { for(String name : allMetrics) { Metrics.remove(factory.createMetricName(name)); } readLatency.release(); writeLatency.release(); rangeLatency.release(); } | /**
* Release all associated metrics.
*/ | Release all associated metrics | release | {
"repo_name": "mourao666/cassandra-sim",
"path": "src/java/org/apache/cassandra/metrics/KeyspaceMetrics.java",
"license": "apache-2.0",
"size": 12912
} | [
"org.apache.cassandra.metrics.CassandraMetricsRegistry"
] | import org.apache.cassandra.metrics.CassandraMetricsRegistry; | import org.apache.cassandra.metrics.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 892,526 |
void waitForNotVisible() throws WidgetException, WidgetTimeoutException; | void waitForNotVisible() throws WidgetException, WidgetTimeoutException; | /**
* Implementing this method would allow for the test to wait until the
* element is no longer visible before progressing
*
* @throws WidgetException
*/ | Implementing this method would allow for the test to wait until the element is no longer visible before progressing | waitForNotVisible | {
"repo_name": "knappk/JTAF-ExtWebDriver",
"path": "src/main/java/org/finra/jtaf/ewd/widget/IElement.java",
"license": "apache-2.0",
"size": 16930
} | [
"org.finra.jtaf.ewd.timer.WidgetTimeoutException"
] | import org.finra.jtaf.ewd.timer.WidgetTimeoutException; | import org.finra.jtaf.ewd.timer.*; | [
"org.finra.jtaf"
] | org.finra.jtaf; | 2,474,247 |
public void setContents(String contents)
{
annot.setString(COSName.CONTENTS, contents);
} | void function(String contents) { annot.setString(COSName.CONTENTS, contents); } | /**
* Set the contents, or a description, for an annotation.
*
* @param contents The annotation contents, or a description.
*/ | Set the contents, or a description, for an annotation | setContents | {
"repo_name": "benmccann/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotation.java",
"license": "apache-2.0",
"size": 27440
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 2,788,747 |
public void translate(SecondPassData secondPassData, boolean insideDoInitAction, GraphSourceItem lineStartIns, TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, Stri... | void function(SecondPassData secondPassData, boolean insideDoInitAction, GraphSourceItem lineStartIns, TranslateStack stack, List<GraphTargetItem> output, HashMap<Integer, String> regNames, HashMap<String, GraphTargetItem> variables, HashMap<String, GraphTargetItem> functions, int staticOperation, String path) throws I... | /**
* Translates this function to stack and output.
*
* @param secondPassData
* @param insideDoInitAction
* @param lineStartIns Line start instruction
* @param stack Stack
* @param output Output
* @param regNames Register names
* @param variables Variables
* @param func... | Translates this function to stack and output | translate | {
"repo_name": "jindrapetrik/jpexs-decompiler",
"path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/Action.java",
"license": "gpl-3.0",
"size": 49360
} | [
"com.jpexs.decompiler.graph.GraphSourceItem",
"com.jpexs.decompiler.graph.GraphTargetItem",
"com.jpexs.decompiler.graph.SecondPassData",
"com.jpexs.decompiler.graph.TranslateStack",
"java.util.HashMap",
"java.util.List"
] | import com.jpexs.decompiler.graph.GraphSourceItem; import com.jpexs.decompiler.graph.GraphTargetItem; import com.jpexs.decompiler.graph.SecondPassData; import com.jpexs.decompiler.graph.TranslateStack; import java.util.HashMap; import java.util.List; | import com.jpexs.decompiler.graph.*; import java.util.*; | [
"com.jpexs.decompiler",
"java.util"
] | com.jpexs.decompiler; java.util; | 1,050,876 |
public void setByteArrayValue(@Nullable byte[] value); | void function(@Nullable byte[] value); | /**
* Sets a single {@code byte[]} value to this object.
* <p>
* After calling this function, the type of this object is set to
* {@link Type#BYTE_ARRAY}, all previous values of this object is cleared, and
* the new value is set to this object.
* </p>
*
* @param value
* the new {@cod... | Sets a single byte[] value to this object. After calling this function, the type of this object is set to <code>Type#BYTE_ARRAY</code>, all previous values of this object is cleared, and the new value is set to this object. | setByteArrayValue | {
"repo_name": "Haixing-Hu/commons",
"path": "src/main/java/com/github/haixing_hu/util/value/MultiValues.java",
"license": "apache-2.0",
"size": 81305
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,409,827 |
private void populateCurrentChatMember() {
try {
if (currentChatMember == null) {
// Remember this locally
currentChatMember = Utils.getSetting(this, Const.CHAT_MEMBER, ChatMember.class);
// Load the private key from the shared prefs
... | void function() { try { if (currentChatMember == null) { currentChatMember = Utils.getSetting(this, Const.CHAT_MEMBER, ChatMember.class); currentPrivateKey = Utils.getPrivateKeyFromSharedPrefs(this); checkPlayServicesAndRegister(); } } catch (RetrofitError e) { Utils.log(e); } } | /**
* Checks device for Play Services APK.
* Initializes current chat member, if not already initialized
* shows dialog to enter display name.
*/ | Checks device for Play Services APK. Initializes current chat member, if not already initialized shows dialog to enter display name | populateCurrentChatMember | {
"repo_name": "DerGenaue/TumCampusApp",
"path": "app/src/main/java/de/tum/in/tumcampus/activities/ChatRoomsActivity.java",
"license": "gpl-2.0",
"size": 19104
} | [
"de.tum.in.tumcampus.auxiliary.Const",
"de.tum.in.tumcampus.auxiliary.Utils",
"de.tum.in.tumcampus.models.ChatMember"
] | import de.tum.in.tumcampus.auxiliary.Const; import de.tum.in.tumcampus.auxiliary.Utils; import de.tum.in.tumcampus.models.ChatMember; | import de.tum.in.tumcampus.auxiliary.*; import de.tum.in.tumcampus.models.*; | [
"de.tum.in"
] | de.tum.in; | 546,925 |
public List<JSTypeExpression> getThrownTypes() {
if (info == null || info.thrownTypes == null) {
return ImmutableList.of();
}
return Collections.unmodifiableList(info.thrownTypes);
} | List<JSTypeExpression> function() { if (info == null info.thrownTypes == null) { return ImmutableList.of(); } return Collections.unmodifiableList(info.thrownTypes); } | /**
* Returns the list of thrown types.
*/ | Returns the list of thrown types | getThrownTypes | {
"repo_name": "ehsan/js-symbolic-executor",
"path": "closure-compiler/src/com/google/javascript/rhino/JSDocInfo.java",
"license": "apache-2.0",
"size": 31979
} | [
"com.google.common.collect.ImmutableList",
"java.util.Collections",
"java.util.List"
] | import com.google.common.collect.ImmutableList; import java.util.Collections; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,059,934 |
public BucketLoggingConfiguration getBucketLoggingConfiguration(String bucketName)
throws AmazonClientException, AmazonServiceException; | BucketLoggingConfiguration function(String bucketName) throws AmazonClientException, AmazonServiceException; | /**
* <p>
* Gets the logging configuration for the specified bucket.
* The bucket
* logging configuration object indicates if server access logging is
* enabled the specified bucket, the destination bucket
* where server access logs are delivered, and the optional log file prefix.
* <... | Gets the logging configuration for the specified bucket. The bucket logging configuration object indicates if server access logging is enabled the specified bucket, the destination bucket where server access logs are delivered, and the optional log file prefix. | getBucketLoggingConfiguration | {
"repo_name": "vromero/aws-sdk-java",
"path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3.java",
"license": "apache-2.0",
"size": 189693
} | [
"com.amazonaws.AmazonClientException",
"com.amazonaws.AmazonServiceException",
"com.amazonaws.services.s3.model.BucketLoggingConfiguration"
] | import com.amazonaws.AmazonClientException; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.s3.model.BucketLoggingConfiguration; | import com.amazonaws.*; import com.amazonaws.services.s3.model.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 1,370,892 |
@SuppressWarnings("unchecked")
@Test
public void testEvaluateFilterEventTimeRangeFilter() throws Exception {
CalendarFilterEvaluater evaluater = new CalendarFilterEvaluater();
Calendar calendar = getCalendar("cal1.ics");
CalendarFilter filter = new CalendarFilter();... | @SuppressWarnings(STR) void function() throws Exception { CalendarFilterEvaluater evaluater = new CalendarFilterEvaluater(); Calendar calendar = getCalendar(STR); CalendarFilter filter = new CalendarFilter(); ComponentFilter compFilter = new ComponentFilter(STR); ComponentFilter eventFilter = new ComponentFilter(STR); ... | /**
* Tests evaluate filter event: time range filter.
* @throws Exception - if something is wrong this exception is thrown.
*/ | Tests evaluate filter event: time range filter | testEvaluateFilterEventTimeRangeFilter | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/calendar/query/CalendarFilterEvaluaterTest.java",
"license": "apache-2.0",
"size": 23775
} | [
"net.fortuna.ical4j.model.Calendar",
"net.fortuna.ical4j.model.DateTime",
"net.fortuna.ical4j.model.Period",
"org.junit.Assert"
] | import net.fortuna.ical4j.model.Calendar; import net.fortuna.ical4j.model.DateTime; import net.fortuna.ical4j.model.Period; import org.junit.Assert; | import net.fortuna.ical4j.model.*; import org.junit.*; | [
"net.fortuna.ical4j",
"org.junit"
] | net.fortuna.ical4j; org.junit; | 1,370,749 |
private static String buildUserAgent(Context context) {
try {
final PackageManager manager = context.getPackageManager();
final PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0);
// Some APIs require "(gzip)" in the user-agent string.
ret... | static String function(Context context) { try { final PackageManager manager = context.getPackageManager(); final PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0); return info.packageName + "/" + info.versionName + STR + info.versionCode + STR; } catch (NameNotFoundException e) { return null; } } ... | /**
* Build and return a user-agent string that can identify this application
* to remote servers. Contains the package name and version code.
*/ | Build and return a user-agent string that can identify this application to remote servers. Contains the package name and version code | buildUserAgent | {
"repo_name": "mak0t0san/VimeoDroid",
"path": "src/com/makotosan/vimeodroid/common/HttpHelper.java",
"license": "gpl-2.0",
"size": 5540
} | [
"android.content.Context",
"android.content.pm.PackageInfo",
"android.content.pm.PackageManager",
"org.apache.http.HttpEntity",
"org.apache.http.entity.HttpEntityWrapper"
] | import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import org.apache.http.HttpEntity; import org.apache.http.entity.HttpEntityWrapper; | import android.content.*; import android.content.pm.*; import org.apache.http.*; import org.apache.http.entity.*; | [
"android.content",
"org.apache.http"
] | android.content; org.apache.http; | 1,350,897 |
val list = new ArrayList<String>(items.size());
items.forEach(d -> {
if (d instanceof XSURI) {
list.add(((XSURI) d).getURI());
} else if (d instanceof XSString) {
list.add(((XSString) d).getValue());
}
});
return list;
} | val list = new ArrayList<String>(items.size()); items.forEach(d -> { if (d instanceof XSURI) { list.add(((XSURI) d).getURI()); } else if (d instanceof XSString) { list.add(((XSString) d).getValue()); } }); return list; } | /**
* Gets string values from the list of mdui objects.
*
* @param items the items
* @return the string values
*/ | Gets string values from the list of mdui objects | getStringValues | {
"repo_name": "fogbeam/cas_mirror",
"path": "support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/SamlMetadataUIInfo.java",
"license": "apache-2.0",
"size": 7704
} | [
"java.util.ArrayList",
"org.opensaml.core.xml.schema.XSString"
] | import java.util.ArrayList; import org.opensaml.core.xml.schema.XSString; | import java.util.*; import org.opensaml.core.xml.schema.*; | [
"java.util",
"org.opensaml.core"
] | java.util; org.opensaml.core; | 2,611,727 |
protected void setFixture(ItemFlow fixture) {
this.fixture = fixture;
} | void function(ItemFlow fixture) { this.fixture = fixture; } | /**
* Sets the fixture for this Item Flow test case.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/ | Sets the fixture for this Item Flow test case. | setFixture | {
"repo_name": "bmaggi/Papyrus-SysML11",
"path": "tests/org.eclipse.papyrus.sysml.tests/src/org/eclipse/papyrus/sysml/portandflows/tests/ItemFlowTest.java",
"license": "epl-1.0",
"size": 2418
} | [
"org.eclipse.papyrus.sysml.portandflows.ItemFlow"
] | import org.eclipse.papyrus.sysml.portandflows.ItemFlow; | import org.eclipse.papyrus.sysml.portandflows.*; | [
"org.eclipse.papyrus"
] | org.eclipse.papyrus; | 1,692,832 |
public void setTarget(Notifier newTarget) {
this.target = newTarget;
}
} | void function(Notifier newTarget) { this.target = newTarget; } } | /**
* Sets the target.
*
* @param newTarget
* The target
*/ | Sets the target | setTarget | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/page/ui/com.odcgroup.page.ui/src/main/java/com/odcgroup/page/ui/editor/CodePropertyEditor.java",
"license": "epl-1.0",
"size": 11295
} | [
"org.eclipse.emf.common.notify.Notifier"
] | import org.eclipse.emf.common.notify.Notifier; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,261,642 |
@Override
protected Connection chooseConnection(final RequestMessage msg) throws TimeoutException, ConnectionException {
if (close.isDone()) throw new IllegalStateException("Client is closed");
return clusteredClient.chooseConnection(msg);
} | Connection function(final RequestMessage msg) throws TimeoutException, ConnectionException { if (close.isDone()) throw new IllegalStateException(STR); return clusteredClient.chooseConnection(msg); } | /**
* Delegates to the underlying {@link org.apache.tinkerpop.gremlin.driver.Client.ClusteredClient}.
*/ | Delegates to the underlying <code>org.apache.tinkerpop.gremlin.driver.Client.ClusteredClient</code> | chooseConnection | {
"repo_name": "rmagen/incubator-tinkerpop",
"path": "gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java",
"license": "apache-2.0",
"size": 19652
} | [
"java.util.concurrent.TimeoutException",
"org.apache.tinkerpop.gremlin.driver.exception.ConnectionException",
"org.apache.tinkerpop.gremlin.driver.message.RequestMessage"
] | import java.util.concurrent.TimeoutException; import org.apache.tinkerpop.gremlin.driver.exception.ConnectionException; import org.apache.tinkerpop.gremlin.driver.message.RequestMessage; | import java.util.concurrent.*; import org.apache.tinkerpop.gremlin.driver.exception.*; import org.apache.tinkerpop.gremlin.driver.message.*; | [
"java.util",
"org.apache.tinkerpop"
] | java.util; org.apache.tinkerpop; | 1,945,280 |
@Test
public void testHashCodeEquals() {
ResolvedConfigLink<DateSet> other = new ResolvedConfigLink<>(DateSet.of(Collections.singleton(LocalDate.of(2018, 1, 1))));
assertEquals(RESOLVED, RESOLVED);
assertNotEquals(null, RESOLVED);
assertNotEquals(CONFIG, RESOLVED);
assertEquals(RESOLVED, other);... | void function() { ResolvedConfigLink<DateSet> other = new ResolvedConfigLink<>(DateSet.of(Collections.singleton(LocalDate.of(2018, 1, 1)))); assertEquals(RESOLVED, RESOLVED); assertNotEquals(null, RESOLVED); assertNotEquals(CONFIG, RESOLVED); assertEquals(RESOLVED, other); assertEquals(RESOLVED.hashCode(), other.hashCo... | /**
* Tests the hashCode and equals method.
*/ | Tests the hashCode and equals method | testHashCodeEquals | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/test/java/com/opengamma/core/link/ResolvedConfigLinkTest.java",
"license": "apache-2.0",
"size": 2305
} | [
"com.opengamma.core.DateSet",
"java.util.Collections",
"org.testng.Assert",
"org.threeten.bp.LocalDate"
] | import com.opengamma.core.DateSet; import java.util.Collections; import org.testng.Assert; import org.threeten.bp.LocalDate; | import com.opengamma.core.*; import java.util.*; import org.testng.*; import org.threeten.bp.*; | [
"com.opengamma.core",
"java.util",
"org.testng",
"org.threeten.bp"
] | com.opengamma.core; java.util; org.testng; org.threeten.bp; | 2,035,409 |
void close() throws IOException; | void close() throws IOException; | /**
* Closes the iterator and its underlying resources.
* @throws IOException error closing the iterator
*/ | Closes the iterator and its underlying resources | close | {
"repo_name": "papicella/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/snapshot/SnapshotIterator.java",
"license": "apache-2.0",
"size": 1993
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,957,299 |
@Test
public void testPoolConstraints() throws Exception {
IElementType pool = ProcessElementTypes.Pool_1001;
ShapeEditPart pshape = createShapeUsingTool(pool, new Point(100,100), getDiagramEditPart());
if (pshape.getModel() instanceof Node) {
Node node = (Node) pshap... | void function() throws Exception { IElementType pool = ProcessElementTypes.Pool_1001; ShapeEditPart pshape = createShapeUsingTool(pool, new Point(100,100), getDiagramEditPart()); if (pshape.getModel() instanceof Node) { Node node = (Node) pshape.getModel(); EObject obj = node.getElement(); setProperty(obj, ProcessPacka... | /**
* test the constraints for the pool root element
*/ | test the constraints for the pool root element | testPoolConstraints | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/process/tests/com.odcgroup.process.editor.diagram.tests/src/com/odcgroup/process/editor/validation/tests/PoolSketchValidationEditorTests.java",
"license": "epl-1.0",
"size": 2982
} | [
"com.odcgroup.process.diagram.custom.properties.sections.NamedElementPropertySection",
"com.odcgroup.process.diagram.providers.ProcessElementTypes",
"com.odcgroup.process.model.ProcessPackage",
"org.eclipse.draw2d.geometry.Point",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.gef.EditPartViewer",
"org.e... | import com.odcgroup.process.diagram.custom.properties.sections.NamedElementPropertySection; import com.odcgroup.process.diagram.providers.ProcessElementTypes; import com.odcgroup.process.model.ProcessPackage; import org.eclipse.draw2d.geometry.Point; import org.eclipse.emf.ecore.EObject; import org.eclipse.gef.EditPart... | import com.odcgroup.process.diagram.custom.properties.sections.*; import com.odcgroup.process.diagram.providers.*; import com.odcgroup.process.model.*; import org.eclipse.draw2d.geometry.*; import org.eclipse.emf.ecore.*; import org.eclipse.gef.*; import org.eclipse.gmf.runtime.diagram.ui.editparts.*; import org.eclips... | [
"com.odcgroup.process",
"org.eclipse.draw2d",
"org.eclipse.emf",
"org.eclipse.gef",
"org.eclipse.gmf",
"org.eclipse.ui",
"org.junit"
] | com.odcgroup.process; org.eclipse.draw2d; org.eclipse.emf; org.eclipse.gef; org.eclipse.gmf; org.eclipse.ui; org.junit; | 946,499 |
@PostMapping(value="/add-note")
public String noteAddNote(@ModelAttribute("noteDto") @Valid NoteDTO noteDto, BindingResult result){
if (result.hasErrors()){
return "addNote";
}else{
Note note = new Note();
Date date = new Date();
String currentDate = DATE_FORMAT.format(date);
note.set... | @PostMapping(value=STR) String function(@ModelAttribute(STR) @Valid NoteDTO noteDto, BindingResult result){ if (result.hasErrors()){ return STR; }else{ Note note = new Note(); Date date = new Date(); String currentDate = DATE_FORMAT.format(date); note.setTitle(noteDto.getTitle()); note.setContent(noteDto.getContent());... | /**
* This method is creating Note object from index.jsp form and saving Note in database
* @return Main page of application
*/ | This method is creating Note object from index.jsp form and saving Note in database | noteAddNote | {
"repo_name": "devkamil/spring-boot-app",
"path": "src/main/java/pl/devkamil/NoteController.java",
"license": "epl-1.0",
"size": 4157
} | [
"java.util.Date",
"javax.validation.Valid",
"org.springframework.validation.BindingResult",
"org.springframework.web.bind.annotation.ModelAttribute",
"org.springframework.web.bind.annotation.PostMapping"
] | import java.util.Date; import javax.validation.Valid; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; | import java.util.*; import javax.validation.*; import org.springframework.validation.*; import org.springframework.web.bind.annotation.*; | [
"java.util",
"javax.validation",
"org.springframework.validation",
"org.springframework.web"
] | java.util; javax.validation; org.springframework.validation; org.springframework.web; | 266,115 |
private synchronized LispValue tell(String query, ErrorSet errors) throws AlgernonRuntimeException
{
LispValue tell = null;
try
{
tell = algernon.tell(query, errors);
}
catch (RuntimeException e)
{
String message = "A runtime excep... | synchronized LispValue function(String query, ErrorSet errors) throws AlgernonRuntimeException { LispValue tell = null; try { tell = algernon.tell(query, errors); } catch (RuntimeException e) { String message = STR + query; LOG.error(message, e); throw new AlgernonRuntimeException(message, e); } return tell; } | /**
* Tells the algernon rule rule_machine.
*
* @param query the query.
* @param errors the errors.
* @return the lisp value.
* @throws AlgernonRuntimeException if runtime exception in org.algernon occurs
*/ | Tells the algernon rule rule_machine | tell | {
"repo_name": "prowim/prowim",
"path": "prowim-algernon-connector/src/org/prowim/jca/connector/algernon/impl/RuleMachine.java",
"license": "gpl-3.0",
"size": 23570
} | [
"org.algernon.util.ErrorSet",
"org.jatha.dynatype.LispValue",
"org.prowim.jca.connector.algernon.AlgernonRuntimeException"
] | import org.algernon.util.ErrorSet; import org.jatha.dynatype.LispValue; import org.prowim.jca.connector.algernon.AlgernonRuntimeException; | import org.algernon.util.*; import org.jatha.dynatype.*; import org.prowim.jca.connector.algernon.*; | [
"org.algernon.util",
"org.jatha.dynatype",
"org.prowim.jca"
] | org.algernon.util; org.jatha.dynatype; org.prowim.jca; | 366,895 |
private void restoreSyncReports(Intent restoreIntent) {
// restore the reports if lost
setupSyncReports(SYNC_REPORTS_ALL_ACCOUNTS_IF_EMPTY);
synchronized (mSyncReports) {
long[] accountInfo = restoreIntent.getLongArrayExtra(EXTRA_ACCOUNT_INFO);
if (accountInfo == null... | void function(Intent restoreIntent) { setupSyncReports(SYNC_REPORTS_ALL_ACCOUNTS_IF_EMPTY); synchronized (mSyncReports) { long[] accountInfo = restoreIntent.getLongArrayExtra(EXTRA_ACCOUNT_INFO); if (accountInfo == null) { Log.d(LOG_TAG, STR); return; } int accountInfoIndex = 0; int accountInfoLimit = accountInfo.lengt... | /**
* when we receive an alarm, update the account sync reports list if necessary
* this will be the case when if we have restarted the process and lost the data
* in the global.
*
* @param restoreIntent the intent with the list
*/ | when we receive an alarm, update the account sync reports list if necessary this will be the case when if we have restarted the process and lost the data in the global | restoreSyncReports | {
"repo_name": "craigacgomez/flaming_monkey_packages_apps_Email",
"path": "src/com/android/email/service/MailService.java",
"license": "apache-2.0",
"size": 32123
} | [
"android.content.Intent",
"android.util.Log"
] | import android.content.Intent; import android.util.Log; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 2,611,110 |
public ReloadableRegistrationHandle<T> put(String pluginName, Key<T> key, Provider<T> item) {
requireNonNull(item);
String exportName = ((Export) key.getAnnotation()).value();
NamePair np = new NamePair(pluginName, exportName);
items.put(np, item);
return new ReloadableHandle(np, key, item);
}
... | ReloadableRegistrationHandle<T> function(String pluginName, Key<T> key, Provider<T> item) { requireNonNull(item); String exportName = ((Export) key.getAnnotation()).value(); NamePair np = new NamePair(pluginName, exportName); items.put(np, item); return new ReloadableHandle(np, key, item); } private class ReloadableHan... | /**
* Store one new element that may be hot-replaceable in the future.
*
* @param pluginName unique name of the plugin providing the export.
* @param key unique description from the item's Guice binding. This can be later obtained from
* the registration handle to facilitate matching with the new equ... | Store one new element that may be hot-replaceable in the future | put | {
"repo_name": "qtproject/qtqa-gerrit",
"path": "java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicMapImpl.java",
"license": "apache-2.0",
"size": 3189
} | [
"com.google.gerrit.extensions.annotations.Export",
"com.google.inject.Key",
"com.google.inject.Provider",
"java.util.Objects"
] | import com.google.gerrit.extensions.annotations.Export; import com.google.inject.Key; import com.google.inject.Provider; import java.util.Objects; | import com.google.gerrit.extensions.annotations.*; import com.google.inject.*; import java.util.*; | [
"com.google.gerrit",
"com.google.inject",
"java.util"
] | com.google.gerrit; com.google.inject; java.util; | 1,415,592 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.