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 boolean isDuplicate(String userName, List<User> users) {
for (User user : users) {
if (StringUtils.equals(userName, user.getPerson().getUserName())) {
return true;
}
}
return false;
} | boolean function(String userName, List<User> users) { for (User user : users) { if (StringUtils.equals(userName, user.getPerson().getUserName())) { return true; } } return false; } | /**
* Is this a duplicate user? In other words, has this user
* already been added to the list of users who can access the
* proposal?
* @param userName the user's userName
* @param users the current list of users with roles in the document
* @return true if the user is already in the lis... | Is this a duplicate user? In other words, has this user already been added to the list of users who can access the proposal | isDuplicate | {
"repo_name": "mukadder/kc",
"path": "coeus-impl/src/main/java/org/kuali/coeus/common/permissions/impl/rules/PermissionsRuleBase.java",
"license": "agpl-3.0",
"size": 9843
} | [
"java.util.List",
"org.apache.commons.lang3.StringUtils",
"org.kuali.coeus.common.permissions.impl.web.bean.User"
] | import java.util.List; import org.apache.commons.lang3.StringUtils; import org.kuali.coeus.common.permissions.impl.web.bean.User; | import java.util.*; import org.apache.commons.lang3.*; import org.kuali.coeus.common.permissions.impl.web.bean.*; | [
"java.util",
"org.apache.commons",
"org.kuali.coeus"
] | java.util; org.apache.commons; org.kuali.coeus; | 1,733,344 |
public void init() {
URL u = Main.class.getResource("/REVISION");
if (u == null) {
Main.warn(tr("The revision file ''/REVISION'' is missing."));
version = 0;
releaseDescription = "";
return;
}
initFromRevisionInfo(loadResourceFile(u));
... | void function() { URL u = Main.class.getResource(STR); if (u == null) { Main.warn(tr(STR)); version = 0; releaseDescription = ""; return; } initFromRevisionInfo(loadResourceFile(u)); } | /**
* Initializes version info
*/ | Initializes version info | init | {
"repo_name": "jonathanrcarter/divv-amsterdam-parkingapi",
"path": "src-josm/org/openstreetmap/josm/data/Version.java",
"license": "gpl-2.0",
"size": 7545
} | [
"org.openstreetmap.josm.Main"
] | import org.openstreetmap.josm.Main; | import org.openstreetmap.josm.*; | [
"org.openstreetmap.josm"
] | org.openstreetmap.josm; | 2,756,876 |
private void loadClassLoaderInjector() {
Class injectorClass = null;
try {
//Convert the class into bytes
byte[] classBytes = IOUtils.toByteArray(this.getClass().getResourceAsStream("/com/flipkart/flux/deploymentunit/ClassLoaderInjector.class"));
injectorClass =... | void function() { Class injectorClass = null; try { byte[] classBytes = IOUtils.toByteArray(this.getClass().getResourceAsStream(STR)); injectorClass = deploymentUnitClassLoader.defineClass(ClassLoaderInjector.class.getCanonicalName(), classBytes); } catch (LinkageError le) { LOGGER.error(STR, le); try { injectorClass =... | /**
* Loads {@Link ClassLoaderInjector} class into given deployment unit's class loader and returns it.
*/ | Loads ClassLoaderInjector class into given deployment unit's class loader and returns it | loadClassLoaderInjector | {
"repo_name": "flipkart-incubator/flux",
"path": "runtime/src/main/java/com/flipkart/flux/deploymentunit/DeploymentUnit.java",
"license": "apache-2.0",
"size": 11118
} | [
"com.flipkart.flux.api.core.FluxError",
"java.io.IOException",
"org.apache.commons.io.IOUtils"
] | import com.flipkart.flux.api.core.FluxError; import java.io.IOException; import org.apache.commons.io.IOUtils; | import com.flipkart.flux.api.core.*; import java.io.*; import org.apache.commons.io.*; | [
"com.flipkart.flux",
"java.io",
"org.apache.commons"
] | com.flipkart.flux; java.io; org.apache.commons; | 1,488,596 |
@Override
protected void createButtonsForButtonBar(Composite parent) {
saveButton = createSaveButton(parent, IDialogConstants.OK_ID,
"Save and Close", true);
createButton(parent, IDialogConstants.CANCEL_ID,
IDialogConstants.CANCEL_LABEL, false);
}
| void function(Composite parent) { saveButton = createSaveButton(parent, IDialogConstants.OK_ID, STR, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } | /**
* Create contents of the button bar.
*
* @param parent
*/ | Create contents of the button bar | createButtonsForButtonBar | {
"repo_name": "JKatzwinkel/bts",
"path": "org.bbaw.bts.ui.main/src/org/bbaw/bts/ui/main/dialogs/ObjectUpdaterReaderEditorDialog.java",
"license": "lgpl-3.0",
"size": 4843
} | [
"org.eclipse.jface.dialogs.IDialogConstants",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.widgets.Composite; | import org.eclipse.jface.dialogs.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jface; org.eclipse.swt; | 2,481,664 |
public static MultiCategoryClassifyResultCollection toMultiCategoryClassifyResultCollection(
CustomMultiClassificationResult customMultiClassificationResult) {
final List<MultiCategoryClassifyResult> multiCategoryClassifyResults = new ArrayList<>();
final List<MultiClassificationDocument> mu... | static MultiCategoryClassifyResultCollection function( CustomMultiClassificationResult customMultiClassificationResult) { final List<MultiCategoryClassifyResult> multiCategoryClassifyResults = new ArrayList<>(); final List<MultiClassificationDocument> multiClassificationDocuments = customMultiClassificationResult.getDo... | /**
* Helper method to convert {@link CustomMultiClassificationResult} to
* {@link MultiCategoryClassifyResultCollection}.
*
* @param customMultiClassificationResult The {@link CustomMultiClassificationResult}.
*
* @return A {@link SingleCategoryClassifyResultCollection}.
*/ | Helper method to convert <code>CustomMultiClassificationResult</code> to <code>MultiCategoryClassifyResultCollection</code> | toMultiCategoryClassifyResultCollection | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/textanalytics/azure-ai-textanalytics/src/main/java/com/azure/ai/textanalytics/implementation/Utility.java",
"license": "mit",
"size": 63252
} | [
"com.azure.ai.textanalytics.implementation.models.CustomMultiClassificationResult",
"com.azure.ai.textanalytics.implementation.models.DocumentError",
"com.azure.ai.textanalytics.implementation.models.MultiClassificationDocument",
"com.azure.ai.textanalytics.models.MultiCategoryClassifyResult",
"com.azure.ai... | import com.azure.ai.textanalytics.implementation.models.CustomMultiClassificationResult; import com.azure.ai.textanalytics.implementation.models.DocumentError; import com.azure.ai.textanalytics.implementation.models.MultiClassificationDocument; import com.azure.ai.textanalytics.models.MultiCategoryClassifyResult; impor... | import com.azure.ai.textanalytics.implementation.models.*; import com.azure.ai.textanalytics.models.*; import com.azure.ai.textanalytics.util.*; import java.util.*; | [
"com.azure.ai",
"java.util"
] | com.azure.ai; java.util; | 640,446 |
public static <K, V, K2, V2> MutableMap<K2, V2> collect(
Map<K, V> map,
Function2<? super K, ? super V, Pair<K2, V2>> function)
{
return MapIterate.collect(map, function, UnifiedMap.<K2, V2>newMap(map.size()));
} | static <K, V, K2, V2> MutableMap<K2, V2> function( Map<K, V> map, Function2<? super K, ? super V, Pair<K2, V2>> function) { return MapIterate.collect(map, function, UnifiedMap.<K2, V2>newMap(map.size())); } | /**
* For each value of the map, the function is evaluated with the key and value as the parameter.
* The results of these evaluations are collected into a new UnifiedMap.
*/ | For each value of the map, the function is evaluated with the key and value as the parameter. The results of these evaluations are collected into a new UnifiedMap | collect | {
"repo_name": "gabby2212/gs-collections",
"path": "collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java",
"license": "apache-2.0",
"size": 37834
} | [
"com.gs.collections.api.block.function.Function2",
"com.gs.collections.api.map.MutableMap",
"com.gs.collections.api.tuple.Pair",
"com.gs.collections.impl.map.mutable.UnifiedMap",
"java.util.Map"
] | import com.gs.collections.api.block.function.Function2; import com.gs.collections.api.map.MutableMap; import com.gs.collections.api.tuple.Pair; import com.gs.collections.impl.map.mutable.UnifiedMap; import java.util.Map; | import com.gs.collections.api.block.function.*; import com.gs.collections.api.map.*; import com.gs.collections.api.tuple.*; import com.gs.collections.impl.map.mutable.*; import java.util.*; | [
"com.gs.collections",
"java.util"
] | com.gs.collections; java.util; | 1,046,137 |
public ClientFactoryBuilder http1MaxInitialLineLength(int http1MaxInitialLineLength) {
checkArgument(http1MaxInitialLineLength >= 0,
"http1MaxInitialLineLength: %s (expected: >= 0)",
http1MaxInitialLineLength);
option(ClientFactoryOptions.HTTP1_MAX_INITIAL... | ClientFactoryBuilder function(int http1MaxInitialLineLength) { checkArgument(http1MaxInitialLineLength >= 0, STR, http1MaxInitialLineLength); option(ClientFactoryOptions.HTTP1_MAX_INITIAL_LINE_LENGTH, http1MaxInitialLineLength); return this; } | /**
* Sets the maximum length of an HTTP/1 response initial line.
*/ | Sets the maximum length of an HTTP/1 response initial line | http1MaxInitialLineLength | {
"repo_name": "minwoox/armeria",
"path": "core/src/main/java/com/linecorp/armeria/client/ClientFactoryBuilder.java",
"license": "apache-2.0",
"size": 31760
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,837,374 |
public void clearTemporaryMemory() {
// To record the cuda block sizes needed by allocatedGPUObjects, others are cleared up.
Set<Pointer> temporaryPointers = nonIn(allocatedGPUPointers.keySet(), getDirtyPointers());
for(Pointer tmpPtr : temporaryPointers) {
guardedCudaFree(tmpPtr);
}
}
| void function() { Set<Pointer> temporaryPointers = nonIn(allocatedGPUPointers.keySet(), getDirtyPointers()); for(Pointer tmpPtr : temporaryPointers) { guardedCudaFree(tmpPtr); } } | /**
* Clears up the memory used by non-dirty pointers.
*/ | Clears up the memory used by non-dirty pointers | clearTemporaryMemory | {
"repo_name": "dusenberrymw/systemml",
"path": "src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUMemoryManager.java",
"license": "apache-2.0",
"size": 19831
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,597,329 |
private void saveCategoriesSectionXML(Element parentElement) {
// Add a categories section element
Document document = parentElement.getOwnerDocument();
Element sectionElement = document.createElement(MetadataPersistenceConstants.CATEGORIES_SECTION_TAG);
parentElement... | void function(Element parentElement) { Document document = parentElement.getOwnerDocument(); Element sectionElement = document.createElement(MetadataPersistenceConstants.CATEGORIES_SECTION_TAG); parentElement.appendChild(sectionElement); for (final String element : categories) { CDATASection cdata = XMLPersistenceHelpe... | /**
* Creates the categories metadata section at the given XML element.
* @param parentElement the XML element to add the section to
*/ | Creates the categories metadata section at the given XML element | saveCategoriesSectionXML | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Platform/src/org/openquark/cal/metadata/InstanceMethodMetadata.java",
"license": "bsd-3-clause",
"size": 16144
} | [
"org.openquark.util.xml.XMLPersistenceHelper",
"org.w3c.dom.CDATASection",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.openquark.util.xml.XMLPersistenceHelper; import org.w3c.dom.CDATASection; import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.openquark.util.xml.*; import org.w3c.dom.*; | [
"org.openquark.util",
"org.w3c.dom"
] | org.openquark.util; org.w3c.dom; | 1,170,655 |
public FSArray getValue() {
if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null)
jcasType.jcas.throwFeatMissing("value", "de.julielab.jules.types.DiscontinuousAnnotation");
return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefV... | FSArray function() { if (DiscontinuousAnnotation_Type.featOkTst && ((DiscontinuousAnnotation_Type)jcasType).casFeat_value == null) jcasType.jcas.throwFeatMissing("value", STR); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((DiscontinuousAnnotation_Type)jcasType).casFeatCode_value... | /** getter for value - gets Annotations to be chained.
* @generated
* @return value of the feature
*/ | getter for value - gets Annotations to be chained | getValue | {
"repo_name": "BlueBrain/bluima",
"path": "modules/bluima_typesystem/src/main/java/de/julielab/jules/types/DiscontinuousAnnotation.java",
"license": "apache-2.0",
"size": 4741
} | [
"org.apache.uima.jcas.cas.FSArray"
] | import org.apache.uima.jcas.cas.FSArray; | import org.apache.uima.jcas.cas.*; | [
"org.apache.uima"
] | org.apache.uima; | 1,935,669 |
private void checkSolution() {
// Check if the solution does not contain any bindings.
if (this.solution.toString().equals("{}")) {
if (Globals.getInst().symbolicExecLogger.isDebugEnabled()) Globals.getInst().symbolicExecLogger.debug("A solution was found that is valid but empty. Zero values will by assign... | void function() { if (this.solution.toString().equals("{}")) { if (Globals.getInst().symbolicExecLogger.isDebugEnabled()) Globals.getInst().symbolicExecLogger.debug(STR); for (Object variable : this.variables) { if (variable != null && variable instanceof Variable) { int type = ((Variable) variable).getType(); switch (... | /**
* Check if the solution does not contain any bindings. If it
* does not, there most likely have been no constraints that
* would characterize it. So zero values are added.
*/ | Check if the solution does not contain any bindings. If it does not, there most likely have been no constraints that would characterize it. So zero values are added | checkSolution | {
"repo_name": "wwu-pi/muggl",
"path": "muggl-core/src/de/wwu/muggl/symbolic/testCases/TestCaseSolution.java",
"license": "gpl-3.0",
"size": 26683
} | [
"de.wwu.muggl.configuration.Globals",
"de.wwu.muggl.solvers.expressions.BooleanConstant",
"de.wwu.muggl.solvers.expressions.DoubleConstant",
"de.wwu.muggl.solvers.expressions.Expression",
"de.wwu.muggl.solvers.expressions.FloatConstant",
"de.wwu.muggl.solvers.expressions.IntConstant",
"de.wwu.muggl.solv... | import de.wwu.muggl.configuration.Globals; import de.wwu.muggl.solvers.expressions.BooleanConstant; import de.wwu.muggl.solvers.expressions.DoubleConstant; import de.wwu.muggl.solvers.expressions.Expression; import de.wwu.muggl.solvers.expressions.FloatConstant; import de.wwu.muggl.solvers.expressions.IntConstant; impo... | import de.wwu.muggl.configuration.*; import de.wwu.muggl.solvers.expressions.*; | [
"de.wwu.muggl"
] | de.wwu.muggl; | 2,436,814 |
public ParameterItemV2 removeParameterItem () {
int idx = this.Project.getParameters().indexOf(CurrentItem);
if (idx >= 0) {
int n = JOptionPane.showConfirmDialog(
this,
"Are you sure that you want to delete the selected parameter?",
"Delet... | ParameterItemV2 function () { int idx = this.Project.getParameters().indexOf(CurrentItem); if (idx >= 0) { int n = JOptionPane.showConfirmDialog( this, STR, STR, JOptionPane.YES_NO_OPTION); if (n == JOptionPane.NO_OPTION) { return null; } ParameterItemV2 deleted = this.Project.getParameters().remove(idx); Project.setCo... | /**
* Delete the whole branch of the selected node from the tree
* @return the root node of the branch being removed
*/ | Delete the whole branch of the selected node from the tree | removeParameterItem | {
"repo_name": "jeplus/jEPlus",
"path": "src/main/java/jeplus/gui/JPanel_ParameterTable.java",
"license": "gpl-3.0",
"size": 40161
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,741,113 |
void nextPacket(Packet packet) throws IOException; | void nextPacket(Packet packet) throws IOException; | /**
* Will be called by the {@link Pcap} class as soon as it detects a new
* {@link Packet} in the pcap stream.
*
* @param packet
* the new {@link Packet} as read off of the pcap stream.
* @throws IOException
*/ | Will be called by the <code>Pcap</code> class as soon as it detects a new <code>Packet</code> in the pcap stream | nextPacket | {
"repo_name": "radiantiq/pkts",
"path": "pkts-core/src/main/java/io/pkts/PacketHandler.java",
"license": "mit",
"size": 605
} | [
"io.pkts.packet.Packet",
"java.io.IOException"
] | import io.pkts.packet.Packet; import java.io.IOException; | import io.pkts.packet.*; import java.io.*; | [
"io.pkts.packet",
"java.io"
] | io.pkts.packet; java.io; | 925,299 |
// Perl5Compiler compiler = new Perl5Compiler();
PatternMatcherInput input = new PatternMatcherInput(strInput);
Perl5Matcher matcher = new Perl5Matcher();
int compileOptions = caseSensitive ? 0 : Perl5Compiler.CASE_INSENSITIVE_MASK;
compileOptions += multiLine ? Perl5Compiler.MULTILINE_MASK : Perl5Compiler.S... | PatternMatcherInput input = new PatternMatcherInput(strInput); Perl5Matcher matcher = new Perl5Matcher(); int compileOptions = caseSensitive ? 0 : Perl5Compiler.CASE_INSENSITIVE_MASK; compileOptions += multiLine ? Perl5Compiler.MULTILINE_MASK : Perl5Compiler.SINGLELINE_MASK; if (offset < 1) offset = 1; Pattern pattern ... | /**
* return index of the first occurence of the pattern in input text
*
* @param strPattern pattern to search
* @param strInput text to search pattern
* @param offset
* @param caseSensitive
* @return position of the first occurence
* @throws MalformedPatternException
*/ | return index of the first occurence of the pattern in input text | indexOf | {
"repo_name": "lucee/Lucee",
"path": "core/src/main/java/lucee/runtime/regex/Perl5Util.java",
"license": "lgpl-2.1",
"size": 9984
} | [
"org.apache.oro.text.regex.Pattern",
"org.apache.oro.text.regex.PatternMatcherInput",
"org.apache.oro.text.regex.Perl5Compiler",
"org.apache.oro.text.regex.Perl5Matcher"
] | import org.apache.oro.text.regex.Pattern; import org.apache.oro.text.regex.PatternMatcherInput; import org.apache.oro.text.regex.Perl5Compiler; import org.apache.oro.text.regex.Perl5Matcher; | import org.apache.oro.text.regex.*; | [
"org.apache.oro"
] | org.apache.oro; | 2,019,589 |
@Exported
public synchronized List<Range> getRanges() {
return new ArrayList<>(ranges);
} | synchronized List<Range> function() { return new ArrayList<>(ranges); } | /**
* Gets all the ranges.
*/ | Gets all the ranges | getRanges | {
"repo_name": "batmat/jenkins",
"path": "core/src/main/java/hudson/model/Fingerprint.java",
"license": "mit",
"size": 52288
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,110,010 |
public void testInvokeAll4() throws Throwable {
ExecutorService e = new ForkJoinPool(1);
List<Callable<String>> l = new ArrayList<Callable<String>>();
l.add(new NPETask());
List<Future<String>> futures = e.invokeAll(l);
assertEquals(1, futures.size());
try {
... | void function() throws Throwable { ExecutorService e = new ForkJoinPool(1); List<Callable<String>> l = new ArrayList<Callable<String>>(); l.add(new NPETask()); List<Future<String>> futures = e.invokeAll(l); assertEquals(1, futures.size()); try { futures.get(0).get(); shouldThrow(); } catch (ExecutionException success) ... | /**
* get of returned element of invokeAll(c) throws
* ExecutionException on failed task
*/ | get of returned element of invokeAll(c) throws ExecutionException on failed task | testInvokeAll4 | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/ForkJoinPoolTest.java",
"license": "gpl-2.0",
"size": 33071
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.Callable",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.ForkJoinPool",
"java.util.concurrent.Future"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.Future; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,071,072 |
public static ISpellMobParticle createSpellMob() {
return factory().create(ParticleType.SPELL_MOB);
} | static ISpellMobParticle function() { return factory().create(ParticleType.SPELL_MOB); } | /**
* Entity enchanted effect.
*/ | Entity enchanted effect | createSpellMob | {
"repo_name": "JCThePants/NucleusFramework",
"path": "src/com/jcwhatever/nucleus/managed/particles/Particles.java",
"license": "mit",
"size": 11808
} | [
"com.jcwhatever.nucleus.managed.particles.ParticleType",
"com.jcwhatever.nucleus.managed.particles.types.ISpellMobParticle"
] | import com.jcwhatever.nucleus.managed.particles.ParticleType; import com.jcwhatever.nucleus.managed.particles.types.ISpellMobParticle; | import com.jcwhatever.nucleus.managed.particles.*; import com.jcwhatever.nucleus.managed.particles.types.*; | [
"com.jcwhatever.nucleus"
] | com.jcwhatever.nucleus; | 482,596 |
public ValuesDelta getPrimaryEntry(String mimeType) {
final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false);
if (mimeEntries == null) return null;
for (ValuesDelta entry : mimeEntries) {
if (entry.isPrimary()) {
return entry;
}
... | ValuesDelta function(String mimeType) { final ArrayList<ValuesDelta> mimeEntries = getMimeEntries(mimeType, false); if (mimeEntries == null) return null; for (ValuesDelta entry : mimeEntries) { if (entry.isPrimary()) { return entry; } } return mimeEntries.size() > 0 ? mimeEntries.get(0) : null; } | /**
* Get the {@link ValuesDelta} child marked as {@link Data#IS_PRIMARY},
* which may return null when no entry exists.
*/ | Get the <code>ValuesDelta</code> child marked as <code>Data#IS_PRIMARY</code>, which may return null when no entry exists | getPrimaryEntry | {
"repo_name": "GuillaumeDelente/contact-picker",
"path": "library/src/main/java/com/guillaumedelente/android/contacts/common/model/RawContactDelta.java",
"license": "apache-2.0",
"size": 20639
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 467,170 |
private Literal getNumber(String val)
throws ConfigurationException, IOException
{
char c = val.charAt(val.length() - 1);
try {
if (c == 'l' || c == 'L') {
return new Literal(
Long.TYPE,
Long.decode(val.substring(0, val.length() - 1)),
st.lineno());
} else if (c == 'f' || c == 'F')... | Literal function(String val) throws ConfigurationException, IOException { char c = val.charAt(val.length() - 1); try { if (c == 'l' c == 'L') { return new Literal( Long.TYPE, Long.decode(val.substring(0, val.length() - 1)), st.lineno()); } else if (c == 'f' c == 'F') { return new Literal( Float.TYPE, Float.valueOf(val.... | /**
* Parses a numeric literal and returns the value as a Literal.
*/ | Parses a numeric literal and returns the value as a Literal | getNumber | {
"repo_name": "cdegroot/river",
"path": "src/net/jini/config/ConfigurationFile.java",
"license": "apache-2.0",
"size": 103654
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,734,218 |
public static TypeAdapterFactory newTypeHierarchyFactory(
Class<?> hierarchyType, Object typeAdapter) {
return new SingleTypeFactory(typeAdapter, null, false, hierarchyType);
}
private static class SingleTypeFactory implements TypeAdapterFactory {
private final TypeToken<?> exactType;
private f... | static TypeAdapterFactory function( Class<?> hierarchyType, Object typeAdapter) { return new SingleTypeFactory(typeAdapter, null, false, hierarchyType); } private static class SingleTypeFactory implements TypeAdapterFactory { private final TypeToken<?> exactType; private final boolean matchRawType; private final Class<... | /**
* Returns a new factory that will match each type's raw type for assignability
* to {@literal hierarchyType}.
*/ | Returns a new factory that will match each type's raw type for assignability to hierarchyType | newTypeHierarchyFactory | {
"repo_name": "adamdubiel/jason",
"path": "src/main/java/org/jasonjson/core/TreeTypeAdapter.java",
"license": "apache-2.0",
"size": 5303
} | [
"org.jasonjson.core.reflect.TypeToken"
] | import org.jasonjson.core.reflect.TypeToken; | import org.jasonjson.core.reflect.*; | [
"org.jasonjson.core"
] | org.jasonjson.core; | 1,988,617 |
private void processWorkflow(EditorItem editor, WebActionParameter parameter) {
if (editor.getWorkflow() == null || editor.getWorkflow().getModel() == null) {
return;
}
String instanceId = parameter.get(NabuccoServletPathType.WORKFLOW);
String signalId = parameter.get(Na... | void function(EditorItem editor, WebActionParameter parameter) { if (editor.getWorkflow() == null editor.getWorkflow().getModel() == null) { return; } String instanceId = parameter.get(NabuccoServletPathType.WORKFLOW); String signalId = parameter.get(NabuccoServletPathType.SIGNAL); if (instanceId == null signalId == nu... | /**
* Add the next signal to the workflow transition context when a signal is transmitted in the
* request URL.
*
* @param editor
* the editor holding the reference to the workflow
* @param parameter
* the web action parameter
*/ | Add the next signal to the workflow transition context when a signal is transmitted in the request URL | processWorkflow | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.ui.web/src/main/man/org/nabucco/framework/base/ui/web/action/handler/SaveActionHandler.java",
"license": "epl-1.0",
"size": 11225
} | [
"java.util.List",
"org.nabucco.framework.base.facade.datatype.collection.NabuccoList",
"org.nabucco.framework.base.facade.datatype.context.WorkflowTransitionContext",
"org.nabucco.framework.base.facade.datatype.context.WorkflowTransitionContextRequest",
"org.nabucco.framework.base.facade.datatype.workflow.S... | import java.util.List; import org.nabucco.framework.base.facade.datatype.collection.NabuccoList; import org.nabucco.framework.base.facade.datatype.context.WorkflowTransitionContext; import org.nabucco.framework.base.facade.datatype.context.WorkflowTransitionContextRequest; import org.nabucco.framework.base.facade.datat... | import java.util.*; import org.nabucco.framework.base.facade.datatype.collection.*; import org.nabucco.framework.base.facade.datatype.context.*; import org.nabucco.framework.base.facade.datatype.workflow.*; import org.nabucco.framework.base.facade.datatype.workflow.transition.*; import org.nabucco.framework.base.ui.web... | [
"java.util",
"org.nabucco.framework"
] | java.util; org.nabucco.framework; | 1,805,750 |
// reverse dependency graph is not changed once initalized
reverseDependencyGraph = new HashMap<T, ArrayList<T>>();
dependencyStatus = new ConcurrentHashMap<T, Status>();
dependencyQueue = new PriorityBlockingQueue<TaskRunnable<T>>();
dependencyWeights = new HashMap<T, Integer>();
b... | reverseDependencyGraph = new HashMap<T, ArrayList<T>>(); dependencyStatus = new ConcurrentHashMap<T, Status>(); dependencyQueue = new PriorityBlockingQueue<TaskRunnable<T>>(); dependencyWeights = new HashMap<T, Integer>(); buildReverseDependencyGraph(dependencyGraph, reverseDependencyGraph); System.out.println(STR); pr... | /**
* Tasks are ordered respecting the dependencies. A dependency graph has to be passed as input.
* Tasks are scheduled on multiple threads. Jobs with highest dependencies are prioritized.
* It is assumed graph does not have cycles and there is atleast one task that does not
* @param dependencyGraph
... | Tasks are ordered respecting the dependencies. A dependency graph has to be passed as input. Tasks are scheduled on multiple threads. Jobs with highest dependencies are prioritized. It is assumed graph does not have cycles and there is atleast one task that does not | orderAndExecuteTasks | {
"repo_name": "phaniyarlagadda/TaskManager",
"path": "src/com/rationalcoding/taskmanager/TaskManager.java",
"license": "mit",
"size": 4850
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.concurrent.ConcurrentHashMap",
"java.util.concurrent.PriorityBlockingQueue"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.PriorityBlockingQueue; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 66,494 |
@Override
public String getCommandUsage(ICommandSender sender) {
return "/ch applySet [-s|--silent] <Set Name> [<Set Name>...]";
} | String function(ICommandSender sender) { return STR; } | /**
* Gets the usage string for the command.
*
* @param sender
*/ | Gets the usage string for the command | getCommandUsage | {
"repo_name": "legendblade/CraftingHarmonics",
"path": "src/main/java/org/winterblade/minecraft/harmony/commands/ApplySetCommand.java",
"license": "mit",
"size": 3317
} | [
"net.minecraft.command.ICommandSender"
] | import net.minecraft.command.ICommandSender; | import net.minecraft.command.*; | [
"net.minecraft.command"
] | net.minecraft.command; | 2,408,719 |
public boolean hasModuleResourcesWithUndefinedSite() {
if (getSite() == null) {
for (String modRes : getResources()) {
if (!CmsStringUtil.isPrefixPath("/system/", modRes)
&& !OpenCms.getSiteManager().startsWithShared(modRes)) {
return true... | boolean function() { if (getSite() == null) { for (String modRes : getResources()) { if (!CmsStringUtil.isPrefixPath(STR, modRes) && !OpenCms.getSiteManager().startsWithShared(modRes)) { return true; } } } return false; } | /**
* Determines if the module haas resources whose site is undefined.<p>
*
* @return true if there are module resources with an undefined site
*/ | Determines if the module haas resources whose site is undefined | hasModuleResourcesWithUndefinedSite | {
"repo_name": "alkacon/opencms-core",
"path": "src/org/opencms/module/CmsModule.java",
"license": "lgpl-2.1",
"size": 55528
} | [
"org.opencms.main.OpenCms",
"org.opencms.util.CmsStringUtil"
] | import org.opencms.main.OpenCms; import org.opencms.util.CmsStringUtil; | import org.opencms.main.*; import org.opencms.util.*; | [
"org.opencms.main",
"org.opencms.util"
] | org.opencms.main; org.opencms.util; | 456,585 |
public int writeFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff) throws IOException {
file.writeFile(buf, siz, bufoff, fileoff);
return siz;
} | int function(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff) throws IOException { file.writeFile(buf, siz, bufoff, fileoff); return siz; } | /**
* Write data to a Liferay file. This method actually writes data to a temporary
* file on local disk. Data gets to Liferay on file close.
* @param sess Session details
* @param tree Tree connection
* @param file NetworkFile object describing the file to write to
* @param buf Buffer wit... | Write data to a Liferay file. This method actually writes data to a temporary file on local disk. Data gets to Liferay on file close | writeFile | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/com/arcusys/liferay/smb/DocumentLibraryDiskDriver.java",
"license": "gpl-3.0",
"size": 14719
} | [
"java.io.IOException",
"org.alfresco.jlan.server.SrvSession",
"org.alfresco.jlan.server.filesys.NetworkFile",
"org.alfresco.jlan.server.filesys.TreeConnection"
] | import java.io.IOException; import org.alfresco.jlan.server.SrvSession; import org.alfresco.jlan.server.filesys.NetworkFile; import org.alfresco.jlan.server.filesys.TreeConnection; | import java.io.*; import org.alfresco.jlan.server.*; import org.alfresco.jlan.server.filesys.*; | [
"java.io",
"org.alfresco.jlan"
] | java.io; org.alfresco.jlan; | 1,787,715 |
@Test(expected = IllegalArgumentException.class)
public void testInitialization() {
new StringConcatenator(stringComponents);
} | @Test(expected = IllegalArgumentException.class) void function() { new StringConcatenator(stringComponents); } | /**
* The test tries to initialize a string concatenator with the specified invalid components.
*/ | The test tries to initialize a string concatenator with the specified invalid components | testInitialization | {
"repo_name": "gammalgris/jmul",
"path": "Utilities/String-Tests/src/test/jmul/string/StringConcatenatorInvalidComponentsTest.java",
"license": "gpl-3.0",
"size": 2981
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 502,640 |
void connectorInfo(String connName, Callback<ConnectorInfo> callback); | void connectorInfo(String connName, Callback<ConnectorInfo> callback); | /**
* Get the definition and status of a connector.
*/ | Get the definition and status of a connector | connectorInfo | {
"repo_name": "jjgarcianu/connect_Multi_file",
"path": "src/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Herder.java",
"license": "apache-2.0",
"size": 6259
} | [
"org.apache.kafka.connect.runtime.rest.entities.ConnectorInfo",
"org.apache.kafka.connect.util.Callback"
] | import org.apache.kafka.connect.runtime.rest.entities.ConnectorInfo; import org.apache.kafka.connect.util.Callback; | import org.apache.kafka.connect.runtime.rest.entities.*; import org.apache.kafka.connect.util.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 1,315,076 |
void delete(String tableName)
throws AccumuloException, AccumuloSecurityException, TableNotFoundException; | void delete(String tableName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException; | /**
* Delete a table
*
* @param tableName
* the name of the table
* @throws AccumuloException
* if a general error occurs
* @throws AccumuloSecurityException
* if the user does not have permission
* @throws TableNotFoundException
* if the table does n... | Delete a table | delete | {
"repo_name": "ivakegg/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/client/admin/TableOperations.java",
"license": "apache-2.0",
"size": 43874
} | [
"org.apache.accumulo.core.client.AccumuloException",
"org.apache.accumulo.core.client.AccumuloSecurityException",
"org.apache.accumulo.core.client.TableNotFoundException"
] | import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.accumulo.core.client.TableNotFoundException; | import org.apache.accumulo.core.client.*; | [
"org.apache.accumulo"
] | org.apache.accumulo; | 1,752,754 |
public void updateDrawState(TextPaint ds) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
ds.setColor(getResources().getColor(R.color.colorAccent, null));//set text color
} else {
ds.setColor(getResources().getColor(R.color.colorAccent));//set text... | void function(TextPaint ds) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { ds.setColor(getResources().getColor(R.color.colorAccent, null)); } else { ds.setColor(getResources().getColor(R.color.colorAccent)); } ds.setUnderlineText(false); } } | /**
* Change the style of the object: blue and not underline
*
* @param ds TextPaint with the style of the object
*/ | Change the style of the object: blue and not underline | updateDrawState | {
"repo_name": "Ana06/medical-data-android",
"path": "app/src/main/java/com/example/ana/exampleapp/RegisterActivity.java",
"license": "gpl-3.0",
"size": 10896
} | [
"android.os.Build",
"android.text.TextPaint"
] | import android.os.Build; import android.text.TextPaint; | import android.os.*; import android.text.*; | [
"android.os",
"android.text"
] | android.os; android.text; | 2,275,399 |
private String getStringFromEntry(final ZipFile file,
final ZipEntry entry) {
StringBuilder dependenciesStringBuilder = new StringBuilder();
try (InputStream dependenciesStream = file.getInputStream(entry)) {
while (dependenciesStream.available() > 0... | String function(final ZipFile file, final ZipEntry entry) { StringBuilder dependenciesStringBuilder = new StringBuilder(); try (InputStream dependenciesStream = file.getInputStream(entry)) { while (dependenciesStream.available() > 0) { dependenciesStringBuilder.appendCodePoint( dependenciesStream.read()); } } catch (IO... | /**
* Reads a {@link ZipEntry}, decompresses it and returns the contents as a
* String.
* No validation is done except for checking the presence of the entry.
*
* @param file the file to read the entry from.
* @param entry the entry to read and return as a String.
* @return a string ... | Reads a <code>ZipEntry</code>, decompresses it and returns the contents as a String. No validation is done except for checking the presence of the entry | getStringFromEntry | {
"repo_name": "GiantTreeLP/bukkitdependencyloader",
"path": "src/main/java/com/github/gianttreelp/bukkitdependencyloader/DependencyLoaderPlugin.java",
"license": "gpl-3.0",
"size": 16354
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.zip.ZipEntry",
"java.util.zip.ZipFile"
] | import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; | import java.io.*; import java.util.zip.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 644,556 |
public OnCheckedChangeListener setTextView(TextView view) {
this.view_ = view;
return this;
}
| OnCheckedChangeListener function(TextView view) { this.view_ = view; return this; } | /**
* set TextView object
* @param view
* @return this
*/ | set TextView object | setTextView | {
"repo_name": "HackLinux/Pandaboard",
"path": "GpioTest/src/com/ogutti/android/gpiotest/GpioActivity.java",
"license": "bsd-3-clause",
"size": 2588
} | [
"android.widget.CompoundButton",
"android.widget.TextView"
] | import android.widget.CompoundButton; import android.widget.TextView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 274,475 |
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public static final WebRiskServiceV1Beta1Client create(WebRiskServiceV1Beta1Stub stub) {
return new WebRiskServiceV1Beta1Client(stub);
}
protected WebRiskServiceV1Beta1Client(WebRiskServiceV1Beta1Settings settings) t... | @BetaApi(STR) static final WebRiskServiceV1Beta1Client function(WebRiskServiceV1Beta1Stub stub) { return new WebRiskServiceV1Beta1Client(stub); } protected WebRiskServiceV1Beta1Client(WebRiskServiceV1Beta1Settings settings) throws IOException { this.settings = settings; this.stub = ((WebRiskServiceV1Beta1StubSettings) ... | /**
* Constructs an instance of WebRiskServiceV1Beta1Client, using the given stub for making calls.
* This is for advanced usage - prefer using create(WebRiskServiceV1Beta1Settings).
*/ | Constructs an instance of WebRiskServiceV1Beta1Client, using the given stub for making calls. This is for advanced usage - prefer using create(WebRiskServiceV1Beta1Settings) | create | {
"repo_name": "googleapis/java-webrisk",
"path": "google-cloud-webrisk/src/main/java/com/google/cloud/webrisk/v1beta1/WebRiskServiceV1Beta1Client.java",
"license": "apache-2.0",
"size": 17488
} | [
"com.google.api.core.BetaApi",
"com.google.cloud.webrisk.v1beta1.stub.WebRiskServiceV1Beta1Stub",
"com.google.cloud.webrisk.v1beta1.stub.WebRiskServiceV1Beta1StubSettings",
"java.io.IOException"
] | import com.google.api.core.BetaApi; import com.google.cloud.webrisk.v1beta1.stub.WebRiskServiceV1Beta1Stub; import com.google.cloud.webrisk.v1beta1.stub.WebRiskServiceV1Beta1StubSettings; import java.io.IOException; | import com.google.api.core.*; import com.google.cloud.webrisk.v1beta1.stub.*; import java.io.*; | [
"com.google.api",
"com.google.cloud",
"java.io"
] | com.google.api; com.google.cloud; java.io; | 456,707 |
public void setSslContextParameters(SSLContextParameters sslContextParameters) {
this.sslContextParameters = sslContextParameters;
} | void function(SSLContextParameters sslContextParameters) { this.sslContextParameters = sslContextParameters; } | /**
* To configure security using SSLContextParameters
*/ | To configure security using SSLContextParameters | setSslContextParameters | {
"repo_name": "acartapanis/camel",
"path": "components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java",
"license": "apache-2.0",
"size": 14714
} | [
"org.apache.camel.util.jsse.SSLContextParameters"
] | import org.apache.camel.util.jsse.SSLContextParameters; | import org.apache.camel.util.jsse.*; | [
"org.apache.camel"
] | org.apache.camel; | 734,977 |
private void validatePortAttribute(LogicalPlan dag, String name, int memory)
{
LogicalPlan.InputPortMeta imeta = dag.getOperatorMeta(name).getInputStreams().keySet().iterator().next();
Assert.assertEquals(memory, (int)imeta.getAttributes().get(Context.PortContext.BUFFER_MEMORY_MB));
} | void function(LogicalPlan dag, String name, int memory) { LogicalPlan.InputPortMeta imeta = dag.getOperatorMeta(name).getInputStreams().keySet().iterator().next(); Assert.assertEquals(memory, (int)imeta.getAttributes().get(Context.PortContext.BUFFER_MEMORY_MB)); } | /**
* Validate attribute set on the port of DummyOperator in Level1Module
*/ | Validate attribute set on the port of DummyOperator in Level1Module | validatePortAttribute | {
"repo_name": "apache/incubator-apex-core",
"path": "engine/src/test/java/com/datatorrent/stram/plan/logical/module/TestModuleExpansion.java",
"license": "apache-2.0",
"size": 27162
} | [
"com.datatorrent.api.Context",
"com.datatorrent.stram.plan.logical.LogicalPlan",
"org.junit.Assert"
] | import com.datatorrent.api.Context; import com.datatorrent.stram.plan.logical.LogicalPlan; import org.junit.Assert; | import com.datatorrent.api.*; import com.datatorrent.stram.plan.logical.*; import org.junit.*; | [
"com.datatorrent.api",
"com.datatorrent.stram",
"org.junit"
] | com.datatorrent.api; com.datatorrent.stram; org.junit; | 1,592,125 |
public void av_hex_dump(Pointer f, Pointer<Byte > buf, int size) {
av_hex_dump(Pointer.getPeer(f), Pointer.getPeer(buf), size);
} | void function(Pointer f, Pointer<Byte > buf, int size) { av_hex_dump(Pointer.getPeer(f), Pointer.getPeer(buf), size); } | /**
* Send a nice hexadecimal dump of a buffer to the specified file stream.<br>
* @param f The file stream pointer where the dump should be sent to.<br>
* @param buf buffer<br>
* @param size buffer size<br>
* @see av_hex_dump_log, av_pkt_dump2, av_pkt_dump_log2<br>
* Original signature : ... | Send a nice hexadecimal dump of a buffer to the specified file stream | av_hex_dump | {
"repo_name": "mutars/java_libav",
"path": "wrapper/src/main/java/com/mutar/libav/bridge/avformat/AvformatLibrary.java",
"license": "gpl-2.0",
"size": 136321
} | [
"org.bridj.Pointer"
] | import org.bridj.Pointer; | import org.bridj.*; | [
"org.bridj"
] | org.bridj; | 1,917,337 |
public InternalLogWriter getInternalLogWriter() {
// LOG: used only for sharing between IDS, AdminDSImpl and AgentImpl -- to prevent multiple banners, etc.
synchronized (this) {
return this.logWriter;
}
} | InternalLogWriter function() { synchronized (this) { return this.logWriter; } } | /**
* Returns the <code>LogWriterI18n</code> to be used when administering
* the distributed system. Returns null if nothing has been provided via
* <code>setInternalLogWriter</code>.
*
* @since 4.0
*/ | Returns the <code>LogWriterI18n</code> to be used when administering the distributed system. Returns null if nothing has been provided via <code>setInternalLogWriter</code> | getInternalLogWriter | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java",
"license": "apache-2.0",
"size": 36366
} | [
"com.gemstone.gemfire.internal.logging.InternalLogWriter"
] | import com.gemstone.gemfire.internal.logging.InternalLogWriter; | import com.gemstone.gemfire.internal.logging.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 890,052 |
public DMLSelectStatement select() throws SQLSyntaxErrorException {
return new MySQLDMLSelectParser(lexer, exprParser).select();
} | DMLSelectStatement function() throws SQLSyntaxErrorException { return new MySQLDMLSelectParser(lexer, exprParser).select(); } | /**
* first token is {@link MySQLToken#KW_SELECT SELECT} which has been scanned
* but not yet consumed
*/ | first token is <code>MySQLToken#KW_SELECT SELECT</code> which has been scanned but not yet consumed | select | {
"repo_name": "jushanghui/jsh",
"path": "src/main/parser/com/baidu/hsb/parser/recognizer/mysql/syntax/MySQLDMLParser.java",
"license": "apache-2.0",
"size": 19562
} | [
"com.baidu.hsb.parser.ast.stmt.dml.DMLSelectStatement",
"java.sql.SQLSyntaxErrorException"
] | import com.baidu.hsb.parser.ast.stmt.dml.DMLSelectStatement; import java.sql.SQLSyntaxErrorException; | import com.baidu.hsb.parser.ast.stmt.dml.*; import java.sql.*; | [
"com.baidu.hsb",
"java.sql"
] | com.baidu.hsb; java.sql; | 674,817 |
// START SNIPPET: e2
public String slip(String body, @Headers Map<String, Object> headers, @Header(Exchange.SLIP_ENDPOINT) String previous) {
bodies.add(body);
if (previous != null) {
previouses.add(previous);
}
// get the state from the message headers and keep tra... | String function(String body, @Headers Map<String, Object> headers, @Header(Exchange.SLIP_ENDPOINT) String previous) { bodies.add(body); if (previous != null) { previouses.add(previous); } int invoked = 0; Object current = headers.get(STR); if (current != null) { invoked = Integer.valueOf(current.toString()); } invoked+... | /**
* Use this method to compute dynamic where we should route next.
*
* @param body the message body
* @param headers the message headers where we can store state between invocations
* @param previous the previous slip
* @return endpoints to go, or <tt>null</tt> to indicate the end
*... | Use this method to compute dynamic where we should route next | slip | {
"repo_name": "jonmcewen/camel",
"path": "camel-core/src/test/java/org/apache/camel/processor/DynamicRouterExchangeHeaders2Test.java",
"license": "apache-2.0",
"size": 4629
} | [
"java.util.Map",
"org.apache.camel.Exchange",
"org.apache.camel.Header",
"org.apache.camel.Headers"
] | import java.util.Map; import org.apache.camel.Exchange; import org.apache.camel.Header; import org.apache.camel.Headers; | import java.util.*; import org.apache.camel.*; | [
"java.util",
"org.apache.camel"
] | java.util; org.apache.camel; | 1,166,590 |
public static class OpenURIAction extends WorkbenchWindowActionDelegate {
public void run(IAction action) {
LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(getWindow().getShell());
if (Window.OK == loadResourceDialog.open()) {
for (URI uri : loadRes... | static class OpenURIAction extends WorkbenchWindowActionDelegate { public void function(IAction action) { LoadResourceAction.LoadResourceDialog loadResourceDialog = new LoadResourceAction.LoadResourceDialog(getWindow().getShell()); if (Window.OK == loadResourceDialog.open()) { for (URI uri : loadResourceDialog.getURIs(... | /**
* Opens the editors for the files selected using the LoadResourceDialog.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Opens the editors for the files selected using the LoadResourceDialog. | run | {
"repo_name": "mondo-project/mondo-demo-wt",
"path": "MONDO-Collab/org.mondo.wt.cstudy.metamodel.online.editor/src/WTSpec4M/presentation/WTSpec4MEditorAdvisor.java",
"license": "epl-1.0",
"size": 14965
} | [
"org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate",
"org.eclipse.emf.edit.ui.action.LoadResourceAction",
"org.eclipse.jface.action.IAction",
"org.eclipse.jface.window.Window"
] | import org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate; import org.eclipse.emf.edit.ui.action.LoadResourceAction; import org.eclipse.jface.action.IAction; import org.eclipse.jface.window.Window; | import org.eclipse.emf.common.ui.action.*; import org.eclipse.emf.edit.ui.action.*; import org.eclipse.jface.action.*; import org.eclipse.jface.window.*; | [
"org.eclipse.emf",
"org.eclipse.jface"
] | org.eclipse.emf; org.eclipse.jface; | 1,284,276 |
protected static void generateCode(SafeHtmlBuilder sb, String url, String title){
if(title == null || title.equals("null"))
{
return;
}
if(url.equals("")){
sb.appendHtmlConstant("<div class=\"customClickableTextCell\">");
sb.appendHtmlConstant(title);
sb.appendHtmlConstant("</div>");
}else{
... | static void function(SafeHtmlBuilder sb, String url, String title){ if(title == null title.equals("null")) { return; } if(url.equals(STR<div class=\STR>STR</div>STR<div class=\STR>STR<a href=\"#" + url + "\">STR</a>STR</div>STRclickSTRkeydown"); } | /**
* Generates the code to be included in the cell
* @param sb
* @param url
* @param title
*/ | Generates the code to be included in the cell | generateCode | {
"repo_name": "zlamalp/perun",
"path": "perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/widgets/cells/HyperlinkCell.java",
"license": "bsd-2-clause",
"size": 4252
} | [
"com.google.gwt.safehtml.shared.SafeHtmlBuilder"
] | import com.google.gwt.safehtml.shared.SafeHtmlBuilder; | import com.google.gwt.safehtml.shared.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,595,569 |
public static Format parseAc3AnnexFFormat(ParsableByteArray data, String trackId,
String language, DrmInitData drmInitData) {
int fscod = (data.readUnsignedByte() & 0xC0) >> 6;
int sampleRate = SAMPLE_RATE_BY_FSCOD[fscod];
int nextByte = data.readUnsignedByte();
int channelCount = CHANNEL_COUNT_... | static Format function(ParsableByteArray data, String trackId, String language, DrmInitData drmInitData) { int fscod = (data.readUnsignedByte() & 0xC0) >> 6; int sampleRate = SAMPLE_RATE_BY_FSCOD[fscod]; int nextByte = data.readUnsignedByte(); int channelCount = CHANNEL_COUNT_BY_ACMOD[(nextByte & 0x38) >> 3]; if ((next... | /**
* Returns the AC-3 format given {@code data} containing the AC3SpecificBox according to
* ETSI TS 102 366 Annex F. The reading position of {@code data} will be modified.
*
* @param data The AC3SpecificBox to parse.
* @param trackId The track identifier to set on the format, or null.
* @param langu... | Returns the AC-3 format given data containing the AC3SpecificBox according to ETSI TS 102 366 Annex F. The reading position of data will be modified | parseAc3AnnexFFormat | {
"repo_name": "profosure/porogram",
"path": "TMessagesProj/src/main/java/com/porogram/profosure1/messenger/exoplayer2/audio/Ac3Util.java",
"license": "gpl-2.0",
"size": 10472
} | [
"com.porogram.profosure1.messenger.exoplayer2.Format",
"com.porogram.profosure1.messenger.exoplayer2.drm.DrmInitData",
"com.porogram.profosure1.messenger.exoplayer2.util.MimeTypes",
"com.porogram.profosure1.messenger.exoplayer2.util.ParsableByteArray"
] | import com.porogram.profosure1.messenger.exoplayer2.Format; import com.porogram.profosure1.messenger.exoplayer2.drm.DrmInitData; import com.porogram.profosure1.messenger.exoplayer2.util.MimeTypes; import com.porogram.profosure1.messenger.exoplayer2.util.ParsableByteArray; | import com.porogram.profosure1.messenger.exoplayer2.*; import com.porogram.profosure1.messenger.exoplayer2.drm.*; import com.porogram.profosure1.messenger.exoplayer2.util.*; | [
"com.porogram.profosure1"
] | com.porogram.profosure1; | 425,841 |
private static boolean replaceable(ResourceProperties p)
{
logger.debug("ResourcesAction.replaceable()");
boolean rv = true;
if (p.getPropertyFormatted (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))
{
rv = false;
}
else if (p.getProperty (ResourceProperties.PROP_CONTENT_TY... | static boolean function(ResourceProperties p) { logger.debug(STR); boolean rv = true; if (p.getPropertyFormatted (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString())) { rv = false; } else if (p.getProperty (ResourceProperties.PROP_CONTENT_TYPE).equals (ResourceProperties.TYPE_URL)) { rv = false; } S... | /**
*
* Whether a resource item can be replaced
* @param p The ResourceProperties object for the resource item
* @return true If it can be replaced; false otherwise
*/ | Whether a resource item can be replaced | replaceable | {
"repo_name": "kingmook/sakai",
"path": "content/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesAction.java",
"license": "apache-2.0",
"size": 336184
} | [
"org.sakaiproject.entity.api.ResourceProperties"
] | import org.sakaiproject.entity.api.ResourceProperties; | import org.sakaiproject.entity.api.*; | [
"org.sakaiproject.entity"
] | org.sakaiproject.entity; | 775,051 |
@Override
protected void onReceiveResult(int resultCode, Bundle resultData) {
// Display the address string or an error message sent from the intent service.
mAddressOutput = resultData.getString(Constants.RESULT_DATA_KEY);
displayAddressOutput();
// Sho... | void function(int resultCode, Bundle resultData) { mAddressOutput = resultData.getString(Constants.RESULT_DATA_KEY); displayAddressOutput(); if (resultCode == Constants.SUCCESS_RESULT) { showToast(getString(R.string.address_found)); } mAddressRequested = false; updateUIWidgets(); } } | /**
* Receives data sent from FetchAddressIntentService and updates the UI in MainActivity.
*/ | Receives data sent from FetchAddressIntentService and updates the UI in MainActivity | onReceiveResult | {
"repo_name": "googlesamples/android-play-location",
"path": "LocationAddress/app/src/main/java/com/google/android/gms/location/sample/locationaddress/MainActivity.java",
"license": "apache-2.0",
"size": 16530
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,634,787 |
public static <T> boolean addAll(
Collection<T> addTo, Iterable<? extends T> elementsToAdd) {
if (elementsToAdd instanceof Collection) {
Collection<? extends T> c = Collections2.cast(elementsToAdd);
return addTo.addAll(c);
}
return Iterators.addAll(addTo, checkNotNull(elementsToAdd).iter... | static <T> boolean function( Collection<T> addTo, Iterable<? extends T> elementsToAdd) { if (elementsToAdd instanceof Collection) { Collection<? extends T> c = Collections2.cast(elementsToAdd); return addTo.addAll(c); } return Iterators.addAll(addTo, checkNotNull(elementsToAdd).iterator()); } | /**
* Adds all elements in {@code iterable} to {@code collection}.
*
* @return {@code true} if {@code collection} was modified as a result of this
* operation.
*/ | Adds all elements in iterable to collection | addAll | {
"repo_name": "cogitate/guava-libraries",
"path": "guava/src/com/google/common/collect/Iterables.java",
"license": "apache-2.0",
"size": 38135
} | [
"com.google.common.base.Preconditions",
"java.util.Collection"
] | import com.google.common.base.Preconditions; import java.util.Collection; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,079,119 |
public void execute(Fork fork) {
LOG.info(String.format("Executing fork %d of task %s", fork.getIndex(), fork.getTaskId()));
this.forkExecutor.execute(fork);
}
/**
* Submit a {@link Fork} to run.
*
* @param fork {@link Fork} to be submitted
* @return a {@link java.util.concurrent.Future} for ... | void function(Fork fork) { LOG.info(String.format(STR, fork.getIndex(), fork.getTaskId())); this.forkExecutor.execute(fork); } /** * Submit a {@link Fork} to run. * * @param fork {@link Fork} to be submitted * @return a {@link java.util.concurrent.Future} for the submitted {@link Fork} | /**
* Execute a {@link Fork}.
*
* @param fork {@link Fork} to be executed
*/ | Execute a <code>Fork</code> | execute | {
"repo_name": "lbendig/gobblin",
"path": "gobblin-runtime/src/main/java/gobblin/runtime/TaskExecutor.java",
"license": "apache-2.0",
"size": 8073
} | [
"java.util.concurrent.Future"
] | import java.util.concurrent.Future; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,494,029 |
public QName getElementType() {
if (elementType == null)
elementType = new QName(PartnerlinktypeConstants.NAMESPACE,
PartnerlinktypeConstants.ROLE_ELEMENT_TAG);
return elementType;
}
//
// Reconcile methods: DOM -> Model
//
| QName function() { if (elementType == null) elementType = new QName(PartnerlinktypeConstants.NAMESPACE, PartnerlinktypeConstants.ROLE_ELEMENT_TAG); return elementType; } | /**
* Override the XML element token.
*/ | Override the XML element token | getElementType | {
"repo_name": "chanakaudaya/developer-studio",
"path": "bps/org.eclipse.bpel.model/src/org/eclipse/bpel/model/partnerlinktype/impl/RoleImpl.java",
"license": "apache-2.0",
"size": 9516
} | [
"javax.xml.namespace.QName",
"org.eclipse.bpel.model.partnerlinktype.util.PartnerlinktypeConstants"
] | import javax.xml.namespace.QName; import org.eclipse.bpel.model.partnerlinktype.util.PartnerlinktypeConstants; | import javax.xml.namespace.*; import org.eclipse.bpel.model.partnerlinktype.util.*; | [
"javax.xml",
"org.eclipse.bpel"
] | javax.xml; org.eclipse.bpel; | 287,493 |
@Test
public void testPreUpgrade() {
final ArgumentCaptor<Table> captor = ArgumentCaptor.forClass(Table.class);
upgrader.preUpgrade();
verify(sqlDialect).tableDeploymentStatements(captor.capture());
assertTrue("Temporary table", captor.getValue().isTemporary());
}
| void function() { final ArgumentCaptor<Table> captor = ArgumentCaptor.forClass(Table.class); upgrader.preUpgrade(); verify(sqlDialect).tableDeploymentStatements(captor.capture()); assertTrue(STR, captor.getValue().isTemporary()); } | /**
* Test that the temporary ID table is created during the preUpgrade step.
*/ | Test that the temporary ID table is created during the preUpgrade step | testPreUpgrade | {
"repo_name": "badgerwithagun/morf",
"path": "morf-core/src/test/java/org/alfasoftware/morf/upgrade/TestInlineTableUpgrader.java",
"license": "apache-2.0",
"size": 13751
} | [
"org.alfasoftware.morf.metadata.Table",
"org.junit.Assert",
"org.mockito.ArgumentCaptor",
"org.mockito.Mockito"
] | import org.alfasoftware.morf.metadata.Table; import org.junit.Assert; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; | import org.alfasoftware.morf.metadata.*; import org.junit.*; import org.mockito.*; | [
"org.alfasoftware.morf",
"org.junit",
"org.mockito"
] | org.alfasoftware.morf; org.junit; org.mockito; | 2,319,033 |
public java.lang.String getRecordNumber() {
return msPkRecordTypeId + "-" + SLibUtils.DecimalNumberFormat.format(mnPkNumberId);
} | java.lang.String function() { return msPkRecordTypeId + "-" + SLibUtils.DecimalNumberFormat.format(mnPkNumberId); } | /**
* Composes record number in format tp-000000 (i.e., type-number).
* @return
*/ | Composes record number in format tp-000000 (i.e., type-number) | getRecordNumber | {
"repo_name": "swaplicado/siie32",
"path": "src/erp/mfin/data/SDataRecordEntry.java",
"license": "mit",
"size": 63056
} | [
"sa.lib.SLibUtils"
] | import sa.lib.SLibUtils; | import sa.lib.*; | [
"sa.lib"
] | sa.lib; | 520,232 |
void addBatch(String sql, List<Object> args) throws SQLException {
assert isStream();
streamState.addBatch(sql, args);
} | void addBatch(String sql, List<Object> args) throws SQLException { assert isStream(); streamState.addBatch(sql, args); } | /**
* Add another query for batched execution.
* @param sql Query.
* @param args Arguments.
* @throws SQLException On error.
*/ | Add another query for batched execution | addBatch | {
"repo_name": "alexzaitzev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java",
"license": "apache-2.0",
"size": 32039
} | [
"java.sql.SQLException",
"java.util.List"
] | import java.sql.SQLException; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,123,568 |
int flush(Buffer buffer) throws IOException; | int flush(Buffer buffer) throws IOException; | /**
* Flush the buffer from the current getIndex to it's putIndex using whatever byte
* sink is backing the buffer. The getIndex is updated with the number of bytes flushed.
* Any mark set is cleared.
* If the entire contents of the buffer are flushed, then an implicit empty() is done.
*
*... | Flush the buffer from the current getIndex to it's putIndex using whatever byte sink is backing the buffer. The getIndex is updated with the number of bytes flushed. Any mark set is cleared. If the entire contents of the buffer are flushed, then an implicit empty() is done | flush | {
"repo_name": "geekboxzone/mmallow_external_jetty",
"path": "src/java/org/eclipse/jetty/io/EndPoint.java",
"license": "apache-2.0",
"size": 7116
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,484,904 |
public static BigDecimal computeAmount(BigDecimal quantity, BigDecimal price) {
BigDecimal amount =
quantity
.multiply(price)
.setScale(AppBaseService.DEFAULT_NB_DECIMAL_DIGITS, RoundingMode.HALF_EVEN);
LOG.debug(
"Calcul du montant HT avec une quantité de {} pour {} ... | static BigDecimal function(BigDecimal quantity, BigDecimal price) { BigDecimal amount = quantity .multiply(price) .setScale(AppBaseService.DEFAULT_NB_DECIMAL_DIGITS, RoundingMode.HALF_EVEN); LOG.debug( STR, new Object[] {quantity, price, amount}); return amount; } | /**
* Compute the quantity per the unit price
*
* @param quantity
* @param price The unit price.
* @return The Excluded tax total amount.
*/ | Compute the quantity per the unit price | computeAmount | {
"repo_name": "ama-axelor/axelor-business-suite",
"path": "axelor-account/src/main/java/com/axelor/apps/account/service/invoice/generator/line/InvoiceLineManagement.java",
"license": "agpl-3.0",
"size": 2369
} | [
"com.axelor.apps.base.service.app.AppBaseService",
"java.math.BigDecimal",
"java.math.RoundingMode"
] | import com.axelor.apps.base.service.app.AppBaseService; import java.math.BigDecimal; import java.math.RoundingMode; | import com.axelor.apps.base.service.app.*; import java.math.*; | [
"com.axelor.apps",
"java.math"
] | com.axelor.apps; java.math; | 768,563 |
public View getContent() {
return mViewAbove.getContent();
} | View function() { return mViewAbove.getContent(); } | /**
* Retrieves the current content.
* @return the current content
*/ | Retrieves the current content | getContent | {
"repo_name": "DigDream/Ta-s-book-Android",
"path": "library-slidingmenu/src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java",
"license": "gpl-2.0",
"size": 29409
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,327,863 |
List<Long> getLdapExperimenters(); | List<Long> getLdapExperimenters(); | /**
* Gets the experimenters who have the <code>ldap</code> attribute enabled.
* @return a list of user IDs.
*/ | Gets the experimenters who have the <code>ldap</code> attribute enabled | getLdapExperimenters | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/model/src/ome/util/SqlAction.java",
"license": "gpl-2.0",
"size": 43659
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,721,502 |
public static void writePrimitiveByte(byte value, DataOutput out) throws IOException {
InternalDataSerializer.checkOut(out);
if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
logger.trace(LogMarker.SERIALIZER, "Writing Byte {}", value);
}
out.writeByte(value);
} | static void function(byte value, DataOutput out) throws IOException { InternalDataSerializer.checkOut(out); if (logger.isTraceEnabled(LogMarker.SERIALIZER)) { logger.trace(LogMarker.SERIALIZER, STR, value); } out.writeByte(value); } | /**
* Writes a primitive <code>byte</code> to a <code>DataOutput</code>.
*
* @throws IOException A problem occurs while writing to <code>out</code>
*
* @see DataOutput#writeByte
* @since GemFire 5.1
*/ | Writes a primitive <code>byte</code> to a <code>DataOutput</code> | writePrimitiveByte | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/DataSerializer.java",
"license": "apache-2.0",
"size": 106864
} | [
"java.io.DataOutput",
"java.io.IOException",
"org.apache.geode.internal.InternalDataSerializer",
"org.apache.geode.internal.logging.log4j.LogMarker"
] | import java.io.DataOutput; import java.io.IOException; import org.apache.geode.internal.InternalDataSerializer; import org.apache.geode.internal.logging.log4j.LogMarker; | import java.io.*; import org.apache.geode.internal.*; import org.apache.geode.internal.logging.log4j.*; | [
"java.io",
"org.apache.geode"
] | java.io; org.apache.geode; | 77,009 |
@Test
public void testIdentify() {
final List<IdentifiedLanguage> identifiedLanguages = service.identify(texts.get(0)).execute();
assertNotNull(identifiedLanguages);
assertFalse(identifiedLanguages.isEmpty());
} | void function() { final List<IdentifiedLanguage> identifiedLanguages = service.identify(texts.get(0)).execute(); assertNotNull(identifiedLanguages); assertFalse(identifiedLanguages.isEmpty()); } | /**
* Test Identify.
*/ | Test Identify | testIdentify | {
"repo_name": "m2fd/java-sdk",
"path": "src/test/java/com/ibm/watson/developer_cloud/language_translator/v2/LanguageTranslatorIT.java",
"license": "apache-2.0",
"size": 5978
} | [
"com.ibm.watson.developer_cloud.language_translator.v2.model.IdentifiedLanguage",
"java.util.List",
"org.junit.Assert"
] | import com.ibm.watson.developer_cloud.language_translator.v2.model.IdentifiedLanguage; import java.util.List; import org.junit.Assert; | import com.ibm.watson.developer_cloud.language_translator.v2.model.*; import java.util.*; import org.junit.*; | [
"com.ibm.watson",
"java.util",
"org.junit"
] | com.ibm.watson; java.util; org.junit; | 1,295,512 |
private static Analytics initializeAnalytics() throws Exception {
// Authorization.
Credential credential = authorize();
// Set up and return Google Analytics API client.
return new Analytics.Builder(httpTransport, JSON_FACTORY, credential).setApplicationName(
APPLICATION_NAME).build();
} | static Analytics function() throws Exception { Credential credential = authorize(); return new Analytics.Builder(httpTransport, JSON_FACTORY, credential).setApplicationName( APPLICATION_NAME).build(); } | /**
* Performs all necessary setup steps for running requests against the API.
*
* @return An initialized Analytics service object.
*
* @throws Exception if an issue occurs with OAuth2Native authorize.
*/ | Performs all necessary setup steps for running requests against the API | initializeAnalytics | {
"repo_name": "KarolIvette/JAVA-PROGRAMAS-3",
"path": "google-api-java-client-samples-master/analytics-cmdline-sample/src/main/java/com/google/api/services/samples/analytics/cmdline/HelloAnalyticsApiSample.java",
"license": "agpl-3.0",
"size": 9820
} | [
"com.google.api.client.auth.oauth2.Credential",
"com.google.api.services.analytics.Analytics"
] | import com.google.api.client.auth.oauth2.Credential; import com.google.api.services.analytics.Analytics; | import com.google.api.client.auth.oauth2.*; import com.google.api.services.analytics.*; | [
"com.google.api"
] | com.google.api; | 783,186 |
public String[] getFileTimestamps() {
return DistributedCache.getFileTimestamps(conf);
} | String[] function() { return DistributedCache.getFileTimestamps(conf); } | /**
* Get the timestamps of the files. Used by internal
* DistributedCache and MapReduce code.
* @return a string array of timestamps
* @throws IOException
*/ | Get the timestamps of the files. Used by internal DistributedCache and MapReduce code | getFileTimestamps | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/JobContextImpl.java",
"license": "apache-2.0",
"size": 12427
} | [
"org.apache.hadoop.mapreduce.filecache.DistributedCache"
] | import org.apache.hadoop.mapreduce.filecache.DistributedCache; | import org.apache.hadoop.mapreduce.filecache.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,570,119 |
UserPO findByUserID(long userId); | UserPO findByUserID(long userId); | /**
* This method with search for a user by his userId in the database. The
* search performed is a case insensitive search to allow case mismatch
* situations.
* @param userId;
* - User ID to search for.
*/ | This method with search for a user by his userId in the database. The search performed is a case insensitive search to allow case mismatch situations | findByUserID | {
"repo_name": "nihao0818/fse-F14-SA3-SSNoC-Java-REST",
"path": "src/main/java/edu/cmu/sv/ws/ssnoc/data/dao/IUserDAO.java",
"license": "apache-2.0",
"size": 3312
} | [
"edu.cmu.sv.ws.ssnoc.data.po.UserPO"
] | import edu.cmu.sv.ws.ssnoc.data.po.UserPO; | import edu.cmu.sv.ws.ssnoc.data.po.*; | [
"edu.cmu.sv"
] | edu.cmu.sv; | 2,188,171 |
private static PdfFileSpecification fileEmbedded(final PdfWriter writer, final String filePath, final String fileDisplay, final byte fileStore[], final String mimeType, final PdfDictionary fileParameter, final int compressionLevel) throws IOException {
final PdfFileSpecification fs = new PdfFileSpecificatio... | static PdfFileSpecification function(final PdfWriter writer, final String filePath, final String fileDisplay, final byte fileStore[], final String mimeType, final PdfDictionary fileParameter, final int compressionLevel) throws IOException { final PdfFileSpecification fs = new PdfFileSpecification(); fs.writer = writer;... | /**
* Creates a file specification with the file embedded. The file may
* come from the file system or from a byte array.
* @param writer the <CODE>PdfWriter</CODE>
* @param filePath the file path
* @param fileDisplay the file information that is presented to the user
* @param fileStore th... | Creates a file specification with the file embedded. The file may come from the file system or from a byte array | fileEmbedded | {
"repo_name": "venanciolm/afirma-ui-miniapplet_x_x",
"path": "afirma_ui_miniapplet/src/main/java/com/lowagie/text/pdf/PdfFileSpecification.java",
"license": "mit",
"size": 10842
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,737,618 |
@Override
public String getUniqueUserId(String userSecurityName) throws CustomRegistryException, EntryNotFoundException {
String s, uniqueUsrId = null;
BufferedReader in = null;
try {
in = fileOpen(USERFILENAME);
while ((s = in.readLine()) != null) {
... | String function(String userSecurityName) throws CustomRegistryException, EntryNotFoundException { String s, uniqueUsrId = null; BufferedReader in = null; try { in = fileOpen(USERFILENAME); while ((s = in.readLine()) != null) { if (!(s.startsWith("#") s.trim().length() <= 0)) { int index = s.indexOf(":"); int index1 = s... | /**
* Returns the unique ID for a userSecurityName. This method is called
* when creating a credential for a user.
*
* @param userSecurityName - The name of the user.
* @return The unique ID of the user. The unique ID for a user
* is the stringified form of some unique, registry-sp... | Returns the unique ID for a userSecurityName. This method is called when creating a credential for a user | getUniqueUserId | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.registry_test.custom/src/com/ibm/ws/security/registry/custom/sample/FileRegistrySample.java",
"license": "epl-1.0",
"size": 41525
} | [
"com.ibm.websphere.security.CustomRegistryException",
"com.ibm.websphere.security.EntryNotFoundException",
"java.io.BufferedReader"
] | import com.ibm.websphere.security.CustomRegistryException; import com.ibm.websphere.security.EntryNotFoundException; import java.io.BufferedReader; | import com.ibm.websphere.security.*; import java.io.*; | [
"com.ibm.websphere",
"java.io"
] | com.ibm.websphere; java.io; | 764,815 |
public static void forceSaveWorld() {
MinecraftServer server = MinecraftServer.getServer();
if (server.getConfigurationManager() != null) {
server.getConfigurationManager().saveAllPlayerData();
}
try {
boolean flag;
for (WorldServer worldServer ... | static void function() { MinecraftServer server = MinecraftServer.getServer(); if (server.getConfigurationManager() != null) { server.getConfigurationManager().saveAllPlayerData(); } try { boolean flag; for (WorldServer worldServer : server.worldServers) { if (worldServer != null) { flag = worldServer.levelSaving; worl... | /**
* Force save all worlds
*/ | Force save all worlds | forceSaveWorld | {
"repo_name": "ray73864/ServerTools",
"path": "backup/src/main/java/com/matthewprenger/servertools/backup/BackupHandler.java",
"license": "apache-2.0",
"size": 11153
} | [
"java.io.FilenameFilter",
"net.minecraft.server.MinecraftServer",
"net.minecraft.util.ChatComponentTranslation",
"net.minecraft.util.EnumChatFormatting",
"net.minecraft.world.MinecraftException",
"net.minecraft.world.WorldServer"
] | import java.io.FilenameFilter; import net.minecraft.server.MinecraftServer; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.MinecraftException; import net.minecraft.world.WorldServer; | import java.io.*; import net.minecraft.server.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"java.io",
"net.minecraft.server",
"net.minecraft.util",
"net.minecraft.world"
] | java.io; net.minecraft.server; net.minecraft.util; net.minecraft.world; | 535,434 |
private void validateNamespaceCreateRequest(NamespaceCreateRequest request)
{
request.setNamespaceCode(alternateKeyHelper.validateStringParameter("namespace", request.getNamespaceCode()));
} | void function(NamespaceCreateRequest request) { request.setNamespaceCode(alternateKeyHelper.validateStringParameter(STR, request.getNamespaceCode())); } | /**
* Validates the namespace create request. This method also trims request parameters.
*
* @param request the request
*
* @throws IllegalArgumentException if any validation errors were found
*/ | Validates the namespace create request. This method also trims request parameters | validateNamespaceCreateRequest | {
"repo_name": "FINRAOS/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/NamespaceServiceImpl.java",
"license": "apache-2.0",
"size": 5674
} | [
"org.finra.herd.model.api.xml.NamespaceCreateRequest"
] | import org.finra.herd.model.api.xml.NamespaceCreateRequest; | import org.finra.herd.model.api.xml.*; | [
"org.finra.herd"
] | org.finra.herd; | 1,354,434 |
public static BufferedImage getIceBlock() {
return iceBlock;
} | static BufferedImage function() { return iceBlock; } | /**
* Devuelve el sprite del bloque de hielo. <br>
*
* @return Sprite del bloque de hielo. <br>
*/ | Devuelve el sprite del bloque de hielo. | getIceBlock | {
"repo_name": "JavaATR/jrpg-2017b-cliente",
"path": "src/main/resources/recursos/Recursos.java",
"license": "mit",
"size": 38422
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,158,715 |
ProjectProvider getProjectProvider(); | ProjectProvider getProjectProvider(); | /**
* Return the {@link ProjectProvider} being used in the current {@link Project}.
*/ | Return the <code>ProjectProvider</code> being used in the current <code>Project</code> | getProjectProvider | {
"repo_name": "stalep/forge-core",
"path": "projects/api/src/main/java/org/jboss/forge/addon/projects/facets/MetadataFacet.java",
"license": "epl-1.0",
"size": 3915
} | [
"org.jboss.forge.addon.projects.ProjectProvider"
] | import org.jboss.forge.addon.projects.ProjectProvider; | import org.jboss.forge.addon.projects.*; | [
"org.jboss.forge"
] | org.jboss.forge; | 637,646 |
public void onClickSignIn(View view) {
TextView emailAddressTV = (TextView) view.getRootView().findViewById(id.email_address_tv);
// Check to see how many Google accounts are registered with the device.
int googleAccounts = AppConstants.countGoogleAccounts(this);
if (googleAccounts == 0) {
// No... | void function(View view) { TextView emailAddressTV = (TextView) view.getRootView().findViewById(id.email_address_tv); int googleAccounts = AppConstants.countGoogleAccounts(this); if (googleAccounts == 0) { Toast.makeText(this, R.string.toast_no_google_accounts_registered, Toast.LENGTH_LONG).show(); } else if (googleAcc... | /**
* This method is invoked when the "Sign In" button is clicked. See activity_main.xml for the
* dynamic reference to this method.
*/ | This method is invoked when the "Sign In" button is clicked. See activity_main.xml for the dynamic reference to this method | onClickSignIn | {
"repo_name": "googlearchive/appengine-endpoints-helloendpoints-android",
"path": "HelloEndpointsProject/HelloEndpoints/src/main/java/com/google/devrel/samples/helloendpoints/MainActivity.java",
"license": "apache-2.0",
"size": 20092
} | [
"android.accounts.Account",
"android.accounts.AccountManager",
"android.view.View",
"android.widget.TextView",
"android.widget.Toast",
"com.google.android.gms.auth.GoogleAuthUtil"
] | import android.accounts.Account; import android.accounts.AccountManager; import android.view.View; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.auth.GoogleAuthUtil; | import android.accounts.*; import android.view.*; import android.widget.*; import com.google.android.gms.auth.*; | [
"android.accounts",
"android.view",
"android.widget",
"com.google.android"
] | android.accounts; android.view; android.widget; com.google.android; | 2,793,633 |
private boolean checkTransactionHealth(final JournalFile currentFile,
final JournalTransaction journalTransaction,
final List<JournalFile> orderedFiles,
final int numberOfRecords) {
ret... | boolean function(final JournalFile currentFile, final JournalTransaction journalTransaction, final List<JournalFile> orderedFiles, final int numberOfRecords) { return journalTransaction.getCounter(currentFile) == numberOfRecords; } | /**
* <br>
* Checks for holes on the transaction (a commit written but with an incomplete transaction).
* <br>
* This method will validate if the transaction (PREPARE/COMMIT) is complete as stated on the
* COMMIT-RECORD.
* <br>
* For details see {@link JournalCompleteRecordTX} about how the ... | Checks for holes on the transaction (a commit written but with an incomplete transaction). This method will validate if the transaction (PREPARE/COMMIT) is complete as stated on the COMMIT-RECORD. For details see <code>JournalCompleteRecordTX</code> about how the transaction-summary is recorded | checkTransactionHealth | {
"repo_name": "pgfox/activemq-artemis",
"path": "artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalImpl.java",
"license": "apache-2.0",
"size": 104245
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,938,896 |
public static Root asDerivedRoot(Path execRoot, Path root) {
return Root.asDerivedRoot(execRoot, root, true);
} | static Root function(Path execRoot, Path root) { return Root.asDerivedRoot(execRoot, root, true); } | /**
* testonly until {@link #asDerivedRoot(Path, Path, boolean)} is deleted.
*/ | testonly until <code>#asDerivedRoot(Path, Path, boolean)</code> is deleted | asDerivedRoot | {
"repo_name": "spxtr/bazel",
"path": "src/main/java/com/google/devtools/build/lib/actions/Root.java",
"license": "apache-2.0",
"size": 8385
} | [
"com.google.devtools.build.lib.vfs.Path"
] | import com.google.devtools.build.lib.vfs.Path; | import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 490,273 |
public static List<String> influentFromNativeIds(char idClass, String idType, final Collection<String> nativeIds) {
final List<String> list = new ArrayList<String>(nativeIds.size());
for (String s : nativeIds) {
list.add(fromNativeId(idClass, idType, s).influentId);
}
return list;
} | static List<String> function(char idClass, String idType, final Collection<String> nativeIds) { final List<String> list = new ArrayList<String>(nativeIds.size()); for (String s : nativeIds) { list.add(fromNativeId(idClass, idType, s).influentId); } return list; } | /**
* Converts a list of native ids to influent ids, returning a new list.
*/ | Converts a list of native ids to influent ids, returning a new list | influentFromNativeIds | {
"repo_name": "MjAbuz/influent",
"path": "influent-server/src/main/java/influent/server/utilities/InfluentId.java",
"license": "mit",
"size": 8779
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,315,299 |
static boolean isEnChar( int c )
{
return ( ENSCFilter.isHWEnChar(c) || ENSCFilter.isFWEnChar(c) );
}
| static boolean isEnChar( int c ) { return ( ENSCFilter.isHWEnChar(c) ENSCFilter.isFWEnChar(c) ); } | /**
* check the specified char is a basic latin and russia and
* greece letter true will be return if it is or return false.
*
* this method can recognize full-width char and letter.
*
* @param c
* @return boolean
*/ | check the specified char is a basic latin and russia and greece letter true will be return if it is or return false. this method can recognize full-width char and letter | isEnChar | {
"repo_name": "c9n/jcseg",
"path": "jcseg-core/src/main/java/org/lionsoul/jcseg/ASegment.java",
"license": "apache-2.0",
"size": 40560
} | [
"org.lionsoul.jcseg.filter.ENSCFilter"
] | import org.lionsoul.jcseg.filter.ENSCFilter; | import org.lionsoul.jcseg.filter.*; | [
"org.lionsoul.jcseg"
] | org.lionsoul.jcseg; | 2,717,690 |
Observable<ServiceResponse<Page<DataLakeAnalyticsAccountBasic>>> listWithServiceResponseAsync();
PagedList<DataLakeAnalyticsAccountBasic> list(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count); | Observable<ServiceResponse<Page<DataLakeAnalyticsAccountBasic>>> listWithServiceResponseAsync(); PagedList<DataLakeAnalyticsAccountBasic> list(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count); | /**
* Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any.
*
* @param filter OData filter. Optional.
* @param top The number of items to return. Optional.
* @param skip The number of items to skip over befor... | Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any | list | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/Accounts.java",
"license": "mit",
"size": 49196
} | [
"com.microsoft.azure.Page",
"com.microsoft.azure.PagedList",
"com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountBasic",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.datalake.analytics.models.DataLakeAnalyticsAccountBasic; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 307,790 |
protected HttpServletRequest checkMultipart(HttpServletRequest request) throws MultipartException {
if (this.multipartResolver != null && this.multipartResolver.isMultipart(request)) {
if (WebUtils.getNativeRequest(request, MultipartHttpServletRequest.class) != null) {
logger.debug("Request is already a Mul... | HttpServletRequest function(HttpServletRequest request) throws MultipartException { if (this.multipartResolver != null && this.multipartResolver.isMultipart(request)) { if (WebUtils.getNativeRequest(request, MultipartHttpServletRequest.class) != null) { logger.debug(STR + STR); } else if (request.getAttribute(WebUtils.... | /**
* Convert the request into a multipart request, and make multipart resolver available.
* <p>If no multipart resolver is set, simply use the existing request.
* @param request current HTTP request
* @return the processed request (multipart wrapper if necessary)
* @see MultipartResolver#resolveMultipart
*... | Convert the request into a multipart request, and make multipart resolver available. If no multipart resolver is set, simply use the existing request | checkMultipart | {
"repo_name": "qobel/esoguproject",
"path": "spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/DispatcherServlet.java",
"license": "apache-2.0",
"size": 56975
} | [
"javax.servlet.http.HttpServletRequest",
"org.springframework.web.multipart.MultipartException",
"org.springframework.web.multipart.MultipartHttpServletRequest",
"org.springframework.web.util.WebUtils"
] | import javax.servlet.http.HttpServletRequest; import org.springframework.web.multipart.MultipartException; import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.util.WebUtils; | import javax.servlet.http.*; import org.springframework.web.multipart.*; import org.springframework.web.util.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 1,520,921 |
@Test
public void getColumnValueInvalidDate() {
try {
IJsonColumnValue jsonColumnValue = new DateJsonColumnValue(NAME, TYPE, INVALID_VALUE);
jsonColumnValue.getColumnValue();
fail("invalid Date value did not throw exception");
} catch (RuntimeException e) {
// test for message from p... | void function() { try { IJsonColumnValue jsonColumnValue = new DateJsonColumnValue(NAME, TYPE, INVALID_VALUE); jsonColumnValue.getColumnValue(); fail(STR); } catch (RuntimeException e) { String message = e.getMessage(); assertTrue(STR + message, message.contains(STR)); } } | /**
* Test getColumnValue() method with invalid Date value.
*/ | Test getColumnValue() method with invalid Date value | getColumnValueInvalidDate | {
"repo_name": "Poesys-Associates/poesys-db",
"path": "poesys-db/test/com/poesys/db/col/json/DateJsonColumnValueTest.java",
"license": "lgpl-3.0",
"size": 2977
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 393,705 |
@Override
public boolean intersects(BoundingBox bounds) {
ensureCompatibleReferenceSystem(bounds);
if (isNull() || bounds.isEmpty()) {
return false;
}
return !(bounds.getMinX() > this.getMaxX()
|| bounds.getMaxX() < this.getMinX()
|| b... | boolean function(BoundingBox bounds) { ensureCompatibleReferenceSystem(bounds); if (isNull() bounds.isEmpty()) { return false; } return !(bounds.getMinX() > this.getMaxX() bounds.getMaxX() < this.getMinX() bounds.getMinY() > this.getMaxY() bounds.getMaxY() < this.getMinY()); } | /**
* Returns {@code true} if the interior of this bounds intersects the interior of the provided
* bounds.
*
* <p>Note this method conflicts with {@link Rectangle2D#intersects(Rectangle2D)} so you may
* need to call it via envelope2d.intersects( (Envelope2D) bounds ) in order to correctly chec... | Returns true if the interior of this bounds intersects the interior of the provided bounds. Note this method conflicts with <code>Rectangle2D#intersects(Rectangle2D)</code> so you may need to call it via envelope2d.intersects( (Envelope2D) bounds ) in order to correctly check that the coordinate reference systems match | intersects | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/geometry/Envelope2D.java",
"license": "lgpl-2.1",
"size": 20926
} | [
"org.opengis.geometry.BoundingBox"
] | import org.opengis.geometry.BoundingBox; | import org.opengis.geometry.*; | [
"org.opengis.geometry"
] | org.opengis.geometry; | 2,106,065 |
public final Property<OutputsResolution> outputs() {
return metaBean().outputs().createProperty(this);
} | final Property<OutputsResolution> function() { return metaBean().outputs().createProperty(this); } | /**
* Gets the the {@code outputs} property.
* @return the property, not null
*/ | Gets the the outputs property | outputs | {
"repo_name": "McLeodMoores/starling",
"path": "projects/engine/src/main/java/com/opengamma/engine/function/dsl/FunctionSignatureResolution.java",
"license": "apache-2.0",
"size": 8029
} | [
"org.joda.beans.Property"
] | import org.joda.beans.Property; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,057,434 |
@Override
public void close() throws IOException {
if(isOpened != true) {
throw new IOException("The byte stream has been already closed !");
}
if(isBlocking == true) {
scm.unblockBlockingIOOperation(context);
// if there was a blocked read operation, ... | void function() throws IOException { if(isOpened != true) { throw new IOException(STR); } if(isBlocking == true) { scm.unblockBlockingIOOperation(context); synchronized(lock) { scm.destroyBlockingIOContext(context); } } isOpened = false; portHandleInfo.setSerialComInByteStream(null); } | /**
* <p>This method releases the InputStream object associated with the operating handle.</p>
* <p>To actually close the port closeComPort() method should be used.</p>
*
* @throws IOException if an I/O error occurs or if stream has been closed already.
*/ | This method releases the InputStream object associated with the operating handle. To actually close the port closeComPort() method should be used | close | {
"repo_name": "RishiGupta12/SerialPundit",
"path": "modules/serial/src/com/serialpundit/serial/SerialComInByteStream.java",
"license": "agpl-3.0",
"size": 13605
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,519,028 |
public Socket createSocket(String host, int port)
throws IOException, UnknownHostException {
SSLSocket sslSocket = (SSLSocket) getFactory()
.createSocket(new TdsTlsSocket(socket), host, port, true);
//
// See if connecting to local server.
... | Socket function(String host, int port) throws IOException, UnknownHostException { SSLSocket sslSocket = (SSLSocket) getFactory() .createSocket(new TdsTlsSocket(socket), host, port, true); sslSocket.startHandshake(); sslSocket.getSession().invalidate(); return sslSocket; } | /**
* Create the SSL socket.
* <p/>
* NB. This method will actually create a connected socket over the
* TCP/IP network socket supplied via the constructor of this factory
* class.
*/ | Create the SSL socket. NB. This method will actually create a connected socket over the TCP/IP network socket supplied via the constructor of this factory class | createSocket | {
"repo_name": "TRITON-DLP/jtds-patch",
"path": "src/main/net/sourceforge/jtds/ssl/SocketFactories.java",
"license": "gpl-2.0",
"size": 7285
} | [
"java.io.IOException",
"java.net.Socket",
"java.net.UnknownHostException",
"javax.net.ssl.SSLSocket"
] | import java.io.IOException; import java.net.Socket; import java.net.UnknownHostException; import javax.net.ssl.SSLSocket; | import java.io.*; import java.net.*; import javax.net.ssl.*; | [
"java.io",
"java.net",
"javax.net"
] | java.io; java.net; javax.net; | 2,329,121 |
@Test
public void testGetFilterType() {
System.out.println("getFilterType");
FileFilterExcludeRegularExpressionFilenameFilter instance = new FileFilterExcludeRegularExpressionFilenameFilter(".*foo", true);
String expResult = QVCSConstants.EXCLUDE_REG_EXP_FILENAME_FILTER;
String r... | void function() { System.out.println(STR); FileFilterExcludeRegularExpressionFilenameFilter instance = new FileFilterExcludeRegularExpressionFilenameFilter(".*foo", true); String expResult = QVCSConstants.EXCLUDE_REG_EXP_FILENAME_FILTER; String result = instance.getFilterType(); assertEquals(expResult, result); } | /**
* Test of getFilterType method, of class FileFilterExcludeRegularExpressionFilenameFilter.
*/ | Test of getFilterType method, of class FileFilterExcludeRegularExpressionFilenameFilter | testGetFilterType | {
"repo_name": "jimv39/qvcsos",
"path": "qvcse-gui/src/test/java/com/qumasoft/guitools/qwin/filefilter/FileFilterExcludeRegularExpressionFilenameFilterTest.java",
"license": "apache-2.0",
"size": 5773
} | [
"com.qumasoft.qvcslib.QVCSConstants",
"org.junit.Assert"
] | import com.qumasoft.qvcslib.QVCSConstants; import org.junit.Assert; | import com.qumasoft.qvcslib.*; import org.junit.*; | [
"com.qumasoft.qvcslib",
"org.junit"
] | com.qumasoft.qvcslib; org.junit; | 1,818,452 |
static RetryRule onStatusClass(Iterable<HttpStatusClass> statusClasses) {
return builder().onStatusClass(statusClasses).thenBackoff();
}
/**
* Returns a newly created {@link RetryRule} that will retry with the
* {@linkplain Backoff#ofDefault() default backoff} | static RetryRule onStatusClass(Iterable<HttpStatusClass> statusClasses) { return builder().onStatusClass(statusClasses).thenBackoff(); } /** * Returns a newly created {@link RetryRule} that will retry with the * {@linkplain Backoff#ofDefault() default backoff} | /**
* Returns a newly created {@link RetryRule} that will retry with
* the {@linkplain Backoff#ofDefault() default backoff} if the class of the response status is
* one of the specified {@link HttpStatusClass}es.
*/ | Returns a newly created <code>RetryRule</code> that will retry with the Backoff#ofDefault() default backoff if the class of the response status is one of the specified <code>HttpStatusClass</code>es | onStatusClass | {
"repo_name": "minwoox/armeria",
"path": "core/src/main/java/com/linecorp/armeria/client/retry/RetryRule.java",
"license": "apache-2.0",
"size": 11880
} | [
"com.linecorp.armeria.common.HttpStatusClass"
] | import com.linecorp.armeria.common.HttpStatusClass; | import com.linecorp.armeria.common.*; | [
"com.linecorp.armeria"
] | com.linecorp.armeria; | 278,057 |
@javax.annotation.Nullable
@ApiModelProperty(
value =
"Solvers is a list of challenge solvers that will be used to solve ACME challenges for the matching domains. Solver configurations must be provided in order to obtain certificates from an ACME server. For more information, see: https://cert-manag... | @javax.annotation.Nullable @ApiModelProperty( value = "Solvers is a list of challenge solvers that will be used to solve ACME challenges for the matching domains. Solver configurations must be provided in order to obtain certificates from an ACME server. For more information, see: https: List<V1beta1IssuerSpecAcmeSolve... | /**
* Solvers is a list of challenge solvers that will be used to solve ACME challenges for the
* matching domains. Solver configurations must be provided in order to obtain certificates from
* an ACME server. For more information, see: https://cert-manager.io/docs/configuration/acme/
*
* @return solvers... | Solvers is a list of challenge solvers that will be used to solve ACME challenges for the matching domains. Solver configurations must be provided in order to obtain certificates from an ACME server. For more information, see: HREF | getSolvers | {
"repo_name": "kubernetes-client/java",
"path": "client-java-contrib/cert-manager/src/main/java/io/cert/manager/models/V1beta1IssuerSpecAcme.java",
"license": "apache-2.0",
"size": 9905
} | [
"io.swagger.annotations.ApiModelProperty",
"java.util.List"
] | import io.swagger.annotations.ApiModelProperty; import java.util.List; | import io.swagger.annotations.*; import java.util.*; | [
"io.swagger.annotations",
"java.util"
] | io.swagger.annotations; java.util; | 1,054,352 |
private static long calculateExponentialTime(long time, int retries,
long cap) {
long baseTime = Math.min(time * (1L << retries), cap);
return (long) (baseTime * (ThreadLocalRandom.current().nextDouble() + 0.5));
} | static long function(long time, int retries, long cap) { long baseTime = Math.min(time * (1L << retries), cap); return (long) (baseTime * (ThreadLocalRandom.current().nextDouble() + 0.5)); } | /**
* Return a value which is <code>time</code> increasing exponentially as a
* function of <code>retries</code>, +/- 0%-50% of that value, chosen
* randomly.
*
* @param time the base amount of time to work with
* @param retries the number of retries that have so occurred so far
* @param cap value... | Return a value which is <code>time</code> increasing exponentially as a function of <code>retries</code>, +/- 0%-50% of that value, chosen randomly | calculateExponentialTime | {
"repo_name": "ronny-macmaster/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryPolicies.java",
"license": "apache-2.0",
"size": 25742
} | [
"java.util.concurrent.ThreadLocalRandom"
] | import java.util.concurrent.ThreadLocalRandom; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,892,822 |
public HttpClientWrapper duplicate() {
final HttpClientWrapper ret = HttpClientWrapper.create();
ret.m_cookieStore = m_cookieStore;
ret.m_reuseConnections = m_reuseConnections;
ret.m_usePreemptiveAuth = m_usePreemptiveAuth;
ret.m_useSystemProxySettings = m_useSystemProxySetti... | HttpClientWrapper function() { final HttpClientWrapper ret = HttpClientWrapper.create(); ret.m_cookieStore = m_cookieStore; ret.m_reuseConnections = m_reuseConnections; ret.m_usePreemptiveAuth = m_usePreemptiveAuth; ret.m_useSystemProxySettings = m_useSystemProxySettings; ret.m_cookieSpec = m_cookieSpec; ret.m_username... | /**
* Create a duplicate HttpClientWrapper from this wrapper.
* All settings are preserved, and the session/cookie store is
* shared between duplicate wrappers and their parent.
*/ | Create a duplicate HttpClientWrapper from this wrapper. All settings are preserved, and the session/cookie store is shared between duplicate wrappers and their parent | duplicate | {
"repo_name": "roskens/opennms-pre-github",
"path": "core/web/src/main/java/org/opennms/core/web/HttpClientWrapper.java",
"license": "agpl-3.0",
"size": 19836
} | [
"java.util.Map",
"javax.net.ssl.SSLContext",
"org.apache.http.HttpRequestInterceptor",
"org.apache.http.HttpResponseInterceptor"
] | import java.util.Map; import javax.net.ssl.SSLContext; import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpResponseInterceptor; | import java.util.*; import javax.net.ssl.*; import org.apache.http.*; | [
"java.util",
"javax.net",
"org.apache.http"
] | java.util; javax.net; org.apache.http; | 2,068,994 |
protected void runSQL(String sql) throws SystemException {
try {
DataSource dataSource = hostPersistence.getDataSource();
SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
sql, new int[0]);
sqlUpdate.update();
}
catch (Exception e) {
throw new SystemException(e);
}
}
@... | void function(String sql) throws SystemException { try { DataSource dataSource = hostPersistence.getDataSource(); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql, new int[0]); sqlUpdate.update(); } catch (Exception e) { throw new SystemException(e); } } @BeanReference(type = CourseLocalService.c... | /**
* Performs an SQL query.
*
* @param sql the sql query to perform
*/ | Performs an SQL query | runSQL | {
"repo_name": "RamkumarChandran/My-Courses-Portlet",
"path": "docroot/WEB-INF/src/org/gnenc/internet/mycourses/service/base/HostLocalServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 17570
} | [
"com.liferay.counter.service.CounterLocalService",
"com.liferay.portal.kernel.annotation.BeanReference",
"com.liferay.portal.kernel.dao.jdbc.SqlUpdate",
"com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.service.ResourceLoc... | import com.liferay.counter.service.CounterLocalService; import com.liferay.portal.kernel.annotation.BeanReference; import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.se... | import com.liferay.counter.service.*; import com.liferay.portal.kernel.annotation.*; import com.liferay.portal.kernel.dao.jdbc.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.service.*; import com.liferay.portal.service.persistence.*; import javax.sql.*; import org.gnenc.internet.mycourses.se... | [
"com.liferay.counter",
"com.liferay.portal",
"javax.sql",
"org.gnenc.internet"
] | com.liferay.counter; com.liferay.portal; javax.sql; org.gnenc.internet; | 2,485,252 |
public ResultSet addCar(int ownerId, String make, String model, String year,
String color, String price, String description, String carType) {
make = make.toUpperCase();
model = model.toUpperCase();
color = color.toUpperCase();
carType = carType.toUpperCase();
String query = "INSERT INTO cars (carType,... | ResultSet function(int ownerId, String make, String model, String year, String color, String price, String description, String carType) { make = make.toUpperCase(); model = model.toUpperCase(); color = color.toUpperCase(); carType = carType.toUpperCase(); String query = STR + STR+carType+STR+make+STR+model+STR+year+STR... | /**
* This method creates a SQL query to create
* an entry in the car table of the database
* with the given information. It then returns
* a ResultSet containing the car id.
*
* @param ownerId Id of owner.
* @param make Make of car.
* @param model Model of car.
* @param year Year of car.
* @param... | This method creates a SQL query to create an entry in the car table of the database with the given information. It then returns a ResultSet containing the car id | addCar | {
"repo_name": "connorbkirk/ryde",
"path": "Ryde/src/persistlayer/CarPersistImpl.java",
"license": "mit",
"size": 8737
} | [
"java.sql.ResultSet"
] | import java.sql.ResultSet; | import java.sql.*; | [
"java.sql"
] | java.sql; | 478,016 |
private final T lookup(final Name dn) {
AbstractSpringLdapDao.logger.debug("lookup(Name) - dn=" + dn); //$NON-NLS-1$
try {
Object lookup = this.ldapOperations.lookup(dn, (ContextMapper<Object>) ctx -> AbstractSpringLdapDao.this.mapFromContextImp((DirContextOperations) ctx));
... | final T function(final Name dn) { AbstractSpringLdapDao.logger.debug(STR + dn); try { Object lookup = this.ldapOperations.lookup(dn, (ContextMapper<Object>) ctx -> AbstractSpringLdapDao.this.mapFromContextImp((DirContextOperations) ctx)); return this.getPojoClass().cast(lookup); } catch (final UncategorizedLdapExceptio... | /**
* intern gebruik
*
* @param dn DistinguishedName
* @return T
* @throws IllegalArgumentException login gegevens mogelijks verkeerd
*/ | intern gebruik | lookup | {
"repo_name": "jurgendl/jhaws",
"path": "jhaws/ldap/src/main/java/org/jhaws/common/ldap/spring/AbstractSpringLdapDao.java",
"license": "mit",
"size": 12914
} | [
"javax.naming.InvalidNameException",
"javax.naming.Name",
"org.springframework.ldap.UncategorizedLdapException",
"org.springframework.ldap.core.ContextMapper",
"org.springframework.ldap.core.DirContextOperations"
] | import javax.naming.InvalidNameException; import javax.naming.Name; import org.springframework.ldap.UncategorizedLdapException; import org.springframework.ldap.core.ContextMapper; import org.springframework.ldap.core.DirContextOperations; | import javax.naming.*; import org.springframework.ldap.*; import org.springframework.ldap.core.*; | [
"javax.naming",
"org.springframework.ldap"
] | javax.naming; org.springframework.ldap; | 1,282,239 |
public void testLatin1Encoding() throws Exception {
char[] latin1Charset = { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E,
0x000F, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A,... | void function() throws Exception { char[] latin1Charset = { 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, 0x000E, 0x000F, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, 0x0018, 0x0019, 0x001A, 0x001B, 0x001C, 0x001D, 0x001E, 0x001F, 0x00... | /**
* Tests that 'latin1' character conversion works correctly.
*
* @throws Exception
* if any errors occur
*/ | Tests that 'latin1' character conversion works correctly | testLatin1Encoding | {
"repo_name": "hansmeets/bio2rdf-scripts",
"path": "linkedSPLs/LinkedSPLs-update/lib/mysql-connector-java-5.1.33/src/testsuite/regression/StringRegressionTest.java",
"license": "mit",
"size": 34755
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.util.Properties"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.util.Properties; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,520,392 |
public static Boolean registerAccount(String userName, String password,
String nickName, Integer age,
byte[] profileImage) {
try {
// Create body
JsonObject body = new JsonObject();
body.addProperty("userName", userName);
body.addProperty("password", password);
if (nickName... | static Boolean function(String userName, String password, String nickName, Integer age, byte[] profileImage) { try { JsonObject body = new JsonObject(); body.addProperty(STR, userName); body.addProperty(STR, password); if (nickName != null) { body.addProperty(STR, nickName); } if (age != null) { body.addProperty("age",... | /**
* Register Account
*
* @param userName
* @param password
* @param nickName
* @param age
* @param profileImage
*
* @return Boolean
*/ | Register Account | registerAccount | {
"repo_name": "ttlpolo2008/JapStu",
"path": "SRC/LearnLanguageAPI_Client/src/services/APIService.java",
"license": "mit",
"size": 11224
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,042,073 |
private static IStatus deviceHotSwap( IProgressMonitor monitor, final String device, Collection< BlackBerryProject > projects )
throws CoreException {
_log.debug( "Performing device hot-swap" );
final RIA ria = RIA.getCurrentDebugger();
final List< File > files = getJadFiles(... | static IStatus function( IProgressMonitor monitor, final String device, Collection< BlackBerryProject > projects ) throws CoreException { _log.debug( STR ); final RIA ria = RIA.getCurrentDebugger(); final List< File > files = getJadFiles( projects ); if( files.isEmpty() ) { return StatusFactory.createErrorStatus( Messa... | /**
* Device hot-swap.
*
* @param monitor
* @param device
* @param projects
* @return
* @throws CoreException
*/ | Device hot-swap | deviceHotSwap | {
"repo_name": "blackberry/Eclipse-JDE",
"path": "net.rim.ejde/src/net/rim/ejde/internal/launching/DeploymentTask.java",
"license": "epl-1.0",
"size": 19500
} | [
"java.io.File",
"java.util.Collection",
"java.util.List",
"net.rim.ejde.internal.model.BlackBerryProject",
"net.rim.ejde.internal.util.Messages",
"net.rim.ejde.internal.util.StatusFactory",
"net.rim.ide.RIA",
"org.eclipse.core.runtime.CoreException",
"org.eclipse.core.runtime.IProgressMonitor",
"o... | import java.io.File; import java.util.Collection; import java.util.List; import net.rim.ejde.internal.model.BlackBerryProject; import net.rim.ejde.internal.util.Messages; import net.rim.ejde.internal.util.StatusFactory; import net.rim.ide.RIA; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runti... | import java.io.*; import java.util.*; import net.rim.ejde.internal.model.*; import net.rim.ejde.internal.util.*; import net.rim.ide.*; import org.eclipse.core.runtime.*; | [
"java.io",
"java.util",
"net.rim.ejde",
"net.rim.ide",
"org.eclipse.core"
] | java.io; java.util; net.rim.ejde; net.rim.ide; org.eclipse.core; | 1,238,062 |
@Deprecated
public static InputSupplier<StringReader> newReaderSupplier(
final String value) {
return asInputSupplier(CharSource.wrap(value));
} | static InputSupplier<StringReader> function( final String value) { return asInputSupplier(CharSource.wrap(value)); } | /**
* Returns a factory that will supply instances of {@link StringReader} that
* read a string value.
*
* @param value the string to read
* @return the factory
* @deprecated Use {@link CharSource#wrap(CharSequence)} instead. This method
* is scheduled for removal in Guava 18.0.
*/ | Returns a factory that will supply instances of <code>StringReader</code> that read a string value | newReaderSupplier | {
"repo_name": "maxvetrenko/guava-libraries-17-0",
"path": "guava/src/com/google/common/io/CharStreams.java",
"license": "apache-2.0",
"size": 19794
} | [
"java.io.StringReader"
] | import java.io.StringReader; | import java.io.*; | [
"java.io"
] | java.io; | 1,097,247 |
@JsonSetter("uri")
public void setUri (String value) {
this.uri = value;
}
| @JsonSetter("uri") void function (String value) { this.uri = value; } | /** SETTER
* The URI where the call will be delivered
*/ | SETTER The URI where the call will be delivered | setUri | {
"repo_name": "voxbone/voxapi-client-java",
"path": "APIv3SandboxLib/src/com/voxbone/sandbox/models/VoiceUriSaveModel.java",
"license": "mit",
"size": 2525
} | [
"com.fasterxml.jackson.annotation.JsonSetter"
] | import com.fasterxml.jackson.annotation.JsonSetter; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 865,907 |
public static void putInt(byte[] dest, int destIndex, int value) {
check(destIndex, INT_NUM_BYTES, dest.length);
PlatformDependent.putInt(dest, destIndex, value);
} | static void function(byte[] dest, int destIndex, int value) { check(destIndex, INT_NUM_BYTES, dest.length); PlatformDependent.putInt(dest, destIndex, value); } | /**
* Copy an integer value to the dest+destIndex
*
* @param dest destination byte array
* @param destIndex destination index
* @param value an int value
*/ | Copy an integer value to the dest+destIndex | putInt | {
"repo_name": "superbstreak/drill",
"path": "exec/memory/base/src/main/java/io/netty/buffer/DrillBuf.java",
"license": "apache-2.0",
"size": 28725
} | [
"io.netty.util.internal.PlatformDependent"
] | import io.netty.util.internal.PlatformDependent; | import io.netty.util.internal.*; | [
"io.netty.util"
] | io.netty.util; | 2,159,178 |
public static long getDeltaTicks(Date start, Date end) {
PreCon.notNull(start);
PreCon.notNull(end);
return (end.getTime() - start.getTime()) / 50;
} | static long function(Date start, Date end) { PreCon.notNull(start); PreCon.notNull(end); return (end.getTime() - start.getTime()) / 50; } | /**
* Get the difference between two dates in ticks.
*
* @param start The start date
* @param end The end date
*/ | Get the difference between two dates in ticks | getDeltaTicks | {
"repo_name": "JCThePants/NucleusFramework",
"path": "src/com/jcwhatever/nucleus/utils/DateUtils.java",
"license": "mit",
"size": 10378
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 272,452 |
public B validate(final List<ValidationContext.Builder<?, ?>> validationContexts) {
this.validationContexts.addAll(validationContexts);
return self;
} | B function(final List<ValidationContext.Builder<?, ?>> validationContexts) { this.validationContexts.addAll(validationContexts); return self; } | /**
* Sets validation contexts.
* @param validationContexts
* @return
*/ | Sets validation contexts | validate | {
"repo_name": "christophd/citrus",
"path": "core/citrus-base/src/main/java/com/consol/citrus/actions/ReceiveMessageAction.java",
"license": "apache-2.0",
"size": 34875
} | [
"com.consol.citrus.validation.context.ValidationContext",
"java.util.List"
] | import com.consol.citrus.validation.context.ValidationContext; import java.util.List; | import com.consol.citrus.validation.context.*; import java.util.*; | [
"com.consol.citrus",
"java.util"
] | com.consol.citrus; java.util; | 2,596,920 |
public static Complex[] createComplexVector(final double[] real, final double[] imag) {
final int n = real.length;
if (imag.length != n) throw new IllegalArgumentException("#real != #imag");
final Complex[] v = new Complex[n];
for (int j = 0; j < n; j++) {
v[j] = newComplex(real[j], imag[j]);
... | static Complex[] function(final double[] real, final double[] imag) { final int n = real.length; if (imag.length != n) throw new IllegalArgumentException(STR); final Complex[] v = new Complex[n]; for (int j = 0; j < n; j++) { v[j] = newComplex(real[j], imag[j]); } return v; } | /**
* Create a complex vector from the real and imaginary parts.
*
* @param real input vector
* @param imag imaginary part of the vector
* @return complex vector.
*/ | Create a complex vector from the real and imaginary parts | createComplexVector | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-external/src/main/java/de/lab4inf/math/lapack/LinearAlgebra.java",
"license": "gpl-3.0",
"size": 103733
} | [
"de.lab4inf.math.Complex"
] | import de.lab4inf.math.Complex; | import de.lab4inf.math.*; | [
"de.lab4inf.math"
] | de.lab4inf.math; | 23,594 |
public List<Itemset> getItemsets() {
return itemsets;
}
| List<Itemset> function() { return itemsets; } | /**
* Get the itemsets in this sequential pattern
* @return a list of itemsets.
*/ | Get the itemsets in this sequential pattern | getItemsets | {
"repo_name": "moerstw/prefix_span",
"path": "src/main/java/com/moerstw/prefixspan/otherAlogrithm/sequentialpatterns/BIDE_and_prefixspan/SequentialPattern.java",
"license": "gpl-3.0",
"size": 6764
} | [
"ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset",
"java.util.List"
] | import ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset; import java.util.List; | import ca.pfv.spmf.patterns.itemset_list_integers_without_support.*; import java.util.*; | [
"ca.pfv.spmf",
"java.util"
] | ca.pfv.spmf; java.util; | 2,576,489 |
public String getString(String name, String category, String defaultValue, String comment, Pattern pattern)
{
return getString(name, category, defaultValue, comment, name, pattern);
} | String function(String name, String category, String defaultValue, String comment, Pattern pattern) { return getString(name, category, defaultValue, comment, name, pattern); } | /**
* Creates a string property.
*
* @param name Name of the property.
* @param category Category of the property.
* @param defaultValue Default value of the property.
* @param comment A brief description what the property does.
* @return The value of the new string property.
*/ | Creates a string property | getString | {
"repo_name": "ThiagoGarciaAlves/MinecraftForge",
"path": "src/main/java/net/minecraftforge/common/config/Configuration.java",
"license": "lgpl-2.1",
"size": 66244
} | [
"java.util.regex.Pattern"
] | import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 407,141 |
public static QDataSet circle( double radius, double x, double y ) {
return circle( dataset(radius), dataset(x), dataset(y) );
} | static QDataSet function( double radius, double x, double y ) { return circle( dataset(radius), dataset(x), dataset(y) ); } | /**
* return a dataset with X and Y forming a circle, introduced as a
* convenient way to indicate planet location. Note this is presently
* returned as Y[X], but should probably return a rank 2 dataset that is a
* bundle.
* @param x the x coordinate of the circle
* @param y the y coord... | return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location. Note this is presently returned as Y[X], but should probably return a rank 2 dataset that is a bundle | circle | {
"repo_name": "autoplot/app",
"path": "QDataSet/src/org/das2/qds/ops/Ops.java",
"license": "gpl-2.0",
"size": 492716
} | [
"org.das2.qds.QDataSet"
] | import org.das2.qds.QDataSet; | import org.das2.qds.*; | [
"org.das2.qds"
] | org.das2.qds; | 524,975 |
public AuthorizationServerUpdateContract withTokenBodyParameters(List<TokenBodyParameterContract> tokenBodyParameters) {
this.tokenBodyParameters = tokenBodyParameters;
return this;
} | AuthorizationServerUpdateContract function(List<TokenBodyParameterContract> tokenBodyParameters) { this.tokenBodyParameters = tokenBodyParameters; return this; } | /**
* Set additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
*
* @param tokenBodyParameters the tokenBodyParameters value to set
* @return t... | Set additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"} | withTokenBodyParameters | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/apimanagement/v2018_06_01_preview/AuthorizationServerUpdateContract.java",
"license": "mit",
"size": 16788
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,132,822 |
protected HashMap getDestroyedSubregionSerialNumbers() {
if (!this.isDestroyed) {
throw new IllegalStateException(
LocalizedStrings.LocalRegion_REGION_0_MUST_BE_DESTROYED_BEFORE_CALLING_GETDESTROYEDSUBREGIONSERIALNUMBERS
.toLocalizedString(getFullPath()));
}
return this.destroyedSubr... | HashMap function() { if (!this.isDestroyed) { throw new IllegalStateException( LocalizedStrings.LocalRegion_REGION_0_MUST_BE_DESTROYED_BEFORE_CALLING_GETDESTROYEDSUBREGIONSERIALNUMBERS .toLocalizedString(getFullPath())); } return this.destroyedSubregionSerialNumbers; } | /**
* Returns a map of subregions that were destroyed when this region was
* destroyed. Map contains subregion full paths to SerialNumbers. Return is
* defined as HashMap because DestroyRegionOperation will provide the map to
* DataSerializer.writeHashMap which requires HashMap. Returns
* {@link #destroy... | Returns a map of subregions that were destroyed when this region was destroyed. Map contains subregion full paths to SerialNumbers. Return is defined as HashMap because DestroyRegionOperation will provide the map to DataSerializer.writeHashMap which requires HashMap. Returns <code>#destroyedSubregionSerialNumbers</code... | getDestroyedSubregionSerialNumbers | {
"repo_name": "papicella/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java",
"license": "apache-2.0",
"size": 506961
} | [
"com.gemstone.gemfire.internal.i18n.LocalizedStrings",
"java.util.HashMap"
] | import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import java.util.HashMap; | import com.gemstone.gemfire.internal.i18n.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.util"
] | com.gemstone.gemfire; java.util; | 2,825,484 |
public static void apply(ClassNode declaringClass) {
injectInterface(declaringClass, MVC_HANDLER_CNODE);
Expression mvcGroupManager = injectedField(declaringClass, MVC_GROUP_MANAGER_CNODE, "this$" + MVC_GROUP_MANAGER_PROPERTY, null);
addDelegateMethods(declaringClass, MVC_HANDLER_CNODE, mvcG... | static void function(ClassNode declaringClass) { injectInterface(declaringClass, MVC_HANDLER_CNODE); Expression mvcGroupManager = injectedField(declaringClass, MVC_GROUP_MANAGER_CNODE, "this$" + MVC_GROUP_MANAGER_PROPERTY, null); addDelegateMethods(declaringClass, MVC_HANDLER_CNODE, mvcGroupManager); } | /**
* Adds the necessary field and methods to support resource locating.
*
* @param declaringClass the class to which we add the support field and methods
*/ | Adds the necessary field and methods to support resource locating | apply | {
"repo_name": "griffon/griffon",
"path": "subprojects/griffon-groovy-compile/src/main/java/org/codehaus/griffon/compile/core/ast/transform/MVCAwareASTTransformation.java",
"license": "apache-2.0",
"size": 3927
} | [
"org.codehaus.griffon.compile.core.ast.GriffonASTUtils",
"org.codehaus.groovy.ast.ClassNode",
"org.codehaus.groovy.ast.expr.Expression"
] | import org.codehaus.griffon.compile.core.ast.GriffonASTUtils; import org.codehaus.groovy.ast.ClassNode; import org.codehaus.groovy.ast.expr.Expression; | import org.codehaus.griffon.compile.core.ast.*; import org.codehaus.groovy.ast.*; import org.codehaus.groovy.ast.expr.*; | [
"org.codehaus.griffon",
"org.codehaus.groovy"
] | org.codehaus.griffon; org.codehaus.groovy; | 1,137,329 |
HttpResponse doRemoveJobFromView(@QueryParameter String name) throws IOException, ServletException; | HttpResponse doRemoveJobFromView(@QueryParameter String name) throws IOException, ServletException; | /**
* Handle removeJobFromView web method.
*
* This method should {@link RequirePOST}.
*
* @param name Item name. This can be either full name relative to owner item group or full item name prefixed with '/'.
*/ | Handle removeJobFromView web method. This method should <code>RequirePOST</code> | doRemoveJobFromView | {
"repo_name": "ErikVerheul/jenkins",
"path": "core/src/main/java/hudson/model/DirectlyModifiableView.java",
"license": "mit",
"size": 2835
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"org.kohsuke.stapler.HttpResponse",
"org.kohsuke.stapler.QueryParameter"
] | import java.io.IOException; import javax.servlet.ServletException; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.QueryParameter; | import java.io.*; import javax.servlet.*; import org.kohsuke.stapler.*; | [
"java.io",
"javax.servlet",
"org.kohsuke.stapler"
] | java.io; javax.servlet; org.kohsuke.stapler; | 1,411,554 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.