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
@NotNull @ObjectiveCName("setEnableFilesLogging:") public ConfigurationBuilder setEnableFilesLogging(boolean enableFilesLogging) { this.enableFilesLogging = enableFilesLogging; return this; }
@ObjectiveCName(STR) ConfigurationBuilder function(boolean enableFilesLogging) { this.enableFilesLogging = enableFilesLogging; return this; }
/** * Set Enable file operations loggging * * @param enableFilesLogging Enable files logging * @return this */
Set Enable file operations loggging
setEnableFilesLogging
{ "repo_name": "ufosky-server/actor-platform", "path": "actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/ConfigurationBuilder.java", "license": "agpl-3.0", "size": 13080 }
[ "com.google.j2objc.annotations.ObjectiveCName" ]
import com.google.j2objc.annotations.ObjectiveCName;
import com.google.j2objc.annotations.*;
[ "com.google.j2objc" ]
com.google.j2objc;
231,376
public byte[] serialize( Object object ) throws IOException { ParentIdAndRdn parentIdAndRdn = ( ParentIdAndRdn ) object; try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream( baos ) ) { // First, the Dn ...
byte[] function( Object object ) throws IOException { ParentIdAndRdn parentIdAndRdn = ( ParentIdAndRdn ) object; try ( ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream( baos ) ) { Rdn[] rdns = parentIdAndRdn.getRdns(); if ( ( rdns == null ) ( rdns.length == 0 ) ) { out...
/** * <p> * * This is the place where we serialize ParentIdAndRdn * <p> */
This is the place where we serialize ParentIdAndRdn
serialize
{ "repo_name": "drankye/directory-server", "path": "jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ParentIdAndRdnSerializer.java", "license": "apache-2.0", "size": 5561 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "org.apache.directory.api.ldap.model.name.Rdn", "org.apache.directory.server.xdbm.ParentIdAndRdn" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import org.apache.directory.api.ldap.model.name.Rdn; import org.apache.directory.server.xdbm.ParentIdAndRdn;
import java.io.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.server.xdbm.*;
[ "java.io", "org.apache.directory" ]
java.io; org.apache.directory;
2,671,420
private void trainDocVectors() throws IOException { VerbatimLogger.info("Building document vectors ... "); Enumeration<ObjectVector> termEnum = termVectors.getAllVectors(); try { int tc = 0; while (termEnum.hasMoreElements()) { // Output progress counter. if ((tc % 10000 == 0) ...
void function() throws IOException { VerbatimLogger.info(STR); Enumeration<ObjectVector> termEnum = termVectors.getAllVectors(); try { int tc = 0; while (termEnum.hasMoreElements()) { if ((tc % 10000 == 0) (tc < 10000 && tc % 1000 == 0)) { VerbatimLogger.info(STR + tc + STR); } tc++; ObjectVector termVectorObject = ter...
/** * Creates doc vectors, iterating over terms. */
Creates doc vectors, iterating over terms
trainDocVectors
{ "repo_name": "anhth12/semanticvectors", "path": "src/main/java/pitt/search/semanticvectors/DocVectors.java", "license": "bsd-3-clause", "size": 7848 }
[ "java.io.IOException", "java.util.Enumeration", "org.apache.lucene.index.DocsEnum", "org.apache.lucene.index.Term", "org.apache.lucene.index.TermsEnum", "pitt.search.semanticvectors.utils.VerbatimLogger", "pitt.search.semanticvectors.vectors.Vector" ]
import java.io.IOException; import java.util.Enumeration; import org.apache.lucene.index.DocsEnum; import org.apache.lucene.index.Term; import org.apache.lucene.index.TermsEnum; import pitt.search.semanticvectors.utils.VerbatimLogger; import pitt.search.semanticvectors.vectors.Vector;
import java.io.*; import java.util.*; import org.apache.lucene.index.*; import pitt.search.semanticvectors.utils.*; import pitt.search.semanticvectors.vectors.*;
[ "java.io", "java.util", "org.apache.lucene", "pitt.search.semanticvectors" ]
java.io; java.util; org.apache.lucene; pitt.search.semanticvectors;
1,123,279
public Map<String, String> getTypeReplacement() { return typeReplacement; }
Map<String, String> function() { return typeReplacement; }
/** * Gets replacement map for column types used for DDL generation. */
Gets replacement map for column types used for DDL generation
getTypeReplacement
{ "repo_name": "pellcorp/jailer", "path": "src/main/net/sf/jailer/Configuration.java", "license": "apache-2.0", "size": 14326 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
124,228
public static <E extends Named> List<E> sortByName(Collection<E> items) { Map<String, E> sorter = new TreeMap<String, E>(); for (E item : items) sorter.put(item.getName(), item); List<E> result = new Vector<E>(items.size()); result.addAll(sorter.values()); return result; ...
static <E extends Named> List<E> function(Collection<E> items) { Map<String, E> sorter = new TreeMap<String, E>(); for (E item : items) sorter.put(item.getName(), item); List<E> result = new Vector<E>(items.size()); result.addAll(sorter.values()); return result; }
/** * Sort the items by name. * * @param items - the items to sort. * @return The items, sorted by name. */
Sort the items by name
sortByName
{ "repo_name": "StefanTT/sbhome", "path": "selfbus-sbhome-service/src/main/java/org/selfbus/sbhome/service/misc/SortUtils.java", "license": "gpl-3.0", "size": 1775 }
[ "java.util.Collection", "java.util.List", "java.util.Map", "java.util.TreeMap", "java.util.Vector", "org.selfbus.sbhome.service.model.base.Named" ]
import java.util.Collection; import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.Vector; import org.selfbus.sbhome.service.model.base.Named;
import java.util.*; import org.selfbus.sbhome.service.model.base.*;
[ "java.util", "org.selfbus.sbhome" ]
java.util; org.selfbus.sbhome;
714,160
public void setSlotMethodList(Hashtable<String, Method> methodList) { this.methodList = methodList; }
void function(Hashtable<String, Method> methodList) { this.methodList = methodList; }
/** * Sets the slot method list. * @param methodList the methodList to set */
Sets the slot method list
setSlotMethodList
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/de.enflexit.common/src/de/enflexit/common/ontology/OntologySingleClassSlotDescription.java", "license": "lgpl-2.1", "size": 6447 }
[ "java.lang.reflect.Method", "java.util.Hashtable" ]
import java.lang.reflect.Method; import java.util.Hashtable;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,586,634
return FinalFieldBean.Meta.INSTANCE; } static { MetaBean.register(FinalFieldBean.Meta.INSTANCE); }
return FinalFieldBean.Meta.INSTANCE; } static { MetaBean.register(FinalFieldBean.Meta.INSTANCE); }
/** * The meta-bean for {@code FinalFieldBean}. * @return the meta-bean, not null */
The meta-bean for FinalFieldBean
meta
{ "repo_name": "JodaOrg/joda-beans", "path": "src/test/java/org/joda/beans/sample/FinalFieldBean.java", "license": "apache-2.0", "size": 15410 }
[ "org.joda.beans.MetaBean" ]
import org.joda.beans.MetaBean;
import org.joda.beans.*;
[ "org.joda.beans" ]
org.joda.beans;
1,779,301
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); Map parameters = ec.getRequestParameterMap(); Set names = parameters.keySet(); List<RequestParameter> list = new LinkedList<RequestParameter>(); if (names != null && !names.isEmpty()) { Iterator iter = names.iterator(); w...
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext(); Map parameters = ec.getRequestParameterMap(); Set names = parameters.keySet(); List<RequestParameter> list = new LinkedList<RequestParameter>(); if (names != null && !names.isEmpty()) { Iterator iter = names.iterator(); while (iter.hasNext()) ...
/** * Gets the request parameters. * * @return the request parameters */
Gets the request parameters
getRequestParameters
{ "repo_name": "Esleelkartea/aonGTA", "path": "aongta_v1.0.0_src/Fuentes y JavaDoc/aon-ui-form/src/com/code/aon/ui/form/RequestController.java", "license": "gpl-2.0", "size": 3787 }
[ "java.util.Iterator", "java.util.LinkedList", "java.util.List", "java.util.Map", "java.util.Set", "javax.faces.context.ExternalContext", "javax.faces.context.FacesContext", "javax.faces.el.ValueBinding" ]
import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import javax.faces.el.ValueBinding;
import java.util.*; import javax.faces.context.*; import javax.faces.el.*;
[ "java.util", "javax.faces" ]
java.util; javax.faces;
2,618,336
public Arena getSelectedArena() { return selectedArena; }
Arena function() { return selectedArena; }
/** * Get the selected arena using the /select command. * Many other commands will use this selected arena. * * @return The selected arena. */
Get the selected arena using the /select command. Many other commands will use this selected arena
getSelectedArena
{ "repo_name": "GameBoxx/GameBoxx", "path": "src/main/java/info/gameboxx/gameboxx/user/User.java", "license": "mit", "size": 5951 }
[ "info.gameboxx.gameboxx.game.Arena" ]
import info.gameboxx.gameboxx.game.Arena;
import info.gameboxx.gameboxx.game.*;
[ "info.gameboxx.gameboxx" ]
info.gameboxx.gameboxx;
18,698
@Test public void fromInputStreamsIterable_Multiple_asBufferedImages() throws IOException { // given InputStream is1 = new FileInputStream("src/test/resources/Thumbnailator/grid.png"); InputStream is2 = new FileInputStream("src/test/resources/Thumbnailator/grid.png"); // when List<BufferedIm...
void function() throws IOException { InputStream is1 = new FileInputStream(STR); InputStream is2 = new FileInputStream(STR); List<BufferedImage> thumbnails = Thumbnails.fromInputStreams((Iterable<InputStream>)Arrays.asList(is1, is2)) .size(100, 100) .asBufferedImages(); assertEquals(2, thumbnails.size()); assertEquals(...
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>Thumbnails.fromImages(Iterable[InputStream, InputStream])</li> * <li>asBufferedImage()</li> * </ol> * and the expected outcome is, * <ol> * <li>An IllegalStateException is thrown.</li> * </ol> */
Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.fromImages(Iterable[InputStream, InputStream]) asBufferedImage() and the expected outcome is, An IllegalStateException is thrown.
fromInputStreamsIterable_Multiple_asBufferedImages
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.awt.image.BufferedImage", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.util.Arrays", "java.util.List", "org.junit.Assert" ]
import java.awt.image.BufferedImage; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.List; import org.junit.Assert;
import java.awt.image.*; import java.io.*; import java.util.*; import org.junit.*;
[ "java.awt", "java.io", "java.util", "org.junit" ]
java.awt; java.io; java.util; org.junit;
272,366
@BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final EntityTypesClient create(EntityTypesStub stub) { return new EntityTypesClient(stub); } protected EntityTypesClient(EntityTypesSettings settings) throws IOException { this.settings = settings; ...
@BetaApi(STR) static final EntityTypesClient function(EntityTypesStub stub) { return new EntityTypesClient(stub); } protected EntityTypesClient(EntityTypesSettings settings) throws IOException { this.settings = settings; this.stub = ((EntityTypesStubSettings) settings.getStubSettings()).createStub(); this.operationsCli...
/** * Constructs an instance of EntityTypesClient, using the given stub for making calls. This is for * advanced usage - prefer using create(EntityTypesSettings). */
Constructs an instance of EntityTypesClient, using the given stub for making calls. This is for advanced usage - prefer using create(EntityTypesSettings)
create
{ "repo_name": "googleapis/java-dialogflow", "path": "google-cloud-dialogflow/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesClient.java", "license": "apache-2.0", "size": 95463 }
[ "com.google.api.core.BetaApi", "com.google.cloud.dialogflow.v2.stub.EntityTypesStub", "com.google.cloud.dialogflow.v2.stub.EntityTypesStubSettings", "com.google.longrunning.OperationsClient", "java.io.IOException" ]
import com.google.api.core.BetaApi; import com.google.cloud.dialogflow.v2.stub.EntityTypesStub; import com.google.cloud.dialogflow.v2.stub.EntityTypesStubSettings; import com.google.longrunning.OperationsClient; import java.io.IOException;
import com.google.api.core.*; import com.google.cloud.dialogflow.v2.stub.*; import com.google.longrunning.*; import java.io.*;
[ "com.google.api", "com.google.cloud", "com.google.longrunning", "java.io" ]
com.google.api; com.google.cloud; com.google.longrunning; java.io;
521,225
public Set<String> getFkTables() { Set<String> result = new HashSet<String>(); // Loop through all the columns in the row. for (DbColumn column : columns) { String fkTable = column.getFkTable(); // Check whether this column has a foreign key constraint. if (fkTable != null) { // Yes: ...
Set<String> function() { Set<String> result = new HashSet<String>(); for (DbColumn column : columns) { String fkTable = column.getFkTable(); if (fkTable != null) { result.add(fkTable); } } return result; }
/** * Provides the names of the tables that are foreign keys. * * @return a {@code Set<String>} with the names of the tables that are foreign keys. */
Provides the names of the tables that are foreign keys
getFkTables
{ "repo_name": "lockss/lockss-daemon", "path": "src/org/lockss/db/DbRow.java", "license": "bsd-3-clause", "size": 5341 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,585,174
public void start() throws IOException { setupServerSocket(50); // The listener reference is released upon shutdown(). if (listener == null) { listener = new Thread(this, "XML-RPC Weblistener"); // Not marked as daemon thread since run directly via main(). listener.start(); } }
void function() throws IOException { setupServerSocket(50); if (listener == null) { listener = new Thread(this, STR); listener.start(); } }
/** * Spawns a new thread which binds this server to the port it's * configured to accept connections on. * * @see #run() * @throws IOException Binding the server socket failed. */
Spawns a new thread which binds this server to the port it's configured to accept connections on
start
{ "repo_name": "mmohan01/ReFactory", "path": "data/apachexmlrpc/apachexmlrpc-3.0/xmlrpc-3.0/server/src/main/java/org/apache/xmlrpc/webserver/WebServer.java", "license": "mit", "size": 12225 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
796,850
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public void activation(String systemName) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); activation(user, systemName); }
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) void function(String systemName) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); activation(user, systemName); }
/** * Ativation. * if delete flag is exists and delete flag is true, delete flug is false to activate. * @param systemName systemName */
Ativation. if delete flag is exists and delete flag is true, delete flug is false to activate
activation
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/web/dao/gen/GenMailConfigsDao.java", "license": "apache-2.0", "size": 17202 }
[ "org.support.project.aop.Aspect", "org.support.project.di.Container", "org.support.project.ormapping.common.DBUserPool" ]
import org.support.project.aop.Aspect; import org.support.project.di.Container; import org.support.project.ormapping.common.DBUserPool;
import org.support.project.aop.*; import org.support.project.di.*; import org.support.project.ormapping.common.*;
[ "org.support.project" ]
org.support.project;
1,267,190
public void adicionar( Permission permission ) throws SecurityException { SecurityManager sm = System.getSecurityManager(); if( sm != null ) sm.checkPermission( new SecurityPermission( "setPolicy" ) ); Class<?> classe = permission.getClass(); List<Permission> lista = permissoes.get( classe ); if( lis...
void function( Permission permission ) throws SecurityException { SecurityManager sm = System.getSecurityManager(); if( sm != null ) sm.checkPermission( new SecurityPermission( STR ) ); Class<?> classe = permission.getClass(); List<Permission> lista = permissoes.get( classe ); if( lista == null ) permissoes.put( classe...
/** * Adiciona uma {@link Permission}.<br> * Exige-se <code>SecurityPermission("setPolicy")</code>. * @throws SecurityException caso {@link Policy#setPolicy(Policy)} protegida. */
Adiciona uma <code>Permission</code>. Exige-se <code>SecurityPermission("setPolicy")</code>
adicionar
{ "repo_name": "joseflaviojr/urucum", "path": "src/main/java/com/joseflavio/urucum/seguranca/SimplesPolicy.java", "license": "lgpl-3.0", "size": 4511 }
[ "java.security.AllPermission", "java.security.Permission", "java.security.SecurityPermission", "java.util.ArrayList", "java.util.List" ]
import java.security.AllPermission; import java.security.Permission; import java.security.SecurityPermission; import java.util.ArrayList; import java.util.List;
import java.security.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
1,780,969
@ApiModelProperty(example = "CalculatorDoc", required = true, value = "") public String getName() { return name; }
@ApiModelProperty(example = STR, required = true, value = "") String function() { return name; }
/** * Get name * @return name **/
Get name
getName
{ "repo_name": "jaadds/product-apim", "path": "sample-scenarios/clients/publisher/src/main/java/org/wso2/carbon/apimgt/samples/utils/publisher/rest/client/model/Document.java", "license": "apache-2.0", "size": 8097 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
693,257
public List<Long> getAllHarvestedDataverseIds(){ String qstr = "SELECT h.dataverse_id FROM harvestingclient h;"; return em.createNativeQuery(qstr) .getResultList(); }
List<Long> function(){ String qstr = STR; return em.createNativeQuery(qstr) .getResultList(); }
/** * Used to exclude Harvested Data from the Mydata page * * @return */
Used to exclude Harvested Data from the Mydata page
getAllHarvestedDataverseIds
{ "repo_name": "ekoi/DANS-DVN-4.6.1", "path": "src/main/java/edu/harvard/iq/dataverse/DvObjectServiceBean.java", "license": "apache-2.0", "size": 9147 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,676,711
private static Collection<String> initDatabaseTypes(String commandLineDbType) { ArrayList<String> dbTypes = new ArrayList<String>(); if (commandLineDbType.trim().equalsIgnoreCase("all")) { dbTypes.addAll(DbDialectUtils.getSupportedDatabaseTypes()); } else { dbTypes.add(commandLineDbType); ...
static Collection<String> function(String commandLineDbType) { ArrayList<String> dbTypes = new ArrayList<String>(); if (commandLineDbType.trim().equalsIgnoreCase("all")) { dbTypes.addAll(DbDialectUtils.getSupportedDatabaseTypes()); } else { dbTypes.add(commandLineDbType); } return dbTypes; }
/** * Gets the selected database types. * * @return a singleton collection containing the String passed in, except if the type is ALL * (case insensitive), in which case all supported database types are returned, not null */
Gets the selected database types
initDatabaseTypes
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-UtilDB/src/main/java/com/opengamma/util/db/tool/DbTool.java", "license": "apache-2.0", "size": 22555 }
[ "java.util.ArrayList", "java.util.Collection" ]
import java.util.ArrayList; import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,712,653
public HttpRequest form(final Object name, final Object value, String charset) throws HttpRequestException { final boolean first = !form; if (first) { contentType(CONTENT_TYPE_FORM, charset); form = true; } charset = getValidCharset(charset)...
HttpRequest function(final Object name, final Object value, String charset) throws HttpRequestException { final boolean first = !form; if (first) { contentType(CONTENT_TYPE_FORM, charset); form = true; } charset = getValidCharset(charset); try { openOutput(); if (!first) output.write('&'); output.write(URLEncoder.encod...
/** * Write the name/value pair as form data to the request body * <p> * The values specified will be URL-encoded and sent with the * 'application/x-www-form-urlencoded' content-type * * @param name * @param value * @param charset * @return this request * @thr...
Write the name/value pair as form data to the request body The values specified will be URL-encoded and sent with the 'application/x-www-form-urlencoded' content-type
form
{ "repo_name": "h42i/Hasi-App", "path": "app/src/main/java/org/hasi/apps/hasi/HttpRequest.java", "license": "gpl-3.0", "size": 101719 }
[ "java.io.IOException", "java.net.URLEncoder" ]
import java.io.IOException; import java.net.URLEncoder;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,514,007
public static Account getSyncAccount(Context context) { // Get an instance of the Android account manager AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); // Create the account type and default account Account newAcc...
static Account function(Context context) { AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); Account newAccount = new Account( context.getString(R.string.app_name), context.getString(R.string.sync_account_type)); if (null == accountManager.getPassword(newAccount)) { if ...
/** * Helper method to get the fake account to be used with SyncAdapter, or make a new one * if the fake account doesn't exist yet. If we make a new account, we call the * onAccountCreated method so we can initialize things. * * @param context The context used to access the account service ...
Helper method to get the fake account to be used with SyncAdapter, or make a new one if the fake account doesn't exist yet. If we make a new account, we call the onAccountCreated method so we can initialize things
getSyncAccount
{ "repo_name": "KamilSwojak/advanced-android-development", "path": "app/src/main/java/com/example/android/sunshine/app/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 29761 }
[ "android.accounts.Account", "android.accounts.AccountManager", "android.content.Context" ]
import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context;
import android.accounts.*; import android.content.*;
[ "android.accounts", "android.content" ]
android.accounts; android.content;
512,451
public File getCurrentFile() { return this.saveFile; }
File function() { return this.saveFile; }
/** * shows the current name for the file. * @return the current name for the file. */
shows the current name for the file
getCurrentFile
{ "repo_name": "autoplot/app", "path": "dasCore/src/org/das2/components/DataPointRecorderNew.java", "license": "gpl-2.0", "size": 63202 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,731,526
private Range maybeMergeSibling(DebugContext debugContext) { Range sibling = getSiblingCallee(); debugContext.log(DebugContext.DETAILED_LEVEL, "Merge subrange (maybe) [0x%x, 0x%x] %s", lo, hi, getFullMethodNameWithParams()); if (sibling == null) { return null; ...
Range function(DebugContext debugContext) { Range sibling = getSiblingCallee(); debugContext.log(DebugContext.DETAILED_LEVEL, STR, lo, hi, getFullMethodNameWithParams()); if (sibling == null) { return null; } if (hi < sibling.lo) { return sibling; } if (getMethodEntry() != sibling.getMethodEntry()) { return sibling; } ...
/** * Removes and merges the next sibling returning the current node or it skips past the current * node as is and returns the next sibling or null if no sibling exists. */
Removes and merges the next sibling returning the current node or it skips past the current node as is and returns the next sibling or null if no sibling exists
maybeMergeSibling
{ "repo_name": "smarr/Truffle", "path": "substratevm/src/com.oracle.objectfile/src/com/oracle/objectfile/debugentry/Range.java", "license": "gpl-2.0", "size": 13000 }
[ "org.graalvm.compiler.debug.DebugContext" ]
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.debug.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
161,579
public static final File[] getDiskDirs() { return new File[] {getDiskDir()}; }
static final File[] function() { return new File[] {getDiskDir()}; }
/** * Return a set of disk directories for persistence tests. These directories will be automatically * cleaned up on test case closure. */
Return a set of disk directories for persistence tests. These directories will be automatically cleaned up on test case closure
getDiskDirs
{ "repo_name": "prasi-in/geode", "path": "geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java", "license": "apache-2.0", "size": 20414 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
298,038
public void setDestdir(final File dir) { this.destDir = dir; }
void function(final File dir) { this.destDir = dir; }
/** * Handles the <code>destdir</code> attribute. * @param dir the attribute value converted to a File. */
Handles the <code>destdir</code> attribute
setDestdir
{ "repo_name": "srnsw/xena", "path": "plugins/audio/ext/src/jspeex/src/java/org/xiph/speex/ant/JSpeexEncoderTask.java", "license": "gpl-3.0", "size": 21159 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,665,664
public int parties() throws RemoteException; }
int function() throws RemoteException; }
/** * DOCUMENT ME! * * @return DOCUMENT ME! * * @throws RemoteException DOCUMENT ME! */
DOCUMENT ME
parties
{ "repo_name": "ACS-Community/ACS", "path": "Benchmark/components/src/com/cosylab/distsync/RemoteCyclicBarrier.java", "license": "lgpl-2.1", "size": 1194 }
[ "java.rmi.RemoteException" ]
import java.rmi.RemoteException;
import java.rmi.*;
[ "java.rmi" ]
java.rmi;
2,689,596
protected TextContainer doDecode(AbstractImageContainer image) { TextContainer result; try { BufferedImage img = image.toBufferedImage(); int width = img.getWidth(); int height = img.getHeight(); LuminanceSource source = new RGBLuminanceSource(width, height, img.getRGB(0, 0, width, h...
TextContainer function(AbstractImageContainer image) { TextContainer result; try { BufferedImage img = image.toBufferedImage(); int width = img.getWidth(); int height = img.getHeight(); LuminanceSource source = new RGBLuminanceSource(width, height, img.getRGB(0, 0, width, height, null, 0, width)); BinaryBitmap bitmap =...
/** * Performs the actual decoding. * * @param image the image to extract the barcode from * @return a TextContainer with the decoded barcode text and (optional) meta-data */
Performs the actual decoding
doDecode
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-imaging/src/main/java/adams/data/barcode/decode/MultiQRCode.java", "license": "gpl-3.0", "size": 6844 }
[ "com.google.zxing.BinaryBitmap", "com.google.zxing.DecodeHintType", "com.google.zxing.LuminanceSource", "com.google.zxing.RGBLuminanceSource", "com.google.zxing.Result", "com.google.zxing.ResultMetadataType", "com.google.zxing.ResultPoint", "com.google.zxing.common.HybridBinarizer", "com.google.zxin...
import com.google.zxing.BinaryBitmap; import com.google.zxing.DecodeHintType; import com.google.zxing.LuminanceSource; import com.google.zxing.RGBLuminanceSource; import com.google.zxing.Result; import com.google.zxing.ResultMetadataType; import com.google.zxing.ResultPoint; import com.google.zxing.common.HybridBinariz...
import com.google.zxing.*; import com.google.zxing.common.*; import com.google.zxing.multi.*; import com.google.zxing.multi.qrcode.*; import java.awt.image.*; import java.util.*; import java.util.logging.*;
[ "com.google.zxing", "java.awt", "java.util" ]
com.google.zxing; java.awt; java.util;
449,249
try { jdbcTemplate.execute("SELECT pg_advisory_lock(" + lockNum + ")"); return callable.call(); } catch (SQLException e) { throw new FlywaySqlException("Unable to acquire Flyway advisory lock", e); } catch (Exception e) { RuntimeException rethrow; ...
try { jdbcTemplate.execute(STR + lockNum + ")"); return callable.call(); } catch (SQLException e) { throw new FlywaySqlException(STR, e); } catch (Exception e) { RuntimeException rethrow; if (e instanceof RuntimeException) { rethrow = (RuntimeException) e; } else { rethrow = new FlywayException(e); } throw rethrow; } f...
/** * Executes this callback with an advisory lock. * * @param callable The callback to execute. * @return The result of the callable code. */
Executes this callback with an advisory lock
execute
{ "repo_name": "pradheeps/flyway", "path": "flyway-core/src/main/java/org/flywaydb/core/internal/dbsupport/postgresql/PostgreSQLAdvisoryLockTemplate.java", "license": "apache-2.0", "size": 3059 }
[ "java.sql.SQLException", "org.flywaydb.core.api.FlywayException", "org.flywaydb.core.internal.dbsupport.FlywaySqlException" ]
import java.sql.SQLException; import org.flywaydb.core.api.FlywayException; import org.flywaydb.core.internal.dbsupport.FlywaySqlException;
import java.sql.*; import org.flywaydb.core.api.*; import org.flywaydb.core.internal.dbsupport.*;
[ "java.sql", "org.flywaydb.core" ]
java.sql; org.flywaydb.core;
2,408,215
public static GsonConverterFactory create(Gson gson) { return new GsonConverterFactory(gson); } private final Gson gson; private GsonConverterFactory(Gson gson) { if (gson == null) throw new NullPointerException("gson == null"); this.gson = gson; }
static GsonConverterFactory function(Gson gson) { return new GsonConverterFactory(gson); } private final Gson gson; private GsonConverterFactory(Gson gson) { if (gson == null) throw new NullPointerException(STR); this.gson = gson; }
/** * Create an instance using {@code gson} for conversion. Encoding to JSON and * decoding from JSON (when no charset is specified by a header) will use UTF-8. */
Create an instance using gson for conversion. Encoding to JSON and decoding from JSON (when no charset is specified by a header) will use UTF-8
create
{ "repo_name": "JeremyAiYt/MyApp", "path": "app/src/main/java/com/shaojun/myapp/network/http/converter/GsonConverterFactory.java", "license": "apache-2.0", "size": 2760 }
[ "com.google.gson.Gson" ]
import com.google.gson.Gson;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,077,859
@Deprecated @ToBeRemovedInVersion(major = 1, minor = 9) <T extends Descriptor> T find(Class<T> type, String value);
@ToBeRemovedInVersion(major = 1, minor = 9) <T extends Descriptor> T find(Class<T> type, String value);
/** * Finds a {@link Descriptor} by an indexed property.. * * @param type * The type. * @param value * The full qualified name. * @return The {@link Descriptor}. */
Finds a <code>Descriptor</code> by an indexed property.
find
{ "repo_name": "buschmais/jqa-core-framework", "path": "store/src/main/java/com/buschmais/jqassistant/core/store/api/Store.java", "license": "gpl-3.0", "size": 7661 }
[ "com.buschmais.jqassistant.core.shared.annotation.ToBeRemovedInVersion", "com.buschmais.jqassistant.core.store.api.model.Descriptor" ]
import com.buschmais.jqassistant.core.shared.annotation.ToBeRemovedInVersion; import com.buschmais.jqassistant.core.store.api.model.Descriptor;
import com.buschmais.jqassistant.core.shared.annotation.*; import com.buschmais.jqassistant.core.store.api.model.*;
[ "com.buschmais.jqassistant" ]
com.buschmais.jqassistant;
1,358,351
protected boolean isValidFragment(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) || BoardsPreferenceFragment.class.getName().equals(fragmentName) || NotificationPreferenceFragment.class.getName().equals(fragmentName); }
boolean function(String fragmentName) { return PreferenceFragment.class.getName().equals(fragmentName) BoardsPreferenceFragment.class.getName().equals(fragmentName) NotificationPreferenceFragment.class.getName().equals(fragmentName); }
/** * This method stops fragment injection in malicious applications. * Make sure to deny any unknown fragments here. */
This method stops fragment injection in malicious applications. Make sure to deny any unknown fragments here
isValidFragment
{ "repo_name": "EmmanuelMess/Dollars-Android-App", "path": "TheDollarsCommunity/app/src/main/java/org/dollars_bbs/thedollarscommunity/activities/SettingsActivity.java", "license": "cc0-1.0", "size": 10224 }
[ "android.preference.PreferenceFragment" ]
import android.preference.PreferenceFragment;
import android.preference.*;
[ "android.preference" ]
android.preference;
2,067,474
public static AuthenticationResult getAuthenticationResult(final RequestContext ctx) { return ctx.getConversationScope().get(PARAMETER_AUTHENTICATION_RESULT, AuthenticationResult.class); }
static AuthenticationResult function(final RequestContext ctx) { return ctx.getConversationScope().get(PARAMETER_AUTHENTICATION_RESULT, AuthenticationResult.class); }
/** * Gets authentication result builder. * * @param ctx the ctx * @return the authentication context builder */
Gets authentication result builder
getAuthenticationResult
{ "repo_name": "doodelicious/cas", "path": "core/cas-server-core-web/src/main/java/org/apereo/cas/web/support/WebUtils.java", "license": "apache-2.0", "size": 32168 }
[ "org.apereo.cas.authentication.AuthenticationResult", "org.springframework.webflow.execution.RequestContext" ]
import org.apereo.cas.authentication.AuthenticationResult; import org.springframework.webflow.execution.RequestContext;
import org.apereo.cas.authentication.*; import org.springframework.webflow.execution.*;
[ "org.apereo.cas", "org.springframework.webflow" ]
org.apereo.cas; org.springframework.webflow;
368,300
private void animatePropertyBy(int constantName, float startValue, float byValue) { // First, cancel any existing animations on this property if (mAnimatorMap.size() > 0) { Animator animatorToCancel = null; Set<Animator> animatorSet = mAnimatorMap.keySet(); for (A...
void function(int constantName, float startValue, float byValue) { if (mAnimatorMap.size() > 0) { Animator animatorToCancel = null; Set<Animator> animatorSet = mAnimatorMap.keySet(); for (Animator runningAnim : animatorSet) { PropertyBundle bundle = mAnimatorMap.get(runningAnim); if (bundle.cancel(constantName)) { if (...
/** * Utility function, called by animateProperty() and animatePropertyBy(), which handles the * details of adding a pending animation and posting the request to start the animation. * * @param constantName The specifier for the property being animated * @param startValue The starting value of ...
Utility function, called by animateProperty() and animatePropertyBy(), which handles the details of adding a pending animation and posting the request to start the animation
animatePropertyBy
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/view/ViewPropertyAnimator.java", "license": "apache-2.0", "size": 47024 }
[ "android.animation.Animator", "java.util.Set" ]
import android.animation.Animator; import java.util.Set;
import android.animation.*; import java.util.*;
[ "android.animation", "java.util" ]
android.animation; java.util;
2,624,182
@JsonIgnore public static String getCache(String layerId) { return JedisManager.get(KEY + layerId); }
static String function(String layerId) { return JedisManager.get(KEY + layerId); }
/** * Gets saved layer from redis * * @param layerId * @return layer as JSON String */
Gets saved layer from redis
getCache
{ "repo_name": "uhef/Oskari-Routing", "path": "service-wfs/src/main/java/fi/nls/oskari/wfs/pojo/WFSLayerStore.java", "license": "mit", "size": 15769 }
[ "fi.nls.oskari.cache.JedisManager" ]
import fi.nls.oskari.cache.JedisManager;
import fi.nls.oskari.cache.*;
[ "fi.nls.oskari" ]
fi.nls.oskari;
2,597,877
static TRetEnviCTe enviaCte(ConfiguracoesCte config, TEnviCTe enviCTe) throws CteException { try { String xml = XmlCteUtil.objectToXml(enviCTe); OMElement ome = AXIOMUtil.stringToOM(xml); if (config.getEstado().equals(EstadosEnum.PR) || config.getE...
static TRetEnviCTe enviaCte(ConfiguracoesCte config, TEnviCTe enviCTe) throws CteException { try { String xml = XmlCteUtil.objectToXml(enviCTe); OMElement ome = AXIOMUtil.stringToOM(xml); if (config.getEstado().equals(EstadosEnum.PR) config.getEstado().equals(EstadosEnum.MT) config.getEstado().equals(EstadosEnum.MS)) {...
/** * Metodo para Enviar a CTE * * @param config * @param enviCTe * @return TRetEnviCTe * @throws CteException */
Metodo para Enviar a CTE
enviaCte
{ "repo_name": "Samuel-Oliveira/Java_CTe", "path": "src/main/java/br/com/swconsultoria/cte/EnvioCte.java", "license": "mit", "size": 4406 }
[ "br.com.swconsultoria.cte.dom.ConfiguracoesCte", "br.com.swconsultoria.cte.dom.enuns.EstadosEnum", "br.com.swconsultoria.cte.dom.enuns.ServicosEnum", "br.com.swconsultoria.cte.exception.CteException", "br.com.swconsultoria.cte.schema_300.enviCTe.TEnviCTe", "br.com.swconsultoria.cte.schema_300.retEnviCTe.T...
import br.com.swconsultoria.cte.dom.ConfiguracoesCte; import br.com.swconsultoria.cte.dom.enuns.EstadosEnum; import br.com.swconsultoria.cte.dom.enuns.ServicosEnum; import br.com.swconsultoria.cte.exception.CteException; import br.com.swconsultoria.cte.schema_300.enviCTe.TEnviCTe; import br.com.swconsultoria.cte.schema...
import br.com.swconsultoria.cte.dom.*; import br.com.swconsultoria.cte.dom.enuns.*; import br.com.swconsultoria.cte.exception.*; import br.com.swconsultoria.cte.schema_300.*; import br.com.swconsultoria.cte.util.*; import br.com.swconsultoria.cte.wsdl.*; import java.rmi.*; import java.util.*; import javax.xml.bind.*; i...
[ "br.com.swconsultoria", "java.rmi", "java.util", "javax.xml", "org.apache.axiom" ]
br.com.swconsultoria; java.rmi; java.util; javax.xml; org.apache.axiom;
2,547,579
public ServiceCall postRequiredIntegerParameterAsync(int bodyParameter, final ServiceCallback<Error> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); }
ServiceCall function(int bodyParameter, final ServiceCallback<Error> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); }
/** * Test explicitly required integer. Please put null and the client library should throw before the request is sent. * * @param bodyParameter the int value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown ...
Test explicitly required integer. Please put null and the client library should throw before the request is sent
postRequiredIntegerParameterAsync
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/requiredoptional/ExplicitOperationsImpl.java", "license": "mit", "size": 87382 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,310,094
public static <E, K> int binarySearch( List<E> list, Function<? super E, K> keyFunction, @Nullable K key, Comparator<? super K> keyComparator, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { return binarySearch( Lists.transform(list, keyF...
static <E, K> int function( List<E> list, Function<? super E, K> keyFunction, @Nullable K key, Comparator<? super K> keyComparator, KeyPresentBehavior presentBehavior, KeyAbsentBehavior absentBehavior) { return binarySearch( Lists.transform(list, keyFunction), key, keyComparator, presentBehavior, absentBehavior); }
/** * Binary searches the list for the specified key, using the specified key function. * * <p>Equivalent to * {@link #binarySearch(List, Object, Comparator, KeyPresentBehavior, KeyAbsentBehavior)} using * {@link Lists#transform(List, Function) Lists.transform(list, keyFunction)}. */
Binary searches the list for the specified key, using the specified key function. Equivalent to <code>#binarySearch(List, Object, Comparator, KeyPresentBehavior, KeyAbsentBehavior)</code> using <code>Lists#transform(List, Function) Lists.transform(list, keyFunction)</code>
binarySearch
{ "repo_name": "mariusj/org.openntf.domino", "path": "domino/externals/guava/src/main/java/com/google/common/collect/SortedLists.java", "license": "apache-2.0", "size": 10730 }
[ "com.google.common.base.Function", "java.util.Comparator", "java.util.List", "javax.annotation.Nullable" ]
import com.google.common.base.Function; import java.util.Comparator; import java.util.List; import javax.annotation.Nullable;
import com.google.common.base.*; import java.util.*; import javax.annotation.*;
[ "com.google.common", "java.util", "javax.annotation" ]
com.google.common; java.util; javax.annotation;
2,074,316
public void testConvertNumber() { String[] message= { "from Byte", "from Short", "from Integer", "from Long", "from Float", "from Double", "from BigDecimal", "from BigInteger", "from Intege...
void function() { String[] message= { STR, STR, STR, STR, STR, STR, STR, STR, STR, }; Object[] number = { new Byte((byte)7), new Short((short)8), new Integer(9), new Long(10), new Float(11.1), new Double(12.2), new BigDecimal("17.2"), new BigInteger("33"), new Integer[] {new Integer(3), new Integer(2), new Integer(1)} ...
/** * Assumes convert(getExpectedType(),Number) returns some non-null * instance of getExpectedType(). */
Assumes convert(getExpectedType(),Number) returns some non-null instance of getExpectedType()
testConvertNumber
{ "repo_name": "SoftwareEngineeringToolDemos/FSE-2011-EvoSuite", "path": "master/src/test/java/com/examples/with/different/packagename/testcarver/NumberConverterTestBase.java", "license": "lgpl-3.0", "size": 14531 }
[ "java.math.BigDecimal", "java.math.BigInteger" ]
import java.math.BigDecimal; import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,641,673
public static Tuple mockDataTuple(final String[] fields, final Object[] data) { List<String> fieldList = Arrays.asList(fields); List<Object> dataList = Arrays.asList(data); return mockTuple(Constants.SYSTEM_EXECUTOR_ID.toString(), Utils...
static Tuple function(final String[] fields, final Object[] data) { List<String> fieldList = Arrays.asList(fields); List<Object> dataList = Arrays.asList(data); return mockTuple(Constants.SYSTEM_EXECUTOR_ID.toString(), Utils.DEFAULT_STREAM_ID, new Fields(fieldList), dataList); }
/** * Generate a generic tuple with specific data. * * @param fields Fields. * @param data The data to include in the tuple. * @return A mock data tuple with random data. */
Generate a generic tuple with specific data
mockDataTuple
{ "repo_name": "krotscheck/dataplay-workers", "path": "src/test/java/io/dataplay/test/TupleUtil.java", "license": "apache-2.0", "size": 5380 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,313,723
public static String replaceMonomer(String complexNotation, String polymerType, String existingMonomerID, String newMonomerID) throws MonomerException, IOException, JDOMException, NotationException { return replaceMonomer(complexNotation, polymerType, existingMonomerID, newMonomerID, null, true...
static String function(String complexNotation, String polymerType, String existingMonomerID, String newMonomerID) throws MonomerException, IOException, JDOMException, NotationException { return replaceMonomer(complexNotation, polymerType, existingMonomerID, newMonomerID, null, true); }
/** * This method replace existing monomer with new monomer for a given polymer * type in the complex notation * * @param complexNotation * @param polymerType * @param existingMonomerID * @param newMonomerID * @return complex notation after replacement * @throws org.helm.notation.MonomerExce...
This method replace existing monomer with new monomer for a given polymer type in the complex notation
replaceMonomer
{ "repo_name": "PistoiaHELM/HELMNotationToolkit", "path": "source/org/helm/notation/tools/ComplexNotationParser.java", "license": "mit", "size": 92945 }
[ "java.io.IOException", "org.helm.notation.MonomerException", "org.helm.notation.NotationException", "org.jdom.JDOMException" ]
import java.io.IOException; import org.helm.notation.MonomerException; import org.helm.notation.NotationException; import org.jdom.JDOMException;
import java.io.*; import org.helm.notation.*; import org.jdom.*;
[ "java.io", "org.helm.notation", "org.jdom" ]
java.io; org.helm.notation; org.jdom;
953,079
public void putBigDecimalNegativeDecimal(BigDecimal numberBody) throws ErrorException, IOException, IllegalArgumentException { putBigDecimalNegativeDecimalWithServiceResponseAsync(numberBody).toBlocking().single().getBody(); }
void function(BigDecimal numberBody) throws ErrorException, IOException, IllegalArgumentException { putBigDecimalNegativeDecimalWithServiceResponseAsync(numberBody).toBlocking().single().getBody(); }
/** * Put big decimal value -99999999.99. * * @param numberBody the BigDecimal value * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameter...
Put big decimal value -99999999.99
putBigDecimalNegativeDecimal
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodynumber/implementation/NumbersImpl.java", "license": "mit", "size": 70709 }
[ "java.io.IOException", "java.math.BigDecimal" ]
import java.io.IOException; import java.math.BigDecimal;
import java.io.*; import java.math.*;
[ "java.io", "java.math" ]
java.io; java.math;
1,780,372
@Deprecated public static void forEach(String string, CharProcedure procedure) { StringIterate.forEachChar(string, procedure); }
static void function(String string, CharProcedure procedure) { StringIterate.forEachChar(string, procedure); }
/** * For each character in the {@code string}, execute the {@link CharProcedure}. * * @deprecated since 7.0. Use {@link #forEachChar(String, CharProcedure)} instead. */
For each character in the string, execute the <code>CharProcedure</code>
forEach
{ "repo_name": "goldmansachs/gs-collections", "path": "collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java", "license": "apache-2.0", "size": 44790 }
[ "com.gs.collections.api.block.procedure.primitive.CharProcedure" ]
import com.gs.collections.api.block.procedure.primitive.CharProcedure;
import com.gs.collections.api.block.procedure.primitive.*;
[ "com.gs.collections" ]
com.gs.collections;
1,861,223
public void addScope(ScopeDTO scope) throws IdentityOAuthAdminException { addScopePreValidation(scope); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); try { OAuthTokenPersistenceFactory.getInstance().getScopeClaimMappingDAO().addScope(scope,...
void function(ScopeDTO scope) throws IdentityOAuthAdminException { addScopePreValidation(scope); int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId(); try { OAuthTokenPersistenceFactory.getInstance().getScopeClaimMappingDAO().addScope(scope, tenantId); } catch (IdentityOAuth2Exception e) {...
/** * Add an oidc scope and it's claims to the related db tables. * * @param scope An oidc scope. * @throws IdentityOAuthAdminException If an error occurs when inserting scopes or claims. */
Add an oidc scope and it's claims to the related db tables
addScope
{ "repo_name": "wso2-extensions/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/OAuthAdminServiceImpl.java", "license": "apache-2.0", "size": 88457 }
[ "org.wso2.carbon.context.PrivilegedCarbonContext", "org.wso2.carbon.identity.oauth.OAuthUtil", "org.wso2.carbon.identity.oauth.dto.ScopeDTO", "org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception", "org.wso2.carbon.identity.oauth2.dao.OAuthTokenPersistenceFactory" ]
import org.wso2.carbon.context.PrivilegedCarbonContext; import org.wso2.carbon.identity.oauth.OAuthUtil; import org.wso2.carbon.identity.oauth.dto.ScopeDTO; import org.wso2.carbon.identity.oauth2.IdentityOAuth2Exception; import org.wso2.carbon.identity.oauth2.dao.OAuthTokenPersistenceFactory;
import org.wso2.carbon.context.*; import org.wso2.carbon.identity.oauth.*; import org.wso2.carbon.identity.oauth.dto.*; import org.wso2.carbon.identity.oauth2.*; import org.wso2.carbon.identity.oauth2.dao.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
1,344,491
@Test public void getAllInterfacesTest() { final Set<Class<?>> interfaces = map.getAllInterfaces( CImpl.class ); Assert.assertTrue( interfaces.contains( A.class ) ); Assert.assertTrue( interfaces.contains( B.class ) ); Assert.assertTrue( interfaces.contains( C.class ) ); Asse...
void function() { final Set<Class<?>> interfaces = map.getAllInterfaces( CImpl.class ); Assert.assertTrue( interfaces.contains( A.class ) ); Assert.assertTrue( interfaces.contains( B.class ) ); Assert.assertTrue( interfaces.contains( C.class ) ); Assert.assertEquals( 3, interfaces.size() ); }
/** * Test that classes that extend interfaces pick up the interfaces. */
Test that classes that extend interfaces pick up the interfaces
getAllInterfacesTest
{ "repo_name": "Claudenw/junit-contracts", "path": "junit/src/test/java/org/xenei/junit/contract/info/ContractTestMapTest.java", "license": "apache-2.0", "size": 5020 }
[ "java.util.Set", "org.junit.Assert", "org.xenei.junit.contract.exampleTests.CImpl" ]
import java.util.Set; import org.junit.Assert; import org.xenei.junit.contract.exampleTests.CImpl;
import java.util.*; import org.junit.*; import org.xenei.junit.contract.*;
[ "java.util", "org.junit", "org.xenei.junit" ]
java.util; org.junit; org.xenei.junit;
2,820,842
public String hiddenToEncodedString() { StringBuilder buf = new StringBuilder(); // Encode hidden bug categories for (Iterator<String> i = hiddenBugCategorySet.iterator(); i.hasNext();) { buf.append(i.next()); if (i.hasNext()) { buf.append(LISTITEM_DEL...
String function() { StringBuilder buf = new StringBuilder(); for (Iterator<String> i = hiddenBugCategorySet.iterator(); i.hasNext();) { buf.append(i.next()); if (i.hasNext()) { buf.append(LISTITEM_DELIMITER); } } buf.append(FIELD_DELIMITER); return buf.toString(); }
/** * Create a string containing the encoded form of the hidden bug categories * * @return an encoded string */
Create a string containing the encoded form of the hidden bug categories
hiddenToEncodedString
{ "repo_name": "johnscancella/spotbugs", "path": "spotbugs/src/main/java/edu/umd/cs/findbugs/config/ProjectFilterSettings.java", "license": "lgpl-2.1", "size": 17860 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
419,029
public EObject resolveObjectURI(URI uri) { return resourceSet.getEObject(uri, true); }
EObject function(URI uri) { return resourceSet.getEObject(uri, true); }
/** * Resolved the given URI that denotes a DB entry that contains a serialized * fragment. * * @param uri * The containment URI to resolve. * @return The resolved object. */
Resolved the given URI that denotes a DB entry that contains a serialized fragment
resolveObjectURI
{ "repo_name": "srirammails/emf-fragments", "path": "de.hub.emffrag/src/de/hub/emffrag/fragmentation/FragmentedModel.java", "license": "apache-2.0", "size": 14721 }
[ "org.eclipse.emf.ecore.EObject" ]
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
198,157
@Test (expected = AssertionError.class) public void nullCauseTest() throws AssertionError { new SwException("something", null); fail("no assertion error thrown"); }
@Test (expected = AssertionError.class) void function() throws AssertionError { new SwException(STR, null); fail(STR); }
/** * Test the constructor throws an exception with invalid arguments. * * @throws AssertionError the generated exception */
Test the constructor throws an exception with invalid arguments
nullCauseTest
{ "repo_name": "shawware/Util", "path": "src/test/java/au/com/shawware/util/SwExceptionTest.java", "license": "gpl-3.0", "size": 4528 }
[ "org.junit.Assert", "org.junit.Test" ]
import org.junit.Assert; import org.junit.Test;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,311,080
public List<Difference> areDocumentsEqualReporting(Document controlXml, Document testXml) throws SAXException, IOException { Diff diff = new Diff(controlXml, testXml); diff.overrideElementQualifier(elementQualifier); diffListener.initialize(controlXml, testXml, configuration); diff.overrideDifferenceL...
List<Difference> function(Document controlXml, Document testXml) throws SAXException, IOException { Diff diff = new Diff(controlXml, testXml); diff.overrideElementQualifier(elementQualifier); diffListener.initialize(controlXml, testXml, configuration); diff.overrideDifferenceListener(diffListener); return evaluateDiffe...
/** * For 2 SVG files given as {@link Document}, this method returns null if * they are "equal", a list of differences if they are not. * * @param controlXml * the SVG that acts as the base for comparison * @param testXml * the SVG that need to be tested * @return null if they are...
For 2 SVG files given as <code>Document</code>, this method returns null if they are "equal", a list of differences if they are not
areDocumentsEqualReporting
{ "repo_name": "bpmn-miwg/bpmn-miwg-tools", "path": "xml-compare-tool/src/main/java/org/omg/bpmn/miwg/xmlCompare/util/xml/diff/XmlDiffUtil.java", "license": "mit", "size": 5167 }
[ "java.io.IOException", "java.util.List", "org.custommonkey.xmlunit.Diff", "org.custommonkey.xmlunit.Difference", "org.w3c.dom.Document", "org.xml.sax.SAXException" ]
import java.io.IOException; import java.util.List; import org.custommonkey.xmlunit.Diff; import org.custommonkey.xmlunit.Difference; import org.w3c.dom.Document; import org.xml.sax.SAXException;
import java.io.*; import java.util.*; import org.custommonkey.xmlunit.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "java.util", "org.custommonkey.xmlunit", "org.w3c.dom", "org.xml.sax" ]
java.io; java.util; org.custommonkey.xmlunit; org.w3c.dom; org.xml.sax;
854,060
public static final void setRndSettingsToCopy(boolean rndSettingsToCopy) { singleton.rndSettingsToCopy = rndSettingsToCopy; Iterator v = singleton.browsers.entrySet().iterator(); DataBrowserComponent comp; Entry entry; while (v.hasNext()) { entry = (Entry) v.next(); comp = (DataBrowserComponent) en...
static final void function(boolean rndSettingsToCopy) { singleton.rndSettingsToCopy = rndSettingsToCopy; Iterator v = singleton.browsers.entrySet().iterator(); DataBrowserComponent comp; Entry entry; while (v.hasNext()) { entry = (Entry) v.next(); comp = (DataBrowserComponent) entry.getValue(); comp.notifyRndSettingsTo...
/** * Sets to <code>true</code> if some rendering settings have to be copied. * <code>false</code> otherwise. * * @param rndSettingsToCopy The value to set. */
Sets to <code>true</code> if some rendering settings have to be copied. <code>false</code> otherwise
setRndSettingsToCopy
{ "repo_name": "joshmoore/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowserFactory.java", "license": "gpl-2.0", "size": 17481 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,442,675
public interface OnItemLongClickListener { boolean onItemLongClick(TwoWayAdapterView<?> parent, View view, int position, long id); }
interface OnItemLongClickListener { boolean function(TwoWayAdapterView<?> parent, View view, int position, long id); }
/** * Callback method to be invoked when an item in this view has been * clicked and held. * * Implementers can call getItemAtPosition(position) if they need to access * the data associated with the selected item. * * @param parent The AbsListView where the click happened * @param view The view ...
Callback method to be invoked when an item in this view has been clicked and held. Implementers can call getItemAtPosition(position) if they need to access the data associated with the selected item
onItemLongClick
{ "repo_name": "amirarcane/recent-images", "path": "recentimages/src/main/java/com/jess/ui/TwoWayAdapterView.java", "license": "mit", "size": 34522 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,066,481
public IProgressMonitor popMonitor() { return this.monitors.pop(); } /** * Clients using the RefactoringRequest are expected to receive it as a parameter, then: * * getMonitor().beginTask("my task", total) * * * try{ * //Calling another function * ...
IProgressMonitor function() { return this.monitors.pop(); } /** * Clients using the RefactoringRequest are expected to receive it as a parameter, then: * * getMonitor().beginTask(STR, total) * * * try{ * * req.pushMonitor(new SubProgressMonitor(monitor, 10)); * callIt(req); * finally{ * req.popMonitor().done(); * } * *...
/** * Removes and returns the current top-most progress monitor */
Removes and returns the current top-most progress monitor
popMonitor
{ "repo_name": "aptana/Pydev", "path": "bundles/org.python.pydev/src/org/python/pydev/editor/refactoring/RefactoringRequest.java", "license": "epl-1.0", "size": 9927 }
[ "org.eclipse.core.runtime.IProgressMonitor" ]
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.*;
[ "org.eclipse.core" ]
org.eclipse.core;
352,904
private boolean loadUserConfig() { LOGGER.debug("lookig for user defined config file: {}", USER_PROPERTIES); final File f = new File(USER_PROPERTIES); if (f.exists() && f.isFile()) { LOGGER.info("Subcomponent [{}] is loading user defined config file: {}.", this.module, USER_PROPERTIES); File...
boolean function() { LOGGER.debug(STR, USER_PROPERTIES); final File f = new File(USER_PROPERTIES); if (f.exists() && f.isFile()) { LOGGER.info(STR, this.module, USER_PROPERTIES); FileInputStream stream = null; try { stream = new FileInputStream(f); this.config = new Properties(); this.config.load(stream); return true; ...
/** * Loads the properties specified in the user home directory and returns true * if the operation was successful or false otherwise. * * @return true if the properties were loaded or false otherwise. */
Loads the properties specified in the user home directory and returns true if the operation was successful or false otherwise
loadUserConfig
{ "repo_name": "openpreserve/scout", "path": "core/src/main/java/eu/scape_project/watch/utils/ConfigUtils.java", "license": "apache-2.0", "size": 8344 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.util.Properties" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
896,016
static public Telegram createTelegram(DataInput in) throws IOException { final Telegram telegram = new Telegram(); telegram.readData(in); return telegram; } private TelegramFactory() { }
static Telegram function(DataInput in) throws IOException { final Telegram telegram = new Telegram(); telegram.readData(in); return telegram; } private TelegramFactory() { }
/** * Create a telegram from a data input stream. * * @param in - the telegram is read from this stream. * * @return the created telegram. * * @throws IOException */
Create a telegram from a data input stream
createTelegram
{ "repo_name": "Paolo-Maffei/freebus-fts", "path": "freebus-fts-knxcomm/src/main/java/org/freebus/knxcomm/telegram/TelegramFactory.java", "license": "gpl-3.0", "size": 1638 }
[ "java.io.DataInput", "java.io.IOException" ]
import java.io.DataInput; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
235,493
public void testSanity() throws Exception{ HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration()); String tableName = "test"+System.currentTimeMillis(); HTableDescriptor desc = new HTableDescriptor(tableName); HColumnDescriptor family = new HColumnDescriptor("fam"); desc.addFamily(f...
void function() throws Exception{ HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration()); String tableName = "test"+System.currentTimeMillis(); HTableDescriptor desc = new HTableDescriptor(tableName); HColumnDescriptor family = new HColumnDescriptor("fam"); desc.addFamily(family); LOG.info(STR + tableName); ad...
/** * Make sure we can use the cluster * @throws Exception */
Make sure we can use the cluster
testSanity
{ "repo_name": "ddraj/hbase-trunk-mttr", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java", "license": "apache-2.0", "size": 18894 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.client.HBaseAdmin", "org.apache.hadoop.hbase.client.HTable", "org.apache.hadoop.hbase.client.Put", "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,473,998
void addHiveMetaStoreTokenArg() { //in order for this to work hive-site.xml must be on the classpath HiveConf hiveConf = new HiveConf(); if(!hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL)) { return; } secureMeatastoreAccess = true; }
void addHiveMetaStoreTokenArg() { HiveConf hiveConf = new HiveConf(); if(!hiveConf.getBoolVar(HiveConf.ConfVars.METASTORE_USE_THRIFT_SASL)) { return; } secureMeatastoreAccess = true; }
/** * This is called by subclasses when they determined that the sumbmitted job requires * metastore access (e.g. Pig job that uses HCatalog). This then determines if * secure access is required and causes TempletonControllerJob to set up a delegation token. * @see TempletonControllerJob */
This is called by subclasses when they determined that the sumbmitted job requires metastore access (e.g. Pig job that uses HCatalog). This then determines if secure access is required and causes TempletonControllerJob to set up a delegation token
addHiveMetaStoreTokenArg
{ "repo_name": "vergilchiu/hive", "path": "hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/LauncherDelegator.java", "license": "apache-2.0", "size": 16693 }
[ "org.apache.hadoop.hive.conf.HiveConf" ]
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,557,866
private void fillAgentsList() { AgentSessionList agentSessionList = queue.getAgentSessionList(); agentSessionList.addAgentSessionListener(this); for (AgentSession agentSession : agentSessionList.getAgentSessions()) { if (!agentList.contains(agentSession)) { agentL...
void function() { AgentSessionList agentSessionList = queue.getAgentSessionList(); agentSessionList.addAgentSessionListener(this); for (AgentSession agentSession : agentSessionList.getAgentSessions()) { if (!agentList.contains(agentSession)) { agentList.add(agentSession); } } }
/** * <p>Generate the agents offer list.</p> */
Generate the agents offer list
fillAgentsList
{ "repo_name": "Gugli/Openfire", "path": "src/plugins/fastpath/src/java/org/jivesoftware/xmpp/workgroup/dispatcher/RoundRobinDispatcher.java", "license": "apache-2.0", "size": 26948 }
[ "org.jivesoftware.xmpp.workgroup.AgentSession", "org.jivesoftware.xmpp.workgroup.AgentSessionList" ]
import org.jivesoftware.xmpp.workgroup.AgentSession; import org.jivesoftware.xmpp.workgroup.AgentSessionList;
import org.jivesoftware.xmpp.workgroup.*;
[ "org.jivesoftware.xmpp" ]
org.jivesoftware.xmpp;
2,421,569
private static void loadLocalExtensions(Map<String, Class> siddhiExtensionsMap) { Iterable<Class<?>> extensions = ClassIndex.getAnnotated(Extension.class); for (Class extension : extensions) { addExtensionToMap(extension, siddhiExtensionsMap); } // load extensions relate...
static void function(Map<String, Class> siddhiExtensionsMap) { Iterable<Class<?>> extensions = ClassIndex.getAnnotated(Extension.class); for (Class extension : extensions) { addExtensionToMap(extension, siddhiExtensionsMap); } addExtensionToMap(STR, IncrementalWithinTimeFunctionExecutor.class, siddhiExtensionsMap); add...
/** * Load Siddhi extensions in java non OSGi environment * * @param siddhiExtensionsMap reference map for the Siddhi extension */
Load Siddhi extensions in java non OSGi environment
loadLocalExtensions
{ "repo_name": "codemogroup/siddhi", "path": "modules/siddhi-core/src/main/java/org/wso2/siddhi/core/util/SiddhiExtensionLoader.java", "license": "apache-2.0", "size": 8690 }
[ "java.util.Map", "org.atteo.classindex.ClassIndex", "org.wso2.siddhi.annotation.Extension", "org.wso2.siddhi.core.executor.incremental.IncrementalTimeGetTimeZone", "org.wso2.siddhi.core.executor.incremental.IncrementalUnixTimeFunctionExecutor", "org.wso2.siddhi.core.executor.incremental.IncrementalWithinT...
import java.util.Map; import org.atteo.classindex.ClassIndex; import org.wso2.siddhi.annotation.Extension; import org.wso2.siddhi.core.executor.incremental.IncrementalTimeGetTimeZone; import org.wso2.siddhi.core.executor.incremental.IncrementalUnixTimeFunctionExecutor; import org.wso2.siddhi.core.executor.incremental.I...
import java.util.*; import org.atteo.classindex.*; import org.wso2.siddhi.annotation.*; import org.wso2.siddhi.core.executor.incremental.*;
[ "java.util", "org.atteo.classindex", "org.wso2.siddhi" ]
java.util; org.atteo.classindex; org.wso2.siddhi;
1,677,705
private void testBug71396PrepStatementMultiCheck(PreparedStatement[] testPStmt, String[] queries, int[] expRowCount) throws SQLException { if (testPStmt.length != queries.length || testPStmt.length != expRowCount.length) { fail("Bad arguments!"); } for (int i = 0; i < queries.len...
void function(PreparedStatement[] testPStmt, String[] queries, int[] expRowCount) throws SQLException { if (testPStmt.length != queries.length testPStmt.length != expRowCount.length) { fail(STR); } for (int i = 0; i < queries.length; i++) { testBug71396PrepStatementCheck(testPStmt[i], queries[i], expRowCount[i]); } }
/** * Executes a set of queries using the given PreparedStatements and tests if the results count is the expected. */
Executes a set of queries using the given PreparedStatements and tests if the results count is the expected
testBug71396PrepStatementMultiCheck
{ "repo_name": "seanbright/mysql-connector-j", "path": "src/testsuite/regression/StatementRegressionTest.java", "license": "gpl-2.0", "size": 331459 }
[ "java.sql.PreparedStatement", "java.sql.SQLException" ]
import java.sql.PreparedStatement; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,725,863
protected void emit_sInfModel_WSTerminalRuleCall_0_q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); }
/** * Syntax: * WS? */
Syntax: WS
emit_sInfModel_WSTerminalRuleCall_0_q
{ "repo_name": "cooked/NDT", "path": "sc.ndt.editor.fast.adn/src-gen/sc/ndt/editor/fast/serializer/FastadnSyntacticSequencer.java", "license": "gpl-3.0", "size": 49272 }
[ "java.util.List", "org.eclipse.emf.ecore.EObject", "org.eclipse.xtext.nodemodel.INode", "org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider" ]
import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider;
import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*;
[ "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
java.util; org.eclipse.emf; org.eclipse.xtext;
290,709
List<PrivateMessage> getDraftsFromCurrentUser();
List<PrivateMessage> getDraftsFromCurrentUser();
/** * Get current user's drafts * * @return list of draft messages */
Get current user's drafts
getDraftsFromCurrentUser
{ "repo_name": "duffdodger/jcomm", "path": "jcommune-service/src/main/java/org/jtalks/jcommune/service/PrivateMessageService.java", "license": "lgpl-2.1", "size": 3578 }
[ "java.util.List", "org.jtalks.jcommune.model.entity.PrivateMessage" ]
import java.util.List; import org.jtalks.jcommune.model.entity.PrivateMessage;
import java.util.*; import org.jtalks.jcommune.model.entity.*;
[ "java.util", "org.jtalks.jcommune" ]
java.util; org.jtalks.jcommune;
2,163,022
public interface Executable extends Runnable { @Nonnull SubTask getParent();
interface Executable extends Runnable { @Nonnull SubTask function();
/** * Task from which this executable was created. * * <p> * Since this method went through a signature change in 1.377, the invocation may results in * {@link AbstractMethodError}. * Use {@link Executables#getParentOf(Queue.Executable)} that avoids this. *...
Task from which this executable was created. Since this method went through a signature change in 1.377, the invocation may results in <code>AbstractMethodError</code>. Use <code>Executables#getParentOf(Queue.Executable)</code> that avoids this
getParent
{ "repo_name": "kohsuke/hudson", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 115775 }
[ "hudson.model.queue.SubTask", "javax.annotation.Nonnull" ]
import hudson.model.queue.SubTask; import javax.annotation.Nonnull;
import hudson.model.queue.*; import javax.annotation.*;
[ "hudson.model.queue", "javax.annotation" ]
hudson.model.queue; javax.annotation;
1,076,726
public void mouseExited(MouseEvent e) { if (!events.isEmpty()) { // gesture pending int dragAction = mapDragOperationFromModifiers(e); if (dragAction == DnDConstants.ACTION_NONE) { events.clear(); } } }
void function(MouseEvent e) { if (!events.isEmpty()) { int dragAction = mapDragOperationFromModifiers(e); if (dragAction == DnDConstants.ACTION_NONE) { events.clear(); } } }
/** * Invoked when the mouse exits a component. */
Invoked when the mouse exits a component
mouseExited
{ "repo_name": "greghaskins/openjdk-jdk7u-jdk", "path": "src/windows/classes/sun/awt/windows/WMouseDragGestureRecognizer.java", "license": "gpl-2.0", "size": 6736 }
[ "java.awt.dnd.DnDConstants", "java.awt.event.MouseEvent" ]
import java.awt.dnd.DnDConstants; import java.awt.event.MouseEvent;
import java.awt.dnd.*; import java.awt.event.*;
[ "java.awt" ]
java.awt;
966,492
public static ProductBiddingCategory createBiddingCategory( ProductDimensionType productDimensionType, @Nullable Long biddingCategoryId) { Preconditions.checkNotNull(productDimensionType, "ProductDimensionType is required when creating a ProductBiddingCategory"); ProductBiddingCategory productBi...
static ProductBiddingCategory function( ProductDimensionType productDimensionType, @Nullable Long biddingCategoryId) { Preconditions.checkNotNull(productDimensionType, STR); ProductBiddingCategory productBiddingCategory = new ProductBiddingCategory(); productBiddingCategory.setType(productDimensionType); productBidding...
/** * Creates a new ProductBiddingCategory. * * @param productDimensionType required * @param biddingCategoryId may be null if creating an "other" dimension */
Creates a new ProductBiddingCategory
createBiddingCategory
{ "repo_name": "gawkermedia/googleads-java-lib", "path": "modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/utils/v201509/shopping/ProductDimensions.java", "license": "apache-2.0", "size": 6364 }
[ "com.google.api.ads.adwords.axis.v201509.cm.ProductBiddingCategory", "com.google.api.ads.adwords.axis.v201509.cm.ProductDimensionType", "com.google.common.base.Preconditions", "javax.annotation.Nullable" ]
import com.google.api.ads.adwords.axis.v201509.cm.ProductBiddingCategory; import com.google.api.ads.adwords.axis.v201509.cm.ProductDimensionType; import com.google.common.base.Preconditions; import javax.annotation.Nullable;
import com.google.api.ads.adwords.axis.v201509.cm.*; import com.google.common.base.*; import javax.annotation.*;
[ "com.google.api", "com.google.common", "javax.annotation" ]
com.google.api; com.google.common; javax.annotation;
2,361,585
// NOTE: Placed this method here; in order to avoid duplication of logic for fetching history UUIDs // in case of following a local or a remote cluster. public void fetchLeaderHistoryUUIDs( final Client remoteClient, final IndexMetadata leaderIndexMetadata, final Consumer<Exception> ...
void function( final Client remoteClient, final IndexMetadata leaderIndexMetadata, final Consumer<Exception> onFailure, final Consumer<String[]> historyUUIDConsumer) { String leaderIndex = leaderIndexMetadata.getIndex().getName(); CheckedConsumer<IndicesStatsResponse, Exception> indicesStatsHandler = indicesStatsRespon...
/** * Fetches the history UUIDs for leader index on per shard basis using the specified remoteClient. * * @param remoteClient the remote client * @param leaderIndexMetadata the leader index metadata * @param onFailure ...
Fetches the history UUIDs for leader index on per shard basis using the specified remoteClient
fetchLeaderHistoryUUIDs
{ "repo_name": "gingerwizard/elasticsearch", "path": "x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/CcrLicenseChecker.java", "license": "apache-2.0", "size": 23361 }
[ "java.util.function.Consumer", "org.elasticsearch.action.ActionListener", "org.elasticsearch.action.admin.indices.stats.IndexShardStats", "org.elasticsearch.action.admin.indices.stats.IndexStats", "org.elasticsearch.action.admin.indices.stats.IndicesStatsRequest", "org.elasticsearch.action.admin.indices.s...
import java.util.function.Consumer; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.indices.stats.IndexShardStats; import org.elasticsearch.action.admin.indices.stats.IndexStats; import org.elasticsearch.action.admin.indices.stats.IndicesStatsRequest; import org.elasticsearch.actio...
import java.util.function.*; import org.elasticsearch.action.*; import org.elasticsearch.action.admin.indices.stats.*; import org.elasticsearch.client.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.*; import org.elasticsearch.index.engine.*; import org.elasticsearch.index.shard.*;
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.client", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.index" ]
java.util; org.elasticsearch.action; org.elasticsearch.client; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index;
954,892
@Security.Authenticated(Secured.class) public static Result searchResults(Integer page) { SearchFormData sfd = new SearchFormData(); Form<SearchFormData> stuff = Form.form(SearchFormData.class).fill(sfd); Form<SearchFormData> sfd2 = Form.form(SearchFormData.class).bindFromRequest(); SearchFormData ...
@Security.Authenticated(Secured.class) static Result function(Integer page) { SearchFormData sfd = new SearchFormData(); Form<SearchFormData> stuff = Form.form(SearchFormData.class).fill(sfd); Form<SearchFormData> sfd2 = Form.form(SearchFormData.class).bindFromRequest(); SearchFormData search = sfd2.get(); Page<Game> r...
/** * Search for games. * * @return All games page with the results */
Search for games
searchResults
{ "repo_name": "hawaiihoopsnetwork/HawaiiHoopsNetwork", "path": "app/controllers/Games.java", "license": "apache-2.0", "size": 6609 }
[ "com.avaje.ebean.Page" ]
import com.avaje.ebean.Page;
import com.avaje.ebean.*;
[ "com.avaje.ebean" ]
com.avaje.ebean;
2,294,834
public void setFastestRating(Rating inRat) { if (fastestRating != null) fastestRating.removePropertyChangeListener(this); Rating oldRat = fastestRating; fastestRating = inRat; if (fastestRating != null) fastestRating.addPropertyChangeListener(this); firePropertyChange(FASTESTRATING_PROPERTY, oldRat, inRat)...
void function(Rating inRat) { if (fastestRating != null) fastestRating.removePropertyChangeListener(this); Rating oldRat = fastestRating; fastestRating = inRat; if (fastestRating != null) fastestRating.addPropertyChangeListener(this); firePropertyChange(FASTESTRATING_PROPERTY, oldRat, inRat); }
/** * sets the maximum rating for the class, as a double * * @param inRat * Rating object for division maximum * * is ignored if slowestrating is a onedesign **/
sets the maximum rating for the class, as a double
setFastestRating
{ "repo_name": "sgrosven/gromurph", "path": "Javascore/src/main/java/org/gromurph/javascore/model/Division.java", "license": "gpl-2.0", "size": 11709 }
[ "org.gromurph.javascore.model.ratings.Rating" ]
import org.gromurph.javascore.model.ratings.Rating;
import org.gromurph.javascore.model.ratings.*;
[ "org.gromurph.javascore" ]
org.gromurph.javascore;
425,838
@Override public Integer saveBean(ISerializableLabelBean serializableLabelBean, Map<String, Map<Integer, Integer>> matchesMap) { TAccountBean accountBean = (TAccountBean)serializableLabelBean; Integer accountStatus = accountBean.getStatus(); if (accountStatus!=null) { Map<Integer, Integer> systemStatus...
Integer function(ISerializableLabelBean serializableLabelBean, Map<String, Map<Integer, Integer>> matchesMap) { TAccountBean accountBean = (TAccountBean)serializableLabelBean; Integer accountStatus = accountBean.getStatus(); if (accountStatus!=null) { Map<Integer, Integer> systemStatusMap = matchesMap.get(ExchangeField...
/** * Saves a serializableLabelBean into the database * @param serializableLabelBean * @param matchesMap * @return */
Saves a serializableLabelBean into the database
saveBean
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/beans/TAccountBean.java", "license": "gpl-3.0", "size": 6321 }
[ "com.aurel.track.admin.customize.account.AccountBL", "com.aurel.track.exchange.track.ExchangeFieldNames", "java.util.Map" ]
import com.aurel.track.admin.customize.account.AccountBL; import com.aurel.track.exchange.track.ExchangeFieldNames; import java.util.Map;
import com.aurel.track.admin.customize.account.*; import com.aurel.track.exchange.track.*; import java.util.*;
[ "com.aurel.track", "java.util" ]
com.aurel.track; java.util;
2,531,727
public static void loadAllShaders(AssetManager assetMgr) { // Clear the map; OpenGLES context could be destroyed while app is in // background. We have to reload all the shaders. COMPILED_SHADERS.clear(); try { String[] shaderFiles = assetMgr.list(SHADER_DIRECTORY); ...
static void function(AssetManager assetMgr) { COMPILED_SHADERS.clear(); try { String[] shaderFiles = assetMgr.list(SHADER_DIRECTORY); for (String shaderFile : shaderFiles) { String fileContent = FileHelper.loadAsset( assetMgr, SHADER_DIRECTORY + "/" + shaderFile); int shaderProg = 0; if (shaderFile.substring(shaderFile...
/** * Loads all shader files from the Assets folder */
Loads all shader files from the Assets folder
loadAllShaders
{ "repo_name": "ykulbashian/LiquidSurface", "path": "liquidview/src/main/java/com/google/fpl/liquidfunpaint/shader/ShaderProgram.java", "license": "apache-2.0", "size": 9425 }
[ "android.content.res.AssetManager", "android.util.Log", "com.google.fpl.liquidfunpaint.util.FileHelper", "java.io.IOException" ]
import android.content.res.AssetManager; import android.util.Log; import com.google.fpl.liquidfunpaint.util.FileHelper; import java.io.IOException;
import android.content.res.*; import android.util.*; import com.google.fpl.liquidfunpaint.util.*; import java.io.*;
[ "android.content", "android.util", "com.google.fpl", "java.io" ]
android.content; android.util; com.google.fpl; java.io;
2,076,952
@Override public DataByteArray getValue() { if (accumSketch_ == null) { if (emptySketch_ == null) { emptySketch_ = new DataByteArray(new CpcSketch(lgK_, seed_).toByteArray()); } return emptySketch_; } return new DataByteArray(accumSketch_.toByteArray()); }
DataByteArray function() { if (accumSketch_ == null) { if (emptySketch_ == null) { emptySketch_ = new DataByteArray(new CpcSketch(lgK_, seed_).toByteArray()); } return emptySketch_; } return new DataByteArray(accumSketch_.toByteArray()); }
/** * Returns the sketch that has been built up by multiple calls to {@link #accumulate}. * * @return serialized CpcSketch * @see "org.apache.pig.Accumulator.getValue()" */
Returns the sketch that has been built up by multiple calls to <code>#accumulate</code>
getValue
{ "repo_name": "DataSketches/sketches-pig", "path": "src/main/java/org/apache/datasketches/pig/cpc/DataToSketch.java", "license": "apache-2.0", "size": 7715 }
[ "org.apache.datasketches.cpc.CpcSketch", "org.apache.pig.data.DataByteArray" ]
import org.apache.datasketches.cpc.CpcSketch; import org.apache.pig.data.DataByteArray;
import org.apache.datasketches.cpc.*; import org.apache.pig.data.*;
[ "org.apache.datasketches", "org.apache.pig" ]
org.apache.datasketches; org.apache.pig;
2,417,339
protected Path getDestDir() { return this.m_destDir; }
Path function() { return this.m_destDir; }
/** * Get the destination directory * * @return the destination directory */
Get the destination directory
getDestDir
{ "repo_name": "optimizationBenchmarking/utils-base", "path": "src/test/java/examples/org/optimizationBenchmarking/utils/tools/impl/FileProducerExample.java", "license": "gpl-3.0", "size": 3758 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
118,660
private void sendReplies(Job job) throws RemoteException { Collection<?> tools = replies.get(job); if(tools==null) { return; } Iterator<?> it = tools.iterator(); while(it.hasNext()) { Tool tool = (Tool) it.next(); tool.send(job, this); } }
void function(Job job) throws RemoteException { Collection<?> tools = replies.get(job); if(tools==null) { return; } Iterator<?> it = tools.iterator(); while(it.hasNext()) { Tool tool = (Tool) it.next(); tool.send(job, this); } }
/** * Replies to tools interested in the specified job. * * @param job the job */
Replies to tools interested in the specified job
sendReplies
{ "repo_name": "dobrown/tracker-mvn", "path": "src/main/java/org/opensourcephysics/tools/RemoteTool.java", "license": "gpl-3.0", "size": 4470 }
[ "java.rmi.RemoteException", "java.util.Collection", "java.util.Iterator" ]
import java.rmi.RemoteException; import java.util.Collection; import java.util.Iterator;
import java.rmi.*; import java.util.*;
[ "java.rmi", "java.util" ]
java.rmi; java.util;
451,667
void startServer(TestCaseExecution tCExecution) throws CerberusException;
void startServer(TestCaseExecution tCExecution) throws CerberusException;
/** * Start the selenium Server * * @param tCExecution (with Session object and capabilities) * @throws CerberusException */
Start the selenium Server
startServer
{ "repo_name": "vertigo17/Cerberus", "path": "source/src/main/java/org/cerberus/engine/execution/IRobotServerService.java", "license": "gpl-3.0", "size": 1714 }
[ "org.cerberus.crud.entity.TestCaseExecution", "org.cerberus.exception.CerberusException" ]
import org.cerberus.crud.entity.TestCaseExecution; import org.cerberus.exception.CerberusException;
import org.cerberus.crud.entity.*; import org.cerberus.exception.*;
[ "org.cerberus.crud", "org.cerberus.exception" ]
org.cerberus.crud; org.cerberus.exception;
1,458,247
public int compareTo(final BigFraction object) { BigInteger nOd = numerator.multiply(object.denominator); BigInteger dOn = denominator.multiply(object.numerator); return nOd.compareTo(dOn); }
int function(final BigFraction object) { BigInteger nOd = numerator.multiply(object.denominator); BigInteger dOn = denominator.multiply(object.numerator); return nOd.compareTo(dOn); }
/** * <p> * Compares this object to another based on size. * </p> * * @param object * the object to compare to, must not be <code>null</code>. * @return -1 if this is less than <tt>object</tt>, +1 if this is greater * than <tt>object</tt>, 0 if they are equal....
Compares this object to another based on size.
compareTo
{ "repo_name": "SpoonLabs/astor", "path": "examples/math_85/src/java/org/apache/commons/math/fraction/BigFraction.java", "license": "gpl-2.0", "size": 37211 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
968,782
protected final Map<String, List<Object>> retrievePersonAttributesToPrincipalAttributes(final String id) { final IPersonAttributes attrs = getAttributeRepository().getPerson(id); if (attrs == null) { logger.debug("Could not find principal [{}] in the repository so no attributes are ret...
final Map<String, List<Object>> function(final String id) { final IPersonAttributes attrs = getAttributeRepository().getPerson(id); if (attrs == null) { logger.debug(STR, id); return Collections.emptyMap(); } final Map<String, List<Object>> attributes = attrs.getAttributes(); if (attributes == null) { logger.debug(STR,...
/** * Obtains attributes first from the repository by calling * {@link org.jasig.services.persondir.IPersonAttributeDao#getPerson(String)}. * * @param id the person id to locate in the attribute repository * @return the map of attributes */
Obtains attributes first from the repository by calling <code>org.jasig.services.persondir.IPersonAttributeDao#getPerson(String)</code>
retrievePersonAttributesToPrincipalAttributes
{ "repo_name": "DICE-UNC/cas", "path": "cas-server-core/src/main/java/org/jasig/cas/authentication/principal/cache/AbstractPrincipalAttributesRepository.java", "license": "apache-2.0", "size": 12474 }
[ "java.util.Collections", "java.util.List", "java.util.Map", "org.jasig.services.persondir.IPersonAttributes" ]
import java.util.Collections; import java.util.List; import java.util.Map; import org.jasig.services.persondir.IPersonAttributes;
import java.util.*; import org.jasig.services.persondir.*;
[ "java.util", "org.jasig.services" ]
java.util; org.jasig.services;
2,435,015
public void writeLEShort(short value) throws IOException { for (final byte b : EndianNumbers.parseLEShort(value)) { writeByte(b); } }
void function(short value) throws IOException { for (final byte b : EndianNumbers.parseLEShort(value)) { writeByte(b); } }
/** * Writes a Little Endian short on 2 bytes. * * @param value is the value to write * @throws IOException on error. */
Writes a Little Endian short on 2 bytes
writeLEShort
{ "repo_name": "tpiotrow/afc", "path": "core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/stream/LittleEndianDataOutputStream.java", "license": "apache-2.0", "size": 4122 }
[ "java.io.IOException", "org.arakhne.afc.inputoutput.endian.EndianNumbers" ]
import java.io.IOException; import org.arakhne.afc.inputoutput.endian.EndianNumbers;
import java.io.*; import org.arakhne.afc.inputoutput.endian.*;
[ "java.io", "org.arakhne.afc" ]
java.io; org.arakhne.afc;
2,062,682
public static File createClassFile(File rootLocation, String packageName, String fileName, String extension) throws IOException, Exception { File returnFile = null; File r...
static File function(File rootLocation, String packageName, String fileName, String extension) throws IOException, Exception { File returnFile = null; File root = rootLocation; if (packageName != null) { String directoryNames[] = packageName.split("\\."); File tempFile = null; int length = directoryNames.length; for (i...
/** * Creates/ returns a file object * * @param rootLocation - Location to be written * @param packageName - package, can be '.' separated * @param fileName name of the file * @param extension type of the file, java, cpp etc * @return the File that was created * @throws I...
Creates/ returns a file object
createClassFile
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/kernel/src/org/apache/axis2/util/FileWriter.java", "license": "apache-2.0", "size": 2366 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,100,636
public ProvisioningState provisioningState() { return this.provisioningState; }
ProvisioningState function() { return this.provisioningState; }
/** * Get the provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'. * * @return the provisioningState value */
Get the provisioning state of the DDoS protection plan resource. Possible values include: 'Succeeded', 'Updating', 'Deleting', 'Failed'
provisioningState
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_05_01/src/main/java/com/microsoft/azure/management/network/v2020_05_01/implementation/DdosProtectionPlanInner.java", "license": "mit", "size": 2995 }
[ "com.microsoft.azure.management.network.v2020_05_01.ProvisioningState" ]
import com.microsoft.azure.management.network.v2020_05_01.ProvisioningState;
import com.microsoft.azure.management.network.v2020_05_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
826,440
public static BufferedImage makeImage(float[] data, int w, int h) { return makeImage(new float[][] {data}, w, h); }
static BufferedImage function(float[] data, int w, int h) { return makeImage(new float[][] {data}, w, h); }
/** * Creates an image from the given single-channel float data. * * @param data Array containing image data. * @param w Width of image plane. * @param h Height of image plane. */
Creates an image from the given single-channel float data
makeImage
{ "repo_name": "hflynn/bioformats", "path": "components/formats-bsd/src/loci/formats/gui/AWTImageTools.java", "license": "gpl-2.0", "size": 71756 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
894,064
@Override public Set<String> getMethodToCallsToBypassSessionRetrievalForGETRequests() { Set<String> defaultMethodToCalls = new HashSet<String>(); defaultMethodToCalls.add(KRADConstants.START_METHOD); return defaultMethodToCalls; }
Set<String> function() { Set<String> defaultMethodToCalls = new HashSet<String>(); defaultMethodToCalls.add(KRADConstants.START_METHOD); return defaultMethodToCalls; }
/** * Base implementation that returns just "start". sub-implementations should not add values to Set instance returned * by this method, and should create its own instance. * * @see PojoForm#getMethodToCallsToBypassSessionRetrievalForGETRequests() */
Base implementation that returns just "start". sub-implementations should not add values to Set instance returned by this method, and should create its own instance
getMethodToCallsToBypassSessionRetrievalForGETRequests
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-kns/src/main/java/org/kuali/kfs/kns/web/struts/form/pojo/PojoFormBase.java", "license": "agpl-3.0", "size": 26057 }
[ "java.util.HashSet", "java.util.Set", "org.kuali.kfs.krad.util.KRADConstants" ]
import java.util.HashSet; import java.util.Set; import org.kuali.kfs.krad.util.KRADConstants;
import java.util.*; import org.kuali.kfs.krad.util.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
1,638,411
@Nullable PsiElement resolve();
@Nullable PsiElement resolve();
/** * Returns the element which is the target of the reference. * * @return the target element, or null if it was not possible to resolve the reference to a valid target. */
Returns the element which is the target of the reference
resolve
{ "repo_name": "jexp/idea2", "path": "platform/lang-api/src/com/intellij/psi/PsiReference.java", "license": "apache-2.0", "size": 4524 }
[ "org.jetbrains.annotations.Nullable" ]
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,697,760
public List<MethodInfo> getMethodInfos() { return new ArrayList<>(this.methodInfos); } /** * Returns the {@link MethodInfo} instance of this {@code ClassFile} instance that is equal to {@code methodInfo}. * <p> * If {@code methodInfo} is {@code null}, a {@code NullPointerException} will be thrown. * <p...
List<MethodInfo> function() { return new ArrayList<>(this.methodInfos); } /** * Returns the {@link MethodInfo} instance of this {@code ClassFile} instance that is equal to {@code methodInfo}. * <p> * If {@code methodInfo} is {@code null}, a {@code NullPointerException} will be thrown. * <p> * If this {@code ClassFile} ...
/** * Returns a {@code List} with all currently added {@link MethodInfo} instances. * <p> * Modifying the returned {@code List} will not affect this {@code ClassFile} instance. * * @return a {@code List} with all currently added {@code MethodInfo} instances */
Returns a List with all currently added <code>MethodInfo</code> instances. Modifying the returned List will not affect this ClassFile instance
getMethodInfos
{ "repo_name": "macroing/CEL4J", "path": "src/main/java/org/macroing/cel4j/java/binary/classfile/ClassFile.java", "license": "gpl-3.0", "size": 70607 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
587,864
void addAttachment(String id, DataHandler content);
void addAttachment(String id, DataHandler content);
/** * Adds an attachment to the message using the id * * @param id the id to store the attachment under * @param content the data handler for the attachment */
Adds an attachment to the message using the id
addAttachment
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-attachments/src/main/java/org/apache/camel/attachment/AttachmentMessage.java", "license": "apache-2.0", "size": 3304 }
[ "javax.activation.DataHandler" ]
import javax.activation.DataHandler;
import javax.activation.*;
[ "javax.activation" ]
javax.activation;
1,057,900
public KERNINGRECORD readKERNINGRECORD(boolean fontFlagsWideCodes, String name) throws IOException { KERNINGRECORD ret = new KERNINGRECORD(); newDumpLevel(name, "KERNINGRECORD"); if (fontFlagsWideCodes) { ret.fontKerningCode1 = readUI16("fontKerningCode1"); ret.fontKe...
KERNINGRECORD function(boolean fontFlagsWideCodes, String name) throws IOException { KERNINGRECORD ret = new KERNINGRECORD(); newDumpLevel(name, STR); if (fontFlagsWideCodes) { ret.fontKerningCode1 = readUI16(STR); ret.fontKerningCode2 = readUI16(STR); } else { ret.fontKerningCode1 = readUI8(STR); ret.fontKerningCode2 ...
/** * Reads one KERNINGRECORD value from the stream * * @param fontFlagsWideCodes * @param name * @return KERNINGRECORD value * @throws IOException */
Reads one KERNINGRECORD value from the stream
readKERNINGRECORD
{ "repo_name": "Djamana/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWFInputStream.java", "license": "gpl-3.0", "size": 128697 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
225,307
public static DateFilter getDateFilterFromDDaysBeforeToToday(int days) { return new DateFilter(getDayBefore(new Date(), days), new Date()); }
static DateFilter function(int days) { return new DateFilter(getDayBefore(new Date(), days), new Date()); }
/** * Creates a DateFilter(fromDate,toDate) with toDate: right now, and fromDate: <code>days</code> before. */
Creates a DateFilter(fromDate,toDate) with toDate: right now, and fromDate: <code>days</code> before
getDateFilterFromDDaysBeforeToToday
{ "repo_name": "huihoo/olat", "path": "OLAT-LMS/src/main/java/org/olat/system/commons/date/DateUtil.java", "license": "apache-2.0", "size": 2769 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,641,175
public void setMessageInterceptors(Set<MessageInterceptor> messageInterceptors) { this.messageInterceptors = messageInterceptors; }
void function(Set<MessageInterceptor> messageInterceptors) { this.messageInterceptors = messageInterceptors; }
/** * Sets the chain of provided {@link MessageInterceptor}s * * @param messageInterceptors the message interceptors */
Sets the chain of provided <code>MessageInterceptor</code>s
setMessageInterceptors
{ "repo_name": "azureplus/spring-flex", "path": "spring-flex-core/src/main/java/org/springframework/flex/core/MessageInterceptionAdvice.java", "license": "apache-2.0", "size": 3772 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
889,645
public DistributedDelayQueue<T> buildDelayQueue() { return new DistributedDelayQueue<T> ( client, consumer, serializer, queuePath, factory, executor, Integer.MAX_VALUE, lockPath, maxI...
DistributedDelayQueue<T> function() { return new DistributedDelayQueue<T> ( client, consumer, serializer, queuePath, factory, executor, Integer.MAX_VALUE, lockPath, maxItems, putInBackground, finalFlushMs ); } /** * Change the thread factory used. The default is {@link Executors#defaultThreadFactory()}
/** * <p>Build a {@link DistributedDelayQueue} from the current builder values.</p> * * @return distributed delay queue */
Build a <code>DistributedDelayQueue</code> from the current builder values
buildDelayQueue
{ "repo_name": "box/curator", "path": "curator-recipes/src/main/java/com/netflix/curator/framework/recipes/queue/QueueBuilder.java", "license": "apache-2.0", "size": 9020 }
[ "java.util.concurrent.Executors" ]
import java.util.concurrent.Executors;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,074,323
void setStyle(EdgeStyleDescription value);
void setStyle(EdgeStyleDescription value);
/** * Sets the value of the ' * {@link org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription#getStyle * <em>Style</em>}' containment reference. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @param value * the new value of the '<em>Style</em>' contain...
Sets the value of the ' <code>org.eclipse.sirius.diagram.description.ConditionalEdgeStyleDescription#getStyle Style</code>' containment reference.
setStyle
{ "repo_name": "FTSRG/iq-sirius-integration", "path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/ConditionalEdgeStyleDescription.java", "license": "epl-1.0", "size": 2283 }
[ "org.eclipse.sirius.diagram.description.style.EdgeStyleDescription" ]
import org.eclipse.sirius.diagram.description.style.EdgeStyleDescription;
import org.eclipse.sirius.diagram.description.style.*;
[ "org.eclipse.sirius" ]
org.eclipse.sirius;
2,140,497
public void setDomainCrosshairVisible(boolean flag) { if (this.domainCrosshairVisible != flag) { this.domainCrosshairVisible = flag; notifyListeners(new PlotChangeEvent(this)); } }
void function(boolean flag) { if (this.domainCrosshairVisible != flag) { this.domainCrosshairVisible = flag; notifyListeners(new PlotChangeEvent(this)); } }
/** * Sets the flag indicating whether or not the domain crosshair is visible. * * @param flag the new value of the flag. */
Sets the flag indicating whether or not the domain crosshair is visible
setDomainCrosshairVisible
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart0921/source/org/jfree/chart/plot/ContourPlot.java", "license": "lgpl-3.0", "size": 58661 }
[ "org.jfree.chart.event.PlotChangeEvent" ]
import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
444,866
//----------------------------------------------------------------------- public Hours negated() { return Hours.hours(FieldUtils.safeNegate(getValue())); }
Hours function() { return Hours.hours(FieldUtils.safeNegate(getValue())); }
/** * Returns a new instance with the hours value negated. * * @return the new period with a negated value * @throws ArithmeticException if the result overflows an int */
Returns a new instance with the hours value negated
negated
{ "repo_name": "AlexeyTrusov/testing5", "path": "src/main/java/org/joda/time/Hours.java", "license": "apache-2.0", "size": 18943 }
[ "org.joda.time.field.FieldUtils" ]
import org.joda.time.field.FieldUtils;
import org.joda.time.field.*;
[ "org.joda.time" ]
org.joda.time;
2,595,224
private void task() { int safetyCounter = 0; while (m_thread_keepalive) { HALUtil.takeMultiWait(m_packetDataAvailableSem, m_packetDataAvailableMutex); synchronized (this) { getData(); } synchronized (m_dataSem) { m_dataSem.notifyAll(); } if (++safetyCounter ...
void function() { int safetyCounter = 0; while (m_thread_keepalive) { HALUtil.takeMultiWait(m_packetDataAvailableSem, m_packetDataAvailableMutex); synchronized (this) { getData(); } synchronized (m_dataSem) { m_dataSem.notifyAll(); } if (++safetyCounter >= 4) { MotorSafetyHelper.checkMotors(); safetyCounter = 0; } if (...
/** * Provides the service routine for the DS polling thread. */
Provides the service routine for the DS polling thread
task
{ "repo_name": "PatrickPenguinTurtle/allwpilib", "path": "wpilibj/src/athena/java/edu/wpi/first/wpilibj/DriverStation.java", "license": "bsd-3-clause", "size": 21407 }
[ "edu.wpi.first.wpilibj.communication.FRCNetworkCommunicationsLibrary", "edu.wpi.first.wpilibj.hal.HALUtil" ]
import edu.wpi.first.wpilibj.communication.FRCNetworkCommunicationsLibrary; import edu.wpi.first.wpilibj.hal.HALUtil;
import edu.wpi.first.wpilibj.communication.*; import edu.wpi.first.wpilibj.hal.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,135,979
public void testDateConstructor1() { TimeZone zone = TimeZone.getTimeZone("GMT"); Second s1 = new Second(new Date(1016729758999L), zone); Second s2 = new Second(new Date(1016729759000L), zone); assertEquals(58, s1.getSecond()); assertEquals(1016729758999L, s1.getLastMillise...
void function() { TimeZone zone = TimeZone.getTimeZone("GMT"); Second s1 = new Second(new Date(1016729758999L), zone); Second s2 = new Second(new Date(1016729759000L), zone); assertEquals(58, s1.getSecond()); assertEquals(1016729758999L, s1.getLastMillisecond(zone)); assertEquals(59, s2.getSecond()); assertEquals(10167...
/** * In GMT, the 4.55:59pm on 21 Mar 2002 is java.util.Date(1016729759000L). * Use this to check the Second constructor. */
In GMT, the 4.55:59pm on 21 Mar 2002 is java.util.Date(1016729759000L). Use this to check the Second constructor
testDateConstructor1
{ "repo_name": "integrated/jfreechart", "path": "tests/org/jfree/data/time/junit/SecondTests.java", "license": "lgpl-2.1", "size": 11604 }
[ "java.util.Date", "java.util.TimeZone", "org.jfree.data.time.Second" ]
import java.util.Date; import java.util.TimeZone; import org.jfree.data.time.Second;
import java.util.*; import org.jfree.data.time.*;
[ "java.util", "org.jfree.data" ]
java.util; org.jfree.data;
466,914
public void setDefaultHystrixConfiguration(HystrixConfigurationDefinition defaultHystrixConfiguration) { this.defaultHystrixConfiguration = defaultHystrixConfiguration; }
void function(HystrixConfigurationDefinition defaultHystrixConfiguration) { this.defaultHystrixConfiguration = defaultHystrixConfiguration; }
/** * Hystrix EIP default configuration */
Hystrix EIP default configuration
setDefaultHystrixConfiguration
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java", "license": "apache-2.0", "size": 52096 }
[ "org.apache.camel.model.HystrixConfigurationDefinition" ]
import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.*;
[ "org.apache.camel" ]
org.apache.camel;
113,409
public String toXML() { Element e = SAMLUtil.marshallObject(obj); return XMLHelper.nodeToString(e); }
String function() { Element e = SAMLUtil.marshallObject(obj); return XMLHelper.nodeToString(e); }
/** * Get an XML representation of the object. */
Get an XML representation of the object
toXML
{ "repo_name": "Safewhere/kombit-service-java", "path": "OIOSaml/src/dk/itst/oiosaml/sp/model/OIOSamlObject.java", "license": "mit", "size": 7976 }
[ "dk.itst.oiosaml.common.SAMLUtil", "org.opensaml.xml.util.XMLHelper", "org.w3c.dom.Element" ]
import dk.itst.oiosaml.common.SAMLUtil; import org.opensaml.xml.util.XMLHelper; import org.w3c.dom.Element;
import dk.itst.oiosaml.common.*; import org.opensaml.xml.util.*; import org.w3c.dom.*;
[ "dk.itst.oiosaml", "org.opensaml.xml", "org.w3c.dom" ]
dk.itst.oiosaml; org.opensaml.xml; org.w3c.dom;
1,071,940
@Test public void testEqualsFalseWithDiffernetObject() { ComponentSummarizer cs = new ComponentSummarizer(fileName, filePath, packageName); assertNotEquals(cs, Integer.valueOf(1)); }
void function() { ComponentSummarizer cs = new ComponentSummarizer(fileName, filePath, packageName); assertNotEquals(cs, Integer.valueOf(1)); }
/** * Test equal with different object. */
Test equal with different object
testEqualsFalseWithDiffernetObject
{ "repo_name": "ClintonCao/UnifiedASATVisualizer", "path": "src/test/java/BlueTurtle/summarizers/ComponentSummarizerTest.java", "license": "mit", "size": 8857 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,248,422
private void chunk4() throws Exception { log( "Loading Modifiers"); SQLUtilities.execSQL(out, "INSERT INTO " + crcSchema + ".MODIFIER_DIMENSION\n" + "SELECT * FROM i2b2DEMODATA.MODIFIER_DIMENSION" ); log( "Loading Concepts"); SQLUtilities.execSQL(out, ...
void function() throws Exception { log( STR); SQLUtilities.execSQL(out, STR + crcSchema + STR + STR ); log( STR); SQLUtilities.execSQL(out, STR + crcSchema + STR + STR ); }
/** * This copies over the modifier dimension and concept_dimension from production. Note this is run fresh because * any data that has been run or uploaded * @throws Exception */
This copies over the modifier dimension and concept_dimension from production. Note this is run fresh because any data that has been run or uploaded
chunk4
{ "repo_name": "URMC/i2b2_redi", "path": "java/src/main/java/edu/rochester/urmc/i2b2/DatamartLoader.java", "license": "mit", "size": 40662 }
[ "edu.rochester.urmc.util.SQLUtilities" ]
import edu.rochester.urmc.util.SQLUtilities;
import edu.rochester.urmc.util.*;
[ "edu.rochester.urmc" ]
edu.rochester.urmc;
2,770,681
public static Bitmap media_getBitmap(Context context, String resource) { Bitmap bResource = null; if(resource!=null) { //First we try to get the image from the drawable resources try{ int imgResourceId = Integer.decode(resource); bResource = media_getBitmapFromResourceId(context, imgResourceId);...
static Bitmap function(Context context, String resource) { Bitmap bResource = null; if(resource!=null) { try{ int imgResourceId = Integer.decode(resource); bResource = media_getBitmapFromResourceId(context, imgResourceId); }catch(Exception e){} if(bResource==null){ try{ bResource = media_getBitmapFromAsset(context, res...
/** * This method obtains a Bitmao object for the specified resource where * resource can be a drawable resource Id, an assets/raw folder file name or * an URL.<br><br> * * The order of load is:<br> * DRAWABLE -> ASSETS -> RAW -> URL * * @param context * @param resource A drawable resource Id, an ...
This method obtains a Bitmao object for the specified resource where resource can be a drawable resource Id, an assets/raw folder file name or an URL. The order of load is: DRAWABLE -> ASSETS -> RAW -> URL
media_getBitmap
{ "repo_name": "javocsoft/javocsoft-toolbox", "path": "src/es/javocsoft/android/lib/toolbox/ToolBox.java", "license": "gpl-3.0", "size": 316451 }
[ "android.content.Context", "android.graphics.Bitmap" ]
import android.content.Context; import android.graphics.Bitmap;
import android.content.*; import android.graphics.*;
[ "android.content", "android.graphics" ]
android.content; android.graphics;
227,927
public void addFrameworkListener(FrameworkListener listener) { m_bundleContext.addFrameworkListener(listener); }
void function(FrameworkListener listener) { m_bundleContext.addFrameworkListener(listener); }
/** * Adds a framework listener. * @param listener the listener object to add * @see org.osgi.framework.BundleContext#addFrameworkListener(org.osgi.framework.FrameworkListener) */
Adds a framework listener
addFrameworkListener
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/IPojoContext.java", "license": "apache-2.0", "size": 20473 }
[ "org.osgi.framework.FrameworkListener" ]
import org.osgi.framework.FrameworkListener;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
2,088,535
private void addOzoneHeaders(HttpUriRequest httpRequest) { httpRequest.addHeader(HttpHeaders.AUTHORIZATION, Header.OZONE_SIMPLE_AUTHENTICATION_SCHEME + " " + ugi.getUserName()); httpRequest.addHeader(HttpHeaders.DATE, HddsClientUtils.formatDateTime(Time.monotonicNow())); httpRe...
void function(HttpUriRequest httpRequest) { httpRequest.addHeader(HttpHeaders.AUTHORIZATION, Header.OZONE_SIMPLE_AUTHENTICATION_SCHEME + " " + ugi.getUserName()); httpRequest.addHeader(HttpHeaders.DATE, HddsClientUtils.formatDateTime(Time.monotonicNow())); httpRequest.addHeader(Header.OZONE_VERSION_HEADER, Header.OZONE...
/** * Adds Ozone headers to http request. * * @param httpRequest Http Request */
Adds Ozone headers to http request
addOzoneHeaders
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rest/RestClient.java", "license": "apache-2.0", "size": 33892 }
[ "org.apache.hadoop.hdds.scm.client.HddsClientUtils", "org.apache.hadoop.ozone.client.rest.headers.Header", "org.apache.hadoop.util.Time", "org.apache.http.HttpEntity", "org.apache.http.HttpHeaders", "org.apache.http.client.methods.HttpUriRequest", "org.apache.http.util.EntityUtils" ]
import org.apache.hadoop.hdds.scm.client.HddsClientUtils; import org.apache.hadoop.ozone.client.rest.headers.Header; import org.apache.hadoop.util.Time; import org.apache.http.HttpEntity; import org.apache.http.HttpHeaders; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.util.EntityUtils;
import org.apache.hadoop.hdds.scm.client.*; import org.apache.hadoop.ozone.client.rest.headers.*; import org.apache.hadoop.util.*; import org.apache.http.*; import org.apache.http.client.methods.*; import org.apache.http.util.*;
[ "org.apache.hadoop", "org.apache.http" ]
org.apache.hadoop; org.apache.http;
2,769,560
protected void addTransportVFSFileURIPropertyDescriptor(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_InboundEndpoint_transportVFSFileURI_feature"), getString("_UI...
void function(Object object) { itemPropertyDescriptors.add(createItemPropertyDescriptor( ((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.INBOUND_ENDPOINT__TRANSPORT_VFS_FILE_URI, true, false, false, ItemPropertyDes...
/** * This adds a property descriptor for the Transport VFS File URI feature. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated NOT */
This adds a property descriptor for the Transport VFS File URI feature.
addTransportVFSFileURIPropertyDescriptor
{ "repo_name": "nwnpallewela/developer-studio", "path": "esb/plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/InboundEndpointItemProvider.java", "license": "apache-2.0", "size": 156993 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor", "org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;
import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*;
[ "org.eclipse.emf", "org.wso2.developerstudio" ]
org.eclipse.emf; org.wso2.developerstudio;
7,251
public HttpMessageConverter<?>[] getMessageConverters() { return messageConverters; }
HttpMessageConverter<?>[] function() { return messageConverters; }
/** * Return the message body converters that this adapter has been configured with. */
Return the message body converters that this adapter has been configured with
getMessageConverters
{ "repo_name": "leogoing/spring_jeesite", "path": "spring-webmvc-4.0/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java", "license": "apache-2.0", "size": 51892 }
[ "org.springframework.http.converter.HttpMessageConverter" ]
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.*;
[ "org.springframework.http" ]
org.springframework.http;
494,236
public int consumeInto(ByteBuffer output) { int read = readInto(output); consume(read); return read; }
int function(ByteBuffer output) { int read = readInto(output); consume(read); return read; }
/** * <p>Reads and consumes the content bytes of this {@link DataInfo} into the given {@link ByteBuffer}.</p> * * @param output the {@link ByteBuffer} to copy the bytes into * @return the number of bytes copied * @see #consume(int) */
Reads and consumes the content bytes of this <code>DataInfo</code> into the given <code>ByteBuffer</code>
consumeInto
{ "repo_name": "jamiepg1/jetty.project", "path": "jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/api/DataInfo.java", "license": "apache-2.0", "size": 7932 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,751,584