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 deleteWeapon(WeaponDTO weapon);
void deleteWeapon(WeaponDTO weapon);
/** * Deletes object of class Weapon from db. * * @param weapon WeaponDTO to be deleted. */
Deletes object of class Weapon from db
deleteWeapon
{ "repo_name": "Vaculik/creatures-hunting", "path": "ApiLayer/src/main/java/cz/muni/fi/pa165/facade/WeaponFacade.java", "license": "gpl-2.0", "size": 2198 }
[ "cz.muni.fi.pa165.dto.WeaponDTO" ]
import cz.muni.fi.pa165.dto.WeaponDTO;
import cz.muni.fi.pa165.dto.*;
[ "cz.muni.fi" ]
cz.muni.fi;
1,848,775
private ArrayList<URLCrawlDatum> readContents(Path fetchlist) throws IOException { // verify results SequenceFile.Reader reader = new SequenceFile.Reader(fs, fetchlist, conf); ArrayList<URLCrawlDatum> l = new ArrayList<URLCrawlDatum>(); READ: do { Text key = new Text();...
ArrayList<URLCrawlDatum> function(Path fetchlist) throws IOException { SequenceFile.Reader reader = new SequenceFile.Reader(fs, fetchlist, conf); ArrayList<URLCrawlDatum> l = new ArrayList<URLCrawlDatum>(); READ: do { Text key = new Text(); CrawlDatum value = new CrawlDatum(); if (!reader.next(key, value)) { break READ...
/** * Read contents of fetchlist. * * @param fetchlist * path to Generated fetchlist * @return Generated {@link URLCrawlDatum} objects * @throws IOException */
Read contents of fetchlist
readContents
{ "repo_name": "gitriver/nutch-learning", "path": "src/test/org/apache/nutch/crawl/TestGenerator.java", "license": "apache-2.0", "size": 12188 }
[ "java.io.IOException", "java.util.ArrayList", "org.apache.hadoop.fs.Path", "org.apache.hadoop.io.SequenceFile", "org.apache.hadoop.io.Text", "org.apache.nutch.crawl.CrawlDBTestUtil" ]
import java.io.IOException; import java.util.ArrayList; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.Text; import org.apache.nutch.crawl.CrawlDBTestUtil;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.nutch.crawl.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.apache.nutch" ]
java.io; java.util; org.apache.hadoop; org.apache.nutch;
1,153,777
public void push(ImageReference reference, UpdateListener<PushImageUpdateEvent> listener, String registryAuth) throws IOException { Assert.notNull(reference, "Reference must not be null"); Assert.notNull(listener, "Listener must not be null"); URI pushUri = buildUrl("/images/" + reference + "/push"); ...
void function(ImageReference reference, UpdateListener<PushImageUpdateEvent> listener, String registryAuth) throws IOException { Assert.notNull(reference, STR); Assert.notNull(listener, STR); URI pushUri = buildUrl(STR + reference + "/push"); ErrorCaptureUpdateListener errorListener = new ErrorCaptureUpdateListener(); ...
/** * Push an image to a registry. * @param reference the image reference to push * @param listener a push listener to receive update events * @param registryAuth registry authentication credentials * @throws IOException on IO error */
Push an image to a registry
push
{ "repo_name": "jxblum/spring-boot", "path": "spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/main/java/org/springframework/boot/buildpack/platform/docker/DockerApi.java", "license": "apache-2.0", "size": 15993 }
[ "java.io.IOException", "org.springframework.boot.buildpack.platform.docker.transport.HttpTransport", "org.springframework.boot.buildpack.platform.docker.type.ImageReference", "org.springframework.util.Assert" ]
import java.io.IOException; import org.springframework.boot.buildpack.platform.docker.transport.HttpTransport; import org.springframework.boot.buildpack.platform.docker.type.ImageReference; import org.springframework.util.Assert;
import java.io.*; import org.springframework.boot.buildpack.platform.docker.transport.*; import org.springframework.boot.buildpack.platform.docker.type.*; import org.springframework.util.*;
[ "java.io", "org.springframework.boot", "org.springframework.util" ]
java.io; org.springframework.boot; org.springframework.util;
952,652
public static final <T> T getObject(String content, Class<T> clazz) throws JsonParseException, JsonMappingException, IOException { if (content != null && clazz != null) { ObjectMapper objectMapper = new ObjectMapper(); try { return objectMapper.readValue(c...
static final <T> T function(String content, Class<T> clazz) throws JsonParseException, JsonMappingException, IOException { if (content != null && clazz != null) { ObjectMapper objectMapper = new ObjectMapper(); try { return objectMapper.readValue(content, clazz); } catch (EOFException e) { LOG.warn(STR + content + STR ...
/** * Convert entered string content to entered class. * * @param content - content, which will be converted * @param clazz - content will be converted to this class * @return parsed object with type of entered class * @throws JsonParseException possible exception during the processing ...
Convert entered string content to entered class
getObject
{ "repo_name": "sapanywhereai/anywhere-api-sample", "path": "IntegrationDemoApp/src/main/java/com/sap/integration/utils/JsonUtil.java", "license": "apache-2.0", "size": 4833 }
[ "java.io.EOFException", "java.io.IOException", "org.codehaus.jackson.JsonParseException", "org.codehaus.jackson.map.JsonMappingException", "org.codehaus.jackson.map.ObjectMapper" ]
import java.io.EOFException; import java.io.IOException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.codehaus.jackson.map.ObjectMapper;
import java.io.*; import org.codehaus.jackson.*; import org.codehaus.jackson.map.*;
[ "java.io", "org.codehaus.jackson" ]
java.io; org.codehaus.jackson;
1,198,452
public void setStates(final LinkedList<AbstractStateModel> states) { this.flowModel.setStates(states); }
void function(final LinkedList<AbstractStateModel> states) { this.flowModel.setStates(states); }
/** * Sets states. * * @param states the states */
Sets states
setStates
{ "repo_name": "Unicon/cas", "path": "core/cas-server-core-webflow/src/main/java/org/apereo/cas/web/flow/configurer/DynamicFlowModelBuilder.java", "license": "apache-2.0", "size": 2713 }
[ "java.util.LinkedList", "org.springframework.webflow.engine.model.AbstractStateModel" ]
import java.util.LinkedList; import org.springframework.webflow.engine.model.AbstractStateModel;
import java.util.*; import org.springframework.webflow.engine.model.*;
[ "java.util", "org.springframework.webflow" ]
java.util; org.springframework.webflow;
1,377,688
public interface Configurable extends AzureConfigurable<Configurable> { PolicyInsightsManager authenticate(AzureTokenCredentials credentials); }
interface Configurable extends AzureConfigurable<Configurable> { PolicyInsightsManager function(AzureTokenCredentials credentials); }
/** * Creates an instance of PolicyInsightsManager that exposes PolicyInsights management API entry points. * * @param credentials the credentials to use * @return the interface exposing PolicyInsights management API entry points that work across subscriptions */
Creates an instance of PolicyInsightsManager that exposes PolicyInsights management API entry points
authenticate
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/policyinsights/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/policyinsights/v2018_07_01_preview/implementation/PolicyInsightsManager.java", "license": "mit", "size": 5573 }
[ "com.microsoft.azure.arm.resources.AzureConfigurable", "com.microsoft.azure.credentials.AzureTokenCredentials" ]
import com.microsoft.azure.arm.resources.AzureConfigurable; import com.microsoft.azure.credentials.AzureTokenCredentials;
import com.microsoft.azure.arm.resources.*; import com.microsoft.azure.credentials.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,481,545
public boolean isBullet() { return getFlag(ParagraphFlagsTextProp.BULLET_IDX); }
boolean function() { return getFlag(ParagraphFlagsTextProp.BULLET_IDX); }
/** * Returns whether this rich text run has bullets */
Returns whether this rich text run has bullets
isBullet
{ "repo_name": "lvweiwolf/poi-3.16", "path": "src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java", "license": "apache-2.0", "size": 58932 }
[ "org.apache.poi.hslf.model.textproperties.ParagraphFlagsTextProp" ]
import org.apache.poi.hslf.model.textproperties.ParagraphFlagsTextProp;
import org.apache.poi.hslf.model.textproperties.*;
[ "org.apache.poi" ]
org.apache.poi;
1,002,752
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<RoleAssignmentInner>> createByIdWithResponseAsync( String roleAssignmentId, RoleAssignmentCreateParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<RoleAssignmentInner>> function( String roleAssignmentId, RoleAssignmentCreateParameters parameters, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (roleAssignmentId == null) { return Mono...
/** * Creates a role assignment by ID. * * @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and * resource type. Use the format, * /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example: * ...
Creates a role assignment by ID
createByIdWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsClientImpl.java", "license": "mit", "size": 111188 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentInner", "com.azure.resourcemanager.authorization.models.RoleAssignmentCreateParameters...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentInner; import com.azure.resourcemanager.authorization.models.RoleAssignmen...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; import com.azure.resourcemanager.authorization.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,787,227
public static boolean isJUnitTestCode(VisitorState state) { for (Tree ancestor : state.getPath()) { if (ancestor instanceof MethodTree && JUnitMatchers.hasJUnitAnnotation((MethodTree) ancestor, state)) { return true; } if (ancestor instanceof ClassTree && (JUnitMatche...
static boolean function(VisitorState state) { for (Tree ancestor : state.getPath()) { if (ancestor instanceof MethodTree && JUnitMatchers.hasJUnitAnnotation((MethodTree) ancestor, state)) { return true; } if (ancestor instanceof ClassTree && (JUnitMatchers.isTestCaseDescendant.matches((ClassTree) ancestor, state) hasAn...
/** * Returns true if the leaf node in the {@link TreePath} from {@code state} sits somewhere * underneath a class or method that is marked as JUnit 3 or 4 test code. */
Returns true if the leaf node in the <code>TreePath</code> from state sits somewhere underneath a class or method that is marked as JUnit 3 or 4 test code
isJUnitTestCode
{ "repo_name": "google/error-prone", "path": "check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java", "license": "apache-2.0", "size": 89646 }
[ "com.google.errorprone.VisitorState", "com.google.errorprone.matchers.JUnitMatchers", "com.sun.source.tree.ClassTree", "com.sun.source.tree.MethodTree", "com.sun.source.tree.Tree" ]
import com.google.errorprone.VisitorState; import com.google.errorprone.matchers.JUnitMatchers; import com.sun.source.tree.ClassTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.Tree;
import com.google.errorprone.*; import com.google.errorprone.matchers.*; import com.sun.source.tree.*;
[ "com.google.errorprone", "com.sun.source" ]
com.google.errorprone; com.sun.source;
1,305,158
public NamingEnumeration getOptional() { DXNamingEnumeration returnEnumeration = new DXNamingEnumeration (); Enumeration allIDs = this.atts.keys(); while (allIDs.hasMoreElements()) { String id = (String) allIDs.nextElement(); if (this.must.contains(id)==fa...
NamingEnumeration function() { DXNamingEnumeration returnEnumeration = new DXNamingEnumeration (); Enumeration allIDs = this.atts.keys(); while (allIDs.hasMoreElements()) { String id = (String) allIDs.nextElement(); if (this.must.contains(id)==false) { returnEnumeration.add(get(id)); } } returnEnumeration.sort(); retur...
/** * returns all the optional 'MAY' Attribute(s) in this DXAttributes object. * - the NamingEnumeration is (evily) pre-sorted alphabetically... * @return enumeration of all stored Attribute objects */
returns all the optional 'MAY' Attribute(s) in this DXAttributes object. - the NamingEnumeration is (evily) pre-sorted alphabetically..
getOptional
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/ldap/client/naming/DXAttributes.java", "license": "gpl-3.0", "size": 51405 }
[ "java.util.Enumeration", "javax.naming.NamingEnumeration" ]
import java.util.Enumeration; import javax.naming.NamingEnumeration;
import java.util.*; import javax.naming.*;
[ "java.util", "javax.naming" ]
java.util; javax.naming;
2,645,680
public static DefaultSwaptionMarketDataLookup of(Map<RateIndex, SwaptionVolatilitiesId> volatilityIds) { return new DefaultSwaptionMarketDataLookup(volatilityIds); }
static DefaultSwaptionMarketDataLookup function(Map<RateIndex, SwaptionVolatilitiesId> volatilityIds) { return new DefaultSwaptionMarketDataLookup(volatilityIds); }
/** * Obtains an instance based on a map of volatility identifiers. * <p> * The map is used to specify the appropriate volatilities to use for each index. * * @param volatilityIds the volatility identifiers, keyed by index * @return the swaption lookup containing the specified volatilities */
Obtains an instance based on a map of volatility identifiers. The map is used to specify the appropriate volatilities to use for each index
of
{ "repo_name": "OpenGamma/Strata", "path": "modules/measure/src/main/java/com/opengamma/strata/measure/swaption/DefaultSwaptionMarketDataLookup.java", "license": "apache-2.0", "size": 7219 }
[ "com.opengamma.strata.basics.index.RateIndex", "com.opengamma.strata.pricer.swaption.SwaptionVolatilitiesId", "java.util.Map" ]
import com.opengamma.strata.basics.index.RateIndex; import com.opengamma.strata.pricer.swaption.SwaptionVolatilitiesId; import java.util.Map;
import com.opengamma.strata.basics.index.*; import com.opengamma.strata.pricer.swaption.*; import java.util.*;
[ "com.opengamma.strata", "java.util" ]
com.opengamma.strata; java.util;
467,101
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ExpressRouteCrossConnectionInner> listAsync();
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ExpressRouteCrossConnectionInner> listAsync();
/** * Retrieves all the ExpressRouteCrossConnections in a subscription. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return res...
Retrieves all the ExpressRouteCrossConnections in a subscription
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteCrossConnectionsClient.java", "license": "mit", "size": 44449 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.network.fluent.models.ExpressRouteCrossConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.network.fluent.models.ExpressRouteCrossConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,994,154
public void fatalError(TransformerException e) throws TransformerException { logger.error("Fatal error: " + e.getMessage()); throw e; }
void function(TransformerException e) throws TransformerException { logger.error(STR + e.getMessage()); throw e; }
/** * Unrecoverable errors cause an exception to be rethrown. */
Unrecoverable errors cause an exception to be rethrown
fatalError
{ "repo_name": "arnaudsj/carrot2", "path": "core/carrot2-util-common/src/org/carrot2/util/xslt/StylesheetErrorListener.java", "license": "bsd-3-clause", "size": 1297 }
[ "javax.xml.transform.TransformerException" ]
import javax.xml.transform.TransformerException;
import javax.xml.transform.*;
[ "javax.xml" ]
javax.xml;
1,331,073
public List<QueryItem> getItemsAndItemFilters() { return ListUtils.union( items, itemFilters ); }
List<QueryItem> function() { return ListUtils.union( items, itemFilters ); }
/** * Returns a list of items and item filters. */
Returns a list of items and item filters
getItemsAndItemFilters
{ "repo_name": "uonafya/jphes-core", "path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/EventQueryParams.java", "license": "bsd-3-clause", "size": 27869 }
[ "java.util.List", "org.hisp.dhis.common.QueryItem", "org.hisp.dhis.commons.collection.ListUtils" ]
import java.util.List; import org.hisp.dhis.common.QueryItem; import org.hisp.dhis.commons.collection.ListUtils;
import java.util.*; import org.hisp.dhis.common.*; import org.hisp.dhis.commons.collection.*;
[ "java.util", "org.hisp.dhis" ]
java.util; org.hisp.dhis;
934,599
@AsPercept(name = "message", multiplePercepts = true, filter = Filter.Type.ALWAYS) public List<ArrayList<String>> getMessages() { List<ArrayList<String>> msg = this.messages; this.messages = new LinkedList<>(); LOGGER.log(BotLog.BOTLOG, msg); for (int i =0; i < msg.size(); i++) { // Insert code that eval...
@AsPercept(name = STR, multiplePercepts = true, filter = Filter.Type.ALWAYS) List<ArrayList<String>> function() { List<ArrayList<String>> msg = this.messages; this.messages = new LinkedList<>(); LOGGER.log(BotLog.BOTLOG, msg); for (int i =0; i < msg.size(); i++) { } return msg; }
/** * Returns all messages received by the player, Send on change * * @return the messages that were received */
Returns all messages received by the player, Send on change
getMessages
{ "repo_name": "eishub/BW4T", "path": "bw4t-server/src/main/java/nl/tudelft/bw4t/server/eis/RobotEntity.java", "license": "gpl-3.0", "size": 28063 }
[ "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "nl.tudelft.bw4t.server.logging.BotLog" ]
import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import nl.tudelft.bw4t.server.logging.BotLog;
import java.util.*; import nl.tudelft.bw4t.server.logging.*;
[ "java.util", "nl.tudelft.bw4t" ]
java.util; nl.tudelft.bw4t;
795,982
public void testTake2() throws InterruptedException { ExecutorService e = Executors.newCachedThreadPool(); ExecutorCompletionService ecs = new ExecutorCompletionService(e); try { Callable c = new StringTask(); Future f1 = ecs.submit(c); Future f2 = ecs.tak...
void function() throws InterruptedException { ExecutorService e = Executors.newCachedThreadPool(); ExecutorCompletionService ecs = new ExecutorCompletionService(e); try { Callable c = new StringTask(); Future f1 = ecs.submit(c); Future f2 = ecs.take(); assertSame(f1, f2); } finally { joinPool(e); } }
/** * Take returns the same future object returned by submit */
Take returns the same future object returned by submit
testTake2
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "jsr166-tests/src/test/java/jsr166/ExecutorCompletionServiceTest.java", "license": "gpl-2.0", "size": 7912 }
[ "java.util.concurrent.Callable", "java.util.concurrent.ExecutorCompletionService", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.Future" ]
import java.util.concurrent.Callable; import java.util.concurrent.ExecutorCompletionService; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,307,208
private void readInputData() throws Exception{ double intra_thres = is_intra_thres_percent ? 0 : INTRA_IF_THRESHOLD; double inter_thres = is_inter_thres_percent ? 0 : INTER_IF_THRESHOLD; try{ contactMT = helper.readContactData(INPUT_FILE,intra_thres,inter_thres,CHR_UPPER_BOUND_ID,lstPositions,idT...
void function() throws Exception{ double intra_thres = is_intra_thres_percent ? 0 : INTRA_IF_THRESHOLD; double inter_thres = is_inter_thres_percent ? 0 : INTER_IF_THRESHOLD; try{ contactMT = helper.readContactData(INPUT_FILE,intra_thres,inter_thres,CHR_UPPER_BOUND_ID,lstPositions,idToChr); }catch(Exception ex){ ex.prin...
/** * read contact matrix into contactMT[] * */
read contact matrix into contactMT[]
readInputData
{ "repo_name": "BDM-Lab/MOGEN", "path": "src/genomeReconstruction/GenomeGenerator.java", "license": "gpl-3.0", "size": 34142 }
[ "java.util.ArrayList", "java.util.Collections" ]
import java.util.ArrayList; import java.util.Collections;
import java.util.*;
[ "java.util" ]
java.util;
2,110,591
File getWorkingDir() { return null; }
File getWorkingDir() { return null; }
/** * Return the working directory for test execution. A return value * of <code>null</code> indicates that the test should inherit the * working directory of the harness * * @return the working directory for test execution */
Return the working directory for test execution. A return value of <code>null</code> indicates that the test should inherit the working directory of the harness
getWorkingDir
{ "repo_name": "cdegroot/river", "path": "qa/src/com/sun/jini/qa/harness/TestDescription.java", "license": "apache-2.0", "size": 25641 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
807,839
@Override protected void onWakeup() throws DatabaseException { if (envImpl.isClosed()) { return; } doCheckpoint(CheckpointConfig.DEFAULT, false, // flushAll "daemon"); }
void function() throws DatabaseException { if (envImpl.isClosed()) { return; } doCheckpoint(CheckpointConfig.DEFAULT, false, STR); }
/** * Called whenever the DaemonThread wakes up from a sleep. */
Called whenever the DaemonThread wakes up from a sleep
onWakeup
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/src/com/sleepycat/je/recovery/Checkpointer.java", "license": "apache-2.0", "size": 61442 }
[ "com.sleepycat.je.CheckpointConfig", "com.sleepycat.je.DatabaseException" ]
import com.sleepycat.je.CheckpointConfig; import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,435,495
private void updateTime() { Date currentTime = new Date(); calendar.setTime(currentTime); //setTimeLabel(dateFormat.format(currentTime)); }
void function() { Date currentTime = new Date(); calendar.setTime(currentTime); }
/** * Updates the calendar and the display with the current time. */
Updates the calendar and the display with the current time
updateTime
{ "repo_name": "jontsai/HomeAutomationJava", "path": "src/automaton/routines/AutomatonRoutines.java", "license": "mit", "size": 2238 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,738,311
public void flush() { clearBuffer(); try { out.flush(); } catch (IOException e) { e.printStackTrace(); } }
void function() { clearBuffer(); try { out.flush(); } catch (IOException e) { e.printStackTrace(); } }
/** * Flush the binary output stream, padding 0s if number of bits written so far * is not a multiple of 8. */
Flush the binary output stream, padding 0s if number of bits written so far is not a multiple of 8
flush
{ "repo_name": "captianjroot/EquationBrackets", "path": "src/sedgewick/BinaryOut.java", "license": "mit", "size": 9194 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
944,159
public boolean evaluateAny(Object principal, Set<Action> actions, Node graphIRI, Triple triple) throws AuthenticationRequiredException;
boolean function(Object principal, Set<Action> actions, Node graphIRI, Triple triple) throws AuthenticationRequiredException;
/** * Determine if any of the actions are allowed on the triple within the * graph. * <p> * See evaluate( Action, Node, Triple ) for discussion of evaluation * strategy. * </p> * * @param principal * The principal that is attempting the action. * * @param actions * The acti...
Determine if any of the actions are allowed on the triple within the graph. See evaluate( Action, Node, Triple ) for discussion of evaluation strategy.
evaluateAny
{ "repo_name": "CesarPantoja/jena", "path": "jena-permissions/src/main/java/org/apache/jena/permissions/SecurityEvaluator.java", "license": "apache-2.0", "size": 14737 }
[ "java.util.Set", "org.apache.jena.graph.Node", "org.apache.jena.graph.Triple", "org.apache.jena.shared.AuthenticationRequiredException" ]
import java.util.Set; import org.apache.jena.graph.Node; import org.apache.jena.graph.Triple; import org.apache.jena.shared.AuthenticationRequiredException;
import java.util.*; import org.apache.jena.graph.*; import org.apache.jena.shared.*;
[ "java.util", "org.apache.jena" ]
java.util; org.apache.jena;
1,589,891
void initBlockPool(BPOfferService bpos) throws IOException { NamespaceInfo nsInfo = bpos.getNamespaceInfo(); if (nsInfo == null) { throw new IOException("NamespaceInfo not found: Block pool " + bpos + " should have retrieved namespace info before initBlockPool."); } setClusterId(n...
void initBlockPool(BPOfferService bpos) throws IOException { NamespaceInfo nsInfo = bpos.getNamespaceInfo(); if (nsInfo == null) { throw new IOException(STR + bpos + STR); } setClusterId(nsInfo.clusterID, nsInfo.getBlockPoolID()); blockPoolManager.addBlockPool(bpos); initStorage(nsInfo); checkDiskError(); data.addBlock...
/** * One of the Block Pools has successfully connected to its NN. * This initializes the local storage for that block pool, * checks consistency of the NN's cluster ID, etc. * * If this is the first block pool to register, this also initializes * the datanode-scoped storage. * * @param bpos B...
One of the Block Pools has successfully connected to its NN. This initializes the local storage for that block pool, checks consistency of the NN's cluster ID, etc. If this is the first block pool to register, this also initializes the datanode-scoped storage
initBlockPool
{ "repo_name": "gilv/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 120360 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.server.protocol.NamespaceInfo" ]
import java.io.IOException; import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo;
import java.io.*; import org.apache.hadoop.hdfs.server.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,897,475
public static String generateSessionId(String title) { return ParserUtils.sanitizeId(title); } } public static class Speakers implements SpeakersColumns, SyncColumns, BaseColumns { public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon().append...
static String function(String title) { return ParserUtils.sanitizeId(title); } } public static class Speakers implements SpeakersColumns, SyncColumns, BaseColumns { public static final Uri CONTENT_URI = BASE_CONTENT_URI.buildUpon().appendPath(PATH_SPEAKERS).build(); public static final String CONTENT_TYPE = STR; public...
/** * Generate a {@link #SESSION_ID} that will always match the requested * {@link Sessions} details. */
Generate a <code>#SESSION_ID</code> that will always match the requested <code>Sessions</code> details
generateSessionId
{ "repo_name": "underhilllabs/dccsched", "path": "src/com/underhilllabs/dccsched/provider/ScheduleContract.java", "license": "apache-2.0", "size": 21915 }
[ "android.net.Uri", "android.provider.BaseColumns", "com.underhilllabs.dccsched.util.ParserUtils" ]
import android.net.Uri; import android.provider.BaseColumns; import com.underhilllabs.dccsched.util.ParserUtils;
import android.net.*; import android.provider.*; import com.underhilllabs.dccsched.util.*;
[ "android.net", "android.provider", "com.underhilllabs.dccsched" ]
android.net; android.provider; com.underhilllabs.dccsched;
2,481,009
@Test public final void testGetType() { assertEquals(et, e.getType()); }
final void function() { assertEquals(et, e.getType()); }
/** * Test method for {@link org.technikradio.node.engine.event.Event#getType()}. */
Test method for <code>org.technikradio.node.engine.event.Event#getType()</code>
testGetType
{ "repo_name": "Technikradio/Node2", "path": "src/tests/org/technikradio/node/tests/engine/EventTest.java", "license": "bsd-3-clause", "size": 3847 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,725,294
public Collection<ClusterNode> remoteCacheNodes(@Nullable String cacheName, AffinityTopologyVersion topVer) { return resolveDiscoCache(cacheName, topVer).remoteCacheNodes(cacheName, topVer.topologyVersion()); }
Collection<ClusterNode> function(@Nullable String cacheName, AffinityTopologyVersion topVer) { return resolveDiscoCache(cacheName, topVer).remoteCacheNodes(cacheName, topVer.topologyVersion()); }
/** * Gets cache remote nodes for cache with given name. * * @param cacheName Cache name. * @param topVer Topology version. * @return Collection of cache nodes. */
Gets cache remote nodes for cache with given name
remoteCacheNodes
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java", "license": "apache-2.0", "size": 107855 }
[ "java.util.Collection", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.jetbrains.annotations.*;
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
2,004,770
public void setGridStroke(Stroke stroke) { gridXStroke = stroke; gridYStroke = stroke; }
void function(Stroke stroke) { gridXStroke = stroke; gridYStroke = stroke; }
/** * Set which stroke the grid should be painted with. * * @param stroke * {@Code Stroke} to paint the grid with. */
Set which stroke the grid should be painted with
setGridStroke
{ "repo_name": "andern/jcoolib", "path": "src/cartesian/coordinate/CCSystem.java", "license": "gpl-3.0", "size": 37342 }
[ "java.awt.Stroke" ]
import java.awt.Stroke;
import java.awt.*;
[ "java.awt" ]
java.awt;
148,135
public void writeBoolean(FieldName field_name, boolean value) { writer.writeFieldName(field_name); writer.writeBoolean(value); }
void function(FieldName field_name, boolean value) { writer.writeFieldName(field_name); writer.writeBoolean(value); }
/** * Write a boolean in primitive form * * @param field_name * @param value */
Write a boolean in primitive form
writeBoolean
{ "repo_name": "jimmutable/core", "path": "core/src/main/java/org/jimmutable/core/serialization/writer/ObjectWriter.java", "license": "bsd-3-clause", "size": 14562 }
[ "org.jimmutable.core.serialization.FieldName" ]
import org.jimmutable.core.serialization.FieldName;
import org.jimmutable.core.serialization.*;
[ "org.jimmutable.core" ]
org.jimmutable.core;
2,587,435
List<ContextButton> getContextButtons();
List<ContextButton> getContextButtons();
/** * Returns a list of context buttons from sub menu. * * @return list of context buttons from sub menu. */
Returns a list of context buttons from sub menu
getContextButtons
{ "repo_name": "jboss-reddeer/reddeer", "path": "plugins/org.eclipse.reddeer.graphiti/src/org/eclipse/reddeer/graphiti/api/ContextButton.java", "license": "epl-1.0", "size": 1019 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
73,497
@Override public String cook(BreadSlice<String, File> slice, String sql) throws BreadException { File output = new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".shp"); try { semaphore.acquire(); try { process(slice, output, sql)...
String function(BreadSlice<String, File> slice, String sql) throws BreadException { File output = new File(slice.getWorkSurface(), slice.getId() + "_" + slice.getMixName() + ".shp"); try { semaphore.acquire(); try { process(slice, output, sql); return output.getAbsolutePath(); } finally { semaphore.release(); } } catch...
/** * Performs a call to the ogr2ogr command. This method will wait if the maximum * simultaneous calls are being performed. Once this is done, create a shptree * index in .qix format * @param slice the slice to populate * @param sql the sql statement to use for generating the shape file *...
Performs a call to the ogr2ogr command. This method will wait if the maximum simultaneous calls are being performed. Once this is done, create a shptree index in .qix format
cook
{ "repo_name": "NERC-CEH/dynamo-mapping", "path": "src/main/java/uk/ac/ceh/dynamo/bread/ShapefileGenerator.java", "license": "gpl-2.0", "size": 7511 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,717,285
private static DataResult ownedErrata(User user, String mode, Class clazz) { SelectMode m; if (clazz == null) { m = ModeFactory.getMode("Errata_queries", mode); } else { m = ModeFactory.getMode("Errata_queries", mode, clazz); } Map params = new...
static DataResult function(User user, String mode, Class clazz) { SelectMode m; if (clazz == null) { m = ModeFactory.getMode(STR, mode); } else { m = ModeFactory.getMode(STR, mode, clazz); } Map params = new HashMap(); params.put(STR, user.getOrg().getId()); return makeDataResult(params, new HashMap(), null, m); }
/** * Helper method to get the unpublished/published errata * @param user Currently logged in user * @param mode Tells which mode (published/unpublished) we need to run * @param clazz The class you would like the return values represented as * @return all of the errata */
Helper method to get the unpublished/published errata
ownedErrata
{ "repo_name": "colloquium/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/errata/ErrataManager.java", "license": "gpl-2.0", "size": 52839 }
[ "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.common.db.datasource.ModeFactory", "com.redhat.rhn.common.db.datasource.SelectMode", "com.redhat.rhn.domain.user.User", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.common.db.datasource.ModeFactory; import com.redhat.rhn.common.db.datasource.SelectMode; import com.redhat.rhn.domain.user.User; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.user.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,683,814
public void setLegendBackgroundPaint(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.legendBackgroundPaint = paint; }
void function(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.legendBackgroundPaint = paint; }
/** * Sets the legend background paint. * * @param paint the paint (<code>null</code> not permitted). * * @see #getLegendBackgroundPaint() */
Sets the legend background paint
setLegendBackgroundPaint
{ "repo_name": "Mr-Steve/LTSpice_Library_Manager", "path": "libs/jfreechart-1.0.16/source/org/jfree/chart/StandardChartTheme.java", "license": "gpl-2.0", "size": 60415 }
[ "java.awt.Paint", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Paint; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,332,826
@Test public void timeVaryingVolTest() { final LatticeSpecification lattice1 = new TimeVaryingLatticeSpecification(); final double[] time_set = new double[] {0.5, 1.2 }; final int steps = 977; final double[] vol = new double[steps]; final double[] rate = new double[steps]; final double[] div...
void function() { final LatticeSpecification lattice1 = new TimeVaryingLatticeSpecification(); final double[] time_set = new double[] {0.5, 1.2 }; final int steps = 977; final double[] vol = new double[steps]; final double[] rate = new double[steps]; final double[] dividend = new double[steps]; final int stepsTri = 117...
/** * non-constant volatility and interest rate */
non-constant volatility and interest rate
timeVaryingVolTest
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/test/java/com/opengamma/analytics/financial/model/option/pricing/tree/SupershareOptionFunctionProviderTest.java", "license": "apache-2.0", "size": 31351 }
[ "com.opengamma.analytics.financial.greeks.Greek", "com.opengamma.analytics.financial.greeks.GreekResultCollection", "org.testng.Assert" ]
import com.opengamma.analytics.financial.greeks.Greek; import com.opengamma.analytics.financial.greeks.GreekResultCollection; import org.testng.Assert;
import com.opengamma.analytics.financial.greeks.*; import org.testng.*;
[ "com.opengamma.analytics", "org.testng" ]
com.opengamma.analytics; org.testng;
313,732
public Collection<RouteParam> getGlobalRouteParams() { return globalRouteParams; }
Collection<RouteParam> function() { return globalRouteParams; }
/** * Returns the configured global route parameters. The default value for this configuration is an empty list. * * @see HttpRequest#routeParams() */
Returns the configured global route parameters. The default value for this configuration is an empty list
getGlobalRouteParams
{ "repo_name": "FrelliBB/Bastion", "path": "src/main/java/rocks/bastion/core/configuration/GlobalRequestAttributes.java", "license": "gpl-3.0", "size": 7080 }
[ "java.util.Collection", "rocks.bastion.core.RouteParam" ]
import java.util.Collection; import rocks.bastion.core.RouteParam;
import java.util.*; import rocks.bastion.core.*;
[ "java.util", "rocks.bastion.core" ]
java.util; rocks.bastion.core;
2,145,301
void buildFieldDescriptors(Field[] declaredFields) { // We could find the field ourselves in the collection, but calling // reflect is easier. Optimize if needed. final Field f = ObjectStreamClass.fieldSerialPersistentFields(this.forClass()); // If we could not find the emulated fiel...
void buildFieldDescriptors(Field[] declaredFields) { final Field f = ObjectStreamClass.fieldSerialPersistentFields(this.forClass()); boolean useReflectFields = f == null; ObjectStreamField[] _fields = null; if (!useReflectFields) { f.setAccessible(true); try { _fields = (ObjectStreamField[]) f.get(null); } catch (Illeg...
/** * Builds the collection of field descriptors for the receiver * * @param declaredFields * collection of java.lang.reflect.Field for which to compute * field descriptors */
Builds the collection of field descriptors for the receiver
buildFieldDescriptors
{ "repo_name": "lukhnos/j2objc", "path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamClass.java", "license": "apache-2.0", "size": 48423 }
[ "java.lang.reflect.Field", "java.lang.reflect.Modifier", "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,602,456
static <T> TableOutput evalCluster(Stream<? extends TestDocument> data, Map<String, Function<TestDocument, Double>> compressors, boolean wide) { TableOutput wideTable = new TableOutput(); TableOutput tallTable = new TableOutput(); AtomicInteger index = new AtomicInteger(0); data.parallel().forEach(ite...
static <T> TableOutput evalCluster(Stream<? extends TestDocument> data, Map<String, Function<TestDocument, Double>> compressors, boolean wide) { TableOutput wideTable = new TableOutput(); TableOutput tallTable = new TableOutput(); AtomicInteger index = new AtomicInteger(0); data.parallel().forEach(item -> { HashMap<Str...
/** * Eval cluster table output. * * @param <T> the type parameter * @param data the data * @param compressors the compressors * @param wide the wide * @return the table output */
Eval cluster table output
evalCluster
{ "repo_name": "SimiaCryptus/utilities", "path": "java-util/src/test/java/com/simiacryptus/text/Compressor.java", "license": "apache-2.0", "size": 8118 }
[ "com.simiacryptus.util.TableOutput", "com.simiacryptus.util.test.TestDocument", "java.util.HashMap", "java.util.LinkedHashMap", "java.util.Map", "java.util.concurrent.atomic.AtomicInteger", "java.util.function.Function", "java.util.stream.Stream" ]
import com.simiacryptus.util.TableOutput; import com.simiacryptus.util.test.TestDocument; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; import java.util.stream.Stream;
import com.simiacryptus.util.*; import com.simiacryptus.util.test.*; import java.util.*; import java.util.concurrent.atomic.*; import java.util.function.*; import java.util.stream.*;
[ "com.simiacryptus.util", "java.util" ]
com.simiacryptus.util; java.util;
1,720,136
public static java.util.List extractMskSpineExamList(ims.domain.ILightweightDomainFactory domainFactory, ims.generalmedical.vo.MskSpineExamFindingShortVoCollection voCollection) { return extractMskSpineExamList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.generalmedical.vo.MskSpineExamFindingShortVoCollection voCollection) { return extractMskSpineExamList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.medical.domain.objects.MskSpineExam list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.medical.domain.objects.MskSpineExam list from the value object collection
extractMskSpineExamList
{ "repo_name": "IMS-MAXIMS/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/generalmedical/vo/domain/MskSpineExamFindingShortVoAssembler.java", "license": "agpl-3.0", "size": 19121 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,121,323
LunoQuote discardQuote(String quoteId) throws IOException, LunoException;
LunoQuote discardQuote(String quoteId) throws IOException, LunoException;
/** * Discard a quote. Once a quote has been discarded, it cannot be exercised even if it has not expired yet. * * @param quoteId required - ID of the quote to discard. * @return * @throws IOException * @throws LunoException */
Discard a quote. Once a quote has been discarded, it cannot be exercised even if it has not expired yet
discardQuote
{ "repo_name": "gaborkolozsy/XChange", "path": "xchange-luno/src/main/java/org/knowm/xchange/luno/LunoAPI.java", "license": "mit", "size": 15667 }
[ "java.io.IOException", "org.knowm.xchange.luno.dto.LunoException", "org.knowm.xchange.luno.dto.account.LunoQuote" ]
import java.io.IOException; import org.knowm.xchange.luno.dto.LunoException; import org.knowm.xchange.luno.dto.account.LunoQuote;
import java.io.*; import org.knowm.xchange.luno.dto.*; import org.knowm.xchange.luno.dto.account.*;
[ "java.io", "org.knowm.xchange" ]
java.io; org.knowm.xchange;
2,427,337
public void handleIO() throws IOException { if(shutDown) { throw new IOException("No IO while shut down"); } // Deal with all of the stuff that's been added, but may not be marked // writable. handleInputQueue(); getLogger().debug("Done dealing with queue."); long delay=0; if(!reconnectQueue.isE...
void function() throws IOException { if(shutDown) { throw new IOException(STR); } handleInputQueue(); getLogger().debug(STR); long delay=0; if(!reconnectQueue.isEmpty()) { long now=System.currentTimeMillis(); long then=reconnectQueue.firstKey(); delay=Math.max(then-now, 1); } getLogger().debug(STR, delay); assert selec...
/** * MemcachedClient calls this method to handle IO over the connections. */
MemcachedClient calls this method to handle IO over the connections
handleIO
{ "repo_name": "yinwm-wiish/java-memcached-client", "path": "src/main/java/net/spy/memcached/MemcachedConnection.java", "license": "mit", "size": 18550 }
[ "java.io.IOException", "java.nio.channels.SelectionKey", "java.util.Set" ]
import java.io.IOException; import java.nio.channels.SelectionKey; import java.util.Set;
import java.io.*; import java.nio.channels.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
1,388,757
public final Map<Type, String> toStringParts() { Map<Type, String> result = new LinkedHashMap<>(); // Preserve order for #toString(). result.put(Type.MCC, mcc() != 0 ? "mcc" + mcc() : ""); result.put(Type.MNC, mnc() != 0 ? "mnc" + mnc() : ""); result.put(Type.LANGUAGE_STRING, !languageString().isEmpt...
final Map<Type, String> function() { Map<Type, String> result = new LinkedHashMap<>(); result.put(Type.MCC, mcc() != 0 ? "mcc" + mcc() : STRmncSTRSTRSTRSTRrSTRSTRSTRswSTRdpSTRSTRwSTRdpSTRSTRhSTRdpSTRSTRSTRSTRSTRSTRSTRSTRdpiSTRSTRSTRSTRSTRSTRvSTR"); return result; }
/** * Returns a map of the configuration parts for {@link #toString}. * * <p>If a configuration part is not defined for this {@link ResourceConfiguration}, its value * will be the empty string. */
Returns a map of the configuration parts for <code>#toString</code>. If a configuration part is not defined for this <code>ResourceConfiguration</code>, its value will be the empty string
toStringParts
{ "repo_name": "madisp/android-chunk-utils", "path": "src/main/java/pink/madis/apk/arsc/ResourceConfiguration.java", "license": "apache-2.0", "size": 20277 }
[ "java.util.LinkedHashMap", "java.util.Map" ]
import java.util.LinkedHashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,971,585
public CompletableFuture<Submission> processAsync(final HttpQueryExecutor executor) { if (isReleased.get()) { throw new RunLevelException(subInfo() + " is already released. Task will not been processed"); } LOG.debug(subInfo() + " will be executed in " + nextExecutionDelay); ...
CompletableFuture<Submission> function(final HttpQueryExecutor executor) { if (isReleased.get()) { throw new RunLevelException(subInfo() + STR); } LOG.debug(subInfo() + STR + nextExecutionDelay); return executor.performHttpQueryAsync(subInfo(), getMethod(), getTarget(), getEntity(), nextExecutionDelay) .thenApply(respo...
/** * processes the task asynchronously * @param queryExecutor the query executor * @return the submission future */
processes the task asynchronously
processAsync
{ "repo_name": "1and1/reactive", "path": "reactive-kafka-example/src/main/java/net/oneandone/incubator/neo/http/sink/TransientSubmission.java", "license": "apache-2.0", "size": 9963 }
[ "java.time.Instant", "java.util.concurrent.CompletableFuture", "org.glassfish.hk2.runlevel.RunLevelException" ]
import java.time.Instant; import java.util.concurrent.CompletableFuture; import org.glassfish.hk2.runlevel.RunLevelException;
import java.time.*; import java.util.concurrent.*; import org.glassfish.hk2.runlevel.*;
[ "java.time", "java.util", "org.glassfish.hk2" ]
java.time; java.util; org.glassfish.hk2;
1,988,246
public void mouseReleased(MouseEvent e) { forwardMouseEvent(e); }
void function(MouseEvent e) { forwardMouseEvent(e); }
/** * Forward the mouseReleased event to the underlying child container. * @see #mousePressed */
Forward the mouseReleased event to the underlying child container
mouseReleased
{ "repo_name": "toxeh/ExecuteQuery", "path": "java/src/org/underworldlabs/swing/GlassCapturePanel.java", "license": "gpl-3.0", "size": 9868 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,032,759
protected PowerVmSelectionPolicy getVmSelectionPolicy(String vmSelectionPolicyName) { PowerVmSelectionPolicy vmSelectionPolicy = null; if (vmSelectionPolicyName.equals("mc")) { vmSelectionPolicy = new PowerVmSelectionPolicyMaximumCorrelation( new PowerVmSelectionPolicyMinimumMigrationTime()); } el...
PowerVmSelectionPolicy function(String vmSelectionPolicyName) { PowerVmSelectionPolicy vmSelectionPolicy = null; if (vmSelectionPolicyName.equals("mc")) { vmSelectionPolicy = new PowerVmSelectionPolicyMaximumCorrelation( new PowerVmSelectionPolicyMinimumMigrationTime()); } else if (vmSelectionPolicyName.equals("mmt")) ...
/** * Gets the vm selection policy. * * @param vmSelectionPolicyName the vm selection policy name * @return the vm selection policy */
Gets the vm selection policy
getVmSelectionPolicy
{ "repo_name": "thejotta/CloudSimPlusModificado", "path": "cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/RunnerAbstract.java", "license": "gpl-3.0", "size": 11342 }
[ "org.cloudbus.cloudsim.power.PowerVmSelectionPolicy", "org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMaximumCorrelation", "org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumMigrationTime", "org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumUtilization", "org.cloudbus.cloudsim.power.PowerVm...
import org.cloudbus.cloudsim.power.PowerVmSelectionPolicy; import org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMaximumCorrelation; import org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumMigrationTime; import org.cloudbus.cloudsim.power.PowerVmSelectionPolicyMinimumUtilization; import org.cloudbus.cloudsim...
import org.cloudbus.cloudsim.power.*;
[ "org.cloudbus.cloudsim" ]
org.cloudbus.cloudsim;
2,083,686
public Date getDate() { return date; }
Date function() { return date; }
/** * Gets the date. * * @return the date */
Gets the date
getDate
{ "repo_name": "m2fd/java-sdk", "path": "src/main/java/com/ibm/watson/developer_cloud/alchemy/v1/model/PublicationDate.java", "license": "apache-2.0", "size": 1720 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,273,947
public void setParameters(Map<String, Object> parameters) { this.parameters = parameters; }
void function(Map<String, Object> parameters) { this.parameters = parameters; }
/** * Optional parameters to the {@link java.sql.Statement}. * <p/> * For example to set maxRows, fetchSize etc. * * @param parameters parameters which will be set using reflection */
Optional parameters to the <code>java.sql.Statement</code>. For example to set maxRows, fetchSize etc
setParameters
{ "repo_name": "punkhorn/camel-upstream", "path": "components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java", "license": "apache-2.0", "size": 9277 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
202,221
@Nonnull public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.x != null) { result.add(new com.microsoft.graph.options.FunctionOption("x", x)); }...
java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.x != null) { result.add(new com.microsoft.graph.options.FunctionOption("x", x)); } if(this.n != null) { result.add(new com.microsoft.graph.options.Funct...
/** * Gets the functions options from the properties that have been set * @return a list of function options for the request */
Gets the functions options from the properties that have been set
getFunctionOptions
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/models/WorkbookFunctionsBesselYParameterSet.java", "license": "mit", "size": 4133 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,624,393
public static GoogleRobotCredentials getRobotCredentials( @NonNull ItemGroup itemGroup, @NonNull List<DomainRequirement> domainRequirements, @NonNull String credentialsId) throws AbortException { Preconditions.checkArgument(!credentialsId.isEmpty()); GoogleOAuth2Credentials credentials...
static GoogleRobotCredentials function( @NonNull ItemGroup itemGroup, @NonNull List<DomainRequirement> domainRequirements, @NonNull String credentialsId) throws AbortException { Preconditions.checkArgument(!credentialsId.isEmpty()); GoogleOAuth2Credentials credentials = CredentialsMatchers.firstOrNull( CredentialsProvi...
/** * Retrieves the {@link GoogleRobotCredentials} specified by the provided credentialsId. * * @param itemGroup The Jenkins context to use for retrieving the credentials. * @param domainRequirements A list of domain requirements. * @param credentialsId The ID of the credentials to retrieve. * @return...
Retrieves the <code>GoogleRobotCredentials</code> specified by the provided credentialsId
getRobotCredentials
{ "repo_name": "GoogleCloudPlatform/jenkins-gcr-plugin", "path": "src/main/java/com/google/jenkins/plugins/containersecurity/client/ClientUtil.java", "license": "apache-2.0", "size": 5295 }
[ "com.cloudbees.plugins.credentials.CredentialsMatchers", "com.cloudbees.plugins.credentials.CredentialsProvider", "com.cloudbees.plugins.credentials.domains.DomainRequirement", "com.google.cloud.graphite.platforms.plugin.client.ClientFactory", "com.google.common.base.Preconditions", "com.google.jenkins.pl...
import com.cloudbees.plugins.credentials.CredentialsMatchers; import com.cloudbees.plugins.credentials.CredentialsProvider; import com.cloudbees.plugins.credentials.domains.DomainRequirement; import com.google.cloud.graphite.platforms.plugin.client.ClientFactory; import com.google.common.base.Preconditions; import com....
import com.cloudbees.plugins.credentials.*; import com.cloudbees.plugins.credentials.domains.*; import com.google.cloud.graphite.platforms.plugin.client.*; import com.google.common.base.*; import com.google.jenkins.plugins.credentials.oauth.*; import hudson.model.*; import java.util.*;
[ "com.cloudbees.plugins", "com.google.cloud", "com.google.common", "com.google.jenkins", "hudson.model", "java.util" ]
com.cloudbees.plugins; com.google.cloud; com.google.common; com.google.jenkins; hudson.model; java.util;
1,287,146
public void PublishItem(OMFMessage omfMessage, String mtype, Node pubNode) { //Node pubNode is for the aSmack only currently, i dont know whether AMQP will work that way. if (connectionType.equalsIgnoreCase("XMPP")) { XMPPPublisher(omfMessage.toXML(), SCHEMA, mtype, pubNode); } else if (connectionTy...
void function(OMFMessage omfMessage, String mtype, Node pubNode) { if (connectionType.equalsIgnoreCase("XMPP")) { XMPPPublisher(omfMessage.toXML(), SCHEMA, mtype, pubNode); } else if (connectionType.equalsIgnoreCase("AMQP")) { } }
/** * Publish item * @param xmlString : The XML string generated by the XMLGenerator * @param SCHEMA : The OMF Schema * @param mType : the OMF message type * @param pubNode : the node for the message to be published */
Publish item
PublishItem
{ "repo_name": "NitLab/Android_Resource_Controller", "path": "Android Studio Project/app/src/main/java/com/omf/resourcecontroller/OMF/MessagePublisher.java", "license": "mit", "size": 2228 }
[ "org.jivesoftware.smackx.pubsub.Node" ]
import org.jivesoftware.smackx.pubsub.Node;
import org.jivesoftware.smackx.pubsub.*;
[ "org.jivesoftware.smackx" ]
org.jivesoftware.smackx;
1,076,827
public void reset(@Nonnull NodeState newBase) { checkState(parent == null); base = checkNotNull(newBase); baseRevision = rootHead.setState(newBase) + 1; }
void function(@Nonnull NodeState newBase) { checkState(parent == null); base = checkNotNull(newBase); baseRevision = rootHead.setState(newBase) + 1; }
/** * Throws away all changes in this builder and resets the base to the * given node state. * * @param newBase new base state */
Throws away all changes in this builder and resets the base to the given node state
reset
{ "repo_name": "ieb/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java", "license": "apache-2.0", "size": 26745 }
[ "com.google.common.base.Preconditions", "javax.annotation.Nonnull", "org.apache.jackrabbit.oak.spi.state.NodeState" ]
import com.google.common.base.Preconditions; import javax.annotation.Nonnull; import org.apache.jackrabbit.oak.spi.state.NodeState;
import com.google.common.base.*; import javax.annotation.*; import org.apache.jackrabbit.oak.spi.state.*;
[ "com.google.common", "javax.annotation", "org.apache.jackrabbit" ]
com.google.common; javax.annotation; org.apache.jackrabbit;
2,514,442
public void decode(FacesContext context, UIComponent component, List<String> legalValues, String realEventSourceName) { InputText inputText = (InputText) component; if (inputText.isDisabled() || inputText.isReadonly()) { return; } decodeBehaviors(context, inputText); String clientId = inputText.getClie...
void function(FacesContext context, UIComponent component, List<String> legalValues, String realEventSourceName) { InputText inputText = (InputText) component; if (inputText.isDisabled() inputText.isReadonly()) { return; } decodeBehaviors(context, inputText); String clientId = inputText.getClientId(context); String nam...
/** * This method is used by RadioButtons and SelectOneMenus to limit the list of legal values. If another value is * sent, the input field is considered empty. This comes in useful the the back-end attribute is a primitive * type like int, which doesn't support null values. * @param context *...
This method is used by RadioButtons and SelectOneMenus to limit the list of legal values. If another value is sent, the input field is considered empty. This comes in useful the the back-end attribute is a primitive type like int, which doesn't support null values
decode
{ "repo_name": "TheCoder4eu/BootsFaces-OSP", "path": "src/main/java/net/bootsfaces/component/inputText/InputTextRenderer.java", "license": "apache-2.0", "size": 15967 }
[ "java.util.List", "javax.faces.component.UIComponent", "javax.faces.context.FacesContext", "net.bootsfaces.component.ajax.AJAXRenderer", "net.bootsfaces.component.inputSecret.InputSecret" ]
import java.util.List; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import net.bootsfaces.component.ajax.AJAXRenderer; import net.bootsfaces.component.inputSecret.InputSecret;
import java.util.*; import javax.faces.component.*; import javax.faces.context.*; import net.bootsfaces.component.*; import net.bootsfaces.component.ajax.*;
[ "java.util", "javax.faces", "net.bootsfaces.component" ]
java.util; javax.faces; net.bootsfaces.component;
237,068
public ImmutableNodeInst withPortInst(PortProtoId portProtoId, ImmutablePortInst portInst) { if (portProtoId.getParentId() != protoId) { throw new IllegalArgumentException("portProtoId"); } int portChronIndex = portProtoId.getChronIndex(); ImmutablePortInst[] newPorts; ...
ImmutableNodeInst function(PortProtoId portProtoId, ImmutablePortInst portInst) { if (portProtoId.getParentId() != protoId) { throw new IllegalArgumentException(STR); } int portChronIndex = portProtoId.getChronIndex(); ImmutablePortInst[] newPorts; if (portChronIndex < ports.length) { if (ports[portChronIndex] == portI...
/** * Returns ImmutableNodeInst which differs from this ImmutableNodeInst by additional Variable on PortInst. * If this ImmutableNideInst has Variable on PortInst with the same key as new, the old variable will not be in new * ImmutableNodeInst. * @param portProtoId PortProtoId of port instance. ...
Returns ImmutableNodeInst which differs from this ImmutableNodeInst by additional Variable on PortInst. If this ImmutableNideInst has Variable on PortInst with the same key as new, the old variable will not be in new ImmutableNodeInst
withPortInst
{ "repo_name": "imr/Electric8", "path": "com/sun/electric/database/ImmutableNodeInst.java", "license": "gpl-3.0", "size": 51910 }
[ "com.sun.electric.database.id.PortProtoId", "java.util.Arrays" ]
import com.sun.electric.database.id.PortProtoId; import java.util.Arrays;
import com.sun.electric.database.id.*; import java.util.*;
[ "com.sun.electric", "java.util" ]
com.sun.electric; java.util;
1,128,210
protected void reloadHashTable(byte pos, int partitionId) throws IOException, HiveException, SerDeException, ClassNotFoundException { HybridHashTableContainer container = (HybridHashTableContainer)mapJoinTables[pos]; HashPartition partition = container.getHashPartitions()[partitionId]; // Merge the...
void function(byte pos, int partitionId) throws IOException, HiveException, SerDeException, ClassNotFoundException { HybridHashTableContainer container = (HybridHashTableContainer)mapJoinTables[pos]; HashPartition partition = container.getHashPartitions()[partitionId]; LOG.info(STR); KeyValueContainer kvContainer = par...
/** * Reload hashtable from the hash partition. * It can have two steps: * 1) Deserialize a serialized hash table, and * 2) Merge every key/value pair from small table container into the hash table * @param pos position of small table * @param partitionId the partition of the small table to be reloade...
Reload hashtable from the hash partition. It can have two steps: 1) Deserialize a serialized hash table, and 2) Merge every key/value pair from small table container into the hash table
reloadHashTable
{ "repo_name": "vergilchiu/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java", "license": "apache-2.0", "size": 31433 }
[ "java.io.IOException", "org.apache.hadoop.hive.common.ObjectPair", "org.apache.hadoop.hive.ql.exec.persistence.BytesBytesMultiHashMap", "org.apache.hadoop.hive.ql.exec.persistence.HybridHashTableContainer", "org.apache.hadoop.hive.ql.exec.persistence.KeyValueContainer", "org.apache.hadoop.hive.ql.exec.per...
import java.io.IOException; import org.apache.hadoop.hive.common.ObjectPair; import org.apache.hadoop.hive.ql.exec.persistence.BytesBytesMultiHashMap; import org.apache.hadoop.hive.ql.exec.persistence.HybridHashTableContainer; import org.apache.hadoop.hive.ql.exec.persistence.KeyValueContainer; import org.apache.hadoop...
import java.io.*; import org.apache.hadoop.hive.common.*; import org.apache.hadoop.hive.ql.exec.persistence.*; import org.apache.hadoop.hive.ql.io.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.hive.serde2.*; import org.apache.hadoop.io.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,697,287
public void constructRecord(ModuleID id, File file, ModuleDec dec) { ModuleRecord record = new ModuleRecord(id, file); record.setModuleDec(dec); assert !map.containsKey(id) : "map already contains key"; assert !fmap.containsKey(file) : "fmap already contains file"; map.put(id...
void function(ModuleID id, File file, ModuleDec dec) { ModuleRecord record = new ModuleRecord(id, file); record.setModuleDec(dec); assert !map.containsKey(id) : STR; assert !fmap.containsKey(file) : STR; map.put(id, record); fmap.put(file, id); stack.push(id); if (!debugOff) { err.message(STR + id.toString()); } }
/** * Constructs a record containing the module id, the file, and the module * dec, and places it in the module environment. Also places the module into * a stack that indicates compilation has begun on this module but has not * completed. */
Constructs a record containing the module id, the file, and the module dec, and places it in the module environment. Also places the module into a stack that indicates compilation has begun on this module but has not completed
constructRecord
{ "repo_name": "mikekab/RESOLVE", "path": "src/main/java/edu/clemson/cs/r2jt/init/CompileEnvironment.java", "license": "bsd-3-clause", "size": 20816 }
[ "edu.clemson.cs.r2jt.absyn.ModuleDec", "edu.clemson.cs.r2jt.data.ModuleID", "java.io.File" ]
import edu.clemson.cs.r2jt.absyn.ModuleDec; import edu.clemson.cs.r2jt.data.ModuleID; import java.io.File;
import edu.clemson.cs.r2jt.absyn.*; import edu.clemson.cs.r2jt.data.*; import java.io.*;
[ "edu.clemson.cs", "java.io" ]
edu.clemson.cs; java.io;
805,535
public HmGatewayInfo getGatewayInfo(String id) throws IOException { RpcRequest<T> request = createRpcRequest("getDeviceDescription"); request.addArg("BidCoS-RF"); GetDeviceDescriptionParser ddParser = new GetDeviceDescriptionParser(); ddParser.parse(sendMessage(config.getRpcPort(HmIn...
HmGatewayInfo function(String id) throws IOException { RpcRequest<T> request = createRpcRequest(STR); request.addArg(STR); GetDeviceDescriptionParser ddParser = new GetDeviceDescriptionParser(); ddParser.parse(sendMessage(config.getRpcPort(HmInterface.RF), request)); boolean isHomegear = StringUtils.equalsIgnoreCase(dd...
/** * Tries to identify the gateway and returns the GatewayInfo. */
Tries to identify the gateway and returns the GatewayInfo
getGatewayInfo
{ "repo_name": "beowulfe/openhab2", "path": "addons/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/communicator/client/RpcClient.java", "license": "epl-1.0", "size": 14372 }
[ "java.io.IOException", "org.apache.commons.lang.StringUtils", "org.openhab.binding.homematic.internal.communicator.message.RpcRequest", "org.openhab.binding.homematic.internal.communicator.parser.GetDeviceDescriptionParser", "org.openhab.binding.homematic.internal.communicator.parser.ListBidcosInterfacesPar...
import java.io.IOException; import org.apache.commons.lang.StringUtils; import org.openhab.binding.homematic.internal.communicator.message.RpcRequest; import org.openhab.binding.homematic.internal.communicator.parser.GetDeviceDescriptionParser; import org.openhab.binding.homematic.internal.communicator.parser.ListBidco...
import java.io.*; import org.apache.commons.lang.*; import org.openhab.binding.homematic.internal.communicator.message.*; import org.openhab.binding.homematic.internal.communicator.parser.*; import org.openhab.binding.homematic.internal.model.*;
[ "java.io", "org.apache.commons", "org.openhab.binding" ]
java.io; org.apache.commons; org.openhab.binding;
790,836
public LogEntryBuilder appendResponseHeaders(final HttpResponseHeaderField responseHeader) { if (responseHeader == null) { throw new IllegalArgumentException("Argument 'responseHeader' can not be null."); } this.responseHeaders.add(responseHeader); return this; }
LogEntryBuilder function(final HttpResponseHeaderField responseHeader) { if (responseHeader == null) { throw new IllegalArgumentException(STR); } this.responseHeaders.add(responseHeader); return this; }
/** * Appends a HTTP response header to the set of response headers. * * @param responseHeader * a HTTP response header * @return itself, for chaining */
Appends a HTTP response header to the set of response headers
appendResponseHeaders
{ "repo_name": "before/jacclog", "path": "net.sf.jacclog.api/src/main/java/net/sf/jacclog/api/domain/LogEntryBuilder.java", "license": "apache-2.0", "size": 20347 }
[ "net.sf.jacclog.api.domain.http.HttpResponseHeaderField" ]
import net.sf.jacclog.api.domain.http.HttpResponseHeaderField;
import net.sf.jacclog.api.domain.http.*;
[ "net.sf.jacclog" ]
net.sf.jacclog;
1,323,171
@Test public void whenMaxThreeAndTwoAndOneThenThree() { Max max = new Max(); int result = max.max(3, 2, 1); int expected = 3; assertThat(result, is(expected)); }
void function() { Max max = new Max(); int result = max.max(3, 2, 1); int expected = 3; assertThat(result, is(expected)); }
/** *Test for method max. *Tested method max with three parametrs 3, 2 and 1; */
Test for method max. Tested method max with three parametrs 3, 2 and 1
whenMaxThreeAndTwoAndOneThenThree
{ "repo_name": "artemprokopov/aprokopov", "path": "chapter_001/src/test/java/ru/job4j/max/MaxTest.java", "license": "apache-2.0", "size": 1996 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
920,139
TokenSet[] getOperatorsByPriority();
TokenSet[] getOperatorsByPriority();
/** * Provides operation priority and operands * @return array of TokenSets */
Provides operation priority and operands
getOperatorsByPriority
{ "repo_name": "akosyakov/intellij-community", "path": "platform/core-impl/src/com/intellij/indentation/OperationParserHelper.java", "license": "apache-2.0", "size": 6987 }
[ "com.intellij.psi.tree.TokenSet" ]
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.tree.*;
[ "com.intellij.psi" ]
com.intellij.psi;
2,073,104
Integer insertAndReturnKey(RelatedBug value);
Integer insertAndReturnKey(RelatedBug value);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table m_tracker_related_bug * * @mbggenerated Tue Sep 08 09:15:23 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table m_tracker_related_bug
insertAndReturnKey
{ "repo_name": "onlylin/mycollab", "path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/tracker/dao/RelatedBugMapper.java", "license": "agpl-3.0", "size": 4857 }
[ "com.esofthead.mycollab.module.tracker.domain.RelatedBug" ]
import com.esofthead.mycollab.module.tracker.domain.RelatedBug;
import com.esofthead.mycollab.module.tracker.domain.*;
[ "com.esofthead.mycollab" ]
com.esofthead.mycollab;
1,119,397
public JspPropertyGroupType<T> removeTrimDirectiveWhitespaces() { childNode.removeChildren("trim-directive-whitespaces"); return this; } // --------------------------------------------------------------------------------------------------------|| // ClassName: JspPropertyGroupType ElementN...
JspPropertyGroupType<T> function() { childNode.removeChildren(STR); return this; }
/** * Removes the <code>trim-directive-whitespaces</code> element * @return the current instance of <code>JspPropertyGroupType<T></code> */
Removes the <code>trim-directive-whitespaces</code> element
removeTrimDirectiveWhitespaces
{ "repo_name": "forge/javaee-descriptors", "path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/jsp21/JspPropertyGroupTypeImpl.java", "license": "epl-1.0", "size": 21354 }
[ "org.jboss.shrinkwrap.descriptor.api.jsp21.JspPropertyGroupType" ]
import org.jboss.shrinkwrap.descriptor.api.jsp21.JspPropertyGroupType;
import org.jboss.shrinkwrap.descriptor.api.jsp21.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
2,538,473
@Override public void enterEveryRule(ParserRuleContext ctx) { }
@Override public void enterEveryRule(ParserRuleContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitExpressionContent
{ "repo_name": "oaplatform/oap", "path": "oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarBaseListener.java", "license": "mit", "size": 3467 }
[ "org.antlr.v4.runtime.ParserRuleContext" ]
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.*;
[ "org.antlr.v4" ]
org.antlr.v4;
644,204
@SuppressWarnings("unchecked") @Override public void addTestCase(TestCase test, String asEmail) { log.info("Trying to add Test: " + test.getTitle()); ServletUtils.requireAccess(userService.hasEditAccess(test.getParentProjectId(), asEmail)); // Trim long fields. test.setTitle(StringUtil.trimString...
@SuppressWarnings(STR) void function(TestCase test, String asEmail) { log.info(STR + test.getTitle()); ServletUtils.requireAccess(userService.hasEditAccess(test.getParentProjectId(), asEmail)); test.setTitle(StringUtil.trimString(test.getTitle())); saveOrUpdateDatum(test); }
/** * Try to upload a new bug into the GAE datastore. If a test case with the same ID already * exists, it will be updated. */
Try to upload a new bug into the GAE datastore. If a test case with the same ID already exists, it will be updated
addTestCase
{ "repo_name": "rodion-goritskov/test-analytics-ng", "path": "src/main/java/com/google/testing/testify/risk/frontend/server/service/impl/DataServiceImpl.java", "license": "apache-2.0", "size": 18919 }
[ "com.google.testing.testify.risk.frontend.model.TestCase", "com.google.testing.testify.risk.frontend.server.util.ServletUtils", "com.google.testing.testify.risk.frontend.shared.util.StringUtil" ]
import com.google.testing.testify.risk.frontend.model.TestCase; import com.google.testing.testify.risk.frontend.server.util.ServletUtils; import com.google.testing.testify.risk.frontend.shared.util.StringUtil;
import com.google.testing.testify.risk.frontend.model.*; import com.google.testing.testify.risk.frontend.server.util.*; import com.google.testing.testify.risk.frontend.shared.util.*;
[ "com.google.testing" ]
com.google.testing;
638,416
public SettingsApi getSettingsApi() { SettingsApi settingsApi = new SettingsApi(authToken, organizationId); return settingsApi; }
SettingsApi function() { SettingsApi settingsApi = new SettingsApi(authToken, organizationId); return settingsApi; }
/** * get an instance of settings api. * @return Returns the SettingsApi object. */
get an instance of settings api
getSettingsApi
{ "repo_name": "zoho/books-java-wrappers", "path": "source/com/zoho/books/service/ZohoBooks.java", "license": "mit", "size": 8329 }
[ "com.zoho.books.api.SettingsApi" ]
import com.zoho.books.api.SettingsApi;
import com.zoho.books.api.*;
[ "com.zoho.books" ]
com.zoho.books;
2,775,470
private boolean showSpeechRecognitionIntent( WindowAndroid windowAndroid, Intent intent, @VoiceInteractionSource int source) { recordVoiceSearchStartEventSource(source); return windowAndroid.showCancelableIntent(intent, new VoiceRecognitionCompleteCallback(source),...
boolean function( WindowAndroid windowAndroid, Intent intent, @VoiceInteractionSource int source) { recordVoiceSearchStartEventSource(source); return windowAndroid.showCancelableIntent(intent, new VoiceRecognitionCompleteCallback(source), R.string.voice_search_error) >= 0; }
/** * Shows a cancelable speech recognition intent, returning a boolean that indicates if it was * successfully shown. * * @param windowAndroid The {@link WindowAndroid} associated with the current {@link Tab}. * @param intent The speech recognition {@link Intent}. * @param source Where th...
Shows a cancelable speech recognition intent, returning a boolean that indicates if it was successfully shown
showSpeechRecognitionIntent
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java", "license": "bsd-3-clause", "size": 20825 }
[ "android.content.Intent", "org.chromium.ui.base.WindowAndroid" ]
import android.content.Intent; import org.chromium.ui.base.WindowAndroid;
import android.content.*; import org.chromium.ui.base.*;
[ "android.content", "org.chromium.ui" ]
android.content; org.chromium.ui;
2,206,347
public void setAttributes(Vector Attributes) throws SdpException;
void function(Vector Attributes) throws SdpException;
/** Adds the specified Attribute to this Description object. * @param Attributes attribute - the attribute to add * @throws SdpException if the vector is null */
Adds the specified Attribute to this Description object
setAttributes
{ "repo_name": "adamfisk/littleshoot-client", "path": "common/sdp/src/main/java/org/lastbamboo/common/sdp/api/SessionDescription.java", "license": "gpl-2.0", "size": 11152 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
491,744
List<String> getStringListAttr(T target, String attrName);
List<String> getStringListAttr(T target, String attrName);
/** * If the attribute of the given name on the given target is a string list, then this method * returns it. * * @throws IllegalArgumentException if target is not a rule (according to {@link #isRule}), or * if the target does not have an attribute of type string list with the given name ...
If the attribute of the given name on the given target is a string list, then this method returns it
getStringListAttr
{ "repo_name": "werkt/bazel", "path": "src/main/java/com/google/devtools/build/lib/query2/engine/QueryEnvironment.java", "license": "apache-2.0", "size": 26694 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
933,782
public static List<AppInfo> getAppList() { NomadicAppManager appMangr = NomadicAppManager.getInstance(); return appMangr.getAppsList(); }
static List<AppInfo> function() { NomadicAppManager appMangr = NomadicAppManager.getInstance(); return appMangr.getAppsList(); }
/** * Get list of registered apps. * @return list of registered apps. */
Get list of registered apps
getAppList
{ "repo_name": "yangjun2/android", "path": "androidhap/InfinitiInTouch/src/com/airbiquity/application/manager/HandsetProfileManager.java", "license": "unlicense", "size": 2146 }
[ "com.airbiquity.application.model.AppInfo", "java.util.List" ]
import com.airbiquity.application.model.AppInfo; import java.util.List;
import com.airbiquity.application.model.*; import java.util.*;
[ "com.airbiquity.application", "java.util" ]
com.airbiquity.application; java.util;
146,194
public CcLinkingHelper addPicStaticLibraries(Iterable<LibraryToLink> libraries) { Iterables.addAll(picStaticLibraries, libraries); return this; }
CcLinkingHelper function(Iterable<LibraryToLink> libraries) { Iterables.addAll(picStaticLibraries, libraries); return this; }
/** * Add the corresponding files as static libraries into the linker outputs (i.e., after the linker * action) - this makes them available for linking to binary rules that depend on this rule. */
Add the corresponding files as static libraries into the linker outputs (i.e., after the linker action) - this makes them available for linking to binary rules that depend on this rule
addPicStaticLibraries
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java", "license": "apache-2.0", "size": 46522 }
[ "com.google.common.collect.Iterables", "com.google.devtools.build.lib.rules.cpp.LinkerInputs" ]
import com.google.common.collect.Iterables; import com.google.devtools.build.lib.rules.cpp.LinkerInputs;
import com.google.common.collect.*; import com.google.devtools.build.lib.rules.cpp.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
711,396
private String buildGrammar(String grammar, Map<String, String> extraparams, LevelTypeList outboundlevel) { StringBuilder outboundstring = new StringBuilder(); String[] fields = Pattern.compile("\\s+").split(grammar); for (int i = 0; i < fields.length; i++) { String formattedparam; if (fields[i].sub...
String function(String grammar, Map<String, String> extraparams, LevelTypeList outboundlevel) { StringBuilder outboundstring = new StringBuilder(); String[] fields = Pattern.compile("\\s+").split(grammar); for (int i = 0; i < fields.length; i++) { String formattedparam; if (fields[i].substring(0, 1).equals("'")) { form...
/** * Returns a string built using a particular grammar. Single-quotes strings * are counted as literal strings, whereas all other strings appearing in * the grammar require substitution with the corresponding value from the * extraparams hashmap. */
Returns a string built using a particular grammar. Single-quotes strings are counted as literal strings, whereas all other strings appearing in the grammar require substitution with the corresponding value from the extraparams hashmap
buildGrammar
{ "repo_name": "Auto-ID-Lab-Japan/fosstrak-tdt", "path": "src/main/java/org/fosstrak/tdt/TDTEngine.java", "license": "lgpl-2.1", "size": 96390 }
[ "java.util.Map", "java.util.regex.Pattern", "org.epcglobalinc.tdt.LevelTypeList" ]
import java.util.Map; import java.util.regex.Pattern; import org.epcglobalinc.tdt.LevelTypeList;
import java.util.*; import java.util.regex.*; import org.epcglobalinc.tdt.*;
[ "java.util", "org.epcglobalinc.tdt" ]
java.util; org.epcglobalinc.tdt;
2,440,605
EReference getobjectType_MethodList();
EReference getobjectType_MethodList();
/** * Returns the meta object for the containment reference '{@link org.xtext.example.delphi.delphi.objectType#getMethodList <em>Method List</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Method List</em>'. * @see org.xtext.example.delph...
Returns the meta object for the containment reference '<code>org.xtext.example.delphi.delphi.objectType#getMethodList Method List</code>'.
getobjectType_MethodList
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java", "license": "epl-1.0", "size": 434880 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
416,313
public static void sendEXIT(Client client, int status) throws IOException { ByteBuffer rawBuf = allocBuffer(4); JdwpPacket packet = new JdwpPacket(rawBuf); ByteBuffer buf = getChunkDataBuf(rawBuf); buf.putInt(status); finishChunkPacket(packet, CHUNK_EXIT, buf.po...
static void function(Client client, int status) throws IOException { ByteBuffer rawBuf = allocBuffer(4); JdwpPacket packet = new JdwpPacket(rawBuf); ByteBuffer buf = getChunkDataBuf(rawBuf); buf.putInt(status); finishChunkPacket(packet, CHUNK_EXIT, buf.position()); Log.d(STR, STR + name(CHUNK_EXIT) + STR + status); cli...
/** * Send an EXIT request to the client. */
Send an EXIT request to the client
sendEXIT
{ "repo_name": "consulo/consulo-android", "path": "tools-base/ddmlib/src/main/java/com/android/ddmlib/HandleExit.java", "license": "apache-2.0", "size": 2057 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
1,489,675
void onViewFound(View view); } public interface OnMultipleViewsFoundListener {
void onViewFound(View view); } public interface OnMultipleViewsFoundListener {
/** * Called when the view has been found * * @param view */
Called when the view has been found
onViewFound
{ "repo_name": "exponentjs/exponent", "path": "android/ReactAndroid/src/main/java/com/facebook/react/uimanager/util/ReactFindViewUtil.java", "license": "bsd-3-clause", "size": 4701 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,854,780
public ProvisioningState provisioningState() { return this.provisioningState; }
ProvisioningState function() { return this.provisioningState; }
/** * Get the provisioned state of the Batch AI job. Possible values include: 'creating', 'succeeded', 'failed', 'deleting'. * * @return the provisioningState value */
Get the provisioned state of the Batch AI job. Possible values include: 'creating', 'succeeded', 'failed', 'deleting'
provisioningState
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/batchai/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/batchai/v2018_03_01/implementation/JobInner.java", "license": "mit", "size": 26475 }
[ "com.microsoft.azure.management.batchai.v2018_03_01.ProvisioningState" ]
import com.microsoft.azure.management.batchai.v2018_03_01.ProvisioningState;
import com.microsoft.azure.management.batchai.v2018_03_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,377,105
protected void enterTokens(Token node) throws ParseException { }
void function(Token node) throws ParseException { }
/** * Called when entering a parse tree node. * * @param node the node being entered * * @throws ParseException if the node analysis discovered errors */
Called when entering a parse tree node
enterTokens
{ "repo_name": "runner-mei/mibble", "path": "src/main/java/net/percederberg/grammatica/GrammarAnalyzer.java", "license": "gpl-2.0", "size": 36326 }
[ "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Token" ]
import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Token;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
2,618,254
default void onExceptionRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler, Exception exception) {}
default void onExceptionRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler, Exception exception) {}
/** * Called when an {@link IRequestHandler} is resolved for an exception and will be executed. * * @param cycle * @param handler * @param exception */
Called when an <code>IRequestHandler</code> is resolved for an exception and will be executed
onExceptionRequestHandlerResolved
{ "repo_name": "klopfdreh/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/request/cycle/IRequestCycleListener.java", "license": "apache-2.0", "size": 6837 }
[ "org.apache.wicket.request.IRequestHandler" ]
import org.apache.wicket.request.IRequestHandler;
import org.apache.wicket.request.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,639,732
public void setIcon(Resource icon) { this.icon = icon; }
void function(Resource icon) { this.icon = icon; }
/** * Sets the icon. * * @param icon * the icon to set. */
Sets the icon
setIcon
{ "repo_name": "Darsstar/framework", "path": "server/src/main/java/com/vaadin/event/Action.java", "license": "apache-2.0", "size": 6370 }
[ "com.vaadin.server.Resource" ]
import com.vaadin.server.Resource;
import com.vaadin.server.*;
[ "com.vaadin.server" ]
com.vaadin.server;
1,984,781
void fireBaseAttributeListeners(String ns, String ln) { if (targetListeners != null) { LinkedList ll = (LinkedList) targetListeners.get(ns, ln); Iterator it = ll.iterator(); while (it.hasNext()) { AnimationTargetListener l = (AnimationTargetListener) it.ne...
void fireBaseAttributeListeners(String ns, String ln) { if (targetListeners != null) { LinkedList ll = (LinkedList) targetListeners.get(ns, ln); Iterator it = ll.iterator(); while (it.hasNext()) { AnimationTargetListener l = (AnimationTargetListener) it.next(); l.baseValueChanged(this, ns, ln, false); } } }
/** * Fires the listeners registered for changes to the base value of the * given attribute. */
Fires the listeners registered for changes to the base value of the given attribute
fireBaseAttributeListeners
{ "repo_name": "adufilie/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/svg/SVGOMElement.java", "license": "apache-2.0", "size": 31786 }
[ "java.util.Iterator", "java.util.LinkedList", "org.apache.flex.forks.batik.dom.anim.AnimationTargetListener" ]
import java.util.Iterator; import java.util.LinkedList; import org.apache.flex.forks.batik.dom.anim.AnimationTargetListener;
import java.util.*; import org.apache.flex.forks.batik.dom.anim.*;
[ "java.util", "org.apache.flex" ]
java.util; org.apache.flex;
2,372,912
public static float getScreenDpi(Context ctx) { return getDisplayMetrics(ctx).densityDpi; }
static float function(Context ctx) { return getDisplayMetrics(ctx).densityDpi; }
/** * obtain the dpi of screen */
obtain the dpi of screen
getScreenDpi
{ "repo_name": "xiaolongwuhpu/MyVideoPlayer", "path": "app/src/main/java/com/longwu/ijkplayer/utlis/FSScreen.java", "license": "apache-2.0", "size": 5672 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,221,484
public WebtrekkUserParameters setiOSId(String iOSId) { mParameters.put(Parameter.CDB_IOS_ADD_ID, iOSId.toLowerCase()); return this; }
WebtrekkUserParameters function(String iOSId) { mParameters.put(Parameter.CDB_IOS_ADD_ID, iOSId.toLowerCase()); return this; }
/** * Set iOS id * String will be normalized to lower case * @param iOSId * @return instance of to WebtrekkUserParameters */
Set iOS id String will be normalized to lower case
setiOSId
{ "repo_name": "Webtrekk/webtrekk-android-sdk", "path": "webtrekk_sdk/src/main/java/com/webtrekk/webtrekksdk/WebtrekkUserParameters.java", "license": "mit", "size": 13994 }
[ "com.webtrekk.webtrekksdk.TrackingParameter" ]
import com.webtrekk.webtrekksdk.TrackingParameter;
import com.webtrekk.webtrekksdk.*;
[ "com.webtrekk.webtrekksdk" ]
com.webtrekk.webtrekksdk;
815,869
public static Class<?> loadClass(String className, DeploymentId deploymentId, IServiceContext serviceCtx) throws HyracksException { try { IJobSerializerDeserializerContainer jobSerDeContainer = serviceCtx.getJobSerializerDeserializerContainer(); IJobSerializerDeserializer...
static Class<?> function(String className, DeploymentId deploymentId, IServiceContext serviceCtx) throws HyracksException { try { IJobSerializerDeserializerContainer jobSerDeContainer = serviceCtx.getJobSerializerDeserializerContainer(); IJobSerializerDeserializer jobSerDe = deploymentId == null ? null : jobSerDeContai...
/** * Load a class from its class name * * @param className * @param deploymentId * @param serviceCtx * @return the loaded class * @throws HyracksException */
Load a class from its class name
loadClass
{ "repo_name": "ecarm002/incubator-asterixdb", "path": "hyracks-fullstack/hyracks/hyracks-control/hyracks-control-common/src/main/java/org/apache/hyracks/control/common/deployment/DeploymentUtils.java", "license": "apache-2.0", "size": 8926 }
[ "java.io.IOException", "org.apache.hyracks.api.application.IServiceContext", "org.apache.hyracks.api.deployment.DeploymentId", "org.apache.hyracks.api.exceptions.HyracksException", "org.apache.hyracks.api.job.IJobSerializerDeserializer", "org.apache.hyracks.api.job.IJobSerializerDeserializerContainer", ...
import java.io.IOException; import org.apache.hyracks.api.application.IServiceContext; import org.apache.hyracks.api.deployment.DeploymentId; import org.apache.hyracks.api.exceptions.HyracksException; import org.apache.hyracks.api.job.IJobSerializerDeserializer; import org.apache.hyracks.api.job.IJobSerializerDeseriali...
import java.io.*; import org.apache.hyracks.api.application.*; import org.apache.hyracks.api.deployment.*; import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.api.job.*; import org.apache.hyracks.api.util.*;
[ "java.io", "org.apache.hyracks" ]
java.io; org.apache.hyracks;
221,541
public void restoreMarginLayoutParams(ViewGroup.MarginLayoutParams params) { restoreLayoutParams(params); params.leftMargin = mPreservedParams.leftMargin; params.topMargin = mPreservedParams.topMargin; params.rightMargin = mPreservedParams.rightMargin; ...
void function(ViewGroup.MarginLayoutParams params) { restoreLayoutParams(params); params.leftMargin = mPreservedParams.leftMargin; params.topMargin = mPreservedParams.topMargin; params.rightMargin = mPreservedParams.rightMargin; params.bottomMargin = mPreservedParams.bottomMargin; MarginLayoutParamsCompat.setMarginStar...
/** * Restores original dimensions and margins after they were changed for percentage based * values. Calling this method only makes sense if you previously called * {@link PercentLayoutInfo#fillMarginLayoutParams}. */
Restores original dimensions and margins after they were changed for percentage based values. Calling this method only makes sense if you previously called <code>PercentLayoutInfo#fillMarginLayoutParams</code>
restoreMarginLayoutParams
{ "repo_name": "oeager/BaisinceManager", "path": "derivative/src/main/java/com/bison/derivative/PercentLayoutHelper.java", "license": "apache-2.0", "size": 26085 }
[ "android.support.v4.view.MarginLayoutParamsCompat", "android.view.ViewGroup" ]
import android.support.v4.view.MarginLayoutParamsCompat; import android.view.ViewGroup;
import android.support.v4.view.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
1,194,146
public void seriesChanged(SeriesChangeEvent event) { if (this.propagateEvents) { updateXPoints(); fireDatasetChanged(); } }
void function(SeriesChangeEvent event) { if (this.propagateEvents) { updateXPoints(); fireDatasetChanged(); } }
/** * This method receives notification when a series belonging to the dataset * changes. It responds by updating the x-points for the entire dataset * and sending a {@link DatasetChangeEvent} to all registered listeners. * * @param event information about the change. */
This method receives notification when a series belonging to the dataset changes. It responds by updating the x-points for the entire dataset and sending a <code>DatasetChangeEvent</code> to all registered listeners
seriesChanged
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart-1.0.5/source/org/jfree/data/xy/DefaultTableXYDataset.java", "license": "lgpl-3.0", "size": 20341 }
[ "org.jfree.data.general.SeriesChangeEvent" ]
import org.jfree.data.general.SeriesChangeEvent;
import org.jfree.data.general.*;
[ "org.jfree.data" ]
org.jfree.data;
1,154,386
public Collection<TriggeredWatch> findTriggeredWatches(Collection<Watch> watches, ClusterState clusterState) { if (watches.isEmpty()) { return Collections.emptyList(); } // non existing index, return immediately IndexMetadata indexMetadata = WatchStoreUtils.getConcreteIn...
Collection<TriggeredWatch> function(Collection<Watch> watches, ClusterState clusterState) { if (watches.isEmpty()) { return Collections.emptyList(); } IndexMetadata indexMetadata = WatchStoreUtils.getConcreteIndex(TriggeredWatchStoreField.INDEX_NAME, clusterState.metadata()); if (indexMetadata == null) { return Collect...
/** * Checks if any of the loaded watches has been put into the triggered watches index for immediate execution * * Note: This is executing a blocking call over the network, thus a potential source of problems * * @param watches The list of watches that will be loaded here * @param c...
Checks if any of the loaded watches has been put into the triggered watches index for immediate execution Note: This is executing a blocking call over the network, thus a potential source of problems
findTriggeredWatches
{ "repo_name": "gingerwizard/elasticsearch", "path": "x-pack/plugin/watcher/src/main/java/org/elasticsearch/xpack/watcher/execution/TriggeredWatchStore.java", "license": "apache-2.0", "size": 9253 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.Set", "java.util.stream.Collectors", "org.elasticsearch.action.admin.indices.refresh.RefreshRequest", "org.elasticsearch.action.search.ClearScrollRequest", "org.elasticsearch.action.search.SearchRequest", "org.elastic...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Set; import java.util.stream.Collectors; import org.elasticsearch.action.admin.indices.refresh.RefreshRequest; import org.elasticsearch.action.search.ClearScrollRequest; import org.elasticsearch.action.search.SearchR...
import java.util.*; import java.util.stream.*; import org.elasticsearch.action.admin.indices.refresh.*; import org.elasticsearch.action.search.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.unit.*; import or...
[ "java.util", "org.elasticsearch.action", "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.index", "org.elasticsearch.search", "org.elasticsearch.xpack" ]
java.util; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.search; org.elasticsearch.xpack;
1,333,993
private void fireOnClosed(ConnectionEvent e) { List<EventListener> listeners = changes.getListenerList(AMQP); for (EventListener listener : listeners) { ConnectionListener amqpListener = (ConnectionListener)listener; amqpListener.onConnectionClose(e); } }
void function(ConnectionEvent e) { List<EventListener> listeners = changes.getListenerList(AMQP); for (EventListener listener : listeners) { ConnectionListener amqpListener = (ConnectionListener)listener; amqpListener.onConnectionClose(e); } }
/** * Occurs when the connection to the AMQP server is closed * * @param e */
Occurs when the connection to the AMQP server is closed
fireOnClosed
{ "repo_name": "kaazing/java.client", "path": "amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpClient.java", "license": "apache-2.0", "size": 41427 }
[ "java.util.EventListener", "java.util.List" ]
import java.util.EventListener; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,053,093
protected String encode(Object obj) throws EncodeException { try { return mapper.writeValueAsString(obj); } catch (Exception e) { throw new EncodeException("Failed to encode as JSON: " + e.getMessage()); } }
String function(Object obj) throws EncodeException { try { return mapper.writeValueAsString(obj); } catch (Exception e) { throw new EncodeException(STR + e.getMessage()); } }
/** * Taken from io.vertx.json.Json. */
Taken from io.vertx.json.Json
encode
{ "repo_name": "adnovum/katharsis-framework", "path": "katharsis-vertx/src/main/java/io/katharsis/vertx/KatharsisHandler.java", "license": "apache-2.0", "size": 4059 }
[ "io.vertx.core.json.EncodeException" ]
import io.vertx.core.json.EncodeException;
import io.vertx.core.json.*;
[ "io.vertx.core" ]
io.vertx.core;
1,457,253
public ArrayList<RUMMapEntry> getRUMMap(String key) { ArrayList<RUMMapEntry> tmpEntry; // Get the rate plan tmpEntry = RUMMapCache.get(key); // and return it return tmpEntry; }
ArrayList<RUMMapEntry> function(String key) { ArrayList<RUMMapEntry> tmpEntry; tmpEntry = RUMMapCache.get(key); return tmpEntry; }
/** * Get a value from the RateCache. The processing based on the result returned * here is evaluated in the twinned processing class, in order to reduce the * load on the main framework thread. * * @param key The identifier for the RUM map to recover * @return The RUM map containing all of the pricem...
Get a value from the RateCache. The processing based on the result returned here is evaluated in the twinned processing class, in order to reduce the load on the main framework thread
getRUMMap
{ "repo_name": "isparkes/OpenRate", "path": "src/main/java/OpenRate/cache/RUMRateCache.java", "license": "apache-2.0", "size": 36540 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,543,998
@Test public void testGetIt() { String responseMsg = target.path("myresource").request().get(String.class); assertEquals("Got it!", responseMsg); }
void function() { String responseMsg = target.path(STR).request().get(String.class); assertEquals(STR, responseMsg); }
/** * Test to see that the message "Got it!" is sent in the response. */
Test to see that the message "Got it!" is sent in the response
testGetIt
{ "repo_name": "alancosta6/homing_api_server", "path": "HomingApi/src/test/java/co/nz/homing/MyResourceTest.java", "license": "apache-2.0", "size": 1322 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,887,925
public static String getRank(Player player){ MyConfig playerConfig = Config.manager.getNewConfig(player.getUniqueId() + ".yml"); if(playerConfig.contains("Rank")){ return playerConfig.getString("Rank"); }else{ playerConfig.set("Rank", "default"); playerConfig.saveConfig(); return null; } }
static String function(Player player){ MyConfig playerConfig = Config.manager.getNewConfig(player.getUniqueId() + ".yml"); if(playerConfig.contains("Rank")){ return playerConfig.getString("Rank"); }else{ playerConfig.set("Rank", STR); playerConfig.saveConfig(); return null; } }
/** * Returns the player's rank in the form of a String (i.e. the ranks name). * @param player The player you want to get the rank of. * @return The player's rank */
Returns the player's rank in the form of a String (i.e. the ranks name)
getRank
{ "repo_name": "taylory5/TheEpicJourney", "path": "src/me/taylory5/theepicjourney/Journey.java", "license": "gpl-3.0", "size": 10884 }
[ "me.taylory5.theepicjourney.config.Config", "me.taylory5.theepicjourney.config.MyConfig", "org.bukkit.entity.Player" ]
import me.taylory5.theepicjourney.config.Config; import me.taylory5.theepicjourney.config.MyConfig; import org.bukkit.entity.Player;
import me.taylory5.theepicjourney.config.*; import org.bukkit.entity.*;
[ "me.taylory5.theepicjourney", "org.bukkit.entity" ]
me.taylory5.theepicjourney; org.bukkit.entity;
2,851,919
@Test public void testSearchWithReferralAncestorCoreAPIWithManageDSAIt() throws Exception { CoreSession coreSession = getService().getAdminSession(); Dn dn = new Dn( "ou=nobody,ou=apache,ou=roles,o=Mnn,c=WW,ou=system" ); try { coreSession.search( dn, "(Ob...
void function() throws Exception { CoreSession coreSession = getService().getAdminSession(); Dn dn = new Dn( STR ); try { coreSession.search( dn, STR, true ); fail(); } catch ( LdapPartialResultException lpre ) { assertTrue( true ); } }
/** * Test a search of a non existing entry (not a referral), with a referral * in its ancestor, using the Core API with the ManageDsaIt flag. */
Test a search of a non existing entry (not a referral), with a referral in its ancestor, using the Core API with the ManageDsaIt flag
testSearchWithReferralAncestorCoreAPIWithManageDSAIt
{ "repo_name": "apache/directory-server", "path": "core-integ/src/test/java/org/apache/directory/server/core/jndi/referral/SearchReferralIT.java", "license": "apache-2.0", "size": 14205 }
[ "org.apache.directory.api.ldap.model.exception.LdapPartialResultException", "org.apache.directory.api.ldap.model.name.Dn", "org.apache.directory.server.core.api.CoreSession", "org.junit.jupiter.api.Assertions" ]
import org.apache.directory.api.ldap.model.exception.LdapPartialResultException; import org.apache.directory.api.ldap.model.name.Dn; import org.apache.directory.server.core.api.CoreSession; import org.junit.jupiter.api.Assertions;
import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*; import org.apache.directory.server.core.api.*; import org.junit.jupiter.api.*;
[ "org.apache.directory", "org.junit.jupiter" ]
org.apache.directory; org.junit.jupiter;
2,535,070
@Test public void testNestedScriptsForOracle() throws Exception { String childTab1 = "childTab1"; String childTab2 = "childTab2"; String parentTab = "fooTab"; String childTestScript1[] = { "-- this is a comment ", "DROP TABLE IF EXISTS " + childTab1 + ";", "CREATE TABLE " + childT...
void function() throws Exception { String childTab1 = STR; String childTab2 = STR; String parentTab = STR; String childTestScript1[] = { STR, STR + childTab1 + ";", STR + childTab1 + STR, STR + childTab1 + ";" }; String childTestScript2[] = { STR, STR + childTab2 + ";", STR + childTab2 + STR, STR, STR + childTab2 + ";"...
/** * Test nested script formatting */
Test nested script formatting
testNestedScriptsForOracle
{ "repo_name": "vineetgarg02/hive", "path": "itests/hive-unit/src/test/java/org/apache/hive/beeline/schematool/TestSchemaTool.java", "license": "apache-2.0", "size": 12222 }
[ "java.io.File", "org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper", "org.junit.Assert" ]
import java.io.File; import org.apache.hadoop.hive.metastore.tools.schematool.HiveSchemaHelper; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.hive.metastore.tools.schematool.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
1,197,335
public static Map<CatalogType, String> getDisplayNameMapping(CatalogType...items) { Map<CatalogType, String> ret = new HashMap<CatalogType, String>(); for (CatalogType i : items) { if (i == null) continue; ret.put(i, CatalogUtil.getDisplayName(i, false)); } // FOR ...
static Map<CatalogType, String> function(CatalogType...items) { Map<CatalogType, String> ret = new HashMap<CatalogType, String>(); for (CatalogType i : items) { if (i == null) continue; ret.put(i, CatalogUtil.getDisplayName(i, false)); } return (ret); }
/** * Return a mapping from the CatalogType handle to their display name * @param items * @return */
Return a mapping from the CatalogType handle to their display name
getDisplayNameMapping
{ "repo_name": "gxyang/hstore", "path": "src/frontend/edu/brown/catalog/CatalogUtil.java", "license": "gpl-3.0", "size": 121408 }
[ "java.util.HashMap", "java.util.Map", "org.voltdb.catalog.CatalogType" ]
import java.util.HashMap; import java.util.Map; import org.voltdb.catalog.CatalogType;
import java.util.*; import org.voltdb.catalog.*;
[ "java.util", "org.voltdb.catalog" ]
java.util; org.voltdb.catalog;
880,142
private static FunctionNode removeUnusedSlots(final FunctionNode functionNode) { if (!functionNode.needsCallee()) { functionNode.compilerConstant(CALLEE).setNeedsSlot(false); } if (!(functionNode.hasScopeBlock() || functionNode.needsParentScope())) { functionNode.comp...
static FunctionNode function(final FunctionNode functionNode) { if (!functionNode.needsCallee()) { functionNode.compilerConstant(CALLEE).setNeedsSlot(false); } if (!(functionNode.hasScopeBlock() functionNode.needsParentScope())) { functionNode.compilerConstant(SCOPE).setNeedsSlot(false); } if(functionNode.isNamedFuncti...
/** * Checks if various symbols that were provisionally marked as needing a slot ended up unused, and marks them as not * needing a slot after all. * @param functionNode the function node * @return the passed in node, for easy chaining */
Checks if various symbols that were provisionally marked as needing a slot ended up unused, and marks them as not needing a slot after all
removeUnusedSlots
{ "repo_name": "malaporte/kaziranga", "path": "src/jdk/nashorn/internal/codegen/AssignSymbols.java", "license": "gpl-2.0", "size": 44741 }
[ "java.util.ArrayDeque", "java.util.Deque", "java.util.HashMap", "java.util.Map", "java.util.Set" ]
import java.util.ArrayDeque; import java.util.Deque; import java.util.HashMap; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,374,228
public static void addPack (ModPack pack) { synchronized (packs) { packs.add(pack); Main.getEventBus().post(new PackChangeEvent(PackChangeEvent.TYPE.ADD, new ArrayList<ModPack>().add(pack)));//MAKE SURE TO REMOVE FROM LISTENER!! } }
static void function (ModPack pack) { synchronized (packs) { packs.add(pack); Main.getEventBus().post(new PackChangeEvent(PackChangeEvent.TYPE.ADD, new ArrayList<ModPack>().add(pack))); } }
/** * Adds modpack to the modpacks array * @param pack - a ModPack instance */
Adds modpack to the modpacks array
addPack
{ "repo_name": "juju790/FTNTLauncher_1.7Fix", "path": "src/main/java/net/ftb/data/ModPack.java", "license": "apache-2.0", "size": 17524 }
[ "java.util.ArrayList", "net.ftb.events.PackChangeEvent", "net.ftb.main.Main" ]
import java.util.ArrayList; import net.ftb.events.PackChangeEvent; import net.ftb.main.Main;
import java.util.*; import net.ftb.events.*; import net.ftb.main.*;
[ "java.util", "net.ftb.events", "net.ftb.main" ]
java.util; net.ftb.events; net.ftb.main;
269,722
public ServiceFuture<StorageBundle> regenerateStorageAccountKeyAsync(String vaultBaseUrl, String storageAccountName, String keyName, final ServiceCallback<StorageBundle> serviceCallback) { return ServiceFuture.fromResponse(regenerateStorageAccountKeyWithServiceResponseAsync(vaultBaseUrl, storageAccountName,...
ServiceFuture<StorageBundle> function(String vaultBaseUrl, String storageAccountName, String keyName, final ServiceCallback<StorageBundle> serviceCallback) { return ServiceFuture.fromResponse(regenerateStorageAccountKeyWithServiceResponseAsync(vaultBaseUrl, storageAccountName, keyName), serviceCallback); }
/** * Regenerates the specified key value for the given storage account. This operation requires the storage/regeneratekey permission. * * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. * @param storageAccountName The name of the storage account. * @param keyNa...
Regenerates the specified key value for the given storage account. This operation requires the storage/regeneratekey permission
regenerateStorageAccountKeyAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java", "license": "mit", "size": 884227 }
[ "com.microsoft.azure.keyvault.models.StorageBundle", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.keyvault.models.StorageBundle; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
1,553,195
public void reloadProvider(ProviderModel model) { assert null != model; synchronized (providers) { stopAndRemoveProvider(model); loadProvider(model); startProvider(model); } }
void function(ProviderModel model) { assert null != model; synchronized (providers) { stopAndRemoveProvider(model); loadProvider(model); startProvider(model); } }
/** * Signal a provider service to stop, reload its configuration and restart. * * @param model The model representation of the provider to reload */
Signal a provider service to stop, reload its configuration and restart
reloadProvider
{ "repo_name": "JackPrice/gatekeeper", "path": "src/main/java/io/gatekeeper/node/service/ProviderService.java", "license": "apache-2.0", "size": 10046 }
[ "io.gatekeeper.model.ProviderModel" ]
import io.gatekeeper.model.ProviderModel;
import io.gatekeeper.model.*;
[ "io.gatekeeper.model" ]
io.gatekeeper.model;
2,091,117
@SuppressWarnings("unchecked") public void findServiceDescriptionsAsync( FindServiceDescriptionsCallBack callBack) { // Use callback.status() for long-running searches // callBack.status("Resolving example services"); List<ServiceDescription> results = new ArrayList<ServiceDescription>(); // FI...
@SuppressWarnings(STR) void function( FindServiceDescriptionsCallBack callBack) { List<ServiceDescription> results = new ArrayList<ServiceDescription>(); for (int i = 1; i <= 5; i++) { BridgeDbServiceDesc service = new BridgeDbServiceDesc(); service.setExampleString(STR + i); service.setExampleUri(URI.create(STRService...
/** * Do the actual search for services. Return using the callBack parameter. */
Do the actual search for services. Return using the callBack parameter
findServiceDescriptionsAsync
{ "repo_name": "amarillion/BridgeDb", "path": "taverna-bridgedb/bridgedb-activity-ui/src/main/java/org/bridgedb/util/taverna/ui/serviceprovider/BridgeDbServiceProvider.java", "license": "apache-2.0", "size": 2021 }
[ "java.net.URI", "java.util.ArrayList", "java.util.List", "net.sf.taverna.t2.servicedescriptions.ServiceDescription" ]
import java.net.URI; import java.util.ArrayList; import java.util.List; import net.sf.taverna.t2.servicedescriptions.ServiceDescription;
import java.net.*; import java.util.*; import net.sf.taverna.t2.servicedescriptions.*;
[ "java.net", "java.util", "net.sf.taverna" ]
java.net; java.util; net.sf.taverna;
813,468
public SkuDescription sku() { return this.sku; }
SkuDescription function() { return this.sku; }
/** * Get the sku property: Description of a SKU for a scalable resource. * * @return the sku value. */
Get the sku property: Description of a SKU for a scalable resource
sku
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/fluent/models/StaticSiteArmResourceInner.java", "license": "mit", "size": 6573 }
[ "com.azure.resourcemanager.appservice.models.SkuDescription" ]
import com.azure.resourcemanager.appservice.models.SkuDescription;
import com.azure.resourcemanager.appservice.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,187,128
public static FullHttpResponse createFullHttpResponse(HttpVersion httpVersion, HttpResponseStatus status, String contentType, ByteBuf body, ...
static FullHttpResponse function(HttpVersion httpVersion, HttpResponseStatus status, String contentType, ByteBuf body, int contentLength) { DefaultFullHttpResponse response; if (body != null) { response = new DefaultFullHttpResponse(httpVersion, status, body); response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, co...
/** * Creates a new {@link FullHttpResponse} with the specified body. * * @param httpVersion HTTP version of the response * @param status HTTP status code * @param contentType the Content-Type of the body * @param body body to include in the FullHttpResponse; if null * @param contentL...
Creates a new <code>FullHttpResponse</code> with the specified body
createFullHttpResponse
{ "repo_name": "adamfisk/LittleProxy", "path": "src/main/java/org/littleshoot/proxy/impl/ProxyUtils.java", "license": "apache-2.0", "size": 29527 }
[ "io.netty.buffer.ByteBuf", "io.netty.handler.codec.http.DefaultFullHttpResponse", "io.netty.handler.codec.http.FullHttpResponse", "io.netty.handler.codec.http.HttpHeaders", "io.netty.handler.codec.http.HttpResponseStatus", "io.netty.handler.codec.http.HttpVersion" ]
import io.netty.buffer.ByteBuf; import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.HttpVersion;
import io.netty.buffer.*; import io.netty.handler.codec.http.*;
[ "io.netty.buffer", "io.netty.handler" ]
io.netty.buffer; io.netty.handler;
660,228
public void unregisterInputSource(AbstractInputSource is){ synchronized (registeredInputSources) { if (registeredInputSources.contains(is)){ registeredInputSources.remove(is); //Inform the input source that it is now UN-registered from the application is.onUnregistered(); } } } ...
void function(AbstractInputSource is){ synchronized (registeredInputSources) { if (registeredInputSources.contains(is)){ registeredInputSources.remove(is); is.onUnregistered(); } } }
/** * Unregisters a input source. * @param is the input source */
Unregisters a input source
unregisterInputSource
{ "repo_name": "nppotdar/touchtable-menu", "path": "src/org/mt4j/input/InputManager.java", "license": "gpl-2.0", "size": 13994 }
[ "org.mt4j.input.inputSources.AbstractInputSource" ]
import org.mt4j.input.inputSources.AbstractInputSource;
import org.mt4j.input.*;
[ "org.mt4j.input" ]
org.mt4j.input;
2,510,007
public Date getDeleteAtAsDate();
Date function();
/** * The date when the object will be deleted. Note that this value is never passed in Container.list and * therefore always costs an extra HTTP call to the server. * @return date when the StoredObject will be deleted (as a java.util.Date) */
The date when the object will be deleted. Note that this value is never passed in Container.list and therefore always costs an extra HTTP call to the server
getDeleteAtAsDate
{ "repo_name": "mouse3150/blooming", "path": "joss/src/main/java/org/javaswift/joss/model/StoredObject.java", "license": "apache-2.0", "size": 11513 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,194,766
@Override public void onBackPressed() { if (mediaDetailContainer.getVisibility() == View.VISIBLE) { mediaDetailContainer.setVisibility(View.GONE); reviewContainer.setVisibility(View.VISIBLE); } super.onBackPressed(); }
void function() { if (mediaDetailContainer.getVisibility() == View.VISIBLE) { mediaDetailContainer.setVisibility(View.GONE); reviewContainer.setVisibility(View.VISIBLE); } super.onBackPressed(); }
/** * handle the back pressed event of this activity * this function call every time when back button is pressed */
handle the back pressed event of this activity this function call every time when back button is pressed
onBackPressed
{ "repo_name": "nicolas-raoul/apps-android-commons", "path": "app/src/main/java/fr/free/nrw/commons/review/ReviewActivity.java", "license": "apache-2.0", "size": 10954 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
832,669