method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void initialize(Configuration config) throws AuthenticationSystemInitializationFailure { try { this.configuration = config; this.applicationContext = createApplicationContext(); initBeforeCreate(); this.authenticationManager = createAuthenticationManage...
void function(Configuration config) throws AuthenticationSystemInitializationFailure { try { this.configuration = config; this.applicationContext = createApplicationContext(); initBeforeCreate(); this.authenticationManager = createAuthenticationManager(); this.entryPoint = createEntryPoint(); this.filter = createFilter...
/** * Initializes this authentication system using the values provided by the template methods. * <p> * When using this base class, you should generally <em>not</em> override this method, but * rather the individual template methods. * * @throws AuthenticationSystemInitializationFailure ...
Initializes this authentication system using the values provided by the template methods. When using this base class, you should generally not override this method, but rather the individual template methods
initialize
{ "repo_name": "NCIP/psc", "path": "authentication/plugin-api/src/main/java/edu/northwestern/bioinformatics/studycalendar/security/plugin/AbstractAuthenticationSystem.java", "license": "bsd-3-clause", "size": 13041 }
[ "gov.nih.nci.cabig.ctms.tools.configuration.Configuration" ]
import gov.nih.nci.cabig.ctms.tools.configuration.Configuration;
import gov.nih.nci.cabig.ctms.tools.configuration.*;
[ "gov.nih.nci" ]
gov.nih.nci;
365,242
@Override public void exitBasicAssignable(@NotNull BramsprParser.BasicAssignableContext ctx) { }
@Override public void exitBasicAssignable(@NotNull BramsprParser.BasicAssignableContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
enterBasicAssignable
{ "repo_name": "bcleenders/Bramspr", "path": "src/bramspr/BramsprBaseListener.java", "license": "mit", "size": 21948 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,277,671
public List<ChannelDefinition> getChannelDefinitions() { return this.channelDefinitions; }
List<ChannelDefinition> function() { return this.channelDefinitions; }
/** * Returns the channels this {@link ThingType} provides. * <p> * The returned list is immutable. * * @return the channels this Thing type provides (not null, could be empty) */
Returns the channels this <code>ThingType</code> provides. The returned list is immutable
getChannelDefinitions
{ "repo_name": "dominicdesu/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/type/ThingType.java", "license": "epl-1.0", "size": 9170 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,222,889
@Test public void testEmptyContextCriteria() { Capture<SolrQuery> capturedQuery = setupMock(); AuditActivityCriteria criteria = new AuditActivityCriteria(); criteria.setIds(new ArrayList<String>()); activityRetriever.getActivities(criteria); SolrQuery constructedQuery = capturedQuery.getValue(); List...
void function() { Capture<SolrQuery> capturedQuery = setupMock(); AuditActivityCriteria criteria = new AuditActivityCriteria(); criteria.setIds(new ArrayList<String>()); activityRetriever.getActivities(criteria); SolrQuery constructedQuery = capturedQuery.getValue(); List<String> fiterQueries = Arrays.asList(constructe...
/** * Tests invoking {@link AuditActivityRetriever#getActivities(AuditActivityCriteria)} with providing an empty * {@link List} of IDs for context search. */
Tests invoking <code>AuditActivityRetriever#getActivities(AuditActivityCriteria)</code> with providing an empty <code>List</code> of IDs for context search
testEmptyContextCriteria
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/seip-audit/seip-audit-impl/src/test/java/com/sirma/itt/emf/audit/activity/AuditActivityRetrieverImplTest.java", "license": "lgpl-3.0", "size": 7688 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.apache.solr.client.solrj.SolrQuery", "org.easymock.Capture", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.apache.solr.client.solrj.SolrQuery; import org.easymock.Capture; import org.junit.Assert;
import java.util.*; import org.apache.solr.client.solrj.*; import org.easymock.*; import org.junit.*;
[ "java.util", "org.apache.solr", "org.easymock", "org.junit" ]
java.util; org.apache.solr; org.easymock; org.junit;
1,181,743
private List<T> getPagedItems(String resourceDesc, PageIterator<T> iterator) throws IOException { List<T> elements = new ArrayList<>(); int length = 0; int page = 0; try { while (iterator.hasNext()) { elements.addAll(iterator.next()); int d...
List<T> function(String resourceDesc, PageIterator<T> iterator) throws IOException { List<T> elements = new ArrayList<>(); int length = 0; int page = 0; try { while (iterator.hasNext()) { elements.addAll(iterator.next()); int diff = elements.size() - length; length = elements.size(); logger.info(resourceDesc + STR + (p...
/** * A specialised version of GitHubService::getPage that does logging. * @param iterator the paged request to iterate through * @return a list of items * @throws IOException */
A specialised version of GitHubService::getPage that does logging
getPagedItems
{ "repo_name": "Honoo/HubTurbo", "path": "src/main/java/github/update/UpdateService.java", "license": "apache-2.0", "size": 7189 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.eclipse.egit.github.core.client.NoSuchPageException", "org.eclipse.egit.github.core.client.PageIterator" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.eclipse.egit.github.core.client.NoSuchPageException; import org.eclipse.egit.github.core.client.PageIterator;
import java.io.*; import java.util.*; import org.eclipse.egit.github.core.client.*;
[ "java.io", "java.util", "org.eclipse.egit" ]
java.io; java.util; org.eclipse.egit;
2,886,131
Collection<Violation> enforce(String spec);
Collection<Violation> enforce(String spec);
/** * Validate incoming text. * @param spec Spec in text format * @return Violations */
Validate incoming text
enforce
{ "repo_name": "teamed/requs", "path": "requs-core/src/main/java/org/requs/facet/sa/Rule.java", "license": "bsd-3-clause", "size": 1952 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,412,908
public String toString() { return "shadow tree"; } } protected static class ContentNodeInfo extends NodeInfo { public ContentNodeInfo(Node n) { super(n); }
String function() { return STR; } } protected static class ContentNodeInfo extends NodeInfo { public ContentNodeInfo(Node n) { super(n); }
/** * Returns a printable representation of the object. */
Returns a printable representation of the object
toString
{ "repo_name": "git-moss/Push2Display", "path": "lib/batik-1.8/sources/org/apache/batik/apps/svgbrowser/DOMViewer.java", "license": "lgpl-3.0", "size": 79527 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,607,642
public interface ActionMetadata { Annotation[] getAnnotations();
interface ActionMetadata { Annotation[] function();
/** * Returns the set of annotations attached to the method related to an action. * * @return a non-null array of annotations. */
Returns the set of annotations attached to the method related to an action
getAnnotations
{ "repo_name": "jsr377/jsr377-api", "path": "jsr377-api/src/main/java/javax/application/action/ActionMetadata.java", "license": "apache-2.0", "size": 3826 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
2,334,873
public File getStoreDir() { return storeDir; }
File function() { return storeDir; }
/** * Gets the temp directory that should be used by the {@link org.apache.drill.exec.store.sys.store.LocalPersistentStore}. * @return The temp directory that should be used by the {@link org.apache.drill.exec.store.sys.store.LocalPersistentStore}. */
Gets the temp directory that should be used by the <code>org.apache.drill.exec.store.sys.store.LocalPersistentStore</code>
getStoreDir
{ "repo_name": "akumarb2010/incubator-drill", "path": "exec/java-exec/src/test/java/org/apache/drill/test/BaseDirTestWatcher.java", "license": "apache-2.0", "size": 10786 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
883,680
@Test public void testNodeUsageWhileDecommissioining() throws IOException, InterruptedException { nodeUsageVerification(1, new long[] { 26384L }, AdminStates.DECOMMISSION_INPROGRESS); }
void function() throws IOException, InterruptedException { nodeUsageVerification(1, new long[] { 26384L }, AdminStates.DECOMMISSION_INPROGRESS); }
/** * DECOMMISSION_INPROGRESS node should not be considered * while calculating node usage * @throws InterruptedException */
DECOMMISSION_INPROGRESS node should not be considered while calculating node usage
testNodeUsageWhileDecommissioining
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDecommission.java", "license": "apache-2.0", "size": 49624 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.DatanodeInfo" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,229,942
@Parameters(name = "AdminRoleSiteTest{index}: browser({0})") public static Collection<String[]> browsersStrings() { return Arrays.asList(new String[][] { { "chrome" } }); // return Arrays.asList(new Object[][] { { "firefox" },{ "chrome" }, { // "htmlunit-firefox" },{ "htmlunit-ie11" },{ "htmlunit-chrome" } })...
@Parameters(name = STR) static Collection<String[]> function() { return Arrays.asList(new String[][] { { STR } }); }
/** * Browsers strings. * * @return the collection */
Browsers strings
browsersStrings
{ "repo_name": "Hack23/cia", "path": "citizen-intelligence-agency/src/test/java/com/hack23/cia/systemintegrationtest/AdminRoleSystemITest.java", "license": "apache-2.0", "size": 22431 }
[ "java.util.Arrays", "java.util.Collection", "org.junit.runners.Parameterized" ]
import java.util.Arrays; import java.util.Collection; import org.junit.runners.Parameterized;
import java.util.*; import org.junit.runners.*;
[ "java.util", "org.junit.runners" ]
java.util; org.junit.runners;
585,863
public GroundedAction getA() { return a; }
GroundedAction function() { return a; }
/** * Returns the action of this behavior. * @return the action of this behavior. */
Returns the action of this behavior
getA
{ "repo_name": "nakulgopalan/burlap_pomdp_additions", "path": "src/burlap/behavior/singleagent/learning/actorcritic/CritiqueResult.java", "license": "lgpl-3.0", "size": 1869 }
[ "burlap.oomdp.singleagent.GroundedAction" ]
import burlap.oomdp.singleagent.GroundedAction;
import burlap.oomdp.singleagent.*;
[ "burlap.oomdp.singleagent" ]
burlap.oomdp.singleagent;
1,537,143
protected void writeEntityToNBT(NBTTagCompound tagCompound) { super.writeEntityToNBT(tagCompound); this.mobSpawnerLogic.writeToNBT(tagCompound); }
void function(NBTTagCompound tagCompound) { super.writeEntityToNBT(tagCompound); this.mobSpawnerLogic.writeToNBT(tagCompound); }
/** * (abstract) Protected helper method to write subclass entity data to NBT. */
(abstract) Protected helper method to write subclass entity data to NBT
writeEntityToNBT
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/entity/ai/EntityMinecartMobSpawner.java", "license": "mit", "size": 2534 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
1,329,795
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length < 2) { throw new WrongUsageException("commands.achievement.usage", new Object[0]); } else { final StatBase statbase = StatLi...
void function(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length < 2) { throw new WrongUsageException(STR, new Object[0]); } else { final StatBase statbase = StatList.getOneShotStat(args[1]); if ((statbase != null "*".equals(args[1])) && (statbase == null statbase.is...
/** * Callback for when the command is executed * * @param server The server instance * @param sender The sender who executed the command * @param args The arguments that were passed */
Callback for when the command is executed
execute
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/command/server/CommandAchievement.java", "license": "lgpl-2.1", "size": 9463 }
[ "com.google.common.collect.Lists", "java.util.List", "net.minecraft.command.CommandException", "net.minecraft.command.ICommandSender", "net.minecraft.command.WrongUsageException", "net.minecraft.entity.player.EntityPlayerMP", "net.minecraft.server.MinecraftServer", "net.minecraft.stats.Achievement", ...
import com.google.common.collect.Lists; import java.util.List; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.command.WrongUsageException; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; import net.minecraf...
import com.google.common.collect.*; import java.util.*; import net.minecraft.command.*; import net.minecraft.entity.player.*; import net.minecraft.server.*; import net.minecraft.stats.*;
[ "com.google.common", "java.util", "net.minecraft.command", "net.minecraft.entity", "net.minecraft.server", "net.minecraft.stats" ]
com.google.common; java.util; net.minecraft.command; net.minecraft.entity; net.minecraft.server; net.minecraft.stats;
117,391
static final String getDescription(Map<byte[], byte[]> map) { return getString(map.get(DESCRIPTION), null); }
static final String getDescription(Map<byte[], byte[]> map) { return getString(map.get(DESCRIPTION), null); }
/** * return the DESCRIPTION from the map * @param map * @return */
return the DESCRIPTION from the map
getDescription
{ "repo_name": "beeldengeluid/zieook", "path": "backend/zieook-api/zieook-api-data/src/main/java/nl/gridline/zieook/model/ModelConstants.java", "license": "apache-2.0", "size": 18942 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,965,935
public String getText() { StringBuffer ret = new StringBuffer(); ret.append(getHeaderText()); ArrayList<String> text = new ArrayList<String>(); text.addAll(Arrays.asList(getParagraphText())); text.addAll(Arrays.asList(getFootnoteText())); text.add...
String function() { StringBuffer ret = new StringBuffer(); ret.append(getHeaderText()); ArrayList<String> text = new ArrayList<String>(); text.addAll(Arrays.asList(getParagraphText())); text.addAll(Arrays.asList(getFootnoteText())); text.addAll(Arrays.asList(getEndnoteText())); for(String p : text) { ret.append(p); } r...
/** * Grab the text, based on the paragraphs. Shouldn't include any crud, * but slightly slower than getTextFromPieces(). */
Grab the text, based on the paragraphs. Shouldn't include any crud, but slightly slower than getTextFromPieces()
getText
{ "repo_name": "tobyclemson/msci-project", "path": "vendor/poi-3.6/src/scratchpad/src/org/apache/poi/hwpf/extractor/WordExtractor.java", "license": "mit", "size": 8037 }
[ "java.util.ArrayList", "java.util.Arrays" ]
import java.util.ArrayList; import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,424,397
private List<Object> generateLotteryList() { List<Object> randomList = new ArrayList<>(); Iterator<Component> iterator = imagesLayout.iterator(); while (iterator.hasNext()) { HorizontalLayout hl = (HorizontalLayout) iterator.next(); Image imageSelected = (Image) hl.getComponent(0); Image img = new...
List<Object> function() { List<Object> randomList = new ArrayList<>(); Iterator<Component> iterator = imagesLayout.iterator(); while (iterator.hasNext()) { HorizontalLayout hl = (HorizontalLayout) iterator.next(); Image imageSelected = (Image) hl.getComponent(0); Image img = new Image("", imageSelected.getSource()); im...
/** * Generate lottery list. * * @return the list */
Generate lottery list
generateLotteryList
{ "repo_name": "nineunderground/imagerulette", "path": "src/main/java/org/inakirj/imagerulette/screens/DiceURLSetupView.java", "license": "gpl-3.0", "size": 39058 }
[ "com.vaadin.ui.Component", "com.vaadin.ui.HorizontalLayout", "com.vaadin.ui.Image", "com.vaadin.ui.Slider", "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import com.vaadin.ui.Component; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Image; import com.vaadin.ui.Slider; import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import com.vaadin.ui.*; import java.util.*;
[ "com.vaadin.ui", "java.util" ]
com.vaadin.ui; java.util;
1,228,398
public static void copy(DatabaseEntry from, DatabaseEntry to) { to.setData(getByteArray(from)); to.setOffset(0); }
static void function(DatabaseEntry from, DatabaseEntry to) { to.setData(getByteArray(from)); to.setOffset(0); }
/** * Copies one entry to another. */
Copies one entry to another
copy
{ "repo_name": "djsedulous/namecoind", "path": "libs/db-4.7.25.NC/java/src/com/sleepycat/util/keyrange/KeyRange.java", "license": "mit", "size": 9852 }
[ "com.sleepycat.db.DatabaseEntry" ]
import com.sleepycat.db.DatabaseEntry;
import com.sleepycat.db.*;
[ "com.sleepycat.db" ]
com.sleepycat.db;
1,521,762
public void test(TestHarness harness) { // create instance of a class Double Object o = new IllegalAccessError("IllegalAccessError"); // get a runtime class of an object "o" Class c = o.getClass(); Class superClass = c.getSuperclass(); harness.check(superClass.g...
void function(TestHarness harness) { Object o = new IllegalAccessError(STR); Class c = o.getClass(); Class superClass = c.getSuperclass(); harness.check(superClass.getName(), STR); }
/** * Runs the test using the specified harness. * * @param harness the test harness (<code>null</code> not permitted). */
Runs the test using the specified harness
test
{ "repo_name": "niloc132/mauve-gwt", "path": "src/main/java/gnu/testlet/java/lang/IllegalAccessError/classInfo/getSuperclass.java", "license": "gpl-2.0", "size": 1697 }
[ "gnu.testlet.TestHarness", "java.lang.IllegalAccessError" ]
import gnu.testlet.TestHarness; import java.lang.IllegalAccessError;
import gnu.testlet.*; import java.lang.*;
[ "gnu.testlet", "java.lang" ]
gnu.testlet; java.lang;
2,817,698
static File getRootDir() { return new File(Jenkins.get().getRootDir(), "users"); }
static File getRootDir() { return new File(Jenkins.get().getRootDir(), "users"); }
/** * Gets the directory where Hudson stores user information. */
Gets the directory where Hudson stores user information
getRootDir
{ "repo_name": "recena/jenkins", "path": "core/src/main/java/hudson/model/User.java", "license": "mit", "size": 45496 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,404,299
private void processListmodeToken(final String value) { final String[] handles = new String[2]; handles[0] = value; // List mode item final String endValue = Integer.toString(Integer.parseInt(value) + 1); parser.h005Info.put("LISTMODEEND", endValue); handles[1] = endValue; //...
void function(final String value) { final String[] handles = new String[2]; handles[0] = value; final String endValue = Integer.toString(Integer.parseInt(value) + 1); parser.h005Info.put(STR, endValue); handles[1] = endValue; try { parser.getProcessingManager().addProcessor(handles, parser.getProcessingManager().getPro...
/** * Processes a 'LISTMODE' token received in a 005. The LISTMODE token * indicates support for a new way of describing list modes (such as +b). * See the proposal at http://shanemcc.co.uk/irc/#listmode. * * @param value The value of the token. */
Processes a 'LISTMODE' token received in a 005. The LISTMODE token indicates support for a new way of describing list modes (such as +b). See the proposal at HREF
processListmodeToken
{ "repo_name": "greboid/Parser", "path": "irc/src/main/java/com/dmdirc/parser/irc/processors/Process004005.java", "license": "mit", "size": 11119 }
[ "com.dmdirc.parser.irc.ProcessorNotFoundException" ]
import com.dmdirc.parser.irc.ProcessorNotFoundException;
import com.dmdirc.parser.irc.*;
[ "com.dmdirc.parser" ]
com.dmdirc.parser;
1,695,864
public static <T> Matcher<T> in(T[] elements) { return new IsIn<T>(elements); }
static <T> Matcher<T> function(T[] elements) { return new IsIn<T>(elements); }
/** * Creates a matcher that matches when the examined object is found within the * specified array. * For example: * <pre>assertThat("foo", is(in(new String[]{"bar", "foo"})))</pre> * * @param elements * the array in which matching items must be found * */
Creates a matcher that matches when the examined object is found within the specified array. For example: <code>assertThat("foo", is(in(new String[]{"bar", "foo"})))</code>
in
{ "repo_name": "wgpshashank/JavaHamcrest", "path": "hamcrest-library/src/main/java/org/hamcrest/collection/IsIn.java", "license": "bsd-3-clause", "size": 3495 }
[ "org.hamcrest.Matcher" ]
import org.hamcrest.Matcher;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
328,501
private void updateLocalToPositionCRS() { if (objectiveToPositionCRS != null) { localToPositionCRS = MathTransforms.concatenate(localToObjectiveCRS.get(), objectiveToPositionCRS); } setTargetCRS(format.getDefaultCRS()); }
void function() { if (objectiveToPositionCRS != null) { localToPositionCRS = MathTransforms.concatenate(localToObjectiveCRS.get(), objectiveToPositionCRS); } setTargetCRS(format.getDefaultCRS()); }
/** * Computes {@link #localToPositionCRS} after a change of {@link #localToObjectiveCRS}. * Other properties, in particular {@link #objectiveToPositionCRS}, must be valid. */
Computes <code>#localToPositionCRS</code> after a change of <code>#localToObjectiveCRS</code>. Other properties, in particular <code>#objectiveToPositionCRS</code>, must be valid
updateLocalToPositionCRS
{ "repo_name": "apache/sis", "path": "application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java", "license": "apache-2.0", "size": 63362 }
[ "org.apache.sis.referencing.operation.transform.MathTransforms" ]
import org.apache.sis.referencing.operation.transform.MathTransforms;
import org.apache.sis.referencing.operation.transform.*;
[ "org.apache.sis" ]
org.apache.sis;
237,746
private static void populateMRImageFromNumbers(Map numbers, MRImage mri) throws Exception { String temp; if ((temp = (String) numbers.get(DicomConstants.IMAGE_TYPE)) != null) { String[] token = temp.split("\\\\"); if (token.length >= 3) { mri.setI...
static void function(Map numbers, MRImage mri) throws Exception { String temp; if ((temp = (String) numbers.get(DicomConstants.IMAGE_TYPE)) != null) { String[] token = temp.split("\\\\"); if (token.length >= 3) { mri.setImageTypeValue3(token[2]); } } if ((temp = (String) numbers.get(DicomConstants.SCANNING_SEQUENCE)) !...
/** * Given the "numbers" map with all the parsed out dicom tag values we care * about..... populate the general image object with these values. */
Given the "numbers" map with all the parsed out dicom tag values we care about..... populate the general image object with these values
populateMRImageFromNumbers
{ "repo_name": "NCIP/national-biomedical-image-archive", "path": "software/nbia-ctp/src/gov/nih/nci/nbia/domain/operation/MRImageOperation.java", "license": "bsd-3-clause", "size": 5178 }
[ "gov.nih.nci.nbia.internaldomain.MRImage", "gov.nih.nci.nbia.util.DicomConstants", "java.util.Map" ]
import gov.nih.nci.nbia.internaldomain.MRImage; import gov.nih.nci.nbia.util.DicomConstants; import java.util.Map;
import gov.nih.nci.nbia.internaldomain.*; import gov.nih.nci.nbia.util.*; import java.util.*;
[ "gov.nih.nci", "java.util" ]
gov.nih.nci; java.util;
2,439,876
@Test public void testGetStartXValue() { DefaultIntervalXYDataset d = createSampleDataset1(); assertEquals(0.9, d.getStartXValue(0, 0), EPSILON); assertEquals(1.9, d.getStartXValue(0, 1), EPSILON); assertEquals(2.9, d.getStartXValue(0, 2), EPSILON); assertEquals(10....
void function() { DefaultIntervalXYDataset d = createSampleDataset1(); assertEquals(0.9, d.getStartXValue(0, 0), EPSILON); assertEquals(1.9, d.getStartXValue(0, 1), EPSILON); assertEquals(2.9, d.getStartXValue(0, 2), EPSILON); assertEquals(10.9, d.getStartXValue(1, 0), EPSILON); assertEquals(11.9, d.getStartXValue(1, 1...
/** * Some checks for the getStartXValue() method. */
Some checks for the getStartXValue() method
testGetStartXValue
{ "repo_name": "greearb/jfreechart-fse-ct", "path": "src/test/java/org/jfree/data/xy/DefaultIntervalXYDatasetTest.java", "license": "lgpl-2.1", "size": 13956 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
807,432
public void testNullInputs(final Class<?> clazz, final Object[] variables, final Class<?>[] variableClasses, final boolean[] notNull) throws NoSuchMethodException, IllegalAccessException, InstantiationException { final Constructor<?> constructor = clazz.getConstructor(variableClasses); final int length ...
void function(final Class<?> clazz, final Object[] variables, final Class<?>[] variableClasses, final boolean[] notNull) throws NoSuchMethodException, IllegalAccessException, InstantiationException { final Constructor<?> constructor = clazz.getConstructor(variableClasses); final int length = variables.length; for (int ...
/** * Tests attempted construction with null values for non-nullable parameters fails. * * @param clazz * The class to test * @param variables * The variables * @param variableClasses * The variable classes * @param notNull * Indicates whether a variabl...
Tests attempted construction with null values for non-nullable parameters fails
testNullInputs
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/test/java/com/opengamma/AnalyticsTestBase.java", "license": "apache-2.0", "size": 2242 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.InvocationTargetException", "org.testng.AssertJUnit" ]
import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import org.testng.AssertJUnit;
import java.lang.reflect.*; import org.testng.*;
[ "java.lang", "org.testng" ]
java.lang; org.testng;
1,111,326
//region > allSpecifications @Programmatic public Collection<ObjectSpecification> allSpecifications() { return cache.allSpecifications(); } //endregion //region > getServiceClasses, isServiceClass
Collection<ObjectSpecification> function() { return cache.allSpecifications(); }
/** * Return all the loaded specifications. */
Return all the loaded specifications
allSpecifications
{ "repo_name": "niv0/isis", "path": "core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/SpecificationLoader.java", "license": "apache-2.0", "size": 18716 }
[ "java.util.Collection", "org.apache.isis.core.metamodel.spec.ObjectSpecification" ]
import java.util.Collection; import org.apache.isis.core.metamodel.spec.ObjectSpecification;
import java.util.*; import org.apache.isis.core.metamodel.spec.*;
[ "java.util", "org.apache.isis" ]
java.util; org.apache.isis;
2,641,488
@Test public void testRemove() { dao.save(vnicProfile); VnicProfile result = dao.get(vnicProfile.getId()); assertNotNull(result); dao.remove(vnicProfile.getId()); assertNull(dao.get(vnicProfile.getId())); }
void function() { dao.save(vnicProfile); VnicProfile result = dao.get(vnicProfile.getId()); assertNotNull(result); dao.remove(vnicProfile.getId()); assertNull(dao.get(vnicProfile.getId())); }
/** * Ensures that the remove is working correctly */
Ensures that the remove is working correctly
testRemove
{ "repo_name": "jtux270/translate", "path": "ovirt/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/VnicProfileDaoTest.java", "license": "gpl-3.0", "size": 4173 }
[ "org.junit.Assert", "org.ovirt.engine.core.common.businessentities.network.VnicProfile" ]
import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.network.VnicProfile;
import org.junit.*; import org.ovirt.engine.core.common.businessentities.network.*;
[ "org.junit", "org.ovirt.engine" ]
org.junit; org.ovirt.engine;
387,331
public Template getTemplate() { return template; }
Template function() { return template; }
/** * Gets the template. * @return the template. */
Gets the template
getTemplate
{ "repo_name": "dimipapadeas/openwis", "path": "openwis-metadataportal/openwis-portal/src/main/java/org/openwis/metadataportal/services/metadata/dto/CreateMetadataDTO.java", "license": "gpl-3.0", "size": 1723 }
[ "org.openwis.metadataportal.model.metadata.Template" ]
import org.openwis.metadataportal.model.metadata.Template;
import org.openwis.metadataportal.model.metadata.*;
[ "org.openwis.metadataportal" ]
org.openwis.metadataportal;
1,723,093
public JMenuItem getMenuItem(FlowMultiPagePane multi) { JMenuItem result; result = new JMenuItem(getName()); result.setIcon(getIcon()); result.setEnabled( ((multi.getSelectedIndices().length == 1) && multi.hasCurrentPanel() && !multi.getCurrentPanel().isRunning() && !mu...
JMenuItem function(FlowMultiPagePane multi) { JMenuItem result; result = new JMenuItem(getName()); result.setIcon(getIcon()); result.setEnabled( ((multi.getSelectedIndices().length == 1) && multi.hasCurrentPanel() && !multi.getCurrentPanel().isRunning() && !multi.getCurrentPanel().isStopping() && !multi.getCurrentPanel...
/** * Creates the menu item. */
Creates the menu item
getMenuItem
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/flow/multipageaction/CleanUp.java", "license": "gpl-3.0", "size": 2329 }
[ "java.awt.event.ActionEvent", "javax.swing.JMenuItem" ]
import java.awt.event.ActionEvent; import javax.swing.JMenuItem;
import java.awt.event.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,007,972
public String[] getConsumerKeys(APIIdentifier identifier) throws APIManagementException { Set<String> consumerKeys = new HashSet<String>(); Connection connection = null; PreparedStatement prepStmt = null; ResultSet rs = null; int apiId; String sqlQuery = "SELECT " ...
String[] function(APIIdentifier identifier) throws APIManagementException { Set<String> consumerKeys = new HashSet<String>(); Connection connection = null; PreparedStatement prepStmt = null; ResultSet rs = null; int apiId; String sqlQuery = STR + STR + STR + STR + STR + STR + STR + STR; try { connection = APIMgtDBUtil....
/** * Returns all the consumerkeys of application which are subscribed for the given api * * @param identifier APIIdentifier * @return Consumerkeys * @throws org.wso2.carbon.apimgt.api.APIManagementException if failed to get Applications for given subscriber. */
Returns all the consumerkeys of application which are subscribed for the given api
getConsumerKeys
{ "repo_name": "rnavagamuwa/custom-carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java", "license": "apache-2.0", "size": 404796 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException", "java.util.HashSet", "java.util.Set", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.APIIdentifier", "org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.HashSet; import java.util.Set; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.impl.util...
import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.sql", "java.util", "org.wso2.carbon" ]
java.sql; java.util; org.wso2.carbon;
1,704,983
private static void fillParamsWithPerson(PreparedStatement stmt, int personIdx) throws SQLException { int paramCnt = 1; stmt.setString(paramCnt++, "p" + personIdx); stmt.setInt(paramCnt++, personIdx); stmt.setString(paramCnt++, "Name" + personIdx); stmt.setString(paramCnt++,...
static void function(PreparedStatement stmt, int personIdx) throws SQLException { int paramCnt = 1; stmt.setString(paramCnt++, "p" + personIdx); stmt.setInt(paramCnt++, personIdx); stmt.setString(paramCnt++, "Name" + personIdx); stmt.setString(paramCnt++, STR + personIdx); stmt.setInt(paramCnt++, 20 + personIdx); }
/** * Fills PreparedStatement's parameters with fields of some Person generated by index. * * @param stmt PreparedStatement to fill * @param personIdx number to generate Person's fields. * @throws SQLException on error. */
Fills PreparedStatement's parameters with fields of some Person generated by index
fillParamsWithPerson
{ "repo_name": "nizhikov/ignite", "path": "modules/clients/src/test/java/org/apache/ignite/jdbc/thin/JdbcThinBatchSelfTest.java", "license": "apache-2.0", "size": 30629 }
[ "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,380,284
@Test public void testPoly1305TestVector2() throws GeneralSecurityException { byte[] key = TestUtil.hexDecode("" + "00000000000000000000000000000000" + "36e5f6b5c5e06070f0efca96227a863e"); byte[] in = ( "Any submission to the IETF intended by the Contributor for publication as all or...
void function() throws GeneralSecurityException { byte[] key = TestUtil.hexDecode(STR00000000000000000000000000000000STR36e5f6b5c5e06070f0efca96227a863eSTRAny submission to the IETF intended by the Contributor for publication as all or STRpart of an IETF Internet-Draft or RFC and any statement made within the context S...
/** * Tests against the test vector 2 in Appendix A.3 of RFC 7539. * https://tools.ietf.org/html/rfc7539#appendix-A.3 */
Tests against the test vector 2 in Appendix A.3 of RFC 7539. HREF
testPoly1305TestVector2
{ "repo_name": "google/tink", "path": "java_src/src/test/java/com/google/crypto/tink/subtle/Poly1305Test.java", "license": "apache-2.0", "size": 12560 }
[ "com.google.common.truth.Truth", "com.google.crypto.tink.testing.TestUtil", "java.security.GeneralSecurityException" ]
import com.google.common.truth.Truth; import com.google.crypto.tink.testing.TestUtil; import java.security.GeneralSecurityException;
import com.google.common.truth.*; import com.google.crypto.tink.testing.*; import java.security.*;
[ "com.google.common", "com.google.crypto", "java.security" ]
com.google.common; com.google.crypto; java.security;
2,371,604
default DataLakeEndpointConsumerBuilder runLoggingLevel( LoggingLevel runLoggingLevel) { doSetProperty("runLoggingLevel", runLoggingLevel); return this; }
default DataLakeEndpointConsumerBuilder runLoggingLevel( LoggingLevel runLoggingLevel) { doSetProperty(STR, runLoggingLevel); return this; }
/** * The consumer logs a start/complete log line when it polls. This * option allows you to configure the logging level for that. * * The option is a: * &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. * * Default: TRACE * Group: sch...
The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that. The option is a: &lt;code&gt;org.apache.camel.LoggingLevel&lt;/code&gt; type. Default: TRACE Group: scheduler
runLoggingLevel
{ "repo_name": "pax95/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/DataLakeEndpointBuilderFactory.java", "license": "apache-2.0", "size": 105280 }
[ "org.apache.camel.LoggingLevel" ]
import org.apache.camel.LoggingLevel;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
1,607,262
@Override public void exitEnumBody(@NotNull Java7Parser.EnumBodyContext ctx) { }
@Override public void exitEnumBody(@NotNull Java7Parser.EnumBodyContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterEnumBody
{ "repo_name": "jsteenbeeke/antlr-java-parser", "path": "src/main/java/com/github/antlrjavaparser/Java7ParserBaseListener.java", "license": "lgpl-3.0", "size": 53492 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,899,260
public Builder setTime(final DateTime value) { _time = value; return this; }
Builder function(final DateTime value) { _time = value; return this; }
/** * Sets the time field. * * @param value Value * @return This builder */
Sets the time field
setTime
{ "repo_name": "groupon/metrics", "path": "tsd/tsd-aggregator/src/main/java/com/arpnetworking/tsdaggregator/model/querylog/Version2e.java", "license": "apache-2.0", "size": 13490 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
956,210
public Script getMainVilScript();
Script function();
/** * Returns the main VIL script of the project. * * @return the main VIL script */
Returns the main VIL script of the project
getMainVilScript
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/de.uni_hildesheim.sse.easy.instantiatorCore/src/net/ssehub/easy/instantiation/core/model/vilTypes/IProjectDescriptor.java", "license": "apache-2.0", "size": 2109 }
[ "net.ssehub.easy.instantiation.core.model.buildlangModel.Script" ]
import net.ssehub.easy.instantiation.core.model.buildlangModel.Script;
import net.ssehub.easy.instantiation.core.model.*;
[ "net.ssehub.easy" ]
net.ssehub.easy;
2,003,807
public AllOutAttackType getAllOutAttackType() { return this.allOutAttackType; }
AllOutAttackType function() { return this.allOutAttackType; }
/** * Every character must choose a type of AllOutAttack. * * @return type of all out attack for this character * @see AllOutAttackType */
Every character must choose a type of AllOutAttack
getAllOutAttackType
{ "repo_name": "guildenstern70/jurpe", "path": "jurpe/src/main/java/net/littlelite/jurpe/characters/PCharacter.java", "license": "gpl-2.0", "size": 33722 }
[ "net.littlelite.jurpe.combat.AllOutAttackType" ]
import net.littlelite.jurpe.combat.AllOutAttackType;
import net.littlelite.jurpe.combat.*;
[ "net.littlelite.jurpe" ]
net.littlelite.jurpe;
1,829,362
public DurationActivity[] getLongestRunning( DurationMetric metric ) throws AccessDeniedException, RepositoryException;
DurationActivity[] function( DurationMetric metric ) throws AccessDeniedException, RepositoryException;
/** * Get the longest-running activities recorded for the specified metric. The results contain the duration records in order of * increasing duration, with the activity with the longest duration appearing last in the array. * * @param metric the duration metric; may not be null * @return the ...
Get the longest-running activities recorded for the specified metric. The results contain the duration records in order of increasing duration, with the activity with the longest duration appearing last in the array
getLongestRunning
{ "repo_name": "weebl2000/modeshape", "path": "modeshape-jcr-api/src/main/java/org/modeshape/jcr/api/monitor/RepositoryMonitor.java", "license": "apache-2.0", "size": 7999 }
[ "javax.jcr.AccessDeniedException", "javax.jcr.RepositoryException" ]
import javax.jcr.AccessDeniedException; import javax.jcr.RepositoryException;
import javax.jcr.*;
[ "javax.jcr" ]
javax.jcr;
2,061,150
@Test public void initiateMessageTest27() throws PcepParseException, PcepOutOfBoundMessageException { // SRP, LSP (SymbolicPathNameTlv, SymbolicPathNameTlv), END-POINTS, ERO, LSPA, BANDWIDTH, METRIC OBJECT. // byte[] initiateCreationMsg = new byte[]{0x20, 0x0C, 0x00, (byte) 0x60, ...
void function() throws PcepParseException, PcepOutOfBoundMessageException { 0x21, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, 0x04, 0x12, 0x00, 0x0C, 0x01...
/** * This test case checks for SRP, LSP (SymbolicPathNameTlv, SymbolicPathNameTlv), END-POINTS, ERO, LSPA, * BANDWIDTH, METRIC OBJECT objects in PcInitiate message. */
This test case checks for SRP, LSP (SymbolicPathNameTlv, SymbolicPathNameTlv), END-POINTS, ERO, LSPA, BANDWIDTH, METRIC OBJECT objects in PcInitiate message
initiateMessageTest27
{ "repo_name": "sonu283304/onos", "path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepInitiateMsgExtTest.java", "license": "apache-2.0", "size": 81890 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.Is", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException", "org.onosproject.pcepio.exceptions.PcepParseException" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException;
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcepio" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio;
1,652,571
public boolean isListMatching(int startPosition, ReadOnlyTask... tasks) throws IllegalArgumentException { if (tasks.length + startPosition != getListView().getItems().size()) { throw new IllegalArgumentException("List size mismatched\n" + "Expected " + (getListView().getItems...
boolean function(int startPosition, ReadOnlyTask... tasks) throws IllegalArgumentException { if (tasks.length + startPosition != getListView().getItems().size()) { throw new IllegalArgumentException(STR + STR + (getListView().getItems().size() - 1) + STR + STR + tasks.length); } assertTrue(this.containsInOrder(startPos...
/** * Returns true if the list is showing the task details correctly and in correct order. * @param startPosition The starting position of the sub list. * @param tasks A list of tasks in the correct order. */
Returns true if the list is showing the task details correctly and in correct order
isListMatching
{ "repo_name": "CS2103AUG2016-W13-C1/main", "path": "src/test/java/guitests/guihandles/TaskListPanelHandle.java", "license": "mit", "size": 5858 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,211,757
private void freezeConnections() { activation.freezeConnections(remotingService); // after disconnecting all the clients close all the server sessions so any messages in delivery will be cancelled back to the queue for (ServerSession serverSession : sessions.values()) { try { ...
void function() { activation.freezeConnections(remotingService); for (ServerSession serverSession : sessions.values()) { try { serverSession.close(true); } catch (Exception e) { e.printStackTrace(); } } }
/** * Freeze all connections. * <p> * If replicating, avoid freezing the replication connection. Helper method for * {@link #stop(boolean, boolean, boolean)}. */
Freeze all connections. If replicating, avoid freezing the replication connection. Helper method for <code>#stop(boolean, boolean, boolean)</code>
freezeConnections
{ "repo_name": "thiagokronig/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java", "license": "apache-2.0", "size": 73325 }
[ "org.apache.activemq.artemis.core.server.ServerSession" ]
import org.apache.activemq.artemis.core.server.ServerSession;
import org.apache.activemq.artemis.core.server.*;
[ "org.apache.activemq" ]
org.apache.activemq;
97,237
@Override public boolean aliasTo(DataTreeNode node) { if (node.getClass() != ConcurrentTreeNode.class) { return false; } requireEditable(); if (hasNodes()) { return false; } ((ConcurrentTreeNode) node).requireNodeDB(); nodedb = ((Co...
boolean function(DataTreeNode node) { if (node.getClass() != ConcurrentTreeNode.class) { return false; } requireEditable(); if (hasNodes()) { return false; } ((ConcurrentTreeNode) node).requireNodeDB(); nodedb = ((ConcurrentTreeNode) node).nodedb; markAlias(); return true; }
/** * link this node (aliasing) to another node in the tree. they will share * children, but not meta-data. should only be called from within a * TreeNodeInitializer passed to getOrCreateEditableNode. */
link this node (aliasing) to another node in the tree. they will share children, but not meta-data. should only be called from within a TreeNodeInitializer passed to getOrCreateEditableNode
aliasTo
{ "repo_name": "mythguided/hydra", "path": "hydra-data/src/main/java/com/addthis/hydra/data/tree/concurrent/ConcurrentTreeNode.java", "license": "apache-2.0", "size": 19158 }
[ "com.addthis.hydra.data.tree.DataTreeNode" ]
import com.addthis.hydra.data.tree.DataTreeNode;
import com.addthis.hydra.data.tree.*;
[ "com.addthis.hydra" ]
com.addthis.hydra;
2,659,031
public Vector<org.w3c.dom.Node> buildSubTree(Element docEle, String tag) { Vector<org.w3c.dom.Node> subElements = null; NodeList nl = docEle.getElementsByTagName(tag); if (nl != null && nl.getLength() > 0) { subElements = new Vector<org.w3c.dom.Node>(); for (int i = 0; i < nl.getLength(); i++)...
Vector<org.w3c.dom.Node> function(Element docEle, String tag) { Vector<org.w3c.dom.Node> subElements = null; NodeList nl = docEle.getElementsByTagName(tag); if (nl != null && nl.getLength() > 0) { subElements = new Vector<org.w3c.dom.Node>(); for (int i = 0; i < nl.getLength(); i++) { subElements.add(nl.item(i)); } } r...
/** * Build SubTree of Node * * @param docEle * @param tag * @return */
Build SubTree of Node
buildSubTree
{ "repo_name": "IITB-Panda/autoperf", "path": "src/main/java/in/ac/iitb/cse/autoperf/XmlParser.java", "license": "gpl-3.0", "size": 4732 }
[ "java.util.Vector", "org.w3c.dom.Element", "org.w3c.dom.NodeList" ]
import java.util.Vector; import org.w3c.dom.Element; import org.w3c.dom.NodeList;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
85,454
public void writePacketData(PacketBuffer p_148840_1_) throws IOException { p_148840_1_.writeStringToBuffer(this.field_149440_a); }
void function(PacketBuffer p_148840_1_) throws IOException { p_148840_1_.writeStringToBuffer(this.field_149440_a); }
/** * Writes the raw packet data to the data stream. */
Writes the raw packet data to the data stream
writePacketData
{ "repo_name": "CheeseL0ver/Ore-TTM", "path": "build/tmp/recompSrc/net/minecraft/network/play/client/C01PacketChatMessage.java", "license": "lgpl-2.1", "size": 1868 }
[ "java.io.IOException", "net.minecraft.network.PacketBuffer" ]
import java.io.IOException; import net.minecraft.network.PacketBuffer;
import java.io.*; import net.minecraft.network.*;
[ "java.io", "net.minecraft.network" ]
java.io; net.minecraft.network;
2,677,592
@Override public boolean isValid(Field field) { return field.isValidPlayerId(playerId); }
boolean function(Field field) { return field.isValidPlayerId(playerId); }
/** * Checks whether this action is valid in the current field. * In this case, the action is valid if the player exists. * * @param field The current field * @return true iff the action is valid */
Checks whether this action is valid in the current field. In this case, the action is valid if the player exists
isValid
{ "repo_name": "lfdversluis/FDDG", "path": "server/FDDG-server/src/nl/tud/dcs/fddg/game/actions/DamageAction.java", "license": "mit", "size": 1611 }
[ "nl.tud.dcs.fddg.game.Field" ]
import nl.tud.dcs.fddg.game.Field;
import nl.tud.dcs.fddg.game.*;
[ "nl.tud.dcs" ]
nl.tud.dcs;
2,574,500
protected void addDiagramaPropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NavegacionDiagrama_diagrama_feature"), getString("_UI_PropertyDesc...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisualizacionPackage.Literals.NAVEGACION_DIAGRAMA__DIAGRAMA, true, false, true, null, null, null)...
/** * This adds a property descriptor for the Diagrama feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Diagrama feature.
addDiagramaPropertyDescriptor
{ "repo_name": "lfmendivelso10/AppModernization", "path": "source/i2/VisualizacionMetricas3.edit/src/visualizacionMetricas3/visualizacion/provider/DiagramaItemProvider.java", "license": "mit", "size": 10796 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,551,122
public ApplicationGatewayProbeHealthResponseMatch withStatusCodes(List<String> statusCodes) { this.statusCodes = statusCodes; return this; }
ApplicationGatewayProbeHealthResponseMatch function(List<String> statusCodes) { this.statusCodes = statusCodes; return this; }
/** * Set allowed ranges of healthy status codes. Default range of healthy status codes is 200-399. * * @param statusCodes the statusCodes value to set * @return the ApplicationGatewayProbeHealthResponseMatch object itself. */
Set allowed ranges of healthy status codes. Default range of healthy status codes is 200-399
withStatusCodes
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/ApplicationGatewayProbeHealthResponseMatch.java", "license": "mit", "size": 2080 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
149,861
public ServiceBusProcessorClientBuilder receiveMode(ServiceBusReceiveMode receiveMode) { serviceBusReceiverClientBuilder.receiveMode(receiveMode); return this; }
ServiceBusProcessorClientBuilder function(ServiceBusReceiveMode receiveMode) { serviceBusReceiverClientBuilder.receiveMode(receiveMode); return this; }
/** * Sets the receive mode for the processor. * @param receiveMode Mode for receiving messages. * * @return The modified {@link ServiceBusProcessorClientBuilder} object. */
Sets the receive mode for the processor
receiveMode
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusClientBuilder.java", "license": "mit", "size": 95190 }
[ "com.azure.messaging.servicebus.models.ServiceBusReceiveMode" ]
import com.azure.messaging.servicebus.models.ServiceBusReceiveMode;
import com.azure.messaging.servicebus.models.*;
[ "com.azure.messaging" ]
com.azure.messaging;
778,253
SimpleString getFilterString();
SimpleString getFilterString();
/** * Returns the queue's filter string (or {@code null} if the queue has no filter). */
Returns the queue's filter string (or null if the queue has no filter)
getFilterString
{ "repo_name": "tabish121/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientSession.java", "license": "apache-2.0", "size": 54407 }
[ "org.apache.activemq.artemis.api.core.SimpleString" ]
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,555,902
public void verifySet(@SuppressWarnings("rawtypes") Set val1, @SuppressWarnings("rawtypes") Set val2) { Assert.assertEquals(val1.size(), val2.size()); for (@SuppressWarnings("rawtypes") Iterator elems = val1.iterator(); elems.hasNext();) { Assert.assertTrue(val2.contains(elems.ne...
void function(@SuppressWarnings(STR) Set val1, @SuppressWarnings(STR) Set val2) { Assert.assertEquals(val1.size(), val2.size()); for (@SuppressWarnings(STR) Iterator elems = val1.iterator(); elems.hasNext();) { Assert.assertTrue(val2.contains(elems.next())); } }
/** * Verify set. * @param val1 Val1. * @param val2 Val2. */
Verify set
verifySet
{ "repo_name": "Eisler/cosmo", "path": "cosmo-core/src/test/unit/java/org/unitedinternet/cosmo/dao/hibernate/HibernateTestHelper.java", "license": "apache-2.0", "size": 9559 }
[ "java.util.Iterator", "java.util.Set", "org.junit.Assert" ]
import java.util.Iterator; import java.util.Set; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
328,206
private void substituteDescriptors(OperationItem changedOp) { // Selection of the old OperationItem OperationItem operationItem = map.get(changedOp.getName()); // Check if the item is present boolean present = operationItem != null && !operatio...
void function(OperationItem changedOp) { OperationItem operationItem = map.get(changedOp.getName()); boolean present = operationItem != null && !operationItem.getVendor().equalsIgnoreCase(changedOp.getVendor()); Object factory = changedOp.getCurrentFactory(); if (present) { Object currentFactory = operationItem.getCurr...
/** * This method substitute an old {@link OperationItem} object with a new one, if not already present. * * @param changedOp */
This method substitute an old <code>OperationItem</code> object with a new one, if not already present
substituteDescriptors
{ "repo_name": "dromagnoli/jai-ext", "path": "jt-utilities/src/main/java/it/geosolutions/jaiext/ConcurrentOperationRegistry.java", "license": "apache-2.0", "size": 44655 }
[ "javax.media.jai.registry.RenderedRegistryMode" ]
import javax.media.jai.registry.RenderedRegistryMode;
import javax.media.jai.registry.*;
[ "javax.media" ]
javax.media;
1,593,246
private void checkRecursiveDisplay(Block currrentBlock, DocumentReference documentReference) throws MacroExecutionException { // Try to find recursion in the thread Stack<Object> references = this.displaysBeingExecuted.get(); if (references != null && references.contains(document...
void function(Block currrentBlock, DocumentReference documentReference) throws MacroExecutionException { Stack<Object> references = this.displaysBeingExecuted.get(); if (references != null && references.contains(documentReference)) { throw new MacroExecutionException(STR + documentReference + "]"); } }
/** * Protect form recursive display. * * @param currrentBlock the child block to check * @param documentReference the reference of the document being included * @throws MacroExecutionException recursive inclusion has been found */
Protect form recursive display
checkRecursiveDisplay
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-macro/src/main/java/org/xwiki/rendering/internal/macro/display/DisplayMacro.java", "license": "lgpl-2.1", "size": 8733 }
[ "java.util.Stack", "org.xwiki.model.reference.DocumentReference", "org.xwiki.rendering.block.Block", "org.xwiki.rendering.macro.MacroExecutionException" ]
import java.util.Stack; import org.xwiki.model.reference.DocumentReference; import org.xwiki.rendering.block.Block; import org.xwiki.rendering.macro.MacroExecutionException;
import java.util.*; import org.xwiki.model.reference.*; import org.xwiki.rendering.block.*; import org.xwiki.rendering.macro.*;
[ "java.util", "org.xwiki.model", "org.xwiki.rendering" ]
java.util; org.xwiki.model; org.xwiki.rendering;
1,297,410
private void createAddressRecord(BlacklistDTO entry) throws ParseException { checkForEmptyRecord("ADDRESS", Column.ADDRESS_1, Column.ADDRESS_2, Column.CITY, Column.STATE_PROVINCE, Column.POSTAL_CODE, Column.COUNTRY_CODE); ContactDTO newContact = new ContactDTO(); newContact....
void function(BlacklistDTO entry) throws ParseException { checkForEmptyRecord(STR, Column.ADDRESS_1, Column.ADDRESS_2, Column.CITY, Column.STATE_PROVINCE, Column.POSTAL_CODE, Column.COUNTRY_CODE); ContactDTO newContact = new ContactDTO(); newContact.setCreateDate(new Date()); newContact.setDeleted(0); newContact.setAdd...
/** * Creates an address blacklist entry. */
Creates an address blacklist entry
createAddressRecord
{ "repo_name": "liquidJbilling/LT-Jbilling-MsgQ-3.1", "path": "src/java/com/sapienter/jbilling/server/payment/blacklist/CsvProcessor.java", "license": "agpl-3.0", "size": 13052 }
[ "com.sapienter.jbilling.server.payment.blacklist.db.BlacklistDTO", "com.sapienter.jbilling.server.user.contact.db.ContactDTO", "java.util.Date" ]
import com.sapienter.jbilling.server.payment.blacklist.db.BlacklistDTO; import com.sapienter.jbilling.server.user.contact.db.ContactDTO; import java.util.Date;
import com.sapienter.jbilling.server.payment.blacklist.db.*; import com.sapienter.jbilling.server.user.contact.db.*; import java.util.*;
[ "com.sapienter.jbilling", "java.util" ]
com.sapienter.jbilling; java.util;
1,070,162
@Override public void run() { boolean lastPacketInBlock = false; final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; while (isRunning() && !lastPacketInBlock) { long totalAckTimeNanos = 0; boolean isInterrupted = false; try { Packet ...
void function() { boolean lastPacketInBlock = false; final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0; while (isRunning() && !lastPacketInBlock) { long totalAckTimeNanos = 0; boolean isInterrupted = false; try { Packet pkt = null; long expected = -2; PipelineAck ack = new PipelineAck(); lon...
/** * Thread to process incoming acks. * @see java.lang.Runnable#run() */
Thread to process incoming acks
run
{ "repo_name": "vlajos/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java", "license": "apache-2.0", "size": 59282 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck", "org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck; import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos;
import java.io.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.protocol.proto.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,518,362
public static MozuClient<com.mozu.api.contracts.commerceruntime.returns.Return> deleteOrderItemClient(String returnId, String returnItemId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.deleteOrderItemUrl(returnId, returnItemId); String verb = "DELETE"; Class<?> clz = com.mozu.api.cont...
static MozuClient<com.mozu.api.contracts.commerceruntime.returns.Return> function(String returnId, String returnItemId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.ReturnUrl.deleteOrderItemUrl(returnId, returnItemId); String verb = STR; Class<?> clz = com.mozu.api.contracts.commerceruntime.returns.Retur...
/** * Removes a particular order item from the order of the current shopper. * <p><pre><code> * MozuClient<com.mozu.api.contracts.commerceruntime.returns.Return> mozuClient=DeleteOrderItemClient( returnId, returnItemId); * client.setBaseAddress(url); * client.executeRequest(); * Return return = client.Resu...
Removes a particular order item from the order of the current shopper. <code><code> MozuClient mozuClient=DeleteOrderItemClient( returnId, returnItemId); client.setBaseAddress(url); client.executeRequest(); Return return = client.Result(); </code></code>
deleteOrderItemClient
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/ReturnClient.java", "license": "mit", "size": 38313 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
715,272
public void open() { // setup for locks m_locks = new Hashtable(); }
void function() { m_locks = new Hashtable(); }
/** * Open and be ready to read / write. */
Open and be ready to read / write
open
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/kernel-storage-util/src/main/java/org/sakaiproject/util/BaseDbDoubleStorage.java", "license": "apache-2.0", "size": 53439 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
1,707,858
@GET List<User> getUsers();
List<User> getUsers();
/** * Retrieves a list of all users. * * @return List */
Retrieves a list of all users
getUsers
{ "repo_name": "loveingenioustech/demo", "path": "appfuse-demo/src/main/java/demo/service/UserService.java", "license": "mit", "size": 1402 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,058,085
@SuppressWarnings("unchecked") private static void validateComputedColumns(IBaseDataSetDesign bdsd) throws DataException { //check whether dependency cycle exist in computed columns List<IComputedColumn> ccs = bdsd.getComputedColumns( ); if (ccs != null) { //used check whether reference cycle exists ...
@SuppressWarnings(STR) static void function(IBaseDataSetDesign bdsd) throws DataException { List<IComputedColumn> ccs = bdsd.getComputedColumns( ); if (ccs != null) { Set<NamedExpression> namedExpressions = new HashSet<NamedExpression>( ); for (IComputedColumn cc : ccs) { String name = cc.getName( ); if (name == null n...
/** * Check whether computed columns defined in data set are valid * @param bdsd * @throws DataException */
Check whether computed columns defined in data set are valid
validateComputedColumns
{ "repo_name": "sguan-actuate/birt", "path": "data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/impl/PreparedQueryUtil.java", "license": "epl-1.0", "size": 36173 }
[ "java.util.HashSet", "java.util.List", "java.util.Set", "org.eclipse.birt.core.data.ExpressionUtil", "org.eclipse.birt.data.engine.api.IBaseDataSetDesign", "org.eclipse.birt.data.engine.api.IBaseExpression", "org.eclipse.birt.data.engine.api.IComputedColumn", "org.eclipse.birt.data.engine.core.DataExc...
import java.util.HashSet; import java.util.List; import java.util.Set; import org.eclipse.birt.core.data.ExpressionUtil; import org.eclipse.birt.data.engine.api.IBaseDataSetDesign; import org.eclipse.birt.data.engine.api.IBaseExpression; import org.eclipse.birt.data.engine.api.IComputedColumn; import org.eclipse.birt.d...
import java.util.*; import org.eclipse.birt.core.data.*; import org.eclipse.birt.data.engine.api.*; import org.eclipse.birt.data.engine.core.*; import org.eclipse.birt.data.engine.expression.*; import org.eclipse.birt.data.engine.i18n.*;
[ "java.util", "org.eclipse.birt" ]
java.util; org.eclipse.birt;
671,898
public void eventAdd(final EventRequest request) { final EventRequest eventRequest = request;
void function(final EventRequest request) { final EventRequest eventRequest = request;
/** * Google Places API Add Event: calls placeDetailsEventAdded() * {@link} https://developers.google.com/places/documentation/actions#event_intro * @param request com.appdynamics.demo.gasp.model.EventRequest */
Google Places API Add Event: calls placeDetailsEventAdded() HREF
eventAdd
{ "repo_name": "mqprichard/gasp-android", "path": "src/androidTestIntegration/java/com.cloudbees.demo.gasp/location/PlaceEventsTest.java", "license": "apache-2.0", "size": 12588 }
[ "com.appdynamics.demo.gasp.model.EventRequest" ]
import com.appdynamics.demo.gasp.model.EventRequest;
import com.appdynamics.demo.gasp.model.*;
[ "com.appdynamics.demo" ]
com.appdynamics.demo;
2,700,448
public @Nonnull LbPersistence getPersistence() { return (persistence == null ? LbPersistence.NONE : persistence); }
@Nonnull LbPersistence function() { return (persistence == null ? LbPersistence.NONE : persistence); }
/** * Indicates the stickiness of any client sessions using this listener to communicate to endpoints behind * the load balancer. * @return the load balancer persistence strategy */
Indicates the stickiness of any client sessions using this listener to communicate to endpoints behind the load balancer
getPersistence
{ "repo_name": "unwin/dasein-cloud-core", "path": "src/main/java/org/dasein/cloud/network/LbListener.java", "license": "apache-2.0", "size": 10593 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,878,027
protected int getHighSchoolNackaCitizenPlacementCount(String studyPathPrefix) throws RemoteException{ PreparedQuery query = null; ReportBusiness rb = getReportBusiness(); query = getQuery(QUERY_NACKA_COMMUNE); if (query == null) { query = new PreparedQuery(getConnection()); query.setSelectCountDistinct...
int function(String studyPathPrefix) throws RemoteException{ PreparedQuery query = null; ReportBusiness rb = getReportBusiness(); query = getQuery(QUERY_NACKA_COMMUNE); if (query == null) { query = new PreparedQuery(getConnection()); query.setSelectCountDistinctUsers(); query.setPlacements(rb.getSchoolSeasonId()); quer...
/** * Returns the number of student placements for private high schools * in Nacka commune for the specified school year. * Only citizens in Nacka commune are counted. */
Returns the number of student placements for private high schools in Nacka commune for the specified school year. Only citizens in Nacka commune are counted
getHighSchoolNackaCitizenPlacementCount
{ "repo_name": "idega/platform2", "path": "src/se/idega/idegaweb/commune/school/report/business/NackaPrivateHighSchoolPlacementReportModel.java", "license": "gpl-3.0", "size": 14520 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
1,764,469
public void describe(PrintWriter pw, boolean omitDefaults) { final Bean properties = getBean(); final String[] propertyNames = properties.getPropertyNames(); int count = 0; for (String key : propertyNames) { final Object value = bean.get(key); final Object defaultValue = DEFAULT_BEAN.get(k...
void function(PrintWriter pw, boolean omitDefaults) { final Bean properties = getBean(); final String[] propertyNames = properties.getPropertyNames(); int count = 0; for (String key : propertyNames) { final Object value = bean.get(key); final Object defaultValue = DEFAULT_BEAN.get(key); if (Objects.equals(value, defaul...
/** * Prints the property settings of this pretty-writer to a writer. * * @param pw Writer * @param omitDefaults Whether to omit properties whose value is the same as * the default */
Prints the property settings of this pretty-writer to a writer
describe
{ "repo_name": "wanglan/calcite", "path": "core/src/main/java/org/apache/calcite/sql/pretty/SqlPrettyWriter.java", "license": "apache-2.0", "size": 32659 }
[ "java.io.PrintWriter", "java.util.Objects" ]
import java.io.PrintWriter; import java.util.Objects;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
109,307
@Override public RoundingMode getRoundingMode() { return roundingMode; }
RoundingMode function() { return roundingMode; }
/** * Gets the {@link java.math.RoundingMode} used in this DecimalFormat. * * @return The <code>RoundingMode</code> used for this DecimalFormat. * @see #setRoundingMode(RoundingMode) * @since 1.6 */
Gets the <code>java.math.RoundingMode</code> used in this DecimalFormat
getRoundingMode
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jdk/src/java.base/share/classes/java/text/DecimalFormat.java", "license": "gpl-2.0", "size": 179545 }
[ "java.math.RoundingMode" ]
import java.math.RoundingMode;
import java.math.*;
[ "java.math" ]
java.math;
2,102,709
public void remove(MenuComponent menu) { if (menu == menuBar) { if (menuBar != null) { if (peer != null) { ((FramePeer) peer).setMenuBar(null); menuBar.removeNotify(); } menuBar.setParent(null); } menuBar = null; } else super.remove(menu); }
void function(MenuComponent menu) { if (menu == menuBar) { if (menuBar != null) { if (peer != null) { ((FramePeer) peer).setMenuBar(null); menuBar.removeNotify(); } menuBar.setParent(null); } menuBar = null; } else super.remove(menu); }
/** * Removes the specified menu component from this frame. If it is * the current MenuBar it is removed from the frame. If it is a * Popup it is removed from this component. If it is any other menu * component it is ignored. * * @param menu the menu component to remove */
Removes the specified menu component from this frame. If it is the current MenuBar it is removed from the frame. If it is a Popup it is removed from this component. If it is any other menu component it is ignored
remove
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/java/awt/Frame.java", "license": "gpl-2.0", "size": 17494 }
[ "java.awt.peer.FramePeer" ]
import java.awt.peer.FramePeer;
import java.awt.peer.*;
[ "java.awt" ]
java.awt;
2,365,999
@LogMessage(level = WARN) @Message( value = "Attempted to specify unsupported NamingStrategy via Ant task argument. " + "NamingStrategy has been removed in favor of the split ImplicitNamingStrategy and " + "PhysicalNamingStrategy.", id = 90000008 ) void logDeprecatedNamingStrategyAntArgument();
@LogMessage(level = WARN) @Message( value = STR + STR + STR, id = 90000008 ) void logDeprecatedNamingStrategyAntArgument();
/** * Log a warning about an attempt to specify unsupported NamingStrategy */
Log a warning about an attempt to specify unsupported NamingStrategy
logDeprecatedNamingStrategyAntArgument
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/internal/log/DeprecationLogger.java", "license": "lgpl-2.1", "size": 8165 }
[ "org.jboss.logging.annotations.LogMessage", "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
807,456
@Test public void testSerializeDeserializeBinaryEquals() { final AfterConstructorFailedEvent event1 = new AfterConstructorFailedEvent(TSTAMP, TRACE_ID, ORDER_INDEX, FQ_OPERATION_SIGNATURE, FQ_CLASSNAME, CAUSE); Assert.assertEquals("Unexpected timestamp", TSTAMP, event1.getTimestamp()); Assert.assertEquals("...
void function() { final AfterConstructorFailedEvent event1 = new AfterConstructorFailedEvent(TSTAMP, TRACE_ID, ORDER_INDEX, FQ_OPERATION_SIGNATURE, FQ_CLASSNAME, CAUSE); Assert.assertEquals(STR, TSTAMP, event1.getTimestamp()); Assert.assertEquals(STR, TRACE_ID, event1.getTraceId()); Assert.assertEquals(STR, ORDER_INDEX...
/** * Tests the constructor and writeBytes(..) methods of {@link AfterConstructorFailedEvent}. */
Tests the constructor and writeBytes(..) methods of <code>AfterConstructorFailedEvent</code>
testSerializeDeserializeBinaryEquals
{ "repo_name": "leadwire-apm/leadwire-javaagent", "path": "leadwire-common/test/kieker/test/common/junit/record/flow/trace/operation/constructor/TestAfterConstructorFailedEvent.java", "license": "apache-2.0", "size": 4638 }
[ "java.nio.ByteBuffer", "org.junit.Assert" ]
import java.nio.ByteBuffer; import org.junit.Assert;
import java.nio.*; import org.junit.*;
[ "java.nio", "org.junit" ]
java.nio; org.junit;
2,492,114
public String fetchStore(int nodeId, String storeName, String storeDir, long pushVersion, long timeoutMs) { VAdminProto.FetchStoreRequest.Builder fetchStoreRequest = VA...
String function(int nodeId, String storeName, String storeDir, long pushVersion, long timeoutMs) { VAdminProto.FetchStoreRequest.Builder fetchStoreRequest = VAdminProto.FetchStoreRequest.newBuilder() .setStoreName(storeName) .setStoreDir(storeDir); if(pushVersion > 0) { fetchStoreRequest.setPushVersion(pushVersion); } ...
/** * Fetch data from directory 'storeDir' on node id * <p> * * @param nodeId The id of the node on which to fetch the data * @param storeName The name of the store * @param storeDir The directory from where to read the data * @param pushVersion The versio...
Fetch data from directory 'storeDir' on node id
fetchStore
{ "repo_name": "birendraa/voldemort", "path": "src/java/voldemort/client/protocol/admin/AdminClient.java", "license": "apache-2.0", "size": 239787 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,837,490
@Override public final ApplicationContext loadContext(String... locations) throws Exception { throw new UnsupportedOperationException( "AbstractGenericWebContextLoader does not support the loadContext(String... locations) method"); }
final ApplicationContext function(String... locations) throws Exception { throw new UnsupportedOperationException( STR); }
/** * {@code AbstractGenericWebContextLoader} should be used as a * {@link org.springframework.test.context.SmartContextLoader SmartContextLoader}, * not as a legacy {@link org.springframework.test.context.ContextLoader ContextLoader}. * Consequently, this method is not supported. * @throws UnsupportedOperati...
AbstractGenericWebContextLoader should be used as a <code>org.springframework.test.context.SmartContextLoader SmartContextLoader</code>, not as a legacy <code>org.springframework.test.context.ContextLoader ContextLoader</code>. Consequently, this method is not supported
loadContext
{ "repo_name": "spring-projects/spring-framework", "path": "spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java", "license": "apache-2.0", "size": 12834 }
[ "org.springframework.context.ApplicationContext" ]
import org.springframework.context.ApplicationContext;
import org.springframework.context.*;
[ "org.springframework.context" ]
org.springframework.context;
2,738,884
public Version put(final Key key, final Value value, final ReturnValueVersion prevValue, final Durability durability, final long timeout, final TimeUnit timeoutUnit) throws DurabilityException,...
Version function(final Key key, final Value value, final ReturnValueVersion prevValue, final Durability durability, final long timeout, final TimeUnit timeoutUnit) throws DurabilityException, RequestTimeoutException, FaultException {
/** * Calls {@link KVStore#put(Key, Value) KVStore.put} and performs retries * if a FaultException is thrown. * <p> * This method is idempotent in the sense that if it is called multiple * times and returns without throwing an exception, the outcome is always * the same: the given Key/Val...
Calls <code>KVStore#put(Key, Value) KVStore.put</code> and performs retries if a FaultException is thrown. This method is idempotent in the sense that if it is called multiple times and returns without throwing an exception, the outcome is always the same: the given Key/Value pair will have been stored
put
{ "repo_name": "p4datasystems/CarnotDE", "path": "WDB/examples/schema/WriteOperations.java", "license": "apache-2.0", "size": 55421 }
[ "java.util.concurrent.TimeUnit", "oracle.kv.Durability", "oracle.kv.DurabilityException", "oracle.kv.FaultException", "oracle.kv.Key", "oracle.kv.RequestTimeoutException", "oracle.kv.ReturnValueVersion", "oracle.kv.Value", "oracle.kv.Version" ]
import java.util.concurrent.TimeUnit; import oracle.kv.Durability; import oracle.kv.DurabilityException; import oracle.kv.FaultException; import oracle.kv.Key; import oracle.kv.RequestTimeoutException; import oracle.kv.ReturnValueVersion; import oracle.kv.Value; import oracle.kv.Version;
import java.util.concurrent.*; import oracle.kv.*;
[ "java.util", "oracle.kv" ]
java.util; oracle.kv;
1,386,955
private void initViewSubmissionListOption(SessionState state) { if (state.getAttribute(VIEW_SUBMISSION_LIST_OPTION) == null && (state.getAttribute(SUBMISSIONS_SEARCH_ONLY) == null || !((Boolean) state.getAttribute(SUBMISSIONS_SEARCH_ONLY)).booleanValue())) { state.setAttribute(VIEW_SUBMISSION_LIST_OPT...
void function(SessionState state) { if (state.getAttribute(VIEW_SUBMISSION_LIST_OPTION) == null && (state.getAttribute(SUBMISSIONS_SEARCH_ONLY) == null !((Boolean) state.getAttribute(SUBMISSIONS_SEARCH_ONLY)).booleanValue())) { state.setAttribute(VIEW_SUBMISSION_LIST_OPTION, AssignmentConstants.ALL); } }
/** * make sure the state variable VIEW_SUBMISSION_LIST_OPTION is not null * @param state */
make sure the state variable VIEW_SUBMISSION_LIST_OPTION is not null
initViewSubmissionListOption
{ "repo_name": "tl-its-umich-edu/sakai", "path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java", "license": "apache-2.0", "size": 671846 }
[ "org.sakaiproject.assignment.api.AssignmentConstants", "org.sakaiproject.event.api.SessionState" ]
import org.sakaiproject.assignment.api.AssignmentConstants; import org.sakaiproject.event.api.SessionState;
import org.sakaiproject.assignment.api.*; import org.sakaiproject.event.api.*;
[ "org.sakaiproject.assignment", "org.sakaiproject.event" ]
org.sakaiproject.assignment; org.sakaiproject.event;
908,985
private static void handleCompleteTask(JsonObject clientMessage) throws Exception { if (!clientMessage.has("task_id")) { throw new Exception("Missing required parameter [task_id]"); } if (!clientMessage.has("lock")) { throw new Exception("...
static void function(JsonObject clientMessage) throws Exception { if (!clientMessage.has(STR)) { throw new Exception(STR); } if (!clientMessage.has("lock")) { throw new Exception(STR); } Integer task_id = clientMessage.get(STR).getAsInt(); String lock = clientMessage.get("lock").getAsString(); String queueName = client...
/** * Handle the users request to mark a task as having been completed. * @param clientMessage - the JSON object that represents the request that was sent to us * @return void */
Handle the users request to mark a task as having been completed
handleCompleteTask
{ "repo_name": "programster/Job-Scheduler", "path": "src/HandlerLogic.java", "license": "gpl-3.0", "size": 13582 }
[ "com.google.gson.JsonObject" ]
import com.google.gson.JsonObject;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
206,398
@Override public void enterIsNotFalse(@NotNull PQLParser.IsNotFalseContext ctx) { }
@Override public void enterIsNotFalse(@NotNull PQLParser.IsNotFalseContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
exitInsertQuery
{ "repo_name": "processquerying/PQL", "path": "src/org/pql/antlr/PQLBaseListener.java", "license": "lgpl-3.0", "size": 23062 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,651,837
private void write(final byte[] bytes, final int offset, final int length) throws IOException { this.out.write(Bytes.toBytes(length)); this.out.write(bytes, offset, length); } } static class CellDecoder extends BaseDecoder { private final ExtendedCellBuilder cellBuilder = ExtendedCellBuilde...
void function(final byte[] bytes, final int offset, final int length) throws IOException { this.out.write(Bytes.toBytes(length)); this.out.write(bytes, offset, length); } } static class CellDecoder extends BaseDecoder { private final ExtendedCellBuilder cellBuilder = ExtendedCellBuilderFactory.create(CellBuilderType.SH...
/** * Write int length followed by array bytes. * * @param bytes * @param offset * @param length * @throws IOException */
Write int length followed by array bytes
write
{ "repo_name": "Eshcar/hbase", "path": "hbase-common/src/main/java/org/apache/hadoop/hbase/codec/CellCodecWithTags.java", "license": "apache-2.0", "size": 4970 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.hadoop.hbase.CellBuilderType", "org.apache.hadoop.hbase.ExtendedCellBuilder", "org.apache.hadoop.hbase.ExtendedCellBuilderFactory", "org.apache.hadoop.hbase.util.Bytes" ]
import java.io.IOException; import java.io.InputStream; import org.apache.hadoop.hbase.CellBuilderType; import org.apache.hadoop.hbase.ExtendedCellBuilder; import org.apache.hadoop.hbase.ExtendedCellBuilderFactory; import org.apache.hadoop.hbase.util.Bytes;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,831,089
public void addSenderDocument(DocumentType type, String value) { this.checkout.addSenderDocument(type, value); }
void function(DocumentType type, String value) { this.checkout.addSenderDocument(type, value); }
/** * Add document for sender documents list * * @param type * @param value */
Add document for sender documents list
addSenderDocument
{ "repo_name": "pagseguro/java", "path": "source/pagseguro-api/src/br/com/uol/pagseguro/domain/PaymentRequest.java", "license": "apache-2.0", "size": 21162 }
[ "br.com.uol.pagseguro.enums.DocumentType" ]
import br.com.uol.pagseguro.enums.DocumentType;
import br.com.uol.pagseguro.enums.*;
[ "br.com.uol" ]
br.com.uol;
2,639,599
Map<String, Cookie> getResponseCookiesInternal() { return responseCookies; }
Map<String, Cookie> getResponseCookiesInternal() { return responseCookies; }
/** * For internal use only * * @return The response cookies, or null if they have not been set yet */
For internal use only
getResponseCookiesInternal
{ "repo_name": "jasonchaffee/undertow", "path": "core/src/main/java/io/undertow/server/HttpServerExchange.java", "license": "apache-2.0", "size": 82413 }
[ "io.undertow.server.handlers.Cookie", "java.util.Map" ]
import io.undertow.server.handlers.Cookie; import java.util.Map;
import io.undertow.server.handlers.*; import java.util.*;
[ "io.undertow.server", "java.util" ]
io.undertow.server; java.util;
1,803,836
public static int get(Properties props, String name, int defval) { String value = props.getProperty(name); if (value == null) return defval; return Integer.parseInt(value); }
static int function(Properties props, String name, int defval) { String value = props.getProperty(name); if (value == null) return defval; return Integer.parseInt(value); }
/** * Returns the value of an optional property, if the property is * set. If it is not set defval is returned. */
Returns the value of an optional property, if the property is set. If it is not set defval is returned
get
{ "repo_name": "dinesh-kumar-11/recordLinkageMapreduce", "path": "src/main/java/org/dinesh/er/utils/PropertyUtils.java", "license": "apache-2.0", "size": 1222 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,834,676
private static Object copy(Object bean) { try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final Marshaller m = createMarshaller(); m.marshal(bean, baos); final ByteArrayInputStream bais = new ByteArrayInputStream(baos....
static Object function(Object bean) { try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final Marshaller m = createMarshaller(); m.marshal(bean, baos); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); return createUnmarshaller().unmarshal(bais); } catch (JAXBException ...
/** * Creates an XML clone of the given bean. * <p> * In other words, this method XML-serializes the given bean, and * XML-deserializes a copy of that bean. * </p> * @throws IllegalArgumentException if the bean class is not known by the * underlying XML binding context. *...
Creates an XML clone of the given bean. In other words, this method XML-serializes the given bean, and XML-deserializes a copy of that bean.
copy
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk/jdk/src/share/sample/jmx/jmx-scandir/src/com/sun/jmx/examples/scandir/config/XmlConfigUtils.java", "license": "mit", "size": 14504 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "javax.xml.bind.JAXBException", "javax.xml.bind.Marshaller" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller;
import java.io.*; import javax.xml.bind.*;
[ "java.io", "javax.xml" ]
java.io; javax.xml;
632,772
@ApiModelProperty(example = "null", value = "") public Double getTotalTaxAmount() { return totalTaxAmount; }
@ApiModelProperty(example = "null", value = "") Double function() { return totalTaxAmount; }
/** * Get totalTaxAmount * @return totalTaxAmount **/
Get totalTaxAmount
getTotalTaxAmount
{ "repo_name": "PitneyBowes/LocationIntelligenceSDK-Java", "path": "src/main/java/pb/locationintelligence/model/UseTax.java", "license": "apache-2.0", "size": 9862 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,409,893
@Override public void addError(AuditEvent evt) { final SeverityLevel severityLevel = evt.getSeverityLevel(); if (severityLevel != SeverityLevel.IGNORE) { final String fileName = evt.getFileName(); final String message = evt.getMessage(); // avoid StringBuffe...
void function(AuditEvent evt) { final SeverityLevel severityLevel = evt.getSeverityLevel(); if (severityLevel != SeverityLevel.IGNORE) { final String fileName = evt.getFileName(); final String message = evt.getMessage(); final int bufLen = fileName.length() + message.length() + BUFFER_CUSHION; final StringBuilder sb = ...
/** * Print an Emacs compliant line on the error stream. * If the column number is non zero, then also display it. * @see AuditListener **/
Print an Emacs compliant line on the error stream. If the column number is non zero, then also display it
addError
{ "repo_name": "rmswimkktt/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/DefaultLogger.java", "license": "lgpl-2.1", "size": 6312 }
[ "com.puppycrawl.tools.checkstyle.api.AuditEvent", "com.puppycrawl.tools.checkstyle.api.SeverityLevel" ]
import com.puppycrawl.tools.checkstyle.api.AuditEvent; import com.puppycrawl.tools.checkstyle.api.SeverityLevel;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
1,635,197
protected String getPackageToScan() { return Cleanable.class.getPackage().getName(); }
String function() { return Cleanable.class.getPackage().getName(); }
/** * Returns the package to be scanned for bindings of this module. * * @return the name of the package to be scanned */
Returns the package to be scanned for bindings of this module
getPackageToScan
{ "repo_name": "arenadata/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/cleanup/CleanupModule.java", "license": "apache-2.0", "size": 2608 }
[ "org.apache.ambari.server.orm.dao.Cleanable" ]
import org.apache.ambari.server.orm.dao.Cleanable;
import org.apache.ambari.server.orm.dao.*;
[ "org.apache.ambari" ]
org.apache.ambari;
2,036,482
public void registerVirtualKeyboard(VirtualKeyboardInterface vkb){ virtualKeyboards.put(vkb.getVirtualKeyboardName(), vkb); }
void function(VirtualKeyboardInterface vkb){ virtualKeyboards.put(vkb.getVirtualKeyboardName(), vkb); }
/** * Register a virtual keyboard * @param vkb */
Register a virtual keyboard
registerVirtualKeyboard
{ "repo_name": "jgittings/chainbench", "path": "LWUIT_1_5/UI/src/com/sun/lwuit/Display.java", "license": "apache-2.0", "size": 86759 }
[ "com.sun.lwuit.impl.VirtualKeyboardInterface" ]
import com.sun.lwuit.impl.VirtualKeyboardInterface;
import com.sun.lwuit.impl.*;
[ "com.sun.lwuit" ]
com.sun.lwuit;
1,863,306
public String getIndexAsString() { switch (index) { case PNG: return "PNG"; case JPEG: default: return "JPEG"; } } public File getFolder() { return folder; }
String function() { switch (index) { case PNG: return "PNG"; case JPEG: default: return "JPEG"; } } public File getFolder() { return folder; }
/** * Returns the index as a string. * * @return See above. */
Returns the index as a string
getIndexAsString
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/model/SaveAsParam.java", "license": "gpl-2.0", "size": 3805 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,828,739
private RelDataType deriveCopiedRowTypeFromInput(final RelNode input) { final RelDataType inputRowType = input.getRowType(); final RelDataType windowRowType = this.getRowType(); final List<RelDataTypeField> fieldList = new ArrayList<>(inputRowType.getFieldList()); final int inputFieldCount = inputRow...
RelDataType function(final RelNode input) { final RelDataType inputRowType = input.getRowType(); final RelDataType windowRowType = this.getRowType(); final List<RelDataTypeField> fieldList = new ArrayList<>(inputRowType.getFieldList()); final int inputFieldCount = inputRowType.getFieldCount(); final int windowFieldCoun...
/** * Derive rowType for the copied WindowPrel based on input. * When copy() is called, the input might be different from the current one's input. * We have to use the new input's field in the copied WindowPrel. */
Derive rowType for the copied WindowPrel based on input. When copy() is called, the input might be different from the current one's input. We have to use the new input's field in the copied WindowPrel
deriveCopiedRowTypeFromInput
{ "repo_name": "cwestin/incubator-drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/WindowPrel.java", "license": "apache-2.0", "size": 7093 }
[ "java.util.ArrayList", "java.util.List", "org.apache.calcite.rel.RelNode", "org.apache.calcite.rel.type.RelDataType", "org.apache.calcite.rel.type.RelDataTypeField" ]
import java.util.ArrayList; import java.util.List; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField;
import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.type.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,651,554
public final void setBirthDate(final LocalDate dob) throws NitfFormatException { addOrUpdateEntry("DOB", dob); }
final void function(final LocalDate dob) throws NitfFormatException { addOrUpdateEntry("DOB", dob); }
/** * Set the date of birth field value. * * From STDI-0002 Appendix C: "Identifies the birth date of the individual captured in the image." * * @param dob date of birth (local date), or null if not known. * * @throws NitfFormatException if there is a parsing issue. */
Set the date of birth field value
setBirthDate
{ "repo_name": "codice/imaging-nitf", "path": "trewrap/src/main/java/org/codice/imaging/nitf/trewrap/PIAPEB.java", "license": "lgpl-2.1", "size": 8235 }
[ "java.time.LocalDate", "org.codice.imaging.nitf.core.common.NitfFormatException" ]
import java.time.LocalDate; import org.codice.imaging.nitf.core.common.NitfFormatException;
import java.time.*; import org.codice.imaging.nitf.core.common.*;
[ "java.time", "org.codice.imaging" ]
java.time; org.codice.imaging;
1,968,478
public static boolean rm(FileSystem fileSystem, Path path, boolean recursive, boolean allowRootDelete) throws IOException { if (fileSystem != null) { rejectRootOperation(path, allowRootDelete); if (fileSystem.exists(path)) { return fileSystem.delete(path, recursive); ...
static boolean function(FileSystem fileSystem, Path path, boolean recursive, boolean allowRootDelete) throws IOException { if (fileSystem != null) { rejectRootOperation(path, allowRootDelete); if (fileSystem.exists(path)) { return fileSystem.delete(path, recursive); } } return false; }
/** * Delete a directory. There's a safety check for operations against the * root directory -these are intercepted and rejected with an IOException * unless the allowRootDelete flag is true * @param fileSystem filesystem to work with. May be null * @param path path to delete * @param recursive flag t...
Delete a directory. There's a safety check for operations against the root directory -these are intercepted and rejected with an IOException unless the allowRootDelete flag is true
rm
{ "repo_name": "huafengw/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/ContractTestUtils.java", "license": "apache-2.0", "size": 54281 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,298,200
public static Set<String> getCategoryLabels() { return Arrays.asList(WeightingAreasOfConcern.values()) .stream().filter( eff -> eff.id != WeightingAreasOfConcern.UNKNOWN.id) .map(eff -> eff.label) .collect(Collectors.toSet()); }
static Set<String> function() { return Arrays.asList(WeightingAreasOfConcern.values()) .stream().filter( eff -> eff.id != WeightingAreasOfConcern.UNKNOWN.id) .map(eff -> eff.label) .collect(Collectors.toSet()); }
/** * Returns a Set labels. * * @return the Set of Weighting Areas of Concern labels */
Returns a Set labels
getCategoryLabels
{ "repo_name": "astropcr/pmasecapstone", "path": "src/edu/gatech/pmase/capstone/awesome/objects/enums/WeightingAreasOfConcern.java", "license": "mit", "size": 4072 }
[ "java.util.Arrays", "java.util.Set", "java.util.stream.Collectors" ]
import java.util.Arrays; import java.util.Set; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
2,034,624
public static java.util.List extractWhiteBoardConfigList(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.WhiteBoardConfigVoCollection voCollection) { return extractWhiteBoardConfigList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.WhiteBoardConfigVoCollection voCollection) { return extractWhiteBoardConfigList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.emergency.configuration.domain.objects.WhiteBoardConfig list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.emergency.configuration.domain.objects.WhiteBoardConfig list from the value object collection
extractWhiteBoardConfigList
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/WhiteBoardConfigVoAssembler.java", "license": "agpl-3.0", "size": 19929 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,921,473
// This is called from runtime.scm when a "open another screen with start value" block is // executed. Note that startNewForm will JSON encode the start value public static void switchFormWithStartValue(String nextFormName, Object startValue) { Log.i(LOG_TAG, "Open another screen with start value:"...
static void function(String nextFormName, Object startValue) { Log.i(LOG_TAG, STR + nextFormName); if (activeForm != null) { activeForm.startNewForm(nextFormName, startValue); } else { throw new IllegalStateException(STR); } }
/** * Display a new form and pass a startup value to the new form. * * @param nextFormName the name of the new form to display * @param startValue the start value to pass to the new form */
Display a new form and pass a startup value to the new form
switchFormWithStartValue
{ "repo_name": "mark-friedman/web-appinventor", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Form.java", "license": "apache-2.0", "size": 66763 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,697,934
@Override public void logout(final ICallback<Void> logoutCallback) { if (!mInitialized) { throw new IllegalStateException("init must be called"); } if (logoutCallback == null) { throw new InvalidParameterException("logoutCallback"); }
void function(final ICallback<Void> logoutCallback) { if (!mInitialized) { throw new IllegalStateException(STR); } if (logoutCallback == null) { throw new InvalidParameterException(STR); }
/** * Log the current user out. * @param logoutCallback The callback to be called when the logout is complete. */
Log the current user out
logout
{ "repo_name": "daboxu/onedrive-sdk-android", "path": "onedrivesdk/src/main/java/com/onedrive/sdk/authentication/DisambiguationAuthenticator.java", "license": "mit", "size": 14423 }
[ "com.onedrive.sdk.concurrency.ICallback", "java.security.InvalidParameterException" ]
import com.onedrive.sdk.concurrency.ICallback; import java.security.InvalidParameterException;
import com.onedrive.sdk.concurrency.*; import java.security.*;
[ "com.onedrive.sdk", "java.security" ]
com.onedrive.sdk; java.security;
812,867
public long rollEdits() throws IOException { return dfs.rollEdits(); }
long function() throws IOException { return dfs.rollEdits(); }
/** * Rolls the edit log on the active NameNode. * Requires super-user privileges. * @see org.apache.hadoop.hdfs.protocol.ClientProtocol#rollEdits() * @return the transaction ID of the newly created segment */
Rolls the edit log on the active NameNode. Requires super-user privileges
rollEdits
{ "repo_name": "Microsoft-CISL/hadoop-prototype", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java", "license": "apache-2.0", "size": 76978 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,715,509
public World getNetherWorld() { return ASkyBlock.getNetherWorld(); }
World function() { return ASkyBlock.getNetherWorld(); }
/** * Get the nether world * @return the nether world */
Get the nether world
getNetherWorld
{ "repo_name": "Pokechu22/askyblock", "path": "src/com/wasteofplastic/askyblock/ASkyBlockAPI.java", "license": "gpl-2.0", "size": 13760 }
[ "org.bukkit.World" ]
import org.bukkit.World;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
2,164,933
public static synchronized AppView getInstance() { if (appView == null) { appView = new AppView(App.getApplication()); } return appView; }
static synchronized AppView function() { if (appView == null) { appView = new AppView(App.getApplication()); } return appView; }
/** * Returns AppView singleton * * @return AppView */
Returns AppView singleton
getInstance
{ "repo_name": "mefi/JKuuza", "path": "src/main/java/com/github/mefi/jkuuza/gui/AppView.java", "license": "apache-2.0", "size": 128106 }
[ "com.github.mefi.jkuuza.app.App" ]
import com.github.mefi.jkuuza.app.App;
import com.github.mefi.jkuuza.app.*;
[ "com.github.mefi" ]
com.github.mefi;
250,768
protected final int shiftKeys( int pos ) { // Shift entries with the same hash. int last, slot; for(;;) { pos = ( ( last = pos ) + 1 ) & mask; while( used[ pos ] ) { slot = ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode( (K) (key[ pos ])) ) ) & mask; if ( last <= pos ? last >= sl...
final int function( int pos ) { int last, slot; for(;;) { pos = ( ( last = pos ) + 1 ) & mask; while( used[ pos ] ) { slot = ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode( (K) (key[ pos ])) ) ) & mask; if ( last <= pos ? last >= slot slot > pos : last >= slot && slot > pos ) break; pos = ( pos + 1 )...
/** Shifts left entries with the specified hash code, starting at the specified position, * and empties the resulting free entry. * * @param pos a starting position. * @return the position cleared by the shifting process. */
Shifts left entries with the specified hash code, starting at the specified position, and empties the resulting free entry
shiftKeys
{ "repo_name": "karussell/fastutil", "path": "src/it/unimi/dsi/fastutil/objects/Object2BooleanLinkedOpenCustomHashMap.java", "license": "apache-2.0", "size": 48113 }
[ "it.unimi.dsi.fastutil.HashCommon" ]
import it.unimi.dsi.fastutil.HashCommon;
import it.unimi.dsi.fastutil.*;
[ "it.unimi.dsi" ]
it.unimi.dsi;
2,116,104
public BoxSharedLink getSharedLink() { return mBodyMap.containsKey(BoxItem.FIELD_SHARED_LINK) ? ((BoxSharedLink) mBodyMap.get(BoxItem.FIELD_SHARED_LINK)) : null; }
BoxSharedLink function() { return mBodyMap.containsKey(BoxItem.FIELD_SHARED_LINK) ? ((BoxSharedLink) mBodyMap.get(BoxItem.FIELD_SHARED_LINK)) : null; }
/** * Returns the shared link currently set for the item. * * @return shared link for the item, or null if not set. */
Returns the shared link currently set for the item
getSharedLink
{ "repo_name": "follower/box-android-sdk", "path": "box-content-sdk/src/main/java/com/box/androidsdk/content/requests/BoxRequestItemUpdate.java", "license": "apache-2.0", "size": 6529 }
[ "com.box.androidsdk.content.models.BoxItem", "com.box.androidsdk.content.models.BoxSharedLink" ]
import com.box.androidsdk.content.models.BoxItem; import com.box.androidsdk.content.models.BoxSharedLink;
import com.box.androidsdk.content.models.*;
[ "com.box.androidsdk" ]
com.box.androidsdk;
643,672
public void run() { try { Runnable task = firstTask; firstTask = null; while (task != null || (task = getTask()) != null) { runTask(task); task = null; // unnecessary but can help GC } ...
void function() { try { Runnable task = firstTask; firstTask = null; while (task != null (task = getTask()) != null) { runTask(task); task = null; } } catch(InterruptedException ie) { } finally { workerDone(this); } } } public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, ...
/** * Main run loop */
Main run loop
run
{ "repo_name": "WilliamRen/bbossgroups-3.5", "path": "bboss-rpc/src-thread/org/frameworkset/thread/ThreadPoolExecutor.java", "license": "apache-2.0", "size": 57994 }
[ "java.util.concurrent.BlockingQueue", "java.util.concurrent.Executors", "java.util.concurrent.ThreadFactory", "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.BlockingQueue; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
911,946
@Override public TimeUnit getTimeUnit() { return timeUnit; }
@Override TimeUnit function() { return timeUnit; }
/** * Getter for the timeunit. * * @return the timeunit of the interval. */
Getter for the timeunit
getTimeUnit
{ "repo_name": "Frank-G/visor-bridge", "path": "visor-base/src/main/java/de/uniulm/omi/cloudiator/visor/monitoring/DefaultInterval.java", "license": "apache-2.0", "size": 2318 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
562,229
private JCheckBox getHandleODataSpecificParameters() { if (handleODataSpecificParameters == null) { handleODataSpecificParameters = new JCheckBox(); handleODataSpecificParameters.setText(Constant.messages.getString("spider.options.label.handlehodataparameters")); } return handleODataSpecificParamete...
JCheckBox function() { if (handleODataSpecificParameters == null) { handleODataSpecificParameters = new JCheckBox(); handleODataSpecificParameters.setText(Constant.messages.getString(STR)); } return handleODataSpecificParameters; }
/** * This method initializes the Handle OData-specific parameters checkbox. * * @return javax.swing.JCheckBox */
This method initializes the Handle OData-specific parameters checkbox
getHandleODataSpecificParameters
{ "repo_name": "0xkasun/zaproxy", "path": "src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java", "license": "apache-2.0", "size": 18538 }
[ "javax.swing.JCheckBox", "org.parosproxy.paros.Constant" ]
import javax.swing.JCheckBox; import org.parosproxy.paros.Constant;
import javax.swing.*; import org.parosproxy.paros.*;
[ "javax.swing", "org.parosproxy.paros" ]
javax.swing; org.parosproxy.paros;
283,475
private String newCardName(JSONArray templates) { String name; // Start by trying to set the name to "Card n" where n is the new num of templates int n = templates.length() + 1; // If the starting point for name already exists, iteratively increase n until we find...
String function(JSONArray templates) { String name; int n = templates.length() + 1; while (true) { name = STR + Integer.toString(n); boolean exists = false; for (int i = 0; i < templates.length(); i++) { try { exists = exists name.equals(templates.getJSONObject(i).getString("name")); } catch (JSONException e) { throw n...
/** * Get name for new template * @param templates array of templates which is being added to * @return name for new template */
Get name for new template
newCardName
{ "repo_name": "wlky/Anki-Android", "path": "AnkiDroid/src/main/java/com/ichi2/anki/CardTemplateEditor.java", "license": "gpl-3.0", "size": 24471 }
[ "org.json.JSONArray", "org.json.JSONException" ]
import org.json.JSONArray; import org.json.JSONException;
import org.json.*;
[ "org.json" ]
org.json;
1,720,835
private static void sendNotModified(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, NOT_MODIFIED); setDateHeader(response); // Close the connection as soon as the error message is sent. ctx.writeAndFlush(response).addListener(ChannelFut...
static void function(ChannelHandlerContext ctx) { FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, NOT_MODIFIED); setDateHeader(response); ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE); }
/** * When file timestamp is the same as what the browser is sending up, send a "304 Not Modified" * * @param ctx * Context */
When file timestamp is the same as what the browser is sending up, send a "304 Not Modified"
sendNotModified
{ "repo_name": "kalixia/kha", "path": "cloud-platform/src/main/java/com/kalixia/ha/cloud/HttpStaticFileServerHandler.java", "license": "agpl-3.0", "size": 16253 }
[ "io.netty.channel.ChannelFutureListener", "io.netty.channel.ChannelHandlerContext", "io.netty.handler.codec.http.DefaultFullHttpResponse", "io.netty.handler.codec.http.FullHttpResponse" ]
import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.channel.*; import io.netty.handler.codec.http.*;
[ "io.netty.channel", "io.netty.handler" ]
io.netty.channel; io.netty.handler;
1,937,666