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 static PcepValueType read(ChannelBuffer c, short hLength) throws PcepParseException {
// Node Descriptor Sub-TLVs (variable)
List<PcepValueType> llNodeDescriptorSubTLVs = new LinkedList<>();
ChannelBuffer tempCb = c.readBytes(hLength);
while (TLV_HEADER_LENGTH <= tempCb.rea... | static PcepValueType function(ChannelBuffer c, short hLength) throws PcepParseException { List<PcepValueType> llNodeDescriptorSubTLVs = new LinkedList<>(); ChannelBuffer tempCb = c.readBytes(hLength); while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { PcepValueType tlv; short hType = tempCb.readShort(); int iValue =... | /**
* Reads the channel buffer and returns object of AutonomousSystemTlv.
*
* @param c input channel buffer
* @param hLength length of subtlvs.
* @return object of AutonomousSystemTlv
* @throws PcepParseException if mandatory fields are missing
*/ | Reads the channel buffer and returns object of AutonomousSystemTlv | read | {
"repo_name": "sonu283304/onos",
"path": "protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalNodeDescriptorsTlv.java",
"license": "apache-2.0",
"size": 8611
} | [
"java.util.LinkedList",
"java.util.List",
"org.jboss.netty.buffer.ChannelBuffer",
"org.onosproject.pcepio.exceptions.PcepParseException"
] | import java.util.LinkedList; import java.util.List; import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.pcepio.exceptions.PcepParseException; | import java.util.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; | [
"java.util",
"org.jboss.netty",
"org.onosproject.pcepio"
] | java.util; org.jboss.netty; org.onosproject.pcepio; | 1,128,625 |
final String body = "449 N Wolfe Rd, Sunnyvale, CA 94085";
final String part = "t-1";
final Request req = new RqMtFake(
new RqFake(),
new RqWithHeaders(
new RqFake("", "", body),
RqMtBaseTest.contentLengthHeader(
(long) body.get... | final String body = STR; final String part = "t-1"; final Request req = new RqMtFake( new RqFake(), new RqWithHeaders( new RqFake(STR", body), RqMtBaseTest.contentLengthHeader( (long) body.getBytes().length ), RqMtBaseTest.contentDispositionHeader( String.format(RqMtBaseTest.FORM_DATA, part) ) ), new RqWithHeaders( new... | /**
* RqMtBase can satisfy equals contract.
* @throws IOException if some problem inside
*/ | RqMtBase can satisfy equals contract | satisfiesEqualsContract | {
"repo_name": "yegor256/takes",
"path": "src/test/java/org/takes/rq/multipart/RqMtBaseTest.java",
"license": "mit",
"size": 7184
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.takes.Request",
"org.takes.rq.RqFake",
"org.takes.rq.RqWithHeaders"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.takes.Request; import org.takes.rq.RqFake; import org.takes.rq.RqWithHeaders; | import org.hamcrest.*; import org.takes.*; import org.takes.rq.*; | [
"org.hamcrest",
"org.takes",
"org.takes.rq"
] | org.hamcrest; org.takes; org.takes.rq; | 740,090 |
private static ImmutableMap<Integer, Integer> read(String file_name) {
final ImmutableMap.Builder<Integer, Integer> builder = ImmutableMap.builder();
int lineno = 0;
try {
for (String line : new LineReader(file_name, false)) {
lineno++;
String[] lineComp = line.trim().split("\\s+");
... | static ImmutableMap<Integer, Integer> function(String file_name) { final ImmutableMap.Builder<Integer, Integer> builder = ImmutableMap.builder(); int lineno = 0; try { for (String line : new LineReader(file_name, false)) { lineno++; String[] lineComp = line.trim().split("\\s+"); try { builder.put(Vocabulary.id(lineComp... | /**
* Reads a class map from file_name
*/ | Reads a class map from file_name | read | {
"repo_name": "thammegowda/incubator-joshua",
"path": "src/main/java/org/apache/joshua/decoder/ff/lm/ClassMap.java",
"license": "apache-2.0",
"size": 2358
} | [
"com.google.common.collect.ImmutableMap",
"java.io.IOException",
"org.apache.joshua.corpus.Vocabulary",
"org.apache.joshua.util.io.LineReader"
] | import com.google.common.collect.ImmutableMap; import java.io.IOException; import org.apache.joshua.corpus.Vocabulary; import org.apache.joshua.util.io.LineReader; | import com.google.common.collect.*; import java.io.*; import org.apache.joshua.corpus.*; import org.apache.joshua.util.io.*; | [
"com.google.common",
"java.io",
"org.apache.joshua"
] | com.google.common; java.io; org.apache.joshua; | 25,125 |
private boolean onNameRemove(Player player) {
//Variables containing the player's Item
ItemStack playerItem = getItemInPlayerHand(player);
ItemMeta meta = playerItem.getItemMeta();
//set Display Name
meta.setDisplayName(null);
playerItem.setItemMeta(meta);
... | boolean function(Player player) { ItemStack playerItem = getItemInPlayerHand(player); ItemMeta meta = playerItem.getItemMeta(); meta.setDisplayName(null); playerItem.setItemMeta(meta); setItemInPlayerHand(player, playerItem); return true; } | /**
* Handler method for the ItemInfo Name Remove command. Removes the
* custom name string and sets the item's name to it's localized name.
*
* @param player The player who ran the command.
* @return True if the name was successfully removed.
*/ | Handler method for the ItemInfo Name Remove command. Removes the custom name string and sets the item's name to it's localized name | onNameRemove | {
"repo_name": "flutterflies/KMES",
"path": "src/main/java/net/flutterflies/kmes/cmd/CmdItemInfo.java",
"license": "mit",
"size": 22600
} | [
"org.bukkit.entity.Player",
"org.bukkit.inventory.ItemStack",
"org.bukkit.inventory.meta.ItemMeta"
] | import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; | import org.bukkit.entity.*; import org.bukkit.inventory.*; import org.bukkit.inventory.meta.*; | [
"org.bukkit.entity",
"org.bukkit.inventory"
] | org.bukkit.entity; org.bukkit.inventory; | 1,805,723 |
public static ims.therapies.treatment.domain.objects.PlinthWorkTreatment extractPlinthWorkTreatment(ims.domain.ILightweightDomainFactory domainFactory, ims.therapies.vo.PlinthWorkTreatmentVo valueObject)
{
return extractPlinthWorkTreatment(domainFactory, valueObject, new HashMap());
}
| static ims.therapies.treatment.domain.objects.PlinthWorkTreatment function(ims.domain.ILightweightDomainFactory domainFactory, ims.therapies.vo.PlinthWorkTreatmentVo valueObject) { return extractPlinthWorkTreatment(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractPlinthWorkTreatment | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/therapies/vo/domain/PlinthWorkTreatmentVoAssembler.java",
"license": "agpl-3.0",
"size": 19085
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 712,159 |
protected void enterNumber(Production node) throws ParseException {
} | void function(Production node) throws ParseException { } | /**
* Called when entering a parse tree node.
*
* @param node the node being entered
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when entering a parse tree node | enterNumber | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java",
"license": "gpl-2.0",
"size": 275483
} | [
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,654 |
void onPartUpload( Result result ); | void onPartUpload( Result result ); | /**
* This method is called whenever any part of a multi-part upload
* has been completed. This could be useful for getting information about
* how many parts out of the total number of parts have been completed.
* @param result - a {@link Result} object
*/ | This method is called whenever any part of a multi-part upload has been completed. This could be useful for getting information about how many parts out of the total number of parts have been completed | onPartUpload | {
"repo_name": "GPUdb/gpudb-api-java",
"path": "api/src/main/java/com/gpudb/filesystem/upload/FileUploadListener.java",
"license": "mit",
"size": 1546
} | [
"com.gpudb.filesystem.common.Result"
] | import com.gpudb.filesystem.common.Result; | import com.gpudb.filesystem.common.*; | [
"com.gpudb.filesystem"
] | com.gpudb.filesystem; | 891,783 |
private void appendRenderedFile(FolderComponent fc, VFSItem child, String currentContainerPath, StringOutput sb, URLBuilder ubu, Translator translator,
boolean iframePostEnabled, boolean canContainerVersion, Map<Long, Identity> identityMap, int pos) {
// asume full access unless security callba... | void function(FolderComponent fc, VFSItem child, String currentContainerPath, StringOutput sb, URLBuilder ubu, Translator translator, boolean iframePostEnabled, boolean canContainerVersion, Map<Long, Identity> identityMap, int pos) { boolean canWrite = child.getParentContainer().canWrite() == VFSConstants.YES; boolean ... | /**
* Render a single file or folder.
*
* @param f
* The file or folder to render
* @param sb
* StringOutput to append generated html code
*/ | Render a single file or folder | appendRenderedFile | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/main/java/org/olat/presentation/filebrowser/components/ListRenderer.java",
"license": "apache-2.0",
"size": 24234
} | [
"java.util.Map",
"org.olat.data.basesecurity.Identity",
"org.olat.data.commons.vfs.AbstractVirtualContainer",
"org.olat.data.commons.vfs.FolderConfig",
"org.olat.data.commons.vfs.OlatRelPathImpl",
"org.olat.data.commons.vfs.VFSConstants",
"org.olat.data.commons.vfs.VFSItem",
"org.olat.data.commons.vfs... | import java.util.Map; import org.olat.data.basesecurity.Identity; import org.olat.data.commons.vfs.AbstractVirtualContainer; import org.olat.data.commons.vfs.FolderConfig; import org.olat.data.commons.vfs.OlatRelPathImpl; import org.olat.data.commons.vfs.VFSConstants; import org.olat.data.commons.vfs.VFSItem; import or... | import java.util.*; import org.olat.data.basesecurity.*; import org.olat.data.commons.vfs.*; import org.olat.data.commons.vfs.version.*; import org.olat.data.filebrowser.metadata.*; import org.olat.lms.commons.filemetadata.*; import org.olat.presentation.framework.core.control.generic.folder.*; import org.olat.presenta... | [
"java.util",
"org.olat.data",
"org.olat.lms",
"org.olat.presentation",
"org.olat.system"
] | java.util; org.olat.data; org.olat.lms; org.olat.presentation; org.olat.system; | 924,080 |
boolean canCreatePrimaryCredential(Map<PropertyDescriptor, String> properties); | boolean canCreatePrimaryCredential(Map<PropertyDescriptor, String> properties); | /**
* Determines if this strategy can create primary credentials using the given properties.
* @return true if primary credentials can be created
*/ | Determines if this strategy can create primary credentials using the given properties | canCreatePrimaryCredential | {
"repo_name": "YolandaMDavis/nifi",
"path": "nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/credentials/provider/factory/CredentialsStrategy.java",
"license": "apache-2.0",
"size": 3297
} | [
"java.util.Map",
"org.apache.nifi.components.PropertyDescriptor"
] | import java.util.Map; import org.apache.nifi.components.PropertyDescriptor; | import java.util.*; import org.apache.nifi.components.*; | [
"java.util",
"org.apache.nifi"
] | java.util; org.apache.nifi; | 2,563,126 |
public static final KeywordPlanServiceClient create(KeywordPlanServiceSettings settings)
throws IOException {
return new KeywordPlanServiceClient(settings);
} | static final KeywordPlanServiceClient function(KeywordPlanServiceSettings settings) throws IOException { return new KeywordPlanServiceClient(settings); } | /**
* Constructs an instance of KeywordPlanServiceClient, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/ | Constructs an instance of KeywordPlanServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set | create | {
"repo_name": "googleads/google-ads-java",
"path": "google-ads-stubs-v9/src/main/java/com/google/ads/googleads/v9/services/KeywordPlanServiceClient.java",
"license": "apache-2.0",
"size": 36043
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 898,171 |
@Override
public void executeSymbolically(Frame frame) {
if (Globals.getInst().symbolicExecLogger.isEnabledFor(Level.WARN))
Globals.getInst().symbolicExecLogger.warn(
"Gracefully skipping instruction breakpoint. It is not supposed to appear in any class.");
}
| void function(Frame frame) { if (Globals.getInst().symbolicExecLogger.isEnabledFor(Level.WARN)) Globals.getInst().symbolicExecLogger.warn( STR); } | /**
* Execute the instruction symbolically.
*
* @param frame The currently executed frame.
*/ | Execute the instruction symbolically | executeSymbolically | {
"repo_name": "wwu-pi/muggl",
"path": "muggl-core/src/de/wwu/muggl/instructions/bytecode/Breakpoint.java",
"license": "gpl-3.0",
"size": 1499
} | [
"de.wwu.muggl.configuration.Globals",
"de.wwu.muggl.vm.Frame",
"org.apache.log4j.Level"
] | import de.wwu.muggl.configuration.Globals; import de.wwu.muggl.vm.Frame; import org.apache.log4j.Level; | import de.wwu.muggl.configuration.*; import de.wwu.muggl.vm.*; import org.apache.log4j.*; | [
"de.wwu.muggl",
"org.apache.log4j"
] | de.wwu.muggl; org.apache.log4j; | 1,535,907 |
synchronized void syncSettingsAndCreateHandler(BrowserFrame frame) {
mBrowserFrame = frame;
if (DebugFlags.WEB_SETTINGS) {
junit.framework.Assert.assertTrue(frame.mNativeFrame != 0);
}
SharedPreferences sp = mContext.getSharedPreferences(PREF_FILE,
C... | synchronized void syncSettingsAndCreateHandler(BrowserFrame frame) { mBrowserFrame = frame; if (DebugFlags.WEB_SETTINGS) { junit.framework.Assert.assertTrue(frame.mNativeFrame != 0); } SharedPreferences sp = mContext.getSharedPreferences(PREF_FILE, Context.MODE_PRIVATE); if (mDoubleTapToastCount > 0) { mDoubleTapToastC... | /**
* Transfer messages from the queue to the new WebCoreThread. Called from
* WebCore thread.
*/ | Transfer messages from the queue to the new WebCoreThread. Called from WebCore thread | syncSettingsAndCreateHandler | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/java/android/webkit/WebSettings.java",
"license": "gpl-3.0",
"size": 49710
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 1,517,870 |
public Date getLastBuildDate()
{
return _lastBuildDate;
} | Date function() { return _lastBuildDate; } | /**
* Returns the last time the content of the channel changed.
* Example: "Sat, 07 Sep 2002 09:42:31 GMT".
* No default value.
* @return a date. May be <code>null</code>.
* @see #setLastBuildDate
* @see #getLastBuildDateString
*/ | Returns the last time the content of the channel changed. Example: "Sat, 07 Sep 2002 09:42:31 GMT". No default value | getLastBuildDate | {
"repo_name": "wenerme/Lizzy",
"path": "src/java/christophedelory/rss/Channel.java",
"license": "bsd-2-clause",
"size": 28223
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,179,885 |
static Method getStartFinalizer(Class<?> finalizer) {
try {
return finalizer.getMethod(
"startFinalizer", Class.class, ReferenceQueue.class, PhantomReference.class);
} catch (NoSuchMethodException e) {
throw new AssertionError(e);
}
} | static Method getStartFinalizer(Class<?> finalizer) { try { return finalizer.getMethod( STR, Class.class, ReferenceQueue.class, PhantomReference.class); } catch (NoSuchMethodException e) { throw new AssertionError(e); } } | /**
* Looks up Finalizer.startFinalizer().
*/ | Looks up Finalizer.startFinalizer() | getStartFinalizer | {
"repo_name": "qingsong-xu/guava",
"path": "guava/src/com/google/common/base/FinalizableReferenceQueue.java",
"license": "apache-2.0",
"size": 13049
} | [
"java.lang.ref.PhantomReference",
"java.lang.ref.ReferenceQueue",
"java.lang.reflect.Method"
] | import java.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; import java.lang.reflect.Method; | import java.lang.ref.*; import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,493,410 |
public GenericAssetModelOrMaterial getGenericAssetModelOrMaterial() {
if (genericAssetModelOrMaterial != null && genericAssetModelOrMaterial.eIsProxy()) {
InternalEObject oldGenericAssetModelOrMaterial = (InternalEObject)genericAssetModelOrMaterial;
genericAssetModelOrMaterial = (GenericAssetModelOrMaterial)... | GenericAssetModelOrMaterial function() { if (genericAssetModelOrMaterial != null && genericAssetModelOrMaterial.eIsProxy()) { InternalEObject oldGenericAssetModelOrMaterial = (InternalEObject)genericAssetModelOrMaterial; genericAssetModelOrMaterial = (GenericAssetModelOrMaterial)eResolveProxy(oldGenericAssetModelOrMate... | /**
* Returns the value of the '<em><b>Generic Asset Model Or Material</b></em>' reference.
* It is bidirectional and its opposite is '{@link CIM15.IEC61970.Informative.InfAssets.GenericAssetModelOrMaterial#getProductAssetModels <em>Product Asset Models</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning... | Returns the value of the 'Generic Asset Model Or Material' reference. It is bidirectional and its opposite is '<code>CIM15.IEC61970.Informative.InfAssets.GenericAssetModelOrMaterial#getProductAssetModels Product Asset Models</code>'. If the meaning of the 'Generic Asset Model Or Material' reference isn't clear, there r... | getGenericAssetModelOrMaterial | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61968/Assets/ProductAssetModel.java",
"license": "apache-2.0",
"size": 27200
} | [
"org.eclipse.emf.ecore.InternalEObject"
] | import org.eclipse.emf.ecore.InternalEObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 829,806 |
ActionFuture<CreateIndexResponse> create(CreateIndexRequest request); | ActionFuture<CreateIndexResponse> create(CreateIndexRequest request); | /**
* Creates an index using an explicit request allowing to specify the settings of the index.
*
* @param request The create index request
* @return The result future
* @see org.elasticsearch.client.Requests#createIndexRequest(String)
*/ | Creates an index using an explicit request allowing to specify the settings of the index | create | {
"repo_name": "gfyoung/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java",
"license": "apache-2.0",
"size": 31239
} | [
"org.elasticsearch.action.ActionFuture",
"org.elasticsearch.action.admin.indices.create.CreateIndexRequest",
"org.elasticsearch.action.admin.indices.create.CreateIndexResponse"
] | import org.elasticsearch.action.ActionFuture; import org.elasticsearch.action.admin.indices.create.CreateIndexRequest; import org.elasticsearch.action.admin.indices.create.CreateIndexResponse; | import org.elasticsearch.action.*; import org.elasticsearch.action.admin.indices.create.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 1,582,355 |
@Override
L getExitLatticeElement() {
DiGraphNode<N, Branch> node = getCfg().getImplicitReturn();
BranchedFlowState<L> state = node.getAnnotation();
return state.getIn();
} | L getExitLatticeElement() { DiGraphNode<N, Branch> node = getCfg().getImplicitReturn(); BranchedFlowState<L> state = node.getAnnotation(); return state.getIn(); } | /**
* Returns the lattice element at the exit point. Needs to be overridden
* because we use a BranchedFlowState instead of a FlowState; ugh.
*/ | Returns the lattice element at the exit point. Needs to be overridden because we use a BranchedFlowState instead of a FlowState; ugh | getExitLatticeElement | {
"repo_name": "dushmis/closure-compiler",
"path": "src/com/google/javascript/jscomp/DataFlowAnalysis.java",
"license": "apache-2.0",
"size": 18857
} | [
"com.google.javascript.jscomp.ControlFlowGraph",
"com.google.javascript.jscomp.graph.DiGraph"
] | import com.google.javascript.jscomp.ControlFlowGraph; import com.google.javascript.jscomp.graph.DiGraph; | import com.google.javascript.jscomp.*; import com.google.javascript.jscomp.graph.*; | [
"com.google.javascript"
] | com.google.javascript; | 491,214 |
public void setSanList(List<SanStorageRegistry> sanList) {
this.sanList = sanList;
} | void function(List<SanStorageRegistry> sanList) { this.sanList = sanList; } | /**
* Sets the datacenter's SAN list.
*
* @param sanList the datacenter's SAN list.
*/ | Sets the datacenter's SAN list | setSanList | {
"repo_name": "ajinkya007/CloudReportsModified",
"path": "src/main/java/cloudreports/models/DatacenterRegistry.java",
"license": "gpl-3.0",
"size": 13703
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,066,966 |
public static void waitForTabs(final String tag, final ChromeTabbedActivity activity,
final int expectedTotalTabCount, final int expectedActiveTabId) {
CriteriaHelper.pollUiThread(() -> {
int actualTotalTabCount = activity.getTabModelSelector().getTotalTabCount();
Criteri... | static void function(final String tag, final ChromeTabbedActivity activity, final int expectedTotalTabCount, final int expectedActiveTabId) { CriteriaHelper.pollUiThread(() -> { int actualTotalTabCount = activity.getTabModelSelector().getTotalTabCount(); Criteria.checkThat(actualTotalTabCount, Matchers.is(expectedTotal... | /**
* Waits until 'activity' has 'expectedTotalTabCount' total tabs, and its active tab has
* 'expectedActiveTabId' ID. 'expectedActiveTabId' is optional and can be Tab.INVALID_TAB_ID.
* 'tag' is an arbitrary string that is prepended to failure reasons.
*/ | Waits until 'activity' has 'expectedTotalTabCount' total tabs, and its active tab has 'expectedActiveTabId' ID. 'expectedActiveTabId' is optional and can be Tab.INVALID_TAB_ID. 'tag' is an arbitrary string that is prepended to failure reasons | waitForTabs | {
"repo_name": "chromium/chromium",
"path": "chrome/android/javatests/src/org/chromium/chrome/browser/multiwindow/MultiWindowTestHelper.java",
"license": "bsd-3-clause",
"size": 6932
} | [
"org.chromium.base.test.util.Criteria",
"org.chromium.base.test.util.CriteriaHelper",
"org.chromium.chrome.browser.ChromeTabbedActivity",
"org.chromium.chrome.browser.tab.Tab",
"org.hamcrest.Matchers"
] | import org.chromium.base.test.util.Criteria; import org.chromium.base.test.util.CriteriaHelper; import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.tab.Tab; import org.hamcrest.Matchers; | import org.chromium.base.test.util.*; import org.chromium.chrome.browser.*; import org.chromium.chrome.browser.tab.*; import org.hamcrest.*; | [
"org.chromium.base",
"org.chromium.chrome",
"org.hamcrest"
] | org.chromium.base; org.chromium.chrome; org.hamcrest; | 306,002 |
public final void getText(CharTermAttribute t) {
t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead);
}
public StandardTokenizerImpl(java.io.Reader in) {
this.zzReader = in;
} | final void function(CharTermAttribute t) { t.copyBuffer(zzBuffer, zzStartRead, zzMarkedPos-zzStartRead); } public StandardTokenizerImpl(java.io.Reader in) { this.zzReader = in; } | /**
* Fills CharTermAttribute with the current token text.
*/ | Fills CharTermAttribute with the current token text | getText | {
"repo_name": "yintaoxue/read-open-source-code",
"path": "solr-4.7.2/src/org/apache/lucene/analysis/standard/StandardTokenizerImpl.java",
"license": "apache-2.0",
"size": 52466
} | [
"org.apache.lucene.analysis.tokenattributes.CharTermAttribute"
] | import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; | import org.apache.lucene.analysis.tokenattributes.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 2,211,318 |
@Override
public void initialize(URL url, ResourceBundle rb) {
resource = rb;
categoryColumn.setCellValueFactory(new PropertyValueFactory<>("category"));
valueColumn.setCellValueFactory(new PropertyValueFactory<>("value"));
String bgcolor = "-fx-background-color: " + He... | void function(URL url, ResourceBundle rb) { resource = rb; categoryColumn.setCellValueFactory(new PropertyValueFactory<>(STR)); valueColumn.setCellValueFactory(new PropertyValueFactory<>("value")); String bgcolor = STR + HeapStatsUtils.getChartBgColor() + ";"; Stream.of(javaCPUChart, systemCPUChart, javaMemoryChart, sa... | /**
* Initializes the controller class.
*/ | Initializes the controller class | initialize | {
"repo_name": "HeapStats/heapstats",
"path": "analyzer/fx/src/main/java/jp/co/ntt/oss/heapstats/fx/plugin/builtin/log/tabs/LogResourcesController.java",
"license": "gpl-2.0",
"size": 37547
} | [
"java.util.ResourceBundle",
"java.util.stream.Stream",
"jp.co.ntt.oss.heapstats.api.utils.HeapStatsUtils",
"jp.co.ntt.oss.heapstats.fx.utils.EpochTimeConverter"
] | import java.util.ResourceBundle; import java.util.stream.Stream; import jp.co.ntt.oss.heapstats.api.utils.HeapStatsUtils; import jp.co.ntt.oss.heapstats.fx.utils.EpochTimeConverter; | import java.util.*; import java.util.stream.*; import jp.co.ntt.oss.heapstats.api.utils.*; import jp.co.ntt.oss.heapstats.fx.utils.*; | [
"java.util",
"jp.co.ntt"
] | java.util; jp.co.ntt; | 1,873,827 |
public int read(byte[] b) throws IOException { return -1; }; | int function(byte[] b) throws IOException { return -1; }; | /**
* Read data from the socket and use telnet negotiation before returning
* the data read.
* @param b the input buffer to read in
* @return the amount of bytes read
*/ | Read data from the socket and use telnet negotiation before returning the data read | read | {
"repo_name": "krajj7/BotHack",
"path": "jta26/de/mud/jta/Wrapper.java",
"license": "gpl-2.0",
"size": 5967
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,440,196 |
public boolean equals(Object object) {
if (object != null && object.getClass() != this.getClass()) {
return false;
}
HostAndGuestCountView that = (HostAndGuestCountView)object;
return new EqualsBuilder().append(this.getHostId(), that.getHostId()).isEquals();
}
... | boolean function(Object object) { if (object != null && object.getClass() != this.getClass()) { return false; } HostAndGuestCountView that = (HostAndGuestCountView)object; return new EqualsBuilder().append(this.getHostId(), that.getHostId()).isEquals(); } /** * * {@inheritDoc} | /**
* Two HostAndGuestCountView objects are considered equal if they have the same value
* for their <code>hostId</code> properties.
*
* @param object The object to compare
*
* @return <code>true</code> if <code>object</code> is a HostAndGuestCountView and has
* the same <code>hostId<... | Two HostAndGuestCountView objects are considered equal if they have the same value for their <code>hostId</code> properties | equals | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/server/HostAndGuestCountView.java",
"license": "gpl-2.0",
"size": 2806
} | [
"org.apache.commons.lang.builder.EqualsBuilder"
] | import org.apache.commons.lang.builder.EqualsBuilder; | import org.apache.commons.lang.builder.*; | [
"org.apache.commons"
] | org.apache.commons; | 855,959 |
public SerialMessage getSupportedMessage() {
logger.debug("Creating new message for application command THERMOSTAT_SETPOINT_SUPPORTED_GET for node {}", this.getNode().getNodeId());
SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, Seri... | SerialMessage function() { logger.debug(STR, this.getNode().getNodeId()); SerialMessage result = new SerialMessage(this.getNode().getNodeId(), SerialMessageClass.SendData, SerialMessageType.Request, SerialMessageClass.ApplicationCommandHandler, SerialMessagePriority.High); byte[] newPayload = { (byte) this.getNode().ge... | /**
* Gets a SerialMessage with the THERMOSTAT_SETPOINT_SUPPORTED_GET command
* @return the serial message, or null if the supported command is not supported.
*/ | Gets a SerialMessage with the THERMOSTAT_SETPOINT_SUPPORTED_GET command | getSupportedMessage | {
"repo_name": "PlegmaLabs/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveThermostatSetpointCommandClass.java",
"license": "epl-1.0",
"size": 13203
} | [
"org.openhab.binding.zwave.internal.protocol.SerialMessage"
] | import org.openhab.binding.zwave.internal.protocol.SerialMessage; | import org.openhab.binding.zwave.internal.protocol.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 1,553,459 |
private static Optional<String> getMissingFileName(ResourceBundle bundle, String languageCode) {
final String fileNameRegexp;
final boolean searchForDefaultTranslation;
final String extension = bundle.getExtension();
final String baseName = bundle.getBaseName();
if (languageC... | static Optional<String> function(ResourceBundle bundle, String languageCode) { final String fileNameRegexp; final boolean searchForDefaultTranslation; final String extension = bundle.getExtension(); final String baseName = bundle.getBaseName(); if (languageCode == null) { searchForDefaultTranslation = true; fileNameReg... | /**
* Returns the name of translation file which is absent in resource bundle or Guava's Optional,
* if there is not missing translation.
* @param bundle resource bundle.
* @param languageCode language code.
* @return the name of translation file which is absent in resource bundle or Guava's Op... | Returns the name of translation file which is absent in resource bundle or Guava's Optional, if there is not missing translation | getMissingFileName | {
"repo_name": "vboerchers/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/TranslationCheck.java",
"license": "lgpl-2.1",
"size": 24503
} | [
"java.util.Locale",
"java.util.Optional"
] | import java.util.Locale; import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 917,359 |
protected List<FieldConfig> getClassFieldConfigs(ClassDescriptor cd) {
return FieldConfigHelper.getClassFieldConfigs(webConfig, cd);
} | List<FieldConfig> function(ClassDescriptor cd) { return FieldConfigHelper.getClassFieldConfigs(webConfig, cd); } | /**
* Find the FieldConfig objects for the the given ClassDescriptor.
* @param cd a ClassDescriptor
* @return the FieldConfig objects for the the given ClassDescriptor
*/ | Find the FieldConfig objects for the the given ClassDescriptor | getClassFieldConfigs | {
"repo_name": "elsiklab/intermine",
"path": "intermine/web/main/src/org/intermine/web/logic/results/InlineResultsTable.java",
"license": "lgpl-2.1",
"size": 15930
} | [
"java.util.List",
"org.intermine.metadata.ClassDescriptor",
"org.intermine.web.logic.config.FieldConfig",
"org.intermine.web.logic.config.FieldConfigHelper"
] | import java.util.List; import org.intermine.metadata.ClassDescriptor; import org.intermine.web.logic.config.FieldConfig; import org.intermine.web.logic.config.FieldConfigHelper; | import java.util.*; import org.intermine.metadata.*; import org.intermine.web.logic.config.*; | [
"java.util",
"org.intermine.metadata",
"org.intermine.web"
] | java.util; org.intermine.metadata; org.intermine.web; | 697,387 |
private boolean validateBeanField(Method method, Object actual, Object expected)
throws AssertionError {
Object expReflected = Reflect.invokeReflection(method, expected, new Object[]{});
Object actReflected = Reflect.invokeReflection(method, actual, new Object[]{});
if ((expReflecte... | boolean function(Method method, Object actual, Object expected) throws AssertionError { Object expReflected = Reflect.invokeReflection(method, expected, new Object[]{}); Object actReflected = Reflect.invokeReflection(method, actual, new Object[]{}); if ((expReflected == null) && (actReflected == null)) { return true; }... | /**
* validation entry point for Complex java types (BEAN)
* invokes given method for each actual and expected object, after null checks,
* execution is delegated to
*
* @param method
* @param actual
* @param expected
* @return
* @throws AssertionError
*/ | validation entry point for Complex java types (BEAN) invokes given method for each actual and expected object, after null checks, execution is delegated to | validateBeanField | {
"repo_name": "eswdd/disco",
"path": "disco-test/disco-test-utils/src/main/java/uk/co/exemel/testing/utils/disco/assertions/SetAssertion.java",
"license": "apache-2.0",
"size": 14074
} | [
"java.lang.reflect.Method",
"java.util.Collection",
"java.util.Map"
] | import java.lang.reflect.Method; import java.util.Collection; import java.util.Map; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,793,429 |
@SuppressWarnings("unchecked")
public static List<String> tokenize(CharSequence self, CharSequence delimiters) {
return InvokerHelper.asList(new StringTokenizer(self.toString(), delimiters.toString()));
} | @SuppressWarnings(STR) static List<String> function(CharSequence self, CharSequence delimiters) { return InvokerHelper.asList(new StringTokenizer(self.toString(), delimiters.toString())); } | /**
* Tokenize a CharSequence based on the given CharSequence. Each character in the CharSequence is a separate
* delimiter.
*
* @param self a CharSequence
* @param delimiters the delimiters
* @return a List of tokens
* @see java.util.StringTokenizer#StringTokenizer(String, String)
... | Tokenize a CharSequence based on the given CharSequence. Each character in the CharSequence is a separate delimiter | tokenize | {
"repo_name": "jwagenleitner/incubator-groovy",
"path": "src/main/java/org/codehaus/groovy/runtime/StringGroovyMethods.java",
"license": "apache-2.0",
"size": 164055
} | [
"java.util.List",
"java.util.StringTokenizer"
] | import java.util.List; import java.util.StringTokenizer; | import java.util.*; | [
"java.util"
] | java.util; | 1,036,119 |
@Override
public CityVo getVo() {
return (CityVo) super.getVo();
} | CityVo function() { return (CityVo) super.getVo(); } | /**
* Casted VO.
*/ | Casted VO | getVo | {
"repo_name": "AxelCB/TripSplitterClone",
"path": "main/org/kairos/tripSplitterClone/fx/destination/Fx_CreateCity.java",
"license": "apache-2.0",
"size": 2799
} | [
"org.kairos.tripSplitterClone.vo.destination.CityVo"
] | import org.kairos.tripSplitterClone.vo.destination.CityVo; | import org.kairos.*; | [
"org.kairos"
] | org.kairos; | 1,623,190 |
public String getRawMessage(MimeMessage mc) throws IOException, MessagingException {
ByteArrayOutputStream rawMessage = new ByteArrayOutputStream();
mc.writeTo(rawMessage);
return rawMessage.toString();
} | String function(MimeMessage mc) throws IOException, MessagingException { ByteArrayOutputStream rawMessage = new ByteArrayOutputStream(); mc.writeTo(rawMessage); return rawMessage.toString(); } | /**
* Convert a MimeMessage into raw text
* @param mc The mime message to convert
* @return A string representation of the mime message
* @throws IOException
* @throws MessagingException
*/ | Convert a MimeMessage into raw text | getRawMessage | {
"repo_name": "nicbet/MailboxMiner",
"path": "MailboxMiner2/src/main/java/ca/queensu/cs/sail/mailboxmina2/common/MboxRepository.java",
"license": "gpl-3.0",
"size": 25103
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"javax.mail.MessagingException",
"javax.mail.internet.MimeMessage"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import javax.mail.MessagingException; import javax.mail.internet.MimeMessage; | import java.io.*; import javax.mail.*; import javax.mail.internet.*; | [
"java.io",
"javax.mail"
] | java.io; javax.mail; | 2,499,142 |
public boolean hasError() {
return globalErrors.hasErrors();
}
/**
* Only used w/useGlobalErrors ctor argument, for HTable backward compat.
* Waits for all previous operations to finish, and returns errors and (optionally)
* failed operations themselves.
* @param failedRows an optional list into ... | boolean function() { return globalErrors.hasErrors(); } /** * Only used w/useGlobalErrors ctor argument, for HTable backward compat. * Waits for all previous operations to finish, and returns errors and (optionally) * failed operations themselves. * @param failedRows an optional list into which the rows that failed sin... | /**
* Only used w/useGlobalErrors ctor argument, for HTable backward compat.
* @return Whether there were any errors in any request since the last time
* {@link #waitForAllPreviousOpsAndReset(List)} was called, or AP was created.
*/ | Only used w/useGlobalErrors ctor argument, for HTable backward compat | hasError | {
"repo_name": "tobegit3hub/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncProcess.java",
"license": "apache-2.0",
"size": 45241
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,633,823 |
public Set<Entry<String, ResultData>> entrySet() {
return map.entrySet();
} | Set<Entry<String, ResultData>> function() { return map.entrySet(); } | /**
* Get the entry set.
*
* @return the sets of entries of the map
*/ | Get the entry set | entrySet | {
"repo_name": "ra0077/jmeter",
"path": "src/core/org/apache/jmeter/report/processor/MapResultData.java",
"license": "apache-2.0",
"size": 2530
} | [
"java.util.Map",
"java.util.Set"
] | import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,806,817 |
public PropertyStore getPropertyStore()
{
return neoStore.getPropertyStore();
} | PropertyStore function() { return neoStore.getPropertyStore(); } | /**
* Made public for testing, dont use.
*/ | Made public for testing, dont use | getPropertyStore | {
"repo_name": "kirilenkoo/neo4j-mobile-android",
"path": "neo4j-android/kernel-src/org/neo4j/kernel/impl/nioneo/xa/NeoStoreXaConnection.java",
"license": "gpl-3.0",
"size": 4056
} | [
"org.neo4j.kernel.impl.nioneo.store.PropertyStore"
] | import org.neo4j.kernel.impl.nioneo.store.PropertyStore; | import org.neo4j.kernel.impl.nioneo.store.*; | [
"org.neo4j.kernel"
] | org.neo4j.kernel; | 2,229,435 |
protected Set<Value> getRange(final Value prop) {
// TODO
return null;
} | Set<Value> function(final Value prop) { return null; } | /**
* Not yet implemented.
*
* @param prop
* @return Range of a given property.
*/ | Not yet implemented | getRange | {
"repo_name": "agazzarini/cumulusrdf",
"path": "cumulusrdf-core/src/main/java/edu/kit/aifb/cumulus/store/Schema.java",
"license": "apache-2.0",
"size": 8510
} | [
"java.util.Set",
"org.openrdf.model.Value"
] | import java.util.Set; import org.openrdf.model.Value; | import java.util.*; import org.openrdf.model.*; | [
"java.util",
"org.openrdf.model"
] | java.util; org.openrdf.model; | 2,277,171 |
public ProcessModel getProcessModel(String modelId) throws WorkflowException; | ProcessModel function(String modelId) throws WorkflowException; | /**
* Get a ProcessModel from its modelId. Retrieves the xml descriptor filename from the model Id
* and load abstract process model information in ProcessModel object
* @param modelId model id
* @return ProcessModel object
* @throws WorkflowException when something goes wrong
*/ | Get a ProcessModel from its modelId. Retrieves the xml descriptor filename from the model Id and load abstract process model information in ProcessModel object | getProcessModel | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/api/ProcessModelManager.java",
"license": "agpl-3.0",
"size": 4688
} | [
"com.silverpeas.workflow.api.model.ProcessModel"
] | import com.silverpeas.workflow.api.model.ProcessModel; | import com.silverpeas.workflow.api.model.*; | [
"com.silverpeas.workflow"
] | com.silverpeas.workflow; | 1,947,445 |
@Contract(pure=true)
long getModificationStamp(); | @Contract(pure=true) long getModificationStamp(); | /**
* Gets the modification stamp value. Modification stamp is a value changed by any modification
* of the content of the file. Note that it is not related to the file modification time.
*
* @return the modification stamp value.
* @see com.intellij.psi.PsiFile#getModificationStamp()
* @see com.intell... | Gets the modification stamp value. Modification stamp is a value changed by any modification of the content of the file. Note that it is not related to the file modification time | getModificationStamp | {
"repo_name": "signed/intellij-community",
"path": "platform/core-api/src/com/intellij/openapi/editor/Document.java",
"license": "apache-2.0",
"size": 12562
} | [
"org.jetbrains.annotations.Contract"
] | import org.jetbrains.annotations.Contract; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,487,931 |
@Test
public void testSetReadTimeout() {
final MongoDbConfiguration config = new MongoDbConfiguration();
assertEquals(0, config.getReadTimeout());
config.setReadTimeout(30000);
assertEquals(30000, config.getReadTimeout());
config.setReadTimeout(0);
assertEquals(0... | void function() { final MongoDbConfiguration config = new MongoDbConfiguration(); assertEquals(0, config.getReadTimeout()); config.setReadTimeout(30000); assertEquals(30000, config.getReadTimeout()); config.setReadTimeout(0); assertEquals(0, config.getReadTimeout()); } | /**
* Test method for {@link MongoDbConfiguration#setReadTimeout(int)}.
*/ | Test method for <code>MongoDbConfiguration#setReadTimeout(int)</code> | testSetReadTimeout | {
"repo_name": "allanbank/mongodb-async-driver",
"path": "src/test/java/com/allanbank/mongodb/MongoDbConfigurationTest.java",
"license": "apache-2.0",
"size": 38179
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 72,771 |
List<InputSplit> getSplits(final JobContext context, final String startKey, final String endKey)
throws IOException, InterruptedException {
Configuration conf = context.getConfiguration();
boolean ignoreMissing = conf.getBoolean(WALPlayer.IGNORE_MISSING_FILES, false);
Path[] inputPaths = getInputPat... | List<InputSplit> getSplits(final JobContext context, final String startKey, final String endKey) throws IOException, InterruptedException { Configuration conf = context.getConfiguration(); boolean ignoreMissing = conf.getBoolean(WALPlayer.IGNORE_MISSING_FILES, false); Path[] inputPaths = getInputPaths(conf); long start... | /**
* implementation shared with deprecated HLogInputFormat
*/ | implementation shared with deprecated HLogInputFormat | getSplits | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/WALInputFormat.java",
"license": "apache-2.0",
"size": 11267
} | [
"java.io.FileNotFoundException",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.mapreduce.InputSplit",
"org.apache.hadoop.m... | import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.InputSpli... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,979,758 |
private void decodeCurrentElement() throws IOException {
ByteString dataToDecode = buffer.substring(0, startOfDelimiterInBuffer);
currentValue = dataToDecode.toStringUtf8();
elementIsPresent = true;
buffer = buffer.substring(endOfDelimiterInBuffer);
} | void function() throws IOException { ByteString dataToDecode = buffer.substring(0, startOfDelimiterInBuffer); currentValue = dataToDecode.toStringUtf8(); elementIsPresent = true; buffer = buffer.substring(endOfDelimiterInBuffer); } | /**
* Decodes the current element updating the buffer to only contain the unconsumed bytes.
*
* <p>This invalidates the currently stored {@code startOfDelimiterInBuffer} and
* {@code endOfDelimiterInBuffer}.
*/ | Decodes the current element updating the buffer to only contain the unconsumed bytes. This invalidates the currently stored startOfDelimiterInBuffer and endOfDelimiterInBuffer | decodeCurrentElement | {
"repo_name": "jbonofre/beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/io/TextSource.java",
"license": "apache-2.0",
"size": 10386
} | [
"com.google.protobuf.ByteString",
"java.io.IOException"
] | import com.google.protobuf.ByteString; import java.io.IOException; | import com.google.protobuf.*; import java.io.*; | [
"com.google.protobuf",
"java.io"
] | com.google.protobuf; java.io; | 1,541,559 |
List<HiveObjectPrivilege> listPrincipalPartitionColumnGrantsAll(
String principalName, PrincipalType principalType); | List<HiveObjectPrivilege> listPrincipalPartitionColumnGrantsAll( String principalName, PrincipalType principalType); | /**
* List all Partition column grants for a given principal
* @param principalName principal name
* @param principalType type
* @return all Partition column grants for this principal
*/ | List all Partition column grants for a given principal | listPrincipalPartitionColumnGrantsAll | {
"repo_name": "sankarh/hive",
"path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/RawStore.java",
"license": "apache-2.0",
"size": 95486
} | [
"java.util.List",
"org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege",
"org.apache.hadoop.hive.metastore.api.PrincipalType"
] | import java.util.List; import org.apache.hadoop.hive.metastore.api.HiveObjectPrivilege; import org.apache.hadoop.hive.metastore.api.PrincipalType; | import java.util.*; import org.apache.hadoop.hive.metastore.api.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,884,301 |
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.forecast, menu);
return true;
} | boolean function(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.forecast, menu); return true; } | /**
* This is where we inflate and set up the menu for this Activity.
*
* @param menu The options menu in which you place your items.
* @return You must return true for the menu to be displayed;
* if you return false it will not be shown.
* @see android.app.Activity#onPrepareOptionsMenu(Me... | This is where we inflate and set up the menu for this Activity | onCreateOptionsMenu | {
"repo_name": "rohan20/SunshineWatchface",
"path": "app/src/main/java/com/example/android/sunshine/app/DetailActivity.java",
"license": "apache-2.0",
"size": 17288
} | [
"android.view.Menu",
"android.view.MenuInflater"
] | import android.view.Menu; import android.view.MenuInflater; | import android.view.*; | [
"android.view"
] | android.view; | 1,685,140 |
public static World getInstance() {
if (instance == null) {
try {
boolean members = Virtue.getInstance().getProperty("world.members", true);
int nodeId = Virtue.getInstance().getProperty("world.node", 1);
MapLoader mapLoader = Virtue.getInstance().getMapLoader();
instance = new World(nodeId, mem... | static World function() { if (instance == null) { try { boolean members = Virtue.getInstance().getProperty(STR, true); int nodeId = Virtue.getInstance().getProperty(STR, 1); MapLoader mapLoader = Virtue.getInstance().getMapLoader(); instance = new World(nodeId, members, new RegionManager(mapLoader)); new RegionUpdateTi... | /**
* Returns the {@link World} instance
*/ | Returns the <code>World</code> instance | getInstance | {
"repo_name": "Sundays211/VirtueRS3",
"path": "src/main/java/org/virtue/game/World.java",
"license": "mit",
"size": 5949
} | [
"org.virtue.Virtue",
"org.virtue.game.map.RegionUpdateTick",
"org.virtue.game.map.square.RegionManager",
"org.virtue.game.map.square.load.MapLoader"
] | import org.virtue.Virtue; import org.virtue.game.map.RegionUpdateTick; import org.virtue.game.map.square.RegionManager; import org.virtue.game.map.square.load.MapLoader; | import org.virtue.*; import org.virtue.game.map.*; import org.virtue.game.map.square.*; import org.virtue.game.map.square.load.*; | [
"org.virtue",
"org.virtue.game"
] | org.virtue; org.virtue.game; | 2,501,364 |
public static void exportAllAsJPEG(final Graph2DView view, final String filename)
throws IOException {
final y.io.JPGIOHandler jpg = new y.io.JPGIOHandler();
jpg.setAntialiasingEnabled(true);
jpg.setQuality(0.9f);
exportGraphToImageFileFormat(view.getGraph2D(), jpg, filename,
jpg.createD... | static void function(final Graph2DView view, final String filename) throws IOException { final y.io.JPGIOHandler jpg = new y.io.JPGIOHandler(); jpg.setAntialiasingEnabled(true); jpg.setQuality(0.9f); exportGraphToImageFileFormat(view.getGraph2D(), jpg, filename, jpg.createDefaultGraph2DView(view.getGraph2D())); } | /**
* Exports a graph to a JPEG file.
*
* @param view The graph to export.
* @param filename The name of the JPEG file.
*
* @throws IOException Thrown if saving the file fails.
*/ | Exports a graph to a JPEG file | exportAllAsJPEG | {
"repo_name": "guiquanz/binnavi",
"path": "src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/GraphExporters.java",
"license": "apache-2.0",
"size": 7769
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,362,459 |
//-----------------------------------------------------------------------
public void clear() {
iMinPrintedDigits = 1;
iPrintZeroSetting = PRINT_ZERO_RARELY_LAST;
iMaxParsedDigits = 10;
iRejectSignedValues = false;
iPrefix = null;
if (iElementPairs == null) {
... | void function() { iMinPrintedDigits = 1; iPrintZeroSetting = PRINT_ZERO_RARELY_LAST; iMaxParsedDigits = 10; iRejectSignedValues = false; iPrefix = null; if (iElementPairs == null) { iElementPairs = new ArrayList<Object>(); } else { iElementPairs.clear(); } iNotPrinter = false; iNotParser = false; iFieldFormatters = new... | /**
* Clears out all the appended elements, allowing this builder to be reused.
*/ | Clears out all the appended elements, allowing this builder to be reused | clear | {
"repo_name": "mnn/AutoShutdown",
"path": "src/main/java/externalAS/org/joda/time/format/PeriodFormatterBuilder.java",
"license": "lgpl-2.1",
"size": 69283
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 5,876 |
public int indexOf(AbstractEpisode episode) {
return listOfEpisodes.indexOf(episode);
} | int function(AbstractEpisode episode) { return listOfEpisodes.indexOf(episode); } | /**
* Returns the index of the given {@link AbstractEpisode}. If the episode is unknown, returns
* -1.
*
* @param episode
* @return
*/ | Returns the index of the given <code>AbstractEpisode</code>. If the episode is unknown, returns -1 | indexOf | {
"repo_name": "brtonnies/rapidminer-studio",
"path": "src/main/java/com/rapidminer/gui/tour/comic/ComicManager.java",
"license": "agpl-3.0",
"size": 12915
} | [
"com.rapidminer.gui.tour.comic.episodes.AbstractEpisode"
] | import com.rapidminer.gui.tour.comic.episodes.AbstractEpisode; | import com.rapidminer.gui.tour.comic.episodes.*; | [
"com.rapidminer.gui"
] | com.rapidminer.gui; | 2,213,997 |
@SuppressWarnings("unused")
@RequiresApi(21)
public void enablePowerCycleOnFailures(Context context) {
initializeWithContext(context);
if (this.mLocalBroadcastManager != null) {
this.mLocalBroadcastManager.registerReceiver(this.mBluetoothEventReceiver,
new Int... | @SuppressWarnings(STR) @RequiresApi(21) void function(Context context) { initializeWithContext(context); if (this.mLocalBroadcastManager != null) { this.mLocalBroadcastManager.registerReceiver(this.mBluetoothEventReceiver, new IntentFilter(STR)); this.mLocalBroadcastManager.registerReceiver(this.mBluetoothEventReceiver... | /**
* If set to true, bluetooth will be power cycled on any tests run that determine bluetooth is
* in a bad state.
*
* @param context
*/ | If set to true, bluetooth will be power cycled on any tests run that determine bluetooth is in a bad state | enablePowerCycleOnFailures | {
"repo_name": "paulpv/android-beacon-library",
"path": "lib/src/main/java/org/altbeacon/bluetooth/BluetoothMedic.java",
"license": "apache-2.0",
"size": 21981
} | [
"android.content.Context",
"android.content.IntentFilter",
"androidx.annotation.RequiresApi",
"org.altbeacon.beacon.logging.LogManager"
] | import android.content.Context; import android.content.IntentFilter; import androidx.annotation.RequiresApi; import org.altbeacon.beacon.logging.LogManager; | import android.content.*; import androidx.annotation.*; import org.altbeacon.beacon.logging.*; | [
"android.content",
"androidx.annotation",
"org.altbeacon.beacon"
] | android.content; androidx.annotation; org.altbeacon.beacon; | 2,620,376 |
public Date getDate() {
return date;
}
| Date function() { return date; } | /**
* Getter method for the date attribute
*
* @return The value of the attribute
*/ | Getter method for the date attribute | getDate | {
"repo_name": "BackupTheBerlios/arara-svn",
"path": "core/tags/arara-1.0/src/main/java/net/indrix/arara/vo/Photo.java",
"license": "gpl-2.0",
"size": 8664
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,520,931 |
public void setDate(String fieldName, Date value) {
long columnIndex = row.getColumnIndex(fieldName);
if (value == null) {
row.setNull(columnIndex);
} else {
row.setDate(columnIndex, value);
}
} | void function(String fieldName, Date value) { long columnIndex = row.getColumnIndex(fieldName); if (value == null) { row.setNull(columnIndex); } else { row.setDate(columnIndex, value); } } | /**
* Sets the {@code Date} value of the given field.
*
* @param fieldName field name.
* @param value value to insert.
* @throws IllegalArgumentException if field name doesn't exists or isn't a Date field.
*/ | Sets the Date value of the given field | setDate | {
"repo_name": "horie1024/realm-java",
"path": "realm/realm-library/src/main/java/io/realm/DynamicRealmObject.java",
"license": "apache-2.0",
"size": 28908
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 759,570 |
@SuppressWarnings({ "unchecked", "rawtypes" })
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack itemStack, EntityPlayer playerIn, List tooltip, boolean advanced)
{
tooltip.add("Decomposes in " + (getMaxDamage() - itemStack.getItemDamage()) + " seconds");
} | @SuppressWarnings({ STR, STR }) @SideOnly(Side.CLIENT) void function(ItemStack itemStack, EntityPlayer playerIn, List tooltip, boolean advanced) { tooltip.add(STR + (getMaxDamage() - itemStack.getItemDamage()) + STR); } | /**
* allows items to add custom lines of information to the mouseover description
*
* @param tooltip All lines to display in the Item's tooltip. This is a List of Strings.
* @param advanced Whether the setting "Advanced tooltips" is enabled
*/ | allows items to add custom lines of information to the mouseover description | addInformation | {
"repo_name": "tom5454/ARKCraft",
"path": "src/main/java/com/uberverse/arkcraft/common/item/ARKCraftFeces.java",
"license": "mit",
"size": 1183
} | [
"java.util.List",
"net.minecraft.entity.player.EntityPlayer",
"net.minecraft.item.ItemStack",
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import java.util.*; import net.minecraft.entity.player.*; import net.minecraft.item.*; import net.minecraftforge.fml.relauncher.*; | [
"java.util",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraftforge.fml"
] | java.util; net.minecraft.entity; net.minecraft.item; net.minecraftforge.fml; | 1,416,703 |
final Map<String, String> parts = Maps.newLinkedHashMap();
getPartitionKeyValues(location, parts);
return parts;
} | final Map<String, String> parts = Maps.newLinkedHashMap(); getPartitionKeyValues(location, parts); return parts; } | /**
* Returns the partition key values from the given path.
* @param location location path
* @return the partition key values from the given path.
*/ | Returns the partition key values from the given path | getPartitionKeyValues | {
"repo_name": "Netflix/metacat",
"path": "metacat-common-server/src/main/java/com/netflix/metacat/common/server/partition/util/PartitionUtil.java",
"license": "apache-2.0",
"size": 3826
} | [
"com.google.common.collect.Maps",
"java.util.Map"
] | import com.google.common.collect.Maps; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,175,554 |
public Paint getOutlinePaint() {
return this.outlinePaint;
} | Paint function() { return this.outlinePaint; } | /**
* Returns the outline paint.
*
* @return The outline paint (possibly <code>null</code>).
*
* @since 1.0.2
*/ | Returns the outline paint | getOutlinePaint | {
"repo_name": "simeshev/parabuild-ci",
"path": "3rdparty/jfreechart-1.0.5/source/org/jfree/chart/annotations/XYPolygonAnnotation.java",
"license": "lgpl-3.0",
"size": 12741
} | [
"java.awt.Paint"
] | import java.awt.Paint; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,669,415 |
public static void listAssetOrderedByDate(
com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) {
mediaServicesManager.assets().list("contoso", "contosomedia", null, null, "properties/created", Context.NONE);
} | static void function( com.azure.resourcemanager.mediaservices.MediaServicesManager mediaServicesManager) { mediaServicesManager.assets().list(STR, STR, null, null, STR, Context.NONE); } | /**
* Sample code: List Asset ordered by date.
*
* @param mediaServicesManager Entry point to MediaServicesManager. This Swagger was generated by the API Framework.
*/ | Sample code: List Asset ordered by date | listAssetOrderedByDate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mediaservices/azure-resourcemanager-mediaservices/src/samples/java/com/azure/resourcemanager/mediaservices/AssetsListSamples.java",
"license": "mit",
"size": 1858
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,888,925 |
public static void createError(FreeColXMLWriter xw, String messageID, String message) {
try {
xw.writeStartElement("error");
if (messageID != null && !messageID.isEmpty()) {
xw.writeAttribute("messageID", messageID);
}
if (message != null && ... | static void function(FreeColXMLWriter xw, String messageID, String message) { try { xw.writeStartElement("error"); if (messageID != null && !messageID.isEmpty()) { xw.writeAttribute(STR, messageID); } if (message != null && !message.isEmpty()) { xw.writeAttribute(STR, message); } xw.writeEndElement(); } catch (XMLStrea... | /**
* Creates an error message.
*
* @param xw The <code>FreeColXMLWriter</code> to write to.
* @param messageID Identifies the "i18n"-keyname. Not specified in the
* message if <i>null</i>.
* @param message The error in plain text. Not specified in the message if
* ... | Creates an error message | createError | {
"repo_name": "edijman/SOEN_6431_Colonization_Game",
"path": "src/net/sf/freecol/common/networking/DOMMessage.java",
"license": "gpl-2.0",
"size": 15850
} | [
"java.util.logging.Level",
"javax.xml.stream.XMLStreamException",
"net.sf.freecol.common.io.FreeColXMLWriter"
] | import java.util.logging.Level; import javax.xml.stream.XMLStreamException; import net.sf.freecol.common.io.FreeColXMLWriter; | import java.util.logging.*; import javax.xml.stream.*; import net.sf.freecol.common.io.*; | [
"java.util",
"javax.xml",
"net.sf.freecol"
] | java.util; javax.xml; net.sf.freecol; | 2,395,363 |
// create the HTML file inside the course base folder container
final VFSLeaf leaf = course.getCourseFolderContainer().createChildLeaf(htmlFileName);
final BufferedOutputStream bos = new BufferedOutputStream(leaf.getOutputStream(false));
FileUtils.save(bos, htmlText, ENCODING);
try {
bos.close();
}... | final VFSLeaf leaf = course.getCourseFolderContainer().createChildLeaf(htmlFileName); final BufferedOutputStream bos = new BufferedOutputStream(leaf.getOutputStream(false)); FileUtils.save(bos, htmlText, ENCODING); try { bos.close(); } catch (IOException e) { Tracing.createLoggerFor(HTMLDocumentHelper.class).error(STR ... | /**
* Create a HTML file and put it into the course folder container.
*
* @param course the corresponding course object
* @param htmlFileName HTML file name
* @param htmlText the full html site content with head and body
* @return the created folder leaf
*/ | Create a HTML file and put it into the course folder container | createHtmlDocument | {
"repo_name": "stevenhva/InfoLearn_OpenOLAT",
"path": "src/main/java/de/tuchemnitz/wizard/helper/course/HTMLDocumentHelper.java",
"license": "apache-2.0",
"size": 2603
} | [
"java.io.BufferedOutputStream",
"java.io.IOException",
"org.olat.core.logging.Tracing",
"org.olat.core.util.FileUtils",
"org.olat.core.util.vfs.VFSLeaf"
] | import java.io.BufferedOutputStream; import java.io.IOException; import org.olat.core.logging.Tracing; import org.olat.core.util.FileUtils; import org.olat.core.util.vfs.VFSLeaf; | import java.io.*; import org.olat.core.logging.*; import org.olat.core.util.*; import org.olat.core.util.vfs.*; | [
"java.io",
"org.olat.core"
] | java.io; org.olat.core; | 2,017,470 |
@Nonnull
public java.util.concurrent.CompletableFuture<VppToken> deleteAsync() {
return sendAsync(HttpMethod.DELETE, null);
} | java.util.concurrent.CompletableFuture<VppToken> function() { return sendAsync(HttpMethod.DELETE, null); } | /**
* Delete this item from the service
*
* @return a future with the deletion result
*/ | Delete this item from the service | deleteAsync | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/VppTokenRequest.java",
"license": "mit",
"size": 5552
} | [
"com.microsoft.graph.http.HttpMethod",
"com.microsoft.graph.models.VppToken"
] | import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.VppToken; | import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; | [
"com.microsoft.graph"
] | com.microsoft.graph; | 985,393 |
void addScrapView(View scrap, int position, int viewType) {
if (viewTypeCount == 1) {
currentScrapViews.put(position, scrap);
} else {
scrapViews[viewType].put(position, scrap);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
scrap.setAccessibilityDelegate(null);
}
} | void addScrapView(View scrap, int position, int viewType) { if (viewTypeCount == 1) { currentScrapViews.put(position, scrap); } else { scrapViews[viewType].put(position, scrap); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { scrap.setAccessibilityDelegate(null); } } | /**
* Put a view into the ScrapViews list. These views are unordered.
*
* @param scrap The view to add
*/ | Put a view into the ScrapViews list. These views are unordered | addScrapView | {
"repo_name": "myroid/InfiniteViewPager",
"path": "infiniteviewpager/src/main/java/com/zanlabs/widget/infiniteviewpager/RecycleBin.java",
"license": "mit",
"size": 4843
} | [
"android.os.Build",
"android.view.View"
] | import android.os.Build; import android.view.View; | import android.os.*; import android.view.*; | [
"android.os",
"android.view"
] | android.os; android.view; | 2,561,302 |
public void plug(Connection c) throws
Types.BadServerResponse,
XmlRpcException {
String method_call = "VIF.plug";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)};
Map response = c.dispatc... | void function(Connection c) throws Types.BadServerResponse, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); if(response.get(STR).equals(S... | /**
* Hotplug the specified VIF, dynamically attaching it to the running VM
*
*/ | Hotplug the specified VIF, dynamically attaching it to the running VM | plug | {
"repo_name": "cc14514/hq6",
"path": "hq-plugin/xen-plugin/src/main/java/com/xensource/xenapi/VIF.java",
"license": "unlicense",
"size": 34400
} | [
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import java.util.*; import org.apache.xmlrpc.*; | [
"java.util",
"org.apache.xmlrpc"
] | java.util; org.apache.xmlrpc; | 2,764,923 |
public void setOrigin(Point p) {
if (p == null)
p = new Point();
if (!origin.equals(p)) {
origin = p;
repaint();
}
}
/**
* Sets the horizontal and vertical spacing of the grid. A grid spacing of 0
* will be replaced with the {@link SnapToGrid#DEFAULT_GRID_SIZE default} | void function(Point p) { if (p == null) p = new Point(); if (!origin.equals(p)) { origin = p; repaint(); } } /** * Sets the horizontal and vertical spacing of the grid. A grid spacing of 0 * will be replaced with the {@link SnapToGrid#DEFAULT_GRID_SIZE default} | /**
* Sets the origin of the grid. The origin is used only to determine the
* offset from 0,0.
*
* @param p
* the origin
*/ | Sets the origin of the grid. The origin is used only to determine the offset from 0,0 | setOrigin | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/gef/editparts/GridLayer.java",
"license": "epl-1.0",
"size": 3854
} | [
"org.eclipse.draw2d.geometry.Point",
"org.eclipse.gef.SnapToGrid"
] | import org.eclipse.draw2d.geometry.Point; import org.eclipse.gef.SnapToGrid; | import org.eclipse.draw2d.geometry.*; import org.eclipse.gef.*; | [
"org.eclipse.draw2d",
"org.eclipse.gef"
] | org.eclipse.draw2d; org.eclipse.gef; | 1,578,265 |
public AzureBatchLinkedService withAccountName(Object accountName) {
if (this.innerTypeProperties() == null) {
this.innerTypeProperties = new AzureBatchLinkedServiceTypeProperties();
}
this.innerTypeProperties().withAccountName(accountName);
return this;
} | AzureBatchLinkedService function(Object accountName) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new AzureBatchLinkedServiceTypeProperties(); } this.innerTypeProperties().withAccountName(accountName); return this; } | /**
* Set the accountName property: The Azure Batch account name. Type: string (or Expression with resultType string).
*
* @param accountName the accountName value to set.
* @return the AzureBatchLinkedService object itself.
*/ | Set the accountName property: The Azure Batch account name. Type: string (or Expression with resultType string) | withAccountName | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/AzureBatchLinkedService.java",
"license": "mit",
"size": 9166
} | [
"com.azure.resourcemanager.datafactory.fluent.models.AzureBatchLinkedServiceTypeProperties"
] | import com.azure.resourcemanager.datafactory.fluent.models.AzureBatchLinkedServiceTypeProperties; | import com.azure.resourcemanager.datafactory.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,513,480 |
public FileServiceBuilder cacheControl(CharSequence cacheControl) {
requireNonNull(cacheControl, "cacheControl");
return setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl);
} | FileServiceBuilder function(CharSequence cacheControl) { requireNonNull(cacheControl, STR); return setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); } | /**
* Sets the {@code "cache-control"} header. This method is a shortcut for:
* <pre>{@code
* builder.setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl);
* }</pre>
*/ | Sets the "cache-control" header. This method is a shortcut for: <code>builder.setHeader(HttpHeaderNames.CACHE_CONTROL, cacheControl); </code> | cacheControl | {
"repo_name": "anuraaga/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/file/FileServiceBuilder.java",
"license": "apache-2.0",
"size": 8390
} | [
"com.linecorp.armeria.common.HttpHeaderNames",
"java.util.Objects"
] | import com.linecorp.armeria.common.HttpHeaderNames; import java.util.Objects; | import com.linecorp.armeria.common.*; import java.util.*; | [
"com.linecorp.armeria",
"java.util"
] | com.linecorp.armeria; java.util; | 2,481,769 |
public void testEntrySet() {
Set<Map.Entry<String, String>> entrySet = map.entrySet();
assertEquals(INITIAL_VALUE.entrySet(), entrySet);
entrySet.remove(new AbstractMap.SimpleEntry<String, String>("ghi", ""));
assertFalse(map.containsKey("ghi"));
entrySet.removeAll(Arrays.asList(new Object[] ... | void function() { Set<Map.Entry<String, String>> entrySet = map.entrySet(); assertEquals(INITIAL_VALUE.entrySet(), entrySet); entrySet.remove(new AbstractMap.SimpleEntry<String, String>("ghi", STRghiSTRabcSTRcbaSTRzzzSTRabcSTRabcSTRcbaSTRdefSTRpqrSTRcbaSTRdefSTRpqrSTRmodifiedSTRmodifiedSTRdefSTRmodifiedSTRpqr")); it.re... | /**
* Test method for {@link org.jetel.ctl.MapFieldWrapper#entrySet()}.
*/ | Test method for <code>org.jetel.ctl.MapFieldWrapper#entrySet()</code> | testEntrySet | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/test/org/jetel/ctl/MapFieldWrapperTest.java",
"license": "lgpl-2.1",
"size": 9606
} | [
"java.util.AbstractMap",
"java.util.Map",
"java.util.Set"
] | import java.util.AbstractMap; import java.util.Map; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,008,065 |
public static Intent locationQueryByDateMaker(
final Date startDate,
final Date endDate,
final ResultReceiver receiver)
{
Intent intent = new Intent(Command.LOCATION_SEARCH.toString());
// set target explicitly
intent.setComponent(new ComponentName(PKGNAME, PKGNAM... | static Intent function( final Date startDate, final Date endDate, final ResultReceiver receiver) { Intent intent = new Intent(Command.LOCATION_SEARCH.toString()); intent.setComponent(new ComponentName(PKGNAME, PKGNAME + STR)); intent.putExtra(DBHANDLER_REQUEST_CALLBACK, receiver); Predicate<Location> predicate = new Pr... | /**
* Location query by date maker. Generates an intent to use for DbHandler
* activation and query.
*
* @param startDate
* the start date
* @param endDate
* the end date
* @param receiver
* (probably this)
* @return the query intent
... | Location query by date maker. Generates an intent to use for DbHandler activation and query | locationQueryByDateMaker | {
"repo_name": "PersonalPrism/PersonalPrism-AndroidAgent",
"path": "Personal Prism - Android Agent/src/io/github/personalprism/personalprism_droid/DbHandler.java",
"license": "gpl-3.0",
"size": 12763
} | [
"android.content.ComponentName",
"android.content.Intent",
"android.location.Location",
"android.os.ResultReceiver",
"com.db4o.query.Predicate",
"java.util.Date"
] | import android.content.ComponentName; import android.content.Intent; import android.location.Location; import android.os.ResultReceiver; import com.db4o.query.Predicate; import java.util.Date; | import android.content.*; import android.location.*; import android.os.*; import com.db4o.query.*; import java.util.*; | [
"android.content",
"android.location",
"android.os",
"com.db4o.query",
"java.util"
] | android.content; android.location; android.os; com.db4o.query; java.util; | 2,007,954 |
public void setOtherConfig(Connection c, Map<String, String> otherConfig)
throws BadServerResponse, XenAPIException, XmlRpcException {
String method_call = "VDI.set_other_config";
String session = c.getSessionReference();
Object[] method_params = { Marshalling.toXMLRPC(session),
Marshalling.toXMLRPC(thi... | void function(Connection c, Map<String, String> otherConfig) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = { Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig) }; Map... | /**
* Set the other_config field of the given VDI.
*
* @param otherConfig
* New value to set
*/ | Set the other_config field of the given VDI | setOtherConfig | {
"repo_name": "guzy/OnceCenter",
"path": "src/com/once/xenapi/VDI.java",
"license": "apache-2.0",
"size": 80204
} | [
"com.once.xenapi.Types",
"java.util.Map",
"org.apache.xmlrpc.XmlRpcException"
] | import com.once.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException; | import com.once.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.once.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.once.xenapi; java.util; org.apache.xmlrpc; | 1,091,888 |
EClass getSchool(); | EClass getSchool(); | /**
* Returns the meta object for class '{@link school.School <em>School</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>School</em>'.
* @see school.School
* @generated
*/ | Returns the meta object for class '<code>school.School School</code>'. | getSchool | {
"repo_name": "tht-krisztian/EMF-IncQuery-Examples",
"path": "school/school/src/school/SchoolPackage.java",
"license": "epl-1.0",
"size": 34721
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 139,460 |
static Map<String, PropSetter> getNativePropSettersForShadowNodeClass(
Class<? extends ReactShadowNode> cls) {
if (cls == ReactShadowNode.class) {
return EMPTY_PROPS_MAP;
}
Map<String, PropSetter> props = CLASS_PROPS_CACHE.get(cls);
if (props != null) {
return props;
}
// Th... | static Map<String, PropSetter> getNativePropSettersForShadowNodeClass( Class<? extends ReactShadowNode> cls) { if (cls == ReactShadowNode.class) { return EMPTY_PROPS_MAP; } Map<String, PropSetter> props = CLASS_PROPS_CACHE.get(cls); if (props != null) { return props; } props = new HashMap<>( getNativePropSettersForShad... | /**
* Returns map from property name to setter instances for all the property setters annotated with
* {@link ReactProp} (or {@link ReactPropGroup} in the given {@link ReactShadowNode} subclass plus
* all the setters declared by its parent classes up to {@link ReactShadowNode} which is treated
* as a base c... | Returns map from property name to setter instances for all the property setters annotated with <code>ReactProp</code> (or <code>ReactPropGroup</code> in the given <code>ReactShadowNode</code> subclass plus all the setters declared by its parent classes up to <code>ReactShadowNode</code> which is treated as a base class | getNativePropSettersForShadowNodeClass | {
"repo_name": "Helena-High/school-app",
"path": "node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java",
"license": "apache-2.0",
"size": 16951
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 670,207 |
public Column createColumn(String title) {
return new Column(title);
} | Column function(String title) { return new Column(title); } | /**
* Creates a new column
*
* @param title
* the column's title
* @return the newly created column
*/ | Creates a new column | createColumn | {
"repo_name": "appnativa/rare",
"path": "source/rare/core/com/appnativa/rare/widget/aWidget.java",
"license": "gpl-3.0",
"size": 150848
} | [
"com.appnativa.rare.ui.Column"
] | import com.appnativa.rare.ui.Column; | import com.appnativa.rare.ui.*; | [
"com.appnativa.rare"
] | com.appnativa.rare; | 1,640,404 |
protected void onCrafting(ItemStack par1ItemStack, int par2) {
this.field_75231_g += par2;
this.onCrafting(par1ItemStack);
} | void function(ItemStack par1ItemStack, int par2) { this.field_75231_g += par2; this.onCrafting(par1ItemStack); } | /**
* the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an
* internal count then calls onCrafting(item).
*/ | the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood. Typically increases an internal count then calls onCrafting(item) | onCrafting | {
"repo_name": "DirectCodeGraveyard/Minetweak",
"path": "src/main/java/net/minecraft/inventory/slot/SlotMerchantResult.java",
"license": "lgpl-3.0",
"size": 3937
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 2,842,974 |
ControllerClientTagger withTag(long requestId, String...requestInfo) {
String requestDescriptor = RequestTracker.buildRequestDescriptor(requestInfo);
log.info(requestId, "Tagging client request ({}).", requestDescriptor);
clientStub = clientStub.withOption(RPCTracingHelpers.R... | ControllerClientTagger withTag(long requestId, String...requestInfo) { String requestDescriptor = RequestTracker.buildRequestDescriptor(requestInfo); log.info(requestId, STR, requestDescriptor); clientStub = clientStub.withOption(RPCTracingHelpers.REQUEST_DESCRIPTOR_CALL_OPTION, requestDescriptor) .withOption(RPCTracin... | /**
* We attach custom tags to requests by adding them as call options upon a controller request. This guarantees that,
* irrespective of whether the different threads issue and intercept the client request, the tags will be available
* for being attached to the RPC request.
*
... | We attach custom tags to requests by adding them as call options upon a controller request. This guarantees that, irrespective of whether the different threads issue and intercept the client request, the tags will be available for being attached to the RPC request | withTag | {
"repo_name": "pravega/pravega",
"path": "client/src/main/java/io/pravega/client/control/impl/ControllerImpl.java",
"license": "apache-2.0",
"size": 133733
} | [
"io.pravega.common.tracing.RequestTracker",
"io.pravega.shared.controller.tracing.RPCTracingHelpers"
] | import io.pravega.common.tracing.RequestTracker; import io.pravega.shared.controller.tracing.RPCTracingHelpers; | import io.pravega.common.tracing.*; import io.pravega.shared.controller.tracing.*; | [
"io.pravega.common",
"io.pravega.shared"
] | io.pravega.common; io.pravega.shared; | 1,473,406 |
public static Set<Connection> getContainerConnections(ContainerShape shape) {
return getContainerConnections(shape, false);
}
| static Set<Connection> function(ContainerShape shape) { return getContainerConnections(shape, false); } | /**
* Returns all connections contained in this shape, as they connect the shape or
* child shapes to each other.
*
* @param shape
* @return
*/ | Returns all connections contained in this shape, as they connect the shape or child shapes to each other | getContainerConnections | {
"repo_name": "camunda/camunda-eclipse-plugin",
"path": "org.camunda.bpm.modeler/src/org/camunda/bpm/modeler/core/layout/util/LayoutUtil.java",
"license": "epl-1.0",
"size": 45536
} | [
"java.util.Set",
"org.eclipse.graphiti.mm.pictograms.Connection",
"org.eclipse.graphiti.mm.pictograms.ContainerShape"
] | import java.util.Set; import org.eclipse.graphiti.mm.pictograms.Connection; import org.eclipse.graphiti.mm.pictograms.ContainerShape; | import java.util.*; import org.eclipse.graphiti.mm.pictograms.*; | [
"java.util",
"org.eclipse.graphiti"
] | java.util; org.eclipse.graphiti; | 949,823 |
void refreshIfEmpty() {
if (ancestor != null) {
ancestor.refreshIfEmpty();
if (ancestor.getDelegate() != ancestorDelegate) {
throw new ConcurrentModificationException();
}
} else if (delegate.isEmpty()) {
Collection<V> newDelegate = map.get(key);
if (new... | void refreshIfEmpty() { if (ancestor != null) { ancestor.refreshIfEmpty(); if (ancestor.getDelegate() != ancestorDelegate) { throw new ConcurrentModificationException(); } } else if (delegate.isEmpty()) { Collection<V> newDelegate = map.get(key); if (newDelegate != null) { delegate = newDelegate; } } } | /**
* If the delegate collection is empty, but the multimap has values for the
* key, replace the delegate with the new collection for the key.
*
* <p>For a subcollection, refresh its ancestor and validate that the
* ancestor delegate hasn't changed.
*/ | If the delegate collection is empty, but the multimap has values for the key, replace the delegate with the new collection for the key. For a subcollection, refresh its ancestor and validate that the ancestor delegate hasn't changed | refreshIfEmpty | {
"repo_name": "maxvetrenko/guava-libraries-17-0",
"path": "guava/src/com/google/common/collect/AbstractMapBasedMultimap.java",
"license": "apache-2.0",
"size": 44549
} | [
"java.util.Collection",
"java.util.ConcurrentModificationException"
] | import java.util.Collection; import java.util.ConcurrentModificationException; | import java.util.*; | [
"java.util"
] | java.util; | 732,945 |
public void provideErrorFeedback(Component component)
{
Toolkit.getDefaultToolkit().beep();
} | void function(Component component) { Toolkit.getDefaultToolkit().beep(); } | /**
* Invoked when the user attempts an invalid operation. The default implement
* just beeps. Subclasses that wish to change this need to override this
* method.
*
* @param component the component the error occured in
*/ | Invoked when the user attempts an invalid operation. The default implement just beeps. Subclasses that wish to change this need to override this method | provideErrorFeedback | {
"repo_name": "aosm/gcc_40",
"path": "libjava/javax/swing/LookAndFeel.java",
"license": "gpl-2.0",
"size": 5500
} | [
"java.awt.Component",
"java.awt.Toolkit"
] | import java.awt.Component; import java.awt.Toolkit; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,674,793 |
@SuppressWarnings("deprecation")
static AccessibilityNodeInfoCompat wrapNonNullInstance(Object object) {
if (object != null) {
return new AccessibilityNodeInfoCompat(object);
}
return null;
}
@Deprecated
public AccessibilityNodeInfoCompat(Object info) {
... | @SuppressWarnings(STR) static AccessibilityNodeInfoCompat wrapNonNullInstance(Object object) { if (object != null) { return new AccessibilityNodeInfoCompat(object); } return null; } public AccessibilityNodeInfoCompat(Object info) { mInfo = (AccessibilityNodeInfo) info; } private AccessibilityNodeInfoCompat(Accessibilit... | /**
* Creates a wrapper for info implementation.
*
* @param object The info to wrap.
* @return A wrapper for if the object is not null, null otherwise.
*/ | Creates a wrapper for info implementation | wrapNonNullInstance | {
"repo_name": "AndroidX/androidx",
"path": "core/core/src/main/java/androidx/core/view/accessibility/AccessibilityNodeInfoCompat.java",
"license": "apache-2.0",
"size": 160272
} | [
"android.view.accessibility.AccessibilityNodeInfo"
] | import android.view.accessibility.AccessibilityNodeInfo; | import android.view.accessibility.*; | [
"android.view"
] | android.view; | 10,917 |
void handleTileEffectChange(@Nullable Effect oldEffect, Effect newEffect); | void handleTileEffectChange(@Nullable Effect oldEffect, Effect newEffect); | /**
* Called when the tile effect changes.
*
* @param oldEffect the old tile effect value
* @param newEffect new tile effectvalue
*/ | Called when the tile effect changes | handleTileEffectChange | {
"repo_name": "paulianttila/openhab2",
"path": "bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/listener/LifxLightStateListener.java",
"license": "epl-1.0",
"size": 2421
} | [
"org.eclipse.jdt.annotation.Nullable",
"org.openhab.binding.lifx.internal.dto.Effect"
] | import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.lifx.internal.dto.Effect; | import org.eclipse.jdt.annotation.*; import org.openhab.binding.lifx.internal.dto.*; | [
"org.eclipse.jdt",
"org.openhab.binding"
] | org.eclipse.jdt; org.openhab.binding; | 1,631,300 |
public void testLocalName4() throws JavaModelException {
ICompilationUnit cu = getCompilationUnit("Resolve", "src", "", "ResolveLocalName.java");
IJavaElement[] elements = codeSelect(cu, "var2++;", "var2");
assertElementsEqual(
"Unexpected elements",
"var2 [in foo() [in ResolveLocalName [in ResolveLocalName.java... | void function() throws JavaModelException { ICompilationUnit cu = getCompilationUnit(STR, "src", STRResolveLocalName.javaSTRvar2++;STRvar2STRUnexpected elementsSTRvar2 [in foo() [in ResolveLocalName [in ResolveLocalName.java [in <default> [in src [in Resolve]]]]]]", elements ); } | /**
* Resolve a local variable reference
*/ | Resolve a local variable reference | testLocalName4 | {
"repo_name": "maxeler/eclipse",
"path": "eclipse.jdt.core/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests.java",
"license": "epl-1.0",
"size": 92379
} | [
"org.eclipse.jdt.core.ICompilationUnit",
"org.eclipse.jdt.core.JavaModelException"
] | import org.eclipse.jdt.core.ICompilationUnit; import org.eclipse.jdt.core.JavaModelException; | import org.eclipse.jdt.core.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 738,078 |
private void readWriteData() throws Exception {
// create an instance of User
String name = "Jim Coakley";
Date birthDate = new Date();
DateTime createDateTime = new DateTime().plusDays(10);
User user = new User(name, birthDate, createDateTime);
// persist the user object to the database
userDao.creat... | void function() throws Exception { String name = STR; Date birthDate = new Date(); DateTime createDateTime = new DateTime().plusDays(10); User user = new User(name, birthDate, createDateTime); userDao.create(user); User result = userDao.queryForId(user.getId()); assertEquals(birthDate, result.getBirthDate()); assertEqu... | /**
* Read and write some example data.
*/ | Read and write some example data | readWriteData | {
"repo_name": "dankito/ormlite-jpa-jdbc",
"path": "src/test/java/com/j256/ormlite/examples/datapersister/DataPersisterMain.java",
"license": "isc",
"size": 3400
} | [
"com.j256.ormlite.stmt.UpdateBuilder",
"java.util.Date",
"org.joda.time.DateTime",
"org.junit.Assert"
] | import com.j256.ormlite.stmt.UpdateBuilder; import java.util.Date; import org.joda.time.DateTime; import org.junit.Assert; | import com.j256.ormlite.stmt.*; import java.util.*; import org.joda.time.*; import org.junit.*; | [
"com.j256.ormlite",
"java.util",
"org.joda.time",
"org.junit"
] | com.j256.ormlite; java.util; org.joda.time; org.junit; | 705,846 |
public HashMap<String, String> parseUidRenameV1() {
final String json = query.getContent();
if (json == null || json.isEmpty()) {
throw new BadRequestException(HttpResponseStatus.BAD_REQUEST,
"Missing message content",
"Supply valid JSON formatted data in the body of your request");
... | HashMap<String, String> function() { final String json = query.getContent(); if (json == null json.isEmpty()) { throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, STR, STR); } try { return JSON.parseToObject(json, TR_HASH_MAP); } catch (IllegalArgumentException iae) { throw new BadRequestException(STR, iae);... | /**
* Parses metric, tagk or tagv, and name to rename UID
* @return as hash map of type and name
* @throws JSONException if parsing failed
* @throws BadRequestException if the content was missing or parsing failed
*/ | Parses metric, tagk or tagv, and name to rename UID | parseUidRenameV1 | {
"repo_name": "OpenTSDB/opentsdb",
"path": "src/tsd/HttpJsonSerializer.java",
"license": "lgpl-2.1",
"size": 44736
} | [
"java.util.HashMap",
"net.opentsdb.utils.JSON",
"org.jboss.netty.handler.codec.http.HttpResponseStatus"
] | import java.util.HashMap; import net.opentsdb.utils.JSON; import org.jboss.netty.handler.codec.http.HttpResponseStatus; | import java.util.*; import net.opentsdb.utils.*; import org.jboss.netty.handler.codec.http.*; | [
"java.util",
"net.opentsdb.utils",
"org.jboss.netty"
] | java.util; net.opentsdb.utils; org.jboss.netty; | 1,765,672 |
public Distance getDistance() {
float d = destination - origin;
return new Distance(d, Distance.Units.MILES);
} | Distance function() { float d = destination - origin; return new Distance(d, Distance.Units.MILES); } | /** Get the trip distance.
* @return Distance of the corridor trip. */ | Get the trip distance | getDistance | {
"repo_name": "crc-corp/iris-its",
"path": "src/us/mn/state/dot/tms/server/CorridorTrip.java",
"license": "gpl-2.0",
"size": 6336
} | [
"us.mn.state.dot.tms.units.Distance"
] | import us.mn.state.dot.tms.units.Distance; | import us.mn.state.dot.tms.units.*; | [
"us.mn.state"
] | us.mn.state; | 2,792,873 |
boolean containsColumn(@Nullable Object columnKey); | boolean containsColumn(@Nullable Object columnKey); | /**
* Returns {@code true} if the table contains a mapping with the specified
* column.
*
* @param columnKey key of column to search for
*/ | Returns true if the table contains a mapping with the specified column | containsColumn | {
"repo_name": "mike10004/appengine-imaging",
"path": "gaecompat-awt-imaging/src/common/com/gaecompat/repackaged/com/google/common/collect/Table.java",
"license": "apache-2.0",
"size": 9909
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 2,176,111 |
public Iterator getByDate(Date before); | Iterator function(Date before); | /**
* Fetches all of the reversals that are set to reverse before or on the given date
*
* @param before the date returned reversals should reverse on or before
* @return an Iterator of reversals
*/ | Fetches all of the reversals that are set to reverse before or on the given date | getByDate | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/gl/service/ReversalService.java",
"license": "apache-2.0",
"size": 2154
} | [
"java.util.Date",
"java.util.Iterator"
] | import java.util.Date; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,489,979 |
@Deployment
public void testNonInterruptingSignalWithSubProcess() {
ProcessInstance pi = runtimeService.startProcessInstanceByKey("nonInterruptingSignalWithSubProcess");
List<org.flowable.task.api.Task> tasks = taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).list();... | void function() { ProcessInstance pi = runtimeService.startProcessInstanceByKey(STR); List<org.flowable.task.api.Task> tasks = taskService.createTaskQuery().processInstanceId(pi.getProcessInstanceId()).list(); assertEquals(1, tasks.size()); org.flowable.task.api.Task currentTask = tasks.get(0); assertEquals(STR, curren... | /**
* TestCase to reproduce Issue ACT-1344
*/ | TestCase to reproduce Issue ACT-1344 | testNonInterruptingSignalWithSubProcess | {
"repo_name": "zwets/flowable-engine",
"path": "modules/flowable-engine/src/test/java/org/flowable/engine/test/bpmn/event/signal/SignalEventTest.java",
"license": "apache-2.0",
"size": 37334
} | [
"java.util.List",
"org.flowable.engine.runtime.ProcessInstance"
] | import java.util.List; import org.flowable.engine.runtime.ProcessInstance; | import java.util.*; import org.flowable.engine.runtime.*; | [
"java.util",
"org.flowable.engine"
] | java.util; org.flowable.engine; | 2,574,246 |
private List<List<String>> getPartitionFilters(List<StorageUnitEntity> storageUnitEntities, List<String> samplePartitionFilter)
{
List<List<String>> partitionFilters = new ArrayList<>();
for (StorageUnitEntity storageUnitEntity : storageUnitEntities)
{
BusinessObjectDataKey ... | List<List<String>> function(List<StorageUnitEntity> storageUnitEntities, List<String> samplePartitionFilter) { List<List<String>> partitionFilters = new ArrayList<>(); for (StorageUnitEntity storageUnitEntity : storageUnitEntities) { BusinessObjectDataKey businessObjectDataKey = businessObjectDataHelper.getBusinessObje... | /**
* Gets a list of matched partition filters per specified list of storage unit entities and a sample partition filter.
*
* @param storageUnitEntities the list of storage unit entities
* @param samplePartitionFilter the sample partition filter
*
* @return the list of partition filters
... | Gets a list of matched partition filters per specified list of storage unit entities and a sample partition filter | getPartitionFilters | {
"repo_name": "kusid/herd",
"path": "herd-code/herd-service/src/main/java/org/finra/herd/service/impl/BusinessObjectDataServiceImpl.java",
"license": "apache-2.0",
"size": 76137
} | [
"java.util.ArrayList",
"java.util.List",
"org.finra.herd.model.api.xml.BusinessObjectDataKey",
"org.finra.herd.model.jpa.StorageUnitEntity"
] | import java.util.ArrayList; import java.util.List; import org.finra.herd.model.api.xml.BusinessObjectDataKey; import org.finra.herd.model.jpa.StorageUnitEntity; | import java.util.*; import org.finra.herd.model.api.xml.*; import org.finra.herd.model.jpa.*; | [
"java.util",
"org.finra.herd"
] | java.util; org.finra.herd; | 512,690 |
public static OxidationRecipe getOxidizerRecipe(ItemStackInput input)
{
if(input.isValid())
{
HashMap<ItemStackInput, OxidationRecipe> recipes = Recipe.CHEMICAL_OXIDIZER.get();
OxidationRecipe recipe = getRecipeTryWildcard(input, recipes);
return recipe == null ? null : recipe.copy();
}
return nu... | static OxidationRecipe function(ItemStackInput input) { if(input.isValid()) { HashMap<ItemStackInput, OxidationRecipe> recipes = Recipe.CHEMICAL_OXIDIZER.get(); OxidationRecipe recipe = getRecipeTryWildcard(input, recipes); return recipe == null ? null : recipe.copy(); } return null; } | /**
* Gets the Chemical Oxidizer Recipe for the ItemStackInput in the parameters.
* @param input - ItemStackInput
* @return OxidationRecipe
*/ | Gets the Chemical Oxidizer Recipe for the ItemStackInput in the parameters | getOxidizerRecipe | {
"repo_name": "Microsoft/vsminecraft",
"path": "minecraftpkg/MekanismModSample/src/main/java/mekanism/common/recipe/RecipeHandler.java",
"license": "mit",
"size": 21916
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,877,872 |
public NotCompletedPK getPrimaryKey(); | NotCompletedPK function(); | /**
* Returns the primary key of this not completed.
*
* @return the primary key of this not completed
*/ | Returns the primary key of this not completed | getPrimaryKey | {
"repo_name": "rivetlogic/liferay-announcer",
"path": "portlets/announcer-portlet/docroot/WEB-INF/service/com/rivetlogic/portlet/model/NotCompletedModel.java",
"license": "gpl-3.0",
"size": 4451
} | [
"com.rivetlogic.portlet.service.persistence.NotCompletedPK"
] | import com.rivetlogic.portlet.service.persistence.NotCompletedPK; | import com.rivetlogic.portlet.service.persistence.*; | [
"com.rivetlogic.portlet"
] | com.rivetlogic.portlet; | 414,029 |
public RelatedApplicationsPersistence getRelatedApplicationsPersistence() {
return relatedApplicationsPersistence;
} | RelatedApplicationsPersistence function() { return relatedApplicationsPersistence; } | /**
* Returns the related applications persistence.
*
* @return the related applications persistence
*/ | Returns the related applications persistence | getRelatedApplicationsPersistence | {
"repo_name": "fraunhoferfokus/govapps",
"path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/CategoryLocalServiceBaseImpl.java",
"license": "bsd-3-clause",
"size": 42077
} | [
"de.fraunhofer.fokus.movepla.service.persistence.RelatedApplicationsPersistence"
] | import de.fraunhofer.fokus.movepla.service.persistence.RelatedApplicationsPersistence; | import de.fraunhofer.fokus.movepla.service.persistence.*; | [
"de.fraunhofer.fokus"
] | de.fraunhofer.fokus; | 2,022,531 |
public Map<QName, ElementDeclaration> getGlobalElements() {
return this.elementDeclarations.get(XmlElementDecl.GLOBAL.class.getName());
} | Map<QName, ElementDeclaration> function() { return this.elementDeclarations.get(XmlElementDecl.GLOBAL.class.getName()); } | /**
* Lazy load and return the map of global elements.
*
* @return
*/ | Lazy load and return the map of global elements | getGlobalElements | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "moxy/org.eclipse.persistence.moxy/src/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java",
"license": "epl-1.0",
"size": 252702
} | [
"java.util.Map",
"javax.xml.bind.annotation.XmlElementDecl",
"javax.xml.namespace.QName"
] | import java.util.Map; import javax.xml.bind.annotation.XmlElementDecl; import javax.xml.namespace.QName; | import java.util.*; import javax.xml.bind.annotation.*; import javax.xml.namespace.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 1,265,805 |
@SuppressWarnings("TypeMayBeWeakened")
void writeHashMap(HashMap<?, ?> map, long loadFactorFieldOff, boolean set) throws IOException {
int size = map.size();
writeInt(size);
writeFloat(getFloat(map, loadFactorFieldOff));
for (Map.Entry<?, ?> e : map.entrySet()) {
wr... | @SuppressWarnings(STR) void writeHashMap(HashMap<?, ?> map, long loadFactorFieldOff, boolean set) throws IOException { int size = map.size(); writeInt(size); writeFloat(getFloat(map, loadFactorFieldOff)); for (Map.Entry<?, ?> e : map.entrySet()) { writeObject0(e.getKey()); if (!set) writeObject0(e.getValue()); } } | /**
* Writes {@link HashMap}.
*
* @param map Map.
* @param loadFactorFieldOff Load factor field offset.
* @param set Whether writing underlying map from {@link HashSet}.
* @throws IOException In case of error.
*/ | Writes <code>HashMap</code> | writeHashMap | {
"repo_name": "dlnufox/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/marshaller/optimized/OptimizedObjectOutputStream.java",
"license": "apache-2.0",
"size": 25229
} | [
"java.io.IOException",
"java.util.HashMap",
"java.util.Map"
] | import java.io.IOException; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 596,264 |
public static <T> T[] reverseEach(T[] self, Closure closure) {
each(new ReverseListIterator<T>(Arrays.asList(self)), closure);
return self;
}
/**
* Used to determine if the given predicate closure is valid (i.e.&nsbp;returns
* <code>true</code> for all items in this data structure... | static <T> T[] function(T[] self, Closure closure) { each(new ReverseListIterator<T>(Arrays.asList(self)), closure); return self; } /** * Used to determine if the given predicate closure is valid (i.e.&nsbp;returns * <code>true</code> for all items in this data structure). * A simple example for a list: * <pre>def list... | /**
* Iterate over each element of the array in the reverse order.
*
* @param self an Object array
* @param closure a closure to which each item is passed
* @return the original array
* @since 1.5.2
*/ | Iterate over each element of the array in the reverse order | reverseEach | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "lgpl-2.1",
"size": 704150
} | [
"groovy.lang.Closure",
"java.util.Arrays"
] | import groovy.lang.Closure; import java.util.Arrays; | import groovy.lang.*; import java.util.*; | [
"groovy.lang",
"java.util"
] | groovy.lang; java.util; | 2,415,683 |
public static List appServiceQuery(String className, Object object) throws DAOException
{
List resultList = null;
try
{
resultList = appService.search(className, object);
}
catch (Exception e)
{
e.printStackTrace();
throw new DAOException(e.getMessage(), e);
}
return resultLis... | static List function(String className, Object object) throws DAOException { List resultList = null; try { resultList = appService.search(className, object); } catch (Exception e) { e.printStackTrace(); throw new DAOException(e.getMessage(), e); } return resultList; } | /**
* calls ApplicationService.search() method of caCore to execute query on domain object
* @param className
* @param object
* @return
* @throws DAOException
*/ | calls ApplicationService.search() method of caCore to execute query on domain object | appServiceQuery | {
"repo_name": "NCIP/geneconnect",
"path": "Coding and Testing/GeneConnectWeb/WEB-INF/src/edu/wustl/geneconnect/cacore/CaCoreClient.java",
"license": "bsd-3-clause",
"size": 12606
} | [
"edu.wustl.common.util.dbManager.DAOException",
"java.util.List"
] | import edu.wustl.common.util.dbManager.DAOException; import java.util.List; | import edu.wustl.common.util.*; import java.util.*; | [
"edu.wustl.common",
"java.util"
] | edu.wustl.common; java.util; | 2,478,896 |
public String processConfirmContinue() {
if (!validCsrfToken()) {
targettedMessageList.addMessage(new TargettedMessage("java.badcsrftoken", null, TargettedMessage.SEVERITY_ERROR));
}
List<String> validationUsers = new ArrayList<>();
resetTargettedMessageList();
if (site == null)
i... | String function() { if (!validCsrfToken()) { targettedMessageList.addMessage(new TargettedMessage(STR, null, TargettedMessage.SEVERITY_ERROR)); } List<String> validationUsers = new ArrayList<>(); resetTargettedMessageList(); if (site == null) init(); for (UserRoleEntry entry:userRoleEntries) { String eId = entry.userEI... | /**
* get the confirm choice and continue
* @return
*/ | get the confirm choice and continue | processConfirmContinue | {
"repo_name": "rodriguezdevera/sakai",
"path": "site-manage/site-manage-participant-helper/src/java/org/sakaiproject/site/tool/helper/participant/impl/SiteAddParticipantHandler.java",
"license": "apache-2.0",
"size": 43191
} | [
"java.util.ArrayList",
"java.util.List",
"org.sakaiproject.user.api.UserAlreadyDefinedException",
"org.sakaiproject.user.api.UserEdit",
"org.sakaiproject.user.api.UserIdInvalidException",
"org.sakaiproject.user.api.UserNotDefinedException",
"org.sakaiproject.user.api.UserPermissionException",
"org.sak... | import java.util.ArrayList; import java.util.List; import org.sakaiproject.user.api.UserAlreadyDefinedException; import org.sakaiproject.user.api.UserEdit; import org.sakaiproject.user.api.UserIdInvalidException; import org.sakaiproject.user.api.UserNotDefinedException; import org.sakaiproject.user.api.UserPermissionEx... | import java.util.*; import org.sakaiproject.user.api.*; import org.sakaiproject.util.*; import uk.org.ponder.messageutil.*; | [
"java.util",
"org.sakaiproject.user",
"org.sakaiproject.util",
"uk.org.ponder"
] | java.util; org.sakaiproject.user; org.sakaiproject.util; uk.org.ponder; | 2,672,313 |
public void setFlatDiscount (BigDecimal FlatDiscount); | void function (BigDecimal FlatDiscount); | /** Set Flat Discount %.
* Flat discount percentage
*/ | Set Flat Discount %. Flat discount percentage | setFlatDiscount | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/I_C_BPartner.java",
"license": "gpl-2.0",
"size": 26142
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,786,655 |
public static void addSoftEvidence(Network bn, String nodeName,
HashMap<String, Double> softEvidence) throws ShanksException {
String auxNodeName = softEvidenceNodePrefix + nodeName;
int targetNode = bn.getNode(nodeName);
boolean found = false;
int[] children = bn.getChil... | static void function(Network bn, String nodeName, HashMap<String, Double> softEvidence) throws ShanksException { String auxNodeName = softEvidenceNodePrefix + nodeName; int targetNode = bn.getNode(nodeName); boolean found = false; int[] children = bn.getChildren(targetNode); for (int child : children) { if (bn.getNodeN... | /**
* Add soft-evidence to the Bayesian network to reason with it.
*
* @param bn
* @param nodeName
* @param softEvidence
* @throws ShanksException
*/ | Add soft-evidence to the Bayesian network to reason with it | addSoftEvidence | {
"repo_name": "gsi-upm/Shanks",
"path": "shanks-core/src/main/java/es/upm/dit/gsi/shanks/agent/capability/reasoning/bayes/smile/ShanksAgentBayesianReasoningCapability.java",
"license": "gpl-2.0",
"size": 25021
} | [
"es.upm.dit.gsi.shanks.exception.ShanksException",
"java.util.HashMap"
] | import es.upm.dit.gsi.shanks.exception.ShanksException; import java.util.HashMap; | import es.upm.dit.gsi.shanks.exception.*; import java.util.*; | [
"es.upm.dit",
"java.util"
] | es.upm.dit; java.util; | 1,256,738 |
if (!DataMarkerCheck.isNull(text)) {
perform().type(elementType, elementName, getLocator(), DataMarkerCheck.convertIfEmpty(text), taskCompletionTimeout);
}
} | if (!DataMarkerCheck.isNull(text)) { perform().type(elementType, elementName, getLocator(), DataMarkerCheck.convertIfEmpty(text), taskCompletionTimeout); } } | /**
* Enters text in the InputField.
* If the text is null or marked as null the operation will not be executed
* If the text is marked as empty it will be replaced with ""
* @param text the text to enter in the input field
*/ | Enters text in the InputField. If the text is null or marked as null the operation will not be executed If the text is marked as empty it will be replaced with "" | enter | {
"repo_name": "AludraTest/aludratest",
"path": "src/main/java/org/aludratest/service/gui/component/impl/InputFieldImpl.java",
"license": "apache-2.0",
"size": 3540
} | [
"org.aludratest.util.data.helper.DataMarkerCheck"
] | import org.aludratest.util.data.helper.DataMarkerCheck; | import org.aludratest.util.data.helper.*; | [
"org.aludratest.util"
] | org.aludratest.util; | 2,130,729 |
public void setSaxonConfigurationProperties(Map<String, Object> configurationProperties) {
this.saxonConfigurationProperties = configurationProperties;
} | void function(Map<String, Object> configurationProperties) { this.saxonConfigurationProperties = configurationProperties; } | /**
* To set custom Saxon configuration properties
*/ | To set custom Saxon configuration properties | setSaxonConfigurationProperties | {
"repo_name": "onders86/camel",
"path": "camel-core/src/main/java/org/apache/camel/component/xslt/XsltComponent.java",
"license": "apache-2.0",
"size": 8127
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,138,347 |
public void setApproximation(WeightApproximator weightApproximator) {
this.weightApproximator = weightApproximator;
} | void function(WeightApproximator weightApproximator) { this.weightApproximator = weightApproximator; } | /**
* This method sets the approximation used for the internal bidirectional A*.
*/ | This method sets the approximation used for the internal bidirectional A* | setApproximation | {
"repo_name": "don-philipe/graphhopper",
"path": "core/src/main/java/com/graphhopper/routing/AlternativeRoute.java",
"license": "apache-2.0",
"size": 24876
} | [
"com.graphhopper.routing.weighting.WeightApproximator"
] | import com.graphhopper.routing.weighting.WeightApproximator; | import com.graphhopper.routing.weighting.*; | [
"com.graphhopper.routing"
] | com.graphhopper.routing; | 1,194,809 |
void traverseWithScope(Node root, Scope s) {
Preconditions.checkState(s.isGlobal());
try {
inputId = null;
sourceName = "";
curNode = root;
pushScope(s);
traverseBranch(root, null);
popScope();
} catch (Exception unexpectedException) {
throwUnexpectedException(une... | void traverseWithScope(Node root, Scope s) { Preconditions.checkState(s.isGlobal()); try { inputId = null; sourceName = ""; curNode = root; pushScope(s); traverseBranch(root, null); popScope(); } catch (Exception unexpectedException) { throwUnexpectedException(unexpectedException); } } | /**
* Traverses a parse tree recursively with a scope, starting with the given
* root. This should only be used in the global scope. Otherwise, use
* {@link #traverseAtScope}.
*/ | Traverses a parse tree recursively with a scope, starting with the given root. This should only be used in the global scope. Otherwise, use <code>#traverseAtScope</code> | traverseWithScope | {
"repo_name": "mbebenita/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeTraversal.java",
"license": "apache-2.0",
"size": 25109
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 2,107,010 |
@NonNull
public Builder setHeight(float pixels) {
mHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, pixels,
mResources.getDisplayMetrics());
return this;
} | Builder function(float pixels) { mHeight = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, pixels, mResources.getDisplayMetrics()); return this; } | /**
* Set the divider height in pixels
*
* @param pixels height in pixels
* @return the current instance of the Builder
*/ | Set the divider height in pixels | setHeight | {
"repo_name": "edubarr/header-decor",
"path": "lib/src/main/java/ca/barrenechea/widget/recyclerview/decoration/DividerDecoration.java",
"license": "apache-2.0",
"size": 7390
} | [
"android.util.TypedValue"
] | import android.util.TypedValue; | import android.util.*; | [
"android.util"
] | android.util; | 1,529,884 |
@Override
public void setMyScope(final Scope scope) {
if (templateInstances != null) {
templateInstances.setMyScope(scope);
}
if (statementblock != null) {
statementblock.setMyScope(scope);
}
} | void function(final Scope scope) { if (templateInstances != null) { templateInstances.setMyScope(scope); } if (statementblock != null) { statementblock.setMyScope(scope); } } | /**
* Sets the scope of the select case branch.
*
* @param scope
* the scope to be set.
* */ | Sets the scope of the select case branch | setMyScope | {
"repo_name": "alovassy/titan.EclipsePlug-ins",
"path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/TTCN3/statements/SelectCase.java",
"license": "epl-1.0",
"size": 7432
} | [
"org.eclipse.titan.designer.AST"
] | import org.eclipse.titan.designer.AST; | import org.eclipse.titan.designer.*; | [
"org.eclipse.titan"
] | org.eclipse.titan; | 2,329,510 |
@UiHandler("m_textbox")
void onTextboxBlur(BlurEvent event) {
m_mainPanel.add(m_fadePanel);
setTitle(m_textbox.getText());
}
| @UiHandler(STR) void onTextboxBlur(BlurEvent event) { m_mainPanel.add(m_fadePanel); setTitle(m_textbox.getText()); } | /**
* Handles text box blur.<p>
*
* @param event the blur event
*/ | Handles text box blur | onTextboxBlur | {
"repo_name": "sbonoc/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/widgets/CmsTextboxWidget.java",
"license": "lgpl-2.1",
"size": 10010
} | [
"com.google.gwt.event.dom.client.BlurEvent",
"com.google.gwt.uibinder.client.UiHandler"
] | import com.google.gwt.event.dom.client.BlurEvent; import com.google.gwt.uibinder.client.UiHandler; | import com.google.gwt.event.dom.client.*; import com.google.gwt.uibinder.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,282,826 |
EAttribute getDocumentSubstitutionType_OriginalBusinessDocument(); | EAttribute getDocumentSubstitutionType_OriginalBusinessDocument(); | /**
* Returns the meta object for the attribute '{@link org.ebxml.business.process.DocumentSubstitutionType#getOriginalBusinessDocument <em>Original Business Document</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Original Business Document</em>'.
* ... | Returns the meta object for the attribute '<code>org.ebxml.business.process.DocumentSubstitutionType#getOriginalBusinessDocument Original Business Document</code>'. | getDocumentSubstitutionType_OriginalBusinessDocument | {
"repo_name": "GRA-UML/tool",
"path": "plugins/org.ijis.gra.ebxml.ebBPSS/src/main/java/org/ebxml/business/process/ProcessPackage.java",
"license": "epl-1.0",
"size": 274455
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,355,793 |
EReference getConstraint_Specification(); | EReference getConstraint_Specification(); | /**
* Returns the meta object for the containment reference '{@link ca.mcgill.cs.sel.ram.Constraint#getSpecification <em>Specification</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Specification</em>'.
* @see ca.mcgill.cs.sel... | Returns the meta object for the containment reference '<code>ca.mcgill.cs.sel.ram.Constraint#getSpecification Specification</code>'. | getConstraint_Specification | {
"repo_name": "mjorod/textram",
"path": "tool/ca.mcgill.sel.ram/src/ca/mcgill/cs/sel/ram/RamPackage.java",
"license": "mit",
"size": 271132
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,065,437 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.