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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected void addAttributeValuesToSamlAttribute(final String attributeName,
final Object attributeValue,
final List<XMLObject> attributeList,
final QName de... | void function(final String attributeName, final Object attributeValue, final List<XMLObject> attributeList, final QName defaultElementName) { if (attributeValue == null) { LOGGER.debug(STR, attributeName); return; } LOGGER.debug(STR, attributeName, attributeValue); if (attributeValue instanceof Collection<?>) { final C... | /**
* Add attribute values to saml attribute.
*
* @param attributeName the attribute name
* @param attributeValue the attribute value
* @param attributeList the attribute list
* @param defaultElementName the default element name
*/ | Add attribute values to saml attribute | addAttributeValuesToSamlAttribute | {
"repo_name": "Unicon/cas",
"path": "support/cas-server-support-saml/src/main/java/org/apereo/cas/support/saml/util/AbstractSamlObjectBuilder.java",
"license": "apache-2.0",
"size": 15941
} | [
"java.util.Collection",
"java.util.List",
"javax.xml.namespace.QName",
"org.opensaml.core.xml.XMLObject"
] | import java.util.Collection; import java.util.List; import javax.xml.namespace.QName; import org.opensaml.core.xml.XMLObject; | import java.util.*; import javax.xml.namespace.*; import org.opensaml.core.xml.*; | [
"java.util",
"javax.xml",
"org.opensaml.core"
] | java.util; javax.xml; org.opensaml.core; | 2,912,744 |
public Map<String, Object> getLocalVariables() {
Map<String, Object> ret = new HashMap<String, Object>();
for (int i = 0; i < operation.getMaxLocals(); i++) {
if (localVars[i] != null) {
ret.put(Integer.valueOf(i).toString(), localVars[i]);
}
}
return ret;
} | Map<String, Object> function() { Map<String, Object> ret = new HashMap<String, Object>(); for (int i = 0; i < operation.getMaxLocals(); i++) { if (localVars[i] != null) { ret.put(Integer.valueOf(i).toString(), localVars[i]); } } return ret; } | /**
* Returns the local variables map.
*
* @return the local variables map
*/ | Returns the local variables map | getLocalVariables | {
"repo_name": "valeriocos/jbrex",
"path": "org.eclipse.m2m.atl.engine.emfvm/src/org/eclipse/m2m/atl/engine/emfvm/lib/AbstractStackFrame.java",
"license": "mit",
"size": 4482
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 374,400 |
public KVectorChain getControlPoints() {
final KVectorChain retVal = new KVectorChain();
for (final PolarCP polarCP : controlPoints) {
retVal.add(polarCP.getCp());
}
return retVal;
} | KVectorChain function() { final KVectorChain retVal = new KVectorChain(); for (final PolarCP polarCP : controlPoints) { retVal.add(polarCP.getCp()); } return retVal; } | /**
* Returns the control points. The control points may be modified,
* but the list itself is only a container.
*
* @return The control points.
*/ | Returns the control points. The control points may be modified, but the list itself is only a container | getControlPoints | {
"repo_name": "ExplorViz/ExplorViz",
"path": "src-external/de/cau/cs/kieler/klay/layered/p5edges/splines/NubSpline.java",
"license": "apache-2.0",
"size": 43267
} | [
"de.cau.cs.kieler.core.math.KVectorChain"
] | import de.cau.cs.kieler.core.math.KVectorChain; | import de.cau.cs.kieler.core.math.*; | [
"de.cau.cs"
] | de.cau.cs; | 474,274 |
public static <T> List<T> selectList(Collection<T> inputCollection, TypedPredicate<T> predicate) {
ArrayList<T> answer = new ArrayList<T>(inputCollection.size());
CollectionUtils.select(inputCollection, predicate, answer);
return answer;
} | static <T> List<T> function(Collection<T> inputCollection, TypedPredicate<T> predicate) { ArrayList<T> answer = new ArrayList<T>(inputCollection.size()); CollectionUtils.select(inputCollection, predicate, answer); return answer; } | /**
* Delegates to {@link CollectionUtils#select(Collection, org.apache.commons.collections.Predicate)}, but will
* force the return type to be a List<T>.
*
* @param inputCollection
* @param predicate
* @return
*/ | Delegates to <code>CollectionUtils#select(Collection, org.apache.commons.collections.Predicate)</code>, but will force the return type to be a List | selectList | {
"repo_name": "akdasari/SparkCommon",
"path": "src/main/java/org/sparkcommerce/common/util/SCCollectionUtils.java",
"license": "apache-2.0",
"size": 5440
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"org.apache.commons.collections.CollectionUtils"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.commons.collections.CollectionUtils; | import java.util.*; import org.apache.commons.collections.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 639,946 |
public static <T> NullExpression<T> nullExpression(Class<T> type) {
return new NullExpression<T>(type);
} | static <T> NullExpression<T> function(Class<T> type) { return new NullExpression<T>(type); } | /**
* Create a null expression for the specified type
*
* @param type type of expression
* @param <T> type of expression
* @return null expression
*/ | Create a null expression for the specified type | nullExpression | {
"repo_name": "johnktims/querydsl",
"path": "querydsl-core/src/main/java/com/querydsl/core/types/dsl/Expressions.java",
"license": "apache-2.0",
"size": 74346
} | [
"com.querydsl.core.types.NullExpression"
] | import com.querydsl.core.types.NullExpression; | import com.querydsl.core.types.*; | [
"com.querydsl.core"
] | com.querydsl.core; | 164,413 |
List<?> getSelectedPackagesPreference()
{
return selectedPackagesPreference;
}
| List<?> getSelectedPackagesPreference() { return selectedPackagesPreference; } | /**
* Get the list of selected packages preference.
*
* @return Returns the list of selected packages preference.
*/ | Get the list of selected packages preference | getSelectedPackagesPreference | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "tools/motodev/src/plugins/android/src/com/motorola/studio/android/wizards/monkey/MonkeyConfigurationTab.java",
"license": "gpl-2.0",
"size": 23468
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,122,617 |
protected ChoiceSelector create(FormComponent<?> formComponent)
{
if (formComponent == null)
{
fail("Trying to select on null component.");
return null;
}
else if (formComponent instanceof RadioGroup ||
formComponent instanceof AbstractSingleSelectChoice)
{
return new SingleChoiceS... | ChoiceSelector function(FormComponent<?> formComponent) { if (formComponent == null) { fail(STR); return null; } else if (formComponent instanceof RadioGroup formComponent instanceof AbstractSingleSelectChoice) { return new SingleChoiceSelector(formComponent); } else if (allowMultipleChoice(formComponent)) { return new... | /**
* Creates a <code>ChoiceSelector</code>.
*
* @param formComponent
* a <code>FormComponent</code>
* @return ChoiceSelector a <code>ChoiceSelector</code>
*/ | Creates a <code>ChoiceSelector</code> | create | {
"repo_name": "topicusonderwijs/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/util/tester/FormTester.java",
"license": "apache-2.0",
"size": 26377
} | [
"org.apache.wicket.markup.html.form.AbstractSingleSelectChoice",
"org.apache.wicket.markup.html.form.FormComponent",
"org.apache.wicket.markup.html.form.RadioGroup"
] | import org.apache.wicket.markup.html.form.AbstractSingleSelectChoice; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.RadioGroup; | import org.apache.wicket.markup.html.form.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,693,719 |
public DeleteIndexRequest timeout(String timeout) {
return timeout(TimeValue.parseTimeValue(timeout, null));
} | DeleteIndexRequest function(String timeout) { return timeout(TimeValue.parseTimeValue(timeout, null)); } | /**
* Timeout to wait for the index deletion to be acknowledged by current cluster nodes. Defaults
* to <tt>10s</tt>.
*/ | Timeout to wait for the index deletion to be acknowledged by current cluster nodes. Defaults to 10s | timeout | {
"repo_name": "dmiszkiewicz/elasticsearch",
"path": "src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequest.java",
"license": "apache-2.0",
"size": 4681
} | [
"org.elasticsearch.common.unit.TimeValue"
] | import org.elasticsearch.common.unit.TimeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,801,755 |
void traverseWithScope(Node root, Scope s) {
checkState(s.isGlobal() || s.isModuleScope(), s);
try {
initTraversal(root);
curNode = root;
pushScope(s);
traverseBranch(root, null);
popScope();
} catch (Error | Exception unexpectedException) {
throwUnexpectedException(une... | void traverseWithScope(Node root, Scope s) { checkState(s.isGlobal() s.isModuleScope(), s); try { initTraversal(root); curNode = root; pushScope(s); traverseBranch(root, null); popScope(); } catch (Error Exception unexpectedException) { throwUnexpectedException(unexpectedException); } } | /**
* Traverses a parse tree recursively with a scope, starting with the given
* root. This should only be used in the global scope or module scopes. Otherwise, use
* {@link #traverseAtScope}.
*/ | Traverses a parse tree recursively with a scope, starting with the given root. This should only be used in the global scope or module scopes. Otherwise, use <code>#traverseAtScope</code> | traverseWithScope | {
"repo_name": "MatrixFrog/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeTraversal.java",
"license": "apache-2.0",
"size": 35612
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 550,009 |
public static WritableDataSet zeros( QDataSet ds ) {
return DDataSet.create( DataSetUtil.qubeDims(ds) );
} | static WritableDataSet function( QDataSet ds ) { return DDataSet.create( DataSetUtil.qubeDims(ds) ); } | /**
* return a new dataset filled with zeroes that has the same geometry as
* the given dataset.
* Only supports QUBE datasets.
* @param ds
* @return a new dataset with filled with zeroes with the same geometry.
*/ | return a new dataset filled with zeroes that has the same geometry as the given dataset. Only supports QUBE datasets | zeros | {
"repo_name": "autoplot/app",
"path": "QDataSet/src/org/das2/qds/ops/Ops.java",
"license": "gpl-2.0",
"size": 492716
} | [
"org.das2.qds.DDataSet",
"org.das2.qds.DataSetUtil",
"org.das2.qds.QDataSet",
"org.das2.qds.WritableDataSet"
] | import org.das2.qds.DDataSet; import org.das2.qds.DataSetUtil; import org.das2.qds.QDataSet; import org.das2.qds.WritableDataSet; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 524,922 |
protected boolean compareSchemaStrings(Schema generatedSchema, String controlSchema){
Project p = new SchemaModelProject();
Vector namespaces = generatedSchema.getNamespaceResolver().getNamespaces();
for (int i = 0; i < namespaces.size(); i++) {
Namespace next = (Namespace)namesp... | boolean function(Schema generatedSchema, String controlSchema){ Project p = new SchemaModelProject(); Vector namespaces = generatedSchema.getNamespaceResolver().getNamespaces(); for (int i = 0; i < namespaces.size(); i++) { Namespace next = (Namespace)namespaces.get(i); ((XMLDescriptor) p.getDescriptor(Schema.class)).g... | /**
* Compares a schema model Schema (as a string) against a string representation
* of an XML schema.
*
* @param generatedSchema
* @param controlSchemaName
*/ | Compares a schema model Schema (as a string) against a string representation of an XML schema | compareSchemaStrings | {
"repo_name": "gameduell/eclipselink.runtime",
"path": "moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSchemaTestCases.java",
"license": "epl-1.0",
"size": 9310
} | [
"java.io.StringWriter",
"java.util.Vector",
"org.eclipse.persistence.internal.oxm.Namespace",
"org.eclipse.persistence.internal.oxm.schema.SchemaModelProject",
"org.eclipse.persistence.internal.oxm.schema.model.Schema",
"org.eclipse.persistence.oxm.XMLContext",
"org.eclipse.persistence.oxm.XMLDescriptor... | import java.io.StringWriter; import java.util.Vector; import org.eclipse.persistence.internal.oxm.Namespace; import org.eclipse.persistence.internal.oxm.schema.SchemaModelProject; import org.eclipse.persistence.internal.oxm.schema.model.Schema; import org.eclipse.persistence.oxm.XMLContext; import org.eclipse.persisten... | import java.io.*; import java.util.*; import org.eclipse.persistence.internal.oxm.*; import org.eclipse.persistence.internal.oxm.schema.*; import org.eclipse.persistence.internal.oxm.schema.model.*; import org.eclipse.persistence.oxm.*; import org.eclipse.persistence.sessions.*; | [
"java.io",
"java.util",
"org.eclipse.persistence"
] | java.io; java.util; org.eclipse.persistence; | 802,495 |
private static JSONOptions convertToJsonOptions(RelDataType rowType, ImmutableList<ImmutableList<RexLiteral>> tuples) {
try {
return new JSONOptions(convertToJsonNode(rowType, tuples), JsonLocation.NA);
} catch (IOException e) {
throw new DrillRuntimeException("Failure while attempting to encode V... | static JSONOptions function(RelDataType rowType, ImmutableList<ImmutableList<RexLiteral>> tuples) { try { return new JSONOptions(convertToJsonNode(rowType, tuples), JsonLocation.NA); } catch (IOException e) { throw new DrillRuntimeException(STR, e); } } | /**
* Converts tuples into json representation taking into account row type.
* Example: [['A']] -> [{"EXPR$0":"A"}], [[1]] -> [{"EXPR$0":{"$numberLong":1}}]
*
* @param rowType row type
* @param tuples list of constant values in a row-expression
* @return json representation of tuples
*/ | Converts tuples into json representation taking into account row type. Example: [['A']] -> [{"EXPR$0":"A"}], [[1]] -> [{"EXPR$0":{"$numberLong":1}}] | convertToJsonOptions | {
"repo_name": "KulykRoman/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillValuesRelBase.java",
"license": "apache-2.0",
"size": 9192
} | [
"com.fasterxml.jackson.core.JsonLocation",
"com.google.common.collect.ImmutableList",
"java.io.IOException",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rex.RexLiteral",
"org.apache.drill.common.JSONOptions",
"org.apache.drill.common.exceptions.DrillRuntimeException"
] | import com.fasterxml.jackson.core.JsonLocation; import com.google.common.collect.ImmutableList; import java.io.IOException; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rex.RexLiteral; import org.apache.drill.common.JSONOptions; import org.apache.drill.common.exceptions.DrillRuntimeExceptio... | import com.fasterxml.jackson.core.*; import com.google.common.collect.*; import java.io.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.drill.common.*; import org.apache.drill.common.exceptions.*; | [
"com.fasterxml.jackson",
"com.google.common",
"java.io",
"org.apache.calcite",
"org.apache.drill"
] | com.fasterxml.jackson; com.google.common; java.io; org.apache.calcite; org.apache.drill; | 2,587,178 |
@Nullable T getShardOrNull(int shardId); | @Nullable T getShardOrNull(int shardId); | /**
* Returns shard with given id.
*/ | Returns shard with given id | getShardOrNull | {
"repo_name": "jimczi/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java",
"license": "apache-2.0",
"size": 45794
} | [
"org.elasticsearch.common.Nullable"
] | import org.elasticsearch.common.Nullable; | import org.elasticsearch.common.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,808,527 |
@Nullable public String quoteChars() {
return quoteChars;
} | @Nullable String function() { return quoteChars; } | /**
* Returns the quote characters.
*
* @return The quote characters.
*/ | Returns the quote characters | quoteChars | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/bulkload/BulkLoadCsvFormat.java",
"license": "apache-2.0",
"size": 5023
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,191,063 |
@Nullable
public Lock tryThreadLock(Uri uri) throws IOException {
if (!threadLocksAreAvailable()) {
return null;
}
Semaphore semaphore = getOrCreateSemaphore(uri.toString());
try (SemaphoreResource semaphoreResource = SemaphoreResource.tryAcquire(semaphore)) {
if (!semaphoreResource.acq... | Lock function(Uri uri) throws IOException { if (!threadLocksAreAvailable()) { return null; } Semaphore semaphore = getOrCreateSemaphore(uri.toString()); try (SemaphoreResource semaphoreResource = SemaphoreResource.tryAcquire(semaphore)) { if (!semaphoreResource.acquired()) { return null; } return new SemaphoreLockImpl(... | /**
* Attempts to acquire a cross-thread lock on {@code uri}. This does not block, and returns null
* if the lock cannot be obtained immediately.
*/ | Attempts to acquire a cross-thread lock on uri. This does not block, and returns null if the lock cannot be obtained immediately | tryThreadLock | {
"repo_name": "google/mobile-data-download",
"path": "java/com/google/android/libraries/mobiledatadownload/file/common/LockScope.java",
"license": "apache-2.0",
"size": 8524
} | [
"android.net.Uri",
"java.io.IOException",
"java.util.concurrent.Semaphore"
] | import android.net.Uri; import java.io.IOException; import java.util.concurrent.Semaphore; | import android.net.*; import java.io.*; import java.util.concurrent.*; | [
"android.net",
"java.io",
"java.util"
] | android.net; java.io; java.util; | 747,329 |
public BusinessObjectService getBusinessObjectService() {
if (this.businessObjectService == null) {
this.businessObjectService = KcServiceLocator.getService(BusinessObjectService.class);
}
return this.businessObjectService;
} | BusinessObjectService function() { if (this.businessObjectService == null) { this.businessObjectService = KcServiceLocator.getService(BusinessObjectService.class); } return this.businessObjectService; } | /**
* This method returns an instance of BusinessObjectServe from the KcServiceLocator.
* @return BusinessObjectService
*/ | This method returns an instance of BusinessObjectServe from the KcServiceLocator | getBusinessObjectService | {
"repo_name": "kuali/kc",
"path": "coeus-impl/src/main/java/org/kuali/kra/protocol/actions/ProtocolActionsKeyValuesBase.java",
"license": "agpl-3.0",
"size": 4220
} | [
"org.kuali.coeus.sys.framework.service.KcServiceLocator",
"org.kuali.rice.krad.service.BusinessObjectService"
] | import org.kuali.coeus.sys.framework.service.KcServiceLocator; import org.kuali.rice.krad.service.BusinessObjectService; | import org.kuali.coeus.sys.framework.service.*; import org.kuali.rice.krad.service.*; | [
"org.kuali.coeus",
"org.kuali.rice"
] | org.kuali.coeus; org.kuali.rice; | 1,591,871 |
@Override
public void handleEditorDetached() {
}
/**
* Clients override in order to subsequently call {@link #addPropertyDescriptor(com.bc.ceres.binding.PropertyDescriptor)} | void function() { } /** * Clients override in order to subsequently call {@link #addPropertyDescriptor(com.bc.ceres.binding.PropertyDescriptor)} | /**
* Does nothing.
*/ | Does nothing | handleEditorDetached | {
"repo_name": "senbox-org/snap-desktop",
"path": "snap-ui/src/main/java/org/esa/snap/ui/layer/AbstractLayerConfigurationEditor.java",
"license": "gpl-3.0",
"size": 5366
} | [
"com.bc.ceres.binding.PropertyDescriptor"
] | import com.bc.ceres.binding.PropertyDescriptor; | import com.bc.ceres.binding.*; | [
"com.bc.ceres"
] | com.bc.ceres; | 1,783,054 |
void onDownstreamFormatChanged(int sourceId, String formatId, int trigger, int mediaTimeMs);
}
public static final int DEFAULT_MIN_LOADABLE_RETRY_COUNT = 3;
private static final int STATE_UNPREPARED = 0;
private static final int STATE_PREPARED = 1;
private static final int STATE_ENABLED = 2;
priv... | void onDownstreamFormatChanged(int sourceId, String formatId, int trigger, int mediaTimeMs); } public static final int DEFAULT_MIN_LOADABLE_RETRY_COUNT = 3; private static final int STATE_UNPREPARED = 0; private static final int STATE_PREPARED = 1; private static final int STATE_ENABLED = 2; private static final int NO... | /**
* Invoked when the downstream format changes (i.e. when the format being supplied to the
* caller of {@link SampleSource#readData} changes).
*
* @param sourceId The id of the reporting {@link SampleSource}.
* @param formatId The format id.
* @param trigger The trigger specified in the ... | Invoked when the downstream format changes (i.e. when the format being supplied to the caller of <code>SampleSource#readData</code> changes) | onDownstreamFormatChanged | {
"repo_name": "Octavianus/Close-Loop-Visual-Stimulus-Display-System",
"path": "library/src/main/java/com/google/android/exoplayer/chunk/ChunkSampleSource.java",
"license": "apache-2.0",
"size": 29248
} | [
"android.os.Handler",
"com.google.android.exoplayer.LoadControl",
"com.google.android.exoplayer.MediaFormat",
"com.google.android.exoplayer.upstream.Loader",
"java.io.IOException",
"java.util.Collections",
"java.util.LinkedList",
"java.util.List"
] | import android.os.Handler; import com.google.android.exoplayer.LoadControl; import com.google.android.exoplayer.MediaFormat; import com.google.android.exoplayer.upstream.Loader; import java.io.IOException; import java.util.Collections; import java.util.LinkedList; import java.util.List; | import android.os.*; import com.google.android.exoplayer.*; import com.google.android.exoplayer.upstream.*; import java.io.*; import java.util.*; | [
"android.os",
"com.google.android",
"java.io",
"java.util"
] | android.os; com.google.android; java.io; java.util; | 2,016,103 |
public static java.lang.Class<?> getJavaClass(TypeDescriptor $reifiedT) {
if ($reifiedT instanceof TypeDescriptor.Intersection) {
return (java.lang.Class<?>)
getJavaClass(((TypeDescriptor.Intersection)$reifiedT)
.toSimpleType(getModuleManager()));
... | static java.lang.Class<?> function(TypeDescriptor $reifiedT) { if ($reifiedT instanceof TypeDescriptor.Intersection) { return (java.lang.Class<?>) getJavaClass(((TypeDescriptor.Intersection)$reifiedT) .toSimpleType(getModuleManager())); } else if ($reifiedT instanceof TypeDescriptor.Union) { return (java.lang.Class<?>)... | /**
* Return the java.lang.Class for the given reified type, or null if
* the given type cannot be represented as a java.lang.Class. Only
* types which simplify to class or interface types can be converted.
*/ | Return the java.lang.Class for the given reified type, or null if the given type cannot be represented as a java.lang.Class. Only types which simplify to class or interface types can be converted | getJavaClass | {
"repo_name": "ceylon/ceylon",
"path": "language/runtime/org/eclipse/ceylon/compiler/java/runtime/metamodel/Metamodel.java",
"license": "apache-2.0",
"size": 123821
} | [
"org.eclipse.ceylon.compiler.java.runtime.model.TypeDescriptor"
] | import org.eclipse.ceylon.compiler.java.runtime.model.TypeDescriptor; | import org.eclipse.ceylon.compiler.java.runtime.model.*; | [
"org.eclipse.ceylon"
] | org.eclipse.ceylon; | 535,700 |
private List<Map<String, String>> filterNonExistingUsers(List<Map<String, String>> subjects) throws InternalErrorException {
List<Map<String, String>> existingSubjects = new ArrayList<>();
for (Map<String, String> subject : subjects) {
if(isExistingUser(subject)) {
existingSubjects.add(subject);
}
}... | List<Map<String, String>> function(List<Map<String, String>> subjects) throws InternalErrorException { List<Map<String, String>> existingSubjects = new ArrayList<>(); for (Map<String, String> subject : subjects) { if(isExistingUser(subject)) { existingSubjects.add(subject); } } return existingSubjects; } | /**
* Filters subjects that does not have a corresponding user in Perun by ues REMS
* or by additionalueses in format: {extSourceName}|{extSourceClass}|{eppn}|0.
* The eppn is used as a 'login'.
*
* @param subjects subjects that will be filtered
* @return List without filtered subjects
* @throws InternalE... | Filters subjects that does not have a corresponding user in Perun by ues REMS or by additionalueses in format: {extSourceName}|{extSourceClass}|{eppn}|0. The eppn is used as a 'login' | filterNonExistingUsers | {
"repo_name": "licehammer/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/impl/ExtSourceREMS.java",
"license": "bsd-2-clause",
"size": 7455
} | [
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.ArrayList; import java.util.List; import java.util.Map; | import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,423,026 |
private void setSubjectClaim(String tenantAwareUserId, UserStoreManager userStore,
Map<String, String> attributesMap, String spStandardDialect,
AuthenticationContext context) {
String subjectURI = context.getSequenceConfig().getApplicationCo... | void function(String tenantAwareUserId, UserStoreManager userStore, Map<String, String> attributesMap, String spStandardDialect, AuthenticationContext context) { String subjectURI = context.getSequenceConfig().getApplicationConfig().getSubjectClaimUri(); if (subjectURI != null) { if (attributesMap.get(subjectURI) != nu... | /**
* Set authenticated user's SP Subject Claim URI as a property
*/ | Set authenticated user's SP Subject Claim URI as a property | setSubjectClaim | {
"repo_name": "kasungayan/carbon-identity",
"path": "components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/handler/claims/impl/DefaultClaimHandler.java",
"license": "apache-2.0",
"size": 3658... | [
"java.util.Map",
"org.wso2.carbon.identity.application.authentication.framework.context.AuthenticationContext",
"org.wso2.carbon.user.api.UserStoreManager"
] | import java.util.Map; import org.wso2.carbon.identity.application.authentication.framework.context.AuthenticationContext; import org.wso2.carbon.user.api.UserStoreManager; | import java.util.*; import org.wso2.carbon.identity.application.authentication.framework.context.*; import org.wso2.carbon.user.api.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,149,182 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<List<String>>> checkMemberObjectsWithResponseAsync(
String organizationId, OrganizationCheckMemberObjectsRequestBody body) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<List<String>>> function( String organizationId, OrganizationCheckMemberObjectsRequestBody body) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (organizationId == null) { return Mono.error(new IllegalArgum... | /**
* Invoke action checkMemberObjects.
*
* @param organizationId key: id of organization.
* @param body Action parameters.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws OdataErrorMainException thrown if the request is rejected by server.
* @th... | Invoke action checkMemberObjects | checkMemberObjectsWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/OrganizationsClientImpl.java",
"license": "mit",
"size": 103543
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.authorization.fluent.models.OrganizationCheckMemberObjectsRequestBody",
"java.util.List"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.authorization.fluent.models.OrganizationCheckMemberObjectsRequestBody; import java.util.List; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; import java.util.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.util"
] | com.azure.core; com.azure.resourcemanager; java.util; | 1,453,816 |
@Override
synchronized public void close() {
if (stream != null) {
IoUtils.cleanup(stream);
stream = null;
}
} | synchronized void function() { if (stream != null) { IoUtils.cleanup(stream); stream = null; } } | /**
* Overrides {@link java.lang.AutoCloseable#close()}. Closes the OS stream.
*/ | Overrides <code>java.lang.AutoCloseable#close()</code>. Closes the OS stream | close | {
"repo_name": "kexianda/commons-crypto",
"path": "src/main/java/org/apache/commons/crypto/random/OsCryptoRandom.java",
"license": "apache-2.0",
"size": 4473
} | [
"org.apache.commons.crypto.utils.IoUtils"
] | import org.apache.commons.crypto.utils.IoUtils; | import org.apache.commons.crypto.utils.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,321,135 |
GradingScaleDAO gradingScaleDAO = DAOFactory.getInstance().getGradingScaleDAO();
GradeDAO gradeDAO = DAOFactory.getInstance().getGradeDAO();
String name = jsonRequestContext.getRequest().getParameter("name");
String description = jsonRequestContext.getRequest().getParameter("description");
GradingS... | GradingScaleDAO gradingScaleDAO = DAOFactory.getInstance().getGradingScaleDAO(); GradeDAO gradeDAO = DAOFactory.getInstance().getGradeDAO(); String name = jsonRequestContext.getRequest().getParameter("name"); String description = jsonRequestContext.getRequest().getParameter(STR); GradingScale gradingScale = gradingScal... | /**
* Processes the request to create a new grading scale.
*
* @param jsonRequestContext The JSON request context
*/ | Processes the request to create a new grading scale | process | {
"repo_name": "leafsoftinfo/pyramus",
"path": "pyramus/src/main/java/fi/pyramus/json/settings/CreateGradingScaleJSONRequestController.java",
"license": "gpl-3.0",
"size": 2635
} | [
"fi.pyramus.dao.DAOFactory",
"fi.pyramus.dao.grading.GradeDAO",
"fi.pyramus.dao.grading.GradingScaleDAO",
"fi.pyramus.domainmodel.grading.GradingScale",
"org.apache.commons.lang.StringUtils",
"org.apache.commons.lang.math.NumberUtils"
] | import fi.pyramus.dao.DAOFactory; import fi.pyramus.dao.grading.GradeDAO; import fi.pyramus.dao.grading.GradingScaleDAO; import fi.pyramus.domainmodel.grading.GradingScale; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.math.NumberUtils; | import fi.pyramus.dao.*; import fi.pyramus.dao.grading.*; import fi.pyramus.domainmodel.grading.*; import org.apache.commons.lang.*; import org.apache.commons.lang.math.*; | [
"fi.pyramus.dao",
"fi.pyramus.domainmodel",
"org.apache.commons"
] | fi.pyramus.dao; fi.pyramus.domainmodel; org.apache.commons; | 247,891 |
ServiceResponse<Void> put201() throws ErrorException, IOException; | ServiceResponse<Void> put201() throws ErrorException, IOException; | /**
* Put true Boolean value in request returns 201.
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the {@link ServiceResponse} object if successful.
*/ | Put true Boolean value in request returns 201 | put201 | {
"repo_name": "John-Hart/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpSuccess.java",
"license": "mit",
"size": 27204
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; | import com.microsoft.rest.*; import java.io.*; | [
"com.microsoft.rest",
"java.io"
] | com.microsoft.rest; java.io; | 1,416,669 |
public PactDslJsonArray decimalType(BigDecimal number) {
body.put(number);
matchers.addRule(rootPath + appendArrayIndex(0), new NumberTypeMatcher(NumberTypeMatcher.NumberType.DECIMAL));
return this;
} | PactDslJsonArray function(BigDecimal number) { body.put(number); matchers.addRule(rootPath + appendArrayIndex(0), new NumberTypeMatcher(NumberTypeMatcher.NumberType.DECIMAL)); return this; } | /**
* Element that must be a decimalType value
* @param number example decimalType value
*/ | Element that must be a decimalType value | decimalType | {
"repo_name": "DiUS/pact-jvm",
"path": "consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java",
"license": "apache-2.0",
"size": 45650
} | [
"au.com.dius.pact.core.model.matchingrules.NumberTypeMatcher",
"java.math.BigDecimal"
] | import au.com.dius.pact.core.model.matchingrules.NumberTypeMatcher; import java.math.BigDecimal; | import au.com.dius.pact.core.model.matchingrules.*; import java.math.*; | [
"au.com.dius",
"java.math"
] | au.com.dius; java.math; | 1,586,156 |
public long getRegionSizeInBytes(byte[] regionId) {
if (sizeMap == null) {
return avgRowSizeInBytes*1024*1024; // 1 million rows
} else {
Long size = sizeMap.get(regionId);
if (size == null) {
logger.debug("Unknown region:" + Arrays.toString(regionId));
return 0;
} else... | long function(byte[] regionId) { if (sizeMap == null) { return avgRowSizeInBytes*1024*1024; } else { Long size = sizeMap.get(regionId); if (size == null) { logger.debug(STR + Arrays.toString(regionId)); return 0; } else { return size; } } } | /**
* Returns size of given region in bytes. Returns 0 if region was not found.
*/ | Returns size of given region in bytes. Returns 0 if region was not found | getRegionSizeInBytes | {
"repo_name": "nvoron23/incubator-drill",
"path": "contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/TableStatsCalculator.java",
"license": "apache-2.0",
"size": 6173
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,384,391 |
public TerminalBridge openConnection(int id) throws IllegalArgumentException, IOException,
InterruptedException, Sl4aException {
// throw exception if terminal already open
if (getConnectedBridge(id) != null) {
throw new IllegalArgumentException("Connection already open");
}
InterpreterPr... | TerminalBridge function(int id) throws IllegalArgumentException, IOException, InterruptedException, Sl4aException { if (getConnectedBridge(id) != null) { throw new IllegalArgumentException(STR); } InterpreterProcess process = mService.getProcess(id); TerminalBridge bridge = new TerminalBridge(this, process, new Process... | /**
* Open a new session using the given parameters.
*
* @throws InterruptedException
* @throws Sl4aException
*/ | Open a new session using the given parameters | openConnection | {
"repo_name": "kuri65536/sl4a",
"path": "android/ScriptingLayerForAndroid/src/org/connectbot/service/TerminalManager.java",
"license": "apache-2.0",
"size": 9612
} | [
"com.googlecode.android_scripting.exception.Sl4aException",
"com.googlecode.android_scripting.interpreter.InterpreterProcess",
"java.io.IOException",
"java.lang.ref.WeakReference",
"org.connectbot.transport.ProcessTransport"
] | import com.googlecode.android_scripting.exception.Sl4aException; import com.googlecode.android_scripting.interpreter.InterpreterProcess; import java.io.IOException; import java.lang.ref.WeakReference; import org.connectbot.transport.ProcessTransport; | import com.googlecode.android_scripting.exception.*; import com.googlecode.android_scripting.interpreter.*; import java.io.*; import java.lang.ref.*; import org.connectbot.transport.*; | [
"com.googlecode.android_scripting",
"java.io",
"java.lang",
"org.connectbot.transport"
] | com.googlecode.android_scripting; java.io; java.lang; org.connectbot.transport; | 160,238 |
@Override
public Instant toInstant() {
throw new java.lang.UnsupportedOperationException();
} | Instant function() { throw new java.lang.UnsupportedOperationException(); } | /**
* This method always throws an UnsupportedOperationException and should
* not be used because SQL {@code Time} values do not have a date
* component.
*
* @exception java.lang.UnsupportedOperationException if this method is invoked
*/ | This method always throws an UnsupportedOperationException and should not be used because SQL Time values do not have a date component | toInstant | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/java/sql/Time.java",
"license": "gpl-2.0",
"size": 9600
} | [
"java.time.Instant"
] | import java.time.Instant; | import java.time.*; | [
"java.time"
] | java.time; | 580,552 |
public int flush() {
int total = 0;
while (this.outbound.hasData()) {
int written;
try {
written = this.onReadyToWrite(System.currentTimeMillis());
} catch (IOException exc) {
written = 0;
}
if (written == 0) {
break;
}
total += written;
... | int function() { int total = 0; while (this.outbound.hasData()) { int written; try { written = this.onReadyToWrite(System.currentTimeMillis()); } catch (IOException exc) { written = 0; } if (written == 0) { break; } total += written; } return total; } | /**
* Writes as many as possible bytes to the socket buffer
*/ | Writes as many as possible bytes to the socket buffer | flush | {
"repo_name": "thaidn/securegram",
"path": "android/src/main/java/jawnae/pyronet/PyroClient.java",
"license": "gpl-2.0",
"size": 14178
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,817,694 |
LongStream timeStream();
long firstTime();
long lastTime();
long previousTime();
long maxDuration();
default long duration()
{
return lastTime() - firstTime();
}
| LongStream timeStream(); long firstTime(); long lastTime(); long previousTime(); long maxDuration(); default long duration() { return lastTime() - firstTime(); } | /**
* Returns actual milliseconds between lastTime() and firstTime();
* @return
*/ | Returns actual milliseconds between lastTime() and firstTime() | duration | {
"repo_name": "tvesalainen/util",
"path": "util/src/main/java/org/vesalainen/math/sliding/TimeArray.java",
"license": "gpl-3.0",
"size": 1988
} | [
"java.util.stream.LongStream"
] | import java.util.stream.LongStream; | import java.util.stream.*; | [
"java.util"
] | java.util; | 128,514 |
@SuppressWarnings("unchecked")
public static <UJO extends Ujo> KeyRing<UJO> of(@NotNull final Class<UJO> domainClass) {
try {
final KeyList result = domainClass.newInstance().readKeys();
return result instanceof KeyRing
? (KeyRing) result
: of(domainClass,... | @SuppressWarnings(STR) static <UJO extends Ujo> KeyRing<UJO> function(@NotNull final Class<UJO> domainClass) { try { final KeyList result = domainClass.newInstance().readKeys(); return result instanceof KeyRing ? (KeyRing) result : of(domainClass, (Collection) result); } catch (RuntimeException ReflectiveOperationExcep... | /** Returns all direct properties form a domain class
* @param domainClass Mandatory domain class
*/ | Returns all direct properties form a domain class | of | {
"repo_name": "pponec/ujorm",
"path": "project-m2/ujo-core/src/main/java/org/ujorm/core/KeyRing.java",
"license": "apache-2.0",
"size": 19733
} | [
"java.util.Collection",
"org.jetbrains.annotations.NotNull",
"org.ujorm.KeyList",
"org.ujorm.Ujo"
] | import java.util.Collection; import org.jetbrains.annotations.NotNull; import org.ujorm.KeyList; import org.ujorm.Ujo; | import java.util.*; import org.jetbrains.annotations.*; import org.ujorm.*; | [
"java.util",
"org.jetbrains.annotations",
"org.ujorm"
] | java.util; org.jetbrains.annotations; org.ujorm; | 2,555,515 |
if (connection instanceof AutoCloseConnection) {
return (AutoCloseConnection) connection;
}
return new AutoCloseConnection(connection);
}
private AutoCloseConnection(Connection connection) {
super(connection);
} | if (connection instanceof AutoCloseConnection) { return (AutoCloseConnection) connection; } return new AutoCloseConnection(connection); } private AutoCloseConnection(Connection connection) { super(connection); } | /**
* Returns an {@link AutoCloseable} {@link Connection} from the given {@link Connection}
*
* @param connection
* the Connection
* @return the {@link AutoCloseable} {@link Connection}
*/ | Returns an <code>AutoCloseable</code> <code>Connection</code> from the given <code>Connection</code> | from | {
"repo_name": "schlosna/arm-extensions",
"path": "src/main/java/com/google/code/arm/sql/AutoCloseConnection.java",
"license": "apache-2.0",
"size": 7440
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,189,661 |
public static <V extends UniqueIdentifiable & ExternalBundleIdentifiable> Map<ExternalIdBundle, Collection<V>> getAll(
final SourceWithExternalBundle<V> source, final Collection<ExternalIdBundle> bundles, final VersionCorrection versionCorrection) {
if (bundles.isEmpty()) {
return Collections.emptyMap... | static <V extends UniqueIdentifiable & ExternalBundleIdentifiable> Map<ExternalIdBundle, Collection<V>> function( final SourceWithExternalBundle<V> source, final Collection<ExternalIdBundle> bundles, final VersionCorrection versionCorrection) { if (bundles.isEmpty()) { return Collections.emptyMap(); } else if (bundles.... | /**
* Gets objects from the source. If there is more than one match for the id bundle then all of the matches
* are be returned.
*
* @param source the source
* @param bundles the bundles for which to get the objects
* @param versionCorrection the version/correction of the objects
* @return the ... | Gets objects from the source. If there is more than one match for the id bundle then all of the matches are be returned | getAll | {
"repo_name": "McLeodMoores/starling",
"path": "projects/core/src/main/java/com/opengamma/core/AbstractSourceWithExternalBundle.java",
"license": "apache-2.0",
"size": 11935
} | [
"com.opengamma.id.ExternalBundleIdentifiable",
"com.opengamma.id.ExternalIdBundle",
"com.opengamma.id.UniqueIdentifiable",
"com.opengamma.id.VersionCorrection",
"com.opengamma.util.PoolExecutor",
"java.util.Collection",
"java.util.Collections",
"java.util.Map"
] | import com.opengamma.id.ExternalBundleIdentifiable; import com.opengamma.id.ExternalIdBundle; import com.opengamma.id.UniqueIdentifiable; import com.opengamma.id.VersionCorrection; import com.opengamma.util.PoolExecutor; import java.util.Collection; import java.util.Collections; import java.util.Map; | import com.opengamma.id.*; import com.opengamma.util.*; import java.util.*; | [
"com.opengamma.id",
"com.opengamma.util",
"java.util"
] | com.opengamma.id; com.opengamma.util; java.util; | 1,828,159 |
public VariantContext annotateOverlaps(final FeatureContext featureContext, final VariantContext vcToAnnotate) {
if ( overlaps.isEmpty() ) {
return vcToAnnotate;
}
VariantContext annotated = vcToAnnotate;
final SimpleInterval loc = new SimpleInterval(vcToAnnotate);
... | VariantContext function(final FeatureContext featureContext, final VariantContext vcToAnnotate) { if ( overlaps.isEmpty() ) { return vcToAnnotate; } VariantContext annotated = vcToAnnotate; final SimpleInterval loc = new SimpleInterval(vcToAnnotate); for ( final Map.Entry<FeatureInput<VariantContext>, String> overlap :... | /**
* Add overlap attributes to vcToAnnotate against all overlaps in featureContext
*
* @see #annotateOverlap(java.util.List, String, htsjdk.variant.variantcontext.VariantContext)
* for more information
*
* @param featureContext non-null featureContext, which we will use to update the rsID... | Add overlap attributes to vcToAnnotate against all overlaps in featureContext | annotateOverlaps | {
"repo_name": "magicDGS/gatk",
"path": "src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/VariantOverlapAnnotator.java",
"license": "bsd-3-clause",
"size": 8765
} | [
"java.util.List",
"java.util.Map",
"org.broadinstitute.hellbender.engine.FeatureContext",
"org.broadinstitute.hellbender.engine.FeatureInput",
"org.broadinstitute.hellbender.utils.SimpleInterval"
] | import java.util.List; import java.util.Map; import org.broadinstitute.hellbender.engine.FeatureContext; import org.broadinstitute.hellbender.engine.FeatureInput; import org.broadinstitute.hellbender.utils.SimpleInterval; | import java.util.*; import org.broadinstitute.hellbender.engine.*; import org.broadinstitute.hellbender.utils.*; | [
"java.util",
"org.broadinstitute.hellbender"
] | java.util; org.broadinstitute.hellbender; | 1,800,107 |
public void addListener(final BreakpointManagerListener listener) {
listeners.addListener(
Preconditions.checkNotNull(listener, "IE00723: listener argument can not be null"));
} | void function(final BreakpointManagerListener listener) { listeners.addListener( Preconditions.checkNotNull(listener, STR)); } | /**
* Adds a breakpoint listener that is notified about relevant changes in the breakpoint manager.
*
* @param listener The listener to add.
*
* @throws IllegalArgumentException Thrown if the listener argument is null.
*/ | Adds a breakpoint listener that is notified about relevant changes in the breakpoint manager | addListener | {
"repo_name": "guiquanz/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/debug/models/breakpoints/BreakpointManager.java",
"license": "apache-2.0",
"size": 23668
} | [
"com.google.common.base.Preconditions",
"com.google.security.zynamics.binnavi.debug.models.breakpoints.interfaces.BreakpointManagerListener"
] | import com.google.common.base.Preconditions; import com.google.security.zynamics.binnavi.debug.models.breakpoints.interfaces.BreakpointManagerListener; | import com.google.common.base.*; import com.google.security.zynamics.binnavi.debug.models.breakpoints.interfaces.*; | [
"com.google.common",
"com.google.security"
] | com.google.common; com.google.security; | 1,246,772 |
private void removeNodes(List nodes)
{
TreeImageDisplay parentDisplay;
if (getLastSelectedDisplay() == null)
parentDisplay = view.getTreeRoot();
else {
parentDisplay = getLastSelectedDisplay().getParentDisplay();
}
if (parentDisplay == null) pa... | void function(List nodes) { TreeImageDisplay parentDisplay; if (getLastSelectedDisplay() == null) parentDisplay = view.getTreeRoot(); else { parentDisplay = getLastSelectedDisplay().getParentDisplay(); } if (parentDisplay == null) parentDisplay = view.getTreeRoot(); setSelectedDisplay(parentDisplay); view.removeNodes(n... | /**
* Helper method to remove the collection of the specified nodes.
*
* @param nodes The collection of node to remove.
*/ | Helper method to remove the collection of the specified nodes | removeNodes | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/browser/BrowserComponent.java",
"license": "gpl-2.0",
"size": 78014
} | [
"java.util.List",
"org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay"
] | import java.util.List; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay; | import java.util.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,437,704 |
public void clearAll () {
List<Notification> notifications = getAll();
for (Notification notification : notifications) {
notification.clear();
}
getNotMgr().cancelAll();
}
| void function () { List<Notification> notifications = getAll(); for (Notification notification : notifications) { notification.clear(); } getNotMgr().cancelAll(); } | /**
* Clear all local notifications.
*/ | Clear all local notifications | clearAll | {
"repo_name": "sysfolko/sysfolko-de.appplant.cordova.plugin.local-notification-sysfo-fix",
"path": "src/android/notification/Manager.java",
"license": "apache-2.0",
"size": 12408
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,916,251 |
private static void getBuiltinsForGlslVersionCommon(
Map<String, List<FunctionPrototype>> builtinsForVersion,
ShadingLanguageVersion shadingLanguageVersion,
boolean isWgslCompatible) {
{
final String name = "abs";
for (Type t : genType()) {
addBuiltin(builtinsForVersion, name... | static void function( Map<String, List<FunctionPrototype>> builtinsForVersion, ShadingLanguageVersion shadingLanguageVersion, boolean isWgslCompatible) { { final String name = "abs"; for (Type t : genType()) { addBuiltin(builtinsForVersion, name, t, t); } if (shadingLanguageVersion.supportedAbsInt()) { for (Type t : ig... | /**
* Helper function to register built-in function prototypes for Common Functions,
* as specified in section 8.3 of the GLSL 4.6 and ESSL 3.2 specifications.
*
* @param builtinsForVersion the list of builtins to add prototypes to
* @param shadingLanguageVersion the version of GLSL in use
* @param is... | Helper function to register built-in function prototypes for Common Functions, as specified in section 8.3 of the GLSL 4.6 and ESSL 3.2 specifications | getBuiltinsForGlslVersionCommon | {
"repo_name": "google/graphicsfuzz",
"path": "ast/src/main/java/com/graphicsfuzz/common/typing/TyperHelper.java",
"license": "apache-2.0",
"size": 58902
} | [
"com.graphicsfuzz.common.ast.decl.FunctionPrototype",
"com.graphicsfuzz.common.ast.type.BasicType",
"com.graphicsfuzz.common.ast.type.QualifiedType",
"com.graphicsfuzz.common.ast.type.Type",
"com.graphicsfuzz.common.ast.type.TypeQualifier",
"com.graphicsfuzz.common.glslversion.ShadingLanguageVersion",
"... | import com.graphicsfuzz.common.ast.decl.FunctionPrototype; import com.graphicsfuzz.common.ast.type.BasicType; import com.graphicsfuzz.common.ast.type.QualifiedType; import com.graphicsfuzz.common.ast.type.Type; import com.graphicsfuzz.common.ast.type.TypeQualifier; import com.graphicsfuzz.common.glslversion.ShadingLang... | import com.graphicsfuzz.common.ast.decl.*; import com.graphicsfuzz.common.ast.type.*; import com.graphicsfuzz.common.glslversion.*; import java.util.*; | [
"com.graphicsfuzz.common",
"java.util"
] | com.graphicsfuzz.common; java.util; | 148,452 |
default <S extends SocketAddress> S getLocalAddress(Class<S> type) {
final SocketAddress localAddress = getLocalAddress();
return type.isInstance(localAddress) ? type.cast(localAddress) : null;
} | default <S extends SocketAddress> S getLocalAddress(Class<S> type) { final SocketAddress localAddress = getLocalAddress(); return type.isInstance(localAddress) ? type.cast(localAddress) : null; } | /**
* Get the local address of this connection, cast to a specific type, if any. If there is an address but it
* cannot be cast to the given type, {@code null} is returned.
*
* @param type the address type class
* @param <S> the address type
* @return the local address of this connection,... | Get the local address of this connection, cast to a specific type, if any. If there is an address but it cannot be cast to the given type, null is returned | getLocalAddress | {
"repo_name": "dpospisil/jboss-remoting",
"path": "src/main/java/org/jboss/remoting3/Connection.java",
"license": "lgpl-2.1",
"size": 3850
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 2,312,127 |
void enterDims(@NotNull Java8Parser.DimsContext ctx); | void enterDims(@NotNull Java8Parser.DimsContext ctx); | /**
* Enter a parse tree produced by {@link Java8Parser#dims}.
*
* @param ctx the parse tree
*/ | Enter a parse tree produced by <code>Java8Parser#dims</code> | enterDims | {
"repo_name": "BigDaddy-Germany/WHOAMI",
"path": "WHOAMI/src/de/aima13/whoami/modules/syntaxcheck/languages/antlrgen/Java8Listener.java",
"license": "mit",
"size": 97945
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 100,368 |
public static byte[] encrypt(byte[] data, SecretKey key, String cipherName) {
return encrypt(data, key, null, cipherName);
} | static byte[] function(byte[] data, SecretKey key, String cipherName) { return encrypt(data, key, null, cipherName); } | /**
* Encrypt message with specified secret key and cipher name.
*
* @param data specified message data in byte array
* @param key specified secret key
* @param cipherName specified cipher name
* @return cipher message in byte array
*/ | Encrypt message with specified secret key and cipher name | encrypt | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/services/iothisk/device/crypto/AesEncrypt.java",
"license": "apache-2.0",
"size": 5820
} | [
"javax.crypto.SecretKey"
] | import javax.crypto.SecretKey; | import javax.crypto.*; | [
"javax.crypto"
] | javax.crypto; | 1,643,399 |
@WebMethod(operationName = "GetFacturasAutorizadas")
@WebResult(name = "Facturas")
public List<Comprobante> getFacturasAutorizadas(@WebParam(name = "Identificacion") String identificacion) throws GenericException {
return consultasService.getFacturasAutorizadas(identificacion);
}
| @WebMethod(operationName = STR) @WebResult(name = STR) List<Comprobante> function(@WebParam(name = STR) String identificacion) throws GenericException { return consultasService.getFacturasAutorizadas(identificacion); } | /**
* Retorna las facturas autorizadas de un cliente
*
* @param identificacion
* @return
* @throws GenericException
*/ | Retorna las facturas autorizadas de un cliente | getFacturasAutorizadas | {
"repo_name": "diego10j/produquimic",
"path": "produquimic/produquimic-war/src/java/webservice/ceo/ServicioOffline.java",
"license": "apache-2.0",
"size": 7019
} | [
"java.util.List",
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult"
] | import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; | import java.util.*; import javax.jws.*; | [
"java.util",
"javax.jws"
] | java.util; javax.jws; | 984,344 |
private void reset() {
if (mVelocityTracker != null) {
mVelocityTracker.recycle();
}
mVelocityTracker = null;
mDownX = 0;
mDownY = 0;
mCurrentView = null;
mSwipingView = null;
mCurrentPosition = AdapterView.INVALID_POSITION;
mSwiping = false;
mCanDismissCurrent = false;
} | void function() { if (mVelocityTracker != null) { mVelocityTracker.recycle(); } mVelocityTracker = null; mDownX = 0; mDownY = 0; mCurrentView = null; mSwipingView = null; mCurrentPosition = AdapterView.INVALID_POSITION; mSwiping = false; mCanDismissCurrent = false; } | /**
* Resets the fields to the initial values, ready to start over.
*/ | Resets the fields to the initial values, ready to start over | reset | {
"repo_name": "MichaelArchangel/ArchangelKit",
"path": "listViewAnimation/src/main/java/com/nhaarman/listviewanimations/itemmanipulation/swipedismiss/SwipeTouchListener.java",
"license": "mit",
"size": 22783
} | [
"android.widget.AdapterView"
] | import android.widget.AdapterView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 161,420 |
Future<Void> splitRegionAsync(byte[] regionName, byte[] splitPoint) throws IOException; | Future<Void> splitRegionAsync(byte[] regionName, byte[] splitPoint) throws IOException; | /**
* Split an individual region. Asynchronous operation.
* @param regionName region to split
* @param splitPoint the explicit position to split on
* @throws IOException if a remote or network exception occurs
*/ | Split an individual region. Asynchronous operation | splitRegionAsync | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 101053
} | [
"java.io.IOException",
"java.util.concurrent.Future"
] | import java.io.IOException; import java.util.concurrent.Future; | import java.io.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,553,329 |
public String formatForCurrency(KualiDecimal amount); | String function(KualiDecimal amount); | /**
* Returns a proper String Value. Also returns proper value for currency (USD)
*
* @param string
* @return
*/ | Returns a proper String Value. Also returns proper value for currency (USD) | formatForCurrency | {
"repo_name": "ua-eas/kfs-devops-automation-fork",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/service/ContractsGrantsBillingUtilityService.java",
"license": "agpl-3.0",
"size": 2655
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 34,599 |
@Test
@Restriction(UiRestriction.RESTRICTION_TYPE_TABLET)
@MediumTest
@Feature({"Navigation"})
public void testNavigateBackAndForwardButtons() throws Exception {
final String[] urls = {
mTestServer.getURL("/chrome/test/data/android/navigate/one.html"),
mTestSe... | @Restriction(UiRestriction.RESTRICTION_TYPE_TABLET) @Feature({STR}) void function() throws Exception { final String[] urls = { mTestServer.getURL(STR), mTestServer.getURL(STR), mTestServer.getURL(STR) }; for (String url : urls) { navigateAndObserve(url); } final int repeats = 3; for (int i = 0; i < repeats; i++) { Touc... | /**
* Test back and forward buttons.
*/ | Test back and forward buttons | testNavigateBackAndForwardButtons | {
"repo_name": "chromium/chromium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/NavigateTest.java",
"license": "bsd-3-clause",
"size": 28980
} | [
"android.support.test.InstrumentationRegistry",
"java.util.Locale",
"org.chromium.base.test.util.Feature",
"org.chromium.base.test.util.Restriction",
"org.chromium.chrome.test.util.ChromeTabUtils",
"org.chromium.content_public.browser.test.util.TouchCommon",
"org.chromium.content_public.browser.test.uti... | import android.support.test.InstrumentationRegistry; import java.util.Locale; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.Restriction; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.content_public.browser.test.util.TouchCommon; import org.chromium.content_pub... | import android.support.test.*; import java.util.*; import org.chromium.base.test.util.*; import org.chromium.chrome.test.util.*; import org.chromium.content_public.browser.test.util.*; import org.chromium.ui.test.util.*; import org.junit.*; | [
"android.support",
"java.util",
"org.chromium.base",
"org.chromium.chrome",
"org.chromium.content_public",
"org.chromium.ui",
"org.junit"
] | android.support; java.util; org.chromium.base; org.chromium.chrome; org.chromium.content_public; org.chromium.ui; org.junit; | 1,770,973 |
public ResponseXPathExpectations xpath(String xpathExpression) {
return ResponseMatchers.xpath(xpathExpression);
} | ResponseXPathExpectations function(String xpathExpression) { return ResponseMatchers.xpath(xpathExpression); } | /**
* Expects the given XPath expression to (not) exist or be evaluated to a value.
*
* @param xpathExpression the XPath expression
* @return the XPath expectations, to be further configured
*/ | Expects the given XPath expression to (not) exist or be evaluated to a value | xpath | {
"repo_name": "lukas-krecan/smock",
"path": "common/src/main/java/net/javacrumbs/smock/common/server/AbstractCommonWebServiceServerTest.java",
"license": "apache-2.0",
"size": 7310
} | [
"org.springframework.ws.test.server.ResponseMatchers",
"org.springframework.ws.test.server.ResponseXPathExpectations"
] | import org.springframework.ws.test.server.ResponseMatchers; import org.springframework.ws.test.server.ResponseXPathExpectations; | import org.springframework.ws.test.server.*; | [
"org.springframework.ws"
] | org.springframework.ws; | 1,536,326 |
public String convert(Object value, Locale locale, String pattern) {
LocaleConverter converter = lookup(String.class, locale);
return converter.convert(String.class, value, pattern);
} | String function(Object value, Locale locale, String pattern) { LocaleConverter converter = lookup(String.class, locale); return converter.convert(String.class, value, pattern); } | /**
* Convert the specified locale-sensitive value into a String
* using the paticular convertion pattern.
*
* @param value The Value to be converted
* @param locale The locale
* @param pattern The convertion pattern
* @return the converted value
*
* @throws org.apache.commo... | Convert the specified locale-sensitive value into a String using the paticular convertion pattern | convert | {
"repo_name": "77ilogin/training",
"path": "src/main/java/org/apache/commons/beanutils/locale/LocaleConvertUtilsBean.java",
"license": "apache-2.0",
"size": 20488
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,167,858 |
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
boolean cellHasFocus) {
String plotterName = (String) value;
// display selected variant of the icon if the cell is selected
// or in a hover state
Icon icon;
if (ListHoverHelper.in... | Component function(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { String plotterName = (String) value; Icon icon; if (ListHoverHelper.index(list) == index) { icon = getIcon(plotterName, true); } else { icon = getIcon(plotterName, isSelected); } label.setIcon(icon); label.setText(plotte... | /**
* Updates panel and label for the given cell.
*/ | Updates panel and label for the given cell | getListCellRendererComponent | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/gui/plotter/PlotterChooser.java",
"license": "gpl-3.0",
"size": 10600
} | [
"com.rapidminer.gui.tools.ListHoverHelper",
"java.awt.Component",
"javax.swing.Icon",
"javax.swing.JList"
] | import com.rapidminer.gui.tools.ListHoverHelper; import java.awt.Component; import javax.swing.Icon; import javax.swing.JList; | import com.rapidminer.gui.tools.*; import java.awt.*; import javax.swing.*; | [
"com.rapidminer.gui",
"java.awt",
"javax.swing"
] | com.rapidminer.gui; java.awt; javax.swing; | 2,579,771 |
public long numberOf(Operation op) {
return statsByOperation.getOrDefault(op, EMPTY).get();
} | long function(Operation op) { return statsByOperation.getOrDefault(op, EMPTY).get(); } | /**
* Get the number of {@link #accept(SourceRecord) added} records that had the given {@link Operation}.
*
* @param op the operation for which the record count is to be returned
* @return the count; never negative
*/ | Get the number of <code>#accept(SourceRecord) added</code> records that had the given <code>Operation</code> | numberOf | {
"repo_name": "DuncanSands/debezium",
"path": "debezium-core/src/test/java/io/debezium/data/SourceRecordStats.java",
"license": "apache-2.0",
"size": 3457
} | [
"io.debezium.data.Envelope"
] | import io.debezium.data.Envelope; | import io.debezium.data.*; | [
"io.debezium.data"
] | io.debezium.data; | 880,184 |
private void setButtonsForDown() {
if (!isEmpty()) {
getView().findViewById(R.id.fdKeepInSync).setEnabled(true);
// hides the progress bar
getView().findViewById(R.id.fdProgressBlock).setVisibility(View.GONE);
TextView progressText = (TextView)get... | void function() { if (!isEmpty()) { getView().findViewById(R.id.fdKeepInSync).setEnabled(true); getView().findViewById(R.id.fdProgressBlock).setVisibility(View.GONE); TextView progressText = (TextView)getView().findViewById(R.id.fdProgressText); progressText.setVisibility(View.GONE); } } | /**
* Enables or disables buttons for a file locally available
*/ | Enables or disables buttons for a file locally available | setButtonsForDown | {
"repo_name": "duke8804/android",
"path": "src/com/owncloud/android/ui/fragment/FileDetailFragment.java",
"license": "gpl-2.0",
"size": 20958
} | [
"android.view.View",
"android.widget.TextView"
] | import android.view.View; import android.widget.TextView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,347,894 |
public static void copy(Reader input, OutputStream output, String encoding) throws IOException {
Writer out = new OutputStreamWriter(output, encoding);
copy(input, out);
out.flush();
} | static void function(Reader input, OutputStream output, String encoding) throws IOException { Writer out = new OutputStreamWriter(output, encoding); copy(input, out); out.flush(); } | /**
* Copies reader to output stream using buffer and specified encoding.
*/ | Copies reader to output stream using buffer and specified encoding | copy | {
"repo_name": "wjw465150/jodd",
"path": "jodd-core/src/main/java/jodd/io/StreamUtil.java",
"license": "bsd-2-clause",
"size": 11753
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.io.OutputStreamWriter",
"java.io.Reader",
"java.io.Writer"
] | import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,578,881 |
private boolean notifyOnSelectNavigationPreference(
@NonNull final NavigationPreference navigationPreference) {
return callback == null || callback.onSelectNavigationPreference(navigationPreference);
} | boolean function( @NonNull final NavigationPreference navigationPreference) { return callback == null callback.onSelectNavigationPreference(navigationPreference); } | /**
* Notifies the callback, that a navigation preference is about to be selected.
*
* @param navigationPreference
* The navigation preference, which is about to be selected, as an instance of the class
* {@link NavigationPreference}. The navigation preference may not be null
... | Notifies the callback, that a navigation preference is about to be selected | notifyOnSelectNavigationPreference | {
"repo_name": "michael-rapp/AndroidPreferenceActivity",
"path": "library/src/main/java/de/mrapp/android/preference/activity/adapter/NavigationPreferenceAdapter.java",
"license": "apache-2.0",
"size": 20458
} | [
"androidx.annotation.NonNull",
"de.mrapp.android.preference.activity.NavigationPreference"
] | import androidx.annotation.NonNull; import de.mrapp.android.preference.activity.NavigationPreference; | import androidx.annotation.*; import de.mrapp.android.preference.activity.*; | [
"androidx.annotation",
"de.mrapp.android"
] | androidx.annotation; de.mrapp.android; | 288,882 |
public void testElementAdded() {
Object res = Model.getCoreFactory().createElementResidence();
helper.addElementResidence(elem, res);
Model.getPump().flushModelEvents();
assertTrue(list.getSize() == 1);
assertTrue(list.getElementAt(0) == res);
} | void function() { Object res = Model.getCoreFactory().createElementResidence(); helper.addElementResidence(elem, res); Model.getPump().flushModelEvents(); assertTrue(list.getSize() == 1); assertTrue(list.getElementAt(0) == res); } | /**
* Test addElementResidence().
*/ | Test addElementResidence() | testElementAdded | {
"repo_name": "carvalhomb/tsmells",
"path": "sample/argouml/argouml/org/argouml/uml/ui/foundation/core/TestUMLModelElementElementResidenceListModel.java",
"license": "gpl-2.0",
"size": 4225
} | [
"org.argouml.model.Model"
] | import org.argouml.model.Model; | import org.argouml.model.*; | [
"org.argouml.model"
] | org.argouml.model; | 2,342,230 |
public Transporter scrollableCursorCurrentIndex(Transporter remoteScrollableCursor) {
return handleByMode();
}
| Transporter function(Transporter remoteScrollableCursor) { return handleByMode(); } | /**
* Retrieves the current row index number
*/ | Retrieves the current row index number | scrollableCursorCurrentIndex | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/remote/suncorba/CORBARemoteSessionControllerDispatcherForTestingExceptions.java",
"license": "epl-1.0",
"size": 15143
} | [
"org.eclipse.persistence.internal.sessions.remote.Transporter"
] | import org.eclipse.persistence.internal.sessions.remote.Transporter; | import org.eclipse.persistence.internal.sessions.remote.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,424,682 |
public NationData getNationInfo(String name, NationData.Shards... shards)
throws RateLimitReachedException, UnknownNationException, IOException, XmlPullParserException; | NationData function(String name, NationData.Shards... shards) throws RateLimitReachedException, UnknownNationException, IOException, XmlPullParserException; | /**
* Fetches information on a nation
* @param name the nation id
* @param shards the shards to request
* @return a NationData object with nation info
* @throws com.limewoodMedia.nsapi.exceptions.RateLimitReachedException if the rate limit was reached (but not exceeded)
* @throws com.limewoodMedia.nsapi.exc... | Fetches information on a nation | getNationInfo | {
"repo_name": "Limewood/NSDroid",
"path": "nsapi/src/main/java/com/limewoodMedia/nsapi/INSAPI.java",
"license": "apache-2.0",
"size": 5055
} | [
"java.io.IOException",
"org.xmlpull.v1.XmlPullParserException"
] | import java.io.IOException; import org.xmlpull.v1.XmlPullParserException; | import java.io.*; import org.xmlpull.v1.*; | [
"java.io",
"org.xmlpull.v1"
] | java.io; org.xmlpull.v1; | 547,481 |
m_StdOut = stdout;
m_ID = "" + process.hashCode();
if (m_StdOut)
m_Reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
else
m_Reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
} | m_StdOut = stdout; m_ID = "" + process.hashCode(); if (m_StdOut) m_Reader = new BufferedReader(new InputStreamReader(process.getInputStream())); else m_Reader = new BufferedReader(new InputStreamReader(process.getErrorStream())); } | /**
* Initializes the printer.
*
* @param stdout whether to use stdout or stderr
* @param process the process to monitor
*/ | Initializes the printer | initialize | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/core/management/AbstractOutputPrinter.java",
"license": "gpl-3.0",
"size": 3095
} | [
"java.io.BufferedReader",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 946,636 |
IpAddress addPublicIp(String virtualMachineId); | IpAddress addPublicIp(String virtualMachineId); | /**
* Adds a public ip to the virtual machine.
*
* @param virtualMachineId the unique identifier for the virtual machine.
* @return the assigned ip address as string (mandatory).
* @throws NullPointerException if the virtualMachineId is null
* @throws IllegalArgumentException if the virtualMachineId i... | Adds a public ip to the virtual machine | addPublicIp | {
"repo_name": "cloudiator/sword",
"path": "core/src/main/java/de/uniulm/omi/cloudiator/sword/extensions/PublicIpExtension.java",
"license": "apache-2.0",
"size": 1861
} | [
"de.uniulm.omi.cloudiator.sword.domain.IpAddress"
] | import de.uniulm.omi.cloudiator.sword.domain.IpAddress; | import de.uniulm.omi.cloudiator.sword.domain.*; | [
"de.uniulm.omi"
] | de.uniulm.omi; | 1,466,224 |
private static String formatPixelsSize(Map details)
{
UnitsLength unit = null;
Length x = (Length) details.get(PIXEL_SIZE_X);
Length y = (Length) details.get(PIXEL_SIZE_Y);
Length z = (Length) details.get(PIXEL_SIZE_Z);
Double dx = null, dy = null, dz = null;
Numb... | static String function(Map details) { UnitsLength unit = null; Length x = (Length) details.get(PIXEL_SIZE_X); Length y = (Length) details.get(PIXEL_SIZE_Y); Length z = (Length) details.get(PIXEL_SIZE_Z); Double dx = null, dy = null, dz = null; NumberFormat nf = new DecimalFormat("0.00"); try { x = UIUtilities.transform... | /**
* Returns the pixels size as a string.
*
* @param details The map to convert.
* @return See above.
*/ | Returns the pixels size as a string | formatPixelsSize | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/EditorUtil.java",
"license": "gpl-2.0",
"size": 91320
} | [
"java.text.DecimalFormat",
"java.text.NumberFormat",
"java.util.Map",
"org.openmicroscopy.shoola.util.ui.UIUtilities"
] | import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.Map; import org.openmicroscopy.shoola.util.ui.UIUtilities; | import java.text.*; import java.util.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.text",
"java.util",
"org.openmicroscopy.shoola"
] | java.text; java.util; org.openmicroscopy.shoola; | 240,345 |
@BeforeGroups("2checkusers_android")
private void checkIfUserLogged() throws InterruptedException, FileNotFoundException, YamlException{
super.checkIfUserLoggedAndHomeServerSetUpAndroid(appiumFactory.getAndroidDriver1(), riotUserADisplayName, Constant.DEFAULT_USERPWD);
super.checkIfUserLoggedAndHomeServerSetUpA... | @BeforeGroups(STR) void function() throws InterruptedException, FileNotFoundException, YamlException{ super.checkIfUserLoggedAndHomeServerSetUpAndroid(appiumFactory.getAndroidDriver1(), riotUserADisplayName, Constant.DEFAULT_USERPWD); super.checkIfUserLoggedAndHomeServerSetUpAndroid(appiumFactory.getAndroidDriver2(), r... | /**
* Log the good user if not.</br> Secure the test.
* @param myDriver
* @param username
* @param pwd
* @throws InterruptedException
* @throws YamlException
* @throws FileNotFoundException
*/ | Log the good user if not. Secure the test | checkIfUserLogged | {
"repo_name": "vector-im/riot-automated-tests",
"path": "VectorMobileTests/src/test/java/mobilestests_android/RiotAdminAndModerationTests.java",
"license": "apache-2.0",
"size": 22011
} | [
"com.esotericsoftware.yamlbeans.YamlException",
"java.io.FileNotFoundException",
"org.testng.annotations.BeforeGroups"
] | import com.esotericsoftware.yamlbeans.YamlException; import java.io.FileNotFoundException; import org.testng.annotations.BeforeGroups; | import com.esotericsoftware.yamlbeans.*; import java.io.*; import org.testng.annotations.*; | [
"com.esotericsoftware.yamlbeans",
"java.io",
"org.testng.annotations"
] | com.esotericsoftware.yamlbeans; java.io; org.testng.annotations; | 2,451,368 |
public Observable<String> watchManyObservable(List<String> keys) {
io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture();
watchMany(keys, handler.toHandler());
return handler;
} | Observable<String> function(List<String> keys) { io.vertx.rx.java.ObservableFuture<String> handler = io.vertx.rx.java.RxHelper.observableFuture(); watchMany(keys, handler.toHandler()); return handler; } | /**
* Watch the given keys to determine execution of the MULTI/EXEC block
* @param keys List of keys to watch
* @return
*/ | Watch the given keys to determine execution of the MULTI/EXEC block | watchManyObservable | {
"repo_name": "brianjcj/vertx-redis-client",
"path": "src/main/generated/io/vertx/rxjava/redis/RedisTransaction.java",
"license": "apache-2.0",
"size": 184983
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 638,707 |
@Override
public CompletableFuture<LogSegmentMetadata> setLogSegmentActive(LogSegmentMetadata segment) {
final LogSegmentMetadata newSegment = segment.mutator()
.setTruncationStatus(LogSegmentMetadata.TruncationStatus.ACTIVE)
.build();
return addNewSegmentAndDeleteOldSegm... | CompletableFuture<LogSegmentMetadata> function(LogSegmentMetadata segment) { final LogSegmentMetadata newSegment = segment.mutator() .setTruncationStatus(LogSegmentMetadata.TruncationStatus.ACTIVE) .build(); return addNewSegmentAndDeleteOldSegment(newSegment, segment); } | /**
* Change the truncation status of a <i>log segment</i> to be active.
*
* @param segment log segment to change truncation status to active.
* @return new log segment
*/ | Change the truncation status of a log segment to be active | setLogSegmentActive | {
"repo_name": "sijie/incubator-distributedlog",
"path": "distributedlog-core/src/main/java/org/apache/distributedlog/metadata/LogSegmentMetadataStoreUpdater.java",
"license": "apache-2.0",
"size": 8055
} | [
"java.util.concurrent.CompletableFuture",
"org.apache.distributedlog.LogSegmentMetadata"
] | import java.util.concurrent.CompletableFuture; import org.apache.distributedlog.LogSegmentMetadata; | import java.util.concurrent.*; import org.apache.distributedlog.*; | [
"java.util",
"org.apache.distributedlog"
] | java.util; org.apache.distributedlog; | 1,199,087 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner>
beginUpdateMongoDBDatabaseThroughput(
String resourceGroupName,
String accountName,
String databaseName,
... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<ThroughputSettingsGetResultsInner>, ThroughputSettingsGetResultsInner> beginUpdateMongoDBDatabaseThroughput( String resourceGroupName, String accountName, String databaseName, ThroughputSettingsUpdateParameters updateThroughputParameters,... | /**
* Update RUs per second of the an Azure Cosmos DB MongoDB database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param updateThroughputP... | Update RUs per second of the an Azure Cosmos DB MongoDB database | beginUpdateMongoDBDatabaseThroughput | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/fluent/MongoDBResourcesClient.java",
"license": "mit",
"size": 104176
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.Context",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.cosmos.fluent.models.ThroughputSettingsGetResultsInner",
"com.azure.resou... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cosmos.fluent.models.ThroughputSettingsGetResultsInner; im... | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.cosmos.fluent.models.*; import com.azure.resourcemanager.cosmos.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,805,565 |
public void draw(float[] mvpMatrix, FloatBuffer vertexBuffer, int firstVertex,
int vertexCount, int coordsPerVertex, int vertexStride,
float[] texMatrix, FloatBuffer texBuffer, int textureId, int texStride) {
GlUtil.checkGlError("draw start");
// Select the... | void function(float[] mvpMatrix, FloatBuffer vertexBuffer, int firstVertex, int vertexCount, int coordsPerVertex, int vertexStride, float[] texMatrix, FloatBuffer texBuffer, int textureId, int texStride) { GlUtil.checkGlError(STR); GLES20.glUseProgram(mProgramHandle); GlUtil.checkGlError(STR); GLES20.glActiveTexture(GL... | /**
* Issues the draw call. Does the full setup on every call.
*
* @param mvpMatrix The 4x4 projection matrix.
* @param vertexBuffer Buffer with vertex position data.
* @param firstVertex Index of first vertex to use in vertexBuffer.
* @param vertexCount Number of vertice... | Issues the draw call. Does the full setup on every call | draw | {
"repo_name": "pili-engineering/PLDroidShortVideo",
"path": "ShortVideoUIDemo/faceunity/src/main/java/com/faceunity/gles/Texture2dProgram.java",
"license": "apache-2.0",
"size": 14872
} | [
"com.faceunity.gles.core.GlUtil",
"java.nio.FloatBuffer"
] | import com.faceunity.gles.core.GlUtil; import java.nio.FloatBuffer; | import com.faceunity.gles.core.*; import java.nio.*; | [
"com.faceunity.gles",
"java.nio"
] | com.faceunity.gles; java.nio; | 696,464 |
public OPhysicalPosition getPhysicalPosition(final long iPosition, final OPhysicalPosition iPPosition) {
return map.get(iPosition);
}
| OPhysicalPosition function(final long iPosition, final OPhysicalPosition iPPosition) { return map.get(iPosition); } | /**
* Fill and return the PhysicalPosition object received as parameter with the physical position of logical record iPosition
*/ | Fill and return the PhysicalPosition object received as parameter with the physical position of logical record iPosition | getPhysicalPosition | {
"repo_name": "Spaceghost/OrientDB",
"path": "core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OClusterLogical.java",
"license": "apache-2.0",
"size": 7954
} | [
"com.orientechnologies.orient.core.storage.OPhysicalPosition"
] | import com.orientechnologies.orient.core.storage.OPhysicalPosition; | import com.orientechnologies.orient.core.storage.*; | [
"com.orientechnologies.orient"
] | com.orientechnologies.orient; | 2,247,583 |
private void implTestTwice(ECPoint[] p)
{
assertPointsEqual("Twice incorrect", p[3], p[0].twice());
assertPointsEqual("Add same point incorrect", p[3], p[0].add(p[0]));
} | void function(ECPoint[] p) { assertPointsEqual(STR, p[3], p[0].twice()); assertPointsEqual(STR, p[3], p[0].add(p[0])); } | /**
* Tests <code>ECPoint.twice()</code> against literature values.
*
* @param p
* The array of literature values.
*/ | Tests <code>ECPoint.twice()</code> against literature values | implTestTwice | {
"repo_name": "onessimofalconi/bc-java",
"path": "core/src/test/java/org/bouncycastle/math/ec/test/ECPointTest.java",
"license": "mit",
"size": 17921
} | [
"org.bouncycastle.math.ec.ECPoint"
] | import org.bouncycastle.math.ec.ECPoint; | import org.bouncycastle.math.ec.*; | [
"org.bouncycastle.math"
] | org.bouncycastle.math; | 848,595 |
protected File getTemporaryFile(String uri, XWikiContext context)
{
Matcher matcher = URI_PATTERN.matcher(uri);
File result = null;
if (matcher.find()) {
List<String> pathSegments = new ArrayList<String>();
// Add all the path segments.
pathSegments.ad... | File function(String uri, XWikiContext context) { Matcher matcher = URI_PATTERN.matcher(uri); File result = null; if (matcher.find()) { List<String> pathSegments = new ArrayList<String>(); pathSegments.add("temp"); pathSegments.add(withMinimalURLEncoding(matcher.group(3))); pathSegments.add(encodeURLPathSegment(context... | /**
* Returns the temporary file corresponding to the specified URI.
*
* @param uri request URI.
* @param context xwiki context.
* @return temporary file corresponding to the specified URI or null if no such file can be located.
*/ | Returns the temporary file corresponding to the specified URI | getTemporaryFile | {
"repo_name": "pbondoer/xwiki-platform",
"path": "xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/TempResourceAction.java",
"license": "lgpl-2.1",
"size": 8506
} | [
"com.xpn.xwiki.XWikiContext",
"java.io.File",
"java.net.URI",
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Matcher",
"org.apache.commons.lang3.StringUtils"
] | import com.xpn.xwiki.XWikiContext; import java.io.File; import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import org.apache.commons.lang3.StringUtils; | import com.xpn.xwiki.*; import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; import org.apache.commons.lang3.*; | [
"com.xpn.xwiki",
"java.io",
"java.net",
"java.util",
"org.apache.commons"
] | com.xpn.xwiki; java.io; java.net; java.util; org.apache.commons; | 2,496,583 |
@Nonnull
public static <T> LongBinding mapToLongThenReduce(@Nonnull final ObservableSet<T> items, @Nullable final Long defaultValue, @Nonnull final ObservableValue<Function<? super T, Long>> mapper, @Nonnull final ObservableValue<BinaryOperator<Long>> reducer) {
requireNonNull(reducer, ERROR_REDUCER_NUL... | static <T> LongBinding function(@Nonnull final ObservableSet<T> items, @Nullable final Long defaultValue, @Nonnull final ObservableValue<Function<? super T, Long>> mapper, @Nonnull final ObservableValue<BinaryOperator<Long>> reducer) { requireNonNull(reducer, ERROR_REDUCER_NULL); requireNonNull(mapper, ERROR_MAPPER_NUL... | /**
* Returns a long binding whose value is the reduction of all elements in the set. The mapper function is applied to each element before reduction.
*
* @param items the observable set of elements.
* @param defaultValue the value to be returned if there is no value present, may be null.
... | Returns a long binding whose value is the reduction of all elements in the set. The mapper function is applied to each element before reduction | mapToLongThenReduce | {
"repo_name": "griffon/griffon",
"path": "subprojects/griffon-javafx/src/main/java/griffon/javafx/beans/binding/ReducingBindings.java",
"license": "apache-2.0",
"size": 249342
} | [
"java.util.Objects",
"java.util.function.BinaryOperator",
"java.util.function.Function"
] | import java.util.Objects; import java.util.function.BinaryOperator; import java.util.function.Function; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 509,757 |
public ToolbarClickButton applyTo(
ToolbarClickButton button, ToolbarClickButton.Listener listener) {
applyToDisplay(button);
if (listener != null) {
button.setListener(listener);
}
return button;
} | ToolbarClickButton function( ToolbarClickButton button, ToolbarClickButton.Listener listener) { applyToDisplay(button); if (listener != null) { button.setListener(listener); } return button; } | /**
* Applies the builder state to a click button.
*
* @return the configured click button
*/ | Applies the builder state to a click button | applyTo | {
"repo_name": "wisebaldone/incubator-wave",
"path": "wave/src/main/java/org/waveprotocol/wave/client/widget/toolbar/ToolbarButtonViewBuilder.java",
"license": "apache-2.0",
"size": 4401
} | [
"org.waveprotocol.wave.client.widget.toolbar.buttons.ToolbarClickButton"
] | import org.waveprotocol.wave.client.widget.toolbar.buttons.ToolbarClickButton; | import org.waveprotocol.wave.client.widget.toolbar.buttons.*; | [
"org.waveprotocol.wave"
] | org.waveprotocol.wave; | 1,681,407 |
protected void updateRefnameForAuthority(DocumentWrapper<DocumentModel> wrapDoc, String schemaName) throws Exception {
DocumentModel docModel = wrapDoc.getWrappedObject();
RefName.Authority authority = (Authority) getRefName(getServiceContext(), docModel);
String refName = authority.toString... | void function(DocumentWrapper<DocumentModel> wrapDoc, String schemaName) throws Exception { DocumentModel docModel = wrapDoc.getWrappedObject(); RefName.Authority authority = (Authority) getRefName(getServiceContext(), docModel); String refName = authority.toString(); docModel.setProperty(schemaName, AuthorityJAXBSchem... | /**
* Generate a refName for the authority from the short identifier
* and display name.
*
* All refNames for authorities are generated. If a client supplies
* a refName, it will be overwritten during create (per this method)
* or discarded during update (per filterReadOnlyPropertiesFor... | Generate a refName for the authority from the short identifier and display name. All refNames for authorities are generated. If a client supplies a refName, it will be overwritten during create (per this method) or discarded during update (per filterReadOnlyPropertiesForPart) | updateRefnameForAuthority | {
"repo_name": "cherryhill/collectionspace-services",
"path": "services/authority/service/src/main/java/org/collectionspace/services/common/vocabulary/nuxeo/AuthorityDocumentModelHandler.java",
"license": "apache-2.0",
"size": 8713
} | [
"org.collectionspace.services.common.api.RefName",
"org.collectionspace.services.common.document.DocumentWrapper",
"org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema",
"org.nuxeo.ecm.core.api.DocumentModel"
] | import org.collectionspace.services.common.api.RefName; import org.collectionspace.services.common.document.DocumentWrapper; import org.collectionspace.services.common.vocabulary.AuthorityJAXBSchema; import org.nuxeo.ecm.core.api.DocumentModel; | import org.collectionspace.services.common.api.*; import org.collectionspace.services.common.document.*; import org.collectionspace.services.common.vocabulary.*; import org.nuxeo.ecm.core.api.*; | [
"org.collectionspace.services",
"org.nuxeo.ecm"
] | org.collectionspace.services; org.nuxeo.ecm; | 1,441,171 |
protected MultiItemTypeAdapter startAnim(Animator anim, int index) {
anim.setDuration(mDuration).start();
anim.setInterpolator(mInterpolatorDecelerated);
return this;
} | MultiItemTypeAdapter function(Animator anim, int index) { anim.setDuration(mDuration).start(); anim.setInterpolator(mInterpolatorDecelerated); return this; } | /**
* set anim to start when loading
*
* @param anim
* @param index
*/ | set anim to start when loading | startAnim | {
"repo_name": "kaxi4it/EasyRecyclerViewAdapter",
"path": "lib/src/main/java/com/guyj/MultiItemTypeAdapter.java",
"license": "apache-2.0",
"size": 10934
} | [
"android.animation.Animator"
] | import android.animation.Animator; | import android.animation.*; | [
"android.animation"
] | android.animation; | 2,240,876 |
@Test
public void testFullAccess() throws Exception {
final String name = this.getUniqueName();
final String roleA = name + "-A";
// assign names to 4 vms...
final String[] requiredRoles = {roleA};
Set requiredRolesSet = new HashSet();
for (int i = 0; i < requiredRoles.length; i++) {
... | void function() throws Exception { final String name = this.getUniqueName(); final String roleA = name + "-A"; final String[] requiredRoles = {roleA}; Set requiredRolesSet = new HashSet(); for (int i = 0; i < requiredRoles.length; i++) { requiredRolesSet.add(InternalRole.getRole(requiredRoles[i])); } assertEquals(requi... | /**
* Tests affect of FULL_ACCESS on region operations.
*/ | Tests affect of FULL_ACCESS on region operations | testFullAccess | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/distributedTest/java/org/apache/geode/cache30/RegionReliabilityTestCase.java",
"license": "apache-2.0",
"size": 49263
} | [
"java.util.HashSet",
"java.util.Properties",
"java.util.Set",
"org.apache.geode.cache.AttributesFactory",
"org.apache.geode.cache.LossAction",
"org.apache.geode.cache.MembershipAttributes",
"org.apache.geode.cache.Region",
"org.apache.geode.cache.RegionAttributes",
"org.apache.geode.cache.Resumption... | import java.util.HashSet; import java.util.Properties; import java.util.Set; import org.apache.geode.cache.AttributesFactory; import org.apache.geode.cache.LossAction; import org.apache.geode.cache.MembershipAttributes; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionAttributes; import org.apa... | import java.util.*; import org.apache.geode.cache.*; import org.apache.geode.distributed.internal.membership.*; import org.junit.*; | [
"java.util",
"org.apache.geode",
"org.junit"
] | java.util; org.apache.geode; org.junit; | 2,346,358 |
private double iterate (Instances inst, boolean report)
throws Exception {
int i;
double llkold = 0.0;
double llk = 0.0;
if (report) {
EM_Report(inst);
}
boolean ok = false;
int seed = getSeed();
int restartCount = 0;
while (!ok) {
try {
for (i = 0; i... | double function (Instances inst, boolean report) throws Exception { int i; double llkold = 0.0; double llk = 0.0; if (report) { EM_Report(inst); } boolean ok = false; int seed = getSeed(); int restartCount = 0; while (!ok) { try { for (i = 0; i < m_max_iterations; i++) { llkold = llk; llk = E(inst, true); if (report) {... | /**
* iterates the E and M steps until the log likelihood of the data
* converges.
*
* @param inst the training instances.
* @param report be verbose.
* @return the log likelihood of the data
* @throws Exception if something goes wrong
*/ | iterates the E and M steps until the log likelihood of the data converges | iterate | {
"repo_name": "BaldoAgosta/weka-dev",
"path": "src/weka/clusterers/EM_wedo_user_doc.java",
"license": "apache-2.0",
"size": 41563
} | [
"java.util.Random"
] | import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 956,156 |
public static void saveRoi(String fileName, Roi roi) {
if (roi == null) {
saveRoi(fileName, (List<Point2d>) null);
return;
}
FloatPolygon fp;
fp = roi.getFloatPolygon(); // save common part
saveRoi(fileName, ConvertLists.fromPolygon2List(fp));
}
/**
* Calculates width and heigh... | static void function(String fileName, Roi roi) { if (roi == null) { saveRoi(fileName, (List<Point2d>) null); return; } FloatPolygon fp; fp = roi.getFloatPolygon(); saveRoi(fileName, ConvertLists.fromPolygon2List(fp)); } /** * Calculates width and height of bounding box for shape defined as List of {@link Point2d} | /**
* Save ROI as image.
*
* @param fileName fileName
* @param roi roi
*/ | Save ROI as image | saveRoi | {
"repo_name": "baniuk/ImageJTestSuite",
"path": "src/main/java/com/github/baniuk/ImageJTestSuite/datatoimage/RoiSaver.java",
"license": "mit",
"size": 3141
} | [
"com.github.baniuk.ImageJTestSuite",
"java.util.List",
"org.scijava.vecmath.Point2d"
] | import com.github.baniuk.ImageJTestSuite; import java.util.List; import org.scijava.vecmath.Point2d; | import com.github.baniuk.*; import java.util.*; import org.scijava.vecmath.*; | [
"com.github.baniuk",
"java.util",
"org.scijava.vecmath"
] | com.github.baniuk; java.util; org.scijava.vecmath; | 2,408,798 |
request.setAttribute("requestUrlWithParameters", HttpServletRequestUtils.constructRequestUrlWithParameters(request));
return true;
} | request.setAttribute(STR, HttpServletRequestUtils.constructRequestUrlWithParameters(request)); return true; } | /**
* Adds a client request url string (with parameters) to the request
* as a variable named 'requestUrlWithParameters'.
*/ | Adds a client request url string (with parameters) to the request as a variable named 'requestUrlWithParameters' | preHandle | {
"repo_name": "CeON/saos",
"path": "saos-webapp/src/main/java/pl/edu/icm/saos/webapp/common/RequestURLInterceptor.java",
"license": "gpl-3.0",
"size": 968
} | [
"pl.edu.icm.saos.common.http.HttpServletRequestUtils"
] | import pl.edu.icm.saos.common.http.HttpServletRequestUtils; | import pl.edu.icm.saos.common.http.*; | [
"pl.edu.icm"
] | pl.edu.icm; | 1,513,814 |
@SuppressWarnings("unchecked")
public void setValue(@NotNull final Ujo bo, @Nullable Object value) {
final Key key = super.getKey();
if (isForeignKey()
&& value !=null
&& !(value instanceof OrmUjo)) {
value = new ForeignKey(value);
}
key.setValue(... | @SuppressWarnings(STR) void function(@NotNull final Ujo bo, @Nullable Object value) { final Key key = super.getKey(); if (isForeignKey() && value !=null && !(value instanceof OrmUjo)) { value = new ForeignKey(value); } key.setValue(bo, value); } | /** Returns a key value from a table
* @param ujo Related Ujo object
* @param value A value to assign.
*/ | Returns a key value from a table | setValue | {
"repo_name": "pponec/ujorm",
"path": "project-m2/ujo-orm/src/main/java/org/ujorm/orm/metaModel/MetaColumn.java",
"license": "apache-2.0",
"size": 21340
} | [
"org.jetbrains.annotations.NotNull",
"org.jetbrains.annotations.Nullable",
"org.ujorm.Key",
"org.ujorm.Ujo",
"org.ujorm.orm.ForeignKey",
"org.ujorm.orm.OrmUjo"
] | import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.ujorm.Key; import org.ujorm.Ujo; import org.ujorm.orm.ForeignKey; import org.ujorm.orm.OrmUjo; | import org.jetbrains.annotations.*; import org.ujorm.*; import org.ujorm.orm.*; | [
"org.jetbrains.annotations",
"org.ujorm",
"org.ujorm.orm"
] | org.jetbrains.annotations; org.ujorm; org.ujorm.orm; | 353,709 |
@Parameters
public static Collection<Object[]> getTestParameters() {
final Collection<Object[]> params = new ArrayList<>();
final ThresholdExpiredCRLRevocationPolicy zeroThresholdPolicy = new ThresholdExpiredCRLRevocationPolicy();
zeroThresholdPolicy.setThreshold(0);
// Test ca... | static Collection<Object[]> function() { final Collection<Object[]> params = new ArrayList<>(); final ThresholdExpiredCRLRevocationPolicy zeroThresholdPolicy = new ThresholdExpiredCRLRevocationPolicy(); zeroThresholdPolicy.setThreshold(0); params.add(new Object[] { new ResourceCRLRevocationChecker(new ClassPathResource... | /**
* Gets the unit test parameters.
*
* @return Test parameter data.
*/ | Gets the unit test parameters | getTestParameters | {
"repo_name": "lcssos/cas-server",
"path": "cas-server-support-x509/src/test/java/org/jasig/cas/adaptors/x509/authentication/handler/support/ResourceCRLRevocationCheckerTests.java",
"license": "apache-2.0",
"size": 6000
} | [
"java.math.BigInteger",
"java.util.ArrayList",
"java.util.Collection",
"java.util.Date",
"org.springframework.core.io.ClassPathResource"
] | import java.math.BigInteger; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import org.springframework.core.io.ClassPathResource; | import java.math.*; import java.util.*; import org.springframework.core.io.*; | [
"java.math",
"java.util",
"org.springframework.core"
] | java.math; java.util; org.springframework.core; | 2,009,443 |
private static BigInteger[] getPrimeaddition(BigInteger lb) {
//Declaring an array to store the number on which Goldbachs conjecture is being run
// and its respective prime numbers
BigInteger[] primeVals = new BigInteger[2];
//finds the next probable prime after 2, since 2 is also a prime number
//but is ... | static BigInteger[] function(BigInteger lb) { BigInteger[] primeVals = new BigInteger[2]; BigInteger bigPrime1 = (new BigInteger("2")).nextProbablePrime(); BigInteger bigPrime2 = new BigInteger("0"); while(bigPrime1.compareTo(lb) == -1){ if(bigPrime1.isProbablePrime(1)){ bigPrime2 = lb.subtract(bigPrime1); if(bigPrime2... | /**
* The given method takes in the even number and finds 2 prime number whose addition
* provides the input number. This satisfies the Goldbachs conjecture.
*
* @param lb : taken in the BigInteger over which Goldbachs conjecture has to run
* @return : Returns an array with the even number over which Goldbac... | The given method takes in the even number and finds 2 prime number whose addition provides the input number. This satisfies the Goldbachs conjecture | getPrimeaddition | {
"repo_name": "utkarshbh/Goldbachconjecture",
"path": "src/GoldbachSeq.java",
"license": "gpl-2.0",
"size": 8267
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 2,647,913 |
@WebResult (
header = true,
name = "resultOfAddingEvents"
)
String addEvents(String infoSetId, Event[] assertions, @WebParam (header = true, name="contributorId") String contributorId) throws ServiceException; | @WebResult ( header = true, name = STR ) String addEvents(String infoSetId, Event[] assertions, @WebParam (header = true, name=STR) String contributorId) throws ServiceException; | /**
* Adds a bunch of events to an infoset.
*
* @param infoSetId The id of the infoset to which to add the events.
* @param assertions The events that are to be added to the infoset.
* @param contributorId The if of the contributor adding the events to the infoset.
* @return Some message.
* @throws... | Adds a bunch of events to an infoset | addEvents | {
"repo_name": "nabilzhang/enunciate",
"path": "idl/src/test/samples/com/webcohesion/enunciate/samples/idl/genealogy/services/SourceService.java",
"license": "apache-2.0",
"size": 3257
} | [
"com.webcohesion.enunciate.samples.idl.genealogy.data.Event",
"javax.jws.WebParam",
"javax.jws.WebResult"
] | import com.webcohesion.enunciate.samples.idl.genealogy.data.Event; import javax.jws.WebParam; import javax.jws.WebResult; | import com.webcohesion.enunciate.samples.idl.genealogy.data.*; import javax.jws.*; | [
"com.webcohesion.enunciate",
"javax.jws"
] | com.webcohesion.enunciate; javax.jws; | 436,033 |
@RequestMapping(value = { CMC.A_ROLEPLAY_PHASE_CREATE }, method = RequestMethod.GET)
public String createPhaseGet(@PathVariable Long roleplayId,
@PathVariable Long phaseId, Model model) {
Phase phase = new Phase().getModelObject(Phase.class, phaseId);
model.addAttribute("phase", phase);
model.addAttribut... | @RequestMapping(value = { CMC.A_ROLEPLAY_PHASE_CREATE }, method = RequestMethod.GET) String function(@PathVariable Long roleplayId, @PathVariable Long phaseId, Model model) { Phase phase = new Phase().getModelObject(Phase.class, phaseId); model.addAttribute("phase", phase); model.addAttribute(STR, new AuthorCreatePhase... | /**
* Gets the create Phase page.
*
* @param model
* Model to hold objects for the view.
* @return path to JSP.
*/ | Gets the create Phase page | createPhaseGet | {
"repo_name": "skipcole/SeaChangePlatform",
"path": "src/main/java/com/seachangesimulations/platform/controllers/AuthorController.java",
"license": "mit",
"size": 24261
} | [
"com.seachangesimulations.platform.domain.Phase",
"com.seachangesimulations.platform.mvc.formbeans.author.AuthorCreatePhaseFormBean",
"org.springframework.ui.Model",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.b... | import com.seachangesimulations.platform.domain.Phase; import com.seachangesimulations.platform.mvc.formbeans.author.AuthorCreatePhaseFormBean; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.spri... | import com.seachangesimulations.platform.domain.*; import com.seachangesimulations.platform.mvc.formbeans.author.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; | [
"com.seachangesimulations.platform",
"org.springframework.ui",
"org.springframework.web"
] | com.seachangesimulations.platform; org.springframework.ui; org.springframework.web; | 156,801 |
@Nullable
public List<Integer> collectSrcLinesForUntouchedFile(@NotNull final File classFile,
@NotNull final CoverageSuitesBundle suite) {
final VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByIoFile(classFile);
if (virtualFile != null... | List<Integer> function(@NotNull final File classFile, @NotNull final CoverageSuitesBundle suite) { final VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByIoFile(classFile); if (virtualFile != null) { return collectSrcLinesForUntouchedFile(virtualFile, suite); } return null; } | /**
* Collect code lines if untouched file should be included in coverage information. These lines will be marked as uncovered.
*
* @param suite
* @return List (probably empty) of code lines or null if all lines should be marked as uncovered
*/ | Collect code lines if untouched file should be included in coverage information. These lines will be marked as uncovered | collectSrcLinesForUntouchedFile | {
"repo_name": "semonte/intellij-community",
"path": "plugins/coverage-common/src/com/intellij/coverage/CoverageEngine.java",
"license": "apache-2.0",
"size": 16475
} | [
"com.intellij.openapi.vfs.LocalFileSystem",
"com.intellij.openapi.vfs.VirtualFile",
"java.io.File",
"java.util.List",
"org.jetbrains.annotations.NotNull"
] | import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VirtualFile; import java.io.File; import java.util.List; import org.jetbrains.annotations.NotNull; | import com.intellij.openapi.vfs.*; import java.io.*; import java.util.*; import org.jetbrains.annotations.*; | [
"com.intellij.openapi",
"java.io",
"java.util",
"org.jetbrains.annotations"
] | com.intellij.openapi; java.io; java.util; org.jetbrains.annotations; | 2,875,398 |
Set<T> getServices(); | Set<T> getServices(); | /**
* Get a set of registered services.
*
* @return the registered services
*/ | Get a set of registered services | getServices | {
"repo_name": "apache/servicemix4-nmr",
"path": "nmr/api/src/main/java/org/apache/servicemix/nmr/api/service/ServiceRegistry.java",
"license": "apache-2.0",
"size": 1966
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,530,745 |
@ServiceMethod(returns = ReturnType.SINGLE)
public OpenidConnectProviderContractInner createOrUpdate(
String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters) {
final String ifMatch = null;
return createOrUpdateAsync(resourceGroupName, ser... | @ServiceMethod(returns = ReturnType.SINGLE) OpenidConnectProviderContractInner function( String resourceGroupName, String serviceName, String opid, OpenidConnectProviderContractInner parameters) { final String ifMatch = null; return createOrUpdateAsync(resourceGroupName, serviceName, opid, parameters, ifMatch).block();... | /**
* Creates or updates the OpenID Connect Provider.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param opid Identifier of the OpenID Connect Provider.
* @param parameters Create parameters.
* @throws Ill... | Creates or updates the OpenID Connect Provider | createOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/OpenIdConnectProvidersClientImpl.java",
"license": "mit",
"size": 80530
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.apimanagement.fluent.models.OpenidConnectProviderContractInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.apimanagement.fluent.models.OpenidConnectProviderContractInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.apimanagement.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,761,474 |
@Test
public void betweenPredicate() throws CQLException {
assertFilter("ATTR1 BETWEEN 10 AND 20", PropertyIsBetween.class);
} | void function() throws CQLException { assertFilter(STR, PropertyIsBetween.class); } | /**
* Between predicate sample
*
* @see ECQLBetweenPredicateTest
*/ | Between predicate sample | betweenPredicate | {
"repo_name": "geotools/geotools",
"path": "modules/library/cql/src/test/java/org/geotools/filter/text/ecql/ECQLTest.java",
"license": "lgpl-2.1",
"size": 15072
} | [
"org.geotools.filter.text.cql2.CQLException",
"org.opengis.filter.PropertyIsBetween"
] | import org.geotools.filter.text.cql2.CQLException; import org.opengis.filter.PropertyIsBetween; | import org.geotools.filter.text.cql2.*; import org.opengis.filter.*; | [
"org.geotools.filter",
"org.opengis.filter"
] | org.geotools.filter; org.opengis.filter; | 541,952 |
private List<List<Atom>> populateColoursByAtomicNumberAndMass(List<Atom> atomList) {
List<List<Atom>> groupsByColour = new ArrayList<List<Atom>>();
Atom previousAtom = null;
List<Atom> atomsOfThisColour = new ArrayList<Atom>();
int atomsSeen = 0;
for (Atom atom : atomList) {
if (previousAtom != nu... | List<List<Atom>> function(List<Atom> atomList) { List<List<Atom>> groupsByColour = new ArrayList<List<Atom>>(); Atom previousAtom = null; List<Atom> atomsOfThisColour = new ArrayList<Atom>(); int atomsSeen = 0; for (Atom atom : atomList) { if (previousAtom != null && compareAtomicNumberThenAtomicMass(previousAtom, atom... | /**
* Takes a list of atoms sorted by atomic number/mass
* and populates the mappingToColour map
* @param atomList
* @return
*/ | Takes a list of atoms sorted by atomic number/mass and populates the mappingToColour map | populateColoursByAtomicNumberAndMass | {
"repo_name": "metamolecular/opsin",
"path": "opsin-core/src/main/java/uk/ac/cam/ch/wwmm/opsin/StereoAnalyser.java",
"license": "artistic-2.0",
"size": 22287
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,601,256 |
public boolean validateEmailAddress(String emailAddress) {
boolean valid = true;
//perform the validation against email address
if (StringUtils.isNotBlank(emailAddress)) {
EmailAddressValidationPattern emailAddressPattern = new EmailAddressValidationPattern();
... | boolean function(String emailAddress) { boolean valid = true; if (StringUtils.isNotBlank(emailAddress)) { EmailAddressValidationPattern emailAddressPattern = new EmailAddressValidationPattern(); if (!emailAddressPattern.matches(emailAddress)) { return false; } } return valid; } | /**
* validate the email Address against the email address pattern
*
* @param emailAddress
* @return true if email Address follows the pattern else return false.
*/ | validate the email Address against the email address pattern | validateEmailAddress | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/document/validation/impl/PurchasingAccountsPayableProcessVendorValidation.java",
"license": "apache-2.0",
"size": 2528
} | [
"org.apache.commons.lang.StringUtils",
"org.kuali.rice.kns.datadictionary.validation.fieldlevel.EmailAddressValidationPattern"
] | import org.apache.commons.lang.StringUtils; import org.kuali.rice.kns.datadictionary.validation.fieldlevel.EmailAddressValidationPattern; | import org.apache.commons.lang.*; import org.kuali.rice.kns.datadictionary.validation.fieldlevel.*; | [
"org.apache.commons",
"org.kuali.rice"
] | org.apache.commons; org.kuali.rice; | 2,610,567 |
protected InputStream getResponseStream() {
return responseStream;
} | InputStream function() { return responseStream; } | /**
* Returns a stream from which the body of the current response may be read.
* If the method has not yet been executed, if <code>responseBodyConsumed</code>
* has been called, or if the stream returned by a previous call has been closed,
* <code>null</code> will be returned.
*
* @return... | Returns a stream from which the body of the current response may be read. If the method has not yet been executed, if <code>responseBodyConsumed</code> has been called, or if the stream returned by a previous call has been closed, <code>null</code> will be returned | getResponseStream | {
"repo_name": "UjuE/zaproxy",
"path": "src/org/apache/commons/httpclient/HttpMethodBase.java",
"license": "apache-2.0",
"size": 98508
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,576,321 |
public ProvisionAction getProvisionAction() {
return this.provisionAction;
} | ProvisionAction function() { return this.provisionAction; } | /**
* Gets the provision action associated with this component.
*
* @return the provision action for this component, which
* may be null if the default action is to be used
*/ | Gets the provision action associated with this component | getProvisionAction | {
"repo_name": "alexryndin/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/topology/Component.java",
"license": "apache-2.0",
"size": 1655
} | [
"org.apache.ambari.server.controller.internal.ProvisionAction"
] | import org.apache.ambari.server.controller.internal.ProvisionAction; | import org.apache.ambari.server.controller.internal.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 131,917 |
void process(FileIngestTask task) throws InterruptedException {
try {
if (!this.isCancelled()) {
FileIngestPipeline pipeline = this.fileIngestPipelinesQueue.take();
if (!pipeline.isEmpty()) {
AbstractFile file = task.getFile();
... | void process(FileIngestTask task) throws InterruptedException { try { if (!this.isCancelled()) { FileIngestPipeline pipeline = this.fileIngestPipelinesQueue.take(); if (!pipeline.isEmpty()) { AbstractFile file = task.getFile(); synchronized (this.fileIngestProgressLock) { ++this.processedFiles; if (this.runInteractivel... | /**
* Passes a file from the data source for this job through the file level
* ingest pipeline.
*
* @param task A file ingest task.
*
* @throws InterruptedException if the thread executing this code is
* interrupted while blocked on taking from or
* ... | Passes a file from the data source for this job through the file level ingest pipeline | process | {
"repo_name": "maxrp/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/ingest/DataSourceIngestJob.java",
"license": "apache-2.0",
"size": 47363
} | [
"java.util.ArrayList",
"java.util.List",
"org.sleuthkit.datamodel.AbstractFile"
] | import java.util.ArrayList; import java.util.List; import org.sleuthkit.datamodel.AbstractFile; | import java.util.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.datamodel; | 27,284 |
private void logAndAppend(String lifecycleEvent) {
Log.d(TAG, "Lifecycle Event: " + lifecycleEvent);
mLifecycleDisplay.append(lifecycleEvent + "\n");
} | void function(String lifecycleEvent) { Log.d(TAG, STR + lifecycleEvent); mLifecycleDisplay.append(lifecycleEvent + "\n"); } | /**
* Logs to the console and appends the lifecycle method name to the TextView so that you can
* view the series of method callbacks that are called both from the app and from within
* Android Studio's Logcat.
*
* @param lifecycleEvent The name of the event to be logged.
*/ | Logs to the console and appends the lifecycle method name to the TextView so that you can view the series of method callbacks that are called both from the app and from within Android Studio's Logcat | logAndAppend | {
"repo_name": "achiwhane/ud851-Exercises",
"path": "Lesson05a-Android-Lifecycle/T05a.02-Exercise-PersistData/app/src/main/java/com/example/android/lifecycle/MainActivity.java",
"license": "apache-2.0",
"size": 6628
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 1,353,871 |
public int getId()
{
if( cp != null )
{
return cp.getId();
}
return -1;
}
}
// TODO: FINISH scene3d, extLst
class GrpSpPr implements OOXMLElement
{
private static final Logger log = LoggerFactory.getLogger( GrpSpPr.class );
private static final long serialVersionUID = 7464871024304781512L;
private... | int function() { if( cp != null ) { return cp.getId(); } return -1; } } class GrpSpPr implements OOXMLElement { private static final Logger log = LoggerFactory.getLogger( GrpSpPr.class ); private static final long serialVersionUID = 7464871024304781512L; private Xfrm xf = null; private String bwmode = null; private Fil... | /**
* return the cNvPr id for this element
*
* @return
*/ | return the cNvPr id for this element | getId | {
"repo_name": "Maxels88/openxls",
"path": "src/main/java/org/openxls/formats/OOXML/GrpSp.java",
"license": "gpl-3.0",
"size": 21798
} | [
"org.slf4j.Logger",
"org.slf4j.LoggerFactory"
] | import org.slf4j.Logger; import org.slf4j.LoggerFactory; | import org.slf4j.*; | [
"org.slf4j"
] | org.slf4j; | 881,257 |
@VisibleForTesting
static void deleteRMStateStore(Configuration conf) throws Exception {
RMStateStore rmStore = RMStateStoreFactory.getStore(conf);
rmStore.setResourceManager(new ResourceManager());
rmStore.init(conf);
rmStore.start();
try {
LOG.info("Deleting ResourceManager state store..... | static void deleteRMStateStore(Configuration conf) throws Exception { RMStateStore rmStore = RMStateStoreFactory.getStore(conf); rmStore.setResourceManager(new ResourceManager()); rmStore.init(conf); rmStore.start(); try { LOG.info(STR); rmStore.deleteStore(); LOG.info(STR); } finally { rmStore.stop(); } } | /**
* Deletes the RMStateStore
*
* @param conf
* @throws Exception
*/ | Deletes the RMStateStore | deleteRMStateStore | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java",
"license": "apache-2.0",
"size": 64696
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore",
"org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStoreFactory"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStore; import org.apache.hadoop.yarn.server.resourcemanager.recovery.RMStateStoreFactory; | import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.server.resourcemanager.recovery.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,458,417 |
public void rootResourceNotFound() throws WebApplicationException,
RequestHandledException {
if (this.noRootResClHandler != null) {
this.noRootResClHandler.handle(Request.getCurrent(),
org.restlet.Response.getCurrent());
throw new RequestHandledExcepti... | void function() throws WebApplicationException, RequestHandledException { if (this.noRootResClHandler != null) { this.noRootResClHandler.handle(Request.getCurrent(), org.restlet.Response.getCurrent()); throw new RequestHandledException(); } throw new WebApplicationException(Status.NOT_FOUND); } | /**
* Handles the case, if no root resource class was found. If a Restlet to
* handle this case was given (see {@link #setNoRootResClHandler(Restlet)}),
* it is called. Otherwise a {@link WebApplicationException} with status 404
* is thrown (see JAX-RS specification, section 3.7.2, item 1d)
*
... | Handles the case, if no root resource class was found. If a Restlet to handle this case was given (see <code>#setNoRootResClHandler(Restlet)</code>), it is called. Otherwise a <code>WebApplicationException</code> with status 404 is thrown (see JAX-RS specification, section 3.7.2, item 1d) | rootResourceNotFound | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet.ext.jaxrs/org/restlet/ext/jaxrs/internal/util/ExceptionHandler.java",
"license": "epl-1.0",
"size": 17585
} | [
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.Response",
"org.restlet.Request",
"org.restlet.ext.jaxrs.internal.exceptions.RequestHandledException"
] | import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; import org.restlet.Request; import org.restlet.ext.jaxrs.internal.exceptions.RequestHandledException; | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.restlet.*; import org.restlet.ext.jaxrs.internal.exceptions.*; | [
"javax.ws",
"org.restlet",
"org.restlet.ext"
] | javax.ws; org.restlet; org.restlet.ext; | 1,821,439 |
Object query(String sql, Object[] args, ResultSetExtractor rse) throws DataAccessException;
| Object query(String sql, Object[] args, ResultSetExtractor rse) throws DataAccessException; | /**
* Query given SQL to create a prepared statement from SQL and a list
* of arguments to bind to the query, reading the ResultSet with a
* ResultSetExtractor.
* @param sql SQL query to execute
* @param args arguments to bind to the query
* (leaving it to the PreparedStatement to guess the correspond... | Query given SQL to create a prepared statement from SQL and a list of arguments to bind to the query, reading the ResultSet with a ResultSetExtractor | query | {
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/jdbc/core/JdbcOperations.java",
"license": "unlicense",
"size": 47160
} | [
"org.springframework.dao.DataAccessException"
] | import org.springframework.dao.DataAccessException; | import org.springframework.dao.*; | [
"org.springframework.dao"
] | org.springframework.dao; | 2,489,716 |
public void addNote( NotePadMeta ni ) {
notes.add( ni );
changedNotes = true;
} | void function( NotePadMeta ni ) { notes.add( ni ); changedNotes = true; } | /**
* Add a new note. Also marks that the notes have changed.
*
* @param ni The note to be added.
*/ | Add a new note. Also marks that the notes have changed | addNote | {
"repo_name": "ViswesvarSekar/pentaho-kettle",
"path": "engine/src/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 51635
} | [
"org.pentaho.di.core.NotePadMeta"
] | import org.pentaho.di.core.NotePadMeta; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 1,648,869 |
public final ImmutableList<E> toSortedList(Comparator<? super E> comparator) {
return Ordering.from(comparator).immutableSortedCopy(iterable);
} | final ImmutableList<E> function(Comparator<? super E> comparator) { return Ordering.from(comparator).immutableSortedCopy(iterable); } | /**
* Returns an {@code ImmutableList} containing all of the elements from this {@code Sequence} in
* the order specified by {@code comparator}. To produce an {@code ImmutableList} sorted by its
* natural ordering, use {@code toSortedList(Ordering.natural())}.
* @param comparator the function by which to so... | Returns an ImmutableList containing all of the elements from this Sequence in the order specified by comparator. To produce an ImmutableList sorted by its natural ordering, use toSortedList(Ordering.natural()) | toSortedList | {
"repo_name": "immutables/miscellaneous",
"path": "sequence/src/org/immutables/sequence/Sequence.java",
"license": "apache-2.0",
"size": 21792
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Ordering",
"java.util.Comparator"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.Ordering; import java.util.Comparator; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 2,905,439 |
FileLock tryLock() throws IOException {
boolean deletionHookAdded = false;
File lockF = new File(root, STORAGE_FILE_LOCK);
if (!lockF.exists()) {
lockF.deleteOnExit();
deletionHookAdded = true;
}
RandomAccessFile file = new RandomAccessFile(lockF, "rws");
String j... | FileLock tryLock() throws IOException { boolean deletionHookAdded = false; File lockF = new File(root, STORAGE_FILE_LOCK); if (!lockF.exists()) { lockF.deleteOnExit(); deletionHookAdded = true; } RandomAccessFile file = new RandomAccessFile(lockF, "rws"); String jvmName = ManagementFactory.getRuntimeMXBean().getName();... | /**
* Attempts to acquire an exclusive lock on the storage.
*
* @return A lock object representing the newly-acquired lock or
* <code>null</code> if storage is already locked.
* @throws IOException
* if locking fails.
*/ | Attempts to acquire an exclusive lock on the storage | tryLock | {
"repo_name": "robzor92/hops",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/common/Storage.java",
"license": "apache-2.0",
"size": 38180
} | [
"com.google.common.base.Charsets",
"java.io.File",
"java.io.IOException",
"java.io.RandomAccessFile",
"java.lang.management.ManagementFactory",
"java.nio.channels.FileLock",
"java.nio.channels.OverlappingFileLockException"
] | import com.google.common.base.Charsets; import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; import java.lang.management.ManagementFactory; import java.nio.channels.FileLock; import java.nio.channels.OverlappingFileLockException; | import com.google.common.base.*; import java.io.*; import java.lang.management.*; import java.nio.channels.*; | [
"com.google.common",
"java.io",
"java.lang",
"java.nio"
] | com.google.common; java.io; java.lang; java.nio; | 1,221,081 |
@SuppressWarnings("unchecked")
@Test
public void getContainsClobs_works_when_there_are_no_clobs()
{
@NotNull final List<Attribute<DecoratedString>> attributes =
new ArrayList<Attribute<DecoratedString>>();
@NotNull final String name = "name";
@NotNull final String co... | @SuppressWarnings(STR) void function() { @NotNull final List<Attribute<DecoratedString>> attributes = new ArrayList<Attribute<DecoratedString>>(); @NotNull final String name = "name"; @NotNull final String comment = STR; @NotNull final List<Attribute<String>> primaryKey = new ArrayList<Attribute<String>>(0); @NotNull f... | /**
* Checks whether getContainsClobs() detects any Clob
* attribute, when there is none.
*/ | Checks whether getContainsClobs() detects any Clob attribute, when there is none | getContainsClobs_works_when_there_are_no_clobs | {
"repo_name": "rydnr/queryj-rt",
"path": "queryj-core/src/test/java/org/acmsl/queryj/metadata/AbstractTableListDecoratorTest.java",
"license": "gpl-2.0",
"size": 13941
} | [
"java.sql.Types",
"java.util.ArrayList",
"java.util.List",
"org.acmsl.queryj.customsql.CustomSqlProvider",
"org.acmsl.queryj.metadata.vo.Attribute",
"org.acmsl.queryj.metadata.vo.ForeignKey",
"org.acmsl.queryj.metadata.vo.Table",
"org.acmsl.queryj.metadata.vo.TableValueObject",
"org.easymock.EasyMoc... | import java.sql.Types; import java.util.ArrayList; import java.util.List; import org.acmsl.queryj.customsql.CustomSqlProvider; import org.acmsl.queryj.metadata.vo.Attribute; import org.acmsl.queryj.metadata.vo.ForeignKey; import org.acmsl.queryj.metadata.vo.Table; import org.acmsl.queryj.metadata.vo.TableValueObject; i... | import java.sql.*; import java.util.*; import org.acmsl.queryj.customsql.*; import org.acmsl.queryj.metadata.vo.*; import org.easymock.*; import org.jetbrains.annotations.*; import org.junit.*; | [
"java.sql",
"java.util",
"org.acmsl.queryj",
"org.easymock",
"org.jetbrains.annotations",
"org.junit"
] | java.sql; java.util; org.acmsl.queryj; org.easymock; org.jetbrains.annotations; org.junit; | 1,826,031 |
private boolean isConstraintAnnotation(AnnotationMirror annotationMirror) {
return isConstraintAnnotation( annotationMirror.getAnnotationType().asElement() );
}
/**
* Checks, whether the given annotation mirror represents the {@code @Constraint} | boolean function(AnnotationMirror annotationMirror) { return isConstraintAnnotation( annotationMirror.getAnnotationType().asElement() ); } /** * Checks, whether the given annotation mirror represents the {@code @Constraint} | /**
* Checks, whether the given annotation mirror represents a constraint
* annotation or not. That's the case, if the given mirror is annotated with
* the {@code @Constraint} meta-annotation (which is only allowed at
* annotation declarations).
*
* @param annotationMirror The annotation mirror of interest.... | Checks, whether the given annotation mirror represents a constraint annotation or not. That's the case, if the given mirror is annotated with the @Constraint meta-annotation (which is only allowed at annotation declarations) | isConstraintAnnotation | {
"repo_name": "jmartisk/hibernate-validator",
"path": "annotation-processor/src/main/java/org/hibernate/validator/ap/util/ConstraintHelper.java",
"license": "apache-2.0",
"size": 26495
} | [
"javax.lang.model.element.AnnotationMirror"
] | import javax.lang.model.element.AnnotationMirror; | import javax.lang.model.element.*; | [
"javax.lang"
] | javax.lang; | 2,102,228 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.