method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
private void deleteBGtoAreaRelations(final BGArea area) { final String q = " from org.olat.data.group.area.BGtoAreaRelationImpl as bgarel where bgarel.groupArea = ?"; database.delete(q, new Object[] { area.getKey() }, new Type[] { Hibernate.LONG }); }
void function(final BGArea area) { final String q = STR; database.delete(q, new Object[] { area.getKey() }, new Type[] { Hibernate.LONG }); }
/** * Deletes all business group to area relations from the given business group area * * @param area */
Deletes all business group to area relations from the given business group area
deleteBGtoAreaRelations
{ "repo_name": "huihoo/olat", "path": "OLAT-LMS/src/main/java/org/olat/data/group/area/BGAreaDaoImpl.java", "license": "apache-2.0", "size": 14391 }
[ "org.hibernate.Hibernate", "org.hibernate.type.Type" ]
import org.hibernate.Hibernate; import org.hibernate.type.Type;
import org.hibernate.*; import org.hibernate.type.*;
[ "org.hibernate", "org.hibernate.type" ]
org.hibernate; org.hibernate.type;
784,814
public void addChoices(Collection<String> rValues) { MultiWordSuggestOracle rOracle = getSuggestOracle(); aDefaultSuggestions.addAll(rValues); rOracle.addAll(rValues); rOracle.setDefaultSuggestionsFromText(aDefaultSuggestions); }
void function(Collection<String> rValues) { MultiWordSuggestOracle rOracle = getSuggestOracle(); aDefaultSuggestions.addAll(rValues); rOracle.addAll(rValues); rOracle.setDefaultSuggestionsFromText(aDefaultSuggestions); }
/*************************************** * Adds multiple choices to the drop-down list. * * @param rValues The choice values to add */
Adds multiple choices to the drop-down list
addChoices
{ "repo_name": "esoco/gewt", "path": "src/main/java/de/esoco/ewt/component/ComboBox.java", "license": "apache-2.0", "size": 8430 }
[ "com.google.gwt.user.client.ui.MultiWordSuggestOracle", "java.util.Collection" ]
import com.google.gwt.user.client.ui.MultiWordSuggestOracle; import java.util.Collection;
import com.google.gwt.user.client.ui.*; import java.util.*;
[ "com.google.gwt", "java.util" ]
com.google.gwt; java.util;
936,144
public final MathSymbolTable seal() throws NoSuchModuleException { if (myLexicalScopeStack.size() > 1) { throw new IllegalStateException("There are open scopes."); } return new MathSymbolTable(myTypeGraph, myLexicalScopeStack.peek()); }
final MathSymbolTable function() throws NoSuchModuleException { if (myLexicalScopeStack.size() > 1) { throw new IllegalStateException(STR); } return new MathSymbolTable(myTypeGraph, myLexicalScopeStack.peek()); }
/** * <p>Returns an immutable snapshot of the working symbol table represented * by this <code>MathSymbolTableBuilder</code> as a <code>MathSymbolTable</code>.</p> * * @return The snapshot. * * @throws IllegalStateException If there are any open scopes. * @throws NoSuchModuleException...
Returns an immutable snapshot of the working symbol table represented by this <code>MathSymbolTableBuilder</code> as a <code>MathSymbolTable</code>
seal
{ "repo_name": "mikekab/RESOLVE", "path": "src/main/java/edu/clemson/cs/rsrg/typeandpopulate/symboltables/MathSymbolTableBuilder.java", "license": "bsd-3-clause", "size": 11220 }
[ "edu.clemson.cs.rsrg.typeandpopulate.exception.NoSuchModuleException" ]
import edu.clemson.cs.rsrg.typeandpopulate.exception.NoSuchModuleException;
import edu.clemson.cs.rsrg.typeandpopulate.exception.*;
[ "edu.clemson.cs" ]
edu.clemson.cs;
52,172
@Override public void setScreen(Screen screen){ if (this.screen != null) this.screen.dispose(); this.screen = screen; if (this.screen != null) { this.screen.show(); this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } }
void function(Screen screen){ if (this.screen != null) this.screen.dispose(); this.screen = screen; if (this.screen != null) { this.screen.show(); this.screen.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); } }
/** * Metodo para cambiar pantalla * @param screen */
Metodo para cambiar pantalla
setScreen
{ "repo_name": "Chromlum/Piercy", "path": "core/src/com/piercystudio/PiercyGame.java", "license": "gpl-2.0", "size": 3691 }
[ "com.badlogic.gdx.Gdx", "com.badlogic.gdx.Screen" ]
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Screen;
import com.badlogic.gdx.*;
[ "com.badlogic.gdx" ]
com.badlogic.gdx;
907,851
public static ASN1Set getLastNameEntry(X500Name name) { RDN[] rdns = name.getRDNs(); int size = rdns.length; return (size > 0) ? (ASN1Set) rdns[size - 1].toASN1Primitive() : null; }
static ASN1Set function(X500Name name) { RDN[] rdns = name.getRDNs(); int size = rdns.length; return (size > 0) ? (ASN1Set) rdns[size - 1].toASN1Primitive() : null; }
/** * Gets the last name component from the {@link X509Name X509Name} name. * * @return the last name component. Null if there is none. */
Gets the last name component from the <code>X509Name X509Name</code> name
getLastNameEntry
{ "repo_name": "dCache/JGlobus", "path": "ssl-proxies/src/main/java/org/globus/gsi/bc/X509NameHelper.java", "license": "apache-2.0", "size": 6185 }
[ "org.bouncycastle.asn1.ASN1Set", "org.bouncycastle.asn1.x500.X500Name" ]
import org.bouncycastle.asn1.ASN1Set; import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.*; import org.bouncycastle.asn1.x500.*;
[ "org.bouncycastle.asn1" ]
org.bouncycastle.asn1;
943,033
public void setChild(Activity child) { this.child = child; }
void function(Activity child) { this.child = child; }
/** * Sets the child to the passed Activity * * @param child * the child */
Sets the child to the passed Activity
setChild
{ "repo_name": "CarlAtComputer/tracker", "path": "playground/other_gef/org.eclipse.gef.examples.flow/src/org/eclipse/gef/examples/flow/model/commands/OrphanChildCommand.java", "license": "gpl-2.0", "size": 1639 }
[ "org.eclipse.gef.examples.flow.model.Activity" ]
import org.eclipse.gef.examples.flow.model.Activity;
import org.eclipse.gef.examples.flow.model.*;
[ "org.eclipse.gef" ]
org.eclipse.gef;
2,326,403
public static JavaOptimizationMode getJavaOptimizationMode(RuleContext ruleContext) { return ruleContext.getConfiguration().getFragment(JavaConfiguration.class) .getJavaOptimizationMode(); }
static JavaOptimizationMode function(RuleContext ruleContext) { return ruleContext.getConfiguration().getFragment(JavaConfiguration.class) .getJavaOptimizationMode(); }
/** * Returns {@link JavaConfiguration#getJavaOptimizationMode()}. */
Returns <code>JavaConfiguration#getJavaOptimizationMode()</code>
getJavaOptimizationMode
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/main/java/com/google/devtools/build/lib/rules/java/ProguardHelper.java", "license": "apache-2.0", "size": 25426 }
[ "com.google.devtools.build.lib.analysis.RuleContext", "com.google.devtools.build.lib.rules.java.JavaConfiguration" ]
import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.rules.java.JavaConfiguration;
import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.rules.java.*;
[ "com.google.devtools" ]
com.google.devtools;
2,339,074
public void copy(boolean cut) { Object[] selection = model.getSelection().getCurrent(); if (selection != null && selection.length > 0) { if (cut) { for (Object object : selection) { CopyListener copyListener = copyListeners.get(object .getClass()); if (copyListener != null) { copyLi...
void function(boolean cut) { Object[] selection = model.getSelection().getCurrent(); if (selection != null && selection.length > 0) { if (cut) { for (Object object : selection) { CopyListener copyListener = copyListeners.get(object .getClass()); if (copyListener != null) { copyListener.cut(object); } } } clipboard.setC...
/** * Execute a copy (or cut) operation over the current view with keyboard * focus * * @param cut * if it is a cut operation */
Execute a copy (or cut) operation over the current view with keyboard focus
copy
{ "repo_name": "e-ucm/ead", "path": "editor/core/src/main/java/es/eucm/ead/editor/control/Clipboard.java", "license": "lgpl-3.0", "size": 6075 }
[ "es.eucm.ead.editor.control.Selection", "es.eucm.ead.editor.control.actions.model.SetSelection" ]
import es.eucm.ead.editor.control.Selection; import es.eucm.ead.editor.control.actions.model.SetSelection;
import es.eucm.ead.editor.control.*; import es.eucm.ead.editor.control.actions.model.*;
[ "es.eucm.ead" ]
es.eucm.ead;
1,766,291
Optional<T> res; if (optional.isPresent()) { res = optional; } else { res = supplier.get(); } return res; }
Optional<T> res; if (optional.isPresent()) { res = optional; } else { res = supplier.get(); } return res; }
/** * Returns the {@code optional} instance * if a value is present in it; supplier.get() otherwise.<br> * <br> * As of Java 9 you can do simply<br> * <pre>{@code * firstOptional.or(() -> secondOptional); * }</pre> * * @param <T> The class of the value * @param opti...
Returns the optional instance if a value is present in it; supplier.get() otherwise. As of Java 9 you can do simply <code>firstOptional.or(() -> secondOptional); </code>
or
{ "repo_name": "visionarts/power-jambda", "path": "power-jambda-core/src/main/java/com/visionarts/powerjambda/utils/OptionalUtils.java", "license": "apache-2.0", "size": 1720 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
485,434
public static String eachMatch(String self, Pattern pattern, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) { Matcher m = pattern.matcher(self); each(m, closure); return self; }
static String function(String self, Pattern pattern, @ClosureParams(value=FromString.class, options={STR,STR}) Closure closure) { Matcher m = pattern.matcher(self); each(m, closure); return self; }
/** * Process each regex group matched substring of the given pattern. If the closure * parameter takes one argument, an array with all match groups is passed to it. * If the closure takes as many arguments as there are match groups, then each * parameter will be one match group. * * @para...
Process each regex group matched substring of the given pattern. If the closure parameter takes one argument, an array with all match groups is passed to it. If the closure takes as many arguments as there are match groups, then each parameter will be one match group
eachMatch
{ "repo_name": "bsideup/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 141076 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.FromString", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.codehaus.groovy.runtime.DefaultGroovyMethods" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.FromString; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.codehaus.groovy.runtime.DefaultGroovyMethods;
import groovy.lang.*; import groovy.transform.stc.*; import java.util.regex.*; import org.codehaus.groovy.runtime.*;
[ "groovy.lang", "groovy.transform.stc", "java.util", "org.codehaus.groovy" ]
groovy.lang; groovy.transform.stc; java.util; org.codehaus.groovy;
2,264,713
public T xquery(String text, Class<?> resultType, Namespaces namespaces) { return xquery(text, resultType, namespaces.getNamespaces()); }
T function(String text, Class<?> resultType, Namespaces namespaces) { return xquery(text, resultType, namespaces.getNamespaces()); }
/** * Evaluates an <a href="http://camel.apache.org/xquery.html">XQuery * expression</a> with the specified result type and set of namespace * prefixes and URIs * * @param text the expression to be evaluated * @param resultType the return type expected by the expression * @param names...
Evaluates an XQuery expression with the specified result type and set of namespace prefixes and URIs
xquery
{ "repo_name": "ullgren/camel", "path": "core/camel-core-engine/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java", "license": "apache-2.0", "size": 40867 }
[ "org.apache.camel.support.builder.Namespaces" ]
import org.apache.camel.support.builder.Namespaces;
import org.apache.camel.support.builder.*;
[ "org.apache.camel" ]
org.apache.camel;
2,269,619
public static HandleFault getHandleFault(CamelContext context) { List<InterceptStrategy> list = context.getInterceptStrategies(); for (InterceptStrategy interceptStrategy : list) { if (interceptStrategy instanceof HandleFault) { return (HandleFault)interceptStrategy; ...
static HandleFault function(CamelContext context) { List<InterceptStrategy> list = context.getInterceptStrategies(); for (InterceptStrategy interceptStrategy : list) { if (interceptStrategy instanceof HandleFault) { return (HandleFault)interceptStrategy; } } return null; }
/** * A helper method to return the HandleFault instance * for a given {@link org.apache.camel.CamelContext} if one is enabled * * @param context the camel context the handlefault intercept strategy is connected to * @return the stream cache or null if none can be found */
A helper method to return the HandleFault instance for a given <code>org.apache.camel.CamelContext</code> if one is enabled
getHandleFault
{ "repo_name": "punkhorn/camel-upstream", "path": "core/camel-core/src/main/java/org/apache/camel/processor/interceptor/HandleFault.java", "license": "apache-2.0", "size": 2236 }
[ "java.util.List", "org.apache.camel.CamelContext", "org.apache.camel.spi.InterceptStrategy" ]
import java.util.List; import org.apache.camel.CamelContext; import org.apache.camel.spi.InterceptStrategy;
import java.util.*; import org.apache.camel.*; import org.apache.camel.spi.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
300,678
public void testDroppedOffer() { SubmissionPublisher<Integer> p = new SubmissionPublisher<>(basicExecutor, 4); TestSubscriber s1 = new TestSubscriber(); s1.request = false; TestSubscriber s2 = new TestSubscriber(); s2.request = false; p.subscribe(s1); ...
void function() { SubmissionPublisher<Integer> p = new SubmissionPublisher<>(basicExecutor, 4); TestSubscriber s1 = new TestSubscriber(); s1.request = false; TestSubscriber s2 = new TestSubscriber(); s2.request = false; p.subscribe(s1); p.subscribe(s2); s2.awaitSubscribe(); s1.awaitSubscribe(); for (int i = 1; i <= 4; ...
/** * offer reports drops if saturated */
offer reports drops if saturated
testDroppedOffer
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/SubmissionPublisherTest.java", "license": "gpl-2.0", "size": 34373 }
[ "java.util.concurrent.SubmissionPublisher" ]
import java.util.concurrent.SubmissionPublisher;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,777,496
@Test public void testNotEqualsPositive03() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = "standardlibrary/oclany/notequalsPositive03.ocl"; modelFileName = "testmodel.uml"; testPerformer = TestPerformer.getInstance(AllStandardLibraryTe...
void function() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = STR; modelFileName = STR; testPerformer = TestPerformer.getInstance(AllStandardLibraryTests.META_MODEL_ID, AllStandardLibraryTests.MODEL_BUNDLE, AllStandardLibraryTests.MODEL_DIRECTORY); testPerformer...
/** * <p> * A test case testing the method <code>OclAny.<>()</code>. * </p> */
A test case testing the method <code>OclAny..
testNotEqualsPositive03
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.ocl2parser.test/src/org/dresdenocl/ocl2parser/test/standardlibrary/TestOclAny.java", "license": "lgpl-3.0", "size": 34224 }
[ "org.dresdenocl.ocl2parser.test.TestPerformer" ]
import org.dresdenocl.ocl2parser.test.TestPerformer;
import org.dresdenocl.ocl2parser.test.*;
[ "org.dresdenocl.ocl2parser" ]
org.dresdenocl.ocl2parser;
122,481
public void testGetSet() { AtomicLong ai = new AtomicLong(1); assertEquals(1, ai.get()); ai.set(2); assertEquals(2, ai.get()); ai.set(-3); assertEquals(-3, ai.get()); }
void function() { AtomicLong ai = new AtomicLong(1); assertEquals(1, ai.get()); ai.set(2); assertEquals(2, ai.get()); ai.set(-3); assertEquals(-3, ai.get()); }
/** * get returns the last value set */
get returns the last value set
testGetSet
{ "repo_name": "life-beam/j2objc", "path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/AtomicLongTest.java", "license": "apache-2.0", "size": 7972 }
[ "java.util.concurrent.atomic.AtomicLong" ]
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
211,524
@Override public void stopIabServiceInBg(IabCallbacks.IabInitListener iabListener) { keepIabServiceOpen = false; stopIabHelper(iabListener); }
void function(IabCallbacks.IabInitListener iabListener) { keepIabServiceOpen = false; stopIabHelper(iabListener); }
/** * see parent */
see parent
stopIabServiceInBg
{ "repo_name": "vedi/android-store-google-play", "path": "src/com/soomla/store/billing/google/GooglePlayIabService.java", "license": "mit", "size": 26414 }
[ "com.soomla.store.billing.IabCallbacks" ]
import com.soomla.store.billing.IabCallbacks;
import com.soomla.store.billing.*;
[ "com.soomla.store" ]
com.soomla.store;
301,376
@ServiceMethod(returns = ReturnType.SINGLE) RunbookInner update( String resourceGroupName, String automationAccountName, String runbookName, RunbookUpdateParameters parameters);
@ServiceMethod(returns = ReturnType.SINGLE) RunbookInner update( String resourceGroupName, String automationAccountName, String runbookName, RunbookUpdateParameters parameters);
/** * Update the runbook identified by runbook name. * * @param resourceGroupName Name of an Azure Resource group. * @param automationAccountName The name of the automation account. * @param runbookName The runbook name. * @param parameters The update parameters for runbook. * @throws...
Update the runbook identified by runbook name
update
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/automation/azure-resourcemanager-automation/src/main/java/com/azure/resourcemanager/automation/fluent/RunbooksClient.java", "license": "mit", "size": 14358 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.automation.fluent.models.RunbookInner", "com.azure.resourcemanager.automation.models.RunbookUpdateParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.automation.fluent.models.RunbookInner; import com.azure.resourcemanager.automation.models.RunbookUpdateParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.automation.fluent.models.*; import com.azure.resourcemanager.automation.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
806,919
@Override public void tearDown() { LogFactory.releaseAll(); } // ----------------------------------------------------------- Test Methods
void function() { LogFactory.releaseAll(); }
/** * Tear down instance variables required by this test case. */
Tear down instance variables required by this test case
tearDown
{ "repo_name": "apache/commons-logging", "path": "src/test/java/org/apache/commons/logging/tccl/logfactory/TcclDisabledTestCase.java", "license": "apache-2.0", "size": 6343 }
[ "org.apache.commons.logging.LogFactory" ]
import org.apache.commons.logging.LogFactory;
import org.apache.commons.logging.*;
[ "org.apache.commons" ]
org.apache.commons;
2,357,786
DoubleVector termVector = new DenseVector(indexVectorLength); for (int i = 0; i < indexVectorLength; i++) termVector.set(i, mean + (randomGenerator.nextGaussian() * stdev)); return termVector; }
DoubleVector termVector = new DenseVector(indexVectorLength); for (int i = 0; i < indexVectorLength; i++) termVector.set(i, mean + (randomGenerator.nextGaussian() * stdev)); return termVector; }
/** * Generate a new random vector using a guassian distribution for each * value. */
Generate a new random vector using a guassian distribution for each value
generate
{ "repo_name": "fozziethebeat/S-Space", "path": "src/main/java/edu/ucla/sspace/index/GaussianVectorGenerator.java", "license": "gpl-2.0", "size": 4628 }
[ "edu.ucla.sspace.vector.DenseVector", "edu.ucla.sspace.vector.DoubleVector" ]
import edu.ucla.sspace.vector.DenseVector; import edu.ucla.sspace.vector.DoubleVector;
import edu.ucla.sspace.vector.*;
[ "edu.ucla.sspace" ]
edu.ucla.sspace;
203,901
public static boolean syncVisible(OrasiDriver driver, Element element) { return syncVisible(driver, driver.getElementTimeout(),getSyncToFailTest(), element); }
static boolean function(OrasiDriver driver, Element element) { return syncVisible(driver, driver.getElementTimeout(),getSyncToFailTest(), element); }
/** * * Used in conjunction with WebObjectVisible to determine if the desired * element is visible on the screen Will loop for the time out listed in * org.orasi.chameleon.CONSTANT.TIMEOUT If object is not visible within the * time, throw an error * * @author Justin */
Used in conjunction with WebObjectVisible to determine if the desired element is visible on the screen Will loop for the time out listed in org.orasi.chameleon.CONSTANT.TIMEOUT If object is not visible within the time, throw an error
syncVisible
{ "repo_name": "Orasi/Xeeva", "path": "src/main/java/com/orasi/utils/PageLoaded.java", "license": "bsd-3-clause", "size": 30167 }
[ "com.orasi.core.interfaces.Element" ]
import com.orasi.core.interfaces.Element;
import com.orasi.core.interfaces.*;
[ "com.orasi.core" ]
com.orasi.core;
671,842
public void setNullParameterInfo(String[] parmTypeNames) throws StandardException { for (int i = 0; i < methodParms.length; i++) { if (methodParms[i].getJavaTypeName().equals("")) { DataTypeDescriptor dts = DataTypeDescriptor.getSQLDataTypeDescriptor(parmTypeNames[i]); ((SQLToJavaVal...
void function(String[] parmTypeNames) throws StandardException { for (int i = 0; i < methodParms.length; i++) { if (methodParms[i].getJavaTypeName().equals("")) { DataTypeDescriptor dts = DataTypeDescriptor.getSQLDataTypeDescriptor(parmTypeNames[i]); ((SQLToJavaValueNode)methodParms[i]).value.setType(dts); methodParms[...
/** * Set the appropriate type information for a null passed as a parameter. * This method is called after method resolution, when a signature was * successfully matched. * * @param parmTypeNames String[] with the java type names for the parameters * as declared by the method * * @exception Stand...
Set the appropriate type information for a null passed as a parameter. This method is called after method resolution, when a signature was successfully matched
setNullParameterInfo
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/sql/compile/MethodCallNode.java", "license": "apache-2.0", "size": 38211 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.types.DataTypeDescriptor" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.types.DataTypeDescriptor;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.types.*;
[ "org.apache.derby" ]
org.apache.derby;
1,031,521
@Override protected synchronized void analyzeDependency(Dependency ignore, Engine engine) throws AnalysisException { if (!analyzed) { analyzed = true; final Set<Dependency> dependenciesToRemove = new HashSet<>(); final Dependency[] dependencies = engine.getDependenci...
synchronized void function(Dependency ignore, Engine engine) throws AnalysisException { if (!analyzed) { analyzed = true; final Set<Dependency> dependenciesToRemove = new HashSet<>(); final Dependency[] dependencies = engine.getDependencies(); if (dependencies.length < 2) { return; } for (int x = 0; x < dependencies.le...
/** * Analyzes a set of dependencies. If they have been found to have the same * base path and the same set of identifiers they are likely related. The * related dependencies are bundled into a single reportable item. * * @param ignore this analyzer ignores the dependency being analyzed * ...
Analyzes a set of dependencies. If they have been found to have the same base path and the same set of identifiers they are likely related. The related dependencies are bundled into a single reportable item
analyzeDependency
{ "repo_name": "stefanneuhaus/DependencyCheck", "path": "core/src/main/java/org/owasp/dependencycheck/analyzer/AbstractDependencyComparingAnalyzer.java", "license": "apache-2.0", "size": 4389 }
[ "java.util.HashSet", "java.util.Set", "org.owasp.dependencycheck.Engine", "org.owasp.dependencycheck.analyzer.exception.AnalysisException", "org.owasp.dependencycheck.dependency.Dependency" ]
import java.util.HashSet; import java.util.Set; import org.owasp.dependencycheck.Engine; import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import org.owasp.dependencycheck.dependency.Dependency;
import java.util.*; import org.owasp.dependencycheck.*; import org.owasp.dependencycheck.analyzer.exception.*; import org.owasp.dependencycheck.dependency.*;
[ "java.util", "org.owasp.dependencycheck" ]
java.util; org.owasp.dependencycheck;
492,188
protected void replaceValue(Map<String, Object> content, String key, Object value) { if (content.containsKey(key) && value != null) { content.put(key, value); } }
void function(Map<String, Object> content, String key, Object value) { if (content.containsKey(key) && value != null) { content.put(key, value); } }
/** * Replace the {@code value} for the specified key if the value is not {@code null}. * @param content the content to expose * @param key the property to replace * @param value the new value */
Replace the value for the specified key if the value is not null
replaceValue
{ "repo_name": "lenicliu/spring-boot", "path": "spring-boot-actuator/src/main/java/org/springframework/boot/actuate/info/InfoPropertiesInfoContributor.java", "license": "apache-2.0", "size": 4585 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,126,805
public static ObjectMapper newMinimalObjectMapper() { return new ObjectMapper() .registerModule(new GuavaModule()) .setSubtypeResolver(new DiscoverableSubtypeResolver()); }
static ObjectMapper function() { return new ObjectMapper() .registerModule(new GuavaModule()) .setSubtypeResolver(new DiscoverableSubtypeResolver()); }
/** * Creates a new minimal {@link ObjectMapper} that will work with Dropwizard out of box. * <p><b>NOTE:</b> Use it, if the default Dropwizard's {@link ObjectMapper}, created in * {@link #newObjectMapper()}, is too aggressive for you.</p> */
Creates a new minimal <code>ObjectMapper</code> that will work with Dropwizard out of box. <code>#newObjectMapper()</code>, is too aggressive for you
newMinimalObjectMapper
{ "repo_name": "tjcutajar/dropwizard", "path": "dropwizard-jackson/src/main/java/io/dropwizard/jackson/Jackson.java", "license": "apache-2.0", "size": 2865 }
[ "com.fasterxml.jackson.databind.ObjectMapper", "com.fasterxml.jackson.datatype.guava.GuavaModule" ]
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.datatype.guava.GuavaModule;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.datatype.guava.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
879,969
public int create(String sessionKey, String treeLabel, String basePath, String channelLabel, String installType) { User loggedInUser = getLoggedInUser(sessionKey); ensureConfigAdmin(loggedInUser); TreeCreateOperation create = new TreeCreateOperation(loggedInUser); ...
int function(String sessionKey, String treeLabel, String basePath, String channelLabel, String installType) { User loggedInUser = getLoggedInUser(sessionKey); ensureConfigAdmin(loggedInUser); TreeCreateOperation create = new TreeCreateOperation(loggedInUser); create.setBasePath(basePath); create.setChannel(getChannel(c...
/** * Create a Kickstart Tree (Distribution) in Satellite * * @param sessionKey User's session key. * @param treeLabel Label for the new kickstart tree * @param basePath path to the base/root of the kickstart tree. * @param channelLabel label of channel to associate with ks tree. * @p...
Create a Kickstart Tree (Distribution) in Satellite
create
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/tree/KickstartTreeHandler.java", "license": "gpl-2.0", "size": 12279 }
[ "com.redhat.rhn.common.validator.ValidatorError", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.manager.kickstart.tree.TreeCreateOperation" ]
import com.redhat.rhn.common.validator.ValidatorError; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.manager.kickstart.tree.TreeCreateOperation;
import com.redhat.rhn.common.validator.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.manager.kickstart.tree.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
212,091
protected SAXBuilder createSAXBuilder() { SAXBuilder saxBuilder = new SAXBuilder(_validate); saxBuilder.setEntityResolver(RESOLVER); // // This code is needed to fix the security problem outlined in http://www.securityfocus.com/archive/1/297714 // // Unfortun...
SAXBuilder function() { SAXBuilder saxBuilder = new SAXBuilder(_validate); saxBuilder.setEntityResolver(RESOLVER); try { XMLReader parser = saxBuilder.createParser(); try { parser.setFeature(STRhttp: } catch (SAXNotRecognizedException e) { } catch (SAXNotSupportedException e) { } try { parser.setFeature(STRhttp: } catc...
/** * Creates and sets up a org.jdom.input.SAXBuilder for parsing. * * @return a new org.jdom.input.SAXBuilder object */
Creates and sets up a org.jdom.input.SAXBuilder for parsing
createSAXBuilder
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "georss/rome-0.9/src/java/com/sun/syndication/io/WireFeedInput.java", "license": "gpl-2.0", "size": 11348 }
[ "org.jdom.JDOMException", "org.xml.sax.SAXNotRecognizedException", "org.xml.sax.SAXNotSupportedException", "org.xml.sax.XMLReader" ]
import org.jdom.JDOMException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; import org.xml.sax.XMLReader;
import org.jdom.*; import org.xml.sax.*;
[ "org.jdom", "org.xml.sax" ]
org.jdom; org.xml.sax;
148,042
@Override public void stateChanged(ChangeEvent e) { setDirectoryManagers(QWinFrame.getQWinFrame().getCurrentDirectoryManagers()); setWorkfileLocationValue(QWinFrame.getQWinFrame().getUserWorkfileDirectory()); }
void function(ChangeEvent e) { setDirectoryManagers(QWinFrame.getQWinFrame().getCurrentDirectoryManagers()); setWorkfileLocationValue(QWinFrame.getQWinFrame().getUserWorkfileDirectory()); }
/** * Called by Swing on a state change. * * @param e what changed. */
Called by Swing on a state change
stateChanged
{ "repo_name": "jimv39/qvcsos", "path": "qvcse-gui/src/main/java/com/qumasoft/guitools/qwin/RightFilePane.java", "license": "apache-2.0", "size": 65768 }
[ "javax.swing.event.ChangeEvent" ]
import javax.swing.event.ChangeEvent;
import javax.swing.event.*;
[ "javax.swing" ]
javax.swing;
1,456,828
public ConcurrentSkipListSet<String> getStocks(String countryName, String marketCode, String indexCode){ if (indexBook.get(countryName) == null){ return null; } if (indexBook.get(countryName).get(marketCode) == null){ return null; } I...
ConcurrentSkipListSet<String> function(String countryName, String marketCode, String indexCode){ if (indexBook.get(countryName) == null){ return null; } if (indexBook.get(countryName).get(marketCode) == null){ return null; } Index index = this.getIndex(countryName, marketCode, indexCode); if (index != null){ return ind...
/** * Get all stock included in a particular index * @param countryName * @param marketCode * @param indexCode * @return ConcurrentSkipListSet<String> of stock code or null if has nothing */
Get all stock included in a particular index
getStocks
{ "repo_name": "ztan5/TechnicalAnalysisTool", "path": "data/src/tat/data/IndexBook.java", "license": "unlicense", "size": 11785 }
[ "java.util.concurrent.ConcurrentSkipListSet" ]
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,240,714
public Appliance cloneApplianceFrom(long id, String name, String arch) throws SUSEStudioException { StringBuilder uri = new StringBuilder("/user/appliances?clone_from="); uri.append(id); if (name != null) { uri.append("&name="); uri.append(StudioUtils.encode(name)); ...
Appliance function(long id, String name, String arch) throws SUSEStudioException { StringBuilder uri = new StringBuilder(STR); uri.append(id); if (name != null) { uri.append(STR); uri.append(StudioUtils.encode(name)); } if (arch != null) { uri.append(STR); uri.append(StudioUtils.encode(arch)); } StudioConnection sc = n...
/** * Clones an existing appliance in a new appliance * * POST /api/v2/user/appliances?clone_from=<appliance_id>&name=<name>&arch=<arch> * * @param id original appliance identifier * @param name new appliance name or null for automatic generation * @param arch new appliance architec...
Clones an existing appliance in a new appliance POST /api/v2/user/appliances?clone_from=&name=&arch=
cloneApplianceFrom
{ "repo_name": "susestudio/susestudio-lib-java", "path": "src/main/java/com/suse/studio/client/SUSEStudio.java", "license": "mit", "size": 17992 }
[ "com.suse.studio.client.exception.SUSEStudioException", "com.suse.studio.client.model.Appliance", "com.suse.studio.client.net.StudioConnection", "com.suse.studio.client.util.StudioUtils" ]
import com.suse.studio.client.exception.SUSEStudioException; import com.suse.studio.client.model.Appliance; import com.suse.studio.client.net.StudioConnection; import com.suse.studio.client.util.StudioUtils;
import com.suse.studio.client.exception.*; import com.suse.studio.client.model.*; import com.suse.studio.client.net.*; import com.suse.studio.client.util.*;
[ "com.suse.studio" ]
com.suse.studio;
1,079,266
public CashieringTransaction getCurrentTransaction() { return currentTransaction; }
CashieringTransaction function() { return currentTransaction; }
/** * Gets the currentTransaction attribute. * * @return Returns the currentTransaction. */
Gets the currentTransaction attribute
getCurrentTransaction
{ "repo_name": "ua-eas/kfs-devops-automation-fork", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/document/CashManagementDocument.java", "license": "agpl-3.0", "size": 30786 }
[ "org.kuali.kfs.fp.businessobject.CashieringTransaction" ]
import org.kuali.kfs.fp.businessobject.CashieringTransaction;
import org.kuali.kfs.fp.businessobject.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,501,638
boolean delete(String src, boolean recursive, boolean logRetryCache) throws IOException { waitForLoadingFSImage(); BlocksMapUpdateInfo toRemovedBlocks = null; writeLock(); boolean ret = false; try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode("Cannot delete " +...
boolean delete(String src, boolean recursive, boolean logRetryCache) throws IOException { waitForLoadingFSImage(); BlocksMapUpdateInfo toRemovedBlocks = null; writeLock(); boolean ret = false; try { checkOperation(OperationCategory.WRITE); checkNameNodeSafeMode(STR + src); toRemovedBlocks = FSDirDeleteOp.delete( this, ...
/** * Remove the indicated file from namespace. * * @see ClientProtocol#delete(String, boolean) for detailed description and * description of exceptions */
Remove the indicated file from namespace
delete
{ "repo_name": "myeoje/PhillyYarn", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 298468 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.server.namenode.INode", "org.apache.hadoop.hdfs.server.namenode.NameNode", "org.apache.hadoop.security.AccessControlException" ]
import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.INode; import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.security.AccessControlException;
import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.security.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,602,841
public URIBuilder addParameter(final String param, final String value) { return addParameter(new BasicNameValuePair(param, value)); }
URIBuilder function(final String param, final String value) { return addParameter(new BasicNameValuePair(param, value)); }
/** * Adds parameter to URI query. The parameter name and value are expected to be unescaped * and may contain non ASCII characters. * <p> * Please note query parameters and custom query component are mutually exclusive. This method * will remove custom query if present. * </p> * ...
Adds parameter to URI query. The parameter name and value are expected to be unescaped and may contain non ASCII characters. Please note query parameters and custom query component are mutually exclusive. This method will remove custom query if present.
addParameter
{ "repo_name": "apache/httpcore", "path": "httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java", "license": "apache-2.0", "size": 35075 }
[ "org.apache.hc.core5.http.message.BasicNameValuePair" ]
import org.apache.hc.core5.http.message.BasicNameValuePair;
import org.apache.hc.core5.http.message.*;
[ "org.apache.hc" ]
org.apache.hc;
1,548,171
byte[] createFIDocument() throws SAXException { // Instantiate a new FastInfosetWriter FastInfosetWriter fiw = new SAXDocumentSerializer(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); // Set the OutputStream to write the document to fiw.setOutputStream(baos); ...
byte[] createFIDocument() throws SAXException { FastInfosetWriter fiw = new SAXDocumentSerializer(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); fiw.setOutputStream(baos); EncodingAlgorithmAttributesImpl atts = new EncodingAlgorithmAttributesImpl(); fiw.startDocument(); fiw.startElement(STRrootSTRroot", n...
/** * Create an FI document with binary encoded content. */
Create an FI document with binary encoded content
createFIDocument
{ "repo_name": "aadamowski/fi.java.net", "path": "code/samples/src/main/java/samples/typed/PrimitiveTypesWithElementContentSample.java", "license": "apache-2.0", "size": 10895 }
[ "com.sun.xml.fastinfoset.sax.SAXDocumentSerializer", "java.io.ByteArrayOutputStream", "org.jvnet.fastinfoset.EncodingAlgorithmIndexes", "org.jvnet.fastinfoset.sax.FastInfosetWriter", "org.jvnet.fastinfoset.sax.helpers.EncodingAlgorithmAttributesImpl", "org.xml.sax.SAXException" ]
import com.sun.xml.fastinfoset.sax.SAXDocumentSerializer; import java.io.ByteArrayOutputStream; import org.jvnet.fastinfoset.EncodingAlgorithmIndexes; import org.jvnet.fastinfoset.sax.FastInfosetWriter; import org.jvnet.fastinfoset.sax.helpers.EncodingAlgorithmAttributesImpl; import org.xml.sax.SAXException;
import com.sun.xml.fastinfoset.sax.*; import java.io.*; import org.jvnet.fastinfoset.*; import org.jvnet.fastinfoset.sax.*; import org.jvnet.fastinfoset.sax.helpers.*; import org.xml.sax.*;
[ "com.sun.xml", "java.io", "org.jvnet.fastinfoset", "org.xml.sax" ]
com.sun.xml; java.io; org.jvnet.fastinfoset; org.xml.sax;
2,508,984
@Override public void clearBatch() throws SQLException { checkClosed(); batchCommands = null; }
void function() throws SQLException { checkClosed(); batchCommands = null; }
/** * Clears the batch. */
Clears the batch
clearBatch
{ "repo_name": "fengshao0907/wasp", "path": "src/main/java/com/alibaba/wasp/jdbc/JdbcStatement.java", "license": "apache-2.0", "size": 28665 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,372,386
public void addPrivateKey(final String identity, final PrivateKey privkey) { if (!(privkey instanceof ECPrivateKey)) throw new IllegalArgumentException("Private key is not an instance of ECPrivateKey."); privateKeys.put(identity, privkey); }
void function(final String identity, final PrivateKey privkey) { if (!(privkey instanceof ECPrivateKey)) throw new IllegalArgumentException(STR); privateKeys.put(identity, privkey); }
/** * Add an EC private key to the store. * * @param identity ECC key pair identity. * @param privkey EC private key. * @throws IllegalArgumentException if the private key is not a * {@link ECPrivateKey}. */
Add an EC private key to the store
addPrivateKey
{ "repo_name": "Netflix/msl", "path": "tests/src/main/java/com/netflix/msl/entityauth/MockEccStore.java", "license": "apache-2.0", "size": 4561 }
[ "java.security.PrivateKey", "java.security.interfaces.ECPrivateKey" ]
import java.security.PrivateKey; import java.security.interfaces.ECPrivateKey;
import java.security.*; import java.security.interfaces.*;
[ "java.security" ]
java.security;
211,679
public Set<Coordinate> locateOccupiedFields() { return fields.keySet(); }
Set<Coordinate> function() { return fields.keySet(); }
/** * Locates occupied fields on the board. * * @return coordinates of occupied fields */
Locates occupied fields on the board
locateOccupiedFields
{ "repo_name": "schildbach/de.schildbach.game", "path": "src/de/schildbach/game/Board.java", "license": "agpl-3.0", "size": 7356 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,666,310
Date getCurrentDate();
Date getCurrentDate();
/** * Returns the current date/time as a java.util.Date * * @return current date/time */
Returns the current date/time as a java.util.Date
getCurrentDate
{ "repo_name": "ricepanda/rice-git3", "path": "rice-middleware/core/api/src/main/java/org/kuali/rice/core/api/datetime/DateTimeService.java", "license": "apache-2.0", "size": 6780 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,970,123
public ServiceCall get200ModelA201ModelC404ModelDDefaultError200ValidAsync(final ServiceCallback<Object> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); }
ServiceCall function(final ServiceCallback<Object> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); }
/** * Send a 200 response with valid payload: {'statusCode': '200'}. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */
Send a 200 response with valid payload: {'statusCode': '200'}
get200ModelA201ModelC404ModelDDefaultError200ValidAsync
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/implementation/MultipleResponsesImpl.java", "license": "mit", "size": 84047 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
120,833
public static <T> T resolveReferenceParameter(CamelContext context, String value, Class<T> type) { return resolveReferenceParameter(context, value, type, true); }
static <T> T function(CamelContext context, String value, Class<T> type) { return resolveReferenceParameter(context, value, type, true); }
/** * Resolves a reference parameter by making a lookup in the registry. * * @param <T> type of object to lookup. * @param context Camel context to use for lookup. * @param value reference parameter value. * @param type ...
Resolves a reference parameter by making a lookup in the registry
resolveReferenceParameter
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/EndpointHelper.java", "license": "apache-2.0", "size": 18417 }
[ "org.apache.camel.CamelContext" ]
import org.apache.camel.CamelContext;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,348,682
public Scanner createScannerByKey(byte[] beginKey, byte[] endKey) throws IOException { return createScannerByKey((beginKey == null) ? null : new ByteArray(beginKey, 0, beginKey.length), (endKey == null) ? null : new ByteArray(endKey, 0, endKey.length)); } /** * Get a ...
Scanner function(byte[] beginKey, byte[] endKey) throws IOException { return createScannerByKey((beginKey == null) ? null : new ByteArray(beginKey, 0, beginKey.length), (endKey == null) ? null : new ByteArray(endKey, 0, endKey.length)); } /** * Get a scanner that covers a specific key range. * * @param beginKey * Begin...
/** * Get a scanner that covers a portion of TFile based on keys. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to th...
Get a scanner that covers a portion of TFile based on keys
createScannerByKey
{ "repo_name": "dotunolafunmiloye/hadoop-common", "path": "src/java/org/apache/hadoop/io/file/tfile/TFile.java", "license": "apache-2.0", "size": 79204 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,609,161
public void setAccountNumber(String v) { if (!ObjectUtils.equals(this.accountNumber, v)) { this.accountNumber = v; setModified(true); } }
void function(String v) { if (!ObjectUtils.equals(this.accountNumber, v)) { this.accountNumber = v; setModified(true); } }
/** * Set the value of AccountNumber * * @param v new value */
Set the value of AccountNumber
setAccountNumber
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/BaseTAccount.java", "license": "gpl-3.0", "size": 60261 }
[ "org.apache.commons.lang.ObjectUtils" ]
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
890,794
void setNotificationSender(NotificationSender sender);
void setNotificationSender(NotificationSender sender);
/** * {@link NotificationSender} to use for sending notifications. * * @param sender * sender to use for sending notifications */
<code>NotificationSender</code> to use for sending notifications
setNotificationSender
{ "repo_name": "motorina0/flowable-engine", "path": "modules/flowable-jmx/src/main/java/org/flowable/management/jmx/annotations/NotificationSenderAware.java", "license": "apache-2.0", "size": 990 }
[ "org.flowable.management.jmx.NotificationSender" ]
import org.flowable.management.jmx.NotificationSender;
import org.flowable.management.jmx.*;
[ "org.flowable.management" ]
org.flowable.management;
2,898,417
return Response.noContent().build(); }
return Response.noContent().build(); }
/** * an endpoint for testing the authorization status of a user * * @return 204(No Content) or 401( not authorized ) */
an endpoint for testing the authorization status of a user
ping
{ "repo_name": "qmx/aerogear-unifiedpush-server", "path": "jaxrs/src/main/java/org/jboss/aerogear/unifiedpush/rest/util/Ping.java", "license": "apache-2.0", "size": 1171 }
[ "javax.ws.rs.core.Response" ]
import javax.ws.rs.core.Response;
import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
95,667
public void saveEx() throws AdempiereException;
void function() throws AdempiereException;
/** * Save throwing exception * @throws AdempiereException * @see #save() */
Save throwing exception
saveEx
{ "repo_name": "armenrz/adempiere", "path": "base/src/org/compiere/process/DocAction.java", "license": "gpl-2.0", "size": 7279 }
[ "org.adempiere.exceptions.AdempiereException" ]
import org.adempiere.exceptions.AdempiereException;
import org.adempiere.exceptions.*;
[ "org.adempiere.exceptions" ]
org.adempiere.exceptions;
1,758,913
protected void resolve(Class<? extends ICapability> capabilityClass) { Field field = pendingDependencies.remove(capabilityClass); resolvedDependencies.put(capabilityClass, field); }
void function(Class<? extends ICapability> capabilityClass) { Field field = pendingDependencies.remove(capabilityClass); resolvedDependencies.put(capabilityClass, field); }
/** * Updates the internal dependency state. */
Updates the internal dependency state
resolve
{ "repo_name": "isartcanyameres/mqnaas", "path": "core/src/main/java/org/mqnaas/core/impl/AbstractInstance.java", "license": "lgpl-3.0", "size": 6768 }
[ "java.lang.reflect.Field", "org.mqnaas.core.api.ICapability" ]
import java.lang.reflect.Field; import org.mqnaas.core.api.ICapability;
import java.lang.reflect.*; import org.mqnaas.core.api.*;
[ "java.lang", "org.mqnaas.core" ]
java.lang; org.mqnaas.core;
1,722,373
public void testSetKernel() { System.out.println( "setKernel" ); LocallyWeightedFunction<Vector, Vector> instance = this.createFunctionInstance(); Kernel<? super Vector> kernel = instance.getKernel(); assertNotNull( kernel ); instance.setKernel( null ); assertNul...
void function() { System.out.println( STR ); LocallyWeightedFunction<Vector, Vector> instance = this.createFunctionInstance(); Kernel<? super Vector> kernel = instance.getKernel(); assertNotNull( kernel ); instance.setKernel( null ); assertNull( instance.getKernel() ); instance.setKernel( kernel ); assertSame( kernel, ...
/** * Test of setKernel method, of class LocallyWeightedFunction. */
Test of setKernel method, of class LocallyWeightedFunction
testSetKernel
{ "repo_name": "codeaudit/Foundry", "path": "Components/LearningCore/Test/gov/sandia/cognition/learning/algorithm/regression/LocallyWeightedFunctionTest.java", "license": "bsd-3-clause", "size": 8683 }
[ "gov.sandia.cognition.learning.function.kernel.Kernel", "gov.sandia.cognition.math.matrix.Vector" ]
import gov.sandia.cognition.learning.function.kernel.Kernel; import gov.sandia.cognition.math.matrix.Vector;
import gov.sandia.cognition.learning.function.kernel.*; import gov.sandia.cognition.math.matrix.*;
[ "gov.sandia.cognition" ]
gov.sandia.cognition;
212,581
public int pedirUbicacionEnMesa(Jugador jugador) throws RemoteException { return gestion.pedirUbicacionEnMesa(jugador); }
int function(Jugador jugador) throws RemoteException { return gestion.pedirUbicacionEnMesa(jugador); }
/** * Dado un jugador este metodo se encarga de regresarle la posicion que le corresponde * en la mesa * * @param jugador jugador que pide la ubiacion que le corresponde por esa partida en la mesa * @return numero de silla que le corresponde al jugador */
Dado un jugador este metodo se encarga de regresarle la posicion que le corresponde en la mesa
pedirUbicacionEnMesa
{ "repo_name": "RoadPoker/Free-Hold-em", "path": "Free Hold'em/src/Servidor/Partida.java", "license": "gpl-2.0", "size": 7143 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
2,579,707
public List<VideoModel> getAllDeactivatedVideos(DataCallback<List<VideoModel>> callback);
List<VideoModel> function(DataCallback<List<VideoModel>> callback);
/** * Returns all Deactivated videos for logged in user * * @param callback */
Returns all Deactivated videos for logged in user
getAllDeactivatedVideos
{ "repo_name": "KirillMakarov/edx-app-android", "path": "VideoLocker/src/main/java/org/edx/mobile/module/db/IDatabase.java", "license": "apache-2.0", "size": 17149 }
[ "java.util.List", "org.edx.mobile.model.VideoModel" ]
import java.util.List; import org.edx.mobile.model.VideoModel;
import java.util.*; import org.edx.mobile.model.*;
[ "java.util", "org.edx.mobile" ]
java.util; org.edx.mobile;
1,148,812
public Set<Course> getAllValuesOfC() { return rawAccumulateAllValuesOfC(emptyArray()); }
Set<Course> function() { return rawAccumulateAllValuesOfC(emptyArray()); }
/** * Retrieve the set of values that occur in matches for C. * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches * */
Retrieve the set of values that occur in matches for C
getAllValuesOfC
{ "repo_name": "tht-krisztian/EMF-IncQuery-Examples", "path": "school/school.incquery/src-gen/school/FinalPatternMatcher.java", "license": "epl-1.0", "size": 17913 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,888,178
public void setProcessPropertiesInfo(ProcessMerlin process) { setTimezone(process.getTimezone()); setFrequencyQuantity(process.getFrequency().getFrequency()); setFrequencyUnit(process.getFrequency().getTimeUnit().toString()); setMaxParallelInstances(process.getParallel()); se...
void function(ProcessMerlin process) { setTimezone(process.getTimezone()); setFrequencyQuantity(process.getFrequency().getFrequency()); setFrequencyUnit(process.getFrequency().getTimeUnit().toString()); setMaxParallelInstances(process.getParallel()); setOrder(process.getOrder()); setRetry(process.getRetry()); }
/** * Enter process info on Page 2 of processSetup Wizard. */
Enter process info on Page 2 of processSetup Wizard
setProcessPropertiesInfo
{ "repo_name": "OpenPOWER-BigData/HDP-falcon", "path": "falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ProcessWizardPage.java", "license": "apache-2.0", "size": 34234 }
[ "org.apache.falcon.regression.Entities" ]
import org.apache.falcon.regression.Entities;
import org.apache.falcon.regression.*;
[ "org.apache.falcon" ]
org.apache.falcon;
2,342,818
public double getExchangeRate(String sourceCurrencyCode, String targetCurrencyCode) { if (sourceCurrencyCode == null || targetCurrencyCode == null) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "Cannot get exchange rate; currency was null."); } if (sourceCurrencyCode.equals(tar...
double function(String sourceCurrencyCode, String targetCurrencyCode) { if (sourceCurrencyCode == null targetCurrencyCode == null) { throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, STR); } if (sourceCurrencyCode.equals(targetCurrencyCode)) { return 1.0; } Double directRate = lookupRate(sourceCurrencyCode, ...
/** * Returns the currently known exchange rate between two currencies. If a direct rate has been loaded, * it is used. Otherwise, if a rate is known to convert the target currency to the source, the inverse * exchange rate is computed. * * @param sourceCurrencyCode The source currency being converted fr...
Returns the currently known exchange rate between two currencies. If a direct rate has been loaded, it is used. Otherwise, if a rate is known to convert the target currency to the source, the inverse exchange rate is computed
getExchangeRate
{ "repo_name": "terrancesnyder/solr-analytics", "path": "solr/core/src/java/org/apache/solr/schema/CurrencyField.java", "license": "apache-2.0", "size": 30193 }
[ "org.apache.solr.common.SolrException" ]
import org.apache.solr.common.SolrException;
import org.apache.solr.common.*;
[ "org.apache.solr" ]
org.apache.solr;
1,198,702
protected static BigDecimal getBigDecimalParameter( Map<String, String> parameters, String paramName) throws InvalidParametersException { String parameter = getParameter(parameters, paramName); if (parameter != null && parameter.trim().isEmpty()) { parameter = null; } BigDecimal bigDecimalParameter ...
static BigDecimal function( Map<String, String> parameters, String paramName) throws InvalidParametersException { String parameter = getParameter(parameters, paramName); if (parameter != null && parameter.trim().isEmpty()) { parameter = null; } BigDecimal bigDecimalParameter = (parameter != null ? getBigDecimal( parame...
/** * Gets a BigDecimal parameter from the parameters map * * @param parameters * The parameters to be sent to the server * @param paramName * the parameter to get * @return The BigDecimal parameter it got * @throws InvalidParametersException */
Gets a BigDecimal parameter from the parameters map
getBigDecimalParameter
{ "repo_name": "juanalvarez123/payu-latam-java-payments-sdk", "path": "src/main/java/com/payu/sdk/utils/CommonRequestUtil.java", "license": "mit", "size": 15511 }
[ "com.payu.sdk.exceptions.InvalidParametersException", "java.math.BigDecimal", "java.util.Map" ]
import com.payu.sdk.exceptions.InvalidParametersException; import java.math.BigDecimal; import java.util.Map;
import com.payu.sdk.exceptions.*; import java.math.*; import java.util.*;
[ "com.payu.sdk", "java.math", "java.util" ]
com.payu.sdk; java.math; java.util;
1,780,276
private DoubleMatrix generateDistanceMatrix(DistanceMeasurer measurer, List<DoubleVector> pointList) { final int n = pointList.size(); DenseDoubleMatrix matrix = new DenseDoubleMatrix(n, n); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { final double distance = measurer....
DoubleMatrix function(DistanceMeasurer measurer, List<DoubleVector> pointList) { final int n = pointList.size(); DenseDoubleMatrix matrix = new DenseDoubleMatrix(n, n); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { final double distance = measurer.measureDistance(pointList.get(i), pointList.get(j)); matri...
/** * A distance matrix (NxN) based on n given points and a distance measurer. */
A distance matrix (NxN) based on n given points and a distance measurer
generateDistanceMatrix
{ "repo_name": "sourcewarehouse/thomasjungblut", "path": "src/de/jungblut/clustering/DBSCAN.java", "license": "apache-2.0", "size": 6236 }
[ "de.jungblut.distance.DistanceMeasurer", "de.jungblut.math.DoubleMatrix", "de.jungblut.math.DoubleVector", "de.jungblut.math.dense.DenseDoubleMatrix", "java.util.List" ]
import de.jungblut.distance.DistanceMeasurer; import de.jungblut.math.DoubleMatrix; import de.jungblut.math.DoubleVector; import de.jungblut.math.dense.DenseDoubleMatrix; import java.util.List;
import de.jungblut.distance.*; import de.jungblut.math.*; import de.jungblut.math.dense.*; import java.util.*;
[ "de.jungblut.distance", "de.jungblut.math", "java.util" ]
de.jungblut.distance; de.jungblut.math; java.util;
1,269,752
public void showInNavigation(CmsUUID entryId) { CmsClientSitemapEntry entry = getEntryById(entryId); CmsSitemapChange change = getChangeForEdit( entry, Collections.singletonList(new CmsPropertyModification(entryId.toString() + "/" + CmsClientP...
void function(CmsUUID entryId) { CmsClientSitemapEntry entry = getEntryById(entryId); CmsSitemapChange change = getChangeForEdit( entry, Collections.singletonList(new CmsPropertyModification(entryId.toString() + "/" + CmsClientProperty.PROPERTY_NAVINFO + "/" + CmsClientProperty.PATH_STRUCTURE_VALUE, ""))); commitChange...
/** * Shows a formerly hidden entry in the navigation.<p> * * @see #hideInNavigation(CmsUUID) * * @param entryId the entry id */
Shows a formerly hidden entry in the navigation
showInNavigation
{ "repo_name": "sbonoc/opencms-core", "path": "src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java", "license": "lgpl-2.1", "size": 64474 }
[ "java.util.Collections", "org.opencms.ade.sitemap.shared.CmsClientSitemapEntry", "org.opencms.ade.sitemap.shared.CmsSitemapChange", "org.opencms.gwt.shared.property.CmsClientProperty", "org.opencms.gwt.shared.property.CmsPropertyModification", "org.opencms.util.CmsUUID" ]
import java.util.Collections; import org.opencms.ade.sitemap.shared.CmsClientSitemapEntry; import org.opencms.ade.sitemap.shared.CmsSitemapChange; import org.opencms.gwt.shared.property.CmsClientProperty; import org.opencms.gwt.shared.property.CmsPropertyModification; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.ade.sitemap.shared.*; import org.opencms.gwt.shared.property.*; import org.opencms.util.*;
[ "java.util", "org.opencms.ade", "org.opencms.gwt", "org.opencms.util" ]
java.util; org.opencms.ade; org.opencms.gwt; org.opencms.util;
1,643,062
public static GemFireXDQueryObserver setInstance( final GemFireXDQueryObserver observer) { if (observer == null) { throw new NullPointerException("setInstance: null observer"); } synchronized (_instanceLock) { final GemFireXDQueryObserverHolder holder; if (_instanceSet) { h...
static GemFireXDQueryObserver function( final GemFireXDQueryObserver observer) { if (observer == null) { throw new NullPointerException(STR); } synchronized (_instanceLock) { final GemFireXDQueryObserverHolder holder; if (_instanceSet) { holder = _instance; } else { holder = new GemFireXDQueryObserverHolder(); } GemFir...
/** * TEST METHOD: Replace the existing {@link GemFireXDQueryObserver}, if any, * with the given instance and return the old instance. Should not be used by * product code. */
with the given instance and return the old instance. Should not be used by product code
setInstance
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/engine/GemFireXDQueryObserverHolder.java", "license": "apache-2.0", "size": 59967 }
[ "com.pivotal.gemfirexd.execute.QueryObserver" ]
import com.pivotal.gemfirexd.execute.QueryObserver;
import com.pivotal.gemfirexd.execute.*;
[ "com.pivotal.gemfirexd" ]
com.pivotal.gemfirexd;
2,118,242
public List<String> getActivationIds() { return activationIds; }
List<String> function() { return activationIds; }
/** * Get PowerAuth activation IDs associated with given device registration. * @return Activation ID. */
Get PowerAuth activation IDs associated with given device registration
getActivationIds
{ "repo_name": "lime-company/lime-security-powerauth-push", "path": "powerauth-push-model/src/main/java/io/getlime/push/model/request/CreateDeviceForActivationsRequest.java", "license": "apache-2.0", "size": 2252 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,786,041
public static Number next(Number self) { return NumberNumberPlus.plus(self, ONE); }
static Number function(Number self) { return NumberNumberPlus.plus(self, ONE); }
/** * Increment a Number by one. * * @param self a Number * @return an incremented Number * @since 1.0 */
Increment a Number by one
next
{ "repo_name": "xien777/yajsw", "path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java", "license": "lgpl-2.1", "size": 704150 }
[ "org.codehaus.groovy.runtime.dgmimpl.NumberNumberPlus" ]
import org.codehaus.groovy.runtime.dgmimpl.NumberNumberPlus;
import org.codehaus.groovy.runtime.dgmimpl.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
2,415,989
public static PackageInfo getAppPackageInfo(Context context) { if (context != null) { PackageManager pm = context.getPackageManager(); if (pm != null) { PackageInfo pi; try { return pm.getPackageInfo(context.getPackageName(), 0); ...
static PackageInfo function(Context context) { if (context != null) { PackageManager pm = context.getPackageManager(); if (pm != null) { PackageInfo pi; try { return pm.getPackageInfo(context.getPackageName(), 0); } catch (Exception e) { e.printStackTrace(); } } } return null; }
/** * get app package info */
get app package info
getAppPackageInfo
{ "repo_name": "androidDaniel/treasure", "path": "common/src/main/java/com/litesuits/common/utils/PackageUtil.java", "license": "gpl-2.0", "size": 9502 }
[ "android.content.Context", "android.content.pm.PackageInfo", "android.content.pm.PackageManager" ]
import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager;
import android.content.*; import android.content.pm.*;
[ "android.content" ]
android.content;
1,435,151
protected BasicComponentInstance instantiateComponentInstance(final Interceptor preDestroyInterceptor, final Map<Method, Interceptor> methodInterceptors, Map<Object, Object> context) { // create and return the component instance return new BasicComponentInstance(this, preDestroyInterceptor, methodIn...
BasicComponentInstance function(final Interceptor preDestroyInterceptor, final Map<Method, Interceptor> methodInterceptors, Map<Object, Object> context) { return new BasicComponentInstance(this, preDestroyInterceptor, methodInterceptors); }
/** * Responsible for instantiating the {@link BasicComponentInstance}. This method is *not* responsible for * handling the post construct activities like injection and lifecycle invocation. That is handled by * {@link #constructComponentInstance(org.jboss.as.naming.ManagedReference, boolean)}. * <p...
Responsible for instantiating the <code>BasicComponentInstance</code>. This method is *not* responsible for handling the post construct activities like injection and lifecycle invocation. That is handled by <code>#constructComponentInstance(org.jboss.as.naming.ManagedReference, boolean)</code>.
instantiateComponentInstance
{ "repo_name": "jstourac/wildfly", "path": "ee/src/main/java/org/jboss/as/ee/component/BasicComponent.java", "license": "lgpl-2.1", "size": 11789 }
[ "java.lang.reflect.Method", "java.util.Map", "org.jboss.invocation.Interceptor" ]
import java.lang.reflect.Method; import java.util.Map; import org.jboss.invocation.Interceptor;
import java.lang.reflect.*; import java.util.*; import org.jboss.invocation.*;
[ "java.lang", "java.util", "org.jboss.invocation" ]
java.lang; java.util; org.jboss.invocation;
584,667
private synchronized void rebuildJournal() throws IOException { if (journalWriter != null) { journalWriter.close(); } Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE); writer.write(MAGIC); writer.write("\n"); writer.write...
synchronized void function() throws IOException { if (journalWriter != null) { journalWriter.close(); } Writer writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE); writer.write(MAGIC); writer.write("\n"); writer.write(VERSION_1); writer.write("\n"); writer.write(Integer.toString(appVersion)); wr...
/** * Creates a new journal that omits redundant information. This replaces the * current journal if it exists. */
Creates a new journal that omits redundant information. This replaces the current journal if it exists
rebuildJournal
{ "repo_name": "zyhworker/WelikeAndroid", "path": "WelikeAndroid/src/com/lody/welike/utils/DiskLruCache.java", "license": "apache-2.0", "size": 29986 }
[ "java.io.BufferedWriter", "java.io.FileWriter", "java.io.IOException", "java.io.Writer" ]
import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
2,239,956
@DELETE @Path("/deleteprincipal") @Produces(MediaType.TEXT_PLAIN) public Response deletePrincipal(@QueryParam(PrincipalParam.NAME) @DefaultValue(PrincipalParam.DEFAULT) final PrincipalParam principal) { if (!isAdminPrincipal()) { return Response.st...
@Path(STR) @Produces(MediaType.TEXT_PLAIN) Response function(@QueryParam(PrincipalParam.NAME) @DefaultValue(PrincipalParam.DEFAULT) final PrincipalParam principal) { if (!isAdminPrincipal()) { return Response.status(Response.Status.FORBIDDEN).entity(STR).build(); } if (httpRequest.isSecure()) { WebServer.LOG.info(STR +...
/** * Delete principal by name. * * @param principal principal like "admin" or "admin@HADOOP.COM". * @return Response */
Delete principal by name
deletePrincipal
{ "repo_name": "plusplusjiajia/directory-kerby", "path": "has-project/has-server/src/main/java/org/apache/kerby/has/server/web/rest/KadminApi.java", "license": "apache-2.0", "size": 22984 }
[ "javax.ws.rs.DefaultValue", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.apache.kerby.has.server.HasServer", "org.apache.kerby.has.server.web.WebServer", "org.apache.kerby.has.server.web.rest.param.PrincipalPara...
import javax.ws.rs.DefaultValue; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.kerby.has.server.HasServer; import org.apache.kerby.has.server.web.WebServer; import org.apache.kerby.has.server.we...
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.kerby.has.server.*; import org.apache.kerby.has.server.web.*; import org.apache.kerby.has.server.web.rest.param.*; import org.apache.kerby.kerberos.kerb.*; import org.apache.kerby.kerberos.kerb.admin.kadmin.local.*; import org.apache.kerby.kerberos.kerb...
[ "javax.ws", "org.apache.kerby" ]
javax.ws; org.apache.kerby;
2,346,547
public static IBinding resolveExpressionBinding(Expression expression, boolean goIntoCast) { //TODO: search for callers of resolve*Binding() methods and replace with call to this method // similar to StubUtility#getVariableNameSuggestions(int, IJavaProject, ITypeBinding, Expression, Collection) switch (expr...
static IBinding function(Expression expression, boolean goIntoCast) { switch (expression.getNodeType()) { case ASTNode.SIMPLE_NAME: case ASTNode.QUALIFIED_NAME: return ((Name) expression).resolveBinding(); case ASTNode.FIELD_ACCESS: return ((FieldAccess) expression).resolveFieldBinding(); case ASTNode.SUPER_FIELD_ACCES...
/** * Resolve the binding (<em>not</em> the type binding) for the expression or a nested expression * (e.g. nested in parentheses, cast, ...). * * @param expression an expression node * @param goIntoCast iff <code>true</code>, go into a CastExpression's expression to resolve * @return the expression bindin...
Resolve the binding (not the type binding) for the expression or a nested expression (e.g. nested in parentheses, cast, ...)
resolveExpressionBinding
{ "repo_name": "trylimits/Eclipse-Postfix-Code-Completion", "path": "luna/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java", "license": "epl-1.0", "size": 56530 }
[ "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.Annotation", "org.eclipse.jdt.core.dom.ArrayAccess", "org.eclipse.jdt.core.dom.CastExpression", "org.eclipse.jdt.core.dom.ClassInstanceCreation", "org.eclipse.jdt.core.dom.Expression", "org.eclipse.jdt.core.dom.FieldAccess", "org.eclipse.jd...
import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.Annotation; import org.eclipse.jdt.core.dom.ArrayAccess; import org.eclipse.jdt.core.dom.CastExpression; import org.eclipse.jdt.core.dom.ClassInstanceCreation; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.FieldAccess...
import org.eclipse.jdt.core.dom.*;
[ "org.eclipse.jdt" ]
org.eclipse.jdt;
2,248,506
private String getPropertyKey() { String url = Jenkins.getActiveInstance().getRootUrl(); if (url!=null) return url; return Secret.fromString("key").toString(); }
String function() { String url = Jenkins.getActiveInstance().getRootUrl(); if (url!=null) return url; return Secret.fromString("key").toString(); }
/** * Computes the key that identifies this Hudson among other Hudsons that the user has a credential for. */
Computes the key that identifies this Hudson among other Hudsons that the user has a credential for
getPropertyKey
{ "repo_name": "samatdav/jenkins", "path": "core/src/main/java/hudson/cli/ClientAuthenticationCache.java", "license": "mit", "size": 4171 }
[ "hudson.util.Secret" ]
import hudson.util.Secret;
import hudson.util.*;
[ "hudson.util" ]
hudson.util;
2,611,751
@Override public final String resolveId(Element element, AbstractBeanDefinition definition, ParserContext parserContext) throws BeanDefinitionStoreException { if (!parserContext.isNested()) { return ((element != null) && StringUtils.isNotEmpty(element.getAttribute("id"))) ? element.getAttribu...
final String function(Element element, AbstractBeanDefinition definition, ParserContext parserContext) throws BeanDefinitionStoreException { if (!parserContext.isNested()) { return ((element != null) && StringUtils.isNotEmpty(element.getAttribute("id"))) ? element.getAttribute("id") : getDefaultId(); } return null; }
/** * Attempts to obtain id from the value of <code>id</code> attribute, * failing which will default to the one provided by @see getDefaultId(). * * @param element JAVADOC. * @param definition JAVADOC. * @param parserContext JAVADOC. * @return JAVADOC. * @throws BeanDefinitionStoreException JA...
Attempts to obtain id from the value of <code>id</code> attribute, failing which will default to the one provided by @see getDefaultId()
resolveId
{ "repo_name": "cucina/opencucina", "path": "core/src/main/java/org/cucina/core/config/AbstractDefaultIdBeanDefinitionParser.java", "license": "apache-2.0", "size": 1401 }
[ "org.apache.commons.lang3.StringUtils", "org.springframework.beans.factory.BeanDefinitionStoreException", "org.springframework.beans.factory.support.AbstractBeanDefinition", "org.springframework.beans.factory.xml.ParserContext", "org.w3c.dom.Element" ]
import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.xml.ParserContext; import org.w3c.dom.Element;
import org.apache.commons.lang3.*; import org.springframework.beans.factory.*; import org.springframework.beans.factory.support.*; import org.springframework.beans.factory.xml.*; import org.w3c.dom.*;
[ "org.apache.commons", "org.springframework.beans", "org.w3c.dom" ]
org.apache.commons; org.springframework.beans; org.w3c.dom;
1,623,301
public static LoggerSettings logToCollection(String logName, Collection<LoggingEvent> collection) { Logger logger = LogManager.getLogger(logName); LoggerSettings loggerSettings = new LoggerSettings(logger); logger.removeAllAppenders(); logger.setAdditivity(false); CollectionAppender listAppe...
static LoggerSettings function(String logName, Collection<LoggingEvent> collection) { Logger logger = LogManager.getLogger(logName); LoggerSettings loggerSettings = new LoggerSettings(logger); logger.removeAllAppenders(); logger.setAdditivity(false); CollectionAppender listAppender = new CollectionAppender(collection);...
/** * Change logger's setting so it only logs to a collection. * * @param logName Name of the logger to modify. * @param collection The collection to log into. * @return The logger's original settings. */
Change logger's setting so it only logs to a collection
logToCollection
{ "repo_name": "netroby/gerrit", "path": "gerrit-server/src/test/java/com/google/gerrit/testutil/log/LogUtil.java", "license": "apache-2.0", "size": 2860 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Enumeration", "java.util.List", "org.apache.log4j.Appender", "org.apache.log4j.LogManager", "org.apache.log4j.Logger", "org.apache.log4j.spi.LoggingEvent" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Enumeration; import java.util.List; import org.apache.log4j.Appender; import org.apache.log4j.LogManager; import org.apache.log4j.Logger; import org.apache.log4j.spi.LoggingEvent;
import java.util.*; import org.apache.log4j.*; import org.apache.log4j.spi.*;
[ "java.util", "org.apache.log4j" ]
java.util; org.apache.log4j;
326,030
private static String getFileName(String carbonDataFileName) { int endIndex = carbonDataFileName.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR); if (endIndex > -1) { return carbonDataFileName.substring(endIndex + 1, carbonDataFileName.length()); } else { return carbonDataFileNam...
static String function(String carbonDataFileName) { int endIndex = carbonDataFileName.lastIndexOf(CarbonCommonConstants.FILE_SEPARATOR); if (endIndex > -1) { return carbonDataFileName.substring(endIndex + 1, carbonDataFileName.length()); } else { return carbonDataFileName; } }
/** * Gets the file name from file path */
Gets the file name from file path
getFileName
{ "repo_name": "JihongMA/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java", "license": "apache-2.0", "size": 22208 }
[ "org.apache.carbondata.core.constants.CarbonCommonConstants" ]
import org.apache.carbondata.core.constants.CarbonCommonConstants;
import org.apache.carbondata.core.constants.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
2,804,620
public void addPointerDraggedListener(ActionListener l) { if (pointerDraggedListeners == null) { pointerDraggedListeners = new EventDispatcher(); } pointerDraggedListeners.addListener(l); }
void function(ActionListener l) { if (pointerDraggedListeners == null) { pointerDraggedListeners = new EventDispatcher(); } pointerDraggedListeners.addListener(l); }
/** * Adds a listener to the pointer event * * @param l callback to receive pointer events */
Adds a listener to the pointer event
addPointerDraggedListener
{ "repo_name": "skyHALud/codenameone", "path": "CodenameOne/src/com/codename1/ui/Form.java", "license": "gpl-2.0", "size": 99398 }
[ "com.codename1.ui.events.ActionListener", "com.codename1.ui.util.EventDispatcher" ]
import com.codename1.ui.events.ActionListener; import com.codename1.ui.util.EventDispatcher;
import com.codename1.ui.events.*; import com.codename1.ui.util.*;
[ "com.codename1.ui" ]
com.codename1.ui;
651,513
protected void logDebug(String message, SieveContext context) { org.apache.commons.logging.Log log = context.getLog(); if (log.isDebugEnabled()) log.debug(message); }
void function(String message, SieveContext context) { org.apache.commons.logging.Log log = context.getLog(); if (log.isDebugEnabled()) log.debug(message); }
/** * Method logDebug. * * @param message not null * @param context not null */
Method logDebug
logDebug
{ "repo_name": "aduprat/james-jsieve", "path": "core/src/main/java/org/apache/jsieve/commands/extensions/Log.java", "license": "apache-2.0", "size": 8009 }
[ "org.apache.jsieve.SieveContext" ]
import org.apache.jsieve.SieveContext;
import org.apache.jsieve.*;
[ "org.apache.jsieve" ]
org.apache.jsieve;
2,768,299
private boolean deleteState(Workbook wb, int tid) { int rowNum = -1; for (Row row : wb.getSheetAt(STATE_SHEET)) { if (row.getRowNum() == 0 || isRowEmpty(row)) continue; if (row.getCell(STATE_ID).getNumericCellValue() == tid) { rowNum = row.getRowNum(); break; } } if (rowNum > 0...
boolean function(Workbook wb, int tid) { int rowNum = -1; for (Row row : wb.getSheetAt(STATE_SHEET)) { if (row.getRowNum() == 0 isRowEmpty(row)) continue; if (row.getCell(STATE_ID).getNumericCellValue() == tid) { rowNum = row.getRowNum(); break; } } if (rowNum > 0) { List<Integer> modelsToDelete = new ArrayList<Integer...
/** * Deletes a state from a workbook. Also deletes any associated demand * models. * * @param wb the workbook * @param tid the type ID of the state to delete * * @return true, if successful */
Deletes a state from a workbook. Also deletes any associated demand models
deleteState
{ "repo_name": "ptgrogan/spacenet", "path": "src/main/java/edu/mit/spacenet/data/Spreadsheet_2_5.java", "license": "apache-2.0", "size": 99299 }
[ "java.util.ArrayList", "java.util.List", "org.apache.poi.ss.usermodel.Row", "org.apache.poi.ss.usermodel.Workbook" ]
import java.util.ArrayList; import java.util.List; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Workbook;
import java.util.*; import org.apache.poi.ss.usermodel.*;
[ "java.util", "org.apache.poi" ]
java.util; org.apache.poi;
461,919
public Line add() { doAdd (Drawing.defaultDrawing()); return this; }
Line function() { doAdd (Drawing.defaultDrawing()); return this; }
/** * Add this line to the end of the default drawing's sequence of drawing * items. * * @return This line. * * @exception NullPointerException * (unchecked exception) Thrown if there is no default drawing. * * @see Drawing#defaultDrawing() */
Add this line to the end of the default drawing's sequence of drawing items
add
{ "repo_name": "JimiHFord/pj2", "path": "lib/edu/rit/draw/item/Line.java", "license": "lgpl-3.0", "size": 23341 }
[ "edu.rit.draw.Drawing" ]
import edu.rit.draw.Drawing;
import edu.rit.draw.*;
[ "edu.rit.draw" ]
edu.rit.draw;
2,612,685
private boolean executeHttpOperation(final int retryCount) throws AzureBlobFileSystemException { AbfsHttpOperation httpOperation = null; try { // initialize the HTTP request and open the connection httpOperation = new AbfsHttpOperation(url, method, requestHeaders); // sign the HTTP request ...
boolean function(final int retryCount) throws AzureBlobFileSystemException { AbfsHttpOperation httpOperation = null; try { httpOperation = new AbfsHttpOperation(url, method, requestHeaders); if (client.getAccessToken() == null) { client.getSharedKeyCredentials().signRequest( httpOperation.getConnection(), hasRequestBod...
/** * Executes a single HTTP operation to complete the REST operation. If it * fails, there may be a retry. The retryCount is incremented with each * attempt. */
Executes a single HTTP operation to complete the REST operation. If it fails, there may be a retry. The retryCount is incremented with each attempt
executeHttpOperation
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsRestOperation.java", "license": "apache-2.0", "size": 7526 }
[ "java.io.IOException", "org.apache.hadoop.fs.azurebfs.constants.HttpHeaderConfigurations", "org.apache.hadoop.fs.azurebfs.contracts.exceptions.AbfsRestOperationException", "org.apache.hadoop.fs.azurebfs.contracts.exceptions.AzureBlobFileSystemException", "org.apache.hadoop.fs.azurebfs.contracts.exceptions.I...
import java.io.IOException; import org.apache.hadoop.fs.azurebfs.constants.HttpHeaderConfigurations; import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AbfsRestOperationException; import org.apache.hadoop.fs.azurebfs.contracts.exceptions.AzureBlobFileSystemException; import org.apache.hadoop.fs.azurebfs.contract...
import java.io.*; import org.apache.hadoop.fs.azurebfs.constants.*; import org.apache.hadoop.fs.azurebfs.contracts.exceptions.*; import org.apache.hadoop.fs.azurebfs.oauth2.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,513,124
@Override public final void unharvestProviderSpecific(final TaskInfo taskInfo, final JsonNode subtask, final HashMap<String, String> results) { AccessPointUtils.deleteAccessPointsForVersionAndType( taskInfo.getVersion(), AccessPoint.FILE_TYPE); }
final void function(final TaskInfo taskInfo, final JsonNode subtask, final HashMap<String, String> results) { AccessPointUtils.deleteAccessPointsForVersionAndType( taskInfo.getVersion(), AccessPoint.FILE_TYPE); }
/** Remove any file access points for the version. * @param taskInfo The TaskInfo object describing the entire task. * @param subtask The details of the subtask * @param results HashMap representing the result of the unharvest. */
Remove any file access points for the version
unharvestProviderSpecific
{ "repo_name": "au-research/ANDS-Vocabs-Toolkit", "path": "src/main/java/au/org/ands/vocabs/toolkit/provider/harvest/FileHarvestProvider.java", "license": "apache-2.0", "size": 7530 }
[ "au.org.ands.vocabs.toolkit.db.AccessPointUtils", "au.org.ands.vocabs.toolkit.db.model.AccessPoint", "au.org.ands.vocabs.toolkit.tasks.TaskInfo", "com.fasterxml.jackson.databind.JsonNode", "java.util.HashMap" ]
import au.org.ands.vocabs.toolkit.db.AccessPointUtils; import au.org.ands.vocabs.toolkit.db.model.AccessPoint; import au.org.ands.vocabs.toolkit.tasks.TaskInfo; import com.fasterxml.jackson.databind.JsonNode; import java.util.HashMap;
import au.org.ands.vocabs.toolkit.db.*; import au.org.ands.vocabs.toolkit.db.model.*; import au.org.ands.vocabs.toolkit.tasks.*; import com.fasterxml.jackson.databind.*; import java.util.*;
[ "au.org.ands", "com.fasterxml.jackson", "java.util" ]
au.org.ands; com.fasterxml.jackson; java.util;
1,747,426
public Date getTime() { return time; }
Date function() { return time; }
/** * Getter Time * * @return Date time */
Getter Time
getTime
{ "repo_name": "raulsuarezdabo/flight", "path": "src/main/java/com/raulsuarezdabo/flight/jsf/flight/AddFlightBean.java", "license": "mit", "size": 10978 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,329,456
public String patch_addPadding(LinkedList<Patch> patches) { short paddingLength = this.Patch_Margin; String nullPadding = ""; for (short x = 1; x <= paddingLength; x++) { nullPadding += String.valueOf((char) x); } // Bump all the patches forward. for (Patch aPatch : patches) { aPa...
String function(LinkedList<Patch> patches) { short paddingLength = this.Patch_Margin; String nullPadding = ""; for (short x = 1; x <= paddingLength; x++) { nullPadding += String.valueOf((char) x); } for (Patch aPatch : patches) { aPatch.start1 += paddingLength; aPatch.start2 += paddingLength; } Patch patch = patches.ge...
/** * Add some padding on text start and end so that edges can match something. * Intended to be called only from within patch_apply. * * @param patches Array of Patch objects. * @return The padding string added to each side. */
Add some padding on text start and end so that edges can match something. Intended to be called only from within patch_apply
patch_addPadding
{ "repo_name": "Cognifide/AET", "path": "core/jobs/src/main/java/com/cognifide/aet/job/common/comparators/source/diff/DiffMatchPatch.java", "license": "apache-2.0", "size": 91233 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
1,144,202
public void setStatusOfDescriptors(final String groupName, final boolean newStatus) { for (SequenceDescriptor descriptor : descriptors.values()) { if (groupName.equals(descriptor.getGroupName())) { descriptor.setActive(newStatus); if (!newStatus) { ...
void function(final String groupName, final boolean newStatus) { for (SequenceDescriptor descriptor : descriptors.values()) { if (groupName.equals(descriptor.getGroupName())) { descriptor.setActive(newStatus); if (!newStatus) { descriptor.dropAllSequences(); } } } }
/** * This method sets the Enabled/Disabled status of all the SequenceDescriptors which has come from that xml configuration which is identified by the given groupName. * @param groupName is the groupname attribute of a xml stub configuration * @param newStatus is the new status (Enabled/Disabled) *...
This method sets the Enabled/Disabled status of all the SequenceDescriptors which has come from that xml configuration which is identified by the given groupName
setStatusOfDescriptors
{ "repo_name": "nagyistoce/Wilma", "path": "wilma-application/modules/wilma-message-sequence/src/main/java/com/epam/wilma/sequence/SequenceManager.java", "license": "gpl-3.0", "size": 7916 }
[ "com.epam.wilma.domain.stubconfig.sequence.SequenceDescriptor" ]
import com.epam.wilma.domain.stubconfig.sequence.SequenceDescriptor;
import com.epam.wilma.domain.stubconfig.sequence.*;
[ "com.epam.wilma" ]
com.epam.wilma;
104,816
public void endElement(QName element, Augmentations augs) throws XNIException { if (fNamespaces) { handleEndElement(element, augs, false); } else if (fDocumentHandler != null) { fDocumentHandler.endElement(element, augs); } } // endElement(QName)
void function(QName element, Augmentations augs) throws XNIException { if (fNamespaces) { handleEndElement(element, augs, false); } else if (fDocumentHandler != null) { fDocumentHandler.endElement(element, augs); } }
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @throws XNIException Thrown by handler to signal an error. */
The end of an element
endElement
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xerces/internal/impl/XMLNamespaceBinder.java", "license": "apache-2.0", "size": 35528 }
[ "com.sun.org.apache.xerces.internal.xni.Augmentations", "com.sun.org.apache.xerces.internal.xni.QName", "com.sun.org.apache.xerces.internal.xni.XNIException" ]
import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.QName; import com.sun.org.apache.xerces.internal.xni.XNIException;
import com.sun.org.apache.xerces.internal.xni.*;
[ "com.sun.org" ]
com.sun.org;
14,452
public String getCommandUsage(ICommandSender sender) { return "commands.unban.usage"; }
String function(ICommandSender sender) { return STR; }
/** * Gets the usage string for the command. */
Gets the usage string for the command
getCommandUsage
{ "repo_name": "danielyc/test-1.9.4", "path": "build/tmp/recompileMc/sources/net/minecraft/command/server/CommandPardonPlayer.java", "license": "gpl-3.0", "size": 2427 }
[ "net.minecraft.command.ICommandSender" ]
import net.minecraft.command.ICommandSender;
import net.minecraft.command.*;
[ "net.minecraft.command" ]
net.minecraft.command;
344,505
public void setStatusBarBackgroundColor(int color) { mStatusBarBackground = new ColorDrawable(color); invalidate(); } //@Override //public void onDraw(Canvas c) { // super.onDraw(c); // if (mDrawStatusBarBackground && mStatusBarBackground != null) { // final int inset = IMPL.getTopInset(mLas...
void function(int color) { mStatusBarBackground = new ColorDrawable(color); invalidate(); }
/** * Set a drawable to draw in the insets area for the status bar. * Note that this will only be activated if this DrawerLayout fitsSystemWindows. * * @param color Color to use as a background drawable to draw behind the status bar * in 0xAARRGGBB format. */
Set a drawable to draw in the insets area for the status bar. Note that this will only be activated if this DrawerLayout fitsSystemWindows
setStatusBarBackgroundColor
{ "repo_name": "JakeWharton/u2020", "path": "app/src/internalDebug/java/com/jakewharton/u2020/ui/debug/DebugDrawerLayout.java", "license": "apache-2.0", "size": 65682 }
[ "android.graphics.drawable.ColorDrawable" ]
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,652,728
public AggregateDefinition aggregate(Expression correlationExpression, AggregationStrategy aggregationStrategy) { AggregateDefinition answer = new AggregateDefinition(correlationExpression, aggregationStrategy); addOutput(answer); return answer; }
AggregateDefinition function(Expression correlationExpression, AggregationStrategy aggregationStrategy) { AggregateDefinition answer = new AggregateDefinition(correlationExpression, aggregationStrategy); addOutput(answer); return answer; }
/** * <a href="http://camel.apache.org/aggregator.html">Aggregator EIP:</a> * Creates an aggregator allowing you to combine a number of messages together into a single message. * * @param correlationExpression the expression used to calculate the * correlation key. ...
Creates an aggregator allowing you to combine a number of messages together into a single message
aggregate
{ "repo_name": "logzio/camel", "path": "camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java", "license": "apache-2.0", "size": 139893 }
[ "org.apache.camel.Expression", "org.apache.camel.processor.aggregate.AggregationStrategy" ]
import org.apache.camel.Expression; import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.apache.camel.*; import org.apache.camel.processor.aggregate.*;
[ "org.apache.camel" ]
org.apache.camel;
841,258
@Nonnull public SubscribedSkuRequest select(@Nonnull final String value) { addSelectOption(value); return this; }
SubscribedSkuRequest function(@Nonnull final String value) { addSelectOption(value); return this; }
/** * Sets the select clause for the request * * @param value the select clause * @return the updated request */
Sets the select clause for the request
select
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/SubscribedSkuRequest.java", "license": "mit", "size": 5827 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,218,349
public ServiceFuture<AddDataFlowToDebugSessionResponseInner> addDataFlowAsync(String resourceGroupName, String factoryName, DataFlowDebugPackage request, final ServiceCallback<AddDataFlowToDebugSessionResponseInner> serviceCallback) { return ServiceFuture.fromResponse(addDataFlowWithServiceResponseAsync(res...
ServiceFuture<AddDataFlowToDebugSessionResponseInner> function(String resourceGroupName, String factoryName, DataFlowDebugPackage request, final ServiceCallback<AddDataFlowToDebugSessionResponseInner> serviceCallback) { return ServiceFuture.fromResponse(addDataFlowWithServiceResponseAsync(resourceGroupName, factoryName...
/** * Add a data flow into debug session. * * @param resourceGroupName The resource group name. * @param factoryName The factory name. * @param request Data flow debug session definition with debug content. * @param serviceCallback the async ServiceCallback to handle successful and failed ...
Add a data flow into debug session
addDataFlowAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/datafactory/mgmt-v2018_06_01/src/main/java/com/microsoft/azure/management/datafactory/v2018_06_01/implementation/DataFlowDebugSessionsInner.java", "license": "mit", "size": 57605 }
[ "com.microsoft.azure.management.datafactory.v2018_06_01.DataFlowDebugPackage", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.datafactory.v2018_06_01.DataFlowDebugPackage; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.datafactory.v2018_06_01.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,138,266
private static WebInspector connect(InspectorSocket socket) throws IOException { return new WebInspector(socket); } private final InspectorSocket socket; @VisibleForTesting public WebInspector(InspectorSocket socket) { this.socket = checkNotNull(socket); }
static WebInspector function(InspectorSocket socket) throws IOException { return new WebInspector(socket); } private final InspectorSocket socket; public WebInspector(InspectorSocket socket) { this.socket = checkNotNull(socket); }
/** * Connect to the application with the specified application bundle identifier, using the * specified socket factory and notifying the specified listener of devtools messages. */
Connect to the application with the specified application bundle identifier, using the specified socket factory and notifying the specified listener of devtools messages
connect
{ "repo_name": "google/ios-device-control", "path": "java/com/google/iosdevicecontrol/webinspector/WebInspector.java", "license": "apache-2.0", "size": 2296 }
[ "com.google.common.base.Preconditions", "java.io.IOException" ]
import com.google.common.base.Preconditions; import java.io.IOException;
import com.google.common.base.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
713,992
public void sendSocket(String message, InetAddress targetAdress, int targetPort) { DatagramSocket socket; DatagramPacket request = null; try { socket = new DatagramSocket(); byte[] sendData = message.getBytes(); request = new DatagramPacket(sendData, sendData.length, targetAdress, targetPort); ...
void function(String message, InetAddress targetAdress, int targetPort) { DatagramSocket socket; DatagramPacket request = null; try { socket = new DatagramSocket(); byte[] sendData = message.getBytes(); request = new DatagramPacket(sendData, sendData.length, targetAdress, targetPort); socket.send(request); } catch (Soc...
/** * Send message via UDP * * @param message * the Message * @param targetAdress * IP adress of the target * @param targetPort * Port of the target */
Send message via UDP
sendSocket
{ "repo_name": "visio/STT", "path": "GSTT_V2/src/udp/UDPConnection.java", "license": "mit", "size": 3069 }
[ "java.io.IOException", "java.net.DatagramPacket", "java.net.DatagramSocket", "java.net.InetAddress", "java.net.SocketException" ]
import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
837,891
protected void callParent() throws JspException { // Get enclosing parent AddTagParent enclosingParent = findEnclosingPutListTagParent(); enclosingParent.processNestedTag( this ); }
void function() throws JspException { AddTagParent enclosingParent = findEnclosingPutListTagParent(); enclosingParent.processNestedTag( this ); }
/** * Call parent tag which must implement AttributeContainer. * @throws JspException If we can't find an appropriate enclosing tag. */
Call parent tag which must implement AttributeContainer
callParent
{ "repo_name": "shuliangtao/struts-1.3.10", "path": "src/tiles/src/main/java/org/apache/struts/tiles/taglib/AddTag.java", "license": "apache-2.0", "size": 2204 }
[ "javax.servlet.jsp.JspException" ]
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
1,555,990
public int caseX(int i) { Point2D l = locations[i]; double x = (l.getX() - cases_min_x) / Math.max(cases_max_x - cases_min_x, cases_max_y - cases_min_y); double divisor = Math.min(ts_dx, ts_dy) - case_size * 3; return (int) (ts_x + ((ts_dx - case_size * 3) - divisor) / 2 + case_size + x * divisor); }
int function(int i) { Point2D l = locations[i]; double x = (l.getX() - cases_min_x) / Math.max(cases_max_x - cases_min_x, cases_max_y - cases_min_y); double divisor = Math.min(ts_dx, ts_dy) - case_size * 3; return (int) (ts_x + ((ts_dx - case_size * 3) - divisor) / 2 + case_size + x * divisor); }
/** * Case x. * * @param i * the i * @return the int */
Case x
caseX
{ "repo_name": "santiontanon/fterm", "path": "src/ftl/base/visualization/CBVisualizer.java", "license": "bsd-3-clause", "size": 38895 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
2,774,683
public Select orderBy(Ordering... orderings) { if (this.orderings != null) throw new IllegalStateException("An ORDER BY clause has already been provided"); this.orderings = Arrays.asList(orderings); for (int i = 0; i < orderings.length; i++) checkForBindMarkers(order...
Select function(Ordering... orderings) { if (this.orderings != null) throw new IllegalStateException(STR); this.orderings = Arrays.asList(orderings); for (int i = 0; i < orderings.length; i++) checkForBindMarkers(orderings[i]); return this; }
/** * Adds an ORDER BY clause to this statement. * * @param orderings the orderings to define for this query. * @return this statement. * * @throws IllegalStateException if an ORDER BY clause has already been * provided. */
Adds an ORDER BY clause to this statement
orderBy
{ "repo_name": "adejanovski/java-driver", "path": "driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java", "license": "apache-2.0", "size": 18434 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,786,977
public void register( ) { ResourceType rt = new ResourceType( ); rt.setResourceIdServiceClass( PortletResourceIdService.class.getName( ) ); rt.setResourceTypeKey( PortletType.RESOURCE_TYPE ); rt.setResourceTypeLabelKey( PROPERTY_LABEL_RESOURCE_TYPE ); Permission p = new ...
void function( ) { ResourceType rt = new ResourceType( ); rt.setResourceIdServiceClass( PortletResourceIdService.class.getName( ) ); rt.setResourceTypeKey( PortletType.RESOURCE_TYPE ); rt.setResourceTypeLabelKey( PROPERTY_LABEL_RESOURCE_TYPE ); Permission p = new Permission( ); p.setPermissionKey( PERMISSION_CREATE ); ...
/** * Initializes the service */
Initializes the service
register
{ "repo_name": "rzara/lutece-core", "path": "src/java/fr/paris/lutece/portal/service/portlet/PortletResourceIdService.java", "license": "bsd-3-clause", "size": 4229 }
[ "fr.paris.lutece.portal.business.portlet.PortletType", "fr.paris.lutece.portal.service.rbac.Permission", "fr.paris.lutece.portal.service.rbac.ResourceType", "fr.paris.lutece.portal.service.rbac.ResourceTypeManager" ]
import fr.paris.lutece.portal.business.portlet.PortletType; import fr.paris.lutece.portal.service.rbac.Permission; import fr.paris.lutece.portal.service.rbac.ResourceType; import fr.paris.lutece.portal.service.rbac.ResourceTypeManager;
import fr.paris.lutece.portal.business.portlet.*; import fr.paris.lutece.portal.service.rbac.*;
[ "fr.paris.lutece" ]
fr.paris.lutece;
2,734,705
void onSuccess(File file);
void onSuccess(File file);
/** * Fired when a compression returns successfully, override to handle in your own code */
Fired when a compression returns successfully, override to handle in your own code
onSuccess
{ "repo_name": "Coding/Coding-Android", "path": "luban/src/main/java/top/zibin/luban/OnCompressListener.java", "license": "mit", "size": 480 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
639,456
protected GlassPane getGlassPane() { return glassPane; }
GlassPane function() { return glassPane; }
/** * Getter method for the glassPange * * @return GlassPane the blocking glassPane */
Getter method for the glassPange
getGlassPane
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_diagrams/argouml-app/src/org/argouml/ui/SwingWorker.java", "license": "gpl-3.0", "size": 8952 }
[ "org.argouml.swingext.GlassPane" ]
import org.argouml.swingext.GlassPane;
import org.argouml.swingext.*;
[ "org.argouml.swingext" ]
org.argouml.swingext;
1,767,192
@Test public void testOnePhaseCommitOneRM_1() throws Exception { IPhynixxXAConnection<ITestConnection> xaCon1 = factory1.getXAConnection(); IPhynixxXAConnection<ITestConnection> xaCon2 = factory1.getXAConnection(); this.getTransactionManager().begin(); ITestConnection con1 = x...
void function() throws Exception { IPhynixxXAConnection<ITestConnection> xaCon1 = factory1.getXAConnection(); IPhynixxXAConnection<ITestConnection> xaCon2 = factory1.getXAConnection(); this.getTransactionManager().begin(); ITestConnection con1 = xaCon1.getConnection(); Object conId1 = con1.getConnectionId(); ITestConne...
/** * one XAResourceProgressState Factory ( == resourceManagers) but two * Connections. The connections are joined and the transaction ends up in a * one-phase-commit * * @throws Exception */
one XAResourceProgressState Factory ( == resourceManagers) but two Connections. The connections are joined and the transaction ends up in a one-phase-commit
testOnePhaseCommitOneRM_1
{ "repo_name": "csc19601128/Phynixx", "path": "phynixx/phynixx-xa/src/test/java/org/csc/phynixx/xa/JotmIntegrationTest.java", "license": "apache-2.0", "size": 45549 }
[ "junit.framework.TestCase", "org.csc.phynixx.phynixx.testconnection.ITestConnection", "org.csc.phynixx.phynixx.testconnection.TestConnectionStatusManager", "org.csc.phynixx.phynixx.testconnection.TestStatusStack", "org.junit.Assert" ]
import junit.framework.TestCase; import org.csc.phynixx.phynixx.testconnection.ITestConnection; import org.csc.phynixx.phynixx.testconnection.TestConnectionStatusManager; import org.csc.phynixx.phynixx.testconnection.TestStatusStack; import org.junit.Assert;
import junit.framework.*; import org.csc.phynixx.phynixx.testconnection.*; import org.junit.*;
[ "junit.framework", "org.csc.phynixx", "org.junit" ]
junit.framework; org.csc.phynixx; org.junit;
1,677,689
public void bindSubMaps() { if (subMaps != null) { Iterator keys = subMaps.keySet().iterator(); while (keys.hasNext()) { Object key = keys.next(); Object id = subMaps.get(key); if (id instanceof String) { subMaps.put(key, delegate.getResultMap((String) id)); ...
void function() { if (subMaps != null) { Iterator keys = subMaps.keySet().iterator(); while (keys.hasNext()) { Object key = keys.next(); Object id = subMaps.get(key); if (id instanceof String) { subMaps.put(key, delegate.getResultMap((String) id)); } } } }
/** * Bind sub maps. */
Bind sub maps
bindSubMaps
{ "repo_name": "hazendaz/mybatis-2", "path": "src/main/java/com/ibatis/sqlmap/engine/mapping/result/Discriminator.java", "license": "apache-2.0", "size": 2905 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,521,531
public static void setPad(State s, double l, double r, double b, double t){ setPad(s, 0, l, r, b, t); }
static void function(State s, double l, double r, double b, double t){ setPad(s, 0, l, r, b, t); }
/** * Sets the first landing pad's boundaries/position * @param s the state in which the obstacle should be set * @param l the left boundary * @param r the right boundary * @param b the bottom boundary * @param t the top boundary */
Sets the first landing pad's boundaries/position
setPad
{ "repo_name": "nakulgopalan/burlap_pomdp_additions", "path": "src/burlap/domain/singleagent/lunarlander/LunarLanderDomain.java", "license": "lgpl-3.0", "size": 29909 }
[ "burlap.oomdp.core.State" ]
import burlap.oomdp.core.State;
import burlap.oomdp.core.*;
[ "burlap.oomdp.core" ]
burlap.oomdp.core;
2,631,484
private Hop fuseSumSquared(Hop parent, Hop hi, int pos) throws HopsException { // if SUM if (hi instanceof AggUnaryOp && ((AggUnaryOp) hi).getOp() == AggOp.SUM) { Hop sumInput = hi.getInput().get(0); // if input to SUM is POW(X,2), and no other consumers of the POW(X,2) HOP if( HopRewriteUtils.isBin...
Hop function(Hop parent, Hop hi, int pos) throws HopsException { if (hi instanceof AggUnaryOp && ((AggUnaryOp) hi).getOp() == AggOp.SUM) { Hop sumInput = hi.getInput().get(0); if( HopRewriteUtils.isBinary(sumInput, OpOp2.POW) && sumInput.getInput().get(1) instanceof LiteralOp && HopRewriteUtils.getDoubleValue((LiteralO...
/** * Replace SUM(X^2) with a fused SUM_SQ(X) HOP. * * @param parent Parent HOP for which hi is an input. * @param hi Current HOP for potential rewrite. * @param pos Position of hi in parent's list of inputs. * * @return Either hi or the rewritten HOP replacing it. * * @throws HopsException if HopsExc...
Replace SUM(X^2) with a fused SUM_SQ(X) HOP
fuseSumSquared
{ "repo_name": "sandeep-n/incubator-systemml", "path": "src/main/java/org/apache/sysml/hops/rewrite/RewriteAlgebraicSimplificationDynamic.java", "license": "apache-2.0", "size": 99470 }
[ "org.apache.sysml.hops.AggUnaryOp", "org.apache.sysml.hops.Hop", "org.apache.sysml.hops.HopsException", "org.apache.sysml.hops.LiteralOp" ]
import org.apache.sysml.hops.AggUnaryOp; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.LiteralOp;
import org.apache.sysml.hops.*;
[ "org.apache.sysml" ]
org.apache.sysml;
1,707,118
public SpringApplication build() { return build(new String[0]); }
SpringApplication function() { return build(new String[0]); }
/** * Returns a fully configured {@link SpringApplication} that is ready to run. * @return the fully configured {@link SpringApplication}. */
Returns a fully configured <code>SpringApplication</code> that is ready to run
build
{ "repo_name": "bclozel/spring-boot", "path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java", "license": "apache-2.0", "size": 17359 }
[ "org.springframework.boot.SpringApplication" ]
import org.springframework.boot.SpringApplication;
import org.springframework.boot.*;
[ "org.springframework.boot" ]
org.springframework.boot;
929,082
public void consumeAsync(List<Purchase> purchases, OnConsumeMultiFinishedListener listener) { checkSetupDone("consume"); consumeAsyncInternal(purchases, null, listener); }
void function(List<Purchase> purchases, OnConsumeMultiFinishedListener listener) { checkSetupDone(STR); consumeAsyncInternal(purchases, null, listener); }
/** * Same as {@link consumeAsync}, but for multiple items at once. * * @param purchases * The list of PurchaseInfo objects representing the purchases to consume. * @param listener * The listener to notify when the consumption operation finishes. */
Same as <code>consumeAsync</code>, but for multiple items at once
consumeAsync
{ "repo_name": "Defuera/cards-app", "path": "src/ru/fastcards/inapp/IabHelper.java", "license": "apache-2.0", "size": 42087 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,516,677
@Override public boolean isDirty() { return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); }
boolean function() { return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); }
/** * This is for implementing {@link IEditorPart} and simply tests the command stack. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This is for implementing <code>IEditorPart</code> and simply tests the command stack.
isDirty
{ "repo_name": "BaSys-PC1/models", "path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/linebalancing/presentation/LinebalancingEditor.java", "license": "epl-1.0", "size": 57540 }
[ "org.eclipse.emf.common.command.BasicCommandStack" ]
import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.common.command.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
529,844
public void setColorPalette(ColorPalette palette) { this.colorPalette = palette; }
void function(ColorPalette palette) { this.colorPalette = palette; }
/** * Sets the color palette. * * @param palette the new palette. */
Sets the color palette
setColorPalette
{ "repo_name": "opensim-org/opensim-gui", "path": "Gui/opensim/jfreechart/src/org/jfree/chart/axis/ColorBar.java", "license": "apache-2.0", "size": 15469 }
[ "org.jfree.chart.plot.ColorPalette" ]
import org.jfree.chart.plot.ColorPalette;
import org.jfree.chart.plot.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,519,661
public void draw(Shape s) { try { shapepipe.draw(this, s); } catch (InvalidPipeException e) { try { revalidateAll(); shapepipe.draw(this, s); } catch (InvalidPipeException e2) { // Still catching the exception; we ar...
void function(Shape s) { try { shapepipe.draw(this, s); } catch (InvalidPipeException e) { try { revalidateAll(); shapepipe.draw(this, s); } catch (InvalidPipeException e2) { } } finally { surfaceData.markDirty(); } }
/** * Strokes the outline of a Path using the settings of the current * graphics state. The rendering attributes applied include the * clip, transform, paint or color, composite and stroke attributes. * @param p The path to be drawn. * @see #setStroke * @see #setPaint * @see java.awt...
Strokes the outline of a Path using the settings of the current graphics state. The rendering attributes applied include the clip, transform, paint or color, composite and stroke attributes
draw
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/sun/java2d/SunGraphics2D.java", "license": "gpl-2.0", "size": 133716 }
[ "java.awt.Shape" ]
import java.awt.Shape;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,406,678
@ServiceMethod(returns = ReturnType.SINGLE) private PollerFlux<PollResult<Void>, Void> beginStartAsync( String resourceGroupName, String serviceName, String appName, String deploymentName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mo...
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> function( String resourceGroupName, String serviceName, String appName, String deploymentName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = startWithResponseAsync(resourceGroupName, ...
/** * Start the deployment. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serviceName The name of the Service resource. * @param appName The name of the App...
Start the deployment
beginStartAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appplatform/src/main/java/com/azure/resourcemanager/appplatform/implementation/DeploymentsClientImpl.java", "license": "mit", "size": 155556 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
2,399,526
public String getPrefix(String name) { try { return getPrefix(new URI(name)); } catch (URISyntaxException e) { return null; } }
String function(String name) { try { return getPrefix(new URI(name)); } catch (URISyntaxException e) { return null; } }
/** * Returns the namespace prefix for the given namespace name, which must be a well-formed URI. */
Returns the namespace prefix for the given namespace name, which must be a well-formed URI
getPrefix
{ "repo_name": "effektif/effektif", "path": "effektif-workflow-api/src/main/java/com/effektif/workflow/api/bpmn/XmlNamespaces.java", "license": "apache-2.0", "size": 2666 }
[ "java.net.URISyntaxException" ]
import java.net.URISyntaxException;
import java.net.*;
[ "java.net" ]
java.net;
355,931