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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Map<String, ? extends FeatureMetadatum> getMetadata(); | Map<String, ? extends FeatureMetadatum> getMetadata(); | /**
* Return the list of associated metadata, like age of onset or pace of progression.
*
* @return an unmodifiable map with the {@link FeatureMetadatum#getType() metadatum type} as the key and the actual
* {@link FeatureMetadatum metadatum} as the value, or an empty map if no metadata is re... | Return the list of associated metadata, like age of onset or pace of progression | getMetadata | {
"repo_name": "veronikaslc/phenotips",
"path": "components/patient-data/api/src/main/java/org/phenotips/data/Feature.java",
"license": "agpl-3.0",
"size": 3271
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,045,541 |
void startGlobalSearch(String initialQuery, boolean selectInitialQuery,
Bundle appSearchData, Rect sourceBounds) {
ComponentName globalSearchActivity = getGlobalSearchActivity();
if (globalSearchActivity == null) {
Log.w(TAG, "No global search activity found.");
... | void startGlobalSearch(String initialQuery, boolean selectInitialQuery, Bundle appSearchData, Rect sourceBounds) { ComponentName globalSearchActivity = getGlobalSearchActivity(); if (globalSearchActivity == null) { Log.w(TAG, STR); return; } Intent intent = new Intent(INTENT_ACTION_GLOBAL_SEARCH); intent.addFlags(Inten... | /**
* Starts the global search activity.
*/ | Starts the global search activity | startGlobalSearch | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/base/core/java/android/app/SearchManager.java",
"license": "gpl-2.0",
"size": 36646
} | [
"android.content.ActivityNotFoundException",
"android.content.ComponentName",
"android.content.Intent",
"android.graphics.Rect",
"android.os.Bundle",
"android.text.TextUtils",
"android.util.Log"
] | import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.text.TextUtils; import android.util.Log; | import android.content.*; import android.graphics.*; import android.os.*; import android.text.*; import android.util.*; | [
"android.content",
"android.graphics",
"android.os",
"android.text",
"android.util"
] | android.content; android.graphics; android.os; android.text; android.util; | 2,353,819 |
@Override
@Generated(value = "com.sun.tools.xjc.Driver", date = "2014-09-19T03:10:02-06:00", comment = "JAXB RI v2.2.6")
public String toString() {
return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE);
} | @Generated(value = STR, date = STR, comment = STR) String function() { return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.MULTI_LINE_STYLE); } | /**
* Generates a String representation of the contents of this type.
* This is an extension method, produced by the 'ts' xjc plugin
*
*/ | Generates a String representation of the contents of this type. This is an extension method, produced by the 'ts' xjc plugin | toString | {
"repo_name": "angecab10/travelport-uapi-tutorial",
"path": "src/com/travelport/schema/air_v29_0/FlightType.java",
"license": "gpl-3.0",
"size": 14379
} | [
"javax.annotation.Generated",
"org.apache.commons.lang.builder.ToStringBuilder",
"org.apache.cxf.xjc.runtime.JAXBToStringStyle"
] | import javax.annotation.Generated; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.cxf.xjc.runtime.JAXBToStringStyle; | import javax.annotation.*; import org.apache.commons.lang.builder.*; import org.apache.cxf.xjc.runtime.*; | [
"javax.annotation",
"org.apache.commons",
"org.apache.cxf"
] | javax.annotation; org.apache.commons; org.apache.cxf; | 1,992,137 |
@Nullable protected <K, V> V peek(IgniteCache<K, V> cache, K key) {
return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP, CachePeekMode.OFFHEAP) :
cache.localPeek(key, CachePeekMode.ONHEAP);
} | @Nullable <K, V> V function(IgniteCache<K, V> cache, K key) { return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP, CachePeekMode.OFFHEAP) : cache.localPeek(key, CachePeekMode.ONHEAP); } | /**
* Executes regular peek or peek from swap.
*
* @param cache Cache projection.
* @param key Key.
* @return Value.
*/ | Executes regular peek or peek from swap | peek | {
"repo_name": "f7753/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java",
"license": "apache-2.0",
"size": 17457
} | [
"org.apache.ignite.IgniteCache",
"org.apache.ignite.cache.CachePeekMode",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.CachePeekMode; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.*; import org.apache.ignite.cache.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 2,573,411 |
public ContainerProgram getBuilderProgram()
{
return _program;
} | ContainerProgram function() { return _program; } | /**
* Returns the program.
*/ | Returns the program | getBuilderProgram | {
"repo_name": "mdaniel/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/server/dispatch/ServletRegexp.java",
"license": "gpl-2.0",
"size": 4831
} | [
"com.caucho.config.program.ContainerProgram"
] | import com.caucho.config.program.ContainerProgram; | import com.caucho.config.program.*; | [
"com.caucho.config"
] | com.caucho.config; | 1,180,382 |
private static String[] getFileExtensions(final Decoder decoder)
{
final Class<? extends Decoder> decoderClass = decoder.getClass();
final FileExtensions fileExtensionsAnnotation = decoderClass.getAnnotation(FileExtensions.class);
return (fileExtensionsAnnotation == null)
? ... | static String[] function(final Decoder decoder) { final Class<? extends Decoder> decoderClass = decoder.getClass(); final FileExtensions fileExtensionsAnnotation = decoderClass.getAnnotation(FileExtensions.class); return (fileExtensionsAnnotation == null) ? new String[]{""} : fileExtensionsAnnotation.value(); } | /**
* Retrieves the file extensions to use with the specified decoder.
* <p>
* If the specified Decoder doesn't have any file extensions explicitly associated with it, then a single empty string is returned.
*/ | Retrieves the file extensions to use with the specified decoder. If the specified Decoder doesn't have any file extensions explicitly associated with it, then a single empty string is returned | getFileExtensions | {
"repo_name": "CAFapi/caf-common",
"path": "config-file/src/main/java/com/hpe/caf/config/file/FileConfigurationSource.java",
"license": "apache-2.0",
"size": 8913
} | [
"com.hpe.caf.api.Decoder",
"com.hpe.caf.api.FileExtensions"
] | import com.hpe.caf.api.Decoder; import com.hpe.caf.api.FileExtensions; | import com.hpe.caf.api.*; | [
"com.hpe.caf"
] | com.hpe.caf; | 2,894,279 |
Collection<ScriptObject> getScripts()
{
if (scripts == null) return null;
return scripts.values();
}
| Collection<ScriptObject> getScripts() { if (scripts == null) return null; return scripts.values(); } | /**
* Returns the collection of scripts.
*
* @return See above.
*/ | Returns the collection of scripts | getScripts | {
"repo_name": "dpwrussell/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorModel.java",
"license": "gpl-2.0",
"size": 130987
} | [
"java.util.Collection",
"org.openmicroscopy.shoola.env.data.model.ScriptObject"
] | import java.util.Collection; import org.openmicroscopy.shoola.env.data.model.ScriptObject; | import java.util.*; import org.openmicroscopy.shoola.env.data.model.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,735,785 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<StorageAccountListKeysResultInner> listKeysWithResponse(
String resourceGroupName, String accountName, ListKeyExpand expand, Context context) {
return listKeysWithResponseAsync(resourceGroupName, accountName, expand, context).block();
... | @ServiceMethod(returns = ReturnType.SINGLE) Response<StorageAccountListKeysResultInner> function( String resourceGroupName, String accountName, ListKeyExpand expand, Context context) { return listKeysWithResponseAsync(resourceGroupName, accountName, expand, context).block(); } | /**
* Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.
*
* @param resourceGroupName The name of the resource group within the user's subscription. The name is case
* insensitive.
* @param accountName The name of the storage account with... | Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account | listKeysWithResponse | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/StorageAccountsClientImpl.java",
"license": "mit",
"size": 168198
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.storage.fluent.models.StorageAccountListKeysResultInner",
"com.azure.resourcemanager.storage.models.ListKeyExpand"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.storage.fluent.models.StorageAccountListKeysResultInner; import com.azure.resourcemanager.storage.models.ListKeyExpa... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*; import com.azure.resourcemanager.storage.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,805,429 |
public void testAbstractClassAsRenderer() throws Exception {
// 1. Renderers which extend Renderer interface
DefDescriptor<RendererDef> descriptor = DefDescriptorImpl.getInstance(
"java://org.auraframework.impl.renderer.sampleJavaRenderers.TestAbstractRenderer", RendererDef.class);
... | void function() throws Exception { DefDescriptor<RendererDef> descriptor = DefDescriptorImpl.getInstance( STRJavaRenderers that extend Renderer interface cannot be abstract.STRCannot instantiate org.auraframework.impl.renderer.sampleJavaRenderers.TestAbstractRendererSTRorg.auraframework.impl.renderer.sampleJavaRenderer... | /**
* Verify that specifying an absrtact java class as renderer throws an Exception.
*
* @throws Exception
*/ | Verify that specifying an absrtact java class as renderer throws an Exception | testAbstractClassAsRenderer | {
"repo_name": "lhong375/aura",
"path": "aura-impl/src/test/java/org/auraframework/impl/renderer/JavaRendererDefFactoryTest.java",
"license": "apache-2.0",
"size": 6740
} | [
"org.auraframework.def.DefDescriptor",
"org.auraframework.def.Renderer",
"org.auraframework.def.RendererDef",
"org.auraframework.impl.system.DefDescriptorImpl"
] | import org.auraframework.def.DefDescriptor; import org.auraframework.def.Renderer; import org.auraframework.def.RendererDef; import org.auraframework.impl.system.DefDescriptorImpl; | import org.auraframework.def.*; import org.auraframework.impl.system.*; | [
"org.auraframework.def",
"org.auraframework.impl"
] | org.auraframework.def; org.auraframework.impl; | 1,262,795 |
public int countByUserIdGroupId(long userId, long groupId)
throws SystemException {
Object[] finderArgs = new Object[] { userId, groupId };
Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERIDGROUPID,
finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler... | int function(long userId, long groupId) throws SystemException { Object[] finderArgs = new Object[] { userId, groupId }; Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERIDGROUPID, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3); query.append(_SQL_COUNT_MODULE_WHE... | /**
* Returns the number of modules where userId = ? and groupId = ?.
*
* @param userId the user ID
* @param groupId the group ID
* @return the number of matching modules
* @throws SystemException if a system exception occurred
*/ | Returns the number of modules where userId = ? and groupId = ? | countByUserIdGroupId | {
"repo_name": "TelefonicaED/liferaylms-portlet",
"path": "docroot/WEB-INF/src/com/liferay/lms/service/persistence/ModulePersistenceImpl.java",
"license": "agpl-3.0",
"size": 125928
} | [
"com.liferay.portal.kernel.dao.orm.FinderCacheUtil",
"com.liferay.portal.kernel.dao.orm.Query",
"com.liferay.portal.kernel.dao.orm.QueryPos",
"com.liferay.portal.kernel.dao.orm.Session",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.kernel.util.StringBundler"
] | import com.liferay.portal.kernel.dao.orm.FinderCacheUtil; import com.liferay.portal.kernel.dao.orm.Query; import com.liferay.portal.kernel.dao.orm.QueryPos; import com.liferay.portal.kernel.dao.orm.Session; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.StringBundler; | import com.liferay.portal.kernel.dao.orm.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 2,212,340 |
return (new GsonBuilder()).serializeNulls().setPrettyPrinting().excludeFieldsWithoutExposeAnnotation().create();
} | return (new GsonBuilder()).serializeNulls().setPrettyPrinting().excludeFieldsWithoutExposeAnnotation().create(); } | /**
* Retrieve an instance of {@link Gson} which has some standard configurations
* @return An instance of {@link Gson}
*/ | Retrieve an instance of <code>Gson</code> which has some standard configurations | getGson | {
"repo_name": "InfoSec812/JettyJerseyWeldExample",
"path": "src/main/java/com/zanclus/example/entities/AbstractDocument.java",
"license": "apache-2.0",
"size": 1035
} | [
"com.google.gson.GsonBuilder"
] | import com.google.gson.GsonBuilder; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,741,538 |
public static void main(final String[] args) {
final DrawStringDemo demo = new DrawStringDemo("DrawString Demo");
demo.pack();
RefineryUtilities.centerFrameOnScreen(demo);
demo.setVisible(true);
} | static void function(final String[] args) { final DrawStringDemo demo = new DrawStringDemo(STR); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); } | /**
* The starting point for the demo.
*
* @param args ignored.
*/ | The starting point for the demo | main | {
"repo_name": "apetresc/JCommon",
"path": "src/main/java/org/jfree/demo/DrawStringDemo.java",
"license": "lgpl-2.1",
"size": 11761
} | [
"org.jfree.ui.RefineryUtilities"
] | import org.jfree.ui.RefineryUtilities; | import org.jfree.ui.*; | [
"org.jfree.ui"
] | org.jfree.ui; | 2,128,530 |
private PGPEncryptedDataList getPGPEncryptedDataList(InputStream inputStream) throws IOException {
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
Security.addProvider(new BouncyCastleProvider());
}
inputStream = PGPUtil.getDecoderStream(inputStream);
JcaPGPObjectFactor... | PGPEncryptedDataList function(InputStream inputStream) throws IOException { if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { Security.addProvider(new BouncyCastleProvider()); } inputStream = PGPUtil.getDecoderStream(inputStream); JcaPGPObjectFactory pgpF = new JcaPGPObjectFactory(inputStream); PG... | /**
* Generate a PGPEncryptedDataList from an inputstream
* @param inputStream file inputstream that needs to be decrypted
* @throws IOException
*/ | Generate a PGPEncryptedDataList from an inputstream | getPGPEncryptedDataList | {
"repo_name": "jinhyukchang/gobblin",
"path": "gobblin-modules/gobblin-crypto/src/main/java/org/apache/gobblin/crypto/GPGFileDecryptor.java",
"license": "apache-2.0",
"size": 7843
} | [
"java.io.IOException",
"java.io.InputStream",
"java.security.Security",
"org.bouncycastle.jce.provider.BouncyCastleProvider",
"org.bouncycastle.openpgp.PGPEncryptedDataList",
"org.bouncycastle.openpgp.PGPUtil",
"org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory"
] | import java.io.IOException; import java.io.InputStream; import java.security.Security; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.openpgp.PGPEncryptedDataList; import org.bouncycastle.openpgp.PGPUtil; import org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory; | import java.io.*; import java.security.*; import org.bouncycastle.jce.provider.*; import org.bouncycastle.openpgp.*; import org.bouncycastle.openpgp.jcajce.*; | [
"java.io",
"java.security",
"org.bouncycastle.jce",
"org.bouncycastle.openpgp"
] | java.io; java.security; org.bouncycastle.jce; org.bouncycastle.openpgp; | 865,220 |
@Test
public void testSerialization() {
XYBlockRenderer r1 = new XYBlockRenderer();
XYBlockRenderer r2 = (XYBlockRenderer) TestUtilities.serialised(r1);
assertEquals(r1, r2);
} | void function() { XYBlockRenderer r1 = new XYBlockRenderer(); XYBlockRenderer r2 = (XYBlockRenderer) TestUtilities.serialised(r1); assertEquals(r1, r2); } | /**
* Serialize an instance, restore it, and check for equality.
*/ | Serialize an instance, restore it, and check for equality | testSerialization | {
"repo_name": "simon04/jfreechart",
"path": "src/test/java/org/jfree/chart/renderer/xy/XYBlockRendererTest.java",
"license": "lgpl-2.1",
"size": 6911
} | [
"org.jfree.chart.TestUtilities",
"org.junit.Assert"
] | import org.jfree.chart.TestUtilities; import org.junit.Assert; | import org.jfree.chart.*; import org.junit.*; | [
"org.jfree.chart",
"org.junit"
] | org.jfree.chart; org.junit; | 1,589,134 |
public static EditInGoogleDocsPage signInGoogleDocs(WebDrone driver, GoogleDocsAuthorisation googleAuth) throws InterruptedException
{
int i = 0;
GoogleSignUpPage signUpPage = googleAuth.submitAuth().render();
signUpPage.signUp(googleUserName, googlePassword);
if (isGoogleDo... | static EditInGoogleDocsPage function(WebDrone driver, GoogleDocsAuthorisation googleAuth) throws InterruptedException { int i = 0; GoogleSignUpPage signUpPage = googleAuth.submitAuth().render(); signUpPage.signUp(googleUserName, googlePassword); if (isGoogleDocsV3) { switchToGoogleWindow(driver); } while (!(driver.getC... | /**
* This method provides the sign in page to log into google docs.
*
* @param googleAuth GoogleDocsAuthorisation
* @return EditInGoogleDocsPage
*/ | This method provides the sign in page to log into google docs | signInGoogleDocs | {
"repo_name": "daniel-he/community-edition",
"path": "projects/qa-share/src/main/java/org/alfresco/share/util/ShareUserGoogleDocs.java",
"license": "lgpl-3.0",
"size": 16122
} | [
"org.alfresco.po.share.FactorySharePage",
"org.alfresco.po.share.site.document.EditInGoogleDocsPage",
"org.alfresco.po.share.site.document.GoogleDocsAuthorisation",
"org.alfresco.po.share.site.document.GoogleSignUpPage",
"org.alfresco.webdrone.WebDrone"
] | import org.alfresco.po.share.FactorySharePage; import org.alfresco.po.share.site.document.EditInGoogleDocsPage; import org.alfresco.po.share.site.document.GoogleDocsAuthorisation; import org.alfresco.po.share.site.document.GoogleSignUpPage; import org.alfresco.webdrone.WebDrone; | import org.alfresco.po.share.*; import org.alfresco.po.share.site.document.*; import org.alfresco.webdrone.*; | [
"org.alfresco.po",
"org.alfresco.webdrone"
] | org.alfresco.po; org.alfresco.webdrone; | 270,676 |
public Object getObjectInstance(Object refObj, Name name,
Context context, Hashtable env)
throws IOException, ClassNotFoundException {
// The spec says to return null if we can't create an instance
// of the reference
Object obj = null;
if ... | Object function(Object refObj, Name name, Context context, Hashtable env) throws IOException, ClassNotFoundException { Object obj = null; if (refObj instanceof Reference) { Reference ref = (Reference) refObj; if (isCorrectClass(ref.getClassName())) { RefAddr ra = ref.get(STR); if (ra != null && ra.getContent() != null)... | /**
* implements ObjectFactory to create an instance of SharedPoolDataSource
* or PerUserPoolDataSource
*/ | implements ObjectFactory to create an instance of SharedPoolDataSource or PerUserPoolDataSource | getObjectInstance | {
"repo_name": "xiaolds/tomcat7",
"path": "tomcat-build-libs/tomcat7-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/datasources/InstanceKeyObjectFactory.java",
"license": "apache-2.0",
"size": 8600
} | [
"java.io.IOException",
"java.util.Hashtable",
"javax.naming.Context",
"javax.naming.Name",
"javax.naming.RefAddr",
"javax.naming.Reference"
] | import java.io.IOException; import java.util.Hashtable; import javax.naming.Context; import javax.naming.Name; import javax.naming.RefAddr; import javax.naming.Reference; | import java.io.*; import java.util.*; import javax.naming.*; | [
"java.io",
"java.util",
"javax.naming"
] | java.io; java.util; javax.naming; | 1,064,498 |
private List<RMNode> filterOut(List<RMNode> freeNodes, Criteria criteria, Client client) {
NodeSet exclusion = criteria.getBlackList();
Set<String> inclusion = criteria.getAcceptableNodesUrls();
boolean nodeWithTokenRequested = criteria.getNodeAccessToken() != null &&
... | List<RMNode> function(List<RMNode> freeNodes, Criteria criteria, Client client) { NodeSet exclusion = criteria.getBlackList(); Set<String> inclusion = criteria.getAcceptableNodesUrls(); boolean nodeWithTokenRequested = criteria.getNodeAccessToken() != null && criteria.getNodeAccessToken().length() > 0; TokenPrincipal t... | /**
* Removes exclusion nodes and nodes not accessible for the client
*/ | Removes exclusion nodes and nodes not accessible for the client | filterOut | {
"repo_name": "laurianed/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/selection/SelectionManager.java",
"license": "agpl-3.0",
"size": 27373
} | [
"java.security.Permission",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"org.ow2.proactive.authentication.principals.TokenPrincipal",
"org.ow2.proactive.permissions.PrincipalPermission",
"org.ow2.proactive.resourcemanager.authentication.Client",
"org.ow2.proactive.... | import java.security.Permission; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.ow2.proactive.authentication.principals.TokenPrincipal; import org.ow2.proactive.permissions.PrincipalPermission; import org.ow2.proactive.resourcemanager.authentication.Client;... | import java.security.*; import java.util.*; import org.ow2.proactive.authentication.principals.*; import org.ow2.proactive.permissions.*; import org.ow2.proactive.resourcemanager.authentication.*; import org.ow2.proactive.resourcemanager.rmnode.*; import org.ow2.proactive.utils.*; | [
"java.security",
"java.util",
"org.ow2.proactive"
] | java.security; java.util; org.ow2.proactive; | 2,103,771 |
public long getValue(BytesWritable value) throws IOException {
DataInputStream dis = getValueStream();
int size = 0;
try {
int remain;
while ((remain = valueBufferInputStream.getRemain()) > 0) {
value.setSize(size + remain);
dis.r... | long function(BytesWritable value) throws IOException { DataInputStream dis = getValueStream(); int size = 0; try { int remain; while ((remain = valueBufferInputStream.getRemain()) > 0) { value.setSize(size + remain); dis.readFully(value.get(), size, remain); size += remain; } return value.getSize(); } finally { dis.cl... | /**
* Copy the value into BytesWritable. The input BytesWritable will be
* automatically resized to the actual value size. The implementation
* directly uses the buffer inside BytesWritable for storing the value.
* The call does not require the value length to be known.
*
... | Copy the value into BytesWritable. The input BytesWritable will be automatically resized to the actual value size. The implementation directly uses the buffer inside BytesWritable for storing the value. The call does not require the value length to be known | getValue | {
"repo_name": "koichi626/hadoop-gpu",
"path": "hadoop-gpu-0.20.1/src/core/org/apache/hadoop/io/file/tfile/TFile.java",
"license": "apache-2.0",
"size": 74043
} | [
"java.io.DataInputStream",
"java.io.IOException",
"org.apache.hadoop.io.BytesWritable"
] | import java.io.DataInputStream; import java.io.IOException; import org.apache.hadoop.io.BytesWritable; | import java.io.*; import org.apache.hadoop.io.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 179,442 |
public void splitFromConference(String callId) {
try {
mAdapter.splitFromConference(callId);
} catch (RemoteException ignored) {
}
} | void function(String callId) { try { mAdapter.splitFromConference(callId); } catch (RemoteException ignored) { } } | /**
* Instructs Telecom to split the specified call from any conference call with which it may be
* connected.
*
* @param callId The unique ID of the call.
* @hide
*/ | Instructs Telecom to split the specified call from any conference call with which it may be connected | splitFromConference | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "telecomm/java/android/telecom/InCallAdapter.java",
"license": "apache-2.0",
"size": 9224
} | [
"android.os.RemoteException"
] | import android.os.RemoteException; | import android.os.*; | [
"android.os"
] | android.os; | 1,941,281 |
public Object getSingleData(Class<?> type) {
// Ensure that the stream contains a single document and construct it
Node node = composer.getSingleNode();
if (node != null) {
if (Object.class != type) {
node.setTag(new Tag(type));
} else if (rootTag != n... | Object function(Class<?> type) { Node node = composer.getSingleNode(); if (node != null) { if (Object.class != type) { node.setTag(new Tag(type)); } else if (rootTag != null) { node.setTag(rootTag); } return constructDocument(node); } return null; } | /**
* Ensure that the stream contains a single document and construct it
*
* @return constructed instance
* @throws ComposerException
* in case there are more documents in the stream
*/ | Ensure that the stream contains a single document and construct it | getSingleData | {
"repo_name": "lsst-camera-dh/snakeyaml",
"path": "src/main/java/org/yaml/snakeyaml/constructor/BaseConstructor.java",
"license": "apache-2.0",
"size": 16906
} | [
"org.yaml.snakeyaml.nodes.Node",
"org.yaml.snakeyaml.nodes.Tag"
] | import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.nodes.Tag; | import org.yaml.snakeyaml.nodes.*; | [
"org.yaml.snakeyaml"
] | org.yaml.snakeyaml; | 1,304,108 |
public ListSetsType listSets() throws IOException, JAXBException, OAIException
{
String query = builder.buildListSetsQuery();
return unMarshal(query).getListSets();
} | ListSetsType function() throws IOException, JAXBException, OAIException { String query = builder.buildListSetsQuery(); return unMarshal(query).getListSets(); } | /**
* List all sets the OAI-PMH server has.
* @return a list of sets
* @throws JAXBException
* @throws OAIException
*/ | List all sets the OAI-PMH server has | listSets | {
"repo_name": "beeldengeluid/zieook",
"path": "backend/zieook-backend/zieook-inx/zieook-oaipmh/src/main/java/nl/gridline/zieook/Harvester.java",
"license": "apache-2.0",
"size": 13771
} | [
"java.io.IOException",
"javax.xml.bind.JAXBException",
"org.openarchives.oai._2.ListSetsType"
] | import java.io.IOException; import javax.xml.bind.JAXBException; import org.openarchives.oai._2.ListSetsType; | import java.io.*; import javax.xml.bind.*; import org.openarchives.oai.*; | [
"java.io",
"javax.xml",
"org.openarchives.oai"
] | java.io; javax.xml; org.openarchives.oai; | 1,785,983 |
public static void initScriptEngines(RexsterProperties properties) {
final List<EngineConfiguration> configuredScriptEngines = new ArrayList<>();
final List<HierarchicalConfiguration> configs = properties.getScriptEngines();
for (HierarchicalConfiguration config : configs) {
con... | static void function(RexsterProperties properties) { final List<EngineConfiguration> configuredScriptEngines = new ArrayList<>(); final List<HierarchicalConfiguration> configs = properties.getScriptEngines(); for (HierarchicalConfiguration config : configs) { configuredScriptEngines.add(new EngineConfiguration(config))... | /**
* When we don't start rexster as the standalone app, groovy (or other script engines) don't get initialized. Pass
* {@link com.tinkerpop.rexster.server.RexsterProperties} here to configure script engines in those properties.
*
* @param properties Rexster properties containing script engines to ... | When we don't start rexster as the standalone app, groovy (or other script engines) don't get initialized. Pass <code>com.tinkerpop.rexster.server.RexsterProperties</code> here to configure script engines in those properties | initScriptEngines | {
"repo_name": "b-long/ezbake-data-access",
"path": "ezgraph/rexster-server/src/test/java/ezbake/data/graph/rexster/RexsterTestUtils.java",
"license": "apache-2.0",
"size": 8578
} | [
"com.tinkerpop.rexster.protocol.EngineConfiguration",
"com.tinkerpop.rexster.protocol.EngineController",
"com.tinkerpop.rexster.server.RexsterProperties",
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.configuration.HierarchicalConfiguration"
] | import com.tinkerpop.rexster.protocol.EngineConfiguration; import com.tinkerpop.rexster.protocol.EngineController; import com.tinkerpop.rexster.server.RexsterProperties; import java.util.ArrayList; import java.util.List; import org.apache.commons.configuration.HierarchicalConfiguration; | import com.tinkerpop.rexster.protocol.*; import com.tinkerpop.rexster.server.*; import java.util.*; import org.apache.commons.configuration.*; | [
"com.tinkerpop.rexster",
"java.util",
"org.apache.commons"
] | com.tinkerpop.rexster; java.util; org.apache.commons; | 212,659 |
public void testUnmappedMetricWithIgnoreMalformed() throws Exception {
DocumentMapper mapper = createDocumentMapper(
fieldMapping(
b -> b.field("type", CONTENT_TYPE)
.field(METRICS_FIELD, new String[] { "min", "max" })
.field("ignore_malfor... | void function() throws Exception { DocumentMapper mapper = createDocumentMapper( fieldMapping( b -> b.field("type", CONTENT_TYPE) .field(METRICS_FIELD, new String[] { "min", "max" }) .field(STR, true) .field(DEFAULT_METRIC, "max") ) ); ParsedDocument doc = mapper.parse( source(b -> b.startObject("field").field("min", -... | /**
* Test inserting a document containing a metric that has not been defined in the field mapping.
* Field will be ignored because config ignore_malformed has been set.
*/ | Test inserting a document containing a metric that has not been defined in the field mapping. Field will be ignored because config ignore_malformed has been set | testUnmappedMetricWithIgnoreMalformed | {
"repo_name": "robin13/elasticsearch",
"path": "x-pack/plugin/mapper-aggregate-metric/src/test/java/org/elasticsearch/xpack/aggregatemetric/mapper/AggregateDoubleMetricFieldMapperTests.java",
"license": "apache-2.0",
"size": 23370
} | [
"org.elasticsearch.index.mapper.DocumentMapper",
"org.elasticsearch.index.mapper.ParsedDocument"
] | import org.elasticsearch.index.mapper.DocumentMapper; import org.elasticsearch.index.mapper.ParsedDocument; | import org.elasticsearch.index.mapper.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 2,085,320 |
public Node getAstNode() {
return astNode;
} | Node function() { return astNode; } | /**
* Returns the underlying AST node for the function. This usually
* has type Token.FUNCTION but in the case of the "main" function
* will have type Token.BLOCK.
*/ | Returns the underlying AST node for the function. This usually has type Token.FUNCTION but in the case of the "main" function will have type Token.BLOCK | getAstNode | {
"repo_name": "jhiswin/idiil-closure-compiler",
"path": "src/com/google/javascript/jscomp/CallGraph.java",
"license": "apache-2.0",
"size": 23914
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,510,289 |
@Override
public void focusLost(FocusEvent e)
{
if (!this.immediateUpdate) this.applyChanges();
} | void function(FocusEvent e) { if (!this.immediateUpdate) this.applyChanges(); } | /** Invoked when a component loses the keyboard focus.
*
*/ | Invoked when a component loses the keyboard focus | focusLost | {
"repo_name": "Taller/sqlworkbench-plus",
"path": "src/workbench/gui/components/PasswordPropertyEditor.java",
"license": "apache-2.0",
"size": 4003
} | [
"java.awt.event.FocusEvent"
] | import java.awt.event.FocusEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,101,085 |
private void processReadRequest(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType responseFormat) throws ODataApplicationException {
Object currentWorkingEntity = null;
EdmEntityType currentEdmEntityType = null;
EdmEntitySet currentEdmEntitySet = null;
Collection curre... | void function(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType responseFormat) throws ODataApplicationException { Object currentWorkingEntity = null; EdmEntityType currentEdmEntityType = null; EdmEntitySet currentEdmEntitySet = null; Collection currentReadCollection = null; List<UriResource> r... | /****
* Processes a generic read request.
*
*/ | Processes a generic read request | processReadRequest | {
"repo_name": "mclaudio76/odata4-service-framework",
"path": "src/main/java/odata4fx/core/ODataServiceHandler.java",
"license": "apache-2.0",
"size": 36654
} | [
"java.util.Collection",
"java.util.List",
"org.apache.olingo.commons.api.data.Entity",
"org.apache.olingo.commons.api.data.EntityCollection",
"org.apache.olingo.commons.api.edm.EdmBindingTarget",
"org.apache.olingo.commons.api.edm.EdmEntitySet",
"org.apache.olingo.commons.api.edm.EdmEntityType",
"org.... | import java.util.Collection; import java.util.List; import org.apache.olingo.commons.api.data.Entity; import org.apache.olingo.commons.api.data.EntityCollection; import org.apache.olingo.commons.api.edm.EdmBindingTarget; import org.apache.olingo.commons.api.edm.EdmEntitySet; import org.apache.olingo.commons.api.edm.Edm... | import java.util.*; import org.apache.olingo.commons.api.data.*; import org.apache.olingo.commons.api.edm.*; import org.apache.olingo.commons.api.format.*; import org.apache.olingo.commons.api.http.*; import org.apache.olingo.server.api.*; import org.apache.olingo.server.api.uri.*; import org.apache.olingo.server.api.u... | [
"java.util",
"org.apache.olingo"
] | java.util; org.apache.olingo; | 2,378,976 |
public void getData() {
if ( log.isDebug() ) {
logDebug( BaseMessages.getString( PKG, "DimensionLookupDialog.Log.GettingKeyInfo" ) );
}
if ( input.getKeyStream() != null ) {
for ( int i = 0; i < input.getKeyStream().length; i++ ) {
TableItem item = wKey.table.getItem( i );
if ... | void function() { if ( log.isDebug() ) { logDebug( BaseMessages.getString( PKG, STR ) ); } if ( input.getKeyStream() != null ) { for ( int i = 0; i < input.getKeyStream().length; i++ ) { TableItem item = wKey.table.getItem( i ); if ( input.getKeyLookup()[i] != null ) { item.setText( 1, input.getKeyLookup()[i] ); } if (... | /**
* Copy information from the meta-data input to the dialog fields.
*/ | Copy information from the meta-data input to the dialog fields | getData | {
"repo_name": "tkafalas/pentaho-kettle",
"path": "ui/src/main/java/org/pentaho/di/ui/trans/steps/dimensionlookup/DimensionLookupDialog.java",
"license": "apache-2.0",
"size": 72693
} | [
"org.eclipse.swt.widgets.TableItem",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta"
] | import org.eclipse.swt.widgets.TableItem; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta; | import org.eclipse.swt.widgets.*; import org.pentaho.di.core.database.*; import org.pentaho.di.i18n.*; import org.pentaho.di.trans.steps.dimensionlookup.*; | [
"org.eclipse.swt",
"org.pentaho.di"
] | org.eclipse.swt; org.pentaho.di; | 948,224 |
public static void serializeCQLQueryResults(CQLQueryResults results, Writer writer, InputStream wsddStream) throws Exception {
if (results == null || writer == null) {
throw new IllegalArgumentException("Null is not a valid argument");
}
if (wsddStream == null) {
Util... | static void function(CQLQueryResults results, Writer writer, InputStream wsddStream) throws Exception { if (results == null writer == null) { throw new IllegalArgumentException(STR); } if (wsddStream == null) { Utils.serializeObject(results, DataServiceConstants.CQL_RESULT_SET_QNAME, writer); } else { Utils.serializeOb... | /**
* Write the XML representation of the specified query results to the specified
* writer, using the configuration specified by the WSDD configuration.
* If either the results or writer are null, an IllegalArgumentException will be thrown.
*
* @param results
* @param writer
* @para... | Write the XML representation of the specified query results to the specified writer, using the configuration specified by the WSDD configuration. If either the results or writer are null, an IllegalArgumentException will be thrown | serializeCQLQueryResults | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/fqp/src/gov/nih/nci/cagrid/fqp/common/SerializationUtils.java",
"license": "bsd-3-clause",
"size": 11435
} | [
"gov.nih.nci.cagrid.common.Utils",
"gov.nih.nci.cagrid.cqlresultset.CQLQueryResults",
"gov.nih.nci.cagrid.data.DataServiceConstants",
"java.io.InputStream",
"java.io.Writer"
] | import gov.nih.nci.cagrid.common.Utils; import gov.nih.nci.cagrid.cqlresultset.CQLQueryResults; import gov.nih.nci.cagrid.data.DataServiceConstants; import java.io.InputStream; import java.io.Writer; | import gov.nih.nci.cagrid.common.*; import gov.nih.nci.cagrid.cqlresultset.*; import gov.nih.nci.cagrid.data.*; import java.io.*; | [
"gov.nih.nci",
"java.io"
] | gov.nih.nci; java.io; | 1,377,759 |
public String getTitle()
{
return getCOSObject().getString(COSName.TITLE);
} | String function() { return getCOSObject().getString(COSName.TITLE); } | /**
* This will get the title of the document. This will return null if no title exists.
*
* @return The title of the document.
*/ | This will get the title of the document. This will return null if no title exists | getTitle | {
"repo_name": "torakiki/sambox",
"path": "src/main/java/org/sejda/sambox/pdmodel/PDDocumentInformation.java",
"license": "apache-2.0",
"size": 8462
} | [
"org.sejda.sambox.cos.COSName"
] | import org.sejda.sambox.cos.COSName; | import org.sejda.sambox.cos.*; | [
"org.sejda.sambox"
] | org.sejda.sambox; | 234,502 |
private RobotPosition moveForward(final RobotPosition rpos) {
RobotPosition newpos = new RobotPosition(rpos.getX(), rpos.getY(),
rpos.getCardinalPos());
switch (newpos.getCardinalPos()) {
case GlobalConstants.NORTH_POS:
int y = newpos.getY() + 1;
if (y > maxYAxis) {
y = maxYAxis;
}
newpos.... | RobotPosition function(final RobotPosition rpos) { RobotPosition newpos = new RobotPosition(rpos.getX(), rpos.getY(), rpos.getCardinalPos()); switch (newpos.getCardinalPos()) { case GlobalConstants.NORTH_POS: int y = newpos.getY() + 1; if (y > maxYAxis) { y = maxYAxis; } newpos.setY(y); break; case GlobalConstants.SOUT... | /**
* Depending on the given position, it moves one location in the cardinal
* direction.
*
* @param rpos
* new position.
*/ | Depending on the given position, it moves one location in the cardinal direction | moveForward | {
"repo_name": "cortizqgithub/csoftz-s4n-robobum-java",
"path": "src/main/java/com/csoftz/s4n/robobum/Robot.java",
"license": "mit",
"size": 7186
} | [
"com.csoftz.s4n.robobum.consts.GlobalConstants",
"com.csoftz.s4n.robobum.domain.RobotPosition"
] | import com.csoftz.s4n.robobum.consts.GlobalConstants; import com.csoftz.s4n.robobum.domain.RobotPosition; | import com.csoftz.s4n.robobum.consts.*; import com.csoftz.s4n.robobum.domain.*; | [
"com.csoftz.s4n"
] | com.csoftz.s4n; | 475,441 |
public SystemData systemData() {
return this.systemData;
} | SystemData function() { return this.systemData; } | /**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/ | Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information | systemData | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ClusterPrincipalAssignmentInner.java",
"license": "mit",
"size": 6095
} | [
"com.azure.core.management.SystemData"
] | import com.azure.core.management.SystemData; | import com.azure.core.management.*; | [
"com.azure.core"
] | com.azure.core; | 985,320 |
public void setDossierFolderPersistence(
DossierFolderPersistence dossierFolderPersistence) {
this.dossierFolderPersistence = dossierFolderPersistence;
} | void function( DossierFolderPersistence dossierFolderPersistence) { this.dossierFolderPersistence = dossierFolderPersistence; } | /**
* Sets the dossier folder persistence.
*
* @param dossierFolderPersistence the dossier folder persistence
*/ | Sets the dossier folder persistence | setDossierFolderPersistence | {
"repo_name": "thongdv/OEPv2",
"path": "portlets/oep-core-dossiermgt-portlet/docroot/WEB-INF/src/org/oep/core/dossiermgt/service/base/DossierDoc2TemplateServiceBaseImpl.java",
"license": "apache-2.0",
"size": 36774
} | [
"org.oep.core.dossiermgt.service.persistence.DossierFolderPersistence"
] | import org.oep.core.dossiermgt.service.persistence.DossierFolderPersistence; | import org.oep.core.dossiermgt.service.persistence.*; | [
"org.oep.core"
] | org.oep.core; | 1,618,550 |
public void append(LoggingEvent le) {
if (doc == null) {
return;
}
try {
SimpleAttributeSet attr = new SimpleAttributeSet();
StyleConstants.setFontFamily(attr, "SansSerif");
String str = le.getMessage().toString();
ThrowableInformat... | void function(LoggingEvent le) { if (doc == null) { return; } try { SimpleAttributeSet attr = new SimpleAttributeSet(); StyleConstants.setFontFamily(attr, STR); String str = le.getMessage().toString(); ThrowableInformation ti = le.getThrowableInformation(); if (le.getLevel().isGreaterOrEqual(Level.INFO)) { StyleConstan... | /**
* Appends messages of LoggingEvents to the TextField.
*
* @param le The LoggingEvent to append.
*/ | Appends messages of LoggingEvents to the TextField | append | {
"repo_name": "kornl/afcommons",
"path": "src/org/af/commons/logging/widgets/SimpleLogPanel.java",
"license": "gpl-3.0",
"size": 7586
} | [
"java.awt.Color",
"javax.swing.text.BadLocationException",
"javax.swing.text.SimpleAttributeSet",
"javax.swing.text.StyleConstants",
"org.apache.log4j.Level",
"org.apache.log4j.spi.LoggingEvent",
"org.apache.log4j.spi.ThrowableInformation"
] | import java.awt.Color; import javax.swing.text.BadLocationException; import javax.swing.text.SimpleAttributeSet; import javax.swing.text.StyleConstants; import org.apache.log4j.Level; import org.apache.log4j.spi.LoggingEvent; import org.apache.log4j.spi.ThrowableInformation; | import java.awt.*; import javax.swing.text.*; import org.apache.log4j.*; import org.apache.log4j.spi.*; | [
"java.awt",
"javax.swing",
"org.apache.log4j"
] | java.awt; javax.swing; org.apache.log4j; | 317,316 |
public void setBorderGap(int borderGap) {
this.borderGap = borderGap;
Border inner = new EmptyBorder(0, borderGap, 0, borderGap);
this.setBorder(new CompoundBorder(TextLineNumber.OUTER, inner));
this.lastDigits = 0;
this.setPreferredWidth();
} | void function(int borderGap) { this.borderGap = borderGap; Border inner = new EmptyBorder(0, borderGap, 0, borderGap); this.setBorder(new CompoundBorder(TextLineNumber.OUTER, inner)); this.lastDigits = 0; this.setPreferredWidth(); } | /**
* The border gap is used in calculating the left and right insets of the border. Default value is 5.
*
* @param borderGap the gap in pixels
*/ | The border gap is used in calculating the left and right insets of the border. Default value is 5 | setBorderGap | {
"repo_name": "jurgendl/swing-easy",
"path": "src/main/java/org/swingeasy/TextLineNumber.java",
"license": "mit",
"size": 15104
} | [
"javax.swing.border.Border",
"javax.swing.border.CompoundBorder",
"javax.swing.border.EmptyBorder"
] | import javax.swing.border.Border; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; | import javax.swing.border.*; | [
"javax.swing"
] | javax.swing; | 927,806 |
private void serializeContext(ObjectOutputStream out)
throws IOException {
// Step 1.
final int len = context.size();
out.writeInt(len);
for (Map.Entry<String, Object> entry : context.entrySet()) {
// Step 2.
out.writeObject(entry.getKey());
... | void function(ObjectOutputStream out) throws IOException { final int len = context.size(); out.writeInt(len); for (Map.Entry<String, Object> entry : context.entrySet()) { out.writeObject(entry.getKey()); final Object value = entry.getValue(); if (value instanceof Serializable) { out.writeObject(value); } else { out.wri... | /**
* Serialize {@link #context}.
*
* @param out Stream.
* @throws IOException This should never happen.
*/ | Serialize <code>#context</code> | serializeContext | {
"repo_name": "jlizier/information-dynamics-toolkit",
"path": "java/source/infodynamics/utils/commonsmath3/exception/util/ExceptionContext.java",
"license": "gpl-3.0",
"size": 11838
} | [
"java.io.IOException",
"java.io.ObjectOutputStream",
"java.io.Serializable",
"java.util.Map"
] | import java.io.IOException; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 737,242 |
public String retrieveEndpointName(J2EEName j2eeName) {
for (Entry<String, J2EEName> entry : endpointNameJ2EENameMap.entrySet()) {
if (entry.getValue().equals(j2eeName)) {
return entry.getKey();
}
}
return null;
} | String function(J2EEName j2eeName) { for (Entry<String, J2EEName> entry : endpointNameJ2EENameMap.entrySet()) { if (entry.getValue().equals(j2eeName)) { return entry.getKey(); } } return null; } | /**
* Get the endpoint name by j2eeName
*
* @param j2eeName
* @return
*/ | Get the endpoint name by j2eeName | retrieveEndpointName | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.jaxws.2.3.common/src/com/ibm/ws/jaxws/metadata/JaxWsServerMetaData.java",
"license": "epl-1.0",
"size": 2747
} | [
"com.ibm.websphere.csi.J2EEName",
"java.util.Map"
] | import com.ibm.websphere.csi.J2EEName; import java.util.Map; | import com.ibm.websphere.csi.*; import java.util.*; | [
"com.ibm.websphere",
"java.util"
] | com.ibm.websphere; java.util; | 91,078 |
private void deleteDeadEntities() {
ArrayList<Entity> deadFX = new ArrayList<Entity>();
for (Entity effect : effects) {
if (effect instanceof Burst) {
Burst pop = (Burst) effect;
if (pop.isDead()) {
deadFX.add((Entity) pop);
... | void function() { ArrayList<Entity> deadFX = new ArrayList<Entity>(); for (Entity effect : effects) { if (effect instanceof Burst) { Burst pop = (Burst) effect; if (pop.isDead()) { deadFX.add((Entity) pop); } } } effects.removeAll(deadFX); } | /**
* Removes dead effects and other inactive entities.
*/ | Removes dead effects and other inactive entities | deleteDeadEntities | {
"repo_name": "JoePelz/scroller",
"path": "src/core/Engine.java",
"license": "mit",
"size": 16887
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,750,464 |
private static void populateSet(Set collection, Class<?> typeClass)
throws IllegalAccessException, InstantiationException, InvocationTargetException,
NoSuchMethodException, SecurityException, ClassNotFoundException {
if (typeClass.isEnum()) {
collection.add(typeClass.getE... | static void function(Set collection, Class<?> typeClass) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException { if (typeClass.isEnum()) { collection.add(typeClass.getEnumConstants()[0]); collection.add(typeClass.getEnumConstan... | /**
* Populate the given set with one or two items of the given type.
* @param collection
* @param typeClass
*/ | Populate the given set with one or two items of the given type | populateSet | {
"repo_name": "cmoulliard/apiman",
"path": "manager/api/es/src/test/java/io/apiman/manager/api/es/EsMarshallingTest.java",
"license": "apache-2.0",
"size": 19931
} | [
"java.lang.reflect.InvocationTargetException",
"java.util.Set"
] | import java.lang.reflect.InvocationTargetException; import java.util.Set; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 2,277,209 |
public static Enum castToEnum(Object object, Class<? extends Enum> type) {
if (object==null) return null;
if (type.isInstance(object)) return (Enum) object;
if (object instanceof String || object instanceof GString) {
return Enum.valueOf(type, object.toString());
}
... | static Enum function(Object object, Class<? extends Enum> type) { if (object==null) return null; if (type.isInstance(object)) return (Enum) object; if (object instanceof String object instanceof GString) { return Enum.valueOf(type, object.toString()); } throw new GroovyCastException(object, type); } | /**
* this class requires that the supplied enum is not fitting a
* Collection case for casting
*/ | this class requires that the supplied enum is not fitting a Collection case for casting | castToEnum | {
"repo_name": "OpenBEL/kam-nav",
"path": "tools/groovy/src/src/main/org/codehaus/groovy/runtime/typehandling/ShortTypeHandling.java",
"license": "apache-2.0",
"size": 2723
} | [
"groovy.lang.GString"
] | import groovy.lang.GString; | import groovy.lang.*; | [
"groovy.lang"
] | groovy.lang; | 1,321,988 |
public static Map<String, String> initializeLookupMap(String... args) {
Map<String, String> lookupMap = new HashMap<String, String>();
for (int i = 0; i < args.length; i++) {
lookupMap.put(args[i], args[i]);
}
return lookupMap;
} | static Map<String, String> function(String... args) { Map<String, String> lookupMap = new HashMap<String, String>(); for (int i = 0; i < args.length; i++) { lookupMap.put(args[i], args[i]); } return lookupMap; } | /**
* Initialize a hash map from a list of strings for use in lookups. The performance
* of a lookup against a hash map is superior to that of a list, so this approach is
* useful for critical-path lookups.
*/ | Initialize a hash map from a list of strings for use in lookups. The performance of a lookup against a hash map is superior to that of a list, so this approach is useful for critical-path lookups | initializeLookupMap | {
"repo_name": "opendatakraken/openbiwiki",
"path": "openbiwiki-core/src/main/java/org/jamwiki/utils/Utilities.java",
"license": "mit",
"size": 17621
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,289,197 |
static Intent createEmailIntent(Context context, long eventId, String body) {
// TODO: Refactor to move query part into Utils.createEmailAttendeeIntent, to
// be shared with EventInfoFragment.
// Query for the owner account(s).
String ownerAccount = null;
String syncAccount ... | static Intent createEmailIntent(Context context, long eventId, String body) { String ownerAccount = null; String syncAccount = null; String eventTitle = null; String eventOrganizer = null; Cursor eventCursor = getEventCursor(context, eventId); try { if (eventCursor != null && eventCursor.moveToFirst()) { ownerAccount =... | /**
* Creates an Intent for emailing the attendees of the event. Returns null if there
* are no emailable attendees.
*/ | Creates an Intent for emailing the attendees of the event. Returns null if there are no emailable attendees | createEmailIntent | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Calendar/src/com/android/calendar/alerts/AlertReceiver.java",
"license": "gpl-2.0",
"size": 31228
} | [
"android.content.Context",
"android.content.Intent",
"android.database.Cursor",
"android.provider.CalendarContract",
"android.text.TextUtils",
"com.android.calendar.Utils",
"java.util.ArrayList",
"java.util.List"
] | import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.provider.CalendarContract; import android.text.TextUtils; import com.android.calendar.Utils; import java.util.ArrayList; import java.util.List; | import android.content.*; import android.database.*; import android.provider.*; import android.text.*; import com.android.calendar.*; import java.util.*; | [
"android.content",
"android.database",
"android.provider",
"android.text",
"com.android.calendar",
"java.util"
] | android.content; android.database; android.provider; android.text; com.android.calendar; java.util; | 948,562 |
private List<File> scanForConfigurationFiles(final File config, final List<String> profiles) {
val possibleFiles = getAllPossibleExternalConfigDirFilenames(config, profiles);
return possibleFiles.stream().filter(File::exists).filter(File::isFile).collect(Collectors.toList());
} | List<File> function(final File config, final List<String> profiles) { val possibleFiles = getAllPossibleExternalConfigDirFilenames(config, profiles); return possibleFiles.stream().filter(File::exists).filter(File::isFile).collect(Collectors.toList()); } | /**
* Get all possible configuration files for config directory that actually exist as files.
* @param config Folder in which to look for files
* @param profiles Profiles that are active
* @return List of files to be processed in order where last one processed overrides others
*/ | Get all possible configuration files for config directory that actually exist as files | scanForConfigurationFiles | {
"repo_name": "frett/cas",
"path": "core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/DefaultCasConfigurationPropertiesSourceLocator.java",
"license": "apache-2.0",
"size": 9612
} | [
"java.io.File",
"java.util.List",
"java.util.stream.Collectors"
] | import java.io.File; import java.util.List; import java.util.stream.Collectors; | import java.io.*; import java.util.*; import java.util.stream.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,400,295 |
public static NotificationCompat.Builder newBuilder(Context context)
{
NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
builder.setSmallIcon(R.drawable.gx_notification_default);
Integer customResourceId = Services.Resources.getImageResourceId("gx_notification_icon");
if (... | static NotificationCompat.Builder function(Context context) { NotificationCompat.Builder builder = new NotificationCompat.Builder(context); builder.setSmallIcon(R.drawable.gx_notification_default); Integer customResourceId = Services.Resources.getImageResourceId(STR); if (PrimitiveUtils.isNonZero(customResourceId)) bui... | /**
* Creates a new {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder} with
* some preset properties, such as the Lollipop color and notification icon (uses the "Android Notification Icon"
* as defined in the main object if available, otherwise the gx_notification_default smal... | Creates a new <code>android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder</code> with some preset properties, such as the Lollipop color and notification icon (uses the "Android Notification Icon" as defined in the main object if available, otherwise the gx_notification_default small icon) | newBuilder | {
"repo_name": "pablanco/taskManager",
"path": "Android/FlexibleClient/src/com/artech/android/notification/NotificationHelper.java",
"license": "gpl-2.0",
"size": 3565
} | [
"android.content.Context",
"android.support.v4.app.NotificationCompat",
"com.artech.base.services.Services",
"com.artech.base.utils.PrimitiveUtils"
] | import android.content.Context; import android.support.v4.app.NotificationCompat; import com.artech.base.services.Services; import com.artech.base.utils.PrimitiveUtils; | import android.content.*; import android.support.v4.app.*; import com.artech.base.services.*; import com.artech.base.utils.*; | [
"android.content",
"android.support",
"com.artech.base"
] | android.content; android.support; com.artech.base; | 1,520,534 |
public List<Inode> checkoutByCondition(String condition, User user, boolean respectFrontendRoles, int offset, int limit)
throws DotDataException, DotSecurityException, DotStateException; | List<Inode> function(String condition, User user, boolean respectFrontendRoles, int offset, int limit) throws DotDataException, DotSecurityException, DotStateException; | /**
* Allows you to checkout contents based on a lucene query so it can be
* altered and checked in, in a paginated fashion
*
* @param luceneQuery
* @param user
* @param respectFrontendRoles
* @param offset
* @param limit
* @return
* @throws DotDataException
* @throws DotSecurityException
* @th... | Allows you to checkout contents based on a lucene query so it can be altered and checked in, in a paginated fashion | checkoutByCondition | {
"repo_name": "zhiqinghuang/core",
"path": "src/com/dotmarketing/business/skeleton/DotCMSAPIPostHook.java",
"license": "gpl-3.0",
"size": 24644
} | [
"com.dotmarketing.beans.Inode",
"com.dotmarketing.business.DotStateException",
"com.dotmarketing.exception.DotDataException",
"com.dotmarketing.exception.DotSecurityException",
"com.liferay.portal.model.User",
"java.util.List"
] | import com.dotmarketing.beans.Inode; import com.dotmarketing.business.DotStateException; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; import com.liferay.portal.model.User; import java.util.List; | import com.dotmarketing.beans.*; import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotmarketing.beans",
"com.dotmarketing.business",
"com.dotmarketing.exception",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.beans; com.dotmarketing.business; com.dotmarketing.exception; com.liferay.portal; java.util; | 1,967,166 |
public ArrayList<Sector> getSectorsContainingMineral(Mineral mineral){
return getSectorsContainingMineral(mineral.getMineral());
} | ArrayList<Sector> function(Mineral mineral){ return getSectorsContainingMineral(mineral.getMineral()); } | /**
* Takes the given mineral name and returns all sectors with that mineral assigned
* @param mineral
* @return
*/ | Takes the given mineral name and returns all sectors with that mineral assigned | getSectorsContainingMineral | {
"repo_name": "stevewest/VO-Miner",
"path": "src/com/uruwolf/vominer/data/SectorDataSource.java",
"license": "gpl-3.0",
"size": 7916
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,169,766 |
@Override
public byte[] insideBarrier() throws ForeignException {
execute();
return SimpleMasterProcedureManager.SIMPLE_DATA.getBytes();
} | byte[] function() throws ForeignException { execute(); return SimpleMasterProcedureManager.SIMPLE_DATA.getBytes(); } | /**
* do a log roll.
*/ | do a log roll | insideBarrier | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/SimpleRSProcedureManager.java",
"license": "apache-2.0",
"size": 8524
} | [
"org.apache.hadoop.hbase.errorhandling.ForeignException"
] | import org.apache.hadoop.hbase.errorhandling.ForeignException; | import org.apache.hadoop.hbase.errorhandling.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,114,768 |
public void setYTranslation(NexusObjectProvider<NXpositioner> yPositioner) throws NexusException {
final DataNode yTranslation = getDataNode(yPositioner);
sample.addDataNode(NX_Y_TRANSLATION, yTranslation);
}
| void function(NexusObjectProvider<NXpositioner> yPositioner) throws NexusException { final DataNode yTranslation = getDataNode(yPositioner); sample.addDataNode(NX_Y_TRANSLATION, yTranslation); } | /**
* Sets the 'y' translation
* @param yPositioner y positioner
* @throws NexusException
*/ | Sets the 'y' translation | setYTranslation | {
"repo_name": "belkassaby/dawnsci",
"path": "org.eclipse.dawnsci.nexus/src/org/eclipse/dawnsci/nexus/builder/appdef/impl/TomoApplicationBuilder.java",
"license": "epl-1.0",
"size": 10055
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode",
"org.eclipse.dawnsci.nexus.NXpositioner",
"org.eclipse.dawnsci.nexus.NexusException",
"org.eclipse.dawnsci.nexus.builder.NexusObjectProvider"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; import org.eclipse.dawnsci.nexus.NXpositioner; import org.eclipse.dawnsci.nexus.NexusException; import org.eclipse.dawnsci.nexus.builder.NexusObjectProvider; | import org.eclipse.dawnsci.analysis.api.tree.*; import org.eclipse.dawnsci.nexus.*; import org.eclipse.dawnsci.nexus.builder.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 2,647,366 |
public void startRecording(int callId, int way) throws SameThreadException {
// Make sure we are in a valid state for recording
if (!canRecord(callId)) {
return;
}
// Sanitize call way : if 0 assume all
if (way == 0) {
way = SipManager.BITMASK_ALL;
... | void function(int callId, int way) throws SameThreadException { if (!canRecord(callId)) { return; } if (way == 0) { way = SipManager.BITMASK_ALL; } try { File recFolder = PreferencesProviderWrapper.getRecordsFolder(service); IRecorderHandler recoder = new SimpleWavRecorderHandler(getCallInfo(callId), recFolder, way); L... | /**
* Start recording of a call.
*
* @param callId the call id of the call to record
* @throws SameThreadException virtual exception to be sure we are calling
* this from correct thread
*/ | Start recording of a call | startRecording | {
"repo_name": "WonderFannn/EntranceSystem",
"path": "src/com/csipsimple/pjsip/PjSipService.java",
"license": "lgpl-3.0",
"size": 97922
} | [
"com.csipsimple.api.SipManager",
"com.csipsimple.pjsip.recorder.IRecorderHandler",
"com.csipsimple.pjsip.recorder.impl.SimpleWavRecorderHandler",
"com.csipsimple.service.SipService",
"com.csipsimple.utils.Log",
"com.csipsimple.utils.PreferencesProviderWrapper",
"java.io.File",
"java.io.IOException",
... | import com.csipsimple.api.SipManager; import com.csipsimple.pjsip.recorder.IRecorderHandler; import com.csipsimple.pjsip.recorder.impl.SimpleWavRecorderHandler; import com.csipsimple.service.SipService; import com.csipsimple.utils.Log; import com.csipsimple.utils.PreferencesProviderWrapper; import java.io.File; import ... | import com.csipsimple.api.*; import com.csipsimple.pjsip.recorder.*; import com.csipsimple.pjsip.recorder.impl.*; import com.csipsimple.service.*; import com.csipsimple.utils.*; import java.io.*; import java.util.*; | [
"com.csipsimple.api",
"com.csipsimple.pjsip",
"com.csipsimple.service",
"com.csipsimple.utils",
"java.io",
"java.util"
] | com.csipsimple.api; com.csipsimple.pjsip; com.csipsimple.service; com.csipsimple.utils; java.io; java.util; | 37,704 |
public FeatureResultSet queryFeatures(boolean distinct,
BoundingBox boundingBox, Projection projection,
Map<String, Object> fieldValues) {
BoundingBox featureBoundingBox = projectBoundingBox(boundingBox,
projection);
return queryFeatures(distinct, featureBoundingBox, fieldValues);
} | FeatureResultSet function(boolean distinct, BoundingBox boundingBox, Projection projection, Map<String, Object> fieldValues) { BoundingBox featureBoundingBox = projectBoundingBox(boundingBox, projection); return queryFeatures(distinct, featureBoundingBox, fieldValues); } | /**
* Query for features within the bounding box in the provided projection
*
* @param distinct
* distinct rows
* @param boundingBox
* bounding box
* @param projection
* projection
* @param fieldValues
* field values
* @return feature results
* @since... | Query for features within the bounding box in the provided projection | queryFeatures | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java",
"license": "mit",
"size": 349361
} | [
"java.util.Map",
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.features.user.FeatureResultSet",
"mil.nga.proj.Projection"
] | import java.util.Map; import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet; import mil.nga.proj.Projection; | import java.util.*; import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*; | [
"java.util",
"mil.nga.geopackage",
"mil.nga.proj"
] | java.util; mil.nga.geopackage; mil.nga.proj; | 1,962,330 |
public static Uri getCanonicalUri(Context context, Uri cast){
return cast;
} | static Uri function(Context context, Uri cast){ return cast; } | /**
* Gets the preferred full URI of the given cast. If it's a cast that's in a project,
* returns that uri.
*
* Makes a single query.
*
* @param context
* @param cast
* @return the canonical URI for the given cast.
*/ | Gets the preferred full URI of the given cast. If it's a cast that's in a project, returns that uri. Makes a single query | getCanonicalUri | {
"repo_name": "mitmel/Locast-Android-UNICEF",
"path": "src/edu/mit/mobile/android/locast/data/Cast.java",
"license": "gpl-2.0",
"size": 4824
} | [
"android.content.Context",
"android.net.Uri"
] | import android.content.Context; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 279,515 |
protected void zipFile( ArchiveEntry entry, ZipArchiveOutputStream zOut, String vPath )
throws IOException, ArchiverException
{
// If the file being added is WEB-INF/web.xml, we warn if it's
// not the one specified in the "webxml" attribute - or if
// it's being added twice, mea... | void function( ArchiveEntry entry, ZipArchiveOutputStream zOut, String vPath ) throws IOException, ArchiverException { if ( vPath.equalsIgnoreCase( STR ) ) { if ( descriptorAdded ( expectWebXml && ( deploymentDescriptor == null !ResourceUtils.isCanonicalizedSame( entry.getResource(), deploymentDescriptor ) ) ) ) { getL... | /**
* Overridden from ZipArchiver class to deal with web.xml
*/ | Overridden from ZipArchiver class to deal with web.xml | zipFile | {
"repo_name": "sonatype/plexus-archiver",
"path": "src/main/java/org/codehaus/plexus/archiver/war/WarArchiver.java",
"license": "apache-2.0",
"size": 6679
} | [
"java.io.IOException",
"org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream",
"org.codehaus.plexus.archiver.ArchiveEntry",
"org.codehaus.plexus.archiver.ArchiverException",
"org.codehaus.plexus.archiver.util.ResourceUtils"
] | import java.io.IOException; import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; import org.codehaus.plexus.archiver.ArchiveEntry; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.util.ResourceUtils; | import java.io.*; import org.apache.commons.compress.archivers.zip.*; import org.codehaus.plexus.archiver.*; import org.codehaus.plexus.archiver.util.*; | [
"java.io",
"org.apache.commons",
"org.codehaus.plexus"
] | java.io; org.apache.commons; org.codehaus.plexus; | 309,799 |
@Nullable
public String getErrorText (@Nonnull final Locale aContentLocale)
{
return m_eError == null ? null : m_eError.getDisplayTextWithArgs (aContentLocale, (Object []) m_aErrorParams);
} | String function (@Nonnull final Locale aContentLocale) { return m_eError == null ? null : m_eError.getDisplayTextWithArgs (aContentLocale, (Object []) m_aErrorParams); } | /**
* Get the error text
*
* @param aContentLocale
* The locale to use. May not be <code>null</code>.
* @return <code>null</code> if no error occurred, the error text otherwise.
*/ | Get the error text | getErrorText | {
"repo_name": "phax/ph-commons",
"path": "ph-security/src/main/java/com/helger/security/keystore/LoadedKey.java",
"license": "apache-2.0",
"size": 3145
} | [
"java.util.Locale",
"javax.annotation.Nonnull"
] | import java.util.Locale; import javax.annotation.Nonnull; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,702,000 |
public S3Object putObject(S3Bucket bucket, S3Object object) throws S3ServiceException {
assertValidBucket(bucket, "Create Object in bucket");
return putObject(bucket.getName(), object);
} | S3Object function(S3Bucket bucket, S3Object object) throws S3ServiceException { assertValidBucket(bucket, STR); return putObject(bucket.getName(), object); } | /**
* Puts an object inside an existing bucket in S3, creating a new object or overwriting
* an existing one with the same key.
* <p>
* This method can be performed by anonymous services. Anonymous services
* can put objects into a publicly-writable bucket.
*
* @param bucket
* ... | Puts an object inside an existing bucket in S3, creating a new object or overwriting an existing one with the same key. This method can be performed by anonymous services. Anonymous services can put objects into a publicly-writable bucket | putObject | {
"repo_name": "ridvandongelci/jets3t",
"path": "src/org/jets3t/service/S3Service.java",
"license": "apache-2.0",
"size": 110321
} | [
"org.jets3t.service.model.S3Bucket",
"org.jets3t.service.model.S3Object"
] | import org.jets3t.service.model.S3Bucket; import org.jets3t.service.model.S3Object; | import org.jets3t.service.model.*; | [
"org.jets3t.service"
] | org.jets3t.service; | 2,017,549 |
public Builder valuationTime(ZonedDateTime valuationTime) {
this._valuationTime = valuationTime;
return this;
} | Builder function(ZonedDateTime valuationTime) { this._valuationTime = valuationTime; return this; } | /**
* Sets the {@code valuationTime} property in the builder.
* @param valuationTime the new value
* @return this, for chaining, not null
*/ | Sets the valuationTime property in the builder | valuationTime | {
"repo_name": "jeorme/OG-Platform",
"path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/server/GlobalCycleOptions.java",
"license": "apache-2.0",
"size": 21749
} | [
"org.threeten.bp.ZonedDateTime"
] | import org.threeten.bp.ZonedDateTime; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 2,846,462 |
public CompletableFuture<List<ThreadInfoSample>> requestThreadInfoSamples(
final SampleableTask task, final ThreadInfoSamplesRequest requestParams) {
checkNotNull(task, "task must not be null");
checkNotNull(requestParams, "requestParams must not be null");
CompletableFuture<Lis... | CompletableFuture<List<ThreadInfoSample>> function( final SampleableTask task, final ThreadInfoSamplesRequest requestParams) { checkNotNull(task, STR); checkNotNull(requestParams, STR); CompletableFuture<List<ThreadInfoSample>> resultFuture = new CompletableFuture<>(); scheduledExecutor.execute( () -> requestThreadInfo... | /**
* Returns a future that completes with a given number of thread info samples of a task thread.
*
* @param task The task to be sampled from.
* @param requestParams Parameters of the sampling request.
* @return A future containing the stack trace samples.
*/ | Returns a future that completes with a given number of thread info samples of a task thread | requestThreadInfoSamples | {
"repo_name": "tillrohrmann/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/ThreadInfoSampleService.java",
"license": "apache-2.0",
"size": 4765
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.CompletableFuture",
"org.apache.flink.runtime.messages.ThreadInfoSample",
"org.apache.flink.runtime.webmonitor.threadinfo.ThreadInfoSamplesRequest",
"org.apache.flink.util.Preconditions"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.messages.ThreadInfoSample; import org.apache.flink.runtime.webmonitor.threadinfo.ThreadInfoSamplesRequest; import org.apache.flink.util.Preconditions; | import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.messages.*; import org.apache.flink.runtime.webmonitor.threadinfo.*; import org.apache.flink.util.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 744,207 |
@Override public void exitClassCreatorRest(@NotNull JavaParser.ClassCreatorRestContext ctx) { }
| @Override public void exitClassCreatorRest(@NotNull JavaParser.ClassCreatorRestContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterClassCreatorRest | {
"repo_name": "martinaguero/deep",
"path": "src/org/trimatek/deep/lexer/JavaBaseListener.java",
"license": "apache-2.0",
"size": 39286
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,030,537 |
public void setRepository( Repository repository ) {
this.repository = repository;
if ( transMeta != null ) {
transMeta.setRepository( repository );
}
} | void function( Repository repository ) { this.repository = repository; if ( transMeta != null ) { transMeta.setRepository( repository ); } } | /**
* Sets the repository object for the transformation.
*
* @param repository the repository object to set
*/ | Sets the repository object for the transformation | setRepository | {
"repo_name": "e-cuellar/pentaho-kettle",
"path": "engine/src/main/java/org/pentaho/di/trans/Trans.java",
"license": "apache-2.0",
"size": 199294
} | [
"org.pentaho.di.repository.Repository"
] | import org.pentaho.di.repository.Repository; | import org.pentaho.di.repository.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,093,297 |
void ref(String ref) throws IOException; | void ref(String ref) throws IOException; | /**
* Notify this parse listener of a ref string.
*
* @param ref ref string
* @throws IOException if an I/O error occurs
*/ | Notify this parse listener of a ref string | ref | {
"repo_name": "heuermh/variation-cytoscape3-app",
"path": "variation/src/main/java/org/dishevelled/variation/vcf/VcfParseListener.java",
"license": "gpl-3.0",
"size": 3907
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,870,166 |
void onOpened(RewardedAd ad); | void onOpened(RewardedAd ad); | /**
* Called when a rewarded ad has been opened.
*
* @param ad the rewarded ad
*/ | Called when a rewarded ad has been opened | onOpened | {
"repo_name": "deltaDNA/android-smartads-sdk",
"path": "library/src/main/java/com/deltadna/android/sdk/ads/listeners/RewardedAdsListener.java",
"license": "apache-2.0",
"size": 1825
} | [
"com.deltadna.android.sdk.ads.RewardedAd"
] | import com.deltadna.android.sdk.ads.RewardedAd; | import com.deltadna.android.sdk.ads.*; | [
"com.deltadna.android"
] | com.deltadna.android; | 2,806,078 |
public static boolean getUsesSharedLibraries(StructImpl info) throws EvalException {
Object v = getValue(info, USES_SHARED_LIBRARIES);
if (v instanceof Boolean) {
return (Boolean) v;
}
throw Starlark.errorf(
"'%s' provider's '%s' field was %s, want bool",
PROVIDER_NAME, USES_SHAR... | static boolean function(StructImpl info) throws EvalException { Object v = getValue(info, USES_SHARED_LIBRARIES); if (v instanceof Boolean) { return (Boolean) v; } throw Starlark.errorf( STR, PROVIDER_NAME, USES_SHARED_LIBRARIES, Starlark.type(v)); } | /**
* Casts and returns the uses-shared-libraries field (or its default value).
*
* @throws EvalException if the field exists and is not a boolean
*/ | Casts and returns the uses-shared-libraries field (or its default value) | getUsesSharedLibraries | {
"repo_name": "bazelbuild/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/python/PyStructUtils.java",
"license": "apache-2.0",
"size": 8574
} | [
"com.google.devtools.build.lib.packages.StructImpl",
"net.starlark.java.eval.EvalException",
"net.starlark.java.eval.Starlark"
] | import com.google.devtools.build.lib.packages.StructImpl; import net.starlark.java.eval.EvalException; import net.starlark.java.eval.Starlark; | import com.google.devtools.build.lib.packages.*; import net.starlark.java.eval.*; | [
"com.google.devtools",
"net.starlark.java"
] | com.google.devtools; net.starlark.java; | 2,087,147 |
public static boolean waitUntilTextPresent(EmergyaWebDriver driver, By selector, long seconds, String text) {
log.info("[log-Utils] EmergyaWebDriverUtil - Start waitUntilTextPresent method");
WebDriverWait w = new WebDriverWait(driver, seconds);
boolean retVal = true;
try {
... | static boolean function(EmergyaWebDriver driver, By selector, long seconds, String text) { log.info(STR); WebDriverWait w = new WebDriverWait(driver, seconds); boolean retVal = true; try { w.until(ExpectedConditions.textToBePresentInElementLocated(selector, text)); } catch (TimeoutException e) { retVal = false; log.err... | /**
* It sleeps the driver for X seconds. If the text is present in element,
* the execution continue without waiting X seconds
*
* @param driver
* WebDriver element for sleep
* @param selector
* By element for wait
* @param seconds
* to be ... | It sleeps the driver for X seconds. If the text is present in element, the execution continue without waiting X seconds | waitUntilTextPresent | {
"repo_name": "IvanGomezDeLeon/qa-selenium-handler",
"path": "src/main/java/com/emergya/selenium/drivers/EmergyaWebDriverUtil.java",
"license": "mit",
"size": 21168
} | [
"org.openqa.selenium.By",
"org.openqa.selenium.TimeoutException",
"org.openqa.selenium.support.ui.ExpectedConditions",
"org.openqa.selenium.support.ui.WebDriverWait"
] | import org.openqa.selenium.By; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; | import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 2,478,942 |
static void assertDefaultDeployment(JsonObject jcos) {
JsonObject jco = jobConfigOverlay(jcos);
assertTrue(jco.has("deploymentConfig"));
assertTrue(jco.get("deploymentConfig").isJsonObject());
// Now parall channel isolation is not set by default
JsonObject deployCon... | static void assertDefaultDeployment(JsonObject jcos) { JsonObject jco = jobConfigOverlay(jcos); assertTrue(jco.has(STR)); assertTrue(jco.get(STR).isJsonObject()); JsonObject deployConfig = jco.get(STR).getAsJsonObject(); assertEquals(0, deployConfig.entrySet().size()); assertMissing(deployConfig, STR); assertMissing(jc... | /**
* Vanilla deployment when nothing special in the
* topology exists.
*/ | Vanilla deployment when nothing special in the topology exists | assertDefaultDeployment | {
"repo_name": "IBMStreams/streamsx.topology",
"path": "test/java/src/com/ibm/streamsx/topology/test/distributed/JobConfigOverlaysFileTest.java",
"license": "apache-2.0",
"size": 9875
} | [
"com.google.gson.JsonObject",
"org.junit.Assert"
] | import com.google.gson.JsonObject; import org.junit.Assert; | import com.google.gson.*; import org.junit.*; | [
"com.google.gson",
"org.junit"
] | com.google.gson; org.junit; | 106,122 |
public ArrayList<Clause> getClauses(){
ArrayList<Clause> result = new ArrayList<Clause>();
for(Entry<TreeSet<String>, Integer> newCard : this.newCardinalitiesToAdd.entrySet()){
ArrayList<Literal> lits = new ArrayList<Literal>();
for(String predName:newCard.getKey()){
lits.add(new Literal(predName,... | ArrayList<Clause> function(){ ArrayList<Clause> result = new ArrayList<Clause>(); for(Entry<TreeSet<String>, Integer> newCard : this.newCardinalitiesToAdd.entrySet()){ ArrayList<Literal> lits = new ArrayList<Literal>(); for(String predName:newCard.getKey()){ lits.add(new Literal(predName, true)); } CardinalityClause c ... | /**
* Returns cardinality clauses (needed for MCMC sampling)
*
* @return
*/ | Returns cardinality clauses (needed for MCMC sampling) | getClauses | {
"repo_name": "mommi84/rockit",
"path": "src/main/java/com/googlecode/rockit/app/solver/thread/CardinalityFormulaRestrictionBuilder.java",
"license": "mit",
"size": 8499
} | [
"com.googlecode.rockit.app.solver.pojo.CardinalityClause",
"com.googlecode.rockit.app.solver.pojo.Clause",
"com.googlecode.rockit.app.solver.pojo.Literal",
"java.util.ArrayList",
"java.util.Map",
"java.util.TreeSet"
] | import com.googlecode.rockit.app.solver.pojo.CardinalityClause; import com.googlecode.rockit.app.solver.pojo.Clause; import com.googlecode.rockit.app.solver.pojo.Literal; import java.util.ArrayList; import java.util.Map; import java.util.TreeSet; | import com.googlecode.rockit.app.solver.pojo.*; import java.util.*; | [
"com.googlecode.rockit",
"java.util"
] | com.googlecode.rockit; java.util; | 1,015,440 |
public String toXML() {
XStream xstream = XStreamInitializer.getInstance();
//涉及到服务商模式的两个参数,在为空值时置为null,以免在请求时将空值传给微信服务器
this.setSubAppId(StringUtils.trimToNull(this.getSubAppId()));
this.setSubMchId(StringUtils.trimToNull(this.getSubMchId()));
xstream.processAnnotations(this.getClass());
retu... | String function() { XStream xstream = XStreamInitializer.getInstance(); this.setSubAppId(StringUtils.trimToNull(this.getSubAppId())); this.setSubMchId(StringUtils.trimToNull(this.getSubMchId())); xstream.processAnnotations(this.getClass()); return xstream.toXML(this); } | /**
* To xml string.
*
* @return the string
*/ | To xml string | toXML | {
"repo_name": "comeonc/weixin-java-tools",
"path": "weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/request/BaseWxPayRequest.java",
"license": "apache-2.0",
"size": 7228
} | [
"com.thoughtworks.xstream.XStream",
"me.chanjar.weixin.common.util.xml.XStreamInitializer",
"org.apache.commons.lang3.StringUtils"
] | import com.thoughtworks.xstream.XStream; import me.chanjar.weixin.common.util.xml.XStreamInitializer; import org.apache.commons.lang3.StringUtils; | import com.thoughtworks.xstream.*; import me.chanjar.weixin.common.util.xml.*; import org.apache.commons.lang3.*; | [
"com.thoughtworks.xstream",
"me.chanjar.weixin",
"org.apache.commons"
] | com.thoughtworks.xstream; me.chanjar.weixin; org.apache.commons; | 2,442,411 |
@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void testKeyValueImporter() throws Throwable {
CellImporter importer = new CellImporter();
Configuration configuration = new Configuration();
Context ctx = mock(Context.class);
when(ctx.getConfiguration()).thenReturn(configuration);
... | @SuppressWarnings({ STR, STR }) void function() throws Throwable { CellImporter importer = new CellImporter(); Configuration configuration = new Configuration(); Context ctx = mock(Context.class); when(ctx.getConfiguration()).thenReturn(configuration); doAnswer(new Answer<Void>() { | /**
* Test map method of Importer
*/ | Test map method of Importer | testKeyValueImporter | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestImportExport.java",
"license": "apache-2.0",
"size": 30189
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.mapreduce.Import",
"org.apache.hadoop.mapreduce.Mapper",
"org.mockito.Mockito",
"org.mockito.stubbing.Answer"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.mapreduce.Import; import org.apache.hadoop.mapreduce.Mapper; import org.mockito.Mockito; import org.mockito.stubbing.Answer; | import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.mapreduce.*; import org.apache.hadoop.mapreduce.*; import org.mockito.*; import org.mockito.stubbing.*; | [
"org.apache.hadoop",
"org.mockito",
"org.mockito.stubbing"
] | org.apache.hadoop; org.mockito; org.mockito.stubbing; | 874,829 |
public Injector createChildInjector(Collection<Module> modules)
{
Injector childInjector;
Collection<Module> localModules = modules;
for (ModuleTransformer transformer : transformers) {
localModules = transformer.call(localModules);
}
//noinspection ... | Injector function(Collection<Module> modules) { Injector childInjector; Collection<Module> localModules = modules; for (ModuleTransformer transformer : transformers) { localModules = transformer.call(localModules); } if ( mode == LifecycleInjectorMode.REAL_CHILD_INJECTORS ) { childInjector = injector.createChildInjecto... | /**
* Create an injector that is a child of the bootstrap bindings only
*
* @param modules binding modules
* @return injector
*/ | Create an injector that is a child of the bootstrap bindings only | createChildInjector | {
"repo_name": "skinzer/governator",
"path": "governator-legacy/src/main/java/com/netflix/governator/guice/LifecycleInjector.java",
"license": "apache-2.0",
"size": 20136
} | [
"com.google.inject.Injector",
"com.google.inject.Module",
"java.util.Collection"
] | import com.google.inject.Injector; import com.google.inject.Module; import java.util.Collection; | import com.google.inject.*; import java.util.*; | [
"com.google.inject",
"java.util"
] | com.google.inject; java.util; | 2,374,777 |
public void apply() {
if (this.locals) {
Target.this.extendLocalsBy(this.size);
} else {
Target.this.extendStackBy(this.size);
}
this.size = 0;
}
}
public final ClassNode classNode;
public fi... | void function() { if (this.locals) { Target.this.extendLocalsBy(this.size); } else { Target.this.extendStackBy(this.size); } this.size = 0; } } public final ClassNode classNode; public final MethodNode method; public final InsnList insns; public final boolean isStatic; public final boolean isCtor; public final Type[] a... | /**
* Apply this extension to the target. This reduces the current size to
* zero so that a new operation can begin if required.
*/ | Apply this extension to the target. This reduces the current size to zero so that a new operation can begin if required | apply | {
"repo_name": "SpongePowered/Mixin",
"path": "src/main/java/org/spongepowered/asm/mixin/injection/struct/Target.java",
"license": "mit",
"size": 26658
} | [
"java.util.List",
"org.objectweb.asm.Type",
"org.objectweb.asm.tree.ClassNode",
"org.objectweb.asm.tree.InsnList",
"org.objectweb.asm.tree.LabelNode",
"org.objectweb.asm.tree.MethodNode",
"org.spongepowered.asm.util.Bytecode",
"org.spongepowered.asm.util.Constants"
] | import java.util.List; import org.objectweb.asm.Type; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.InsnList; import org.objectweb.asm.tree.LabelNode; import org.objectweb.asm.tree.MethodNode; import org.spongepowered.asm.util.Bytecode; import org.spongepowered.asm.util.Constants; | import java.util.*; import org.objectweb.asm.*; import org.objectweb.asm.tree.*; import org.spongepowered.asm.util.*; | [
"java.util",
"org.objectweb.asm",
"org.spongepowered.asm"
] | java.util; org.objectweb.asm; org.spongepowered.asm; | 2,443,489 |
@Override
public java.math.BigDecimal getQtyReserved_OnDate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved_OnDate);
if (bd == null)
return BigDecimal.ZERO;
return bd;
} | java.math.BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved_OnDate); if (bd == null) return BigDecimal.ZERO; return bd; } | /** Get Reservierte Menge Tag.
@return Reservierte Menge Tag */ | Get Reservierte Menge Tag | getQtyReserved_OnDate | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.fresh/de.metas.fresh.base/src/main/java-gen/de/metas/fresh/model/X_X_MRP_ProductInfo_V.java",
"license": "gpl-2.0",
"size": 12341
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 489,379 |
@Test
public void testPersistentPRWithGatewaySenderPersistenceEnabled_Restart2() {
// create locator on local site
Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));
// create locator on remote site
Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFi... | void function() { Integer lnPort = (Integer) vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1)); Integer nyPort = (Integer) vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort)); createCacheInVMs(lnPort, vm4, vm5, vm6, vm7); String diskStore1 = (String) vm4.invoke(() -> WANTestBase.createSenderWith... | /**
* Enable persistence for PR and GatewaySender. Pause the sender and do some puts in local region.
* Close the local site and rebuild the region and sender from disk store. Dispatcher should not
* start dispatching events recovered from persistent sender. Check if the remote site receives
* all the event... | Enable persistence for PR and GatewaySender. Pause the sender and do some puts in local region. Close the local site and rebuild the region and sender from disk store. Dispatcher should not start dispatching events recovered from persistent sender. Check if the remote site receives all the events | testPersistentPRWithGatewaySenderPersistenceEnabled_Restart2 | {
"repo_name": "smgoller/geode",
"path": "geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPersistenceEnabledGatewaySenderDUnitTest.java",
"license": "apache-2.0",
"size": 97446
} | [
"org.apache.geode.internal.cache.wan.WANTestBase",
"org.apache.geode.test.dunit.AsyncInvocation",
"org.apache.geode.test.dunit.LogWriterUtils",
"org.junit.Assert"
] | import org.apache.geode.internal.cache.wan.WANTestBase; import org.apache.geode.test.dunit.AsyncInvocation; import org.apache.geode.test.dunit.LogWriterUtils; import org.junit.Assert; | import org.apache.geode.internal.cache.wan.*; import org.apache.geode.test.dunit.*; import org.junit.*; | [
"org.apache.geode",
"org.junit"
] | org.apache.geode; org.junit; | 1,745,063 |
public List<TextDescription> getTextContentList() {
return getTextList();
} | List<TextDescription> function() { return getTextList(); } | /**
* Return the List of all the added texts. The returned List is a list of String.
*/ | Return the List of all the added texts. The returned List is a list of String | getTextContentList | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/index/indexing/model/FullIndexEntry.java",
"license": "agpl-3.0",
"size": 7039
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,891,461 |
T parseObject(String value, ExceptionInterceptor exceptionInterceptor); | T parseObject(String value, ExceptionInterceptor exceptionInterceptor); | /**
* Returns the value object parsed from it's string representation and checked against allowable values.
*
* @param value
* value
* @param exceptionInterceptor
* exception interceptor
*
* @return the value object
*/ | Returns the value object parsed from it's string representation and checked against allowable values | parseObject | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/mysql-connector/com/mysql/cj/conf/PropertyDefinition.java",
"license": "gpl-2.0",
"size": 4446
} | [
"com.mysql.cj.exceptions.ExceptionInterceptor"
] | import com.mysql.cj.exceptions.ExceptionInterceptor; | import com.mysql.cj.exceptions.*; | [
"com.mysql.cj"
] | com.mysql.cj; | 46,231 |
public static DataResult <SystemOverview> systemsNotInGroup(User user,
ServerGroup sg, PageControl pc) {
SelectMode m = ModeFactory.getMode("System_queries", "target_systems_for_group");
Map<String, Object> params = new HashMap<String, Object>();
params.put("user_id", user.getId(... | static DataResult <SystemOverview> function(User user, ServerGroup sg, PageControl pc) { SelectMode m = ModeFactory.getMode(STR, STR); Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, user.getId()); params.put("sgid", sg.getId()); Map<String, Object> elabParams = new HashMap<String, Object>()... | /**
* Returns list of all systems that are visible to user
* but not in the given server group.
* @param user Currently logged in user.
* @param sg a ServerGroup
* @param pc PageControl
* @return list of SystemOverviews.
*/ | Returns list of all systems that are visible to user but not in the given server group | systemsNotInGroup | {
"repo_name": "mcalmer/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/system/SystemManager.java",
"license": "gpl-2.0",
"size": 134651
} | [
"com.redhat.rhn.common.db.datasource.DataResult",
"com.redhat.rhn.common.db.datasource.ModeFactory",
"com.redhat.rhn.common.db.datasource.SelectMode",
"com.redhat.rhn.domain.server.ServerGroup",
"com.redhat.rhn.domain.user.User",
"com.redhat.rhn.frontend.dto.SystemOverview",
"com.redhat.rhn.frontend.lis... | import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.domain.server.ServerGroup; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.dto.SystemOverview; import com.red... | import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.server.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.frontend.listview.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 1,043,592 |
public void removeAllConflict(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException; | void function(Map<KeyCacheObject, GridCacheVersion> drMap) throws IgniteCheckedException; | /**
* Removes DR data.
*
* @param drMap DR map.
* @throws IgniteCheckedException If remove failed.
*/ | Removes DR data | removeAllConflict | {
"repo_name": "chandresh-pancholi/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteInternalCache.java",
"license": "apache-2.0",
"size": 86608
} | [
"java.util.Map",
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion"
] | import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; | import java.util.*; import org.apache.ignite.*; import org.apache.ignite.internal.processors.cache.version.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 758,360 |
public List<?> getEntriesByParentId(String parentId) {
return db.getEntriesByParentId(parentId);
}
| List<?> function(String parentId) { return db.getEntriesByParentId(parentId); } | /**
* API method. Returns the entries that are children of the parent. If the
* `parentId` is null or blank then null is returned.
*/ | API method. Returns the entries that are children of the parent. If the `parentId` is null or blank then null is returned | getEntriesByParentId | {
"repo_name": "ZapBlasterson/crushpaper",
"path": "src/main/java/com/crushpaper/DbLogic.java",
"license": "agpl-3.0",
"size": 86473
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,497,883 |
public Bundle getExtras() {
return mBundle.getBundle(KEY_EXTRAS);
} | Bundle function() { return mBundle.getBundle(KEY_EXTRAS); } | /**
* Gets a bundle of extras for this status object.
* The extras will be ignored by the media router but they may be used
* by applications.
*/ | Gets a bundle of extras for this status object. The extras will be ignored by the media router but they may be used by applications | getExtras | {
"repo_name": "aosp-mirror/platform_frameworks_support",
"path": "mediarouter/src/main/java/androidx/mediarouter/media/MediaSessionStatus.java",
"license": "apache-2.0",
"size": 8193
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 944,910 |
public void setHeaderFilterStrategy(HeaderFilterStrategy headerFilterStrategy) {
this.headerFilterStrategy = headerFilterStrategy;
if (cxfBinding instanceof HeaderFilterStrategyAware) {
((HeaderFilterStrategyAware) cxfBinding).setHeaderFilterStrategy(headerFilterStrategy);
}
... | void function(HeaderFilterStrategy headerFilterStrategy) { this.headerFilterStrategy = headerFilterStrategy; if (cxfBinding instanceof HeaderFilterStrategyAware) { ((HeaderFilterStrategyAware) cxfBinding).setHeaderFilterStrategy(headerFilterStrategy); } } | /**
* To use a custom HeaderFilterStrategy to filter header to and from Camel message.
*/ | To use a custom HeaderFilterStrategy to filter header to and from Camel message | setHeaderFilterStrategy | {
"repo_name": "erwelch/camel",
"path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java",
"license": "apache-2.0",
"size": 50799
} | [
"org.apache.camel.spi.HeaderFilterStrategy",
"org.apache.camel.spi.HeaderFilterStrategyAware"
] | import org.apache.camel.spi.HeaderFilterStrategy; import org.apache.camel.spi.HeaderFilterStrategyAware; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,350,561 |
if (transform instanceof AffineTransform) {
return new ParameterizedAffine((AffineTransform) transform, parameters, false);
} else {
return transform;
}
} | if (transform instanceof AffineTransform) { return new ParameterizedAffine((AffineTransform) transform, parameters, false); } else { return transform; } } | /**
* Returns the given transform associated to the same parameters than this {@code ParameterizedAffine},
* if possible. If the given transform is not affine, then it is returned unchanged.
*
* @param transform the transform to be at least partially described by {@link #parameters}.
* @retur... | Returns the given transform associated to the same parameters than this ParameterizedAffine, if possible. If the given transform is not affine, then it is returned unchanged | newTransform | {
"repo_name": "Geomatys/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/j2d/ParameterizedAffine.java",
"license": "apache-2.0",
"size": 8465
} | [
"java.awt.geom.AffineTransform"
] | import java.awt.geom.AffineTransform; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,610,382 |
public Element getRow(int row) {
if (row < 0) {
return null;
}
return getRows().getItem(row);
}
| Element function(int row) { if (row < 0) { return null; } return getRows().getItem(row); } | /**
* Return the <TR> HtmlElement which represents a Grid row for the
* specified index.
*
* @param row
* the row index
* @return the <TR> element
*/ | Return the <TR> HtmlElement which represents a Grid row for the specified index | getRow | {
"repo_name": "ezoengine/GKEngine",
"path": "main/gxt/src/com/extjs/gxt/ui/client/widget/grid/GridView.java",
"license": "gpl-3.0",
"size": 62850
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,138,692 |
public ClasspathBuilder addJarOf(Class c) throws IOException {
return add(Which.jarFile(c));
} | ClasspathBuilder function(Class c) throws IOException { return add(Which.jarFile(c)); } | /**
* Adds a jar file that contains the given class.
* @since 1.361
*/ | Adds a jar file that contains the given class | addJarOf | {
"repo_name": "rsandell/jenkins",
"path": "core/src/main/java/hudson/util/ClasspathBuilder.java",
"license": "mit",
"size": 1614
} | [
"hudson.remoting.Which",
"java.io.IOException"
] | import hudson.remoting.Which; import java.io.IOException; | import hudson.remoting.*; import java.io.*; | [
"hudson.remoting",
"java.io"
] | hudson.remoting; java.io; | 1,090,005 |
private void merge(@Nonnull final Map<String, Object> destination, @Nonnull final Map<String, Object> source, @Nullable final String prefix) {
for (final Map.Entry<String, Object> entry : source.entrySet()) {
final String key = entry.getKey();
final Object value = entry.getValue();
... | void function(@Nonnull final Map<String, Object> destination, @Nonnull final Map<String, Object> source, @Nullable final String prefix) { for (final Map.Entry<String, Object> entry : source.entrySet()) { final String key = entry.getKey(); final Object value = entry.getValue(); if (destination.containsKey(key)) { final ... | /**
* Merges members of the source map into the destination map.
*
* @param destination the destination map
* @param source the source map
* @param prefix a key prefix for reporting errors
*/ | Merges members of the source map into the destination map | merge | {
"repo_name": "claudiu-stanciu/kylo",
"path": "ui/ui-controller/src/main/java/com/thinkbiganalytics/ui/service/StandardUiTemplateService.java",
"license": "apache-2.0",
"size": 8463
} | [
"java.util.Map",
"javax.annotation.Nonnull",
"javax.annotation.Nullable"
] | import java.util.Map; import javax.annotation.Nonnull; import javax.annotation.Nullable; | import java.util.*; import javax.annotation.*; | [
"java.util",
"javax.annotation"
] | java.util; javax.annotation; | 1,399,274 |
public void setPassword(final String psw) {
if (StringUtils.isNotBlank(psw)) {
LOGGER.debug("Configured Jasypt password");
jasyptInstance.setPassword(psw);
}
} | void function(final String psw) { if (StringUtils.isNotBlank(psw)) { LOGGER.debug(STR); jasyptInstance.setPassword(psw); } } | /**
* Sets password.
*
* @param psw the psw
*/ | Sets password | setPassword | {
"repo_name": "rkorn86/cas",
"path": "api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/support/CasConfigurationJasyptCipherExecutor.java",
"license": "apache-2.0",
"size": 9252
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,523,331 |
private void parseIncludeAttributes(String layoutFile, AXmlNode rootNode) {
for (Entry<String, AXmlAttribute<?>> entry : rootNode.getAttributes().entrySet()) {
String attrName = entry.getKey().trim();
AXmlAttribute<?> attr = entry.getValue();
if (attrName.equals("layout")) {
if ((attr.getTyp... | void function(String layoutFile, AXmlNode rootNode) { for (Entry<String, AXmlAttribute<?>> entry : rootNode.getAttributes().entrySet()) { String attrName = entry.getKey().trim(); AXmlAttribute<?> attr = entry.getValue(); if (attrName.equals(STR)) { if ((attr.getType() == AxmlVisitor.TYPE_REFERENCE attr.getType() == Axm... | /**
* Parses the attributes required for a layout file inclusion
* @param layoutFile The full path and file name of the file being parsed
* @param rootNode The AXml node containing the attributes
*/ | Parses the attributes required for a layout file inclusion | parseIncludeAttributes | {
"repo_name": "lilicoding/soot-infoflow-android",
"path": "src/soot/jimple/infoflow/android/resources/LayoutFileParser.java",
"license": "lgpl-2.1",
"size": 15536
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,210,659 |
public static void removeSignatureGraphs(Dataset dataset) {
for (String name : RdfUtils.getModelNames(dataset)) {
if (WonRdfUtils.SignatureUtils.isSignatureGraph(name, dataset.getNamedModel(name))) {
dataset.removeNamedModel(name);
}
}
} | static void function(Dataset dataset) { for (String name : RdfUtils.getModelNames(dataset)) { if (WonRdfUtils.SignatureUtils.isSignatureGraph(name, dataset.getNamedModel(name))) { dataset.removeNamedModel(name); } } } | /**
* Removes signature graphs from the Dataset. Can be useful to use after
* verification is done, when the signatures are no longer required for further
* actions on the signed data of the Dataset.
*
* @param dataset from which graphs representing signatures have to be removed
*/ | Removes signature graphs from the Dataset. Can be useful to use after verification is done, when the signatures are no longer required for further actions on the signed data of the Dataset | removeSignatureGraphs | {
"repo_name": "researchstudio-sat/webofneeds",
"path": "webofneeds/won-cryptography/src/main/java/won/cryptography/rdfsign/WonAssembler.java",
"license": "apache-2.0",
"size": 10000
} | [
"org.apache.jena.query.Dataset"
] | import org.apache.jena.query.Dataset; | import org.apache.jena.query.*; | [
"org.apache.jena"
] | org.apache.jena; | 2,717,626 |
public static <T> T maxWith( @This Iterable<T> thiz, Comparator<T> comparator )
{
Iterator<T> iterator = thiz.iterator();
if( !iterator.hasNext() )
{
return null;
}
T max = iterator.next();
while( iterator.hasNext() )
{
T e = iterator.next();
if( comparator.compare( max... | static <T> T function( @This Iterable<T> thiz, Comparator<T> comparator ) { Iterator<T> iterator = thiz.iterator(); if( !iterator.hasNext() ) { return null; } T max = iterator.next(); while( iterator.hasNext() ) { T e = iterator.next(); if( comparator.compare( max, e ) < 0 ) { max = e; } } return max; } | /**
* Returns the first element having the largest value according to the provided {@code comparator} or {@code null} if there are no elements.
*/ | Returns the first element having the largest value according to the provided comparator or null if there are no elements | maxWith | {
"repo_name": "manifold-systems/manifold",
"path": "manifold-deps-parent/manifold-collections/src/main/java/manifold/collections/extensions/java/lang/Iterable/ManIterableExt.java",
"license": "apache-2.0",
"size": 25260
} | [
"java.util.Comparator",
"java.util.Iterator"
] | import java.util.Comparator; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 767,043 |
public static void drawColoredCube(Vector3Cube vector) {
// Top side
GL11.glColor3f(1.0F, 0.0F, 0.0F);
GL11.glNormal3d(0, 1, 0);
addVertex(vector.getMinX(), vector.getMaxY(), vector.getMaxZ());
addVertex(vector.getMaxX(), vector.getMaxY(), vector.getMaxZ());
addVerte... | static void function(Vector3Cube vector) { GL11.glColor3f(1.0F, 0.0F, 0.0F); GL11.glNormal3d(0, 1, 0); addVertex(vector.getMinX(), vector.getMaxY(), vector.getMaxZ()); addVertex(vector.getMaxX(), vector.getMaxY(), vector.getMaxZ()); addVertex(vector.getMaxX(), vector.getMaxY(), vector.getMinZ()); addVertex(vector.getMi... | /**
* Draws a colored cube with the size of vector. Every face has a different color This uses OpenGL
*
* @author Koen Beckers (K4Unl)
* @param vector
*/ | Draws a colored cube with the size of vector. Every face has a different color This uses OpenGL | drawColoredCube | {
"repo_name": "raulsmail/GlowPower",
"path": "src/main/java/com/bluepowermod/client/renderers/RenderHelper.java",
"license": "gpl-3.0",
"size": 32210
} | [
"com.bluepowermod.api.vec.Vector3Cube"
] | import com.bluepowermod.api.vec.Vector3Cube; | import com.bluepowermod.api.vec.*; | [
"com.bluepowermod.api"
] | com.bluepowermod.api; | 2,287,078 |
public void testJavascriptHelperDefAreSerializable() throws Exception {
HelperDef hlprDef = Aura.getDefinitionService().getDefinition("js://test.test_SimpleHelper", HelperDef.class);
assertNotNull("Failed to extract helper def on component.", hlprDef);
this.serializeAndGoldFile(hlprDef);
... | void function() throws Exception { HelperDef hlprDef = Aura.getDefinitionService().getDefinition(STRFailed to extract helper def on component.", hlprDef); this.serializeAndGoldFile(hlprDef); } | /**
* Verify that javascript helper defs are serializable.
*
* @throws Exception
*/ | Verify that javascript helper defs are serializable | testJavascriptHelperDefAreSerializable | {
"repo_name": "lhong375/aura",
"path": "aura-impl/src/test/java/org/auraframework/impl/helper/JavascriptHelperDefTest.java",
"license": "apache-2.0",
"size": 2290
} | [
"org.auraframework.Aura",
"org.auraframework.def.HelperDef"
] | import org.auraframework.Aura; import org.auraframework.def.HelperDef; | import org.auraframework.*; import org.auraframework.def.*; | [
"org.auraframework",
"org.auraframework.def"
] | org.auraframework; org.auraframework.def; | 521,178 |
public void setWidgetFieldFlags(int f) {
field.setInt(COSName.F, f);
} | void function(int f) { field.setInt(COSName.F, f); } | /**
* This will get the field flags that are associated with this field. The F entry in the FDF field dictionary.
*
* @param f The new value for the field flags.
*/ | This will get the field flags that are associated with this field. The F entry in the FDF field dictionary | setWidgetFieldFlags | {
"repo_name": "gavanx/pdflearn",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFField.java",
"license": "apache-2.0",
"size": 20329
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 652,513 |
public static long getLong(Field field) {
return Reflective.getLong(field);
} | static long function(Field field) { return Reflective.getLong(field); } | /**
* Gets the value of a static <code>long</code> field.
*
* @param field Field object whose value is returned.
* @return the value of the <code>long</code> field
*/ | Gets the value of a static <code>long</code> field | getLong | {
"repo_name": "haitaoyao/btrace",
"path": "src/share/classes/com/sun/btrace/BTraceUtils.java",
"license": "gpl-2.0",
"size": 234341
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,733,889 |
@SuppressWarnings("unchecked")
private Collection<ValidRates> getValidRatesForFandA(String rateTypeOnOrOff, ScaleTwoDecimal rate){
Map<String, Object> rateValues = new HashMap<String, Object>();
rateValues.put(rateTypeOnOrOff, rate);
rateValues.put(RATE_CLASS_TYPE, FANDA_RATE_CLASS_TYPE)... | @SuppressWarnings(STR) Collection<ValidRates> function(String rateTypeOnOrOff, ScaleTwoDecimal rate){ Map<String, Object> rateValues = new HashMap<String, Object>(); rateValues.put(rateTypeOnOrOff, rate); rateValues.put(RATE_CLASS_TYPE, FANDA_RATE_CLASS_TYPE); return (Collection<ValidRates>) getKraBusinessObjectService... | /**
* This method returns the valid rates from valid rates table that match the rates attached to the award.
* @return
*/ | This method returns the valid rates from valid rates table that match the rates attached to the award | getValidRatesForFandA | {
"repo_name": "blackcathacker/kc.preclean",
"path": "coeus-code/src/main/java/org/kuali/kra/award/commitments/AwardFandaRateRule.java",
"license": "apache-2.0",
"size": 19069
} | [
"java.util.Collection",
"java.util.HashMap",
"java.util.Map",
"org.kuali.coeus.sys.api.model.ScaleTwoDecimal",
"org.kuali.kra.award.home.ValidRates"
] | import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.kuali.coeus.sys.api.model.ScaleTwoDecimal; import org.kuali.kra.award.home.ValidRates; | import java.util.*; import org.kuali.coeus.sys.api.model.*; import org.kuali.kra.award.home.*; | [
"java.util",
"org.kuali.coeus",
"org.kuali.kra"
] | java.util; org.kuali.coeus; org.kuali.kra; | 2,101,586 |
public void onShowFlags(CommandSender sender, String name) {
if ( name == null) name = sender.getName();
name = name.toLowerCase();
VanishConfig cfg = getVanishConfig(name, false);
if (cfg != null){
if (!cfg.needsSave()) {
sender.sendMessage(SimplyVanish.msgDefaultFlags);
}
else {
sender.sen... | void function(CommandSender sender, String name) { if ( name == null) name = sender.getName(); name = name.toLowerCase(); VanishConfig cfg = getVanishConfig(name, false); if (cfg != null){ if (!cfg.needsSave()) { sender.sendMessage(SimplyVanish.msgDefaultFlags); } else { sender.sendMessage(SimplyVanish.msgLabel+ChatCol... | /**
* Show flags for name to sender, or use the senders name, if name is null.
* @param sender
* @param name
*/ | Show flags for name to sender, or use the senders name, if name is null | onShowFlags | {
"repo_name": "shindouj/SimplyVanish",
"path": "src/main/java/me/asofold/bpl/simplyvanish/SimplyVanishCore.java",
"license": "lgpl-3.0",
"size": 26055
} | [
"me.asofold.bpl.simplyvanish.config.VanishConfig",
"org.bukkit.ChatColor",
"org.bukkit.command.CommandSender"
] | import me.asofold.bpl.simplyvanish.config.VanishConfig; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; | import me.asofold.bpl.simplyvanish.config.*; import org.bukkit.*; import org.bukkit.command.*; | [
"me.asofold.bpl",
"org.bukkit",
"org.bukkit.command"
] | me.asofold.bpl; org.bukkit; org.bukkit.command; | 2,640,881 |
UserTable getRowsWithId(String appName, DbHandle dbHandleName, String tableId,
OrderedColumns orderedColumns, String rowId)
throws ServicesAvailabilityException; | UserTable getRowsWithId(String appName, DbHandle dbHandleName, String tableId, OrderedColumns orderedColumns, String rowId) throws ServicesAvailabilityException; | /**
* Return the row with the most recent changes for the given tableId and rowId.
* If the row has conflicts, it throws an exception. Otherwise, it returns the
* most recent checkpoint or non-checkpoint value; it will contain a single row.
*
* @param appName
* @param dbHandleName
* @param tableId
... | Return the row with the most recent changes for the given tableId and rowId. If the row has conflicts, it throws an exception. Otherwise, it returns the most recent checkpoint or non-checkpoint value; it will contain a single row | getRowsWithId | {
"repo_name": "opendatakit/androidlibrary",
"path": "androidlibrary_lib/src/main/java/org/opendatakit/database/service/UserDbInterface.java",
"license": "apache-2.0",
"size": 50250
} | [
"org.opendatakit.database.data.OrderedColumns",
"org.opendatakit.database.data.UserTable",
"org.opendatakit.exception.ServicesAvailabilityException"
] | import org.opendatakit.database.data.OrderedColumns; import org.opendatakit.database.data.UserTable; import org.opendatakit.exception.ServicesAvailabilityException; | import org.opendatakit.database.data.*; import org.opendatakit.exception.*; | [
"org.opendatakit.database",
"org.opendatakit.exception"
] | org.opendatakit.database; org.opendatakit.exception; | 2,673,354 |
protected RectF computeLayout() {
return getDisplayRect( mMatrix, mCropRect );
} | RectF function() { return getDisplayRect( mMatrix, mCropRect ); } | /**
* Request a layout update.
*
* @return the rect f
*/ | Request a layout update | computeLayout | {
"repo_name": "photo/mobile-android",
"path": "submodules/Android-Feather/src/com/aviary/android/feather/widget/DrawableHighlightView.java",
"license": "apache-2.0",
"size": 27091
} | [
"android.graphics.RectF"
] | import android.graphics.RectF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,425,793 |
public final long getAndUpdate(int i, LongUnaryOperator updateFunction) {
long prev, next;
do {
prev = get(i);
next = updateFunction.applyAsLong(prev);
} while (!compareAndSet(i, prev, next));
return prev;
} | final long function(int i, LongUnaryOperator updateFunction) { long prev, next; do { prev = get(i); next = updateFunction.applyAsLong(prev); } while (!compareAndSet(i, prev, next)); return prev; } | /**
* Atomically updates the element at index {@code i} with the results
* of applying the given function, returning the previous value. The
* function should be side-effect-free, since it may be re-applied
* when attempted updates fail due to contention among threads.
*
* @param i the ind... | Atomically updates the element at index i with the results of applying the given function, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads | getAndUpdate | {
"repo_name": "somexotherxguy/ikvm",
"path": "classpath/java/util/concurrent/atomic/AtomicLongArray.java",
"license": "gpl-2.0",
"size": 10455
} | [
"java.util.function.LongUnaryOperator"
] | import java.util.function.LongUnaryOperator; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,593,959 |
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
| void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>POST</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>POST</code> method | doPost | {
"repo_name": "SergioAravena/AutomatizacionLibretaMedicamentos",
"path": "AutomatizacionLibretaMedicamento/src/java/servlet/ModificarReserva.java",
"license": "gpl-3.0",
"size": 4824
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,292,118 |
private SharedPreferences getPrefs () {
return context.getSharedPreferences(PREF_KEY, Context.MODE_PRIVATE);
} | SharedPreferences function () { return context.getSharedPreferences(PREF_KEY, Context.MODE_PRIVATE); } | /**
* Shared private preferences for the application.
*/ | Shared private preferences for the application | getPrefs | {
"repo_name": "dansanti/cordova-plugin-local-notifications",
"path": "src/android/notification/Notification.java",
"license": "apache-2.0",
"size": 9225
} | [
"android.content.Context",
"android.content.SharedPreferences"
] | import android.content.Context; import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 2,768,477 |
private List<User> removeInvisibleUsers(List<User> users){
//if superuser return list unchanged.
if(sakaiProxy.isSuperUser()){
return users;
}
//get list of invisible users as Users
List<User> invisibleUsers = sakaiProxy.getUsers(sakaiProxy.getInvisibleUsers());
if(invisibleUsers.isEmpty()) {
... | List<User> function(List<User> users){ if(sakaiProxy.isSuperUser()){ return users; } List<User> invisibleUsers = sakaiProxy.getUsers(sakaiProxy.getInvisibleUsers()); if(invisibleUsers.isEmpty()) { return users; } users.removeAll(invisibleUsers); return users; } | /**
* Remove invisible users from the list
* @param users
* @return cleaned list
*/ | Remove invisible users from the list | removeInvisibleUsers | {
"repo_name": "harfalm/Sakai-10.1",
"path": "profile2/impl/src/java/org/sakaiproject/profile2/logic/ProfileSearchLogicImpl.java",
"license": "apache-2.0",
"size": 9520
} | [
"java.util.List",
"org.sakaiproject.user.api.User"
] | import java.util.List; import org.sakaiproject.user.api.User; | import java.util.*; import org.sakaiproject.user.api.*; | [
"java.util",
"org.sakaiproject.user"
] | java.util; org.sakaiproject.user; | 2,823,956 |
public okhttp3.Call deleteCollectionNamespacedNetworkPolicyCall(
String namespace,
String pretty,
String _continue,
String dryRun,
String fieldSelector,
Integer gracePeriodSeconds,
String labelSelector,
Integer limit,
Boolean orphanDependents,
String propaga... | okhttp3.Call function( String namespace, String pretty, String _continue, String dryRun, String fieldSelector, Integer gracePeriodSeconds, String labelSelector, Integer limit, Boolean orphanDependents, String propagationPolicy, String resourceVersion, String resourceVersionMatch, Integer timeoutSeconds, V1DeleteOptions... | /**
* Build call for deleteCollectionNamespacedNetworkPolicy
*
* @param namespace object name and auth scope, such as for teams and projects (required)
* @param pretty If 'true', then the output is pretty printed. (optional)
* @param _continue The continue option should be set when retrieving mor... | Build call for deleteCollectionNamespacedNetworkPolicy | deleteCollectionNamespacedNetworkPolicyCall | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/apis/NetworkingV1Api.java",
"license": "apache-2.0",
"size": 477939
} | [
"io.kubernetes.client.openapi.ApiCallback",
"io.kubernetes.client.openapi.ApiException",
"io.kubernetes.client.openapi.Pair",
"io.kubernetes.client.openapi.models.V1DeleteOptions",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import io.kubernetes.client.openapi.ApiCallback; import io.kubernetes.client.openapi.ApiException; import io.kubernetes.client.openapi.Pair; import io.kubernetes.client.openapi.models.V1DeleteOptions; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import io.kubernetes.client.openapi.*; import io.kubernetes.client.openapi.models.*; import java.util.*; | [
"io.kubernetes.client",
"java.util"
] | io.kubernetes.client; java.util; | 852,415 |
void error(Locator locator, String key);
void error(Locator locator, String key, String arg);
Locator saveLocator(); | void error(Locator locator, String key); void error(Locator locator, String key, String arg); Locator saveLocator(); | /**
* Returns non-volatile Locator, never-null.
*/ | Returns non-volatile Locator, never-null | saveLocator | {
"repo_name": "vandenoever/jing",
"path": "mod/picl/src/main/com/thaiopensource/validate/picl/ErrorContext.java",
"license": "bsd-3-clause",
"size": 409
} | [
"org.xml.sax.Locator"
] | import org.xml.sax.Locator; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 887,421 |
@Override
public RelationsCommonList getCommonPartList() {
return relationList;
} | RelationsCommonList function() { return relationList; } | /**get associated Relation (for index/GET_ALL)
*/ | get associated Relation (for index/GET_ALL) | getCommonPartList | {
"repo_name": "cherryhill/collectionspace-services",
"path": "services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationDocumentModelHandler.java",
"license": "apache-2.0",
"size": 23622
} | [
"org.collectionspace.services.relation.RelationsCommonList"
] | import org.collectionspace.services.relation.RelationsCommonList; | import org.collectionspace.services.relation.*; | [
"org.collectionspace.services"
] | org.collectionspace.services; | 208,878 |
public static Point get_instance(BigInteger p_x, BigInteger p_y,
BigInteger p_z)
{
if (p_z.signum() < 0)
{
// the dominator z of a RationalPoint is expected to be positive
p_x = p_x.negate();
p_y = p_y.negate();
p_z = p_z.negate();
... | static Point function(BigInteger p_x, BigInteger p_y, BigInteger p_z) { if (p_z.signum() < 0) { p_x = p_x.negate(); p_y = p_y.negate(); p_z = p_z.negate(); } if ((p_x.mod(p_z)).signum() == 0 && (p_x.mod(p_z)).signum() == 0) { p_x = p_x.divide(p_z); p_y = p_y.divide(p_z); p_z = BigInteger.ONE; } if (p_z.equals(BigIntege... | /**
* factory method for creating a Point from 3 BigIntegers
*/ | factory method for creating a Point from 3 BigIntegers | get_instance | {
"repo_name": "andrasfuchs/BioBalanceDetector",
"path": "Tools/KiCad_FreeRouting/FreeRouting-miho-master/freerouting-master/src/main/java/eu/mihosoft/freerouting/geometry/planar/Point.java",
"license": "gpl-3.0",
"size": 7191
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 992,001 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.