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 File getFile() { return file; }
File function() { return file; }
/** * Get this entry's file. * * @return This entry's file. */
Get this entry's file
getFile
{ "repo_name": "BIORIMP/biorimp", "path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/tar/TarEntry.java", "license": "gpl-2.0", "size": 18958 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,996,530
@Override public void setData(Map<String,Object> value) { set(3, value); }
void function(Map<String,Object> value) { set(3, value); }
/** * Setter for <code>cattle.process_instance.data</code>. */
Setter for <code>cattle.process_instance.data</code>
setData
{ "repo_name": "rancherio/cattle", "path": "modules/model/src/main/java/io/cattle/platform/core/model/tables/records/ProcessInstanceRecord.java", "license": "apache-2.0", "size": 20077 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,773,248
@Override public final VsacApiResult updateCQLVSACValueSets(List<CQLQualityDataSetDTO> appliedQDMList, String defaultExpId, String sessionId) { VsacApiResult result = new VsacApiResult(); LOGGER.info("Start VSACAPIServiceImpl updateCQLVSACValueSets method :"); if (isAlreadySignedIn(sessionId)) { if (isCAS...
final VsacApiResult function(List<CQLQualityDataSetDTO> appliedQDMList, String defaultExpId, String sessionId) { VsacApiResult result = new VsacApiResult(); LOGGER.info(STR); if (isAlreadySignedIn(sessionId)) { if (isCASTicketGrantingTicketValid(sessionId)) { HashMap<CQLQualityDataSetDTO, CQLQualityDataSetDTO> updateIn...
/** * * * Method to update valueset's without versions from VSAC in CQLLookUp XML tag. * Skip supplemental Data Elements and Timing elements, Expired, Birth date and User defined QDM. * * @param appliedQDMList - Applied Value Set List * @param defaultExpId the default exp id * @return VsacApiRe...
Method to update valueset's without versions from VSAC in CQLLookUp XML tag. Skip supplemental Data Elements and Timing elements, Expired, Birth date and User defined QDM
updateCQLVSACValueSets
{ "repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release", "path": "mat/src/main/java/mat/server/VSACApiServImpl.java", "license": "cc0-1.0", "size": 25802 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "org.apache.commons.lang3.StringUtils", "org.vsac.VSACResponseResult" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.vsac.VSACResponseResult;
import java.util.*; import org.apache.commons.lang3.*; import org.vsac.*;
[ "java.util", "org.apache.commons", "org.vsac" ]
java.util; org.apache.commons; org.vsac;
945,487
public void setWeight(String weight) { this.weight = weight; setValue(getCompoundValue(), QmConstants.SLOT_QPARAMWEIGHTING_WEIGHT, weight); } } private class QualityParameterWeightingLabelProvider implements ITableLabelProvider {
void function(String weight) { this.weight = weight; setValue(getCompoundValue(), QmConstants.SLOT_QPARAMWEIGHTING_WEIGHT, weight); } } private class QualityParameterWeightingLabelProvider implements ITableLabelProvider {
/** * Sets the weight value. * @param weight the weight value */
Sets the weight value
setWeight
{ "repo_name": "QualiMaster/QM-IConf", "path": "QualiMasterApplication/src/de/uni_hildesheim/sse/qmApp/editors/QualityParameterWeightingEditor.java", "license": "apache-2.0", "size": 16970 }
[ "eu.qualimaster.easy.extension.QmConstants", "org.eclipse.jface.viewers.ITableLabelProvider" ]
import eu.qualimaster.easy.extension.QmConstants; import org.eclipse.jface.viewers.ITableLabelProvider;
import eu.qualimaster.easy.extension.*; import org.eclipse.jface.viewers.*;
[ "eu.qualimaster.easy", "org.eclipse.jface" ]
eu.qualimaster.easy; org.eclipse.jface;
1,170,058
public InputSource resolveEntity (String publicId, String systemId) throws IOException, SAXException { InputSource retval = null; String uri; if (publicId != null && ((uri = (String) pubidMapping.get (publicId)) != null)) { retval = new InputSource (uri); retval.setPublicId (publicId); } ...
InputSource function (String publicId, String systemId) throws IOException, SAXException { InputSource retval = null; String uri; if (publicId != null && ((uri = (String) pubidMapping.get (publicId)) != null)) { retval = new InputSource (uri); retval.setPublicId (publicId); } return retval; }
/** * Uses a local dictionary of public identifiers to resolve URIs, * normally with the goal of minimizing network traffic or latencies. */
Uses a local dictionary of public identifiers to resolve URIs, normally with the goal of minimizing network traffic or latencies
resolveEntity
{ "repo_name": "taciano-perez/JamVM-PH", "path": "src/classpath/gnu/xml/util/Resolver.java", "license": "gpl-2.0", "size": 9100 }
[ "java.io.IOException", "org.xml.sax.InputSource", "org.xml.sax.SAXException" ]
import java.io.IOException; import org.xml.sax.InputSource; import org.xml.sax.SAXException;
import java.io.*; import org.xml.sax.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
941,760
public ContextTypeRegistry getContextTypeRegistry() { if (fRegistry == null) { // create an configure the contexts available in the template editor fRegistry = new ContributionContextTypeRegistry(); fRegistry.addContextType(VeloContextType.XML_CONTEXT_TY...
ContextTypeRegistry function() { if (fRegistry == null) { fRegistry = new ContributionContextTypeRegistry(); fRegistry.addContextType(VeloContextType.XML_CONTEXT_TYPE); } return fRegistry; }
/** * Returns this plug-in's context type registry. * * @return the context type registry for this plug-in instance */
Returns this plug-in's context type registry
getContextTypeRegistry
{ "repo_name": "ninneko/velocity-edit", "path": "src/com/googlecode/veloeclipse/editor/TemplateEditorUI.java", "license": "gpl-2.0", "size": 3479 }
[ "com.googlecode.veloeclipse.ui.VeloContextType", "org.eclipse.jface.text.templates.ContextTypeRegistry", "org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry" ]
import com.googlecode.veloeclipse.ui.VeloContextType; import org.eclipse.jface.text.templates.ContextTypeRegistry; import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
import com.googlecode.veloeclipse.ui.*; import org.eclipse.jface.text.templates.*; import org.eclipse.ui.editors.text.templates.*;
[ "com.googlecode.veloeclipse", "org.eclipse.jface", "org.eclipse.ui" ]
com.googlecode.veloeclipse; org.eclipse.jface; org.eclipse.ui;
2,725,915
@ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> beginCreateOrUpdate( String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner paramet...
@ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<PrivateEndpointConnectionInner>, PrivateEndpointConnectionInner> function( String resourceGroupName, String serverName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { return beginCreateOrUpdateAsync(resourceGroupName, ...
/** * Approve or reject a private endpoint connection with a given name. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value * from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * ...
Approve or reject a private endpoint connection with a given name
beginCreateOrUpdate
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/PrivateEndpointConnectionsClientImpl.java", "license": "mit", "size": 58937 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.sql.fluent.models.PrivateEndpointConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.sql.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
217,712
public void render(GUIRenderer guiRenderer) { // init screen guiRenderer.initScreen(this); // update and apply effects for (GUIEffect effect: effects.getValuesIterator()) { if (effect.isActive() == true) { effect.update(guiRenderer); effect.apply(guiRenderer); } } // clear floating nodes ...
void function(GUIRenderer guiRenderer) { guiRenderer.initScreen(this); for (GUIEffect effect: effects.getValuesIterator()) { if (effect.isActive() == true) { effect.update(guiRenderer); effect.apply(guiRenderer); } } floatingNodes.clear(); super.render(guiRenderer, floatingNodes); guiRenderer.doneScreen(); }
/** * Render screen * @param gui renderer */
Render screen
render
{ "repo_name": "andreasdr/tdme", "path": "src/net/drewke/tdme/gui/nodes/GUIScreenNode.java", "license": "mit", "size": 14684 }
[ "net.drewke.tdme.gui.effects.GUIEffect", "net.drewke.tdme.gui.renderer.GUIRenderer" ]
import net.drewke.tdme.gui.effects.GUIEffect; import net.drewke.tdme.gui.renderer.GUIRenderer;
import net.drewke.tdme.gui.effects.*; import net.drewke.tdme.gui.renderer.*;
[ "net.drewke.tdme" ]
net.drewke.tdme;
1,670,311
interface WithDiagnostics extends WithLinux { WithLinux withDiagnostics(); } interface WithCreate extends Creatable<ContainerService>, Resource.DefinitionWithTags<WithCreate> { } } ...
interface WithDiagnostics extends WithLinux { WithLinux withDiagnostics(); } interface WithCreate extends Creatable<ContainerService>, Resource.DefinitionWithTags<WithCreate> { } } interface Update extends Resource.UpdateWithTags<Update>, Appliable<ContainerService>, ContainerService.UpdateStages.WithUpdateAgentPoolCou...
/** * Enable diagnostics. * @return the create stage of the definition */
Enable diagnostics
withDiagnostics
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerService.java", "license": "mit", "size": 10156 }
[ "com.microsoft.azure.management.resources.fluentcore.arm.models.Resource", "com.microsoft.azure.management.resources.fluentcore.model.Appliable", "com.microsoft.azure.management.resources.fluentcore.model.Creatable" ]
import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.arm.models.*; import com.microsoft.azure.management.resources.fluentcore.model.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
962,070
public List<App> getTaskbarAppsList(){ return this.taskbarAppsList; }
List<App> function(){ return this.taskbarAppsList; }
/** * Returns the list of apps in the taskbar. * @return The list of apps in the taskbar. */
Returns the list of apps in the taskbar
getTaskbarAppsList
{ "repo_name": "AIOSDev05/cast-launcher", "path": "Cast Launcher/app/src/main/java/net/sandstorm/castlauncher/Workspace.java", "license": "mit", "size": 24917 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
515,900
void setCollectionTime(DateTime collectionTime);
void setCollectionTime(DateTime collectionTime);
/** * set the time for collecting these statistics */
set the time for collecting these statistics
setCollectionTime
{ "repo_name": "claudiu-stanciu/kylo", "path": "core/operational-metadata/operational-metadata-api/src/main/java/com/thinkbiganalytics/metadata/api/jobrepo/nifi/NifiFeedProcessorStats.java", "license": "apache-2.0", "size": 8776 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
333,307
@Test public void testClosureIteratorExp01_02() { Class1 a = new Class1(); Class1 b = new Class1(); a.parent = b; b.parent = a; Set<Class1> expectedResult01 = new HashSet<Class1>(); expectedResult01.add(a); expectedResult01.add(b); assertEquals(expectedResult01, a.testClosureItera...
void function() { Class1 a = new Class1(); Class1 b = new Class1(); a.parent = b; b.parent = a; Set<Class1> expectedResult01 = new HashSet<Class1>(); expectedResult01.add(a); expectedResult01.add(b); assertEquals(expectedResult01, a.testClosureIteratorExp01()); assertEquals(expectedResult01, b.testClosureIteratorExp01(...
/** * <p> * Tests the generated code for an OCL Expression * </p> */
Tests the generated code for an OCL Expression
testClosureIteratorExp01_02
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.tools.codegen.ocl2java.test.aspectj/src/org/dresdenocl/tools/codegen/ocl2java/test/aspectj/expressions/TestIteratorExp.java", "license": "lgpl-3.0", "size": 10323 }
[ "java.util.HashSet", "java.util.Set", "org.junit.Assert" ]
import java.util.HashSet; import java.util.Set; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
2,460,833
public static byte[] bigIntegerToBytes(BigInteger b, int numBytes) { if (b == null) { return null; } byte[] bytes = new byte[numBytes]; byte[] biBytes = b.toByteArray(); int start = (biBytes.length == numBytes + 1) ? 1 : 0; int length = Math.min(biBytes.le...
static byte[] function(BigInteger b, int numBytes) { if (b == null) { return null; } byte[] bytes = new byte[numBytes]; byte[] biBytes = b.toByteArray(); int start = (biBytes.length == numBytes + 1) ? 1 : 0; int length = Math.min(biBytes.length, numBytes); System.arraycopy(biBytes, start, bytes, numBytes - length, leng...
/** * The regular {@link BigInteger#toByteArray()} method isn't quite what we often * need: it appends a * leading zero to indicate that the number is positive and may need padding. * * @param b the integer to format into a byte array * @param numBytes the desired size of the result...
The regular <code>BigInteger#toByteArray()</code> method isn't quite what we often need: it appends a leading zero to indicate that the number is positive and may need padding
bigIntegerToBytes
{ "repo_name": "chaincloud-dot-com/chaincloud-v", "path": "chaincloud-v/src/main/java/com/chaincloud/chaincloudv/util/crypto/BitcoinUtils.java", "license": "apache-2.0", "size": 14475 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,829,602
protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(actio...
void function(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } }
/** * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection, * by inserting them before the specified contribution item <code>contributionID</code>...
This populates the specified <code>manager</code> with <code>org.eclipse.jface.action.ActionContributionItem</code>s based on the <code>org.eclipse.jface.action.IAction</code>s contained in the <code>actions</code> collection, by inserting them before the specified contribution item <code>contributionID</code>. If <cod...
populateManager
{ "repo_name": "FTSRG/mondo-collab-framework", "path": "archive/workspaceTracker/VA/ikerlanEMF.editor/src/eu/mondo/collaboration/operationtracemodel/example/WTSpec/presentation/WTSpecActionBarContributor.java", "license": "epl-1.0", "size": 14407 }
[ "java.util.Collection", "org.eclipse.jface.action.IAction", "org.eclipse.jface.action.IContributionManager" ]
import java.util.Collection; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IContributionManager;
import java.util.*; import org.eclipse.jface.action.*;
[ "java.util", "org.eclipse.jface" ]
java.util; org.eclipse.jface;
1,631,281
private boolean addLsp(LspWrapper lspWrapper, String key) { //Remove the lsa from bin if exist. removeLspFromBin(lspWrapper); switch (lspWrapper.lsPdu().isisPduType()) { case L1LSPDU: isisL1Db.remove(key); isisL1Db.put(key, lspWrapper); ...
boolean function(LspWrapper lspWrapper, String key) { removeLspFromBin(lspWrapper); switch (lspWrapper.lsPdu().isisPduType()) { case L1LSPDU: isisL1Db.remove(key); isisL1Db.put(key, lspWrapper); break; case L2LSPDU: isisL2Db.remove(key); isisL2Db.put(key, lspWrapper); break; default: log.debug(STR); break; } Integer bi...
/** * Adds the LSP to L1 or L2 database. * * @param lspWrapper LSA wrapper instance * @param key key * @return True if added else false */
Adds the LSP to L1 or L2 database
addLsp
{ "repo_name": "kuujo/onos", "path": "protocols/isis/ctl/src/main/java/org/onosproject/isis/controller/impl/lsdb/DefaultIsisLsdb.java", "license": "apache-2.0", "size": 14380 }
[ "org.onosproject.isis.controller.IsisLspBin", "org.onosproject.isis.controller.LspWrapper", "org.onosproject.isis.io.util.IsisConstants" ]
import org.onosproject.isis.controller.IsisLspBin; import org.onosproject.isis.controller.LspWrapper; import org.onosproject.isis.io.util.IsisConstants;
import org.onosproject.isis.controller.*; import org.onosproject.isis.io.util.*;
[ "org.onosproject.isis" ]
org.onosproject.isis;
1,751,477
CmsUUID copyElement(CmsUUID pageId, CmsUUID originalElementId, String locale) throws CmsRpcException;
CmsUUID copyElement(CmsUUID pageId, CmsUUID originalElementId, String locale) throws CmsRpcException;
/** * Creates a new element with a given model element and returns the copy'S structure id.<p> * * @param pageId the container page id * @param originalElementId the model element id * @param locale the content locale * * @return the structure id of the copy * * @throws Cms...
Creates a new element with a given model element and returns the copy'S structure id
copyElement
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ade/containerpage/shared/rpc/I_CmsContainerpageService.java", "license": "lgpl-2.1", "size": 22319 }
[ "org.opencms.gwt.CmsRpcException", "org.opencms.util.CmsUUID" ]
import org.opencms.gwt.CmsRpcException; import org.opencms.util.CmsUUID;
import org.opencms.gwt.*; import org.opencms.util.*;
[ "org.opencms.gwt", "org.opencms.util" ]
org.opencms.gwt; org.opencms.util;
1,636,314
public static String bytesToHumanReadable(long bytes) { if (bytes < 0) { return MainApp.getAppContext().getString(R.string.common_pending); } else { double result = bytes; int suffixIndex = 0; while (result > BYTE_SIZE_DIVIDER && suffixIndex < sizeSuff...
static String function(long bytes) { if (bytes < 0) { return MainApp.getAppContext().getString(R.string.common_pending); } else { double result = bytes; int suffixIndex = 0; while (result > BYTE_SIZE_DIVIDER && suffixIndex < sizeSuffixes.length) { result /= BYTE_SIZE_DIVIDER_DOUBLE; suffixIndex++; } return new BigDecim...
/** * Converts the file size in bytes to human readable output. * <ul> * <li>appends a size suffix, e.g. B, KB, MB etc.</li> * <li>rounds the size based on the suffix to 0,1 or 2 decimals</li> * </ul> * * @param bytes Input file size * @return something readable like "12 ...
Converts the file size in bytes to human readable output. appends a size suffix, e.g. B, KB, MB etc. rounds the size based on the suffix to 0,1 or 2 decimals
bytesToHumanReadable
{ "repo_name": "nextcloud/android", "path": "src/main/java/com/owncloud/android/utils/DisplayUtils.java", "license": "gpl-2.0", "size": 34576 }
[ "com.owncloud.android.MainApp", "java.math.BigDecimal" ]
import com.owncloud.android.MainApp; import java.math.BigDecimal;
import com.owncloud.android.*; import java.math.*;
[ "com.owncloud.android", "java.math" ]
com.owncloud.android; java.math;
1,225,569
public T last () { if (size == 0) { // Underflow throw new NoSuchElementException("Queue is empty."); } final T[] values = this.values; int tail = this.tail; tail--; if (tail == -1) { tail = values.length - 1; } return values[tail]; }
T function () { if (size == 0) { throw new NoSuchElementException(STR); } final T[] values = this.values; int tail = this.tail; tail--; if (tail == -1) { tail = values.length - 1; } return values[tail]; }
/** Returns the last (tail) item in the queue (without removing it). * @see #addLast(Object) * @see #removeLast() * @throws NoSuchElementException when queue is empty */
Returns the last (tail) item in the queue (without removing it)
last
{ "repo_name": "MikkelTAndersen/libgdx", "path": "gdx/src/com/badlogic/gdx/utils/Queue.java", "license": "apache-2.0", "size": 15934 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,035,328
// http://stackoverflow.com/questions/4238921/android-detect-whether-there-is-an-internet-connection-available private static boolean isNetworkAvailable(Context context) { ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); Net...
static boolean function(Context context) { ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); return activeNetworkInfo != null && activeNetworkInfo.isConnected(); }
/** * Checks if the network is currently available * @param context Context Android context in which the request is currently Running * @return boolean Status of the network */
Checks if the network is currently available
isNetworkAvailable
{ "repo_name": "CMPUT301W14T06/LARD", "path": "LARD/src/ca/ualberta/lard/model/DataModel.java", "license": "mit", "size": 9522 }
[ "android.content.Context", "android.net.ConnectivityManager", "android.net.NetworkInfo" ]
import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
935,084
public boolean maxValue(BigInteger value, long max) { return (value.longValue() <= max); }
boolean function(BigInteger value, long max) { return (value.longValue() <= max); }
/** * Check if the value is less than or equal to a maximum. * * @param value The value validation is being performed on. * @param max The maximum value. * @return <code>true</code> if the value is less than * or equal to the maximum. */
Check if the value is less than or equal to a maximum
maxValue
{ "repo_name": "floscher/commons-validator", "path": "src/main/java/org/apache/commons/validator/routines/BigIntegerValidator.java", "license": "apache-2.0", "size": 8414 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,660,397
private Account findAccount(final long personId, final long facebookId) { final Account[] accounts = getAllAccounts(); for (final Account account : accounts) { final String strPersonId = getAccountManager().getUserData(account, Authenticator.KEY_PERSON_ID); final String strFa...
Account function(final long personId, final long facebookId) { final Account[] accounts = getAllAccounts(); for (final Account account : accounts) { final String strPersonId = getAccountManager().getUserData(account, Authenticator.KEY_PERSON_ID); final String strFacebookId = getAccountManager().getUserData(account, Aut...
/** * Find the system account by a personId * * @param personId * @param facebookId * @return */
Find the system account by a personId
findAccount
{ "repo_name": "tim11/MissionHub-Android", "path": "missionhub/src/com/missionhub/application/Session.java", "license": "mit", "size": 26821 }
[ "android.accounts.Account", "com.missionhub.authenticator.Authenticator" ]
import android.accounts.Account; import com.missionhub.authenticator.Authenticator;
import android.accounts.*; import com.missionhub.authenticator.*;
[ "android.accounts", "com.missionhub.authenticator" ]
android.accounts; com.missionhub.authenticator;
1,180,765
public void testDateTime() { try { EntityManager em = getEM(); EntityTransaction tx = em.getTransaction(); DateTime dateTime1 = new DateTime(2008, 3, 14, 15, 9, 26, 0); DateTime dateTime2 = new DateTime(2009, 5, 13, 7, 9, 26, 0); ...
void function() { try { EntityManager em = getEM(); EntityTransaction tx = em.getTransaction(); DateTime dateTime1 = new DateTime(2008, 3, 14, 15, 9, 26, 0); DateTime dateTime2 = new DateTime(2009, 5, 13, 7, 9, 26, 0); try { tx.begin(); JodaSample1 s = new JodaSample1(1, dateTime1, dateTime2); JodaSample1 s2 = new Joda...
/** * Test for DateTime persistence/retrieval. */
Test for DateTime persistence/retrieval
testDateTime
{ "repo_name": "datanucleus/tests", "path": "jakarta/general/src/test/org/datanucleus/tests/types/JodaTimeTest.java", "license": "apache-2.0", "size": 25955 }
[ "jakarta.persistence.EntityManager", "jakarta.persistence.EntityTransaction", "org.datanucleus.samples.types.jodatime.JodaSample1", "org.joda.time.DateTime" ]
import jakarta.persistence.EntityManager; import jakarta.persistence.EntityTransaction; import org.datanucleus.samples.types.jodatime.JodaSample1; import org.joda.time.DateTime;
import jakarta.persistence.*; import org.datanucleus.samples.types.jodatime.*; import org.joda.time.*;
[ "jakarta.persistence", "org.datanucleus.samples", "org.joda.time" ]
jakarta.persistence; org.datanucleus.samples; org.joda.time;
12,657
SortedMap<PathFragment, ActionInput> getInputMapping(SpawnExecutionContext context) throws IOException, ForbiddenActionInputException;
SortedMap<PathFragment, ActionInput> getInputMapping(SpawnExecutionContext context) throws IOException, ForbiddenActionInputException;
/** * Returns a {@link SortedMap} which maps from input paths for remote action to {@link * ActionInput}. */
Returns a <code>SortedMap</code> which maps from input paths for remote action to <code>ActionInput</code>
getInputMapping
{ "repo_name": "meteorcloudy/bazel", "path": "src/main/java/com/google/devtools/build/lib/remote/common/RemotePathResolver.java", "license": "apache-2.0", "size": 6655 }
[ "com.google.devtools.build.lib.actions.ActionInput", "com.google.devtools.build.lib.actions.ForbiddenActionInputException", "com.google.devtools.build.lib.exec.SpawnRunner", "com.google.devtools.build.lib.vfs.PathFragment", "java.io.IOException", "java.util.SortedMap" ]
import com.google.devtools.build.lib.actions.ActionInput; import com.google.devtools.build.lib.actions.ForbiddenActionInputException; import com.google.devtools.build.lib.exec.SpawnRunner; import com.google.devtools.build.lib.vfs.PathFragment; import java.io.IOException; import java.util.SortedMap;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.exec.*; import com.google.devtools.build.lib.vfs.*; import java.io.*; import java.util.*;
[ "com.google.devtools", "java.io", "java.util" ]
com.google.devtools; java.io; java.util;
1,625,598
protected List<Object> getModules() { List<Object> result = new ArrayList<Object>(); result.add(new InjectingActivityModule(this, this)); return result; }
List<Object> function() { List<Object> result = new ArrayList<Object>(); result.add(new InjectingActivityModule(this, this)); return result; }
/** * Returns the list of dagger modules to be included in this Activity's object graph. Subclasses that override * this method should add to the list returned by super.getModules(). * * @return the list of modules */
Returns the list of dagger modules to be included in this Activity's object graph. Subclasses that override this method should add to the list returned by super.getModules()
getModules
{ "repo_name": "negherbon/fb-android-dagger", "path": "src/main/java/com/fizzbuzz/android/dagger/InjectingActivity.java", "license": "apache-2.0", "size": 3782 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
237,708
@Override public MouseEvent mouseReleased(MouseEvent mouseEvent) { if (rightClick) { rightClick = false; // Change the MouseEvent to button 2 so the middle mouse button will be released mouseEvent = new MouseEvent((java.awt.Component) mouseEvent.getSource(), mouseEvent.getID(), mouseEvent.getW...
MouseEvent function(MouseEvent mouseEvent) { if (rightClick) { rightClick = false; mouseEvent = new MouseEvent((java.awt.Component) mouseEvent.getSource(), mouseEvent.getID(), mouseEvent.getWhen(), mouseEvent.getModifiersEx(), mouseEvent.getX(), mouseEvent.getY(), mouseEvent.getClickCount(), mouseEvent.isPopupTrigger()...
/** * Correct the MouseEvent to release the correct button */
Correct the MouseEvent to release the correct button
mouseReleased
{ "repo_name": "runelite/runelite", "path": "runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraPlugin.java", "license": "bsd-2-clause", "size": 14600 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
762,580
@XmlTransient public Element getAnyOtherElement() { if (anyOther == null) return null; if (anyOtherElement != null) return anyOtherElement; for (Object obj : anyOther) { if (obj instanceof Element) { anyOtherElement = (Element) obj; return anyOt...
Element function() { if (anyOther == null) return null; if (anyOtherElement != null) return anyOtherElement; for (Object obj : anyOther) { if (obj instanceof Element) { anyOtherElement = (Element) obj; return anyOtherElement; } } return null; }
/** * Get content as an XML Element if the content is XML. Otherwise, this will just return null. * * @return */
Get content as an XML Element if the content is XML. Otherwise, this will just return null
getAnyOtherElement
{ "repo_name": "kabir/re-play", "path": "providers/resteasy-atom/src/main/java/org/jboss/resteasy/plugins/providers/atom/Entry.java", "license": "apache-2.0", "size": 10299 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,138,018
public void removeSecurityTeam(final int facility,final int secTeam) { this.facility = facility; this.secTeam = secTeam; // test arguments if(!this.testAdding()){ return; } // json object JSONObject jsonQuery = prepareJSONObject(); // local events JsonCallbackEvents newEvents = new JsonCallb...
void function(final int facility,final int secTeam) { this.facility = facility; this.secTeam = secTeam; if(!this.testAdding()){ return; } JSONObject jsonQuery = prepareJSONObject(); JsonCallbackEvents newEvents = new JsonCallbackEvents(){
/** * Attempts to remove security team from facility, it first tests the values and then submits them. * * @param facility ID of facility which should have security team remove * @param secTeam ID of SecurityTeam to be removed from facility */
Attempts to remove security team from facility, it first tests the values and then submits them
removeSecurityTeam
{ "repo_name": "Natrezim/perun", "path": "perun-web-gui/src/main/java/cz/metacentrum/perun/webgui/json/facilitiesManager/RemoveSecurityTeam.java", "license": "bsd-2-clause", "size": 3152 }
[ "com.google.gwt.json.client.JSONObject", "cz.metacentrum.perun.webgui.json.JsonCallbackEvents" ]
import com.google.gwt.json.client.JSONObject; import cz.metacentrum.perun.webgui.json.JsonCallbackEvents;
import com.google.gwt.json.client.*; import cz.metacentrum.perun.webgui.json.*;
[ "com.google.gwt", "cz.metacentrum.perun" ]
com.google.gwt; cz.metacentrum.perun;
1,220,184
void complete(LazyClassAlias lazyClassAlias);
void complete(LazyClassAlias lazyClassAlias);
/** * Completes loading of a lazy class alias */
Completes loading of a lazy class alias
complete
{ "repo_name": "ceylon/ceylon-model", "path": "src/com/redhat/ceylon/model/loader/ModelCompleter.java", "license": "apache-2.0", "size": 2296 }
[ "com.redhat.ceylon.model.loader.model.LazyClassAlias" ]
import com.redhat.ceylon.model.loader.model.LazyClassAlias;
import com.redhat.ceylon.model.loader.model.*;
[ "com.redhat.ceylon" ]
com.redhat.ceylon;
435,824
public static Document createDocument(String xml) throws XmlParseException { return createDocument(xml, false, false); }
static Document function(String xml) throws XmlParseException { return createDocument(xml, false, false); }
/** * Creates a DOM Document from the specified XML string, ignoring DTD-validation. * * @param xml a valid XML document, ie the String can't be null or empty * @return the <code>Document</code> object for the specified string. * @throws XmlParseException if we fail to parse the XML. */
Creates a DOM Document from the specified XML string, ignoring DTD-validation
createDocument
{ "repo_name": "TheLQ/ps3mediaserver", "path": "src/main/java/net/pms/xmlwise/Xmlwise.java", "license": "gpl-2.0", "size": 5662 }
[ "org.w3c.dom.Document" ]
import org.w3c.dom.Document;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,197,299
public void setBeerDrinkerService( com.liferay.devcon2013.service.BeerDrinkerService beerDrinkerService) { this.beerDrinkerService = beerDrinkerService; }
void function( com.liferay.devcon2013.service.BeerDrinkerService beerDrinkerService) { this.beerDrinkerService = beerDrinkerService; }
/** * Sets the beer drinker remote service. * * @param beerDrinkerService the beer drinker remote service */
Sets the beer drinker remote service
setBeerDrinkerService
{ "repo_name": "tmoreira2020/liferay-service-builder-unit-testable", "path": "service-builder-unit-testable-portlet/src/main/java/com/liferay/devcon2013/service/base/BeerDrinkerServiceBaseImpl.java", "license": "apache-2.0", "size": 12934 }
[ "com.liferay.devcon2013.service.BeerDrinkerService" ]
import com.liferay.devcon2013.service.BeerDrinkerService;
import com.liferay.devcon2013.service.*;
[ "com.liferay.devcon2013" ]
com.liferay.devcon2013;
749,262
EClass getWidget();
EClass getWidget();
/** * Returns the meta object for class '{@link fr.obeo.dsl.game.Widget <em>Widget</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Widget</em>'. * @see fr.obeo.dsl.game.Widget * @generated */
Returns the meta object for class '<code>fr.obeo.dsl.game.Widget Widget</code>'.
getWidget
{ "repo_name": "Obeo/Game-Designer", "path": "plugins/fr.obeo.dsl.game/src-gen/fr/obeo/dsl/game/GamePackage.java", "license": "epl-1.0", "size": 149639 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,371,706
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getParent().getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); g.setColor(c.getBackground()); g.fillRect(0, ROUND_HEIGHT, c.getWidth(), c.getHeight() - ROUND_HEIGHT); } paint(g, c); } ...
void function(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getParent().getBackground()); g.fillRect(0, 0, c.getWidth(), c.getHeight()); g.setColor(c.getBackground()); g.fillRect(0, ROUND_HEIGHT, c.getWidth(), c.getHeight() - ROUND_HEIGHT); } paint(g, c); } class XPPaneBorder extends PaneBorder {
/** * Overriden to paint the background of the component but keeping the rounded * corners. */
Overriden to paint the background of the component but keeping the rounded corners
update
{ "repo_name": "charlycoste/TreeD", "path": "src/org/jdesktop/swingx/plaf/windows/WindowsTaskPaneUI.java", "license": "gpl-2.0", "size": 4669 }
[ "java.awt.Graphics", "javax.swing.JComponent" ]
import java.awt.Graphics; import javax.swing.JComponent;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
899,083
default Game getGame() { return getGameWorld().getGame(); }
default Game getGame() { return getGameWorld().getGame(); }
/** * Returns the game played in the world of this sign. * * @return the game played in the world of this sign */
Returns the game played in the world of this sign
getGame
{ "repo_name": "DRE2N/DungeonsXL", "path": "api/src/main/java/de/erethon/dungeonsxl/api/sign/DungeonSign.java", "license": "gpl-3.0", "size": 6868 }
[ "de.erethon.dungeonsxl.api.dungeon.Game" ]
import de.erethon.dungeonsxl.api.dungeon.Game;
import de.erethon.dungeonsxl.api.dungeon.*;
[ "de.erethon.dungeonsxl" ]
de.erethon.dungeonsxl;
2,136,001
public int getColumnType(int column) throws SQLException { return getField(column).getSQLType(); }
int function(int column) throws SQLException { return getField(column).getSQLType(); }
/** * What is a column's SQL Type? (java.sql.Type int) * * @param column * the first column is 1, the second is 2, etc. * * @return the java.sql.Type value * * @throws SQLException * if a database access error occurs * * @see java.sql.Types */
What is a column's SQL Type? (java.sql.Type int)
getColumnType
{ "repo_name": "yyuu/libmysql-java", "path": "src/com/mysql/jdbc/ResultSetMetaData.java", "license": "gpl-2.0", "size": 22734 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,248,539
public static IOFileFilter ageFileFilter(File cutoffReference, boolean acceptOlder) { return new AgeFileFilter(cutoffReference, acceptOlder); }
static IOFileFilter function(File cutoffReference, boolean acceptOlder) { return new AgeFileFilter(cutoffReference, acceptOlder); }
/** * Returns a filter that filters files based on a cutoff reference file. * * @param cutoffReference the file whose last modification * time is usesd as the threshold age of the files * @param acceptOlder if true, older files get accepted, if false, newer * @return an appropriat...
Returns a filter that filters files based on a cutoff reference file
ageFileFilter
{ "repo_name": "sebastiansemmle/acio", "path": "src/main/java/org/apache/commons/io/filefilter/FileFilterUtils.java", "license": "apache-2.0", "size": 28777 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,439,410
@SuppressWarnings({"OverlyComplexMethod", "JavadocReference", "NestedTryStatement"}) void reserveMemory(long size) throws MemoryReservationException { long availableOrReserved = tryReserveMemory(size); // optimist! if (availableOrReserved >= size) { return; } boolean interrupted = false; try { /...
@SuppressWarnings({STR, STR, STR}) void reserveMemory(long size) throws MemoryReservationException { long availableOrReserved = tryReserveMemory(size); if (availableOrReserved >= size) { return; } boolean interrupted = false; try { boolean refprocActive; do { try { refprocActive = JavaGcCleanerWrapper.tryRunPendingClea...
/** * Reserve memory of certain size if it is available. * * <p>Adjusted version of {@link java.nio.Bits#reserveMemory(long, int)} taken from Java 11. */
Reserve memory of certain size if it is available. Adjusted version of <code>java.nio.Bits#reserveMemory(long, int)</code> taken from Java 11
reserveMemory
{ "repo_name": "hequn8128/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/memory/UnsafeMemoryBudget.java", "license": "apache-2.0", "size": 6182 }
[ "org.apache.flink.util.JavaGcCleanerWrapper" ]
import org.apache.flink.util.JavaGcCleanerWrapper;
import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
2,072,861
public boolean getDisableMessageTimestamp() { return disableTimestamp; } /** * Specifies the delivery mode of messages that are sent using this * {@code JMSProducer}
boolean function() { return disableTimestamp; } /** * Specifies the delivery mode of messages that are sent using this * {@code JMSProducer}
/** * Gets an indication of whether message timestamps are disabled. */
Gets an indication of whether message timestamps are disabled
getDisableMessageTimestamp
{ "repo_name": "dstraub/jmscontext", "path": "src/main/java/de/ctrlaltdel/jms/JMSProducerImpl.java", "license": "apache-2.0", "size": 17639 }
[ "javax.jms.JMSProducer" ]
import javax.jms.JMSProducer;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
2,069,590
public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException { updateBigDecimal(findColumn(columnName), x); }
void function(String columnName, BigDecimal x) throws SQLException { updateBigDecimal(findColumn(columnName), x); }
/** * JDBC 2.0 Update a column with a BigDecimal value. The updateXXX() methods * are used to update column values in the current row, or the insert row. * The updateXXX() methods do not update the underlying database, instead * the updateRow() or insertRow() methods are called to update the databas...
JDBC 2.0 Update a column with a BigDecimal value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database
updateBigDecimal
{ "repo_name": "scopej/mysql-connector-j", "path": "src/com/mysql/jdbc/ResultSetImpl.java", "license": "gpl-2.0", "size": 287512 }
[ "java.math.BigDecimal", "java.sql.SQLException" ]
import java.math.BigDecimal; import java.sql.SQLException;
import java.math.*; import java.sql.*;
[ "java.math", "java.sql" ]
java.math; java.sql;
2,886,669
public HashMap<String, String> getDeviceCommands(String itemName);
HashMap<String, String> function(String itemName);
/** * Returns all commands to the given <code>itemName</code>. * * @param itemName * the item for which to find a command. * * @return the corresponding list of commands or <code>null</code> if no commands * could be found. */
Returns all commands to the given <code>itemName</code>
getDeviceCommands
{ "repo_name": "idserda/openhab", "path": "bundles/binding/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/PioneerAvrBindingProvider.java", "license": "epl-1.0", "size": 2314 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,329,089
private void handleConferenceParticipantsUpdate( TelephonyConnection parent, List<ConferenceParticipant> participants) { boolean newParticipantsAdded = false; boolean oldParticipantsRemoved = false; ArrayList<ConferenceParticipant> newParticipants = new ArrayList<>(participants....
void function( TelephonyConnection parent, List<ConferenceParticipant> participants) { boolean newParticipantsAdded = false; boolean oldParticipantsRemoved = false; ArrayList<ConferenceParticipant> newParticipants = new ArrayList<>(participants.size()); HashSet<Uri> participantEndpoints = new HashSet<>(participants.siz...
/** * Handles state changes for conference participant(s). The participants data passed in * * @param parent The connection which was notified of the conference participant. * @param participants The conference participant information. */
Handles state changes for conference participant(s). The participants data passed in
handleConferenceParticipantsUpdate
{ "repo_name": "md5555/android_packages_services_Telephony", "path": "src/com/android/services/telephony/ImsConference.java", "license": "apache-2.0", "size": 21887 }
[ "android.net.Uri", "android.telecom.ConferenceParticipant", "java.util.ArrayList", "java.util.HashSet", "java.util.Iterator", "java.util.List", "java.util.Map" ]
import android.net.Uri; import android.telecom.ConferenceParticipant; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map;
import android.net.*; import android.telecom.*; import java.util.*;
[ "android.net", "android.telecom", "java.util" ]
android.net; android.telecom; java.util;
2,290,679
public void updateLocale(String locale) throws SecurityException { checkWriteAccess(); boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_SETTING); if(!hasAccess) throw new SecurityException("no access to update regional setting"); Element scope=_...
void function(String locale) throws SecurityException { checkWriteAccess(); boolean hasAccess=ConfigWebUtil.hasAccess(config,SecurityManager.TYPE_SETTING); if(!hasAccess) throw new SecurityException(STR); Element scope=_getRootElement(STR); scope.setAttribute(STR,locale.trim()); }
/** * update the locale * @param locale * @throws SecurityException */
update the locale
updateLocale
{ "repo_name": "lucee/unoffical-Lucee-no-jre", "path": "source/java/core/src/lucee/runtime/config/XMLConfigAdmin.java", "license": "lgpl-2.1", "size": 224955 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,361,047
public static void addInputPath(Job job, Path path) throws IOException { Configuration conf = job.getConfiguration(); path = path.getFileSystem(conf).makeQualified(path); String dirStr = StringUtils.escapeString(path.toString()); String dirs = conf.get(INPUT_DIR); ...
static void function(Job job, Path path) throws IOException { Configuration conf = job.getConfiguration(); path = path.getFileSystem(conf).makeQualified(path); String dirStr = StringUtils.escapeString(path.toString()); String dirs = conf.get(INPUT_DIR); conf.set(INPUT_DIR, dirs == null ? dirStr : dirs + "," + dirStr); ...
/** * Add a {@link Path} to the list of inputs for the map-reduce job. * * @param job The {@link Job} to modify * @param path {@link Path} to be added to the list of inputs for * the map-reduce job. */
Add a <code>Path</code> to the list of inputs for the map-reduce job
addInputPath
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java", "license": "gpl-3.0", "size": 21428 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.Path", "org.apache.hadoop.mapreduce.Job", "org.apache.hadoop.util.StringUtils" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.util.StringUtils;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,721,428
public boolean isActive(String overlayId) { return currentOverlay().id().equals(overlayId); } // overlay instance representing "no overlay selected" private static class NullOverlay extends UiTopoOverlay { public NullOverlay() { super(EMPTY); } }
boolean function(String overlayId) { return currentOverlay().id().equals(overlayId); } private static class NullOverlay extends UiTopoOverlay { public NullOverlay() { super(EMPTY); } }
/** * Returns true if the identifier of the currently active overlay * matches the given parameter. * * @param overlayId overlay identifier * @return true if this matches the ID of currently active overlay */
Returns true if the identifier of the currently active overlay matches the given parameter
isActive
{ "repo_name": "donNewtonAlpha/onos", "path": "web/gui/src/main/java/org/onosproject/ui/impl/TopoOverlayCache.java", "license": "apache-2.0", "size": 3297 }
[ "org.onosproject.ui.UiTopoOverlay" ]
import org.onosproject.ui.UiTopoOverlay;
import org.onosproject.ui.*;
[ "org.onosproject.ui" ]
org.onosproject.ui;
316,772
public List<String> getRegisteredWidgetNames() { List<String> result = new ArrayList<String>(m_registeredWidgets.keySet()); Collections.sort(result); return result; }
List<String> function() { List<String> result = new ArrayList<String>(m_registeredWidgets.keySet()); Collections.sort(result); return result; }
/** * Returns an alphabetically sorted list of the class names of all configured XML widgets.<p> * * @return an alphabetically sorted list of the class names of all configured XML widgets */
Returns an alphabetically sorted list of the class names of all configured XML widgets
getRegisteredWidgetNames
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/xml/CmsXmlContentTypeManager.java", "license": "lgpl-2.1", "size": 24873 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
579,537
private void validateRTree() { if (!has()) { throw new GeoPackageException( "RTree Extension not found for feature table: " + featureDao.getTableName()); } }
void function() { if (!has()) { throw new GeoPackageException( STR + featureDao.getTableName()); } }
/** * Validate that the RTree extension exists for the table and column */
Validate that the RTree extension exists for the table and column
validateRTree
{ "repo_name": "ngageoint/geopackage-java", "path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java", "license": "mit", "size": 349361 }
[ "mil.nga.geopackage.GeoPackageException" ]
import mil.nga.geopackage.GeoPackageException;
import mil.nga.geopackage.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
1,962,792
protected int persistHydrant( FireHydrant indexToPersist, DataSchema schema, Interval interval, Map<String, Object> metadataElems ) { synchronized (indexToPersist) { if (indexToPersist.hasSwapped()) { log.info( "DataSource[%s], Interval[%s], Hydrant[%s] alread...
int function( FireHydrant indexToPersist, DataSchema schema, Interval interval, Map<String, Object> metadataElems ) { synchronized (indexToPersist) { if (indexToPersist.hasSwapped()) { log.info( STR, schema.getDataSource(), interval, indexToPersist ); return 0; } log.info( STR, schema.getDataSource(), interval, metadat...
/** * Persists the given hydrant and returns the number of rows persisted * * @param indexToPersist hydrant to persist * @param schema datasource schema * @param interval interval to persist * * @return the number of rows persisted */
Persists the given hydrant and returns the number of rows persisted
persistHydrant
{ "repo_name": "haoch/druid", "path": "server/src/main/java/io/druid/segment/realtime/plumber/RealtimePlumber.java", "license": "apache-2.0", "size": 39914 }
[ "com.google.common.base.Throwables", "io.druid.segment.IndexSpec", "io.druid.segment.QueryableIndexSegment", "io.druid.segment.indexing.DataSchema", "io.druid.segment.realtime.FireHydrant", "java.io.File", "java.io.IOException", "java.util.Map", "org.joda.time.Interval" ]
import com.google.common.base.Throwables; import io.druid.segment.IndexSpec; import io.druid.segment.QueryableIndexSegment; import io.druid.segment.indexing.DataSchema; import io.druid.segment.realtime.FireHydrant; import java.io.File; import java.io.IOException; import java.util.Map; import org.joda.time.Interval;
import com.google.common.base.*; import io.druid.segment.*; import io.druid.segment.indexing.*; import io.druid.segment.realtime.*; import java.io.*; import java.util.*; import org.joda.time.*;
[ "com.google.common", "io.druid.segment", "java.io", "java.util", "org.joda.time" ]
com.google.common; io.druid.segment; java.io; java.util; org.joda.time;
1,664,518
default List<T> getSpaces() { return getSpaces(getApplication()); }
default List<T> getSpaces() { return getSpaces(getApplication()); }
/** * Returns all configured spaces for the first application of the first tenant. * @return All configured spaces for the first application of the first tenant * @throws IllegalArgumentException when no tenants are configured or no applications are configured for the first * tenant * @since 9.5.0 */
Returns all configured spaces for the first application of the first tenant
getSpaces
{ "repo_name": "kovaloid/infoarchive-sip-sdk", "path": "configuration/src/main/java/com/opentext/ia/configuration/Configuration.java", "license": "mpl-2.0", "size": 12727 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
904,180
@Override public void run() { while(running) { try { conn.handleIO(); } catch(IOException e) { logRunException(e); } catch(CancelledKeyException e) { logRunException(e); } catch(ClosedSelectorException e) { logRunException(e); } catch(IllegalStateException e) { logRunException(e...
void function() { while(running) { try { conn.handleIO(); } catch(IOException e) { logRunException(e); } catch(CancelledKeyException e) { logRunException(e); } catch(ClosedSelectorException e) { logRunException(e); } catch(IllegalStateException e) { logRunException(e); } } getLogger().info(STR); }
/** * Infinitely loop processing IO. */
Infinitely loop processing IO
run
{ "repo_name": "ciaranj/java-memcached-client", "path": "src/main/java/net/spy/memcached/MemcachedClient.java", "license": "mit", "size": 51549 }
[ "java.io.IOException", "java.nio.channels.CancelledKeyException", "java.nio.channels.ClosedSelectorException" ]
import java.io.IOException; import java.nio.channels.CancelledKeyException; import java.nio.channels.ClosedSelectorException;
import java.io.*; import java.nio.channels.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,073,247
private void writeAndClose(BufferedWriter writer, TreeMap<Integer, TreeMap<String, Double>> values) { try { // append header writer.append("cycle_number,agentId,value"); writer.append("\n"); // append values for (int cycleNumber : values.keySet()) { TreeMap<String, Double> perAgentValues = v...
void function(BufferedWriter writer, TreeMap<Integer, TreeMap<String, Double>> values) { try { writer.append(STR); writer.append("\n"); for (int cycleNumber : values.keySet()) { TreeMap<String, Double> perAgentValues = values .get(cycleNumber); for (int i = 0; i < numOfAgents; i++) { String sAgent = Integer.toString(i)...
/** * This private method is used by "flush" method to write statistics to * relevant output csv file * * @param writer * @param values */
This private method is used by "flush" method to write statistics to relevant output csv file
writeAndClose
{ "repo_name": "agentsoz/bdi-abm-integration", "path": "examples/conservation/src/main/java/io/github/agentsoz/conservation/outputwriters/AgentsStatisticsWriter.java", "license": "lgpl-3.0", "size": 15638 }
[ "java.io.BufferedWriter", "java.io.IOException", "java.util.TreeMap" ]
import java.io.BufferedWriter; import java.io.IOException; import java.util.TreeMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
861,870
@Test() public void testSingleBackendServer() throws Exception { StreamProxyValuesBackendSet s = new StreamProxyValuesBackendSet( new ASN1OctetString("foo"), new String[] { "directory.example.com" }, new int[] { 389 }); s = StreamProxyValuesBackendSet.decode(s.encode()); as...
@Test() void function() throws Exception { StreamProxyValuesBackendSet s = new StreamProxyValuesBackendSet( new ASN1OctetString("foo"), new String[] { STR }, new int[] { 389 }); s = StreamProxyValuesBackendSet.decode(s.encode()); assertNotNull(s); assertEquals(s.getBackendSetID().stringValue(), "foo"); assertNotNull(s....
/** * Provides basic test coverage for the class in which only a single backend * server is available. * * @throws Exception If an unexpected problem occurs. */
Provides basic test coverage for the class in which only a single backend server is available
testSingleBackendServer
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/StreamProxyValuesBackendSetTestCase.java", "license": "gpl-2.0", "size": 6681 }
[ "com.unboundid.asn1.ASN1OctetString", "org.testng.annotations.Test" ]
import com.unboundid.asn1.ASN1OctetString; import org.testng.annotations.Test;
import com.unboundid.asn1.*; import org.testng.annotations.*;
[ "com.unboundid.asn1", "org.testng.annotations" ]
com.unboundid.asn1; org.testng.annotations;
1,951,870
public void testFilter() throws Exception { System.out.println("ClickjackFilter"); Map map = new HashMap(); FilterConfig mfc = new MockFilterConfig( map ); ClickjackFilter filter = new ClickjackFilter(); filter.init( mfc ); MockHttpServletRequest request = new ...
void function() throws Exception { System.out.println(STR); Map map = new HashMap(); FilterConfig mfc = new MockFilterConfig( map ); ClickjackFilter filter = new ClickjackFilter(); filter.init( mfc ); MockHttpServletRequest request = new MockHttpServletRequest(); MockFilterChain chain = new MockFilterChain(); URL url =...
/** * Test of update method, of class org.owasp.esapi.AccessReferenceMap. * @throws Exception */
Test of update method, of class org.owasp.esapi.AccessReferenceMap
testFilter
{ "repo_name": "Letractively/owasp-esapi-java", "path": "src/test/java/org/owasp/esapi/filters/ClickjackFilterTest.java", "license": "bsd-3-clause", "size": 3023 }
[ "java.util.HashMap", "java.util.Map", "javax.servlet.FilterConfig", "org.owasp.esapi.http.MockFilterChain", "org.owasp.esapi.http.MockFilterConfig", "org.owasp.esapi.http.MockHttpServletRequest" ]
import java.util.HashMap; import java.util.Map; import javax.servlet.FilterConfig; import org.owasp.esapi.http.MockFilterChain; import org.owasp.esapi.http.MockFilterConfig; import org.owasp.esapi.http.MockHttpServletRequest;
import java.util.*; import javax.servlet.*; import org.owasp.esapi.http.*;
[ "java.util", "javax.servlet", "org.owasp.esapi" ]
java.util; javax.servlet; org.owasp.esapi;
921,150
void removeAllMessagesForDatanode(DatanodeDescriptor dn) { for (Map.Entry<Block, Queue<ReportedBlockInfo>> entry : queueByBlockId.entrySet()) { Queue<ReportedBlockInfo> newQueue = Lists.newLinkedList(); Queue<ReportedBlockInfo> oldQueue = entry.getValue(); while (!oldQueue.isEmpty()) { ...
void removeAllMessagesForDatanode(DatanodeDescriptor dn) { for (Map.Entry<Block, Queue<ReportedBlockInfo>> entry : queueByBlockId.entrySet()) { Queue<ReportedBlockInfo> newQueue = Lists.newLinkedList(); Queue<ReportedBlockInfo> oldQueue = entry.getValue(); while (!oldQueue.isEmpty()) { ReportedBlockInfo rbi = oldQueue....
/** * Remove all pending DN messages which reference the given DN. * @param dn the datanode whose messages we should remove. */
Remove all pending DN messages which reference the given DN
removeAllMessagesForDatanode
{ "repo_name": "yelshater/hadoop-2.3.0", "path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/PendingDataNodeMessages.java", "license": "apache-2.0", "size": 4682 }
[ "com.google.common.collect.Lists", "java.util.Map", "java.util.Queue", "org.apache.hadoop.hdfs.protocol.Block" ]
import com.google.common.collect.Lists; import java.util.Map; import java.util.Queue; import org.apache.hadoop.hdfs.protocol.Block;
import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*;
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
1,604,979
public ResourcePath getPath(CollectionResource resource);
ResourcePath function(CollectionResource resource);
/** * Retrieves the path of the resource, relative to the repository root. * * @param resource Used by the {@link GenericTypeResource} in order to determine the instance name. * @return relative path */
Retrieves the path of the resource, relative to the repository root
getPath
{ "repo_name": "aihua/opennms", "path": "features/collection/api/src/main/java/org/opennms/netmgt/collection/support/builder/Resource.java", "license": "agpl-3.0", "size": 3338 }
[ "org.opennms.netmgt.collection.api.CollectionResource", "org.opennms.netmgt.model.ResourcePath" ]
import org.opennms.netmgt.collection.api.CollectionResource; import org.opennms.netmgt.model.ResourcePath;
import org.opennms.netmgt.collection.api.*; import org.opennms.netmgt.model.*;
[ "org.opennms.netmgt" ]
org.opennms.netmgt;
2,755,649
CompletableFuture<RegistrationResponse> registerJobManager( JobMasterId jobMasterId, ResourceID jobMasterResourceId, String jobMasterAddress, JobID jobId, @RpcTimeout Time timeout);
CompletableFuture<RegistrationResponse> registerJobManager( JobMasterId jobMasterId, ResourceID jobMasterResourceId, String jobMasterAddress, JobID jobId, @RpcTimeout Time timeout);
/** * Register a {@link JobMaster} at the resource manager. * * @param jobMasterId The fencing token for the JobMaster leader * @param jobMasterResourceId The resource ID of the JobMaster that registers * @param jobMasterAddress The address of the JobMaster that registers * @param jobId The Job ID of the Jo...
Register a <code>JobMaster</code> at the resource manager
registerJobManager
{ "repo_name": "bowenli86/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManagerGateway.java", "license": "apache-2.0", "size": 9767 }
[ "java.util.concurrent.CompletableFuture", "org.apache.flink.api.common.JobID", "org.apache.flink.api.common.time.Time", "org.apache.flink.runtime.clusterframework.types.ResourceID", "org.apache.flink.runtime.jobmaster.JobMasterId", "org.apache.flink.runtime.registration.RegistrationResponse", "org.apach...
import java.util.concurrent.CompletableFuture; import org.apache.flink.api.common.JobID; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.jobmaster.JobMasterId; import org.apache.flink.runtime.registration.RegistrationRespon...
import java.util.concurrent.*; import org.apache.flink.api.common.*; import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.jobmaster.*; import org.apache.flink.runtime.registration.*; import org.apache.flink.runtime.rpc.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,278,283
public Map<String, String> getSettings() throws StiebelHeatPumpException { logger.debug("Loading Settings"); Map<String, String> data = new HashMap<String, String>(); for (Request request : heatPumpSettingConfiguration) { logger.debug("Loading data for request {} ...", reques...
Map<String, String> function() throws StiebelHeatPumpException { logger.debug(STR); Map<String, String> data = new HashMap<String, String>(); for (Request request : heatPumpSettingConfiguration) { logger.debug(STR, request.getName()); try { Map<String, String> newData = readData(request); data.putAll(newData); Thread.s...
/** * This method reads all settings defined in the heat pump configuration * from the heat pump * * @return map of heat pump setting values */
This method reads all settings defined in the heat pump configuration from the heat pump
getSettings
{ "repo_name": "jowiho/openhab", "path": "bundles/binding/org.openhab.binding.stiebelheatpump/src/main/java/org/openhab/binding/stiebelheatpump/internal/CommunicationService.java", "license": "epl-1.0", "size": 27411 }
[ "java.util.HashMap", "java.util.Map", "org.openhab.binding.stiebelheatpump.protocol.Request" ]
import java.util.HashMap; import java.util.Map; import org.openhab.binding.stiebelheatpump.protocol.Request;
import java.util.*; import org.openhab.binding.stiebelheatpump.protocol.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
392,873
public RunT loadBuild(File dir) throws IOException { try { return getBuildClass().getConstructor(asJob().getClass(), File.class).newInstance(asJob(), dir); } catch (InstantiationException e) { throw new Error(e); } catch (IllegalAccessException e) { throw ...
RunT function(File dir) throws IOException { try { return getBuildClass().getConstructor(asJob().getClass(), File.class).newInstance(asJob(), dir); } catch (InstantiationException e) { throw new Error(e); } catch (IllegalAccessException e) { throw new Error(e); } catch (InvocationTargetException e) { throw handleInvoca...
/** * Loads an existing build record from disk. * The default implementation just calls the ({@link Job}, {@link File}) constructor of {@link #getBuildClass}. */
Loads an existing build record from disk. The default implementation just calls the (<code>Job</code>, <code>File</code>) constructor of <code>#getBuildClass</code>
loadBuild
{ "repo_name": "lindzh/jenkins", "path": "core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java", "license": "mit", "size": 15888 }
[ "java.io.File", "java.io.IOException", "java.lang.reflect.InvocationTargetException" ]
import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException;
import java.io.*; import java.lang.reflect.*;
[ "java.io", "java.lang" ]
java.io; java.lang;
2,171,079
public void writeToDatabaseOrThrow() throws StopRequestException { if (mContext.getContentResolver().update(mInfo.getAllDownloadsUri(), buildContentValues(), Downloads.Impl.COLUMN_DELETED + " == '0'", null) == 0) { throw new StopRequestException(STATUS_CANCELED, "...
void function() throws StopRequestException { if (mContext.getContentResolver().update(mInfo.getAllDownloadsUri(), buildContentValues(), Downloads.Impl.COLUMN_DELETED + STR, null) == 0) { throw new StopRequestException(STATUS_CANCELED, STR); } } } private boolean mMadeProgress = false; private long mLastUpdateBytes = 0...
/** * Push update of current delta values to provider, asserting strongly * that we haven't been paused or deleted. */
Push update of current delta values to provider, asserting strongly that we haven't been paused or deleted
writeToDatabaseOrThrow
{ "repo_name": "wangdan/DownloadManager", "path": "library/src/main/java/org/aisen/downloader/provider/DownloadThread.java", "license": "apache-2.0", "size": 31903 }
[ "android.content.Context", "org.aisen.downloader.downloads.Downloads", "org.aisen.downloader.utils.ConnectivityManagerUtils" ]
import android.content.Context; import org.aisen.downloader.downloads.Downloads; import org.aisen.downloader.utils.ConnectivityManagerUtils;
import android.content.*; import org.aisen.downloader.downloads.*; import org.aisen.downloader.utils.*;
[ "android.content", "org.aisen.downloader" ]
android.content; org.aisen.downloader;
2,827,715
public CLASSIFIER_TYPE loadClassifier(InputStream inputStream) throws IOException { // if it's already a Jar stream, don't re-wrap it if (inputStream instanceof JarInputStream) { JarInputStream modelStream = (JarInputStream) inputStream; this.unpackageClassifier(modelStream); return this.ne...
CLASSIFIER_TYPE function(InputStream inputStream) throws IOException { if (inputStream instanceof JarInputStream) { JarInputStream modelStream = (JarInputStream) inputStream; this.unpackageClassifier(modelStream); return this.newClassifier(); } else { JarInputStream modelStream = new JarInputStream(inputStream); try { ...
/** * Load a classifier packaged by {@link #packageClassifier(File)} from an {@link InputStream}. * * This method should typically not be overridden by subclasses - use * {@link #unpackageClassifier(JarInputStream)} and {@link #newClassifier()} instead. * * @param inputStream * The class...
Load a classifier packaged by <code>#packageClassifier(File)</code> from an <code>InputStream</code>. This method should typically not be overridden by subclasses - use <code>#unpackageClassifier(JarInputStream)</code> and <code>#newClassifier()</code> instead
loadClassifier
{ "repo_name": "ClearTK/cleartk", "path": "cleartk-ml/src/main/java/org/cleartk/ml/jar/JarClassifierBuilder.java", "license": "bsd-3-clause", "size": 11808 }
[ "java.io.IOException", "java.io.InputStream", "java.util.jar.JarInputStream" ]
import java.io.IOException; import java.io.InputStream; import java.util.jar.JarInputStream;
import java.io.*; import java.util.jar.*;
[ "java.io", "java.util" ]
java.io; java.util;
376,183
public Builder addTransitiveArtifactsWrappedInStableOrder(NestedSet<Artifact> artifacts) { NestedSet<Artifact> wrappedArtifacts = NestedSetBuilder.<Artifact>stableOrder().addTransitive(artifacts).build(); artifactsBuilder.addTransitive(wrappedArtifacts); return this; }
Builder function(NestedSet<Artifact> artifacts) { NestedSet<Artifact> wrappedArtifacts = NestedSetBuilder.<Artifact>stableOrder().addTransitive(artifacts).build(); artifactsBuilder.addTransitive(wrappedArtifacts); return this; }
/** * Adds a nested set to the internal collection. * * <p>The nested set will become wrapped in stable order. Only use this when the set of * artifacts will not have conflicting root relative paths, or the wrong artifact will end up in * the runfiles tree. */
Adds a nested set to the internal collection. The nested set will become wrapped in stable order. Only use this when the set of artifacts will not have conflicting root relative paths, or the wrong artifact will end up in the runfiles tree
addTransitiveArtifactsWrappedInStableOrder
{ "repo_name": "akira-baruah/bazel", "path": "src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java", "license": "apache-2.0", "size": 47800 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet", "com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
1,872,001
private SourceCodeBranch branch(String name) { SourceCodeBranch branch = new SourceCodeBranch(); branch.setName(name); branch.setCommitId(String.valueOf(name.hashCode())); return branch; }
SourceCodeBranch function(String name) { SourceCodeBranch branch = new SourceCodeBranch(); branch.setName(name); branch.setCommitId(String.valueOf(name.hashCode())); return branch; }
/** * Creates a branch. */
Creates a branch
branch
{ "repo_name": "apiman/apiman-studio", "path": "back-end/hub-api/src/test/java/test/io/apicurio/hub/api/MockGitHubService.java", "license": "apache-2.0", "size": 8839 }
[ "io.apicurio.hub.api.beans.SourceCodeBranch" ]
import io.apicurio.hub.api.beans.SourceCodeBranch;
import io.apicurio.hub.api.beans.*;
[ "io.apicurio.hub" ]
io.apicurio.hub;
242,256
public boolean isCompatible(BloomFilter<T> that) { checkNotNull(that); return (this != that) && (this.numHashFunctions == that.numHashFunctions) && (this.bitSize() == that.bitSize()) && (this.strategy.equals(that.strategy)) && (this.funnel.equals(that.funnel)); } /** * ...
boolean function(BloomFilter<T> that) { checkNotNull(that); return (this != that) && (this.numHashFunctions == that.numHashFunctions) && (this.bitSize() == that.bitSize()) && (this.strategy.equals(that.strategy)) && (this.funnel.equals(that.funnel)); } /** * Combines this Bloom filter with another Bloom filter by perfo...
/** * Determines whether a given Bloom filter is compatible with this Bloom filter. For two Bloom * filters to be compatible, they must: * * <ul> * <li>not be the same instance * <li>have the same number of hash functions * <li>have the same bit size * <li>have the same strategy * <...
Determines whether a given Bloom filter is compatible with this Bloom filter. For two Bloom filters to be compatible, they must: not be the same instance have the same number of hash functions have the same bit size have the same strategy have equal funnels
isCompatible
{ "repo_name": "berndhopp/guava", "path": "android/guava/src/com/google/common/hash/BloomFilter.java", "license": "apache-2.0", "size": 22754 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,379,998
List<String> extraRemoteVMOptions();
List<String> extraRemoteVMOptions();
/** * Returns the additional VM options to be used when launching the remote * JVM. This is advice to the execution engine. * <p> * Note: an execution engine need not launch a remote JVM. * * @return the additional options with which to launch the remote JVM */
Returns the additional VM options to be used when launching the remote JVM. This is advice to the execution engine. Note: an execution engine need not launch a remote JVM
extraRemoteVMOptions
{ "repo_name": "FauxFaux/jdk9-langtools", "path": "src/jdk.jshell/share/classes/jdk/jshell/spi/ExecutionEnv.java", "license": "gpl-2.0", "size": 2517 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,134,608
public View getEmptyItem(View convertView, ViewGroup parent);
View function(View convertView, ViewGroup parent);
/** * Get a View that displays an empty wheel item placed before the first or after * the last wheel item. * * @param convertView the old view to reuse if possible * @param parent the parent that this view will eventually be attached to * @return the empty item View */
Get a View that displays an empty wheel item placed before the first or after the last wheel item
getEmptyItem
{ "repo_name": "LaiHouWen/ProjectAll", "path": "Android-baofu2.0/app/src/main/java/com/hxxc/user/app/widget/wheel/WheelViewAdapter.java", "license": "apache-2.0", "size": 2041 }
[ "android.view.View", "android.view.ViewGroup" ]
import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
1,148,367
User getByUsername(String username);
User getByUsername(String username);
/** * Retrieves a user based on the username * * @param username * username of the user * @return User */
Retrieves a user based on the username
getByUsername
{ "repo_name": "bernfried/SimplePRP", "path": "SimplePRP/src/main/java/de/webertise/simpleprp/model/dao/UserDao.java", "license": "gpl-2.0", "size": 1622 }
[ "de.webertise.simpleprp.model.User" ]
import de.webertise.simpleprp.model.User;
import de.webertise.simpleprp.model.*;
[ "de.webertise.simpleprp" ]
de.webertise.simpleprp;
98,957
@Test public void testIncludesPositive03() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = "standardlibrary/collection/includesPositive03.ocl"; modelFileName = "testmodel.uml"; testPerformer = TestPerformer.getInstance(AllStandardLibrary...
void function() throws Exception { TestPerformer testPerformer; String modelFileName; String oclFileName; oclFileName = STR; modelFileName = STR; testPerformer = TestPerformer.getInstance(AllStandardLibraryTests.META_MODEL_ID, AllStandardLibraryTests.MODEL_BUNDLE, AllStandardLibraryTests.MODEL_DIRECTORY); testPerformer...
/** * <p> * A test case testing the method <code>Collection->includes(T)</code>. * </p> */
A test case testing the method <code>Collection->includes(T)</code>.
testIncludesPositive03
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.ocl2parser.test/src/org/dresdenocl/ocl2parser/test/standardlibrary/TestCollection.java", "license": "lgpl-3.0", "size": 77031 }
[ "org.dresdenocl.ocl2parser.test.TestPerformer" ]
import org.dresdenocl.ocl2parser.test.TestPerformer;
import org.dresdenocl.ocl2parser.test.*;
[ "org.dresdenocl.ocl2parser" ]
org.dresdenocl.ocl2parser;
2,058,328
@Override public boolean summarizeAvailableSpendableFunds() { boolean success = true; if (systemParametersForSummarizeAvailableSpendableFundsJobExist()) { //Step 1: remove all the records from END_AVAIL_CSH_T table kemidCurrentAvailableBalanceService.clearAllAvaila...
boolean function() { boolean success = true; if (systemParametersForSummarizeAvailableSpendableFundsJobExist()) { kemidCurrentAvailableBalanceService.clearAllAvailableCash(); Collection<KEMID> kemIdRecords = kemidService.getAllKemIdWithClosedIndicatorNo(); for (KEMID kemIdRecord : kemIdRecords) { KEMIDCurrentAvailableB...
/** * This process will generate records at the end of each processing cycle to summarize the * available spendable funds for every KEMID that is not closed. */
This process will generate records at the end of each processing cycle to summarize the available spendable funds for every KEMID that is not closed
summarizeAvailableSpendableFunds
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/module/endow/batch/service/impl/AvailableCashUpdateServiceImpl.java", "license": "agpl-3.0", "size": 11810 }
[ "java.util.Collection", "org.kuali.kfs.module.endow.businessobject.KEMIDCurrentAvailableBalance" ]
import java.util.Collection; import org.kuali.kfs.module.endow.businessobject.KEMIDCurrentAvailableBalance;
import java.util.*; import org.kuali.kfs.module.endow.businessobject.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
2,584,494
public void check(final CompilationTimeStamp timestamp) { for (ImportModule importModule : importedModules_v) { importModule.check(timestamp); } }
void function(final CompilationTimeStamp timestamp) { for (ImportModule importModule : importedModules_v) { importModule.check(timestamp); } }
/** * checks the import statement itself. * * @param timestamp * the timestamp of the actual semantic check cycle. **/
checks the import statement itself
check
{ "repo_name": "eroslevi/titan.EclipsePlug-ins", "path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/AST/ASN1/definitions/Imports.java", "license": "epl-1.0", "size": 12481 }
[ "org.eclipse.titan.designer.parsers.CompilationTimeStamp" ]
import org.eclipse.titan.designer.parsers.CompilationTimeStamp;
import org.eclipse.titan.designer.parsers.*;
[ "org.eclipse.titan" ]
org.eclipse.titan;
2,366,192
private void checkClockSkew(final ServerName serverName, final long serverCurrentTime) throws ClockOutOfSyncException { long skew = Math.abs(System.currentTimeMillis() - serverCurrentTime); if (skew > maxSkew) { String message = "Server " + serverName + " has been " + "rejected; Reported time ...
void function(final ServerName serverName, final long serverCurrentTime) throws ClockOutOfSyncException { long skew = Math.abs(System.currentTimeMillis() - serverCurrentTime); if (skew > maxSkew) { String message = STR + serverName + STR + STR + STR + skew + STR + maxSkew + "ms"; LOG.warn(message); throw new ClockOutOf...
/** * Checks if the clock skew between the server and the master. If the clock skew exceeds the * configured max, it will throw an exception; if it exceeds the configured warning threshold, * it will log a warning but start normally. * @param serverName Incoming servers's name * @param serverCurrentTime ...
Checks if the clock skew between the server and the master. If the clock skew exceeds the configured max, it will throw an exception; if it exceeds the configured warning threshold, it will log a warning but start normally
checkClockSkew
{ "repo_name": "throughsky/lywebank", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java", "license": "apache-2.0", "size": 39621 }
[ "org.apache.hadoop.hbase.ClockOutOfSyncException", "org.apache.hadoop.hbase.ServerName" ]
import org.apache.hadoop.hbase.ClockOutOfSyncException; import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,997,685
public Record getNextRecord() throws MainFrameConversionException { log.debug("getNextRecord()"); byte[] bytes; if ((bytes = getNextRecordsBytes()) != null) { Record record = new Record(); record.setLength(bytes.length); record.setRecordNumber(++rowCount); record.setFields(breakApartRow(bytes))...
Record function() throws MainFrameConversionException { log.debug(STR); byte[] bytes; if ((bytes = getNextRecordsBytes()) != null) { Record record = new Record(); record.setLength(bytes.length); record.setRecordNumber(++rowCount); record.setFields(breakApartRow(bytes)); return record; } verifyFileIsClosed(); return nul...
/** * Gets the next record from the file. Returns the converted Record * or null if we've hit the EOF. It is up to the caller to handle the * mis-translation exceltions. * * @return the newly converted Record or NULL if we hit EOF * @throws MainFrameConversionException */
Gets the next record from the file. Returns the converted Record or null if we've hit the EOF. It is up to the caller to handle the mis-translation exceltions
getNextRecord
{ "repo_name": "tmeisenh/jccl", "path": "src/main/java/com/indexoutofbounds/mainframe/converter/impl/SimpleCOBOLToAsciiRecordConverter.java", "license": "apache-2.0", "size": 11494 }
[ "com.indexoutofbounds.mainframe.exception.MainFrameConversionException", "com.indexoutofbounds.mainframe.file.Record" ]
import com.indexoutofbounds.mainframe.exception.MainFrameConversionException; import com.indexoutofbounds.mainframe.file.Record;
import com.indexoutofbounds.mainframe.exception.*; import com.indexoutofbounds.mainframe.file.*;
[ "com.indexoutofbounds.mainframe" ]
com.indexoutofbounds.mainframe;
682,970
public Paint getValuePaint() { return this.valuePaint; }
Paint function() { return this.valuePaint; }
/** * Returns the paint for the value label. * * @return The paint (never <code>null</code>). * * @see #setValuePaint(Paint) */
Returns the paint for the value label
getValuePaint
{ "repo_name": "raincs13/phd", "path": "source/org/jfree/chart/plot/MeterPlot.java", "license": "lgpl-2.1", "size": 44257 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,117,136
public int append(ByteBuffer buffer, int count) throws IOException { if(closed) { throw new PacketException("Packet is closed"); } return 0; }
int function(ByteBuffer buffer, int count) throws IOException { if(closed) { throw new PacketException(STR); } return 0; }
/** * This will not append any bytes to the packet. Because this is * an immutable implementation of the <code>Packet</code> it can * not modify the underlying buffer. So this will simply return * having made no changes to either the buffer of the packet. * * @param buffer this is the buffer con...
This will not append any bytes to the packet. Because this is an immutable implementation of the <code>Packet</code> it can not modify the underlying buffer. So this will simply return having made no changes to either the buffer of the packet
append
{ "repo_name": "ael-code/preston", "path": "src/org/simpleframework/transport/BufferWrapper.java", "license": "gpl-2.0", "size": 13842 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,401,221
public Party generateParty() { int random = new Random().nextInt(2); if (random == 1) { return generatePerson(); } else { return generatePartyGroup(); } }
Party function() { int random = new Random().nextInt(2); if (random == 1) { return generatePerson(); } else { return generatePartyGroup(); } }
/** * Generate a mocked up Party object * * @return */
Generate a mocked up Party object
generateParty
{ "repo_name": "christopher-worley/common-app", "path": "object-mock/src/main/java/core/test/server/mock/party/PartyMock.java", "license": "lgpl-3.0", "size": 3916 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
51,465
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; }
void function(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; }
/** * This sets the composed adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This sets the composed adapter factory that contains this factory.
setParentAdapterFactory
{ "repo_name": "pseudokiri/eclipsetraining", "path": "com.sii.universe.edit/src/com/sii/universe/universe/provider/UniverseItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 10049 }
[ "org.eclipse.emf.edit.provider.ComposedAdapterFactory" ]
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,563,827
@Test public void testSemaphoreExecutionTimeoutWithNoFallback() { testExecutionTimeoutWithNoFallback(ExecutionIsolationStrategy.SEMAPHORE); }
void function() { testExecutionTimeoutWithNoFallback(ExecutionIsolationStrategy.SEMAPHORE); }
/** * Test a semaphore command execution timeout where the command didn't implement getFallback. */
Test a semaphore command execution timeout where the command didn't implement getFallback
testSemaphoreExecutionTimeoutWithNoFallback
{ "repo_name": "sasrin/Hystrix", "path": "hystrix-core/src/test/java/com/netflix/hystrix/HystrixObservableCommandTest.java", "license": "apache-2.0", "size": 272384 }
[ "com.netflix.hystrix.HystrixCommandProperties" ]
import com.netflix.hystrix.HystrixCommandProperties;
import com.netflix.hystrix.*;
[ "com.netflix.hystrix" ]
com.netflix.hystrix;
2,069,753
@SmallTest @Feature({"Cronet"}) public void testUploadDataContentType() throws Exception { String contentTypes[] = {"text/plain", "chicken/spicy"}; for (String contentType : contentTypes) { TestHttpUrlRequestListener listener = new TestHttpUrlRequestListener()...
@Feature({STR}) void function() throws Exception { String contentTypes[] = {STR, STR}; for (String contentType : contentTypes) { TestHttpUrlRequestListener listener = new TestHttpUrlRequestListener(); HttpUrlRequest request = createRequest( NativeTestServer.getEchoHeaderURL(STR), listener); request.setUploadData(conten...
/** * Tests Content-Type can be set when uploading an in-memory string. */
Tests Content-Type can be set when uploading an in-memory string
testUploadDataContentType
{ "repo_name": "Bysmyyr/chromium-crosswalk", "path": "components/cronet/android/test/javatests/src/org/chromium/net/UploadTest.java", "license": "bsd-3-clause", "size": 13456 }
[ "org.chromium.base.test.util.Feature" ]
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.*;
[ "org.chromium.base" ]
org.chromium.base;
1,527,691
public void exitExists_predicate(SQLParser.Exists_predicateContext ctx) { }
public void exitExists_predicate(SQLParser.Exists_predicateContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
enterExists_predicate
{ "repo_name": "HEIG-GAPS/slasher", "path": "slasher.corrector/src/main/java/ch/gaps/slasher/corrector/SQLParserBaseListener.java", "license": "mit", "size": 73849 }
[ "ch.gaps.slasher.corrector.SQLParser" ]
import ch.gaps.slasher.corrector.SQLParser;
import ch.gaps.slasher.corrector.*;
[ "ch.gaps.slasher" ]
ch.gaps.slasher;
761,369
public MetricName metricName(String name, String group, Map<String, String> tags) { return metricName(name, group, "", tags); }
MetricName function(String name, String group, Map<String, String> tags) { return metricName(name, group, "", tags); }
/** * Create a MetricName with the given name, group and tags, plus default tags specified in the metric * configuration. Tag in tags takes precedence if the same tag key is specified in the default metric configuration. * * @param name The name of the metric * @param group logical group name ...
Create a MetricName with the given name, group and tags, plus default tags specified in the metric configuration. Tag in tags takes precedence if the same tag key is specified in the default metric configuration
metricName
{ "repo_name": "sebadiaz/kafka", "path": "clients/src/main/java/org/apache/kafka/common/metrics/Metrics.java", "license": "apache-2.0", "size": 28699 }
[ "java.util.Map", "org.apache.kafka.common.MetricName" ]
import java.util.Map; import org.apache.kafka.common.MetricName;
import java.util.*; import org.apache.kafka.common.*;
[ "java.util", "org.apache.kafka" ]
java.util; org.apache.kafka;
1,853,901
public void addSslListener(InetSocketAddress addr, Configuration sslConf, boolean needCertsAuth) throws IOException { if (webServer.isStarted()) { throw new IOException("Failed to add ssl listener"); } if (needCertsAuth) { // setting up SSL truststore for authenticating clients Sys...
void function(InetSocketAddress addr, Configuration sslConf, boolean needCertsAuth) throws IOException { if (webServer.isStarted()) { throw new IOException(STR); } if (needCertsAuth) { System.setProperty(STR, sslConf.get( STR, STRjavax.net.ssl.trustStorePasswordSTRssl.server.truststore.password", STRjavax.net.ssl.trust...
/** * Configure an ssl listener on the server. * @param addr address to listen on * @param sslConf conf to retrieve ssl options * @param needCertsAuth whether x509 certificate authentication is required */
Configure an ssl listener on the server
addSslListener
{ "repo_name": "songweijia/fffs", "path": "sources/hadoop-2.4.1-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer.java", "license": "apache-2.0", "size": 41105 }
[ "java.io.IOException", "java.net.InetSocketAddress", "org.apache.hadoop.conf.Configuration" ]
import java.io.IOException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration;
import java.io.*; import java.net.*; import org.apache.hadoop.conf.*;
[ "java.io", "java.net", "org.apache.hadoop" ]
java.io; java.net; org.apache.hadoop;
2,094,304
public void format(String clusterId) throws IOException { this.layoutVersion = FSConstants.LAYOUT_VERSION; this.namespaceID = newNamespaceID(); this.clusterID = clusterId; this.blockpoolID = newBlockPoolID(); this.cTime = 0L; this.setCheckpointTime(now()); for (Iterator<StorageDirectory> i...
void function(String clusterId) throws IOException { this.layoutVersion = FSConstants.LAYOUT_VERSION; this.namespaceID = newNamespaceID(); this.clusterID = clusterId; this.blockpoolID = newBlockPoolID(); this.cTime = 0L; this.setCheckpointTime(now()); for (Iterator<StorageDirectory> it = dirIterator(); it.hasNext();) {...
/** * Format all available storage directories. */
Format all available storage directories
format
{ "repo_name": "steveloughran/hadoop-hdfs", "path": "src/java/org/apache/hadoop/hdfs/server/namenode/NNStorage.java", "license": "apache-2.0", "size": 33563 }
[ "java.io.IOException", "java.util.Iterator", "org.apache.hadoop.hdfs.protocol.FSConstants" ]
import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.hdfs.protocol.FSConstants;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,113,620
private boolean checkTheming() { if (sThemingChecked) { return true; } Resources.Theme theme = getTheme(); Resources res = getResources(); TypedValue typedValue = new TypedValue(); int[] resIds = getStyleableAttributes("ContactPicker"); if (resI...
boolean function() { if (sThemingChecked) { return true; } Resources.Theme theme = getTheme(); Resources res = getResources(); TypedValue typedValue = new TypedValue(); int[] resIds = getStyleableAttributes(STR); if (resIds != null) { for (int resId : resIds) { String resName = res.getResourceEntryName(resId); boolean ...
/** * This method makes sure that all mandatory style attributes are defined for the current theme. */
This method makes sure that all mandatory style attributes are defined for the current theme
checkTheming
{ "repo_name": "1gravity/Android-ContactPicker", "path": "library/src/main/java/com/onegravity/contactpicker/core/ContactPickerActivity.java", "license": "apache-2.0", "size": 36955 }
[ "android.content.res.Resources", "android.util.TypedValue" ]
import android.content.res.Resources; import android.util.TypedValue;
import android.content.res.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
636,203
void setAward(Award award);
void setAward(Award award);
/** * Sets the Award. * * @param award the Award to set */
Sets the Award
setAward
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/award/notification/AwardNotificationRoleQualifierService.java", "license": "agpl-3.0", "size": 1391 }
[ "org.kuali.kra.award.home.Award" ]
import org.kuali.kra.award.home.Award;
import org.kuali.kra.award.home.*;
[ "org.kuali.kra" ]
org.kuali.kra;
620,961
public static ObjectName getJawrConfigMgrObjectName() { return jawrContext.get().getJawrConfigMgrObjectName(); }
static ObjectName function() { return jawrContext.get().getJawrConfigMgrObjectName(); }
/** * Returns the mbean object name of the Jawr config manager * @return the mbean object name of the Jawr config manager */
Returns the mbean object name of the Jawr config manager
getJawrConfigMgrObjectName
{ "repo_name": "diorcety/jawr", "path": "jawr-core/src/main/java/net/jawr/web/context/ThreadLocalJawrContext.java", "license": "apache-2.0", "size": 3974 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
996,537
protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Constraint_name_feature"), getString("_UI_PropertyDescriptor_descripti...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), MetawebdesignPackage.Literals.CONSTRAINT__NAME, true, false, false, ItemPropertyDescriptor.GENERI...
/** * This adds a property descriptor for the Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Name feature.
addNamePropertyDescriptor
{ "repo_name": "MetaWebDesign/Editor", "path": "Editor_MWD.edit/src/Metawebdesign/metawebdesign/provider/ConstraintItemProvider.java", "license": "agpl-3.0", "size": 8485 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,158,600
public static void emitStoreThread(Assembler asm, GPR base, Offset offset) { asm.emitMOV_RegDisp_Reg(base, offset, THREAD_REGISTER); }
static void function(Assembler asm, GPR base, Offset offset) { asm.emitMOV_RegDisp_Reg(base, offset, THREAD_REGISTER); }
/** * Emit an instruction sequence to store a pointer to the current RVMThread * object at a location defined by [base]+offset * * @param asm assembler object * @param base number of base register * @param offset offset */
Emit an instruction sequence to store a pointer to the current RVMThread object at a location defined by [base]+offset
emitStoreThread
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/ia32/ThreadLocalState.java", "license": "epl-1.0", "size": 6078 }
[ "org.jikesrvm.compilers.common.assembler.ia32.Assembler", "org.vmmagic.unboxed.Offset" ]
import org.jikesrvm.compilers.common.assembler.ia32.Assembler; import org.vmmagic.unboxed.Offset;
import org.jikesrvm.compilers.common.assembler.ia32.*; import org.vmmagic.unboxed.*;
[ "org.jikesrvm.compilers", "org.vmmagic.unboxed" ]
org.jikesrvm.compilers; org.vmmagic.unboxed;
1,930,942
public static <T> StateTag<Object, BagState<T>> bag(String id, Coder<T> elemCoder) { return new BagStateTag<T>(new StructuredId(id), elemCoder); }
static <T> StateTag<Object, BagState<T>> function(String id, Coder<T> elemCoder) { return new BagStateTag<T>(new StructuredId(id), elemCoder); }
/** * Create a state tag that is optimized for adding values frequently, and * occasionally retrieving all the values that have been added. */
Create a state tag that is optimized for adding values frequently, and occasionally retrieving all the values that have been added
bag
{ "repo_name": "tweise/beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/util/state/StateTags.java", "license": "apache-2.0", "size": 19171 }
[ "org.apache.beam.sdk.coders.Coder" ]
import org.apache.beam.sdk.coders.Coder;
import org.apache.beam.sdk.coders.*;
[ "org.apache.beam" ]
org.apache.beam;
2,611,159
public Aggregations consumeAggs() { if (aggregations == null) { throw new IllegalStateException("aggs already consumed"); } Aggregations aggs = aggregations; aggregations = null; return aggs; }
Aggregations function() { if (aggregations == null) { throw new IllegalStateException(STR); } Aggregations aggs = aggregations; aggregations = null; return aggs; }
/** * Returns and nulls out the aggregation for this search results. This allows to free up memory once the aggregation is consumed. * @throws IllegalStateException if the aggregations have already been consumed. */
Returns and nulls out the aggregation for this search results. This allows to free up memory once the aggregation is consumed
consumeAggs
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/search/query/QuerySearchResult.java", "license": "apache-2.0", "size": 11978 }
[ "org.elasticsearch.search.aggregations.Aggregations" ]
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
1,022,091
public void setValidationErrors(List<String> validationErrors) { this.validationErrors = validationErrors; }
void function(List<String> validationErrors) { this.validationErrors = validationErrors; }
/** * Set the list with validation errors. * @param validationErrors Validation errors. */
Set the list with validation errors
setValidationErrors
{ "repo_name": "lime-company/lime-security-powerauth-webauth", "path": "powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/entity/DataAdapterError.java", "license": "apache-2.0", "size": 2957 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,629,843
public static void walk(RTreeNode node, final Consumer<? super RTreeNode> action) { while (node != null) { action.accept(node); walk(node.firstChild, action); node = node.sibling; } }
static void function(RTreeNode node, final Consumer<? super RTreeNode> action) { while (node != null) { action.accept(node); walk(node.firstChild, action); node = node.sibling; } }
/** * Executes the given action on the given node, all its children and all its siblings. * * @param node the node on which to execute the action, or {@code null} if none. * @param action the action to execute. */
Executes the given action on the given node, all its children and all its siblings
walk
{ "repo_name": "apache/sis", "path": "core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/RTreeNode.java", "license": "apache-2.0", "size": 14928 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,316,858
public synchronized void handleIncomingMessage(String incomingMessage) { APIMessage Message = new APIMessage(incomingMessage); logger.debug("handleIncomingMessage(): Message recieved: {} - {}",incomingMessage,Message.toString()); DSCAlarmEvent event = new DSCAlarmEvent(this); event.dscAlarmEventMessage(Me...
synchronized void function(String incomingMessage) { APIMessage Message = new APIMessage(incomingMessage); logger.debug(STR,incomingMessage,Message.toString()); DSCAlarmEvent event = new DSCAlarmEvent(this); event.dscAlarmEventMessage(Message); try { Iterator<DSCAlarmEventListener> iterator = _listeners.iterator(); whi...
/** * Handles an incoming message * * @param incomingMessage */
Handles an incoming message
handleIncomingMessage
{ "repo_name": "Greblys/openhab", "path": "bundles/binding/org.openhab.binding.dscalarm/src/main/java/org/openhab/binding/dscalarm/internal/connector/TCPConnector.java", "license": "epl-1.0", "size": 6495 }
[ "java.util.Iterator", "org.openhab.binding.dscalarm.internal.DSCAlarmEvent", "org.openhab.binding.dscalarm.internal.DSCAlarmEventListener", "org.openhab.binding.dscalarm.internal.protocol.APIMessage" ]
import java.util.Iterator; import org.openhab.binding.dscalarm.internal.DSCAlarmEvent; import org.openhab.binding.dscalarm.internal.DSCAlarmEventListener; import org.openhab.binding.dscalarm.internal.protocol.APIMessage;
import java.util.*; import org.openhab.binding.dscalarm.internal.*; import org.openhab.binding.dscalarm.internal.protocol.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
2,792,542
public CacheMetrics metrics(ClusterGroup grp);
CacheMetrics function(ClusterGroup grp);
/** * Gets cluster group snapshot metrics for caches in cluster group. * * @param grp Cluster group. * @return Cache metrics. */
Gets cluster group snapshot metrics for caches in cluster group
metrics
{ "repo_name": "a1vanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/IgniteCache.java", "license": "apache-2.0", "size": 67638 }
[ "org.apache.ignite.cache.CacheMetrics", "org.apache.ignite.cluster.ClusterGroup" ]
import org.apache.ignite.cache.CacheMetrics; import org.apache.ignite.cluster.ClusterGroup;
import org.apache.ignite.cache.*; import org.apache.ignite.cluster.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,598,456
boolean hasInitialVersion(Instance target);
boolean hasInitialVersion(Instance target);
/** * Checks, if the current version of specific instance is equals to the initial version. * * @param target * the instance which version will be checked * @return <code>true</code> if the target version is equals to the initial version, <code>false</code> otherwise */
Checks, if the current version of specific instance is equals to the initial version
hasInitialVersion
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/domain-model/instance-api/src/main/java/com/sirma/itt/seip/instance/version/InstanceVersionService.java", "license": "lgpl-3.0", "size": 8532 }
[ "com.sirma.itt.seip.domain.instance.Instance" ]
import com.sirma.itt.seip.domain.instance.Instance;
import com.sirma.itt.seip.domain.instance.*;
[ "com.sirma.itt" ]
com.sirma.itt;
1,620,590
void updateInstallation(Installation installation);
void updateInstallation(Installation installation);
/** * Performs an update/merge on the given entity. * * @param installation the installation */
Performs an update/merge on the given entity
updateInstallation
{ "repo_name": "edewit/aerogear-unifiedpush-server", "path": "service/src/main/java/org/jboss/aerogear/unifiedpush/service/ClientInstallationService.java", "license": "apache-2.0", "size": 5766 }
[ "org.jboss.aerogear.unifiedpush.api.Installation" ]
import org.jboss.aerogear.unifiedpush.api.Installation;
import org.jboss.aerogear.unifiedpush.api.*;
[ "org.jboss.aerogear" ]
org.jboss.aerogear;
2,768,329
@Override public void writeElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException { super.writeElementsToXml(writer); writer.writeStartElement(XmlNamespace.Types, XmlElementNames.FieldURIOrConstant); if (this.value != null) { ...
void function(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException { super.writeElementsToXml(writer); writer.writeStartElement(XmlNamespace.Types, XmlElementNames.FieldURIOrConstant); if (this.value != null) { writer.writeStartElement(XmlNamespace.Types, XmlElementNames.Constant); wr...
/** * Writes the elements to XML. * * @param writer the writer * @throws javax.xml.stream.XMLStreamException , ServiceXmlSerializationException * @throws ServiceXmlSerializationException the service xml serialization exception */
Writes the elements to XML
writeElementsToXml
{ "repo_name": "relateiq/ews-java-api", "path": "src/main/java/microsoft/exchange/webservices/data/search/filter/SearchFilter.java", "license": "mit", "size": 45219 }
[ "javax.xml.stream.XMLStreamException" ]
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.*;
[ "javax.xml" ]
javax.xml;
1,865,326
private boolean isServiceProviderExist(String serviceProviderName, String tenantDomain) { ServiceProvider serviceProvider = null; try { serviceProvider = getServiceProvider(serviceProviderName, tenantDomain); } catch (DCRMException e) { log.error( ...
boolean function(String serviceProviderName, String tenantDomain) { ServiceProvider serviceProvider = null; try { serviceProvider = getServiceProvider(serviceProviderName, tenantDomain); } catch (DCRMException e) { log.error( STR + serviceProviderName + STR + tenantDomain); } return serviceProvider != null; }
/** * Check whether servers provider exist with a given name in the tenant. * * @param serviceProviderName * @param tenantDomain * @return */
Check whether servers provider exist with a given name in the tenant
isServiceProviderExist
{ "repo_name": "IsuraD/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMService.java", "license": "apache-2.0", "size": 31159 }
[ "org.wso2.carbon.identity.application.common.model.ServiceProvider", "org.wso2.carbon.identity.oauth.dcr.exception.DCRMException" ]
import org.wso2.carbon.identity.application.common.model.ServiceProvider; import org.wso2.carbon.identity.oauth.dcr.exception.DCRMException;
import org.wso2.carbon.identity.application.common.model.*; import org.wso2.carbon.identity.oauth.dcr.exception.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,323,437
@Test public void testNodeNotReady() throws Exception { final long producerId = 123456L; time = new MockTime(10); client = new MockClient(time, metadata); TransactionManager transactionManager = new TransactionManager(new LogContext(), "testNodeNotReady", 60000, ...
void function() throws Exception { final long producerId = 123456L; time = new MockTime(10); client = new MockClient(time, metadata); TransactionManager transactionManager = new TransactionManager(new LogContext(), STR, 60000, 100L, new ApiVersions(), false); setupWithTransactionState(transactionManager, false, null, t...
/** * Tests the code path where the target node to send FindCoordinator or InitProducerId * is not ready. */
Tests the code path where the target node to send FindCoordinator or InitProducerId is not ready
testNodeNotReady
{ "repo_name": "Chasego/kafka", "path": "clients/src/test/java/org/apache/kafka/clients/producer/internals/SenderTest.java", "license": "apache-2.0", "size": 151111 }
[ "org.apache.kafka.clients.ApiVersions", "org.apache.kafka.clients.MockClient", "org.apache.kafka.common.Node", "org.apache.kafka.common.protocol.Errors", "org.apache.kafka.common.requests.FindCoordinatorRequest", "org.apache.kafka.common.utils.LogContext", "org.apache.kafka.common.utils.MockTime", "or...
import org.apache.kafka.clients.ApiVersions; import org.apache.kafka.clients.MockClient; import org.apache.kafka.common.Node; import org.apache.kafka.common.protocol.Errors; import org.apache.kafka.common.requests.FindCoordinatorRequest; import org.apache.kafka.common.utils.LogContext; import org.apache.kafka.common.ut...
import org.apache.kafka.clients.*; import org.apache.kafka.common.*; import org.apache.kafka.common.protocol.*; import org.apache.kafka.common.requests.*; import org.apache.kafka.common.utils.*; import org.junit.jupiter.api.*;
[ "org.apache.kafka", "org.junit.jupiter" ]
org.apache.kafka; org.junit.jupiter;
1,840,600
public final String getJavaArgs() { return Utils4J.replaceVars(javaArgs, cmdLineOptions); }
final String function() { return Utils4J.replaceVars(javaArgs, cmdLineOptions); }
/** * Returns the command line arguments. * * @return Arguments for the Java executable. */
Returns the command line arguments
getJavaArgs
{ "repo_name": "fuinorg/kickstart4j", "path": "src/main/java/org/fuin/kickstart4j/Config.java", "license": "lgpl-3.0", "size": 37144 }
[ "org.fuin.utils4j.Utils4J" ]
import org.fuin.utils4j.Utils4J;
import org.fuin.utils4j.*;
[ "org.fuin.utils4j" ]
org.fuin.utils4j;
827,171
public final GameObject[] createAllObjects(final ModelManager modelManager, final Class callee) throws IOException { String models = config.getString("all_models"); if (models == null || models.equals("")) { return new GameObject[0]; } String[] modelList = models.split(",...
final GameObject[] function(final ModelManager modelManager, final Class callee) throws IOException { String models = config.getString(STR); if (models == null models.equals(STR,"); GameObject[] result = new GameObject[modelList.length]; for (int i = 0; i < modelList.length; i++) { result[i] = createObjectByName(modelL...
/** * Create all models specified in the all_models tag in the config. * @param modelManager The model manager to use for loading the graphics. * @param callee The callee to determine the search location for the model. * @return An array containing all game objects. * @throws IOException *...
Create all models specified in the all_models tag in the config
createAllObjects
{ "repo_name": "PenguinMenaceTechnologies/PenguinMenaceEngine", "path": "src/main/java/net/pme/core/config/EnvironmentConfiguration.java", "license": "gpl-2.0", "size": 5098 }
[ "java.io.IOException", "net.pme.core.GameObject", "net.pme.model.ModelManager" ]
import java.io.IOException; import net.pme.core.GameObject; import net.pme.model.ModelManager;
import java.io.*; import net.pme.core.*; import net.pme.model.*;
[ "java.io", "net.pme.core", "net.pme.model" ]
java.io; net.pme.core; net.pme.model;
915,065
private static List<OperationExecutionRecord> createSplitSessionExecutionTrace() { final List<OperationExecutionRecord> records = new ArrayList<>(); long time = 0; final long traceId = 0; records.add(SessionReconstructionFilterTest.createOperationExecutionRecord(OPERATION_SIGNATURE, SESSION_ID_1, traceId, t...
static List<OperationExecutionRecord> function() { final List<OperationExecutionRecord> records = new ArrayList<>(); long time = 0; final long traceId = 0; records.add(SessionReconstructionFilterTest.createOperationExecutionRecord(OPERATION_SIGNATURE, SESSION_ID_1, traceId, time++, time++, 0, 0)); time += (MAX_THINK_TI...
/** * Returns a list with two {@link OperationExecutionRecord}s, having different trace identifiers * but equal session identifiers. The time distance between the two traces is large in order * to have them in the separate sessions. */
Returns a list with two <code>OperationExecutionRecord</code>s, having different trace identifiers but equal session identifiers. The time distance between the two traces is large in order to have them in the separate sessions
createSplitSessionExecutionTrace
{ "repo_name": "kieker-monitoring/kieker", "path": "kieker-tools/test/kieker/test/tools/junit/trace/analysis/filter/sessionReconstruction/SessionReconstructionFilterTest.java", "license": "apache-2.0", "size": 7572 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
569,724
void setController(Object object, GraphicsController controller);
void setController(Object object, GraphicsController controller);
/** * Set the controller on an element of this <code>GraphicsContext</code> so it can react to events. * * @param object * the element on which the controller should be set. * @param controller * The new <code>GraphicsController</code> */
Set the controller on an element of this <code>GraphicsContext</code> so it can react to events
setController
{ "repo_name": "geomajas/geomajas-project-client-gwt", "path": "client/src/main/java/org/geomajas/gwt/client/gfx/GraphicsContext.java", "license": "agpl-3.0", "size": 15079 }
[ "org.geomajas.gwt.client.controller.GraphicsController" ]
import org.geomajas.gwt.client.controller.GraphicsController;
import org.geomajas.gwt.client.controller.*;
[ "org.geomajas.gwt" ]
org.geomajas.gwt;
2,499,222
void tryExpireAfterRead(Node<K, V> node, @Nullable K key, @Nullable V value, Expiry<K, V> expiry, long now) { if (!expiresVariable() || (key == null) || (value == null)) { return; } long variableTime = node.getVariableTime(); long currentDuration = Math.max(1, variableTime - now); if ...
void tryExpireAfterRead(Node<K, V> node, @Nullable K key, @Nullable V value, Expiry<K, V> expiry, long now) { if (!expiresVariable() (key == null) (value == null)) { return; } long variableTime = node.getVariableTime(); long currentDuration = Math.max(1, variableTime - now); if (isAsync && (currentDuration > MAXIMUM_EX...
/** * Attempts to update the access time for the entry after a read. * * @param node the entry in the page replacement policy * @param key the key of the entry that was read * @param value the value of the entry that was read * @param expiry the calculator for the expiration time * @param now the c...
Attempts to update the access time for the entry after a read
tryExpireAfterRead
{ "repo_name": "ben-manes/caffeine", "path": "caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java", "license": "apache-2.0", "size": 148971 }
[ "org.checkerframework.checker.nullness.qual.Nullable" ]
import org.checkerframework.checker.nullness.qual.Nullable;
import org.checkerframework.checker.nullness.qual.*;
[ "org.checkerframework.checker" ]
org.checkerframework.checker;
2,473,552