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
void setBusy(Client owner);
void setBusy(Client owner);
/** * change the node's status to busy. * @param owner */
change the node's status to busy
setBusy
{ "repo_name": "laurianed/scheduling", "path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/rmnode/RMNode.java", "license": "agpl-3.0", "size": 9799 }
[ "org.ow2.proactive.resourcemanager.authentication.Client" ]
import org.ow2.proactive.resourcemanager.authentication.Client;
import org.ow2.proactive.resourcemanager.authentication.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
2,672,127
public static IBridge getBridge( IEnvironment from, IEnvironment to, Object[] args) throws java.lang.Exception { synchronized (bridges) { String name = from.getName() + "_" + to.getName(); String hashName = from.getName() + from.getContext() + "_" ...
static IBridge function( IEnvironment from, IEnvironment to, Object[] args) throws java.lang.Exception { synchronized (bridges) { String name = from.getName() + "_" + to.getName(); String hashName = from.getName() + from.getContext() + "_" + to.getName() + to.getContext(); IBridge bridge = (IBridge) WeakMap.getValue(br...
/** * Gets a bridge from environment <code>from</code> to environment * <code>to</code>. * * <p>Creates a new bridge, if the requested bridge does not yet exist, and * hands the arguments to the bridge.</p> * * <p>If the requested bridge does not exist, it is searched for in package ...
Gets a bridge from environment <code>from</code> to environment <code>to</code>. Creates a new bridge, if the requested bridge does not yet exist, and hands the arguments to the bridge. If the requested bridge does not exist, it is searched for in package <code>com.sun.star.lib.uno.bridges.from_to;</code> and the root ...
getBridge
{ "repo_name": "srnsw/xena", "path": "plugins/office/ext/src/ridljar/com/sun/star/uno/UnoRuntime.java", "license": "gpl-3.0", "size": 27146 }
[ "com.sun.star.lib.util.WeakMap", "java.lang.reflect.Constructor" ]
import com.sun.star.lib.util.WeakMap; import java.lang.reflect.Constructor;
import com.sun.star.lib.util.*; import java.lang.reflect.*;
[ "com.sun.star", "java.lang" ]
com.sun.star; java.lang;
2,083,563
public void setBucketPolicy(String bucketName, S3BucketPolicy policy) { policyMap.put(bucketName, policy); }
void function(String bucketName, S3BucketPolicy policy) { policyMap.put(bucketName, policy); }
/** * The policy parameter can be set to null, which means that there is no policy * for the bucket so a database lookup is not necessary. * * @param bucketName * @param policy */
The policy parameter can be set to null, which means that there is no policy for the bucket so a database lookup is not necessary
setBucketPolicy
{ "repo_name": "argv0/cloudstack", "path": "awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java", "license": "apache-2.0", "size": 11955 }
[ "com.cloud.bridge.service.core.s3.S3BucketPolicy" ]
import com.cloud.bridge.service.core.s3.S3BucketPolicy;
import com.cloud.bridge.service.core.s3.*;
[ "com.cloud.bridge" ]
com.cloud.bridge;
2,845,449
void processRegionServers(Collection<ServerName> regionServerList) throws IOException, InterruptedException { List<WorkItemRegion> workItems = new ArrayList<WorkItemRegion>(regionServerList.size()); List<Future<Void>> workFutures; // loop to contact each region server in parallel for (ServerName...
void processRegionServers(Collection<ServerName> regionServerList) throws IOException, InterruptedException { List<WorkItemRegion> workItems = new ArrayList<WorkItemRegion>(regionServerList.size()); List<Future<Void>> workFutures; for (ServerName rsinfo: regionServerList) { workItems.add(new WorkItemRegion(this, rsinfo...
/** * Contacts each regionserver and fetches metadata about regions. * @param regionServerList - the list of region servers to connect to * @throws IOException if a remote or network exception occurs */
Contacts each regionserver and fetches metadata about regions
processRegionServers
{ "repo_name": "daidong/DominoHBase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java", "license": "apache-2.0", "size": 134479 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Collection", "java.util.List", "java.util.concurrent.ExecutionException", "java.util.concurrent.Future", "org.apache.hadoop.hbase.ServerName" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import org.apache.hadoop.hbase.ServerName;
import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,477,567
public void setLeaderboardList(List<LeaderboardList> leaderboardList) { this.leaderboardList = leaderboardList; }
void function(List<LeaderboardList> leaderboardList) { this.leaderboardList = leaderboardList; }
/** * Sets the leaderboard list */
Sets the leaderboard list
setLeaderboardList
{ "repo_name": "nicolas-raoul/apps-android-commons", "path": "app/src/main/java/fr/free/nrw/commons/profile/leaderboard/LeaderboardResponse.java", "license": "apache-2.0", "size": 4647 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,317,694
protected void replaceOldAsUpdate(Region aReg) { // get a key Object key = ParRegUtil.getExistingKey(aReg, uniqueKeys, numThreadsInClients, isThinClient||isEmptyClient); if (key == null) { Log.getLogWriter().info("Could not get existing key for replaceOldAsUpdate"); return; } // get old value, new ...
void function(Region aReg) { Object key = ParRegUtil.getExistingKey(aReg, uniqueKeys, numThreadsInClients, isThinClient isEmptyClient); if (key == null) { Log.getLogWriter().info(STR); return; } boolean containsKey = aReg.containsKey(key); BaseValueHolder oldValue = PdxTest.toValueHolder(aReg.get(key)); if (isThinClien...
/** Do a replace(K,V,V) that functions as a put because the key is present and the * oldValue is equal to what is currently in the region. * NOTE: for concurrent tests, this could wind up being a noop as somebody * could destroy the key before we do the replace. * @param aReg The region to call replace on....
Do a replace(K,V,V) that functions as a put because the key is present and the oldValue is equal to what is currently in the region. could destroy the key before we do the replace
replaceOldAsUpdate
{ "repo_name": "papicella/snappy-store", "path": "tests/core/src/main/java/parReg/ParRegTest.java", "license": "apache-2.0", "size": 239462 }
[ "com.gemstone.gemfire.cache.EntryNotFoundException", "com.gemstone.gemfire.cache.Region" ]
import com.gemstone.gemfire.cache.EntryNotFoundException; import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
2,063,023
public static IdentityService getIdentityServices() { return get(IdentityService.class); }
static IdentityService function() { return get(IdentityService.class); }
/** * Gets the identity services API * * @return the identity services */
Gets the identity services API
getIdentityServices
{ "repo_name": "adaptivecomputing/plugins-mws", "path": "openstack/src/main/groovy/org/openstack4j/api/Apis.java", "license": "apache-2.0", "size": 1676 }
[ "org.openstack4j.api.identity.IdentityService" ]
import org.openstack4j.api.identity.IdentityService;
import org.openstack4j.api.identity.*;
[ "org.openstack4j.api" ]
org.openstack4j.api;
348,183
@SideOnly(Side.CLIENT) public CreativeTabs getCreativeTabToDisplayOn() { return this.displayOnCreativeTab; }
@SideOnly(Side.CLIENT) CreativeTabs function() { return this.displayOnCreativeTab; }
/** * Returns the CreativeTab to display the given block on. */
Returns the CreativeTab to display the given block on
getCreativeTabToDisplayOn
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java", "license": "lgpl-2.1", "size": 119133 }
[ "net.minecraft.creativetab.CreativeTabs", "net.minecraftforge.fml.relauncher.Side", "net.minecraftforge.fml.relauncher.SideOnly" ]
import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.creativetab.*; import net.minecraftforge.fml.relauncher.*;
[ "net.minecraft.creativetab", "net.minecraftforge.fml" ]
net.minecraft.creativetab; net.minecraftforge.fml;
1,278,870
int updateByPrimaryKey(DBJobs record);
int updateByPrimaryKey(DBJobs record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table jobs * * @mbggenerated Tue May 26 15:53:09 CST 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table jobs
updateByPrimaryKey
{ "repo_name": "wolabs/womano", "path": "main/java/com/culabs/unicomportal/dao/DBJobsMapper.java", "license": "apache-2.0", "size": 1729 }
[ "com.culabs.unicomportal.model.db.DBJobs" ]
import com.culabs.unicomportal.model.db.DBJobs;
import com.culabs.unicomportal.model.db.*;
[ "com.culabs.unicomportal" ]
com.culabs.unicomportal;
1,625,610
public static void wipeRepositories(String... repositories) { // if nothing is provided, delete all if (repositories.length == 0) { repositories = new String[]{"*"}; } for (String repository : repositories) { try { client().admin().cluster().pr...
static void function(String... repositories) { if (repositories.length == 0) { repositories = new String[]{"*"}; } for (String repository : repositories) { try { client().admin().cluster().prepareDeleteRepository(repository).execute().actionGet(); } catch (RepositoryMissingException ex) { } } }
/** * Deletes repositories, supports wildcard notation. */
Deletes repositories, supports wildcard notation
wipeRepositories
{ "repo_name": "davidvgalbraith/elasticsearch", "path": "plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AbstractS3SnapshotRestoreTest.java", "license": "apache-2.0", "size": 27789 }
[ "org.elasticsearch.repositories.RepositoryMissingException" ]
import org.elasticsearch.repositories.RepositoryMissingException;
import org.elasticsearch.repositories.*;
[ "org.elasticsearch.repositories" ]
org.elasticsearch.repositories;
2,877,808
@Override public void onMessage(Message message) { synchronized (messages) { messages.add(message); if (verbose) { LOG.info("Received: " + message); } messages.notifyAll(); } }
void function(Message message) { synchronized (messages) { messages.add(message); if (verbose) { LOG.info(STR + message); } messages.notifyAll(); } }
/** * Method implemented from MessageListener interface. * * @param message */
Method implemented from MessageListener interface
onMessage
{ "repo_name": "lburgazzoli/apache-activemq-artemis", "path": "tests/activemq5-unit-tests/src/test/java/org/apache/activemq/spring/ConsumerBean.java", "license": "apache-2.0", "size": 4831 }
[ "javax.jms.Message" ]
import javax.jms.Message;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
1,102,070
void setFileLevelJsDocBuilder( JSDocInfoBuilder fileLevelJsDocBuilder) { this.fileLevelJsDocBuilder = fileLevelJsDocBuilder; }
void setFileLevelJsDocBuilder( JSDocInfoBuilder fileLevelJsDocBuilder) { this.fileLevelJsDocBuilder = fileLevelJsDocBuilder; }
/** * Sets the JsDocBuilder for the file-level (root) node of this parse. The * parser uses the builder to append any preserve annotations it encounters * in JsDoc comments. * * @param fileLevelJsDocBuilder */
Sets the JsDocBuilder for the file-level (root) node of this parse. The parser uses the builder to append any preserve annotations it encounters in JsDoc comments
setFileLevelJsDocBuilder
{ "repo_name": "brad4d/closure-compiler", "path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java", "license": "apache-2.0", "size": 86616 }
[ "com.google.javascript.rhino.JSDocInfoBuilder" ]
import com.google.javascript.rhino.JSDocInfoBuilder;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,119,474
@Test void testAllowGuestLogin() { Assertions.assertTrue(this.authenticator.isAllowGuestLogin()); this.authenticator.setAllowGuestLogin(false); Assertions.assertFalse(this.authenticator.isAllowGuestLogin()); }
void testAllowGuestLogin() { Assertions.assertTrue(this.authenticator.isAllowGuestLogin()); this.authenticator.setAllowGuestLogin(false); Assertions.assertFalse(this.authenticator.isAllowGuestLogin()); }
/** * Test allow guest login. */
Test allow guest login
testAllowGuestLogin
{ "repo_name": "hazendaz/waffle", "path": "Source/JNA/waffle-tomcat9/src/test/java/waffle/apache/NegotiateAuthenticatorTest.java", "license": "mit", "size": 14034 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,709,491
public List addTabCompletionOptions(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) { return par2ArrayOfStr.length == 1 ? getListOfStringsMatchingLastWord(par2ArrayOfStr, this.getListOfPlayers()) : null; }
List function(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) { return par2ArrayOfStr.length == 1 ? getListOfStringsMatchingLastWord(par2ArrayOfStr, this.getListOfPlayers()) : null; }
/** * Adds the strings available in this command to the given list of tab completion options. */
Adds the strings available in this command to the given list of tab completion options
addTabCompletionOptions
{ "repo_name": "HATB0T/RuneCraftery", "path": "forge/mcp/src/minecraft/net/minecraft/command/CommandEnchant.java", "license": "lgpl-3.0", "size": 4258 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
954,768
private static Long getOffset(String topic, int partition, long currentTime) { // String clientName = "Client_" + topic + "_" + partition; // PartitionMetadata metadata = KafkaUtils.findLeader(topic, partition); Broker leadBroker = KafkaUtils.findLeader(topic, partition); Preconditions...
static Long function(String topic, int partition, long currentTime) { Broker leadBroker = KafkaUtils.findLeader(topic, partition); Preconditions.checkNotNull(leadBroker, STR); BrokerEndPoint endPoint = leadBroker.getBrokerEndPoint(SecurityProtocol.PLAINTEXT); Preconditions.checkNotNull(endPoint, STR); SimpleConsumer co...
/** * Get offset * * @param topic topic * @param partition partition * @param currentTime currentTime * @return offset */
Get offset
getOffset
{ "repo_name": "zhaoxunyong/zxy-commons", "path": "zxy-commons-mq/src/main/java/com/zxy/commons/mq/utils/KafkaUtils.java", "license": "apache-2.0", "size": 16670 }
[ "com.google.common.base.Preconditions", "java.util.HashMap", "java.util.Map", "org.apache.kafka.common.protocol.SecurityProtocol" ]
import com.google.common.base.Preconditions; import java.util.HashMap; import java.util.Map; import org.apache.kafka.common.protocol.SecurityProtocol;
import com.google.common.base.*; import java.util.*; import org.apache.kafka.common.protocol.*;
[ "com.google.common", "java.util", "org.apache.kafka" ]
com.google.common; java.util; org.apache.kafka;
282,269
public boolean runAfter(List tasks, int size) { return false; }//end runAfter }//end class ChangedEventTask
boolean function(List tasks, int size) { return false; } }
/** This method returns true if the current instance of this class * must be run after at least one task in the input task list with * an index less than the <code>size</code> parameter (size may be * less than tasks.size()). * <p> * Note that using List.get will be mor...
This method returns true if the current instance of this class must be run after at least one task in the input task list with an index less than the <code>size</code> parameter (size may be less than tasks.size()). Note that using List.get will be more efficient than List.iterator
runAfter
{ "repo_name": "cdegroot/river", "path": "src/com/sun/jini/fiddler/FiddlerImpl.java", "license": "apache-2.0", "size": 419779 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
872,648
public JobReleaseTask withResourceFiles(List<ResourceFile> resourceFiles) { this.resourceFiles = resourceFiles; return this; }
JobReleaseTask function(List<ResourceFile> resourceFiles) { this.resourceFiles = resourceFiles; return this; }
/** * Set the resourceFiles value. * * @param resourceFiles the resourceFiles value to set * @return the JobReleaseTask object itself. */
Set the resourceFiles value
withResourceFiles
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-batch/src/main/java/com/microsoft/azure/batch/protocol/models/JobReleaseTask.java", "license": "mit", "size": 5752 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
249,322
@Inject(value = "struts.javatemplates.defaultTemplateType", required = false) public void setDefaultTemplateType(String defaultTemplateTheme) { // Make sure we don't set ourself as default for race condition if (defaultTemplateTheme != null && !defaultTemplateTheme.equalsIgnoreCase(getSuffix()))...
@Inject(value = STR, required = false) void function(String defaultTemplateTheme) { if (defaultTemplateTheme != null && !defaultTemplateTheme.equalsIgnoreCase(getSuffix())) { this.defaultTemplateType = defaultTemplateTheme.toLowerCase(); } else { LOG.error(STR, getSuffix()); } }
/** * Allows for providing an alternative default struts theme. Will default to "ftl" otherwise. * * @param defaultTemplateTheme the struts default theme */
Allows for providing an alternative default struts theme. Will default to "ftl" otherwise
setDefaultTemplateType
{ "repo_name": "Ile2/struts2-showcase-demo", "path": "src/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java", "license": "apache-2.0", "size": 6404 }
[ "com.opensymphony.xwork2.inject.Inject" ]
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.inject.*;
[ "com.opensymphony.xwork2" ]
com.opensymphony.xwork2;
766,724
public void setRuleService(RulesManagerRemoteServiceAsync rulesManagerServiceRemote) { this.rulesService = rulesManagerServiceRemote; }
void function(RulesManagerRemoteServiceAsync rulesManagerServiceRemote) { this.rulesService = rulesManagerServiceRemote; }
/** * Sets the rule service. * * @param rulesManagerServiceRemote * the new rule service */
Sets the rule service
setRuleService
{ "repo_name": "andrefilo/geofence", "path": "src/gui/core/plugin/userui/src/main/java/org/geoserver/geofence/gui/client/widget/EditRuleWidget.java", "license": "gpl-2.0", "size": 72949 }
[ "org.geoserver.geofence.gui.client.service.RulesManagerRemoteServiceAsync" ]
import org.geoserver.geofence.gui.client.service.RulesManagerRemoteServiceAsync;
import org.geoserver.geofence.gui.client.service.*;
[ "org.geoserver.geofence" ]
org.geoserver.geofence;
1,784,048
public void setIndicator(String indicatorName) { if (TextUtils.isEmpty(indicatorName)) { return; } StringBuilder drawableClassName = new StringBuilder(); if (!indicatorName.contains(".")) { String defaultPackageName = getClass().getPackage().getName(); ...
void function(String indicatorName) { if (TextUtils.isEmpty(indicatorName)) { return; } StringBuilder drawableClassName = new StringBuilder(); if (!indicatorName.contains(".")) { String defaultPackageName = getClass().getPackage().getName(); drawableClassName.append(defaultPackageName) .append(STR) .append("."); } draw...
/** * You should pay attention to pass this parameter with two way: * for example: * 1. Only class Name,like "SimpleIndicator".(This way would use default package name with * "com.wang.avi.indicators") * 2. Class name with full package,like "com.my.android.indicators.SimpleIndicator". * ...
You should pay attention to pass this parameter with two way: for example: 1. Only class Name,like "SimpleIndicator".(This way would use default package name with "com.wang.avi.indicators") 2. Class name with full package,like "com.my.android.indicators.SimpleIndicator"
setIndicator
{ "repo_name": "zmc969213509/eyts", "path": "LRecyclerviewlibrary/src/main/java/com/github/jdsjlzx/progressindicator/AVLoadingIndicatorView.java", "license": "apache-2.0", "size": 19296 }
[ "android.text.TextUtils", "android.util.Log" ]
import android.text.TextUtils; import android.util.Log;
import android.text.*; import android.util.*;
[ "android.text", "android.util" ]
android.text; android.util;
595,757
public static SchemaOperationException validateDropColumn(QueryEntity entity, String fieldName, String colName) { if (F.eq(fieldName, entity.getKeyFieldName()) || KEY_FIELD_NAME.equalsIgnoreCase(fieldName)) return new SchemaOperationException("Cannot drop column \"" + colName + "...
static SchemaOperationException function(QueryEntity entity, String fieldName, String colName) { if (F.eq(fieldName, entity.getKeyFieldName()) KEY_FIELD_NAME.equalsIgnoreCase(fieldName)) return new SchemaOperationException(STRSTR\STR); if (F.eq(fieldName, entity.getValueFieldName()) VAL_FIELD_NAME.equalsIgnoreCase(fiel...
/** * Checks if given column can be removed from table using its {@link QueryEntity}. * * @param entity Query entity. * @param fieldName Name of the field of the key or value object. * @param colName Name of the column. * @return {@code null} if it's OK to remove the column and exception o...
Checks if given column can be removed from table using its <code>QueryEntity</code>
validateDropColumn
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/query/QueryUtils.java", "license": "apache-2.0", "size": 50059 }
[ "java.util.Collection", "java.util.Set", "org.apache.ignite.cache.QueryEntity", "org.apache.ignite.cache.QueryIndex", "org.apache.ignite.internal.processors.query.schema.SchemaOperationException", "org.apache.ignite.internal.util.typedef.F" ]
import java.util.Collection; import java.util.Set; import org.apache.ignite.cache.QueryEntity; import org.apache.ignite.cache.QueryIndex; import org.apache.ignite.internal.processors.query.schema.SchemaOperationException; import org.apache.ignite.internal.util.typedef.F;
import java.util.*; import org.apache.ignite.cache.*; import org.apache.ignite.internal.processors.query.schema.*; import org.apache.ignite.internal.util.typedef.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,448,544
// Stack Blur v1.0 from // http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html // // Java Author: Mario Klingemann <mario at quasimondo.com> // http://incubator.quasimondo.com // created Feburary 29, 2004 // Android port : Yahel Bouaziz <yahel at kayen...
Bitmap bitmap; if (canReuseInBitmap) { bitmap = sentBitmap; } else { bitmap = sentBitmap.copy(sentBitmap.getConfig(), true); } if (radius < 1) { return (null); } int w = bitmap.getWidth(); int h = bitmap.getHeight(); int[] pix = new int[w * h]; bitmap.getPixels(pix, 0, w, 0, 0, w, h); int wm = w - 1; int hm = h - 1; in...
/** * blur a given bitmap * * @param sentBitmap bitmap to blur * @param radius blur radius * @param canReuseInBitmap true if bitmap must be reused without blur * @return blurred bitmap */
blur a given bitmap
doBlur
{ "repo_name": "florent37/DaVinci", "path": "davinci/src/main/java/com/github/florent37/davinci/utils/FastBlurHelper.java", "license": "apache-2.0", "size": 7714 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
721,350
Http2Headers status(AsciiString value);
Http2Headers status(AsciiString value);
/** * Sets the {@link PseudoHeaderName#STATUS} header or {@code null} if there is no such header */
Sets the <code>PseudoHeaderName#STATUS</code> header or null if there is no such header
status
{ "repo_name": "Sandyarathi/Lab2gRPC", "path": "lib/netty/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2Headers.java", "license": "bsd-3-clause", "size": 6206 }
[ "io.netty.handler.codec.AsciiString" ]
import io.netty.handler.codec.AsciiString;
import io.netty.handler.codec.*;
[ "io.netty.handler" ]
io.netty.handler;
730,648
public static String resourceKey(final String path, final Locale locale, final String style) { // escape sequence for '..' (prevents crippled urls in browser) final CharSequence parentEscape = Application.get() .getResourceSettings() .getParentFolderPlaceholder(); final String extension = Files.extensi...
static String function(final String path, final Locale locale, final String style) { final CharSequence parentEscape = Application.get() .getResourceSettings() .getParentFolderPlaceholder(); final String extension = Files.extension(path); final String basePath = Files.basePath(path, extension).replace("../", parentEsca...
/** * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. Inserts _[locale] and * _[style] into path just before any extension that might exist. * * @param path * The resource path * @param locale * The locale * @param style * The style (see {@link org.a...
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT CALL IT. Inserts _[locale] and _[style] into path just before any extension that might exist
resourceKey
{ "repo_name": "astubbs/wicket.get-portals2", "path": "wicket/src/main/java/org/apache/wicket/SharedResources.java", "license": "apache-2.0", "size": 8701 }
[ "java.lang.ref.WeakReference", "java.util.HashMap", "java.util.Locale", "java.util.Map", "java.util.WeakHashMap", "org.apache.wicket.util.file.Files", "org.apache.wicket.util.string.AppendingStringBuffer" ]
import java.lang.ref.WeakReference; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.WeakHashMap; import org.apache.wicket.util.file.Files; import org.apache.wicket.util.string.AppendingStringBuffer;
import java.lang.ref.*; import java.util.*; import org.apache.wicket.util.file.*; import org.apache.wicket.util.string.*;
[ "java.lang", "java.util", "org.apache.wicket" ]
java.lang; java.util; org.apache.wicket;
2,048,313
private List<SortGroup> collectSortGroups(List<WindowGroup> windowGroups) { List<SortGroup> sortGroups = Lists.newArrayList(); for (WindowGroup windowGroup: windowGroups) { boolean match = false; for (SortGroup sortGroup: sortGroups) { if (sortGroup.isCompatible(windowGroup)) { s...
List<SortGroup> function(List<WindowGroup> windowGroups) { List<SortGroup> sortGroups = Lists.newArrayList(); for (WindowGroup windowGroup: windowGroups) { boolean match = false; for (SortGroup sortGroup: sortGroups) { if (sortGroup.isCompatible(windowGroup)) { sortGroup.add(windowGroup); match = true; break; } } if (!...
/** * Partitions the windowGroups into SortGroups based on compatible order by exprs. */
Partitions the windowGroups into SortGroups based on compatible order by exprs
collectSortGroups
{ "repo_name": "gistic/PublicSpatialImpala", "path": "fe/src/main/java/com/cloudera/impala/planner/AnalyticPlanner.java", "license": "apache-2.0", "size": 32308 }
[ "com.cloudera.impala.analysis.Expr", "com.google.common.collect.Lists", "java.util.List" ]
import com.cloudera.impala.analysis.Expr; import com.google.common.collect.Lists; import java.util.List;
import com.cloudera.impala.analysis.*; import com.google.common.collect.*; import java.util.*;
[ "com.cloudera.impala", "com.google.common", "java.util" ]
com.cloudera.impala; com.google.common; java.util;
1,521,026
public void allocateNew() throws OutOfMemoryRuntimeException;
void function() throws OutOfMemoryRuntimeException;
/** * Allocate new buffers. ValueVector implements logic to determine how much to allocate. * @throws OutOfMemoryRuntimeException Thrown if no memory can be allocated. */
Allocate new buffers. ValueVector implements logic to determine how much to allocate
allocateNew
{ "repo_name": "yssharma/pig-on-drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/vector/ValueVector.java", "license": "apache-2.0", "size": 5263 }
[ "org.apache.drill.exec.memory.OutOfMemoryRuntimeException" ]
import org.apache.drill.exec.memory.OutOfMemoryRuntimeException;
import org.apache.drill.exec.memory.*;
[ "org.apache.drill" ]
org.apache.drill;
207,988
public void setScanAsUser(User user) { this.scanUser = user; }
void function(User user) { this.scanUser = user; }
/** * Sets the spider so it will scan from the point of view of a user. * * @param user the user to be scanned as */
Sets the spider so it will scan from the point of view of a user
setScanAsUser
{ "repo_name": "lightsey/zaproxy", "path": "src/org/zaproxy/zap/spider/Spider.java", "license": "apache-2.0", "size": 22262 }
[ "org.zaproxy.zap.users.User" ]
import org.zaproxy.zap.users.User;
import org.zaproxy.zap.users.*;
[ "org.zaproxy.zap" ]
org.zaproxy.zap;
2,605,983
@SuppressWarnings("unchecked") private void read(StreamInput in) throws IOException { fields = (ArrayList<String>) in.readGenericValue(); valueType = in.readOptionalWriteable(ValueType::readFromStream); format = in.readOptionalString(); missingMap = in.readMap(); }
@SuppressWarnings(STR) void function(StreamInput in) throws IOException { fields = (ArrayList<String>) in.readGenericValue(); valueType = in.readOptionalWriteable(ValueType::readFromStream); format = in.readOptionalString(); missingMap = in.readMap(); }
/** * Read from a stream. */
Read from a stream
read
{ "repo_name": "scaleborn/elasticsearch-linear-regression", "path": "src/main/java/org/elasticsearch/search/aggregations/support/MultiValuesSourceAggregationBuilder.java", "license": "apache-2.0", "size": 13696 }
[ "java.io.IOException", "java.util.ArrayList", "org.elasticsearch.common.io.stream.StreamInput" ]
import java.io.IOException; import java.util.ArrayList; import org.elasticsearch.common.io.stream.StreamInput;
import java.io.*; import java.util.*; import org.elasticsearch.common.io.stream.*;
[ "java.io", "java.util", "org.elasticsearch.common" ]
java.io; java.util; org.elasticsearch.common;
898,853
public SoyData get(String keyStr) { List<String> keys = split(keyStr, '.'); int numKeys = keys.size(); CollectionData collectionData = this; for (int i = 0; i <= numKeys - 2; ++i) { SoyData soyData = collectionData.getSingle(keys.get(i)); if (!(soyData instanceof CollectionData)) { ...
SoyData function(String keyStr) { List<String> keys = split(keyStr, '.'); int numKeys = keys.size(); CollectionData collectionData = this; for (int i = 0; i <= numKeys - 2; ++i) { SoyData soyData = collectionData.getSingle(keys.get(i)); if (!(soyData instanceof CollectionData)) { return null; } collectionData = (Collec...
/** * Gets the data at the specified key string. * * @param keyStr One or more map keys and/or list indices (separated by '.' if multiple parts). * Indicates the path to the location within this data tree. * @return The data at the specified key string, or null if there's no data at the location. ...
Gets the data at the specified key string
get
{ "repo_name": "rpatil26/closure-templates", "path": "java/src/com/google/template/soy/data/restricted/CollectionData.java", "license": "apache-2.0", "size": 13946 }
[ "com.google.template.soy.data.SoyData", "java.util.List" ]
import com.google.template.soy.data.SoyData; import java.util.List;
import com.google.template.soy.data.*; import java.util.*;
[ "com.google.template", "java.util" ]
com.google.template; java.util;
2,565,017
public boolean inSensitiveArea(Point2D pt){ if (shape == null) return false; return shape.contains(pt); }
boolean function(Point2D pt){ if (shape == null) return false; return shape.contains(pt); }
/** * Returns true if pt is in the area painted by this shape painter */
Returns true if pt is in the area painted by this shape painter
inSensitiveArea
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/gvt/FillShapePainter.java", "license": "apache-2.0", "size": 4261 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
515,468
private int findImagePos( String name ) { List images = (List) module.getLocalProperty( module, IMAGES_PROP ); if ( images == null || images.isEmpty( ) ) return -1; int i = 0; for ( Iterator iter = images.iterator( ); iter.hasNext( ); i++ ) { EmbeddedImage image = (EmbeddedImage) iter.next( ); ...
int function( String name ) { List images = (List) module.getLocalProperty( module, IMAGES_PROP ); if ( images == null images.isEmpty( ) ) return -1; int i = 0; for ( Iterator iter = images.iterator( ); iter.hasNext( ); i++ ) { EmbeddedImage image = (EmbeddedImage) iter.next( ); if ( image.getName( ) != null && image.g...
/** * Finds the position of the image with the given name. * * @param name * the image name to find * @return position of image with the specified name. Return -1, if not * found. */
Finds the position of the image with the given name
findImagePos
{ "repo_name": "Charling-Huang/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/LayoutModuleHandle.java", "license": "epl-1.0", "size": 23021 }
[ "java.util.Iterator", "java.util.List", "org.eclipse.birt.report.model.api.elements.structures.EmbeddedImage" ]
import java.util.Iterator; import java.util.List; import org.eclipse.birt.report.model.api.elements.structures.EmbeddedImage;
import java.util.*; import org.eclipse.birt.report.model.api.elements.structures.*;
[ "java.util", "org.eclipse.birt" ]
java.util; org.eclipse.birt;
957,159
public static void unlockAll(List<MCLock> locks) { for (MCLock lock: locks) { try { lock.close(); } catch (IOException e) { log.warn("Exception in unlockAll", e); } } }
static void function(List<MCLock> locks) { for (MCLock lock: locks) { try { lock.close(); } catch (IOException e) { log.warn(STR, e); } } }
/** * Unlock all given locks * @param locks */
Unlock all given locks
unlockAll
{ "repo_name": "sgmiller/hiveelements", "path": "galeforce/src/main/java/com/beecavegames/persistence/MCLock.java", "license": "apache-2.0", "size": 664 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,036,130
final String xml = resourceFactory.getResourceAsString(providerName, formPath); final ExtensionForm extensionForm = getExtensionFormFromXML(xml); extensionForm.setId(""); extensionForm.setLabel(form.getName()); extensionForm.setForm(form); // If this form is already saved on the specified UI location, we ...
final String xml = resourceFactory.getResourceAsString(providerName, formPath); final ExtensionForm extensionForm = getExtensionFormFromXML(xml); extensionForm.setId(STRSTRlink"); Map<String, String> options = new HashMap<String, String>(); options.put(DISPLAY_STYLE, extensionForm.getDisplayStyle()); extension.setUrl(g...
/** * Returns the ExtensionForm corresponding to a Form instance AND saves it. * @param providerName Eg. "lfhcforms". * @param formPath The relative form path under webapp/resources (eg. "htmlforms/myform.xml") * @param form The Form instance */
Returns the ExtensionForm corresponding to a Form instance AND saves it
getExtensionFormFromUiResourceAndForm
{ "repo_name": "mekomsolutions/openmrs-module-lfhcforms", "path": "api/src/main/java/org/openmrs/module/lfhcforms/utils/ExtensionFormUtil.java", "license": "mit", "size": 5763 }
[ "java.util.HashMap", "java.util.Map", "org.openmrs.module.formentryapp.page.controller.forms.ExtensionForm" ]
import java.util.HashMap; import java.util.Map; import org.openmrs.module.formentryapp.page.controller.forms.ExtensionForm;
import java.util.*; import org.openmrs.module.formentryapp.page.controller.forms.*;
[ "java.util", "org.openmrs.module" ]
java.util; org.openmrs.module;
1,513,359
return new HistoricalTimeSeriesRating(rules); } //------------------------------------------------------------------------- @ImmutableConstructor private HistoricalTimeSeriesRating(final Collection<HistoricalTimeSeriesRatingRule> rules) { ArgumentChecker.notEmpty(rules, "rules"); _rules = ImmutableS...
return new HistoricalTimeSeriesRating(rules); } private HistoricalTimeSeriesRating(final Collection<HistoricalTimeSeriesRatingRule> rules) { ArgumentChecker.notEmpty(rules, "rules"); _rules = ImmutableSet.copyOf(rules); _rulesByFieldType = buildRuleDb(); }
/** * Obtains an instance of {@code HistoricalTimeSeriesRating}. * * @param rules the rules, not null and not empty * @return the rating, not null */
Obtains an instance of HistoricalTimeSeriesRating
of
{ "repo_name": "McLeodMoores/starling", "path": "projects/master/src/main/java/com/opengamma/master/historicaltimeseries/impl/HistoricalTimeSeriesRating.java", "license": "apache-2.0", "size": 12971 }
[ "com.google.common.collect.ImmutableSet", "com.opengamma.util.ArgumentChecker", "java.util.Collection" ]
import com.google.common.collect.ImmutableSet; import com.opengamma.util.ArgumentChecker; import java.util.Collection;
import com.google.common.collect.*; import com.opengamma.util.*; import java.util.*;
[ "com.google.common", "com.opengamma.util", "java.util" ]
com.google.common; com.opengamma.util; java.util;
639,110
@ServiceMethod(returns = ReturnType.SINGLE) SourceControlInner getSourceControl(String sourceControlType);
@ServiceMethod(returns = ReturnType.SINGLE) SourceControlInner getSourceControl(String sourceControlType);
/** * Description for Gets source control token. * * @param sourceControlType Type of source control. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appservice.models.DefaultErrorResponseErrorException thrown if the request is ...
Description for Gets source control token
getSourceControl
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/ResourceProvidersClient.java", "license": "mit", "size": 48714 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.appservice.fluent.models.SourceControlInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.appservice.fluent.models.SourceControlInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.appservice.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
210,400
@Override() public java.lang.Class getJavaClass( ) { return org.chocolate_milk.model.VendorModRq.class; }
@Override() java.lang.Class function( ) { return org.chocolate_milk.model.VendorModRq.class; }
/** * Method getJavaClass. * * @return the Java class represented by this descriptor. */
Method getJavaClass
getJavaClass
{ "repo_name": "galleon1/chocolate-milk", "path": "src/org/chocolate_milk/model/descriptors/VendorModRqDescriptor.java", "license": "lgpl-3.0", "size": 3574 }
[ "org.chocolate_milk.model.VendorModRq" ]
import org.chocolate_milk.model.VendorModRq;
import org.chocolate_milk.model.*;
[ "org.chocolate_milk.model" ]
org.chocolate_milk.model;
2,230,848
public static String getFriendlyDayString(Context context, long dateInMillis) { // The day string for forecast uses the following logic: // For today: "Today, June 8" // For tomorrow: "Tomorrow" // For the next 5 days: "Wednesday" (just the day name) // For all days after th...
static String function(Context context, long dateInMillis) { Time time = new Time(); time.setToNow(); long currentTime = System.currentTimeMillis(); int julianDay = Time.getJulianDay(dateInMillis, time.gmtoff); int currentJulianDay = Time.getJulianDay(currentTime, time.gmtoff); if (julianDay == currentJulianDay) { Stri...
/** * Helper method to convert the database representation of the date into something to display * to users. As classy and polished a user experience as "20140102" is, we can do better. * * @param context Context to use for resource localization * @param dateInMillis The date in milliseconds ...
Helper method to convert the database representation of the date into something to display to users. As classy and polished a user experience as "20140102" is, we can do better
getFriendlyDayString
{ "repo_name": "guzike/Sunshine", "path": "app/src/main/java/com/example/android/sunshine/app/Utility.java", "license": "apache-2.0", "size": 10301 }
[ "android.content.Context", "android.text.format.Time", "java.text.SimpleDateFormat" ]
import android.content.Context; import android.text.format.Time; import java.text.SimpleDateFormat;
import android.content.*; import android.text.format.*; import java.text.*;
[ "android.content", "android.text", "java.text" ]
android.content; android.text; java.text;
1,153,852
private void startReading() throws IOException { currentVertexId = null; in = new DataInputStream( new BufferedInputStream(new FileInputStream(file), bufferSize)); verticesLeft = in.readInt(); if (LOG.isDebugEnabled()) { LOG.debug("startReading: File " + file + " with " + verti...
void function() throws IOException { currentVertexId = null; in = new DataInputStream( new BufferedInputStream(new FileInputStream(file), bufferSize)); verticesLeft = in.readInt(); if (LOG.isDebugEnabled()) { LOG.debug(STR + file + STR + verticesLeft + STR); } }
/** * Prepare for reading * * @throws IOException */
Prepare for reading
startReading
{ "repo_name": "korsvanloon/giraph", "path": "giraph-core/src/main/java/org/apache/giraph/comm/messages/out_of_core/SequentialFileMessageStore.java", "license": "apache-2.0", "size": 13975 }
[ "java.io.BufferedInputStream", "java.io.DataInputStream", "java.io.FileInputStream", "java.io.IOException" ]
import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,476,381
public void release(String sessionHandle) throws LensException { getSession(sessionMap.get(sessionHandle)).release(); }
void function(String sessionHandle) throws LensException { getSession(sessionMap.get(sessionHandle)).release(); }
/** * Releases a lens session specified by the public UUID. * * @param sessionHandle * the session handle * @throws LensException * if session cannot be released */
Releases a lens session specified by the public UUID
release
{ "repo_name": "prongs/grill", "path": "lens-server/src/main/java/org/apache/lens/server/LensService.java", "license": "apache-2.0", "size": 13735 }
[ "org.apache.lens.api.LensException" ]
import org.apache.lens.api.LensException;
import org.apache.lens.api.*;
[ "org.apache.lens" ]
org.apache.lens;
126,605
RespuestaFacturacion rta = new RespuestaFacturacion(); Integer idTrans = 0; String msn = "Validacion de datos incorrecta"; int iterator = 0; try { if (this.validaListasRecibidad(facturacion)) { boolean valida = this.validaInformacionPreFacturacion(facturacion, rta); if (valida) { initOperation...
RespuestaFacturacion rta = new RespuestaFacturacion(); Integer idTrans = 0; String msn = STR; int iterator = 0; try { if (this.validaListasRecibidad(facturacion)) { boolean valida = this.validaInformacionPreFacturacion(facturacion, rta); if (valida) { initOperation(); idTrans = this.getSecunceTransId(); if (facturacion...
/** * Funcion encargada de realizar la logica para la realizacion de la factura * en el sistema * * @param facturacion * @return */
Funcion encargada de realizar la logica para la realizacion de la factura en el sistema
generaFacturacion
{ "repo_name": "jmorenor1986/SAFTWS", "path": "src/main/java/co/com/codesoftware/logic/FacturacionLogic.java", "license": "gpl-2.0", "size": 11960 }
[ "co.com.codesoftware.persistence.entites.facturacion.RespuestaFacturacion", "co.com.codesoftware.persistence.entities.facturacion.tables.TemporalProdTable", "co.com.codesoftware.persistence.entities.facturacion.tables.TemporalRecTable" ]
import co.com.codesoftware.persistence.entites.facturacion.RespuestaFacturacion; import co.com.codesoftware.persistence.entities.facturacion.tables.TemporalProdTable; import co.com.codesoftware.persistence.entities.facturacion.tables.TemporalRecTable;
import co.com.codesoftware.persistence.entites.facturacion.*; import co.com.codesoftware.persistence.entities.facturacion.tables.*;
[ "co.com.codesoftware" ]
co.com.codesoftware;
2,140,541
List<BatchResponse> executeBatch(BatchRequests<BatchRequest> requests) throws FacebookException;
List<BatchResponse> executeBatch(BatchRequests<BatchRequest> requests) throws FacebookException;
/** * Calls Facebook batch API. * * @param requests batch parameters * @return batch response * @throws FacebookException when Facebook service or network is unavailable * @see <a href="https://developers.facebook.com/docs/graph-api/making-multiple-requests/">Making Multiple API Requests -...
Calls Facebook batch API
executeBatch
{ "repo_name": "willisju/facebook4j", "path": "facebook4j-core/src/main/java/facebook4j/api/BatchRequestsMethods.java", "license": "apache-2.0", "size": 1321 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,466,879
try (InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream("suggestion-configuration.yml")) { SuggestionEntry[] suggestions = YamlParserUtil.parse(input, SuggestionEntry[].class); for (SuggestionEntry suggestionEntry : suggestions) { if (!isSugges...
try (InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream(STR)) { SuggestionEntry[] suggestions = YamlParserUtil.parse(input, SuggestionEntry[].class); for (SuggestionEntry suggestionEntry : suggestions) { if (!isSuggestionExist(suggestionEntry)) { alienDAO.save(suggestionEntry); try {...
/** * This method load the defaults suggestions to ES. * * @throws IOException */
This method load the defaults suggestions to ES
loadDefaultSuggestions
{ "repo_name": "OresteVisari/alien4cloud", "path": "alien4cloud-core/src/main/java/alien4cloud/suggestions/services/SuggestionService.java", "license": "apache-2.0", "size": 24396 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,091,207
@Override public JSONObject put(String key, Collection value) throws JSONException { this.put(key, (Object) value); return this; }
JSONObject function(String key, Collection value) throws JSONException { this.put(key, (Object) value); return this; }
/** * Put a key/value pair in the JSONObject, where the value will be a * JSONArray which is produced from a Collection. * @param key A key string. * @param value A Collection value. * @return this. * @throws JSONException */
Put a key/value pair in the JSONObject, where the value will be a JSONArray which is produced from a Collection
put
{ "repo_name": "sajavadi/pinot", "path": "pinot-common/src/main/java/com/linkedin/pinot/pql/parsers/utils/JSONUtil.java", "license": "apache-2.0", "size": 29760 }
[ "java.util.Collection", "org.json.JSONException", "org.json.JSONObject" ]
import java.util.Collection; import org.json.JSONException; import org.json.JSONObject;
import java.util.*; import org.json.*;
[ "java.util", "org.json" ]
java.util; org.json;
801,101
return new File(this.executedProject.getProperties().getProperty("xp.runtime.runners")); }
return new File(this.executedProject.getProperties().getProperty(STR)); }
/** * Get location of XP-Runners * * For a forked lifecycle, get the property value from ${executedProject} * * @return java.io.File * @see net.xp_forge.maven.plugins.xp.InitializeMojo::execute() */
Get location of XP-Runners For a forked lifecycle, get the property value from ${executedProject}
getRunnersDirectory
{ "repo_name": "xp-forge/xp-maven-plugin", "path": "src/main/java/net/xp_forge/maven/plugins/xp/ApidocMojo.java", "license": "bsd-3-clause", "size": 1692 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
583,905
public InetAddress getInterface() throws SocketException { checkClosedAndBind(false); if (interfaceSet == null) { InetAddress ipvXaddress = (InetAddress) impl .getOption(SocketOptions.IP_MULTICAST_IF); if (ipvXaddress.isAnyLocalAddress()) { ...
InetAddress function() throws SocketException { checkClosedAndBind(false); if (interfaceSet == null) { InetAddress ipvXaddress = (InetAddress) impl .getOption(SocketOptions.IP_MULTICAST_IF); if (ipvXaddress.isAnyLocalAddress()) { NetworkInterface theInterface = getNetworkInterface(); if (theInterface != null) { Enumera...
/** * Gets the network address used by this socket. This is useful on * multihomed machines. * * @return the address of the network interface through which the datagram * packets are sent or received. * @throws SocketException * if an error occurs while ...
Gets the network address used by this socket. This is useful on multihomed machines
getInterface
{ "repo_name": "shannah/cn1", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/luni/src/main/java/java/net/MulticastSocket.java", "license": "gpl-2.0", "size": 24144 }
[ "java.util.Enumeration" ]
import java.util.Enumeration;
import java.util.*;
[ "java.util" ]
java.util;
1,842,999
private void removeAttributesFromSession(HttpServletRequest request) { request.getSession().removeAttribute("userName"); request.getSession().removeAttribute("password"); request.getSession().removeAttribute("pin"); request.getSession().removeAttribute("nextPage"); }
void function(HttpServletRequest request) { request.getSession().removeAttribute(STR); request.getSession().removeAttribute(STR); request.getSession().removeAttribute("pin"); request.getSession().removeAttribute(STR); }
/** * Removes attributes from session * @param request */
Removes attributes from session
removeAttributesFromSession
{ "repo_name": "scoophealth/oscar", "path": "src/main/java/oscar/login/LoginAction.java", "license": "gpl-2.0", "size": 27769 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,127,992
public void dumpStats() { CommunicationSpi spi = getSpi(); if (spi instanceof TcpCommunicationSpi) ((TcpCommunicationSpi)spi).dumpStats(); }
void function() { CommunicationSpi spi = getSpi(); if (spi instanceof TcpCommunicationSpi) ((TcpCommunicationSpi)spi).dumpStats(); }
/** * Dumps SPI stats to diagnostic logs in case TcpCommunicationSpi is used, no-op otherwise. */
Dumps SPI stats to diagnostic logs in case TcpCommunicationSpi is used, no-op otherwise
dumpStats
{ "repo_name": "amirakhmedov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java", "license": "apache-2.0", "size": 103166 }
[ "org.apache.ignite.spi.communication.CommunicationSpi", "org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi" ]
import org.apache.ignite.spi.communication.CommunicationSpi; import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
import org.apache.ignite.spi.communication.*; import org.apache.ignite.spi.communication.tcp.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,697,174
@SuppressWarnings("boxing") // OK to ignore boxing here @Override public String toString() { return String.format("%s[buffer=%s, currentLinePos=%s, eof=%s, ibitWorkArea=%s, lbitWorkArea=%s, " + "modulus=%s, pos=%s, readPos=%s]", this.getClass().getSimpleNa...
@SuppressWarnings(STR) String function() { return String.format(STR + STR, this.getClass().getSimpleName(), Arrays.toString(buffer), currentLinePos, eof, ibitWorkArea, lbitWorkArea, modulus, pos, readPos); } } static final int EOF = -1; public static final int MIME_CHUNK_SIZE = 76; public static final int PEM_CHUNK_SIZ...
/** * Returns a String useful for debugging (especially within a debugger.) * * @return a String useful for debugging. */
Returns a String useful for debugging (especially within a debugger.)
toString
{ "repo_name": "hypercube1024/firefly", "path": "firefly-common/src/main/java/com/fireflysource/common/codec/base64/BaseNCodec.java", "license": "apache-2.0", "size": 19267 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,209,946
private void listParameters(JavaSamplerContext context) { Iterator<String> argsIt = context.getParameterNamesIterator(); while (argsIt.hasNext()) { String name = argsIt.next(); LOG.debug(name + "=" + context.getParameter(name)); } }
void function(JavaSamplerContext context) { Iterator<String> argsIt = context.getParameterNamesIterator(); while (argsIt.hasNext()) { String name = argsIt.next(); LOG.debug(name + "=" + context.getParameter(name)); } }
/** * Dump a list of the parameters in this context to the debug log. * Should only be called if debug is enabled. * * @param context * the context which contains the initialization parameters. */
Dump a list of the parameters in this context to the debug log. Should only be called if debug is enabled
listParameters
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-jmeter-3.0/src/protocol/java/org/apache/jmeter/protocol/java/test/JavaTest.java", "license": "apache-2.0", "size": 13618 }
[ "java.util.Iterator", "org.apache.jmeter.protocol.java.sampler.JavaSamplerContext" ]
import java.util.Iterator; import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext;
import java.util.*; import org.apache.jmeter.protocol.java.sampler.*;
[ "java.util", "org.apache.jmeter" ]
java.util; org.apache.jmeter;
2,631,681
CSLDate d = DateParser.toDateSingle("2013", "Aug"); assertArrayEquals(new int[][] { new int[] { 2013, 8 } }, d.getDateParts()); d = DateParser.toDateSingle("2013", "march"); assertArrayEquals(new int[][] { new int[] { 2013, 3 } }, d.getDateParts()); d = DateParser.toDateSingle("2000", "1"); assertArrayEqual...
CSLDate d = DateParser.toDateSingle("2013", "Aug"); assertArrayEquals(new int[][] { new int[] { 2013, 8 } }, d.getDateParts()); d = DateParser.toDateSingle("2013", "march"); assertArrayEquals(new int[][] { new int[] { 2013, 3 } }, d.getDateParts()); d = DateParser.toDateSingle("2000", "1"); assertArrayEquals(new int[][...
/** * Tests if a single date can be converted */
Tests if a single date can be converted
toSingleDate
{ "repo_name": "Klortho/citeproc-java", "path": "citeproc-java/src/test/java/de/undercouch/citeproc/bibtex/DateParserTest.java", "license": "apache-2.0", "size": 3623 }
[ "de.undercouch.citeproc.csl.CSLDate", "org.junit.Assert" ]
import de.undercouch.citeproc.csl.CSLDate; import org.junit.Assert;
import de.undercouch.citeproc.csl.*; import org.junit.*;
[ "de.undercouch.citeproc", "org.junit" ]
de.undercouch.citeproc; org.junit;
549,638
@Test public void testGetListRecursiveFromCEG() { JSONObject requirement = postRequirementToRoot(); String requirementId = getId(requirement); // Post ceg model JSONObject cegModel = postCEG(requirementId); String cegId = getId(cegModel); // Post test specification JSONObject testSpecifica...
void function() { JSONObject requirement = postRequirementToRoot(); String requirementId = getId(requirement); JSONObject cegModel = postCEG(requirementId); String cegId = getId(cegModel); JSONObject testSpecification = postTestSpecification(requirementId, cegId); JSONObject testSpecification2 = postTestSpecification(r...
/** * Posts two test specifications to a CEG model and checks if they are retrieved * by the list recursive service. */
Posts two test specifications to a CEG model and checks if they are retrieved by the list recursive service
testGetListRecursiveFromCEG
{ "repo_name": "junkerm/specmate", "path": "bundles/specmate-integration-test/src/com/specmate/test/integration/CrudTest.java", "license": "apache-2.0", "size": 36642 }
[ "com.specmate.rest.RestResult", "javax.ws.rs.core.Response", "org.json.JSONArray", "org.json.JSONObject", "org.junit.Assert", "org.osgi.service.log.LogService" ]
import com.specmate.rest.RestResult; import javax.ws.rs.core.Response; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Assert; import org.osgi.service.log.LogService;
import com.specmate.rest.*; import javax.ws.rs.core.*; import org.json.*; import org.junit.*; import org.osgi.service.log.*;
[ "com.specmate.rest", "javax.ws", "org.json", "org.junit", "org.osgi.service" ]
com.specmate.rest; javax.ws; org.json; org.junit; org.osgi.service;
2,150,340
public static void main(final String[] args) throws Exception { int i = 0; int flags = ClassReader.SKIP_DEBUG; boolean ok = true; if (args.length < 1 || args.length > 2) { ok = false; } if (ok && "-debug".equals(args[0])) { i = 1; ...
static void function(final String[] args) throws Exception { int i = 0; int flags = ClassReader.SKIP_DEBUG; boolean ok = true; if (args.length < 1 args.length > 2) { ok = false; } if (ok && STR.equals(args[0])) { i = 1; flags = 0; if (args.length != 2) { ok = false; } } if (!ok) { System.err .println(STR); System.err.p...
/** * Prints a disassembled view of the given class to the standard output. * <p> * Usage: Textifier [-debug] &lt;binary class name or class file name &gt; * * @param args * the command line arguments. * * @throws Exception * if the class cannot be fou...
Prints a disassembled view of the given class to the standard output. Usage: Textifier [-debug] &lt;binary class name or class file name &gt
main
{ "repo_name": "SuperSpyTX/MCLib", "path": "src/se/jkrau/mclib/org/objectweb/asm/util/Textifier.java", "license": "mit", "size": 48697 }
[ "java.io.FileInputStream", "java.io.PrintWriter", "se.jkrau.mclib.org.objectweb.asm.ClassReader" ]
import java.io.FileInputStream; import java.io.PrintWriter; import se.jkrau.mclib.org.objectweb.asm.ClassReader;
import java.io.*; import se.jkrau.mclib.org.objectweb.asm.*;
[ "java.io", "se.jkrau.mclib" ]
java.io; se.jkrau.mclib;
2,780,141
@Override public Properties trackCreateAccountClicked(String appVersion, String source) { SegmentAnalyticsEvent aEvent = new SegmentAnalyticsEvent(); aEvent.properties.putValue(Keys.NAME, Values.CREATE_ACCOUNT_CLICK); if (!TextUtils.isEmpty(source)) aEvent.properties.putValue...
Properties function(String appVersion, String source) { SegmentAnalyticsEvent aEvent = new SegmentAnalyticsEvent(); aEvent.properties.putValue(Keys.NAME, Values.CREATE_ACCOUNT_CLICK); if (!TextUtils.isEmpty(source)) aEvent.properties.putValue(Keys.PROVIDER, source); aEvent.setAppNameContext(); aEvent.properties = addCa...
/** * This function is used to track if user clicks on Create Account on registration screen * * @return A {@link Properties} object populated with analytics-event info */
This function is used to track if user clicks on Create Account on registration screen
trackCreateAccountClicked
{ "repo_name": "FDoubleman/wd-edx-android", "path": "VideoLocker/src/main/java/org/edx/mobile/module/analytics/ISegmentImpl.java", "license": "apache-2.0", "size": 31576 }
[ "android.text.TextUtils", "com.segment.analytics.Properties" ]
import android.text.TextUtils; import com.segment.analytics.Properties;
import android.text.*; import com.segment.analytics.*;
[ "android.text", "com.segment.analytics" ]
android.text; com.segment.analytics;
1,106,283
public void declineIaPrefix(IaPrefix iaPrefix);
void function(IaPrefix iaPrefix);
/** * Decline ia prefix. * * @param iaPrefix the ia prefix */
Decline ia prefix
declineIaPrefix
{ "repo_name": "marosmars/dhcp", "path": "Jagornet-DHCP/src/com/jagornet/dhcp/server/request/binding/V6PrefixBindingManager.java", "license": "gpl-3.0", "size": 3236 }
[ "com.jagornet.dhcp.db.IaPrefix" ]
import com.jagornet.dhcp.db.IaPrefix;
import com.jagornet.dhcp.db.*;
[ "com.jagornet.dhcp" ]
com.jagornet.dhcp;
2,012,284
Duration getDefaultPollInterval();
Duration getDefaultPollInterval();
/** * Gets The default poll interval for long-running operation. * * @return the defaultPollInterval value. */
Gets The default poll interval for long-running operation
getDefaultPollInterval
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-msi/src/main/java/com/azure/resourcemanager/msi/fluent/ManagedServiceIdentityClient.java", "license": "mit", "size": 1729 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
2,618,228
@Transactional public void refresh(AlertTargetEntity alertTarget) { entityManagerProvider.get().refresh(alertTarget); }
void function(AlertTargetEntity alertTarget) { entityManagerProvider.get().refresh(alertTarget); }
/** * Refresh the state of the alert target from the database. * * @param alertTarget * the target to refresh (not {@code null}). */
Refresh the state of the alert target from the database
refresh
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java", "license": "apache-2.0", "size": 26732 }
[ "org.apache.ambari.server.orm.entities.AlertTargetEntity" ]
import org.apache.ambari.server.orm.entities.AlertTargetEntity;
import org.apache.ambari.server.orm.entities.*;
[ "org.apache.ambari" ]
org.apache.ambari;
725,698
public void setFavicon(final Base64Image image);
void function(final Base64Image image);
/** * Set the server favicon * * @param image * New Favicon (Cannot be null) */
Set the server favicon
setFavicon
{ "repo_name": "MarineMC/MarineStandalone", "path": "src/main/java/org/marinemc/server/MarineServer.java", "license": "gpl-2.0", "size": 7649 }
[ "org.marinemc.io.Base64Image" ]
import org.marinemc.io.Base64Image;
import org.marinemc.io.*;
[ "org.marinemc.io" ]
org.marinemc.io;
425,869
public InetAddress getAddress() { return this.address; }
InetAddress function() { return this.address; }
/** * Return the address that the reactive web server binds to. * @return the address */
Return the address that the reactive web server binds to
getAddress
{ "repo_name": "jbovet/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/context/embedded/AbstractConfigurableReactiveWebServer.java", "license": "apache-2.0", "size": 3472 }
[ "java.net.InetAddress" ]
import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,361,660
void setListeners(TrainingListener... listeners);
void setListeners(TrainingListener... listeners);
/** * Set the trainingListeners for the ComputationGraph (and all layers in the network) */
Set the trainingListeners for the ComputationGraph (and all layers in the network)
setListeners
{ "repo_name": "deeplearning4j/deeplearning4j", "path": "deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/api/Model.java", "license": "apache-2.0", "size": 6520 }
[ "org.deeplearning4j.optimize.api.TrainingListener" ]
import org.deeplearning4j.optimize.api.TrainingListener;
import org.deeplearning4j.optimize.api.*;
[ "org.deeplearning4j.optimize" ]
org.deeplearning4j.optimize;
1,014,191
@Override public void doAction(ActionEvent e) { if (e.getActionCommand().equals(ActionNames.ABOUT)) { this.about(); } }
void function(ActionEvent e) { if (e.getActionCommand().equals(ActionNames.ABOUT)) { this.about(); } }
/** * Handle the "about" action by displaying the "About Apache JMeter..." * dialog box. The Dialog Box is NOT modal, because those should be avoided * if at all possible. */
Handle the "about" action by displaying the "About Apache JMeter..." dialog box. The Dialog Box is NOT modal, because those should be avoided if at all possible
doAction
{ "repo_name": "ubikfsabbe/jmeter", "path": "src/core/org/apache/jmeter/gui/action/AboutCommand.java", "license": "apache-2.0", "size": 4399 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,868,528
@After public void tearDown() throws Exception { assertFalse(threadFailed); }
void function() throws Exception { assertFalse(threadFailed); }
/** * Trigger test case failure if any thread assertions have failed */
Trigger test case failure if any thread assertions have failed
tearDown
{ "repo_name": "smgoller/geode", "path": "geode-junit/src/main/java/org/apache/geode/util/JSR166TestCase.java", "license": "apache-2.0", "size": 13382 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,133,356
EClass getUiTextField();
EClass getUiTextField();
/** * Returns the meta object for class '{@link org.lunifera.ecview.semantic.uimodel.UiTextField <em>Ui Text Field</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Ui Text Field</em>'. * @see org.lunifera.ecview.semantic.uimodel.UiTextField * @generated */
Returns the meta object for class '<code>org.lunifera.ecview.semantic.uimodel.UiTextField Ui Text Field</code>'.
getUiTextField
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,496
public static ActionDependency checkForAvailability(List<String> missingDependencies, Configuration actionConf, boolean stopOnFirstMissing) throws CommandException { final XLog LOG = XLog.getLog(DependencyChecker.class); //OOZIE-1251. Don't initialize as static variable. String user = Pa...
static ActionDependency function(List<String> missingDependencies, Configuration actionConf, boolean stopOnFirstMissing) throws CommandException { final XLog LOG = XLog.getLog(DependencyChecker.class); String user = ParamChecker.notEmpty(actionConf.get(OozieClient.USER_NAME), OozieClient.USER_NAME); List<String> missin...
/** * Get the currently missing and available dependencies after checking the list of known missing * dependencies against the source. * * @param missingDependencies known missing dependencies * @param actionConf Configuration for the action * @param stopOnFirstMissing Does not continue ch...
Get the currently missing and available dependencies after checking the list of known missing dependencies against the source
checkForAvailability
{ "repo_name": "cbaenziger/oozie", "path": "core/src/main/java/org/apache/oozie/dependency/DependencyChecker.java", "license": "apache-2.0", "size": 5815 }
[ "java.net.URISyntaxException", "java.util.ArrayList", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.oozie.ErrorCode", "org.apache.oozie.client.OozieClient", "org.apache.oozie.command.CommandException", "org.apache.oozie.service.Services", "org.apache.oozie.service.URIHandlerS...
import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.oozie.ErrorCode; import org.apache.oozie.client.OozieClient; import org.apache.oozie.command.CommandException; import org.apache.oozie.service.Services; import org.apache...
import java.net.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.oozie.*; import org.apache.oozie.client.*; import org.apache.oozie.command.*; import org.apache.oozie.service.*; import org.apache.oozie.util.*;
[ "java.net", "java.util", "org.apache.hadoop", "org.apache.oozie" ]
java.net; java.util; org.apache.hadoop; org.apache.oozie;
1,420,462
public int kosaraju(ArrayList<Boolean> add_state_assign_clone) { Integer numberOfComponents = 0; HashMap<ArrayList<Boolean>, Boolean> stateExpanded = new HashMap<ArrayList<Boolean>, Boolean>(); statesByTopologicalOrder = new LinkedHashMap<Integer, ArrayList<ArrayList<Boolean>>>(); discoveredStates ...
int function(ArrayList<Boolean> add_state_assign_clone) { Integer numberOfComponents = 0; HashMap<ArrayList<Boolean>, Boolean> stateExpanded = new HashMap<ArrayList<Boolean>, Boolean>(); statesByTopologicalOrder = new LinkedHashMap<Integer, ArrayList<ArrayList<Boolean>>>(); discoveredStates = new HashMap<ArrayList<Bool...
/** * The Kosaraju's algorithm. Used to find the strongly connected components * (SCCs). * * @param add_state_assign_clone * @return */
The Kosaraju's algorithm. Used to find the strongly connected components (SCCs)
kosaraju
{ "repo_name": "felipemartinsss/repository", "path": "AIPlannersForRDDLSim/src/rddl/solver/mdp/refactored/sbisimulation/ReachMRFSWithTopologicalValueIteration.java", "license": "gpl-3.0", "size": 50726 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.HashSet", "java.util.LinkedHashMap", "java.util.Stack" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
689,403
public void setEndpointType(QName type) { endpointType = type; }
void function(QName type) { endpointType = type; }
/** * Sets the type of endpoint needed. * * @param type type of endpoint needed */
Sets the type of endpoint needed
setEndpointType
{ "repo_name": "danpal/OpenSAML", "path": "src/main/java/org/opensaml/common/binding/AbstractEndpointSelector.java", "license": "apache-2.0", "size": 4888 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
1,255,758
private void showPermissionDenied() { setLoading(false); Toast.makeText(getActivity(), R.string.details_permissions, Toast.LENGTH_SHORT).show(); }
void function() { setLoading(false); Toast.makeText(getActivity(), R.string.details_permissions, Toast.LENGTH_SHORT).show(); }
/** * Switch to permission request mode. */
Switch to permission request mode
showPermissionDenied
{ "repo_name": "openintents/filemanager", "path": "FileManager/src/main/java/org/openintents/filemanager/lists/FileListFragment.java", "license": "apache-2.0", "size": 14381 }
[ "android.widget.Toast" ]
import android.widget.Toast;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,600,204
@Override public BlockLocation getSpawnPoint() { this.rand.setSeed(seed); int x = rand.nextInt(64) - 32; int z = rand.nextInt(64) - 32; int y = getApproximateHeightAt(x, z); return new BlockLocation(world, x, y, z); }
BlockLocation function() { this.rand.setSeed(seed); int x = rand.nextInt(64) - 32; int z = rand.nextInt(64) - 32; int y = getApproximateHeightAt(x, z); return new BlockLocation(world, x, y, z); }
/** * Generates world spawnpoint based on seed. * <p> * @return Randomly generated spawnpoint based on world seed */
Generates world spawnpoint based on seed.
getSpawnPoint
{ "repo_name": "Barteks2x/Cubit", "path": "src/main/java/com/github/barteks2x/cubit/world/generator/AbstractChunkGenerator.java", "license": "gpl-3.0", "size": 5861 }
[ "com.github.barteks2x.cubit.location.BlockLocation" ]
import com.github.barteks2x.cubit.location.BlockLocation;
import com.github.barteks2x.cubit.location.*;
[ "com.github.barteks2x" ]
com.github.barteks2x;
750,752
public void setTokenListener(TokenListener<Recipient> listener) { super.setTokenListener(listener); this.listener = listener; } public enum RecipientCryptoStatus { UNDEFINED, UNAVAILABLE, AVAILABLE_UNTRUSTED, AVAILABLE_TRUSTED;
void function(TokenListener<Recipient> listener) { super.setTokenListener(listener); this.listener = listener; } public enum RecipientCryptoStatus { UNDEFINED, UNAVAILABLE, AVAILABLE_UNTRUSTED, AVAILABLE_TRUSTED;
/** * We use a specialized version of TokenCompleteTextView.TokenListener as well, * adding a callback for onTokenChanged. */
We use a specialized version of TokenCompleteTextView.TokenListener as well, adding a callback for onTokenChanged
setTokenListener
{ "repo_name": "jberkel/k-9", "path": "k9mail/src/main/java/com/fsck/k9/view/RecipientSelectView.java", "license": "apache-2.0", "size": 21293 }
[ "com.fsck.k9.view.RecipientSelectView" ]
import com.fsck.k9.view.RecipientSelectView;
import com.fsck.k9.view.*;
[ "com.fsck.k9" ]
com.fsck.k9;
54,759
public static Properties load(String resourceName) throws IOException { return load(resourceName, Thread.currentThread().getContextClassLoader()); }
static Properties function(String resourceName) throws IOException { return load(resourceName, Thread.currentThread().getContextClassLoader()); }
/** * Load properties from the given resources using the current thread context class loader. The * properties are expected to be encoded in UTF-8. * * @param resourceName * The resource name * @return The loaded properties, or null if the resource could not be found ...
Load properties from the given resources using the current thread context class loader. The properties are expected to be encoded in UTF-8
load
{ "repo_name": "Communote/communote-server", "path": "communote/commons/src/main/java/com/communote/common/properties/PropertiesUtils.java", "license": "apache-2.0", "size": 6482 }
[ "java.io.IOException", "java.util.Properties" ]
import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
756,283
public static SynchronizedInterner<Object> setGlobal(Interner<Object> delegate) { synchronized(globalMutex) { SynchronizedInterner<Object> oldInterner = SynchronizedInterner.interner; SynchronizedInterner.interner = Generics.newSynchronizedInterner(delegate); return oldInterner; } }
static SynchronizedInterner<Object> function(Interner<Object> delegate) { synchronized(globalMutex) { SynchronizedInterner<Object> oldInterner = SynchronizedInterner.interner; SynchronizedInterner.interner = Generics.newSynchronizedInterner(delegate); return oldInterner; } }
/** * For supplying a new instance for the global methods to use. * * @return the previous global interner. */
For supplying a new instance for the global methods to use
setGlobal
{ "repo_name": "jaimeguzman/data_mining", "path": "stanford-postagger/stanford-postagger-3.2.0-src/src/edu/stanford/nlp/util/concurrent/SynchronizedInterner.java", "license": "gpl-2.0", "size": 4428 }
[ "edu.stanford.nlp.util.Generics", "edu.stanford.nlp.util.Interner" ]
import edu.stanford.nlp.util.Generics; import edu.stanford.nlp.util.Interner;
import edu.stanford.nlp.util.*;
[ "edu.stanford.nlp" ]
edu.stanford.nlp;
1,856,968
public static boolean collapse(final String title, final String text, final String control, final String item) { boolean status = false; if (StringUtils.isNotEmpty(item)) { Integer itemCount = getItemCount(title, text, control, item); if ((itemCount != null) && (itemCount > 0)) { if (isExpanded(titl...
static boolean function(final String title, final String text, final String control, final String item) { boolean status = false; if (StringUtils.isNotEmpty(item)) { Integer itemCount = getItemCount(title, text, control, item); if ((itemCount != null) && (itemCount > 0)) { if (isExpanded(title, text, control, item)) { ...
/** * Collapses an item to hide its children. * * @param title * The title of the window to access. * @param text * The text of the window to access. * @param control * The control to interact with. * @param item * The item which will be collapsed.<br/> ...
Collapses an item to hide its children
collapse
{ "repo_name": "Pheelbert/twitchplayclient", "path": "src/cn/com/jautoitx/TreeView.java", "license": "gpl-3.0", "size": 103691 }
[ "org.apache.commons.lang3.StringUtils" ]
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
1,601,726
private void setPropertiesFromSheet(Sheet sheet) { RowRecord row = sheet.getNextRow(); boolean rowRecordsAlreadyPresent = row!=null; while (row != null) { createRowFromRecord(row); row = sheet.getNextRow(); } CellValueRecordInterface[] cvals = shee...
void function(Sheet sheet) { RowRecord row = sheet.getNextRow(); boolean rowRecordsAlreadyPresent = row!=null; while (row != null) { createRowFromRecord(row); row = sheet.getNextRow(); } CellValueRecordInterface[] cvals = sheet.getValueRecords(); long timestart = System.currentTimeMillis(); if (log.check( POILogger.DEB...
/** * used internally to set the properties given a Sheet object */
used internally to set the properties given a Sheet object
setPropertiesFromSheet
{ "repo_name": "tobyclemson/msci-project", "path": "vendor/poi-3.6/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java", "license": "mit", "size": 66591 }
[ "org.apache.poi.hssf.model.Sheet", "org.apache.poi.hssf.record.CellValueRecordInterface", "org.apache.poi.hssf.record.Record", "org.apache.poi.hssf.record.RowRecord", "org.apache.poi.util.POILogger" ]
import org.apache.poi.hssf.model.Sheet; import org.apache.poi.hssf.record.CellValueRecordInterface; import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.RowRecord; import org.apache.poi.util.POILogger;
import org.apache.poi.hssf.model.*; import org.apache.poi.hssf.record.*; import org.apache.poi.util.*;
[ "org.apache.poi" ]
org.apache.poi;
614,893
public void fillWithRain(World worldIn, BlockPos pos) { }
void function(World worldIn, BlockPos pos) { }
/** * Called similar to random ticks, but only when it is raining. */
Called similar to random ticks, but only when it is raining
fillWithRain
{ "repo_name": "TorchPowered/Thallium", "path": "src/main/java/net/minecraft/block/Block.java", "license": "mit", "size": 66867 }
[ "net.minecraft.util.BlockPos", "net.minecraft.world.World" ]
import net.minecraft.util.BlockPos; import net.minecraft.world.World;
import net.minecraft.util.*; import net.minecraft.world.*;
[ "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.util; net.minecraft.world;
340,418
public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<String> criteriaWithoutValue; protected List<Map<String, Object>> criteriaWithSingleValue; ...
void function() { oredCriteria.clear(); orderByClause = null; distinct = false; } protected abstract static class GeneratedCriteria { protected List<String> criteriaWithoutValue; protected List<Map<String, Object>> criteriaWithSingleValue; protected List<Map<String, Object>> criteriaWithListValue; protected List<Map<St...
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_role * * @mbggenerated Sun May 08 15:10:04 CST 2016 */
This method was generated by MyBatis Generator. This method corresponds to the database table sys_role
clear
{ "repo_name": "ahwxl/ads", "path": "ads/src/main/java/com/bplow/netconn/systemmng/dao/entity/SysRoleExample.java", "license": "apache-2.0", "size": 25017 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map" ]
import java.util.ArrayList; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
618,152
void beginHandshake() throws SSLException;
void beginHandshake() throws SSLException;
/** * Initiates SSL-handshake, starts encrypted communication. */
Initiates SSL-handshake, starts encrypted communication
beginHandshake
{ "repo_name": "m0wfo/naga", "path": "src/main/java/io/naga/NIOSocketSSL.java", "license": "mit", "size": 1708 }
[ "javax.net.ssl.SSLException" ]
import javax.net.ssl.SSLException;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
943,940
private String getVisibleChildComponent(final Container parentContainer) { String visibleComponentName = null; for (Component component : parentContainer.getComponents()) { if (component.isVisible()) { visibleComponentName = component.getName(); bre...
String function(final Container parentContainer) { String visibleComponentName = null; for (Component component : parentContainer.getComponents()) { if (component.isVisible()) { visibleComponentName = component.getName(); break; } } return visibleComponentName; }
/** * Get the name of the visible child component. Returns null if no * components are visible. * * @param parentContainer the parent container * @return the visible component name */
Get the name of the visible child component. Returns null if no components are visible
getVisibleChildComponent
{ "repo_name": "compomics/moff-gui", "path": "src/main/java/com/compomics/moff/gui/view/MainController.java", "license": "apache-2.0", "size": 53839 }
[ "java.awt.Component", "java.awt.Container" ]
import java.awt.Component; import java.awt.Container;
import java.awt.*;
[ "java.awt" ]
java.awt;
197,940
private long getMemoryUsage() { long totalPageSize = 0; for (MemoryBlock page : allocatedPages) { totalPageSize += page.size(); } return ((inMemSorter == null) ? 0 : inMemSorter.getMemoryUsage()) + totalPageSize; }
long function() { long totalPageSize = 0; for (MemoryBlock page : allocatedPages) { totalPageSize += page.size(); } return ((inMemSorter == null) ? 0 : inMemSorter.getMemoryUsage()) + totalPageSize; }
/** * Return the total memory usage of this sorter, including the data pages and the sorter's pointer * array. */
Return the total memory usage of this sorter, including the data pages and the sorter's pointer array
getMemoryUsage
{ "repo_name": "tejasapatil/spark", "path": "core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java", "license": "apache-2.0", "size": 24978 }
[ "org.apache.spark.unsafe.memory.MemoryBlock" ]
import org.apache.spark.unsafe.memory.MemoryBlock;
import org.apache.spark.unsafe.memory.*;
[ "org.apache.spark" ]
org.apache.spark;
1,110,099
public File getProjectBaseDir() { return projectBaseDir; }
File function() { return projectBaseDir; }
/** * Getter for <code>projectBaseDir</code>. * * @return Returns the projectBaseDir. */
Getter for <code>projectBaseDir</code>
getProjectBaseDir
{ "repo_name": "kikinteractive/maven-plugins", "path": "maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/writers/EclipseWriterConfig.java", "license": "apache-2.0", "size": 13499 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
495,241
@Override public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); }
void function(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { super.tightMarshal2(wireFormat, o, dataOut, bs); }
/** * Write a object instance to data output stream * * @param o * the instance to be marshaled * @param dataOut * the output stream * @throws IOException * thrown if an error occurs */
Write a object instance to data output stream
tightMarshal2
{ "repo_name": "apache/activemq-openwire", "path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v8/FlushCommandMarshaller.java", "license": "apache-2.0", "size": 3534 }
[ "java.io.DataOutput", "java.io.IOException", "org.apache.activemq.openwire.codec.BooleanStream", "org.apache.activemq.openwire.codec.OpenWireFormat" ]
import java.io.DataOutput; import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat;
import java.io.*; import org.apache.activemq.openwire.codec.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
1,078,373
public static int hashCodeByteBuffer(ByteBuffer bytes) { if (bytes.hasArray()) { // Fast path. int h = LiteralByteString.hashCode(bytes.capacity(), bytes.array(), bytes.arrayOffset(), bytes.capacity()); return h == 0 ? 1 : h; } else { // Read the data into a temporary byte ar...
static int function(ByteBuffer bytes) { if (bytes.hasArray()) { int h = LiteralByteString.hashCode(bytes.capacity(), bytes.array(), bytes.arrayOffset(), bytes.capacity()); return h == 0 ? 1 : h; } else { final int bufferSize = bytes.capacity() > DEFAULT_BUFFER_SIZE ? DEFAULT_BUFFER_SIZE : bytes.capacity(); final byte[]...
/** * Helper method for implementing {@link MessageLite#hashCode()} for bytes * field. */
Helper method for implementing <code>MessageLite#hashCode()</code> for bytes field
hashCodeByteBuffer
{ "repo_name": "os72/protobuf-java-shaded-261", "path": "java/src/main/java/com/github/os72/protobuf261/Internal.java", "license": "bsd-3-clause", "size": 14277 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
65,654
public View getContentView() { return mContentView; }
View function() { return mContentView; }
/** * Return content view or null if the content view has not been initialized. * * @return content view or null * @see #setContentView(android.view.View) * @see #setContentView(int) */
Return content view or null if the content view has not been initialized
getContentView
{ "repo_name": "jariz/Reisplanner", "path": "src/com/devspark/progressfragment/ProgressSherlockFragment.java", "license": "apache-2.0", "size": 11315 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
498,636
public void onKeyEvent(KeyEvent event, int policyFlags);
void function(KeyEvent event, int policyFlags);
/** * Receives a key event. * * @param event The key event. * @param policyFlags Policy flags for the event. */
Receives a key event
onKeyEvent
{ "repo_name": "xorware/android_frameworks_base", "path": "services/accessibility/java/com/android/server/accessibility/EventStreamTransformation.java", "license": "apache-2.0", "size": 4076 }
[ "android.view.KeyEvent" ]
import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
1,953,275
public void testTimedInvokeAnyNullTimeUnit() throws Throwable { ExecutorService e = new ForkJoinPool(1); PoolCleaner cleaner = null; try { cleaner = cleaner(e); List<Callable<String>> l = new ArrayList<>(); l.add(new StringTask()); try { ...
void function() throws Throwable { ExecutorService e = new ForkJoinPool(1); PoolCleaner cleaner = null; try { cleaner = cleaner(e); List<Callable<String>> l = new ArrayList<>(); l.add(new StringTask()); try { e.invokeAny(l, randomTimeout(), null); shouldThrow(); } catch (NullPointerException success) {} } finally { if ...
/** * timed invokeAny(null time unit) throws NullPointerException */
timed invokeAny(null time unit) throws NullPointerException
testTimedInvokeAnyNullTimeUnit
{ "repo_name": "streamsupport/streamsupport", "path": "src/tests/java/org/openjdk/tests/tck/ForkJoinPoolTest.java", "license": "gpl-2.0", "size": 41090 }
[ "java.util.ArrayList", "java.util.List", "java.util.concurrent.Callable", "java.util.concurrent.ExecutorService" ]
import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,055,684
public void refresh(final Context context, final FutureCallback<Page> callback) { final int firstPage = 0; loadPage(firstPage, DEFAULT_PAGE_SIZE, context, callback); }
void function(final Context context, final FutureCallback<Page> callback) { final int firstPage = 0; loadPage(firstPage, DEFAULT_PAGE_SIZE, context, callback); }
/** * Sends content of the first page to the FeedAdapter. * * @param context The Application context. * @param callback The callback when the page is loaded. */
Sends content of the first page to the FeedAdapter
refresh
{ "repo_name": "BakkerTom/happy-news", "path": "android/src/main/java/nl/fhict/happynews/android/manager/PostManager.java", "license": "mit", "size": 7197 }
[ "android.content.Context", "com.koushikdutta.async.future.FutureCallback", "nl.fhict.happynews.android.model.Page" ]
import android.content.Context; import com.koushikdutta.async.future.FutureCallback; import nl.fhict.happynews.android.model.Page;
import android.content.*; import com.koushikdutta.async.future.*; import nl.fhict.happynews.android.model.*;
[ "android.content", "com.koushikdutta.async", "nl.fhict.happynews" ]
android.content; com.koushikdutta.async; nl.fhict.happynews;
2,773,176
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<DataFlowDebugSessionInfoInner>> queryByFactorySinglePageAsync( String resourceGroupName, String factoryName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<DataFlowDebugSessionInfoInner>> function( String resourceGroupName, String factoryName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { ret...
/** * Query all active data flow debug sessions. * * @param resourceGroupName The resource group name. * @param factoryName The factory name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @...
Query all active data flow debug sessions
queryByFactorySinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/implementation/DataFlowDebugSessionsClientImpl.java", "license": "mit", "size": 65067 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.datafactory.fluent.models.DataFlowDebugSessionInfoInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.datafactory.fluent.models.DataFlowDebugSessionInfoInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,862,166
int countByExample(MenuCriteria example);
int countByExample(MenuCriteria example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table T_SYS_MENU * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table T_SYS_MENU
countByExample
{ "repo_name": "Qi-zheng/boot-project", "path": "boot-service/boot-service-privilege/src/main/java/org/boot/service/privilege/dao/base/MenuMapper.java", "license": "apache-2.0", "size": 3080 }
[ "org.boot.facede.privilege.model.MenuCriteria" ]
import org.boot.facede.privilege.model.MenuCriteria;
import org.boot.facede.privilege.model.*;
[ "org.boot.facede" ]
org.boot.facede;
2,608,064
public static void initializeDefaults(IPreferenceStore prefs) { // find out the probable default viewer String def = VIEWER_XDVI; String os = System.getProperty("os.name"); if (os.indexOf("indow") > 0) { def = VIEWER_YAP; } else if (os.indexOf("OS X") > 0) {...
static void function(IPreferenceStore prefs) { String def = VIEWER_XDVI; String os = System.getProperty(STR); if (os.indexOf("indow") > 0) { def = VIEWER_YAP; } else if (os.indexOf(STR) > 0) { def = VIEWER_ITEXMAC; } prefs.setDefault(VIEWER_CURRENT, def); List<String> vlist = new ArrayList<String>(); vlist.add(VIEWER_X...
/** * Set default values to the preferences. * Intended to be called only once from the IPreferenceInitializer. * @param prefs the preferences */
Set default values to the preferences. Intended to be called only once from the IPreferenceInitializer
initializeDefaults
{ "repo_name": "kolovos/texlipse", "path": "net.sourceforge.texlipse/src/net/sourceforge/texlipse/viewer/ViewerAttributeRegistry.java", "license": "epl-1.0", "size": 27333 }
[ "java.util.ArrayList", "java.util.List", "org.eclipse.jface.preference.IPreferenceStore" ]
import java.util.ArrayList; import java.util.List; import org.eclipse.jface.preference.IPreferenceStore;
import java.util.*; import org.eclipse.jface.preference.*;
[ "java.util", "org.eclipse.jface" ]
java.util; org.eclipse.jface;
1,748,208
private void createOntologies() throws Exception { logger.log("Creating ontologies, sparql and configuration files ..."); long createOntologiesStart = System.currentTimeMillis(); for (int i = 0; i < endpoints.size(); i++) { if (!StaticUtils.isEmpty(this.endpoints.get(i).getGraphEndpoint())) { logger...
void function() throws Exception { logger.log(STR); long createOntologiesStart = System.currentTimeMillis(); for (int i = 0; i < endpoints.size(); i++) { if (!StaticUtils.isEmpty(this.endpoints.get(i).getGraphEndpoint())) { logger.log(STR + endpoints.get(i).getName()); OntologyCreation oc = new OntologyCreation( this.e...
/** * Method to create the ontologies. * * @throws Exception * It can throw an exception. */
Method to create the ontologies
createOntologies
{ "repo_name": "markwilkinson/OpenLifeData2SADI", "path": "Java/Code/OpenLifeData2SADI/src/es/cbgp/old2sadi/main/Logic.java", "license": "apache-2.0", "size": 32133 }
[ "es.cbgp.old2sadi.ontstuff.OntologyCreation" ]
import es.cbgp.old2sadi.ontstuff.OntologyCreation;
import es.cbgp.old2sadi.ontstuff.*;
[ "es.cbgp.old2sadi" ]
es.cbgp.old2sadi;
1,066,862
public String getResourceType(final IBaseResource theResource) { return getResourceDefinition(theResource).getName(); }
String function(final IBaseResource theResource) { return getResourceDefinition(theResource).getName(); }
/** * Returns the name of the scanned runtime model for the given type. This is an advanced feature which is generally only needed * for extending the core library. */
Returns the name of the scanned runtime model for the given type. This is an advanced feature which is generally only needed for extending the core library
getResourceType
{ "repo_name": "jamesagnew/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java", "license": "apache-2.0", "size": 46350 }
[ "org.hl7.fhir.instance.model.api.IBaseResource" ]
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.*;
[ "org.hl7.fhir" ]
org.hl7.fhir;
629,980
@Test public void testMigration() throws DeserializationException { Configuration conf = UTIL.getConfiguration(); ListMultimap<String,TablePermission> permissions = createPermissions(); byte [] bytes = writePermissionsAsBytes(permissions, conf); AccessControlLists.readPermissions(bytes, conf); }
void function() throws DeserializationException { Configuration conf = UTIL.getConfiguration(); ListMultimap<String,TablePermission> permissions = createPermissions(); byte [] bytes = writePermissionsAsBytes(permissions, conf); AccessControlLists.readPermissions(bytes, conf); }
/** * Test we can read permissions serialized with Writables. * @throws DeserializationException */
Test we can read permissions serialized with Writables
testMigration
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java", "license": "apache-2.0", "size": 18863 }
[ "com.google.common.collect.ListMultimap", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.exceptions.DeserializationException" ]
import com.google.common.collect.ListMultimap; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.exceptions.DeserializationException;
import com.google.common.collect.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.exceptions.*;
[ "com.google.common", "org.apache.hadoop" ]
com.google.common; org.apache.hadoop;
1,777,751
public Frequency grid() { return grid; }
Frequency function() { return grid; }
/** * Returns the grid spacing frequency. * * @return grid spacing frequency */
Returns the grid spacing frequency
grid
{ "repo_name": "harikrushna-Huawei/hackathon", "path": "core/api/src/main/java/org/onosproject/net/OmsPort.java", "license": "apache-2.0", "size": 4373 }
[ "org.onlab.util.Frequency" ]
import org.onlab.util.Frequency;
import org.onlab.util.*;
[ "org.onlab.util" ]
org.onlab.util;
931,881
public static void assertOutMessageBodyEquals(Exchange exchange, Object expected) throws InvalidPayloadException { assertNotNull("Should have a response exchange!", exchange); Object actual; if (expected == null) { actual = exchange.getOut().getMandatoryBody(); asser...
static void function(Exchange exchange, Object expected) throws InvalidPayloadException { assertNotNull(STR, exchange); Object actual; if (expected == null) { actual = exchange.getOut().getMandatoryBody(); assertEquals(STR + exchange, expected, actual); } else { actual = exchange.getOut().getMandatoryBody(expected.getC...
/** * Asserts that the given exchange has an OUT message of the given body value * * @param exchange the exchange which should have an OUT message * @param expected the expected value of the OUT message * @throws InvalidPayloadException is thrown if the payload is not the expected class type ...
Asserts that the given exchange has an OUT message of the given body value
assertOutMessageBodyEquals
{ "repo_name": "CandleCandle/camel", "path": "components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java", "license": "apache-2.0", "size": 20452 }
[ "org.apache.camel.Exchange", "org.apache.camel.InvalidPayloadException" ]
import org.apache.camel.Exchange; import org.apache.camel.InvalidPayloadException;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,878,281
public Set<EventListener> getListeners(String subject) { // Split the subject into it's path components String[] path = subject.split(SPLIT_REGEX); Set<EventListener> allListeners = new HashSet<>(); if (isRootNode() && listeners != null) { allListeners.addAll(listeners);...
Set<EventListener> function(String subject) { String[] path = subject.split(SPLIT_REGEX); Set<EventListener> allListeners = new HashSet<>(); if (isRootNode() && listeners != null) { allListeners.addAll(listeners); } EventListenerTree child = getChild(path[0]); if (child == null) { return allListeners; } allListeners.ad...
/** * Given a subject path return all listeners registered for it * * @param subject * @return */
Given a subject path return all listeners registered for it
getListeners
{ "repo_name": "motech/motech-server-pillreminder", "path": "platform/event/src/main/java/org/motechproject/event/listener/EventListenerTree.java", "license": "bsd-3-clause", "size": 11254 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
648,595
Set<String> getAttributeNames();
Set<String> getAttributeNames();
/** * Gets the attribute names that have a value associated with it. Each value can be * passed into {@link org.springframework.session.Session#getAttribute(String)} to * obtain the attribute value. * * @return the attribute names that have a value associated with it. * @see #getAttribute(String) */
Gets the attribute names that have a value associated with it. Each value can be passed into <code>org.springframework.session.Session#getAttribute(String)</code> to obtain the attribute value
getAttributeNames
{ "repo_name": "dazhi2010/lemon", "path": "src/main/java/org/springframework/session/Session.java", "license": "apache-2.0", "size": 2454 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
77,767
public void performStaticInjection() { AgentResource.init(injector.getInstance(HeartBeatHandler.class)); CertificateDownload.init(injector.getInstance(CertificateManager.class)); CertificateSign.init(injector.getInstance(CertificateManager.class)); GetResource.init(injector.getInstance(ResourceManager...
void function() { AgentResource.init(injector.getInstance(HeartBeatHandler.class)); CertificateDownload.init(injector.getInstance(CertificateManager.class)); CertificateSign.init(injector.getInstance(CertificateManager.class)); GetResource.init(injector.getInstance(ResourceManager.class)); PersistKeyValueService.init(i...
/** * Static injection replacement to wait Persistence Service start */
Static injection replacement to wait Persistence Service start
performStaticInjection
{ "repo_name": "telefonicaid/fiware-cosmos-ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java", "license": "apache-2.0", "size": 20077 }
[ "com.google.gson.Gson", "org.apache.ambari.eventdb.webservice.WorkflowJsonService", "org.apache.ambari.server.agent.HeartBeatHandler", "org.apache.ambari.server.agent.rest.AgentResource", "org.apache.ambari.server.api.rest.BootStrapResource", "org.apache.ambari.server.api.services.AmbariMetaInfo", "org....
import com.google.gson.Gson; import org.apache.ambari.eventdb.webservice.WorkflowJsonService; import org.apache.ambari.server.agent.HeartBeatHandler; import org.apache.ambari.server.agent.rest.AgentResource; import org.apache.ambari.server.api.rest.BootStrapResource; import org.apache.ambari.server.api.services.AmbariM...
import com.google.gson.*; import org.apache.ambari.eventdb.webservice.*; import org.apache.ambari.server.agent.*; import org.apache.ambari.server.agent.rest.*; import org.apache.ambari.server.api.rest.*; import org.apache.ambari.server.api.services.*; import org.apache.ambari.server.bootstrap.*; import org.apache.ambar...
[ "com.google.gson", "org.apache.ambari" ]
com.google.gson; org.apache.ambari;
1,417,948
public void setAmount(final BigDecimal value) { amount = value; }
void function(final BigDecimal value) { amount = value; }
/** * mutator - set the transaction amount. * * @param value the amount to set. */
mutator - set the transaction amount
setAmount
{ "repo_name": "TheBellman/transfer-server", "path": "src/main/java/net/parttimepolymath/model/Transaction.java", "license": "mit", "size": 6262 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
773,228
private static boolean findActualTokenFromImportFromDefinition(IPythonNature nature, String tok, ArrayList<IDefinition> selected, Definition d, ICompletionCache completionCache) throws Exception { boolean didFindNewDef = false; Set<Tuple3<String, Integer, Integer>> whereWePassed = new H...
static boolean function(IPythonNature nature, String tok, ArrayList<IDefinition> selected, Definition d, ICompletionCache completionCache) throws Exception { boolean didFindNewDef = false; Set<Tuple3<String, Integer, Integer>> whereWePassed = new HashSet<Tuple3<String, Integer, Integer>>(); tok = FullRepIterable.getLas...
/** * Given some definition, find its actual token (if that's possible) * @param request the original request * @param tok the token we're looking for * @param lFindInfo place to store info * @param selected place to add the new definition (if found) * @param d the definition found before...
Given some definition, find its actual token (if that's possible)
findActualTokenFromImportFromDefinition
{ "repo_name": "siddhika1889/Pydev-Editor", "path": "src/org/python/pydev/editor/refactoring/PyRefactoringFindDefinition.java", "license": "epl-1.0", "size": 12512 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.Set", "org.python.pydev.core.FullRepIterable", "org.python.pydev.core.ICompletionCache", "org.python.pydev.core.IDefinition", "org.python.pydev.core.IPythonNature", "org.python.pydev.editor.codecompletion.revisited.CompletionStateFactory", "org....
import java.util.ArrayList; import java.util.HashSet; import java.util.Set; import org.python.pydev.core.FullRepIterable; import org.python.pydev.core.ICompletionCache; import org.python.pydev.core.IDefinition; import org.python.pydev.core.IPythonNature; import org.python.pydev.editor.codecompletion.revisited.Completio...
import java.util.*; import org.python.pydev.core.*; import org.python.pydev.editor.codecompletion.revisited.*; import org.python.pydev.editor.codecompletion.revisited.visitors.*; import org.python.pydev.parser.jython.ast.*; import org.python.pydev.shared_core.structure.*;
[ "java.util", "org.python.pydev" ]
java.util; org.python.pydev;
1,109,768
public static List<Object> findJaxbElement(List<Object> listObject, Class<?> classObject) { if (listObject == null) { return null; } List<Object> listObjectFound = new ArrayList<Object>(); for (Object elt : listObject) { if (elt == null) { c...
static List<Object> function(List<Object> listObject, Class<?> classObject) { if (listObject == null) { return null; } List<Object> listObjectFound = new ArrayList<Object>(); for (Object elt : listObject) { if (elt == null) { continue; } if (classObject.isInstance(elt)) { listObjectFound.add(elt); } if (!(elt instanceo...
/** * Searches objects from a jaxbElement object list according to a specific class . * * @param listObject list in which one searches * @param classObject class to search * * @return a list that contains object corresponding to classObject parameter (can be empty) */
Searches objects from a jaxbElement object list according to a specific class
findJaxbElement
{ "repo_name": "clstoulouse/motu", "path": "motu-web/src/main/java/fr/cls/atoll/motu/web/dal/catalog/tds/JAXBTDSModel.java", "license": "lgpl-3.0", "size": 5572 }
[ "java.util.ArrayList", "java.util.List", "javax.xml.bind.JAXBElement" ]
import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement;
import java.util.*; import javax.xml.bind.*;
[ "java.util", "javax.xml" ]
java.util; javax.xml;
1,931,319
@Test public void testJdbcToArroValues() throws SQLException, IOException { testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance())); testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE))); ...
void function() throws SQLException, IOException { testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE), Calendar.getInstance())); testDataSets(JdbcToArrow.sqlToArrow(conn, table.getQuery(), new RootAllocator(Integer.MAX_VALUE))); testDataSets(JdbcToArrow.sqlToArrow(conn.crea...
/** * Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with only one test data file. */
Test Method to test JdbcToArrow Functionality for various H2 DB based datatypes with only one test data file
testJdbcToArroValues
{ "repo_name": "pcmoritz/arrow", "path": "java/adapter/jdbc/src/test/java/org/apache/arrow/adapter/jdbc/h2/JdbcToArrowTest.java", "license": "apache-2.0", "size": 9497 }
[ "java.io.IOException", "java.sql.SQLException", "java.util.Calendar", "org.apache.arrow.adapter.jdbc.JdbcToArrow", "org.apache.arrow.memory.RootAllocator" ]
import java.io.IOException; import java.sql.SQLException; import java.util.Calendar; import org.apache.arrow.adapter.jdbc.JdbcToArrow; import org.apache.arrow.memory.RootAllocator;
import java.io.*; import java.sql.*; import java.util.*; import org.apache.arrow.adapter.jdbc.*; import org.apache.arrow.memory.*;
[ "java.io", "java.sql", "java.util", "org.apache.arrow" ]
java.io; java.sql; java.util; org.apache.arrow;
2,678,189
@NonNull private RecyclerView.AdapterDataObserver createAdapterDataObserver() { return new RecyclerView.AdapterDataObserver() {
RecyclerView.AdapterDataObserver function() { return new RecyclerView.AdapterDataObserver() {
/** * Creates and returns a data observer, which allows to adapt the navigation preferences, when * the adapter's underlying data has been changed. * * @return The data observer, which has been created, as an instance of the class {@link * RecyclerView.AdapterDataObserver}. The data observer ma...
Creates and returns a data observer, which allows to adapt the navigation preferences, when the adapter's underlying data has been changed
createAdapterDataObserver
{ "repo_name": "michael-rapp/AndroidPreferenceActivity", "path": "library/src/main/java/de/mrapp/android/preference/activity/adapter/NavigationPreferenceAdapter.java", "license": "apache-2.0", "size": 20458 }
[ "androidx.recyclerview.widget.RecyclerView" ]
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.*;
[ "androidx.recyclerview" ]
androidx.recyclerview;
288,886